@qikdev/vue-ui 0.5.5 → 0.5.6
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/dist/lib.es.js +1 -1
- package/dist/lib.es.js.map +1 -1
- package/dist/lib.umd.js +1 -1
- package/dist/lib.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/lib.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(D,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("@qikdev/sdk")):typeof define=="function"&&define.amd?define(["exports","vue","@qikdev/sdk"],t):(D=typeof globalThis<"u"?globalThis:D||self,t(D["@qikdev/vue-ui"]={},D.Vue,D.sdk))})(this,function(D,t,pn){"use strict";var s4=Object.defineProperty;var l4=(D,t,pn)=>t in D?s4(D,t,{enumerable:!0,configurable:!0,writable:!0,value:pn}):D[t]=pn;var X=(D,t,pn)=>l4(D,typeof t!="symbol"?t+"":t,pn);const Yg="0.5.5";class gn extends Error{}class Kg extends gn{constructor(n){super(`Invalid DateTime: ${n.toMessage()}`)}}class Jg extends gn{constructor(n){super(`Invalid Interval: ${n.toMessage()}`)}}class Zg extends gn{constructor(n){super(`Invalid Duration: ${n.toMessage()}`)}}class cr extends gn{}class hc extends gn{constructor(n){super(`Invalid unit ${n}`)}}class dt extends gn{}class Zt extends gn{constructor(){super("Zone is an abstract class")}}const F="numeric",yt="short",rt="long",gi={year:F,month:F,day:F},pc={year:F,month:yt,day:F},Xg={year:F,month:yt,day:F,weekday:yt},gc={year:F,month:rt,day:F},yc={year:F,month:rt,day:F,weekday:rt},kc={hour:F,minute:F},wc={hour:F,minute:F,second:F},_c={hour:F,minute:F,second:F,timeZoneName:yt},bc={hour:F,minute:F,second:F,timeZoneName:rt},xc={hour:F,minute:F,hourCycle:"h23"},Cc={hour:F,minute:F,second:F,hourCycle:"h23"},Vc={hour:F,minute:F,second:F,hourCycle:"h23",timeZoneName:yt},Ec={hour:F,minute:F,second:F,hourCycle:"h23",timeZoneName:rt},Nc={year:F,month:F,day:F,hour:F,minute:F},Tc={year:F,month:F,day:F,hour:F,minute:F,second:F},Sc={year:F,month:yt,day:F,hour:F,minute:F},Bc={year:F,month:yt,day:F,hour:F,minute:F,second:F},Qg={year:F,month:yt,day:F,weekday:yt,hour:F,minute:F},Dc={year:F,month:rt,day:F,hour:F,minute:F,timeZoneName:yt},Oc={year:F,month:rt,day:F,hour:F,minute:F,second:F,timeZoneName:yt},Mc={year:F,month:rt,day:F,weekday:rt,hour:F,minute:F,timeZoneName:rt},Fc={year:F,month:rt,day:F,weekday:rt,hour:F,minute:F,second:F,timeZoneName:rt};function te(e){return typeof e>"u"}function yn(e){return typeof e=="number"}function Qr(e){return typeof e=="number"&&e%1===0}function vg(e){return typeof e=="string"}function ey(e){return Object.prototype.toString.call(e)==="[object Date]"}function Ic(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function ty(e){return Array.isArray(e)?e:[e]}function Ac(e,n,r){if(e.length!==0)return e.reduce((i,s)=>{const o=[n(s),s];return i&&r(i[0],o[0])===i[0]?i:o},null)[1]}function ny(e,n){return n.reduce((r,i)=>(r[i]=e[i],r),{})}function Rn(e,n){return Object.prototype.hasOwnProperty.call(e,n)}function jt(e,n,r){return Qr(e)&&e>=n&&e<=r}function ry(e,n){return e-n*Math.floor(e/n)}function Ne(e,n=2){const r=e<0;let i;return r?i="-"+(""+-e).padStart(n,"0"):i=(""+e).padStart(n,"0"),i}function Xt(e){if(!(te(e)||e===null||e===""))return parseInt(e,10)}function kn(e){if(!(te(e)||e===null||e===""))return parseFloat(e)}function yi(e){if(!(te(e)||e===null||e==="")){const n=parseFloat("0."+e)*1e3;return Math.floor(n)}}function ki(e,n,r=!1){const i=10**n;return(r?Math.trunc:Math.round)(e*i)/i}function dr(e){return e%4===0&&(e%100!==0||e%400===0)}function ur(e){return dr(e)?366:365}function vr(e,n){const r=ry(n-1,12)+1,i=e+(n-r)/12;return r===2?dr(i)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][r-1]}function wi(e){let n=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(n=new Date(n),n.setUTCFullYear(n.getUTCFullYear()-1900)),+n}function eo(e){const n=(e+Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400))%7,r=e-1,i=(r+Math.floor(r/4)-Math.floor(r/100)+Math.floor(r/400))%7;return n===4||i===3?53:52}function _i(e){return e>99?e:e>60?1900+e:2e3+e}function Lc(e,n,r,i=null){const s=new Date(e),o={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};i&&(o.timeZone=i);const l={timeZoneName:n,...o},a=new Intl.DateTimeFormat(r,l).formatToParts(s).find(c=>c.type.toLowerCase()==="timezonename");return a?a.value:null}function to(e,n){let r=parseInt(e,10);Number.isNaN(r)&&(r=0);const i=parseInt(n,10)||0,s=r<0||Object.is(r,-0)?-i:i;return r*60+s}function Rc(e){const n=Number(e);if(typeof e=="boolean"||e===""||Number.isNaN(n))throw new dt(`Invalid unit value ${e}`);return n}function no(e,n){const r={};for(const i in e)if(Rn(e,i)){const s=e[i];if(s==null)continue;r[n(i)]=Rc(s)}return r}function mr(e,n){const r=Math.trunc(Math.abs(e/60)),i=Math.trunc(Math.abs(e%60)),s=e>=0?"+":"-";switch(n){case"short":return`${s}${Ne(r,2)}:${Ne(i,2)}`;case"narrow":return`${s}${r}${i>0?`:${i}`:""}`;case"techie":return`${s}${Ne(r,2)}${Ne(i,2)}`;default:throw new RangeError(`Value format ${n} is out of range for property format`)}}function ro(e){return ny(e,["hour","minute","second","millisecond"])}const Pc=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/,oy=["January","February","March","April","May","June","July","August","September","October","November","December"],Uc=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],iy=["J","F","M","A","M","J","J","A","S","O","N","D"];function $c(e){switch(e){case"narrow":return[...iy];case"short":return[...Uc];case"long":return[...oy];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const zc=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],jc=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],sy=["M","T","W","T","F","S","S"];function qc(e){switch(e){case"narrow":return[...sy];case"short":return[...jc];case"long":return[...zc];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Hc=["AM","PM"],ly=["Before Christ","Anno Domini"],ay=["BC","AD"],cy=["B","A"];function Wc(e){switch(e){case"narrow":return[...cy];case"short":return[...ay];case"long":return[...ly];default:return null}}function dy(e){return Hc[e.hour<12?0:1]}function uy(e,n){return qc(n)[e.weekday-1]}function my(e,n){return $c(n)[e.month-1]}function fy(e,n){return Wc(n)[e.year<0?0:1]}function hy(e,n,r="always",i=!1){const s={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},o=["hours","minutes","seconds"].indexOf(e)===-1;if(r==="auto"&&o){const u=e==="days";switch(n){case 1:return u?"tomorrow":`next ${s[e][0]}`;case-1:return u?"yesterday":`last ${s[e][0]}`;case 0:return u?"today":`this ${s[e][0]}`}}const l=Object.is(n,-0)||n<0,a=Math.abs(n),c=a===1,d=s[e],m=i?c?d[1]:d[2]||d[1]:c?s[e][0]:e;return l?`${a} ${m} ago`:`in ${a} ${m}`}function Gc(e,n){let r="";for(const i of e)i.literal?r+=i.val:r+=n(i.val);return r}const py={D:gi,DD:pc,DDD:gc,DDDD:yc,t:kc,tt:wc,ttt:_c,tttt:bc,T:xc,TT:Cc,TTT:Vc,TTTT:Ec,f:Nc,ff:Sc,fff:Dc,ffff:Mc,F:Tc,FF:Bc,FFF:Oc,FFFF:Fc};class Ye{static create(n,r={}){return new Ye(n,r)}static parseFormat(n){let r=null,i="",s=!1;const o=[];for(let l=0;l<n.length;l++){const a=n.charAt(l);a==="'"?(i.length>0&&o.push({literal:s,val:i}),r=null,i="",s=!s):s||a===r?i+=a:(i.length>0&&o.push({literal:!1,val:i}),i=a,r=a)}return i.length>0&&o.push({literal:s,val:i}),o}static macroTokenToFormatOpts(n){return py[n]}constructor(n,r){this.opts=r,this.loc=n,this.systemLoc=null}formatWithSystemDefault(n,r){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(n,{...this.opts,...r}).format()}formatDateTime(n,r={}){return this.loc.dtFormatter(n,{...this.opts,...r}).format()}formatDateTimeParts(n,r={}){return this.loc.dtFormatter(n,{...this.opts,...r}).formatToParts()}resolvedOptions(n,r={}){return this.loc.dtFormatter(n,{...this.opts,...r}).resolvedOptions()}num(n,r=0){if(this.opts.forceSimple)return Ne(n,r);const i={...this.opts};return r>0&&(i.padTo=r),this.loc.numberFormatter(i).format(n)}formatDateTimeFromString(n,r){const i=this.loc.listingMode()==="en",s=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",o=(h,g)=>this.loc.extract(n,h,g),l=h=>n.isOffsetFixed&&n.offset===0&&h.allowZ?"Z":n.isValid?n.zone.formatOffset(n.ts,h.format):"",a=()=>i?dy(n):o({hour:"numeric",hourCycle:"h12"},"dayperiod"),c=(h,g)=>i?my(n,h):o(g?{month:h}:{month:h,day:"numeric"},"month"),d=(h,g)=>i?uy(n,h):o(g?{weekday:h}:{weekday:h,month:"long",day:"numeric"},"weekday"),m=h=>{const g=Ye.macroTokenToFormatOpts(h);return g?this.formatWithSystemDefault(n,g):h},u=h=>i?fy(n,h):o({era:h},"era"),f=h=>{switch(h){case"S":return this.num(n.millisecond);case"u":case"SSS":return this.num(n.millisecond,3);case"s":return this.num(n.second);case"ss":return this.num(n.second,2);case"uu":return this.num(Math.floor(n.millisecond/10),2);case"uuu":return this.num(Math.floor(n.millisecond/100));case"m":return this.num(n.minute);case"mm":return this.num(n.minute,2);case"h":return this.num(n.hour%12===0?12:n.hour%12);case"hh":return this.num(n.hour%12===0?12:n.hour%12,2);case"H":return this.num(n.hour);case"HH":return this.num(n.hour,2);case"Z":return l({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return l({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return l({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return n.zone.offsetName(n.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return n.zone.offsetName(n.ts,{format:"long",locale:this.loc.locale});case"z":return n.zoneName;case"a":return a();case"d":return s?o({day:"numeric"},"day"):this.num(n.day);case"dd":return s?o({day:"2-digit"},"day"):this.num(n.day,2);case"c":return this.num(n.weekday);case"ccc":return d("short",!0);case"cccc":return d("long",!0);case"ccccc":return d("narrow",!0);case"E":return this.num(n.weekday);case"EEE":return d("short",!1);case"EEEE":return d("long",!1);case"EEEEE":return d("narrow",!1);case"L":return s?o({month:"numeric",day:"numeric"},"month"):this.num(n.month);case"LL":return s?o({month:"2-digit",day:"numeric"},"month"):this.num(n.month,2);case"LLL":return c("short",!0);case"LLLL":return c("long",!0);case"LLLLL":return c("narrow",!0);case"M":return s?o({month:"numeric"},"month"):this.num(n.month);case"MM":return s?o({month:"2-digit"},"month"):this.num(n.month,2);case"MMM":return c("short",!1);case"MMMM":return c("long",!1);case"MMMMM":return c("narrow",!1);case"y":return s?o({year:"numeric"},"year"):this.num(n.year);case"yy":return s?o({year:"2-digit"},"year"):this.num(n.year.toString().slice(-2),2);case"yyyy":return s?o({year:"numeric"},"year"):this.num(n.year,4);case"yyyyyy":return s?o({year:"numeric"},"year"):this.num(n.year,6);case"G":return u("short");case"GG":return u("long");case"GGGGG":return u("narrow");case"kk":return this.num(n.weekYear.toString().slice(-2),2);case"kkkk":return this.num(n.weekYear,4);case"W":return this.num(n.weekNumber);case"WW":return this.num(n.weekNumber,2);case"o":return this.num(n.ordinal);case"ooo":return this.num(n.ordinal,3);case"q":return this.num(n.quarter);case"qq":return this.num(n.quarter,2);case"X":return this.num(Math.floor(n.ts/1e3));case"x":return this.num(n.ts);default:return m(h)}};return Gc(Ye.parseFormat(r),f)}formatDurationFromString(n,r){const i=c=>{switch(c[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},s=c=>d=>{const m=i(d);return m?this.num(c.get(m),d.length):d},o=Ye.parseFormat(r),l=o.reduce((c,{literal:d,val:m})=>d?c:c.concat(m),[]),a=n.shiftTo(...l.map(i).filter(c=>c));return Gc(o,s(a))}}class kt{constructor(n,r){this.reason=n,this.explanation=r}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}class fr{get type(){throw new Zt}get name(){throw new Zt}get ianaName(){return this.name}get isUniversal(){throw new Zt}offsetName(n,r){throw new Zt}formatOffset(n,r){throw new Zt}offset(n){throw new Zt}equals(n){throw new Zt}get isValid(){throw new Zt}}let bi=null;class xi extends fr{static get instance(){return bi===null&&(bi=new xi),bi}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(n,{format:r,locale:i}){return Lc(n,r,i)}formatOffset(n,r){return mr(this.offset(n),r)}offset(n){return-new Date(n).getTimezoneOffset()}equals(n){return n.type==="system"}get isValid(){return!0}}let oo={};function gy(e){return oo[e]||(oo[e]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),oo[e]}const yy={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function ky(e,n){const r=e.format(n).replace(/\u200E/g,""),i=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(r),[,s,o,l,a,c,d,m]=i;return[l,s,o,a,c,d,m]}function wy(e,n){const r=e.formatToParts(n),i=[];for(let s=0;s<r.length;s++){const{type:o,value:l}=r[s],a=yy[o];o==="era"?i[a]=l:te(a)||(i[a]=parseInt(l,10))}return i}let io={};class qt extends fr{static create(n){return io[n]||(io[n]=new qt(n)),io[n]}static resetCache(){io={},oo={}}static isValidSpecifier(n){return this.isValidZone(n)}static isValidZone(n){if(!n)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:n}).format(),!0}catch{return!1}}constructor(n){super(),this.zoneName=n,this.valid=qt.isValidZone(n)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(n,{format:r,locale:i}){return Lc(n,r,i,this.name)}formatOffset(n,r){return mr(this.offset(n),r)}offset(n){const r=new Date(n);if(isNaN(r))return NaN;const i=gy(this.name);let[s,o,l,a,c,d,m]=i.formatToParts?wy(i,r):ky(i,r);a==="BC"&&(s=-Math.abs(s)+1);const f=wi({year:s,month:o,day:l,hour:c===24?0:c,minute:d,second:m,millisecond:0});let h=+r;const g=h%1e3;return h-=g>=0?g:1e3+g,(f-h)/(60*1e3)}equals(n){return n.type==="iana"&&n.name===this.name}get isValid(){return this.valid}}let Ci=null;class qe extends fr{static get utcInstance(){return Ci===null&&(Ci=new qe(0)),Ci}static instance(n){return n===0?qe.utcInstance:new qe(n)}static parseSpecifier(n){if(n){const r=n.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(r)return new qe(to(r[1],r[2]))}return null}constructor(n){super(),this.fixed=n}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${mr(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${mr(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(n,r){return mr(this.fixed,r)}get isUniversal(){return!0}offset(){return this.fixed}equals(n){return n.type==="fixed"&&n.fixed===this.fixed}get isValid(){return!0}}class _y extends fr{constructor(n){super(),this.zoneName=n}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function Qt(e,n){if(te(e)||e===null)return n;if(e instanceof fr)return e;if(vg(e)){const r=e.toLowerCase();return r==="local"||r==="system"?n:r==="utc"||r==="gmt"?qe.utcInstance:qe.parseSpecifier(r)||qt.create(e)}else return yn(e)?qe.instance(e):typeof e=="object"&&e.offset&&typeof e.offset=="number"?e:new _y(e)}let Yc=()=>Date.now(),Kc="system",Jc=null,Zc=null,Xc=null,Qc;class Me{static get now(){return Yc}static set now(n){Yc=n}static set defaultZone(n){Kc=n}static get defaultZone(){return Qt(Kc,xi.instance)}static get defaultLocale(){return Jc}static set defaultLocale(n){Jc=n}static get defaultNumberingSystem(){return Zc}static set defaultNumberingSystem(n){Zc=n}static get defaultOutputCalendar(){return Xc}static set defaultOutputCalendar(n){Xc=n}static get throwOnInvalid(){return Qc}static set throwOnInvalid(n){Qc=n}static resetCaches(){we.resetCache(),qt.resetCache()}}let vc={};function by(e,n={}){const r=JSON.stringify([e,n]);let i=vc[r];return i||(i=new Intl.ListFormat(e,n),vc[r]=i),i}let Vi={};function Ei(e,n={}){const r=JSON.stringify([e,n]);let i=Vi[r];return i||(i=new Intl.DateTimeFormat(e,n),Vi[r]=i),i}let Ni={};function xy(e,n={}){const r=JSON.stringify([e,n]);let i=Ni[r];return i||(i=new Intl.NumberFormat(e,n),Ni[r]=i),i}let Ti={};function Cy(e,n={}){const{base:r,...i}=n,s=JSON.stringify([e,i]);let o=Ti[s];return o||(o=new Intl.RelativeTimeFormat(e,n),Ti[s]=o),o}let hr=null;function Vy(){return hr||(hr=new Intl.DateTimeFormat().resolvedOptions().locale,hr)}function Ey(e){const n=e.indexOf("-u-");if(n===-1)return[e];{let r;const i=e.substring(0,n);try{r=Ei(e).resolvedOptions()}catch{r=Ei(i).resolvedOptions()}const{numberingSystem:s,calendar:o}=r;return[i,s,o]}}function Ny(e,n,r){return(r||n)&&(e+="-u",r&&(e+=`-ca-${r}`),n&&(e+=`-nu-${n}`)),e}function Ty(e){const n=[];for(let r=1;r<=12;r++){const i=b.utc(2016,r,1);n.push(e(i))}return n}function Sy(e){const n=[];for(let r=1;r<=7;r++){const i=b.utc(2016,11,13+r);n.push(e(i))}return n}function so(e,n,r,i,s){const o=e.listingMode(r);return o==="error"?null:o==="en"?i(n):s(n)}function By(e){return e.numberingSystem&&e.numberingSystem!=="latn"?!1:e.numberingSystem==="latn"||!e.locale||e.locale.startsWith("en")||new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem==="latn"}class Dy{constructor(n,r,i){this.padTo=i.padTo||0,this.floor=i.floor||!1;const{padTo:s,floor:o,...l}=i;if(!r||Object.keys(l).length>0){const a={useGrouping:!1,...i};i.padTo>0&&(a.minimumIntegerDigits=i.padTo),this.inf=xy(n,a)}}format(n){if(this.inf){const r=this.floor?Math.floor(n):n;return this.inf.format(r)}else{const r=this.floor?Math.floor(n):ki(n,3);return Ne(r,this.padTo)}}}class Oy{constructor(n,r,i){this.opts=i;let s;if(n.zone.isUniversal){const l=-1*(n.offset/60),a=l>=0?`Etc/GMT+${l}`:`Etc/GMT${l}`;n.offset!==0&&qt.create(a).valid?(s=a,this.dt=n):(s="UTC",i.timeZoneName?this.dt=n:this.dt=n.offset===0?n:b.fromMillis(n.ts+n.offset*60*1e3))}else n.zone.type==="system"?this.dt=n:(this.dt=n,s=n.zone.name);const o={...this.opts};s&&(o.timeZone=s),this.dtf=Ei(r,o)}format(){return this.dtf.format(this.dt.toJSDate())}formatToParts(){return this.dtf.formatToParts(this.dt.toJSDate())}resolvedOptions(){return this.dtf.resolvedOptions()}}class My{constructor(n,r,i){this.opts={style:"long",...i},!r&&Ic()&&(this.rtf=Cy(n,i))}format(n,r){return this.rtf?this.rtf.format(n,r):hy(r,n,this.opts.numeric,this.opts.style!=="long")}formatToParts(n,r){return this.rtf?this.rtf.formatToParts(n,r):[]}}class we{static fromOpts(n){return we.create(n.locale,n.numberingSystem,n.outputCalendar,n.defaultToEN)}static create(n,r,i,s=!1){const o=n||Me.defaultLocale,l=o||(s?"en-US":Vy()),a=r||Me.defaultNumberingSystem,c=i||Me.defaultOutputCalendar;return new we(l,a,c,o)}static resetCache(){hr=null,Vi={},Ni={},Ti={}}static fromObject({locale:n,numberingSystem:r,outputCalendar:i}={}){return we.create(n,r,i)}constructor(n,r,i,s){const[o,l,a]=Ey(n);this.locale=o,this.numberingSystem=r||l||null,this.outputCalendar=i||a||null,this.intl=Ny(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=s,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=By(this)),this.fastNumbersCached}listingMode(){const n=this.isEnglish(),r=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return n&&r?"en":"intl"}clone(n){return!n||Object.getOwnPropertyNames(n).length===0?this:we.create(n.locale||this.specifiedLocale,n.numberingSystem||this.numberingSystem,n.outputCalendar||this.outputCalendar,n.defaultToEN||!1)}redefaultToEN(n={}){return this.clone({...n,defaultToEN:!0})}redefaultToSystem(n={}){return this.clone({...n,defaultToEN:!1})}months(n,r=!1,i=!0){return so(this,n,i,$c,()=>{const s=r?{month:n,day:"numeric"}:{month:n},o=r?"format":"standalone";return this.monthsCache[o][n]||(this.monthsCache[o][n]=Ty(l=>this.extract(l,s,"month"))),this.monthsCache[o][n]})}weekdays(n,r=!1,i=!0){return so(this,n,i,qc,()=>{const s=r?{weekday:n,year:"numeric",month:"long",day:"numeric"}:{weekday:n},o=r?"format":"standalone";return this.weekdaysCache[o][n]||(this.weekdaysCache[o][n]=Sy(l=>this.extract(l,s,"weekday"))),this.weekdaysCache[o][n]})}meridiems(n=!0){return so(this,void 0,n,()=>Hc,()=>{if(!this.meridiemCache){const r={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[b.utc(2016,11,13,9),b.utc(2016,11,13,19)].map(i=>this.extract(i,r,"dayperiod"))}return this.meridiemCache})}eras(n,r=!0){return so(this,n,r,Wc,()=>{const i={era:n};return this.eraCache[n]||(this.eraCache[n]=[b.utc(-40,1,1),b.utc(2017,1,1)].map(s=>this.extract(s,i,"era"))),this.eraCache[n]})}extract(n,r,i){const s=this.dtFormatter(n,r),o=s.formatToParts(),l=o.find(a=>a.type.toLowerCase()===i);return l?l.value:null}numberFormatter(n={}){return new Dy(this.intl,n.forceSimple||this.fastNumbers,n)}dtFormatter(n,r={}){return new Oy(n,this.intl,r)}relFormatter(n={}){return new My(this.intl,this.isEnglish(),n)}listFormatter(n={}){return by(this.intl,n)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}equals(n){return this.locale===n.locale&&this.numberingSystem===n.numberingSystem&&this.outputCalendar===n.outputCalendar}}function Pn(...e){const n=e.reduce((r,i)=>r+i.source,"");return RegExp(`^${n}$`)}function Un(...e){return n=>e.reduce(([r,i,s],o)=>{const[l,a,c]=o(n,s);return[{...r,...l},a||i,c]},[{},null,1]).slice(0,2)}function $n(e,...n){if(e==null)return[null,null];for(const[r,i]of n){const s=r.exec(e);if(s)return i(s)}return[null,null]}function ed(...e){return(n,r)=>{const i={};let s;for(s=0;s<e.length;s++)i[e[s]]=Xt(n[r+s]);return[i,null,r+s]}}const td=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,Fy=`(?:${td.source}?(?:\\[(${Pc.source})\\])?)?`,Si=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,nd=RegExp(`${Si.source}${Fy}`),Bi=RegExp(`(?:T${nd.source})?`),Iy=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,Ay=/(\d{4})-?W(\d\d)(?:-?(\d))?/,Ly=/(\d{4})-?(\d{3})/,Ry=ed("weekYear","weekNumber","weekDay"),Py=ed("year","ordinal"),Uy=/(\d{4})-(\d\d)-(\d\d)/,rd=RegExp(`${Si.source} ?(?:${td.source}|(${Pc.source}))?`),$y=RegExp(`(?: ${rd.source})?`);function zn(e,n,r){const i=e[n];return te(i)?r:Xt(i)}function zy(e,n){return[{year:zn(e,n),month:zn(e,n+1,1),day:zn(e,n+2,1)},null,n+3]}function jn(e,n){return[{hours:zn(e,n,0),minutes:zn(e,n+1,0),seconds:zn(e,n+2,0),milliseconds:yi(e[n+3])},null,n+4]}function pr(e,n){const r=!e[n]&&!e[n+1],i=to(e[n+1],e[n+2]),s=r?null:qe.instance(i);return[{},s,n+3]}function gr(e,n){const r=e[n]?qt.create(e[n]):null;return[{},r,n+1]}const jy=RegExp(`^T?${Si.source}$`),qy=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function Hy(e){const[n,r,i,s,o,l,a,c,d]=e,m=n[0]==="-",u=c&&c[0]==="-",f=(h,g=!1)=>h!==void 0&&(g||h&&m)?-h:h;return[{years:f(kn(r)),months:f(kn(i)),weeks:f(kn(s)),days:f(kn(o)),hours:f(kn(l)),minutes:f(kn(a)),seconds:f(kn(c),c==="-0"),milliseconds:f(yi(d),u)}]}const Wy={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Di(e,n,r,i,s,o,l){const a={year:n.length===2?_i(Xt(n)):Xt(n),month:Uc.indexOf(r)+1,day:Xt(i),hour:Xt(s),minute:Xt(o)};return l&&(a.second=Xt(l)),e&&(a.weekday=e.length>3?zc.indexOf(e)+1:jc.indexOf(e)+1),a}const Gy=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function Yy(e){const[,n,r,i,s,o,l,a,c,d,m,u]=e,f=Di(n,s,i,r,o,l,a);let h;return c?h=Wy[c]:d?h=0:h=to(m,u),[f,new qe(h)]}function Ky(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const Jy=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Zy=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Xy=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function od(e){const[,n,r,i,s,o,l,a]=e;return[Di(n,s,i,r,o,l,a),qe.utcInstance]}function Qy(e){const[,n,r,i,s,o,l,a]=e;return[Di(n,a,r,i,s,o,l),qe.utcInstance]}const vy=Pn(Iy,Bi),ek=Pn(Ay,Bi),tk=Pn(Ly,Bi),nk=Pn(nd),id=Un(zy,jn,pr,gr),rk=Un(Ry,jn,pr,gr),ok=Un(Py,jn,pr,gr),ik=Un(jn,pr,gr);function sk(e){return $n(e,[vy,id],[ek,rk],[tk,ok],[nk,ik])}function lk(e){return $n(Ky(e),[Gy,Yy])}function ak(e){return $n(e,[Jy,od],[Zy,od],[Xy,Qy])}function ck(e){return $n(e,[qy,Hy])}const dk=Un(jn);function uk(e){return $n(e,[jy,dk])}const mk=Pn(Uy,$y),fk=Pn(rd),hk=Un(jn,pr,gr);function pk(e){return $n(e,[mk,id],[fk,hk])}const gk="Invalid Duration",sd={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},yk={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...sd},ut=146097/400,qn=146097/4800,kk={years:{quarters:4,months:12,weeks:ut/7,days:ut,hours:ut*24,minutes:ut*24*60,seconds:ut*24*60*60,milliseconds:ut*24*60*60*1e3},quarters:{months:3,weeks:ut/28,days:ut/4,hours:ut*24/4,minutes:ut*24*60/4,seconds:ut*24*60*60/4,milliseconds:ut*24*60*60*1e3/4},months:{weeks:qn/7,days:qn,hours:qn*24,minutes:qn*24*60,seconds:qn*24*60*60,milliseconds:qn*24*60*60*1e3},...sd},wn=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],wk=wn.slice(0).reverse();function _n(e,n,r=!1){const i={values:r?n.values:{...e.values,...n.values||{}},loc:e.loc.clone(n.loc),conversionAccuracy:n.conversionAccuracy||e.conversionAccuracy};return new oe(i)}function _k(e){return e<0?Math.floor(e):Math.ceil(e)}function ld(e,n,r,i,s){const o=e[s][r],l=n[r]/o,a=Math.sign(l)===Math.sign(i[s]),c=!a&&i[s]!==0&&Math.abs(l)<=1?_k(l):Math.trunc(l);i[s]+=c,n[r]-=c*o}function bk(e,n){wk.reduce((r,i)=>te(n[i])?r:(r&&ld(e,n,r,n,i),i),null)}class oe{constructor(n){const r=n.conversionAccuracy==="longterm"||!1;this.values=n.values,this.loc=n.loc||we.create(),this.conversionAccuracy=r?"longterm":"casual",this.invalid=n.invalid||null,this.matrix=r?kk:yk,this.isLuxonDuration=!0}static fromMillis(n,r){return oe.fromObject({milliseconds:n},r)}static fromObject(n,r={}){if(n==null||typeof n!="object")throw new dt(`Duration.fromObject: argument expected to be an object, got ${n===null?"null":typeof n}`);return new oe({values:no(n,oe.normalizeUnit),loc:we.fromObject(r),conversionAccuracy:r.conversionAccuracy})}static fromDurationLike(n){if(yn(n))return oe.fromMillis(n);if(oe.isDuration(n))return n;if(typeof n=="object")return oe.fromObject(n);throw new dt(`Unknown duration argument ${n} of type ${typeof n}`)}static fromISO(n,r){const[i]=ck(n);return i?oe.fromObject(i,r):oe.invalid("unparsable",`the input "${n}" can't be parsed as ISO 8601`)}static fromISOTime(n,r){const[i]=uk(n);return i?oe.fromObject(i,r):oe.invalid("unparsable",`the input "${n}" can't be parsed as ISO 8601`)}static invalid(n,r=null){if(!n)throw new dt("need to specify a reason the Duration is invalid");const i=n instanceof kt?n:new kt(n,r);if(Me.throwOnInvalid)throw new Zg(i);return new oe({invalid:i})}static normalizeUnit(n){const r={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[n&&n.toLowerCase()];if(!r)throw new hc(n);return r}static isDuration(n){return n&&n.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(n,r={}){const i={...r,floor:r.round!==!1&&r.floor!==!1};return this.isValid?Ye.create(this.loc,i).formatDurationFromString(this,n):gk}toHuman(n={}){const r=wn.map(i=>{const s=this.values[i];return te(s)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...n,unit:i.slice(0,-1)}).format(s)}).filter(i=>i);return this.loc.listFormatter({type:"conjunction",style:n.listStyle||"narrow",...n}).format(r)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let n="P";return this.years!==0&&(n+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(n+=this.months+this.quarters*3+"M"),this.weeks!==0&&(n+=this.weeks+"W"),this.days!==0&&(n+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(n+="T"),this.hours!==0&&(n+=this.hours+"H"),this.minutes!==0&&(n+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(n+=ki(this.seconds+this.milliseconds/1e3,3)+"S"),n==="P"&&(n+="T0S"),n}toISOTime(n={}){if(!this.isValid)return null;const r=this.toMillis();if(r<0||r>=864e5)return null;n={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...n};const i=this.shiftTo("hours","minutes","seconds","milliseconds");let s=n.format==="basic"?"hhmm":"hh:mm";(!n.suppressSeconds||i.seconds!==0||i.milliseconds!==0)&&(s+=n.format==="basic"?"ss":":ss",(!n.suppressMilliseconds||i.milliseconds!==0)&&(s+=".SSS"));let o=i.toFormat(s);return n.includePrefix&&(o="T"+o),o}toJSON(){return this.toISO()}toString(){return this.toISO()}toMillis(){return this.as("milliseconds")}valueOf(){return this.toMillis()}plus(n){if(!this.isValid)return this;const r=oe.fromDurationLike(n),i={};for(const s of wn)(Rn(r.values,s)||Rn(this.values,s))&&(i[s]=r.get(s)+this.get(s));return _n(this,{values:i},!0)}minus(n){if(!this.isValid)return this;const r=oe.fromDurationLike(n);return this.plus(r.negate())}mapUnits(n){if(!this.isValid)return this;const r={};for(const i of Object.keys(this.values))r[i]=Rc(n(this.values[i],i));return _n(this,{values:r},!0)}get(n){return this[oe.normalizeUnit(n)]}set(n){if(!this.isValid)return this;const r={...this.values,...no(n,oe.normalizeUnit)};return _n(this,{values:r})}reconfigure({locale:n,numberingSystem:r,conversionAccuracy:i}={}){const s=this.loc.clone({locale:n,numberingSystem:r}),o={loc:s};return i&&(o.conversionAccuracy=i),_n(this,o)}as(n){return this.isValid?this.shiftTo(n).get(n):NaN}normalize(){if(!this.isValid)return this;const n=this.toObject();return bk(this.matrix,n),_n(this,{values:n},!0)}shiftTo(...n){if(!this.isValid)return this;if(n.length===0)return this;n=n.map(l=>oe.normalizeUnit(l));const r={},i={},s=this.toObject();let o;for(const l of wn)if(n.indexOf(l)>=0){o=l;let a=0;for(const d in i)a+=this.matrix[d][l]*i[d],i[d]=0;yn(s[l])&&(a+=s[l]);const c=Math.trunc(a);r[l]=c,i[l]=(a*1e3-c*1e3)/1e3;for(const d in s)wn.indexOf(d)>wn.indexOf(l)&&ld(this.matrix,s,d,r,l)}else yn(s[l])&&(i[l]=s[l]);for(const l in i)i[l]!==0&&(r[o]+=l===o?i[l]:i[l]/this.matrix[o][l]);return _n(this,{values:r},!0).normalize()}negate(){if(!this.isValid)return this;const n={};for(const r of Object.keys(this.values))n[r]=this.values[r]===0?0:-this.values[r];return _n(this,{values:n},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(n){if(!this.isValid||!n.isValid||!this.loc.equals(n.loc))return!1;function r(i,s){return i===void 0||i===0?s===void 0||s===0:i===s}for(const i of wn)if(!r(this.values[i],n.values[i]))return!1;return!0}}const yr="Invalid Interval";function xk(e,n){return!e||!e.isValid?xe.invalid("missing or invalid start"):!n||!n.isValid?xe.invalid("missing or invalid end"):n<e?xe.invalid("end before start",`The end of an interval must be after its start, but you had start=${e.toISO()} and end=${n.toISO()}`):null}class xe{constructor(n){this.s=n.start,this.e=n.end,this.invalid=n.invalid||null,this.isLuxonInterval=!0}static invalid(n,r=null){if(!n)throw new dt("need to specify a reason the Interval is invalid");const i=n instanceof kt?n:new kt(n,r);if(Me.throwOnInvalid)throw new Jg(i);return new xe({invalid:i})}static fromDateTimes(n,r){const i=_r(n),s=_r(r),o=xk(i,s);return o??new xe({start:i,end:s})}static after(n,r){const i=oe.fromDurationLike(r),s=_r(n);return xe.fromDateTimes(s,s.plus(i))}static before(n,r){const i=oe.fromDurationLike(r),s=_r(n);return xe.fromDateTimes(s.minus(i),s)}static fromISO(n,r){const[i,s]=(n||"").split("/",2);if(i&&s){let o,l;try{o=b.fromISO(i,r),l=o.isValid}catch{l=!1}let a,c;try{a=b.fromISO(s,r),c=a.isValid}catch{c=!1}if(l&&c)return xe.fromDateTimes(o,a);if(l){const d=oe.fromISO(s,r);if(d.isValid)return xe.after(o,d)}else if(c){const d=oe.fromISO(i,r);if(d.isValid)return xe.before(a,d)}}return xe.invalid("unparsable",`the input "${n}" can't be parsed as ISO 8601`)}static isInterval(n){return n&&n.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(n="milliseconds"){return this.isValid?this.toDuration(n).get(n):NaN}count(n="milliseconds"){if(!this.isValid)return NaN;const r=this.start.startOf(n),i=this.end.startOf(n);return Math.floor(i.diff(r,n).get(n))+1}hasSame(n){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,n):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(n){return this.isValid?this.s>n:!1}isBefore(n){return this.isValid?this.e<=n:!1}contains(n){return this.isValid?this.s<=n&&this.e>n:!1}set({start:n,end:r}={}){return this.isValid?xe.fromDateTimes(n||this.s,r||this.e):this}splitAt(...n){if(!this.isValid)return[];const r=n.map(_r).filter(l=>this.contains(l)).sort(),i=[];let{s}=this,o=0;for(;s<this.e;){const l=r[o]||this.e,a=+l>+this.e?this.e:l;i.push(xe.fromDateTimes(s,a)),s=a,o+=1}return i}splitBy(n){const r=oe.fromDurationLike(n);if(!this.isValid||!r.isValid||r.as("milliseconds")===0)return[];let{s:i}=this,s=1,o;const l=[];for(;i<this.e;){const a=this.start.plus(r.mapUnits(c=>c*s));o=+a>+this.e?this.e:a,l.push(xe.fromDateTimes(i,o)),i=o,s+=1}return l}divideEqually(n){return this.isValid?this.splitBy(this.length()/n).slice(0,n):[]}overlaps(n){return this.e>n.s&&this.s<n.e}abutsStart(n){return this.isValid?+this.e==+n.s:!1}abutsEnd(n){return this.isValid?+n.e==+this.s:!1}engulfs(n){return this.isValid?this.s<=n.s&&this.e>=n.e:!1}equals(n){return!this.isValid||!n.isValid?!1:this.s.equals(n.s)&&this.e.equals(n.e)}intersection(n){if(!this.isValid)return this;const r=this.s>n.s?this.s:n.s,i=this.e<n.e?this.e:n.e;return r>=i?null:xe.fromDateTimes(r,i)}union(n){if(!this.isValid)return this;const r=this.s<n.s?this.s:n.s,i=this.e>n.e?this.e:n.e;return xe.fromDateTimes(r,i)}static merge(n){const[r,i]=n.sort((s,o)=>s.s-o.s).reduce(([s,o],l)=>o?o.overlaps(l)||o.abutsStart(l)?[s,o.union(l)]:[s.concat([o]),l]:[s,l],[[],null]);return i&&r.push(i),r}static xor(n){let r=null,i=0;const s=[],o=n.map(c=>[{time:c.s,type:"s"},{time:c.e,type:"e"}]),l=Array.prototype.concat(...o),a=l.sort((c,d)=>c.time-d.time);for(const c of a)i+=c.type==="s"?1:-1,i===1?r=c.time:(r&&+r!=+c.time&&s.push(xe.fromDateTimes(r,c.time)),r=null);return xe.merge(s)}difference(...n){return xe.xor([this].concat(n)).map(r=>this.intersection(r)).filter(r=>r&&!r.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:yr}toISO(n){return this.isValid?`${this.s.toISO(n)}/${this.e.toISO(n)}`:yr}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:yr}toISOTime(n){return this.isValid?`${this.s.toISOTime(n)}/${this.e.toISOTime(n)}`:yr}toFormat(n,{separator:r=" – "}={}){return this.isValid?`${this.s.toFormat(n)}${r}${this.e.toFormat(n)}`:yr}toDuration(n,r){return this.isValid?this.e.diff(this.s,n,r):oe.invalid(this.invalidReason)}mapEndpoints(n){return xe.fromDateTimes(n(this.s),n(this.e))}}let lo=class{static hasDST(n=Me.defaultZone){const r=b.now().setZone(n).set({month:12});return!n.isUniversal&&r.offset!==r.set({month:6}).offset}static isValidIANAZone(n){return qt.isValidZone(n)}static normalizeZone(n){return Qt(n,Me.defaultZone)}static months(n="long",{locale:r=null,numberingSystem:i=null,locObj:s=null,outputCalendar:o="gregory"}={}){return(s||we.create(r,i,o)).months(n)}static monthsFormat(n="long",{locale:r=null,numberingSystem:i=null,locObj:s=null,outputCalendar:o="gregory"}={}){return(s||we.create(r,i,o)).months(n,!0)}static weekdays(n="long",{locale:r=null,numberingSystem:i=null,locObj:s=null}={}){return(s||we.create(r,i,null)).weekdays(n)}static weekdaysFormat(n="long",{locale:r=null,numberingSystem:i=null,locObj:s=null}={}){return(s||we.create(r,i,null)).weekdays(n,!0)}static meridiems({locale:n=null}={}){return we.create(n).meridiems()}static eras(n="short",{locale:r=null}={}){return we.create(r,null,"gregory").eras(n)}static features(){return{relative:Ic()}}};function ad(e,n){const r=s=>s.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),i=r(n)-r(e);return Math.floor(oe.fromMillis(i).as("days"))}function Ck(e,n,r){const i=[["years",(a,c)=>c.year-a.year],["quarters",(a,c)=>c.quarter-a.quarter],["months",(a,c)=>c.month-a.month+(c.year-a.year)*12],["weeks",(a,c)=>{const d=ad(a,c);return(d-d%7)/7}],["days",ad]],s={};let o,l;for(const[a,c]of i)if(r.indexOf(a)>=0){o=a;let d=c(e,n);l=e.plus({[a]:d}),l>n?(e=e.plus({[a]:d-1}),d-=1):e=l,s[a]=d}return[e,s,l,o]}function Vk(e,n,r,i){let[s,o,l,a]=Ck(e,n,r);const c=n-s,d=r.filter(u=>["hours","minutes","seconds","milliseconds"].indexOf(u)>=0);d.length===0&&(l<n&&(l=s.plus({[a]:1})),l!==s&&(o[a]=(o[a]||0)+c/(l-s)));const m=oe.fromObject(o,i);return d.length>0?oe.fromMillis(c,i).shiftTo(...d).plus(m):m}const Oi={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},cd={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},Ek=Oi.hanidec.replace(/[\[|\]]/g,"").split("");function Nk(e){let n=parseInt(e,10);if(isNaN(n)){n="";for(let r=0;r<e.length;r++){const i=e.charCodeAt(r);if(e[r].search(Oi.hanidec)!==-1)n+=Ek.indexOf(e[r]);else for(const s in cd){const[o,l]=cd[s];i>=o&&i<=l&&(n+=i-o)}}return parseInt(n,10)}else return n}function wt({numberingSystem:e},n=""){return new RegExp(`${Oi[e||"latn"]}${n}`)}const Tk="missing Intl.DateTimeFormat.formatToParts support";function le(e,n=r=>r){return{regex:e,deser:([r])=>n(Nk(r))}}const dd="[ ]",ud=new RegExp(dd,"g");function Sk(e){return e.replace(/\./g,"\\.?").replace(ud,dd)}function md(e){return e.replace(/\./g,"").replace(ud," ").toLowerCase()}function _t(e,n){return e===null?null:{regex:RegExp(e.map(Sk).join("|")),deser:([r])=>e.findIndex(i=>md(r)===md(i))+n}}function fd(e,n){return{regex:e,deser:([,r,i])=>to(r,i),groups:n}}function Mi(e){return{regex:e,deser:([n])=>n}}function Bk(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Dk(e,n){const r=wt(n),i=wt(n,"{2}"),s=wt(n,"{3}"),o=wt(n,"{4}"),l=wt(n,"{6}"),a=wt(n,"{1,2}"),c=wt(n,"{1,3}"),d=wt(n,"{1,6}"),m=wt(n,"{1,9}"),u=wt(n,"{2,4}"),f=wt(n,"{4,6}"),h=k=>({regex:RegExp(Bk(k.val)),deser:([w])=>w,literal:!0}),p=(k=>{if(e.literal)return h(k);switch(k.val){case"G":return _t(n.eras("short",!1),0);case"GG":return _t(n.eras("long",!1),0);case"y":return le(d);case"yy":return le(u,_i);case"yyyy":return le(o);case"yyyyy":return le(f);case"yyyyyy":return le(l);case"M":return le(a);case"MM":return le(i);case"MMM":return _t(n.months("short",!0,!1),1);case"MMMM":return _t(n.months("long",!0,!1),1);case"L":return le(a);case"LL":return le(i);case"LLL":return _t(n.months("short",!1,!1),1);case"LLLL":return _t(n.months("long",!1,!1),1);case"d":return le(a);case"dd":return le(i);case"o":return le(c);case"ooo":return le(s);case"HH":return le(i);case"H":return le(a);case"hh":return le(i);case"h":return le(a);case"mm":return le(i);case"m":return le(a);case"q":return le(a);case"qq":return le(i);case"s":return le(a);case"ss":return le(i);case"S":return le(c);case"SSS":return le(s);case"u":return Mi(m);case"uu":return Mi(a);case"uuu":return le(r);case"a":return _t(n.meridiems(),0);case"kkkk":return le(o);case"kk":return le(u,_i);case"W":return le(a);case"WW":return le(i);case"E":case"c":return le(r);case"EEE":return _t(n.weekdays("short",!1,!1),1);case"EEEE":return _t(n.weekdays("long",!1,!1),1);case"ccc":return _t(n.weekdays("short",!0,!1),1);case"cccc":return _t(n.weekdays("long",!0,!1),1);case"Z":case"ZZ":return fd(new RegExp(`([+-]${a.source})(?::(${i.source}))?`),2);case"ZZZ":return fd(new RegExp(`([+-]${a.source})(${i.source})?`),2);case"z":return Mi(/[a-z_+-/]{1,256}?/i);default:return h(k)}})(e)||{invalidReason:Tk};return p.token=e,p}const Ok={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"}};function Mk(e,n,r){const{type:i,value:s}=e;if(i==="literal")return{literal:!0,val:s};const o=r[i];let l=Ok[i];if(typeof l=="object"&&(l=l[o]),l)return{literal:!1,val:l}}function Fk(e){return[`^${e.map(r=>r.regex).reduce((r,i)=>`${r}(${i.source})`,"")}$`,e]}function Ik(e,n,r){const i=e.match(n);if(i){const s={};let o=1;for(const l in r)if(Rn(r,l)){const a=r[l],c=a.groups?a.groups+1:1;!a.literal&&a.token&&(s[a.token.val[0]]=a.deser(i.slice(o,o+c))),o+=c}return[i,s]}else return[i,{}]}function Ak(e){const n=o=>{switch(o){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let r=null,i;return te(e.z)||(r=qt.create(e.z)),te(e.Z)||(r||(r=new qe(e.Z)),i=e.Z),te(e.q)||(e.M=(e.q-1)*3+1),te(e.h)||(e.h<12&&e.a===1?e.h+=12:e.h===12&&e.a===0&&(e.h=0)),e.G===0&&e.y&&(e.y=-e.y),te(e.u)||(e.S=yi(e.u)),[Object.keys(e).reduce((o,l)=>{const a=n(l);return a&&(o[a]=e[l]),o},{}),r,i]}let Fi=null;function Lk(){return Fi||(Fi=b.fromMillis(1555555555555)),Fi}function Rk(e,n){if(e.literal)return e;const r=Ye.macroTokenToFormatOpts(e.val);if(!r)return e;const o=Ye.create(n,r).formatDateTimeParts(Lk()).map(l=>Mk(l,n,r));return o.includes(void 0)?e:o}function Pk(e,n){return Array.prototype.concat(...e.map(r=>Rk(r,n)))}function hd(e,n,r){const i=Pk(Ye.parseFormat(r),e),s=i.map(l=>Dk(l,e)),o=s.find(l=>l.invalidReason);if(o)return{input:n,tokens:i,invalidReason:o.invalidReason};{const[l,a]=Fk(s),c=RegExp(l,"i"),[d,m]=Ik(n,c,a),[u,f,h]=m?Ak(m):[null,null,void 0];if(Rn(m,"a")&&Rn(m,"H"))throw new cr("Can't include meridiem when specifying 24-hour format");return{input:n,tokens:i,regex:c,rawMatches:d,matches:m,result:u,zone:f,specificOffset:h}}}function Uk(e,n,r){const{result:i,zone:s,specificOffset:o,invalidReason:l}=hd(e,n,r);return[i,s,o,l]}const pd=[0,31,59,90,120,151,181,212,243,273,304,334],gd=[0,31,60,91,121,152,182,213,244,274,305,335];function mt(e,n){return new kt("unit out of range",`you specified ${n} (of type ${typeof n}) as a ${e}, which is invalid`)}function yd(e,n,r){const i=new Date(Date.UTC(e,n-1,r));e<100&&e>=0&&i.setUTCFullYear(i.getUTCFullYear()-1900);const s=i.getUTCDay();return s===0?7:s}function kd(e,n,r){return r+(dr(e)?gd:pd)[n-1]}function wd(e,n){const r=dr(e)?gd:pd,i=r.findIndex(o=>o<n),s=n-r[i];return{month:i+1,day:s}}function Ii(e){const{year:n,month:r,day:i}=e,s=kd(n,r,i),o=yd(n,r,i);let l=Math.floor((s-o+10)/7),a;return l<1?(a=n-1,l=eo(a)):l>eo(n)?(a=n+1,l=1):a=n,{weekYear:a,weekNumber:l,weekday:o,...ro(e)}}function _d(e){const{weekYear:n,weekNumber:r,weekday:i}=e,s=yd(n,1,4),o=ur(n);let l=r*7+i-s-3,a;l<1?(a=n-1,l+=ur(a)):l>o?(a=n+1,l-=ur(n)):a=n;const{month:c,day:d}=wd(a,l);return{year:a,month:c,day:d,...ro(e)}}function Ai(e){const{year:n,month:r,day:i}=e,s=kd(n,r,i);return{year:n,ordinal:s,...ro(e)}}function bd(e){const{year:n,ordinal:r}=e,{month:i,day:s}=wd(n,r);return{year:n,month:i,day:s,...ro(e)}}function $k(e){const n=Qr(e.weekYear),r=jt(e.weekNumber,1,eo(e.weekYear)),i=jt(e.weekday,1,7);return n?r?i?!1:mt("weekday",e.weekday):mt("week",e.week):mt("weekYear",e.weekYear)}function zk(e){const n=Qr(e.year),r=jt(e.ordinal,1,ur(e.year));return n?r?!1:mt("ordinal",e.ordinal):mt("year",e.year)}function xd(e){const n=Qr(e.year),r=jt(e.month,1,12),i=jt(e.day,1,vr(e.year,e.month));return n?r?i?!1:mt("day",e.day):mt("month",e.month):mt("year",e.year)}function Cd(e){const{hour:n,minute:r,second:i,millisecond:s}=e,o=jt(n,0,23)||n===24&&r===0&&i===0&&s===0,l=jt(r,0,59),a=jt(i,0,59),c=jt(s,0,999);return o?l?a?c?!1:mt("millisecond",s):mt("second",i):mt("minute",r):mt("hour",n)}const Li="Invalid DateTime",Vd=864e13;function ao(e){return new kt("unsupported zone",`the zone "${e.name}" is not supported`)}function Ri(e){return e.weekData===null&&(e.weekData=Ii(e.c)),e.weekData}function kr(e,n){const r={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new b({...r,...n,old:r})}function Ed(e,n,r){let i=e-n*60*1e3;const s=r.offset(i);if(n===s)return[i,n];i-=(s-n)*60*1e3;const o=r.offset(i);return s===o?[i,s]:[e-Math.min(s,o)*60*1e3,Math.max(s,o)]}function Nd(e,n){e+=n*60*1e3;const r=new Date(e);return{year:r.getUTCFullYear(),month:r.getUTCMonth()+1,day:r.getUTCDate(),hour:r.getUTCHours(),minute:r.getUTCMinutes(),second:r.getUTCSeconds(),millisecond:r.getUTCMilliseconds()}}function co(e,n,r){return Ed(wi(e),n,r)}function Td(e,n){const r=e.o,i=e.c.year+Math.trunc(n.years),s=e.c.month+Math.trunc(n.months)+Math.trunc(n.quarters)*3,o={...e.c,year:i,month:s,day:Math.min(e.c.day,vr(i,s))+Math.trunc(n.days)+Math.trunc(n.weeks)*7},l=oe.fromObject({years:n.years-Math.trunc(n.years),quarters:n.quarters-Math.trunc(n.quarters),months:n.months-Math.trunc(n.months),weeks:n.weeks-Math.trunc(n.weeks),days:n.days-Math.trunc(n.days),hours:n.hours,minutes:n.minutes,seconds:n.seconds,milliseconds:n.milliseconds}).as("milliseconds"),a=wi(o);let[c,d]=Ed(a,r,e.zone);return l!==0&&(c+=l,d=e.zone.offset(c)),{ts:c,o:d}}function wr(e,n,r,i,s,o){const{setZone:l,zone:a}=r;if(e&&Object.keys(e).length!==0){const c=n||a,d=b.fromObject(e,{...r,zone:c,specificOffset:o});return l?d:d.setZone(a)}else return b.invalid(new kt("unparsable",`the input "${s}" can't be parsed as ${i}`))}function uo(e,n,r=!0){return e.isValid?Ye.create(we.create("en-US"),{allowZ:r,forceSimple:!0}).formatDateTimeFromString(e,n):null}function Pi(e,n){const r=e.c.year>9999||e.c.year<0;let i="";return r&&e.c.year>=0&&(i+="+"),i+=Ne(e.c.year,r?6:4),n?(i+="-",i+=Ne(e.c.month),i+="-",i+=Ne(e.c.day)):(i+=Ne(e.c.month),i+=Ne(e.c.day)),i}function Sd(e,n,r,i,s,o){let l=Ne(e.c.hour);return n?(l+=":",l+=Ne(e.c.minute),(e.c.second!==0||!r)&&(l+=":")):l+=Ne(e.c.minute),(e.c.second!==0||!r)&&(l+=Ne(e.c.second),(e.c.millisecond!==0||!i)&&(l+=".",l+=Ne(e.c.millisecond,3))),s&&(e.isOffsetFixed&&e.offset===0&&!o?l+="Z":e.o<0?(l+="-",l+=Ne(Math.trunc(-e.o/60)),l+=":",l+=Ne(Math.trunc(-e.o%60))):(l+="+",l+=Ne(Math.trunc(e.o/60)),l+=":",l+=Ne(Math.trunc(e.o%60)))),o&&(l+="["+e.zone.ianaName+"]"),l}const Bd={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},jk={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},qk={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Dd=["year","month","day","hour","minute","second","millisecond"],Hk=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],Wk=["year","ordinal","hour","minute","second","millisecond"];function Od(e){const n={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!n)throw new hc(e);return n}function Md(e,n){const r=Qt(n.zone,Me.defaultZone),i=we.fromObject(n),s=Me.now();let o,l;if(te(e.year))o=s;else{for(const d of Dd)te(e[d])&&(e[d]=Bd[d]);const a=xd(e)||Cd(e);if(a)return b.invalid(a);const c=r.offset(s);[o,l]=co(e,c,r)}return new b({ts:o,zone:r,loc:i,o:l})}function Fd(e,n,r){const i=te(r.round)?!0:r.round,s=(l,a)=>(l=ki(l,i||r.calendary?0:2,!0),n.loc.clone(r).relFormatter(r).format(l,a)),o=l=>r.calendary?n.hasSame(e,l)?0:n.startOf(l).diff(e.startOf(l),l).get(l):n.diff(e,l).get(l);if(r.unit)return s(o(r.unit),r.unit);for(const l of r.units){const a=o(l);if(Math.abs(a)>=1)return s(a,l)}return s(e>n?-0:0,r.units[r.units.length-1])}function Id(e){let n={},r;return e.length>0&&typeof e[e.length-1]=="object"?(n=e[e.length-1],r=Array.from(e).slice(0,e.length-1)):r=Array.from(e),[n,r]}class b{constructor(n){const r=n.zone||Me.defaultZone;let i=n.invalid||(Number.isNaN(n.ts)?new kt("invalid input"):null)||(r.isValid?null:ao(r));this.ts=te(n.ts)?Me.now():n.ts;let s=null,o=null;if(!i)if(n.old&&n.old.ts===this.ts&&n.old.zone.equals(r))[s,o]=[n.old.c,n.old.o];else{const a=r.offset(this.ts);s=Nd(this.ts,a),i=Number.isNaN(s.year)?new kt("invalid input"):null,s=i?null:s,o=i?null:a}this._zone=r,this.loc=n.loc||we.create(),this.invalid=i,this.weekData=null,this.c=s,this.o=o,this.isLuxonDateTime=!0}static now(){return new b({})}static local(){const[n,r]=Id(arguments),[i,s,o,l,a,c,d]=r;return Md({year:i,month:s,day:o,hour:l,minute:a,second:c,millisecond:d},n)}static utc(){const[n,r]=Id(arguments),[i,s,o,l,a,c,d]=r;return n.zone=qe.utcInstance,Md({year:i,month:s,day:o,hour:l,minute:a,second:c,millisecond:d},n)}static fromJSDate(n,r={}){const i=ey(n)?n.valueOf():NaN;if(Number.isNaN(i))return b.invalid("invalid input");const s=Qt(r.zone,Me.defaultZone);return s.isValid?new b({ts:i,zone:s,loc:we.fromObject(r)}):b.invalid(ao(s))}static fromMillis(n,r={}){if(yn(n))return n<-Vd||n>Vd?b.invalid("Timestamp out of range"):new b({ts:n,zone:Qt(r.zone,Me.defaultZone),loc:we.fromObject(r)});throw new dt(`fromMillis requires a numerical input, but received a ${typeof n} with value ${n}`)}static fromSeconds(n,r={}){if(yn(n))return new b({ts:n*1e3,zone:Qt(r.zone,Me.defaultZone),loc:we.fromObject(r)});throw new dt("fromSeconds requires a numerical input")}static fromObject(n,r={}){n=n||{};const i=Qt(r.zone,Me.defaultZone);if(!i.isValid)return b.invalid(ao(i));const s=Me.now(),o=te(r.specificOffset)?i.offset(s):r.specificOffset,l=no(n,Od),a=!te(l.ordinal),c=!te(l.year),d=!te(l.month)||!te(l.day),m=c||d,u=l.weekYear||l.weekNumber,f=we.fromObject(r);if((m||a)&&u)throw new cr("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(d&&a)throw new cr("Can't mix ordinal dates with month/day");const h=u||l.weekday&&!m;let g,p,k=Nd(s,o);h?(g=Hk,p=jk,k=Ii(k)):a?(g=Wk,p=qk,k=Ai(k)):(g=Dd,p=Bd);let w=!1;for(const $ of g){const L=l[$];te(L)?w?l[$]=p[$]:l[$]=k[$]:w=!0}const _=h?$k(l):a?zk(l):xd(l),S=_||Cd(l);if(S)return b.invalid(S);const I=h?_d(l):a?bd(l):l,[U,q]=co(I,o,i),V=new b({ts:U,zone:i,o:q,loc:f});return l.weekday&&m&&n.weekday!==V.weekday?b.invalid("mismatched weekday",`you can't specify both a weekday of ${l.weekday} and a date of ${V.toISO()}`):V}static fromISO(n,r={}){const[i,s]=sk(n);return wr(i,s,r,"ISO 8601",n)}static fromRFC2822(n,r={}){const[i,s]=lk(n);return wr(i,s,r,"RFC 2822",n)}static fromHTTP(n,r={}){const[i,s]=ak(n);return wr(i,s,r,"HTTP",r)}static fromFormat(n,r,i={}){if(te(n)||te(r))throw new dt("fromFormat requires an input string and a format");const{locale:s=null,numberingSystem:o=null}=i,l=we.fromOpts({locale:s,numberingSystem:o,defaultToEN:!0}),[a,c,d,m]=Uk(l,n,r);return m?b.invalid(m):wr(a,c,i,`format ${r}`,n,d)}static fromString(n,r,i={}){return b.fromFormat(n,r,i)}static fromSQL(n,r={}){const[i,s]=pk(n);return wr(i,s,r,"SQL",n)}static invalid(n,r=null){if(!n)throw new dt("need to specify a reason the DateTime is invalid");const i=n instanceof kt?n:new kt(n,r);if(Me.throwOnInvalid)throw new Kg(i);return new b({invalid:i})}static isDateTime(n){return n&&n.isLuxonDateTime||!1}get(n){return this[n]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Ri(this).weekYear:NaN}get weekNumber(){return this.isValid?Ri(this).weekNumber:NaN}get weekday(){return this.isValid?Ri(this).weekday:NaN}get ordinal(){return this.isValid?Ai(this.c).ordinal:NaN}get monthShort(){return this.isValid?lo.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?lo.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?lo.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?lo.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}get isInLeapYear(){return dr(this.year)}get daysInMonth(){return vr(this.year,this.month)}get daysInYear(){return this.isValid?ur(this.year):NaN}get weeksInWeekYear(){return this.isValid?eo(this.weekYear):NaN}resolvedLocaleOptions(n={}){const{locale:r,numberingSystem:i,calendar:s}=Ye.create(this.loc.clone(n),n).resolvedOptions(this);return{locale:r,numberingSystem:i,outputCalendar:s}}toUTC(n=0,r={}){return this.setZone(qe.instance(n),r)}toLocal(){return this.setZone(Me.defaultZone)}setZone(n,{keepLocalTime:r=!1,keepCalendarTime:i=!1}={}){if(n=Qt(n,Me.defaultZone),n.equals(this.zone))return this;if(n.isValid){let s=this.ts;if(r||i){const o=n.offset(this.ts),l=this.toObject();[s]=co(l,o,n)}return kr(this,{ts:s,zone:n})}else return b.invalid(ao(n))}reconfigure({locale:n,numberingSystem:r,outputCalendar:i}={}){const s=this.loc.clone({locale:n,numberingSystem:r,outputCalendar:i});return kr(this,{loc:s})}setLocale(n){return this.reconfigure({locale:n})}set(n){if(!this.isValid)return this;const r=no(n,Od),i=!te(r.weekYear)||!te(r.weekNumber)||!te(r.weekday),s=!te(r.ordinal),o=!te(r.year),l=!te(r.month)||!te(r.day),a=o||l,c=r.weekYear||r.weekNumber;if((a||s)&&c)throw new cr("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&s)throw new cr("Can't mix ordinal dates with month/day");let d;i?d=_d({...Ii(this.c),...r}):te(r.ordinal)?(d={...this.toObject(),...r},te(r.day)&&(d.day=Math.min(vr(d.year,d.month),d.day))):d=bd({...Ai(this.c),...r});const[m,u]=co(d,this.o,this.zone);return kr(this,{ts:m,o:u})}plus(n){if(!this.isValid)return this;const r=oe.fromDurationLike(n);return kr(this,Td(this,r))}minus(n){if(!this.isValid)return this;const r=oe.fromDurationLike(n).negate();return kr(this,Td(this,r))}startOf(n){if(!this.isValid)return this;const r={},i=oe.normalizeUnit(n);switch(i){case"years":r.month=1;case"quarters":case"months":r.day=1;case"weeks":case"days":r.hour=0;case"hours":r.minute=0;case"minutes":r.second=0;case"seconds":r.millisecond=0;break}if(i==="weeks"&&(r.weekday=1),i==="quarters"){const s=Math.ceil(this.month/3);r.month=(s-1)*3+1}return this.set(r)}endOf(n){return this.isValid?this.plus({[n]:1}).startOf(n).minus(1):this}toFormat(n,r={}){return this.isValid?Ye.create(this.loc.redefaultToEN(r)).formatDateTimeFromString(this,n):Li}toLocaleString(n=gi,r={}){return this.isValid?Ye.create(this.loc.clone(r),n).formatDateTime(this):Li}toLocaleParts(n={}){return this.isValid?Ye.create(this.loc.clone(n),n).formatDateTimeParts(this):[]}toISO({format:n="extended",suppressSeconds:r=!1,suppressMilliseconds:i=!1,includeOffset:s=!0,extendedZone:o=!1}={}){if(!this.isValid)return null;const l=n==="extended";let a=Pi(this,l);return a+="T",a+=Sd(this,l,r,i,s,o),a}toISODate({format:n="extended"}={}){return this.isValid?Pi(this,n==="extended"):null}toISOWeekDate(){return uo(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:n=!1,suppressSeconds:r=!1,includeOffset:i=!0,includePrefix:s=!1,extendedZone:o=!1,format:l="extended"}={}){return this.isValid?(s?"T":"")+Sd(this,l==="extended",r,n,i,o):null}toRFC2822(){return uo(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return uo(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?Pi(this,!0):null}toSQLTime({includeOffset:n=!0,includeZone:r=!1,includeOffsetSpace:i=!0}={}){let s="HH:mm:ss.SSS";return(r||n)&&(i&&(s+=" "),r?s+="z":n&&(s+="ZZ")),uo(this,s,!0)}toSQL(n={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(n)}`:null}toString(){return this.isValid?this.toISO():Li}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(n={}){if(!this.isValid)return{};const r={...this.c};return n.includeConfig&&(r.outputCalendar=this.outputCalendar,r.numberingSystem=this.loc.numberingSystem,r.locale=this.loc.locale),r}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(n,r="milliseconds",i={}){if(!this.isValid||!n.isValid)return oe.invalid("created by diffing an invalid DateTime");const s={locale:this.locale,numberingSystem:this.numberingSystem,...i},o=ty(r).map(oe.normalizeUnit),l=n.valueOf()>this.valueOf(),a=l?this:n,c=l?n:this,d=Vk(a,c,o,s);return l?d.negate():d}diffNow(n="milliseconds",r={}){return this.diff(b.now(),n,r)}until(n){return this.isValid?xe.fromDateTimes(this,n):this}hasSame(n,r){if(!this.isValid)return!1;const i=n.valueOf(),s=this.setZone(n.zone,{keepLocalTime:!0});return s.startOf(r)<=i&&i<=s.endOf(r)}equals(n){return this.isValid&&n.isValid&&this.valueOf()===n.valueOf()&&this.zone.equals(n.zone)&&this.loc.equals(n.loc)}toRelative(n={}){if(!this.isValid)return null;const r=n.base||b.fromObject({},{zone:this.zone}),i=n.padding?this<r?-n.padding:n.padding:0;let s=["years","months","days","hours","minutes","seconds"],o=n.unit;return Array.isArray(n.unit)&&(s=n.unit,o=void 0),Fd(r,this.plus(i),{...n,numeric:"always",units:s,unit:o})}toRelativeCalendar(n={}){return this.isValid?Fd(n.base||b.fromObject({},{zone:this.zone}),this,{...n,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...n){if(!n.every(b.isDateTime))throw new dt("min requires all arguments be DateTimes");return Ac(n,r=>r.valueOf(),Math.min)}static max(...n){if(!n.every(b.isDateTime))throw new dt("max requires all arguments be DateTimes");return Ac(n,r=>r.valueOf(),Math.max)}static fromFormatExplain(n,r,i={}){const{locale:s=null,numberingSystem:o=null}=i,l=we.fromOpts({locale:s,numberingSystem:o,defaultToEN:!0});return hd(l,n,r)}static fromStringExplain(n,r,i={}){return b.fromFormatExplain(n,r,i)}static get DATE_SHORT(){return gi}static get DATE_MED(){return pc}static get DATE_MED_WITH_WEEKDAY(){return Xg}static get DATE_FULL(){return gc}static get DATE_HUGE(){return yc}static get TIME_SIMPLE(){return kc}static get TIME_WITH_SECONDS(){return wc}static get TIME_WITH_SHORT_OFFSET(){return _c}static get TIME_WITH_LONG_OFFSET(){return bc}static get TIME_24_SIMPLE(){return xc}static get TIME_24_WITH_SECONDS(){return Cc}static get TIME_24_WITH_SHORT_OFFSET(){return Vc}static get TIME_24_WITH_LONG_OFFSET(){return Ec}static get DATETIME_SHORT(){return Nc}static get DATETIME_SHORT_WITH_SECONDS(){return Tc}static get DATETIME_MED(){return Sc}static get DATETIME_MED_WITH_SECONDS(){return Bc}static get DATETIME_MED_WITH_WEEKDAY(){return Qg}static get DATETIME_FULL(){return Dc}static get DATETIME_FULL_WITH_SECONDS(){return Oc}static get DATETIME_HUGE(){return Mc}static get DATETIME_HUGE_WITH_SECONDS(){return Fc}}function _r(e){if(b.isDateTime(e))return e;if(e&&e.valueOf&&yn(e.valueOf()))return b.fromJSDate(e);if(e&&typeof e=="object")return b.fromObject(e);throw new dt(`Unknown datetime argument: ${e}, of type ${typeof e}`)}const ue={};ue.format=function(e,n){return e=e?new Date(e):new Date,b.fromJSDate(e).toFormat(n)},ue.readableTime=function(e){if(e=String(e||""),!e||!/^\d{4}$/.test(e))return e;const n=e.substring(0,2),r=e.substring(2,4);return console.log(e,n,r),b.fromObject({hour:parseInt(n,10),minute:parseInt(r,10)}).toFormat("h:mma").toLowerCase().replace(/:00/g,"")},ue.timeago=function(e,n){return b.fromJSDate(new Date(e)).toRelative(n)},ue.getDatesBetween=function(e,n){const r=[];let i=b.fromISO(e);const s=b.fromISO(n);for(;i<=s;)r.push(i.toISODate()),i=i.plus({days:1});return r},ue.getCalendarDateLimits=function(e){const n=e.getFullYear(),r=e.getMonth(),i=new Date(n,r,1),s=new Date(n,r+1,0),o=new Date(i);o.setDate(o.getDate()-o.getDay());const l=new Date(s);l.setDate(l.getDate()+(6-l.getDay()));const a={weekday:"long",day:"numeric",month:"long",year:"numeric"},c=o.toLocaleDateString("en-US",a),d=l.toLocaleDateString("en-US",a);return{start:new Date(c),end:new Date(d)}},ue.getMiddleDate=function(e,n){const r=e.getTime(),i=n.getTime(),s=(r+i)/2;return new Date(s)},ue.shortTime=function(e){return e.toJSDate||(e=b.fromJSDate(new Date(e))),e.toFormat("mm")==="00"?e.toFormat("ha").toLowerCase():e.toFormat("h:mma").toLowerCase()},ue.readableEventDate=function({startDate:e,endDate:n,timezone:r},i){if(!e)return"";e=new Date(e),n=n?new Date(n):void 0;let s,o;try{s=r?b.fromJSDate(e).setZone(r):b.fromJSDate(e),o=n?r?b.fromJSDate(n).setZone(r):b.fromJSDate(n):s}catch{s=b.fromJSDate(e),o=n?b.fromJSDate(n):s}const l=b.now(),a=r&&s.zoneName!==b.local().zoneName?` (${s.zoneName})`:"",d=s.year!==l.year?` ${s.year}`:"";return s.hasSame(o,"day")?ue.shortTime(s)==="12am"?`${s.toFormat("d MMMM")}${d}${a}`:`${ue.shortTime(s)}, ${s.toFormat("cccc d MMMM")}${d}${a}`:s.hasSame(o,"month")?`${s.toFormat("d")}-${o.toFormat("d MMMM")}${d}${a}`:s.hasSame(o,"year")?`${s.toFormat("d MMM")} - ${o.toFormat("d MMM")}${d}${a}`:`${s.toFormat("d MMM yyyy")} - ${o.toFormat("d MMM yyyy")}${a}`},ue.readableDateRange=function(e,n,r){if(!e)return;if(!n)return ue.readableDate(e);e=b.fromJSDate(new Date(e)),n=b.fromJSDate(new Date(n));const i=e.toFormat("yyyy"),s=e.toFormat("LLL yyyy"),o=e.toFormat("WW yyyy"),l=e.toFormat("d LLL yyyy"),a=n.toFormat("yyyy"),c=n.toFormat("LLL yyyy"),d=n.toFormat("WW yyyy"),m=n.toFormat("d LLL yyyy");return l===m?ue.shortTime(e)==="12am"?`${ue.readableDate(n)}`:`${ue.shortTime(e)} - ${ue.readableDate(n)}`:o===d?`${ue.readableDate(e)} - ${ue.readableDate(n)}`:s===c?`${e.toFormat("d")} - ${n.toFormat("d LLL")}`:i===a?`${ue.readableDate(e)} - ${ue.readableDate(n)}`:`${ue.readableDate(e)} - ${ue.readableDate(n)}`},ue.readableDate=function(e){if(!e)return;const n=new Date,r=b.fromJSDate(n),i=r.toFormat("yyyy"),s=r.toFormat("LLL yyyy"),o=r.toFormat("WW yyyy"),l=r.toFormat("d LLL yyyy");e=new Date(e);const a=b.fromJSDate(e),c=a.toFormat("yyyy"),d=a.toFormat("LLL yyyy"),m=a.toFormat("WW yyyy");if(a.toFormat("d LLL yyyy")===l)return`${ue.shortTime(a)} today`;if(m===o)if(e>n){const f=parseInt(r.toFormat("d"));return parseInt(a.toFormat("d"))-f===1?`${ue.shortTime(a)} tomorrow`:`${ue.shortTime(a)} ${a.toFormat("cccc")}`}else return`${a.toRelativeCalendar()}`;return d===s?ue.shortTime(a)==="12am"?`${a.toFormat("d LLL")}`:`${ue.shortTime(a)} ${a.toFormat("d LLL")}`:c===i?a.toFormat("cccc d LLL"):a.toFormat("d LLL yyyy")};function Ad(e){var h,g;const n=t.reactive({items:[],hash:{},hex:{},loading:!1,loaded:!1,_fullyLoaded:{}});let r=null;const i={};function s(p,k){if(!(!p||!k))for(const w of Object.keys(k))p[w]=k[w]}function o(p){const k={},w={};return p.forEach(function(_){_.key&&(k[_.key]=_),_.hex&&(w[_.hex]=_)}),{hash:k,hex:w}}async function l(p){if(r)return r;if(!(n.loaded&&!p))return r=a(),r}async function a(p){if(!e.auth.getCurrentUser()){m();return}n.loading=!0;try{const{data:w}=await e.api.get("/glossary/index",{cache:!1}),_=w||[],{hash:S,hex:I}=o(_);n._fullyLoaded={},n.items=_,n.hash=S,n.hex=I,n.loaded=!0}catch(w){console.error("GlossaryService: failed to load glossary index",w)}finally{n.loading=!1,r=null}}async function c(p,k){return n._fullyLoaded[p]&&!k?n.hash[p]:(i[p]||(i[p]=d(p)),i[p])}async function d(p,k){try{const{data:w}=await e.api.get(`/glossary/index/${p}`,{cache:!1});if(!w)return;n.hash[p]?s(n.hash[p],w):n.hash[p]=w;const _=n.items.findIndex(function(S){return S.key===p});return _!==-1&&s(n.items[_],w),n._fullyLoaded[p]=!0,n.hash[p]}catch(w){console.error(`GlossaryService: failed to load definition for '${p}'`,w)}finally{delete i[p]}}n.ensure=async function(p){if(!p)return l(!1);if(await l(!1),typeof p=="string")return c(p,!1);if(Array.isArray(p))return Promise.all(p.map(function(k){return c(k,!1)}))},n.reload=async function(p){if(!p)return l(!0);if(await l(!1),typeof p=="string")return c(p,!0);if(Array.isArray(p))return Promise.all(p.map(function(k){return c(k,!0)}))},n.definitionName=function(p,k){const w=n.hash[p];return w?k?w.plural:w.title:p},n.clear=m;function m(){n.items=[],n.hash={},n.hex={},n.loaded=!1,n.loading=!1,n._fullyLoaded={},r=null;for(const p in i)delete i[p]}let u=null;e.auth.addEventListener("change",function(p){var k,w;if(p){const _=(w=(k=p==null?void 0:p.session)==null?void 0:k.organisation)==null?void 0:w._id;u&&_!==u&&m(),u=_||null,l(!1)}else u=null,m()});const f=e.auth.getCurrentUser();return f&&(u=((g=(h=f==null?void 0:f.session)==null?void 0:h.organisation)==null?void 0:g._id)||null,l(!1)),n}const mo={STRIPE_NOT_LOADED:"Stripe v3 library is not loaded",INSTANCE_NOT_DEFINED:"Instance object is not defined. Make sure you initialized Stripe before creating elements",ELEMENTS_NOT_DEFINED:"Elements object is not defined. You can't create stripe element without it",ELEMENT_TYPE_NOT_DEFINED:"elementType is required. You can't create stripe element without it"},Gk=(e,n)=>{try{if(!window.Stripe)throw new Error(mo.STRIPE_NOT_LOADED);return window.Stripe(e,n)}catch(r){return console.error(r),r}},Yk=(e,n)=>{try{if(!e)throw new Error(mo.INSTANCE_NOT_DEFINED);return e.elements(n)}catch(r){return console.error(r),r}},Kk=(e,n,r)=>{try{if(!e)throw new Error(mo.ELEMENTS_NOT_DEFINED);if(!n)throw new Error(mo.ELEMENT_TYPE_NOT_DEFINED);return e.create(n,r)}catch(i){return console.error(i),i}};var Ld=(e,n)=>{const r=e.__vccOpts||e;for(const[i,s]of n)r[i]=s;return r};const Jk=t.defineComponent({name:"StripeElement",props:{elements:{type:Object,required:!0},type:{type:String,default:()=>"card"},options:{type:Object,default:()=>({})}},setup(e,{emit:n}){const r=t.ref(document.createElement("div")),i=t.ref(),s=t.ref(),{elements:o,type:l,options:a}=t.toRefs(e);return t.onMounted(()=>{const c=()=>{i.value=Kk(o.value,l.value,a.value),i.value.mount(r.value),s.value.appendChild(r.value)},d=(u,f)=>{n(u,f)},m=()=>{["change","ready","focus","blur","click","escape"].forEach(f=>{i.value.on(f,d.bind(null,f))})};try{c(),m()}catch(u){console.error(u)}}),t.onBeforeUnmount(()=>{var c,d;(c=i.value)==null||c.unmount(),(d=i.value)==null||d.destroy()}),t.watch(a,()=>{var c;(c=i.value)==null||c.update(e.options)}),{stripeElement:i,domElement:r,mountPoint:s}}}),Zk={ref:"mountPoint"};function Xk(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",Zk,null,512)}var Ui=Ld(Jk,[["render",Xk]]);const Qk=t.defineComponent({name:"StripeElements",props:{stripeKey:{type:String,required:!0},instanceOptions:{type:Object,default:()=>({})},elementsOptions:{type:Object,default:()=>({})}},setup(e){const{stripeKey:n,instanceOptions:r,elementsOptions:i}=t.toRefs(e),s=t.ref(),o=t.ref(),l=t.computed(()=>o.value?Object.keys(o.value).length>0:!1);return t.onMounted(()=>{s.value=Gk(n.value,r.value),o.value=Yk(s.value,i.value)}),t.watch(i,()=>{var a;(a=o.value)==null||a.update(i.value)}),{elements:o,instance:s,elementsUsable:l}}}),vk={key:0};function ew(e,n,r,i,s,o){return e.elementsUsable?(t.openBlock(),t.createElementBlock("div",vk,[t.renderSlot(e.$slots,"default",{instance:e.instance,elements:e.elements})])):t.createCommentVNode("",!0)}var $i=Ld(Qk,[["render",ew]]);const C=(e,n)=>{const r=e.__vccOpts||e;for(const[i,s]of n)r[i]=s;return r},tw={props:{center:{type:Boolean},shrink:{type:Boolean}}};function nw(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["flex-column",{center:r.center,shrink:r.shrink}])},[t.renderSlot(e.$slots,"default",{},void 0,!0)],2)}const Rd=C(tw,[["render",nw],["__scopeId","data-v-b03628f8"]]),rw={},ow={class:"flex-column-body"};function iw(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",ow,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}const Pd=C(rw,[["render",iw],["__scopeId","data-v-ab49c425"]]),sw={},lw={class:"flex-column-header"};function aw(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",lw,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}const Ud=C(sw,[["render",aw],["__scopeId","data-v-968bcded"]]),cw={},dw={class:"flex-column-footer"};function uw(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",dw,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}const $d=C(cw,[["render",uw],["__scopeId","data-v-941966e2"]]),mw={props:{flex:{type:Boolean},center:{type:Boolean},vcenter:{type:Boolean},alignBottom:{type:Boolean},shrink:{type:Boolean}}};function fw(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["flex-cell",{flex:r.flex,center:r.center,vcenter:r.vcenter,"align-bottom":r.alignBottom,shrink:r.shrink}])},[t.renderSlot(e.$slots,"default",{},void 0,!0)],2)}const zd=C(mw,[["render",fw],["__scopeId","data-v-efd82fd0"]]),hw={props:{center:{type:Boolean},vcenter:{type:Boolean},gap:{type:Boolean},wrap:{type:Boolean}}};function pw(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["flex-row",{gap:r.gap,vcenter:r.vcenter,center:r.center,wrap:r.wrap}])},[t.renderSlot(e.$slots,"default",{},void 0,!0)],2)}const jd=C(hw,[["render",pw],["__scopeId","data-v-bd96c129"]]),gw={},yw={class:"flex-spacer"};function kw(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",yw)}const qd=C(gw,[["render",kw],["__scopeId","data-v-f42ac625"]]),ww={},_w={class:"panel"};function bw(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",_w,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}const Hd=C(ww,[["render",bw],["__scopeId","data-v-dc6d0d19"]]),xw={},Cw={class:"panel-body"};function Vw(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",Cw,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}const Wd=C(xw,[["render",Vw],["__scopeId","data-v-53a6d4be"]]),Ew={},Nw={class:"panel-header"};function Tw(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",Nw,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}const Gd=C(Ew,[["render",Tw],["__scopeId","data-v-49143033"]]),Sw={},Bw={class:"panel-footer"};function Dw(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",Bw,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}const Yd=C(Sw,[["render",Dw],["__scopeId","data-v-e87fc082"]]);var fo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function vt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var zi,Kd;function br(){if(Kd)return zi;Kd=1;function e(n){var r=typeof n;return n!=null&&(r=="object"||r=="function")}return zi=e,zi}var ji,Jd;function Zd(){if(Jd)return ji;Jd=1;var e=typeof fo=="object"&&fo&&fo.Object===Object&&fo;return ji=e,ji}var qi,Xd;function Hn(){if(Xd)return qi;Xd=1;var e=Zd(),n=typeof self=="object"&&self&&self.Object===Object&&self,r=e||n||Function("return this")();return qi=r,qi}var Hi,Qd;function Ow(){if(Qd)return Hi;Qd=1;var e=Hn(),n=function(){return e.Date.now()};return Hi=n,Hi}var Wi,vd;function Mw(){if(vd)return Wi;vd=1;var e=/\s/;function n(r){for(var i=r.length;i--&&e.test(r.charAt(i)););return i}return Wi=n,Wi}var Gi,eu;function Fw(){if(eu)return Gi;eu=1;var e=Mw(),n=/^\s+/;function r(i){return i&&i.slice(0,e(i)+1).replace(n,"")}return Gi=r,Gi}var Yi,tu;function Ki(){if(tu)return Yi;tu=1;var e=Hn(),n=e.Symbol;return Yi=n,Yi}var Ji,nu;function Iw(){if(nu)return Ji;nu=1;var e=Ki(),n=Object.prototype,r=n.hasOwnProperty,i=n.toString,s=e?e.toStringTag:void 0;function o(l){var a=r.call(l,s),c=l[s];try{l[s]=void 0;var d=!0}catch{}var m=i.call(l);return d&&(a?l[s]=c:delete l[s]),m}return Ji=o,Ji}var Zi,ru;function Aw(){if(ru)return Zi;ru=1;var e=Object.prototype,n=e.toString;function r(i){return n.call(i)}return Zi=r,Zi}var Xi,ou;function xr(){if(ou)return Xi;ou=1;var e=Ki(),n=Iw(),r=Aw(),i="[object Null]",s="[object Undefined]",o=e?e.toStringTag:void 0;function l(a){return a==null?a===void 0?s:i:o&&o in Object(a)?n(a):r(a)}return Xi=l,Xi}var Qi,iu;function Cr(){if(iu)return Qi;iu=1;function e(n){return n!=null&&typeof n=="object"}return Qi=e,Qi}var vi,su;function ho(){if(su)return vi;su=1;var e=xr(),n=Cr(),r="[object Symbol]";function i(s){return typeof s=="symbol"||n(s)&&e(s)==r}return vi=i,vi}var es,lu;function au(){if(lu)return es;lu=1;var e=Fw(),n=br(),r=ho(),i=NaN,s=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,l=/^0o[0-7]+$/i,a=parseInt;function c(d){if(typeof d=="number")return d;if(r(d))return i;if(n(d)){var m=typeof d.valueOf=="function"?d.valueOf():d;d=n(m)?m+"":m}if(typeof d!="string")return d===0?d:+d;d=e(d);var u=o.test(d);return u||l.test(d)?a(d.slice(2),u?2:8):s.test(d)?i:+d}return es=c,es}var ts,cu;function Lw(){if(cu)return ts;cu=1;var e=br(),n=Ow(),r=au(),i="Expected a function",s=Math.max,o=Math.min;function l(a,c,d){var m,u,f,h,g,p,k=0,w=!1,_=!1,S=!0;if(typeof a!="function")throw new TypeError(i);c=r(c)||0,e(d)&&(w=!!d.leading,_="maxWait"in d,f=_?s(r(d.maxWait)||0,c):f,S="trailing"in d?!!d.trailing:S);function I(K){var ce=m,me=u;return m=u=void 0,k=K,h=a.apply(me,ce),h}function U(K){return k=K,g=setTimeout($,c),w?I(K):h}function q(K){var ce=K-p,me=K-k,ge=c-ce;return _?o(ge,f-me):ge}function V(K){var ce=K-p,me=K-k;return p===void 0||ce>=c||ce<0||_&&me>=f}function $(){var K=n();if(V(K))return L(K);g=setTimeout($,q(K))}function L(K){return g=void 0,S&&m?I(K):(m=u=void 0,h)}function R(){g!==void 0&&clearTimeout(g),k=0,m=p=u=g=void 0}function j(){return g===void 0?h:L(n())}function re(){var K=n(),ce=V(K);if(m=arguments,u=this,p=K,ce){if(g===void 0)return U(p);if(_)return clearTimeout(g),g=setTimeout($,c),I(p)}return g===void 0&&(g=setTimeout($,c)),h}return re.cancel=R,re.flush=j,re}return ts=l,ts}var Rw=Lw();const Wn=vt(Rw),Pw=["onClick"],Uw=["onClick"],du=C({__name:"tabset",props:{vertical:Boolean,inline:Boolean,pills:Boolean,defaultTab:String},setup(e){const n=t.useSlots(),r=e,i=t.reactive({tabs:[]});t.provide("tabset",i);const s=t.ref();t.provide("activeHeading",s);const o=function(f){s.value=f},l=Wn(function(){const h=n.default().reduce(function(k,w){var _;return((_=w.type)==null?void 0:_.name)==="tab"?k.push(w):w.children&&(k=[...k,...w.children]),k},[]).filter(function(k){var w;return((w=k.type)==null?void 0:w.name)==="tab"&&k.props.enabled!==!1}).map(function(k,w){const _=k.props.heading,S=k.props.tabKey||_;return{heading:_,key:S,index:w}});i.tabs=h;const g=h.reduce(function(k,w){return k[w.key||w.heading]=!0,k},{}),p=s.value;if((!p||!g[p])&&h.length){let k;r.defaultTab&&g[r.defaultTab]?k=r.defaultTab:k=h[0].key||h[0].heading,s.value=k}});t.provide("rebuild",l);const a=t.computed(function(){return i.tabs.map(function(f){if(f)return f.heading}).filter(Boolean)}),c=t.computed(function(){return i.tabs.map(function(f){if(f)return f.key}).filter(Boolean)}),d=t.computed(function(){return a.value.length>1}),m=t.ref(null);function u(){t.nextTick(function(){const f=m.value&&m.value.$el;if(!f)return;const h=f.querySelector("a.active");if(!h){f.style.removeProperty("--ind-width");return}f.style.setProperty("--ind-left",`${h.offsetLeft}px`),f.style.setProperty("--ind-width",`${h.offsetWidth}px`)})}return t.watch(s,u),t.watch(a,u),t.onMounted(function(){u(),window.addEventListener("resize",u),document.fonts&&document.fonts.ready&&document.fonts.ready.then(u)}),t.onBeforeUnmount(function(){window.removeEventListener("resize",u)}),l(),(f,h)=>{const g=t.resolveComponent("flex-body"),p=t.resolveComponent("flex-column"),k=t.resolveComponent("ux-button"),w=t.resolveComponent("flex-row"),_=t.resolveComponent("flex-header");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["ux-tabset",{vertical:e.vertical,horizontal:!e.vertical,inline:e.inline,block:!e.inline&&!e.pills,pills:e.pills}])},[e.vertical?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[d.value?(t.openBlock(),t.createBlock(p,{key:0,class:"tabset-menu"},{default:t.withCtx(()=>[t.createVNode(g,null,{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.value,(S,I)=>(t.openBlock(),t.createElementBlock("a",{class:t.normalizeClass({active:s.value===S}),key:`tab-link-${S}`,onClick:U=>o(S)},t.toDisplayString(a.value[I]),11,Pw))),128))]),_:1})]),_:1})):t.createCommentVNode("",!0)],64)):e.pills?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[d.value?(t.openBlock(),t.createBlock(_,{key:0,class:"tabset-menu"},{default:t.withCtx(()=>[t.createVNode(w,null,{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.value,(S,I)=>(t.openBlock(),t.createBlock(k,{color:s.value===S?"primary":"",key:`tab-pill-${S}`,onClick:U=>o(S)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(a.value[I]),1)]),_:2},1032,["color","onClick"]))),128))]),_:1})]),_:1})):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[d.value?(t.openBlock(),t.createBlock(_,{key:0,class:"tabset-menu"},{default:t.withCtx(()=>[t.createVNode(w,{ref_key:"menuRow",ref:m},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.value,(S,I)=>(t.openBlock(),t.createElementBlock("a",{class:t.normalizeClass({active:s.value===S}),key:`tab-link-${S}`,onClick:U=>o(S)},t.toDisplayString(a.value[I]),11,Uw))),128))]),_:1},512)]),_:1})):t.createCommentVNode("",!0)],64)),t.createVNode(p,null,{default:t.withCtx(()=>[t.renderSlot(f.$slots,"default",{},void 0,!0)]),_:3})],2)}}},[["__scopeId","data-v-e4752404"]]),$w={emits:["mount","unmount"],name:"tab",props:{heading:{type:String,required:!0},tabKey:{type:String},enabled:{type:Boolean,default:!0},keepAlive:{type:Boolean,default:!1}},created(){this.rebuild()},unmounted(){this.rebuild()},watch:{heading(){this.rebuild()}},inject:["tabset","activeHeading","rebuild"],computed:{active(){var r;return String(this.tabKey||this.heading)===String(((r=this.activeHeading)==null?void 0:r.value)||this.activeHeading)}}};function zw(e,n,r,i,s,o){const l=t.resolveComponent("flex-column");return r.keepAlive?t.withDirectives((t.openBlock(),t.createBlock(l,{key:0},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},512)),[[t.vShow,o.active]]):o.active?(t.openBlock(),t.createBlock(l,{key:1},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3})):t.createCommentVNode("",!0)}const uu=C($w,[["render",zw]]);var ns,mu;function Vr(){if(mu)return ns;mu=1;var e=Array.isArray;return ns=e,ns}var rs,fu;function jw(){if(fu)return rs;fu=1;var e=Vr(),n=ho(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/;function s(o,l){if(e(o))return!1;var a=typeof o;return a=="number"||a=="symbol"||a=="boolean"||o==null||n(o)?!0:i.test(o)||!r.test(o)||l!=null&&o in Object(l)}return rs=s,rs}var os,hu;function pu(){if(hu)return os;hu=1;var e=xr(),n=br(),r="[object AsyncFunction]",i="[object Function]",s="[object GeneratorFunction]",o="[object Proxy]";function l(a){if(!n(a))return!1;var c=e(a);return c==i||c==s||c==r||c==o}return os=l,os}var is,gu;function qw(){if(gu)return is;gu=1;var e=Hn(),n=e["__core-js_shared__"];return is=n,is}var ss,yu;function Hw(){if(yu)return ss;yu=1;var e=qw(),n=function(){var i=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""}();function r(i){return!!n&&n in i}return ss=r,ss}var ls,ku;function Ww(){if(ku)return ls;ku=1;var e=Function.prototype,n=e.toString;function r(i){if(i!=null){try{return n.call(i)}catch{}try{return i+""}catch{}}return""}return ls=r,ls}var as,wu;function Gw(){if(wu)return as;wu=1;var e=pu(),n=Hw(),r=br(),i=Ww(),s=/[\\^$.*+?()[\]{}|]/g,o=/^\[object .+?Constructor\]$/,l=Function.prototype,a=Object.prototype,c=l.toString,d=a.hasOwnProperty,m=RegExp("^"+c.call(d).replace(s,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function u(f){if(!r(f)||n(f))return!1;var h=e(f)?m:o;return h.test(i(f))}return as=u,as}var cs,_u;function Yw(){if(_u)return cs;_u=1;function e(n,r){return n==null?void 0:n[r]}return cs=e,cs}var ds,bu;function us(){if(bu)return ds;bu=1;var e=Gw(),n=Yw();function r(i,s){var o=n(i,s);return e(o)?o:void 0}return ds=r,ds}var ms,xu;function po(){if(xu)return ms;xu=1;var e=us(),n=e(Object,"create");return ms=n,ms}var fs,Cu;function Kw(){if(Cu)return fs;Cu=1;var e=po();function n(){this.__data__=e?e(null):{},this.size=0}return fs=n,fs}var hs,Vu;function Jw(){if(Vu)return hs;Vu=1;function e(n){var r=this.has(n)&&delete this.__data__[n];return this.size-=r?1:0,r}return hs=e,hs}var ps,Eu;function Zw(){if(Eu)return ps;Eu=1;var e=po(),n="__lodash_hash_undefined__",r=Object.prototype,i=r.hasOwnProperty;function s(o){var l=this.__data__;if(e){var a=l[o];return a===n?void 0:a}return i.call(l,o)?l[o]:void 0}return ps=s,ps}var gs,Nu;function Xw(){if(Nu)return gs;Nu=1;var e=po(),n=Object.prototype,r=n.hasOwnProperty;function i(s){var o=this.__data__;return e?o[s]!==void 0:r.call(o,s)}return gs=i,gs}var ys,Tu;function Qw(){if(Tu)return ys;Tu=1;var e=po(),n="__lodash_hash_undefined__";function r(i,s){var o=this.__data__;return this.size+=this.has(i)?0:1,o[i]=e&&s===void 0?n:s,this}return ys=r,ys}var ks,Su;function vw(){if(Su)return ks;Su=1;var e=Kw(),n=Jw(),r=Zw(),i=Xw(),s=Qw();function o(l){var a=-1,c=l==null?0:l.length;for(this.clear();++a<c;){var d=l[a];this.set(d[0],d[1])}}return o.prototype.clear=e,o.prototype.delete=n,o.prototype.get=r,o.prototype.has=i,o.prototype.set=s,ks=o,ks}var ws,Bu;function e_(){if(Bu)return ws;Bu=1;function e(){this.__data__=[],this.size=0}return ws=e,ws}var _s,Du;function Ou(){if(Du)return _s;Du=1;function e(n,r){return n===r||n!==n&&r!==r}return _s=e,_s}var bs,Mu;function go(){if(Mu)return bs;Mu=1;var e=Ou();function n(r,i){for(var s=r.length;s--;)if(e(r[s][0],i))return s;return-1}return bs=n,bs}var xs,Fu;function t_(){if(Fu)return xs;Fu=1;var e=go(),n=Array.prototype,r=n.splice;function i(s){var o=this.__data__,l=e(o,s);if(l<0)return!1;var a=o.length-1;return l==a?o.pop():r.call(o,l,1),--this.size,!0}return xs=i,xs}var Cs,Iu;function n_(){if(Iu)return Cs;Iu=1;var e=go();function n(r){var i=this.__data__,s=e(i,r);return s<0?void 0:i[s][1]}return Cs=n,Cs}var Vs,Au;function r_(){if(Au)return Vs;Au=1;var e=go();function n(r){return e(this.__data__,r)>-1}return Vs=n,Vs}var Es,Lu;function o_(){if(Lu)return Es;Lu=1;var e=go();function n(r,i){var s=this.__data__,o=e(s,r);return o<0?(++this.size,s.push([r,i])):s[o][1]=i,this}return Es=n,Es}var Ns,Ru;function i_(){if(Ru)return Ns;Ru=1;var e=e_(),n=t_(),r=n_(),i=r_(),s=o_();function o(l){var a=-1,c=l==null?0:l.length;for(this.clear();++a<c;){var d=l[a];this.set(d[0],d[1])}}return o.prototype.clear=e,o.prototype.delete=n,o.prototype.get=r,o.prototype.has=i,o.prototype.set=s,Ns=o,Ns}var Ts,Pu;function s_(){if(Pu)return Ts;Pu=1;var e=us(),n=Hn(),r=e(n,"Map");return Ts=r,Ts}var Ss,Uu;function l_(){if(Uu)return Ss;Uu=1;var e=vw(),n=i_(),r=s_();function i(){this.size=0,this.__data__={hash:new e,map:new(r||n),string:new e}}return Ss=i,Ss}var Bs,$u;function a_(){if($u)return Bs;$u=1;function e(n){var r=typeof n;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?n!=="__proto__":n===null}return Bs=e,Bs}var Ds,zu;function yo(){if(zu)return Ds;zu=1;var e=a_();function n(r,i){var s=r.__data__;return e(i)?s[typeof i=="string"?"string":"hash"]:s.map}return Ds=n,Ds}var Os,ju;function c_(){if(ju)return Os;ju=1;var e=yo();function n(r){var i=e(this,r).delete(r);return this.size-=i?1:0,i}return Os=n,Os}var Ms,qu;function d_(){if(qu)return Ms;qu=1;var e=yo();function n(r){return e(this,r).get(r)}return Ms=n,Ms}var Fs,Hu;function u_(){if(Hu)return Fs;Hu=1;var e=yo();function n(r){return e(this,r).has(r)}return Fs=n,Fs}var Is,Wu;function m_(){if(Wu)return Is;Wu=1;var e=yo();function n(r,i){var s=e(this,r),o=s.size;return s.set(r,i),this.size+=s.size==o?0:1,this}return Is=n,Is}var As,Gu;function Yu(){if(Gu)return As;Gu=1;var e=l_(),n=c_(),r=d_(),i=u_(),s=m_();function o(l){var a=-1,c=l==null?0:l.length;for(this.clear();++a<c;){var d=l[a];this.set(d[0],d[1])}}return o.prototype.clear=e,o.prototype.delete=n,o.prototype.get=r,o.prototype.has=i,o.prototype.set=s,As=o,As}var Ls,Ku;function f_(){if(Ku)return Ls;Ku=1;var e=Yu(),n="Expected a function";function r(i,s){if(typeof i!="function"||s!=null&&typeof s!="function")throw new TypeError(n);var o=function(){var l=arguments,a=s?s.apply(this,l):l[0],c=o.cache;if(c.has(a))return c.get(a);var d=i.apply(this,l);return o.cache=c.set(a,d)||c,d};return o.cache=new(r.Cache||e),o}return r.Cache=e,Ls=r,Ls}var Rs,Ju;function h_(){if(Ju)return Rs;Ju=1;var e=f_(),n=500;function r(i){var s=e(i,function(l){return o.size===n&&o.clear(),l}),o=s.cache;return s}return Rs=r,Rs}var Ps,Zu;function p_(){if(Zu)return Ps;Zu=1;var e=h_(),n=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,i=e(function(s){var o=[];return s.charCodeAt(0)===46&&o.push(""),s.replace(n,function(l,a,c,d){o.push(c?d.replace(r,"$1"):a||l)}),o});return Ps=i,Ps}var Us,Xu;function Qu(){if(Xu)return Us;Xu=1;function e(n,r){for(var i=-1,s=n==null?0:n.length,o=Array(s);++i<s;)o[i]=r(n[i],i,n);return o}return Us=e,Us}var $s,vu;function g_(){if(vu)return $s;vu=1;var e=Ki(),n=Qu(),r=Vr(),i=ho(),s=e?e.prototype:void 0,o=s?s.toString:void 0;function l(a){if(typeof a=="string")return a;if(r(a))return n(a,l)+"";if(i(a))return o?o.call(a):"";var c=a+"";return c=="0"&&1/a==-1/0?"-0":c}return $s=l,$s}var zs,em;function js(){if(em)return zs;em=1;var e=g_();function n(r){return r==null?"":e(r)}return zs=n,zs}var qs,tm;function y_(){if(tm)return qs;tm=1;var e=Vr(),n=jw(),r=p_(),i=js();function s(o,l){return e(o)?o:n(o,l)?[o]:r(i(o))}return qs=s,qs}var Hs,nm;function k_(){if(nm)return Hs;nm=1;var e=ho();function n(r){if(typeof r=="string"||e(r))return r;var i=r+"";return i=="0"&&1/r==-1/0?"-0":i}return Hs=n,Hs}var Ws,rm;function w_(){if(rm)return Ws;rm=1;var e=y_(),n=k_();function r(i,s){s=e(s,i);for(var o=0,l=s.length;i!=null&&o<l;)i=i[n(s[o++])];return o&&o==l?i:void 0}return Ws=r,Ws}var Gs,om;function __(){if(om)return Gs;om=1;var e=w_();function n(r,i,s){var o=r==null?void 0:e(r,i);return o===void 0?s:o}return Gs=n,Gs}var b_=__();const en=vt(b_),_e={props:{column:{type:Object,required:!0},row:{type:Object,required:!0},value:{}}},x_={mixins:[_e],data(){return{processing:!1}},methods:{async clicked(){const e=this,n=(e.tags||[]).slice(),r=await e.$sdk.tag({title:"Edit tags",description:e.row.title,model:n.slice()}),i=e.$sdk.utils.ids(n),s=e.$sdk.utils.ids(r);JSON.stringify(i.sort())===JSON.stringify(s.sort())||(e.processing=!0,await e.$sdk.content.patch(this.itemID,{meta:{tags:r}}),e.row.meta.tags=r,e.processing=!1,e.$sdk.notify("Tags were updated"))}},computed:{canEditItem(){return this.$sdk.access.canEditItem(this.user,this.row)},itemID(){return this.row._id},tags(){var r;return((r=this.row.meta)==null?void 0:r.tags)||[]}}},C_={class:"table-quicktag-cell"};function V_(e,n,r,i,s,o){const l=t.resolveComponent("ux-pill"),a=t.resolveComponent("flex-cell"),c=t.resolveComponent("flex-row"),d=t.resolveComponent("ux-icon"),m=t.resolveComponent("ux-button");return t.openBlock(),t.createElementBlock("td",C_,[t.createVNode(c,{gap:"",center:""},{default:t.withCtx(()=>[t.createVNode(a,null,{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.tags,u=>(t.openBlock(),t.createBlock(l,{icon:"fa-tag",tag:"a",value:u},null,8,["value"]))),256))]),_:1})]),_:1}),o.canEditItem?(t.openBlock(),t.createElementBlock("div",{key:0,class:"clicker",onClick:n[0]||(n[0]=t.withModifiers((...u)=>o.clicked&&o.clicked(...u),["stop","prevent"]))},[t.createVNode(c,{gap:"",center:""},{default:t.withCtx(()=>[t.createVNode(a),t.createVNode(a,{shrink:""},{default:t.withCtx(()=>[t.createVNode(m,{icon:"",size:"xs"},{default:t.withCtx(()=>[t.createVNode(d,{icon:"fa-pen-to-square"})]),_:1})]),_:1})]),_:1})])):t.createCommentVNode("",!0)])}const E_=C(x_,[["render",V_],["__scopeId","data-v-d98dce09"]]),N_={mixins:[_e],computed:{initials(){var e,n;return`${((e=this.row)==null?void 0:e.firstName)||""} ${((n=this.row)==null?void 0:n.lastName)||""}`.trim()||this.row.title},source(){return this.$sdk.utils.id(this.value)||this.$sdk.utils.id(this.row)}}},T_={class:"table-avatar-cell"},S_={class:"avatar-wrapper"};function B_(e,n,r,i,s,o){const l=t.resolveComponent("avatar",!0);return t.openBlock(),t.createElementBlock("td",T_,[t.createElementVNode("div",S_,[t.createVNode(l,{id:o.source,initials:o.initials},null,8,["id","initials"])])])}const D_=C(N_,[["render",B_],["__scopeId","data-v-a4b42e00"]]),O_={mixins:[_e],computed:{formatted(){return this.$sdk.date.readableTime(this.value)}}},M_={class:"table-time-cell"};function F_(e,n,r,i,s,o){const l=t.resolveComponent("ux-icon");return t.openBlock(),t.createElementBlock("td",M_,[t.createVNode(l,{icon:"far fa-clock"}),t.createTextVNode(" "+t.toDisplayString(o.formatted),1)])}const I_=C(O_,[["render",F_],["__scopeId","data-v-677f555b"]]),A_={mixins:[_e],computed:{key(){return this.column.key},rawSource(){return en(this.row,this.key)},source(){return Array.isArray(this.rawSource)?this.rawSource[0]:this.rawSource?this.rawSource:this.row},imageSource(){var r;const e=this.source;if(e)switch((r=e==null?void 0:e.meta)==null?void 0:r.type){case"video":case"image":case"event":case"persona":case"profile":case"audio":case"file":return this.source;default:{const i=this.$sdk.utils.id(this.source);if(!i)return;var n=i.slice(8,10);switch(n){case"69":return{_id:i,meta:{type:"image"}};case"76":return{_id:i,meta:{type:"video"}};case"24":return{_id:i,meta:{type:"persona"}};case"70":return{_id:i,meta:{type:"profile"}};case"71":return{_id:i,meta:{type:"checkin"}}}return i}}},type(){var e,n;return(n=(e=this.imageSource)==null?void 0:e.meta)==null?void 0:n.type}},methods:{clicked(e){this.$sdk.dispatch("item:view",this.imageSource)}}},L_={class:"table-image-cell"};function R_(e,n,r,i,s,o){const l=t.resolveComponent("ux-image"),a=t.resolveComponent("ux-icon");return t.openBlock(),t.createElementBlock("td",L_,[o.imageSource?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[o.type=="image"||o.type=="video"?(t.openBlock(),t.createElementBlock("div",{key:0,onClick:n[0]||(n[0]=t.withModifiers(c=>o.clicked(e.value),["stop","prevent"])),class:"image-wrapper"},[t.createVNode(l,{lazy:"",item:o.imageSource,type:o.type,width:100,height:100},null,8,["item","type"])])):o.type==="audio"?(t.openBlock(),t.createBlock(a,{key:1,icon:"fa-music"})):o.type==="file"?(t.openBlock(),t.createBlock(a,{key:2,icon:"fa-file"})):(t.openBlock(),t.createElementBlock("div",{key:3,onClick:n[1]||(n[1]=t.withModifiers(c=>o.clicked(e.value),["stop","prevent"])),class:"image-wrapper"},[t.createVNode(l,{lazy:"",item:o.imageSource,type:o.type,width:100,height:100},null,8,["item","type"])]))],64)):t.createCommentVNode("",!0)])}const P_=C(A_,[["render",R_],["__scopeId","data-v-0d557d14"]]),U_={mixins:[_e],computed:{string(){return isNaN(this.amount)?"0.00":this.amount.toFixed(2)},amount(){return Number(parseInt(this.value)/100)},credit(){return this.amount>0},debit(){return this.amount<0},invalid(){var e;return((e=this.column)==null?void 0:e.key)==="amount"&&this.adjusted},adjusted(){return this.row.effectiveAmount!==this.row.amount},empty(){return parseInt(this.value)===0},currency(){return this.column.currency||this.row.currency}}};function $_(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("td",{class:t.normalizeClass(["table-currency-cell",{credit:o.credit,empty:o.empty,debit:o.debit,invalid:o.invalid,adjusted:o.adjusted}])},t.toDisplayString(o.string),3)}const z_=C(U_,[["render",$_],["__scopeId","data-v-c62e82ec"]]),j_={data(){return{processing:!1}},mixins:[_e],computed:{visible(){return!this.hidden},enabled(){const e=this;switch(typeof e.button.enabled){case"function":return e.button.enabled(e.row,e.column);case"undefined":case"null":return!0;default:return e.button.enabled}},hidden(){const e=this;switch(typeof e.button.hidden){case"function":return!!e.button.hidden(e.row,e.column);case"undefined":case"null":return!1;default:return!!e.button.hidden}},button(){return this.column.button},type(){var e,n;return(n=(e=this.row)==null?void 0:e.meta)==null?void 0:n.type},label(){const e=this.button;return typeof e.text=="function"?e.text(this):e.text}},methods:{async clicked(){this.processing=!0,await this.button.action(this.row,this.column,this),this.processing=!1}}},q_={class:"table-button-cell"};function H_(e,n,r,i,s,o){const l=t.resolveComponent("ux-icon"),a=t.resolveComponent("ux-button");return t.openBlock(),t.createElementBlock("td",q_,[o.visible?(t.openBlock(),t.createBlock(a,{key:0,block:o.button.block,color:o.button.color,size:o.button.size,loading:s.processing,disabled:!o.enabled,onClick:t.withModifiers(o.clicked,["stop","prevent"])},{default:t.withCtx(()=>[o.label?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(t.toDisplayString(o.label),1)],64)):t.createCommentVNode("",!0),o.button.icon?(t.openBlock(),t.createBlock(l,{key:1,icon:o.button.icon,right:""},null,8,["icon"])):t.createCommentVNode("",!0)]),_:1},8,["block","color","size","loading","disabled","onClick"])):t.createCommentVNode("",!0)])}const W_=C(j_,[["render",H_],["__scopeId","data-v-413157fd"]]),G_={mixins:[_e],methods:{timeago(e){return b.fromJSDate(e).toRelative()},readable(e){e=b.fromJSDate(e);let n=b.now(),r=n.toFormat("yyyy");return n.toFormat("MMM yyyy"),e.toFormat("yyyy")===r?e.toFormat("h:mma, ccc d MMM").replace(/:00/g,"").replace(/PM,/g,"pm,").replace(/:AM,/g,"am,"):e.toFormat("h:mma, ccc d MMM yyyy").replace(/:00/g,"").replace(/:PM,/g,"pm,").replace(/:AM,/g,"am,")}},computed:{values(){return Array.isArray(this.value)?this.value:[this.value]},mapped(){const e=this;return e.values.map(function(n){if(!n)return;const r=new Date(n);return{readable:e.readable(r),timeago:e.timeago(r)}}).filter(Boolean)}}},Y_={class:"table-date-cell"},K_={class:"date-pill"},J_={class:"off"},Z_={class:"on"},X_={class:"spacer"};function Q_(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("td",Y_,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.mapped,l=>(t.openBlock(),t.createElementBlock("div",K_,[t.createElementVNode("span",J_,t.toDisplayString(l.readable),1),t.createElementVNode("span",Z_,t.toDisplayString(l.timeago),1),t.createElementVNode("span",X_,t.toDisplayString(l.readable),1)]))),256))])}const im=C(G_,[["render",Q_],["__scopeId","data-v-f3b929d9"]]),v_={mixins:[_e],methods:{timeago(e){return b.fromJSDate(e).toRelative()},readable(e){e=b.fromJSDate(e);let n=b.now(),r=n.toFormat("yyyy");return n.toFormat("MMM yyyy"),e.toFormat("yyyy")===r?e.toFormat("h:mm a - dd MMM"):e.toFormat("h:mm a - dd MMM yyyy")}},computed:{values(){return Array.isArray(this.value)?this.value:[this.value]},mapped(){const e=this;return e.values.map(function(n){if(!n)return;const r=new Date(n),i=r<new Date;return{readable:e.readable(r),timeago:e.timeago(r),overdue:i}}).filter(Boolean)}}},e1={class:"table-date-cell"},t1={class:"off"},n1={class:"on"},r1={class:"spacer"};function o1(e,n,r,i,s,o){const l=t.resolveComponent("ux-icon");return t.openBlock(),t.createElementBlock("td",e1,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.mapped,a=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["date-pill",{overdue:a.overdue}])},[t.createElementVNode("span",t1,[t.createVNode(l,{icon:"far fa-clock",left:""}),t.createTextVNode(t.toDisplayString(a.readable),1)]),t.createElementVNode("span",n1,[t.createVNode(l,{icon:"far fa-clock",left:""}),t.createTextVNode(t.toDisplayString(a.timeago),1)]),t.createElementVNode("span",r1,[t.createVNode(l,{icon:"far fa-clock",left:""}),t.createTextVNode(t.toDisplayString(a.readable),1)])],2))),256))])}const i1=C(v_,[["render",o1],["__scopeId","data-v-0e48d460"]]),s1={mixins:[_e],computed:{boolean(){return!!this.value}}};function l1(e,n,r,i,s,o){const l=t.resolveComponent("ux-icon");return t.openBlock(),t.createElementBlock("td",{class:t.normalizeClass(["table-boolean-cell",{true:o.boolean,false:!o.boolean}])},[t.createVNode(l,{icon:o.boolean?"fa-check":"fa-times"},null,8,["icon"])],2)}const sm=C(s1,[["render",l1],["__scopeId","data-v-b180904a"]]),a1={mixins:[_e],computed:{size(){return this.$sdk.files.filesize(this.value)}}};function c1(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("td",{class:t.normalizeClass(["table-filesize-cell",{true:e.boolean,false:!e.boolean}])},t.toDisplayString(o.size),3)}const d1=C(a1,[["render",c1],["__scopeId","data-v-0419990c"]]);function u1(e){const n=Math.round(e),r=Math.floor(n/3600),i=Math.floor(n%3600/60),s=n%60;return r>0?`${r}:${i.toString().padStart(2,"0")}:${s.toString().padStart(2,"0")}`:`${i}:${s.toString().padStart(2,"0")}`}const m1={mixins:[_e],computed:{duration(){return u1(this.value)}}};function f1(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("td",{class:t.normalizeClass(["table-duration-cell",{true:e.boolean,false:!e.boolean}])},t.toDisplayString(o.duration),3)}const h1=C(m1,[["render",f1],["__scopeId","data-v-2910d792"]]),p1={mixins:[_e],methods:{async clicked(){const e=this,n=e.$sdk.utils.id(e.row),r=e.public?"secure":"public";e.processing=!0;try{await e.$sdk.content.patch(n,{meta:{security:r}}),e.row.meta||(e.row.meta={}),e.row.meta.security=r,e.$sdk.notify(`Set security to ${r}`)}catch(i){e.$sdk.error(i)}finally{e.processing=!1}}},data(){return{processing:!1}},computed:{canEdit(){var e=this.user;return this.$sdk.access.canEditItem(e,this.row)},public(){return this.security==="public"},security(){return this.value||"secure"}}};function g1(e,n,r,i,s,o){const l=t.resolveComponent("ux-icon"),a=t.resolveComponent("ux-button");return t.openBlock(),t.createElementBlock("td",{class:t.normalizeClass(["table-security-cell",o.security])},[o.canEdit?(t.openBlock(),t.createBlock(a,{key:0,size:"sm",loading:s.processing,onClick:t.withModifiers(o.clicked,["stop","prevent"])},{default:t.withCtx(()=>[t.createVNode(l,{icon:o.public?"fa-lock-open":"fa-lock"},null,8,["icon"])]),_:1},8,["loading","onClick"])):(t.openBlock(),t.createBlock(l,{key:1,icon:o.public?"fa-lock-open":"fa-lock"},null,8,["icon"]))],2)}const y1=C(p1,[["render",g1],["__scopeId","data-v-147f957e"]]),k1={mixins:[_e],methods:{open(){window.open(this.href)}},computed:{actualValue(){return String(this.value||"").trim()},href(){let e=this.actualValue;return/^https?:\/\//i.test(e)?e:"https://"+e}}},w1={class:"table-url-cell"},_1=["href"];function b1(e,n,r,i,s,o){const l=t.resolveComponent("ux-icon");return t.openBlock(),t.createElementBlock("td",w1,[o.actualValue?(t.openBlock(),t.createElementBlock("a",{key:0,href:o.href,onClick:n[0]||(n[0]=t.withModifiers((...a)=>o.open&&o.open(...a),["stop","prevent"])),target:"_blank"},[t.createTextVNode(t.toDisplayString(o.actualValue)+" ",1),t.createVNode(l,{right:"",icon:"fa-external-link"})],8,_1)):t.createCommentVNode("",!0)])}const lm=C(k1,[["render",b1],["__scopeId","data-v-aa99a5e7"]]);var am=function(e,n,r){if(!n.hasOwnProperty(r)){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i)}};const cm={props:{template:String,parent:Object,templateProps:{type:Object,default:function(){return{}}}},render:function(){if(this.template){var e=this.parent||this.$parent,n=e.$data;n===void 0&&(n={});var r=e.$props;r===void 0&&(r={});var i=e.$options;i===void 0&&(i={});var s=i.components;s===void 0&&(s={});var o=i.computed;o===void 0&&(o={});var l=i.methods;l===void 0&&(l={});var a=this.$data;a===void 0&&(a={});var c=this.$props;c===void 0&&(c={});var d=this.$options;d===void 0&&(d={});var m=d.methods;m===void 0&&(m={});var u=d.computed;u===void 0&&(u={});var f=d.components;f===void 0&&(f={});var h={$data:{},$props:{},$options:{},components:{},computed:{},methods:{}};Object.keys(n).forEach(function(V){a[V]===void 0&&(h.$data[V]=n[V])}),Object.keys(r).forEach(function(V){c[V]===void 0&&(h.$props[V]=r[V])}),Object.keys(l).forEach(function(V){m[V]===void 0&&(h.methods[V]=l[V])}),Object.keys(o).forEach(function(V){u[V]===void 0&&(h.computed[V]=o[V])}),Object.keys(s).forEach(function(V){f[V]===void 0&&(h.components[V]=s[V])});var g=Object.keys(h.methods||{}),p=Object.keys(h.$data||{}),k=Object.keys(h.$props||{}),w=Object.keys(this.templateProps),_=p.concat(k).concat(g).concat(w),S=(U=e,q={},g.forEach(function(V){return am(U,q,V)}),q),I=function(V){var $={};return V.forEach(function(L){L&&Object.getOwnPropertyNames(L).forEach(function(R){return am(L,$,R)})}),$}([h.$data,h.$props,S,this.templateProps]);return t.h({template:this.template||"<div></div>",props:_,computed:h.computed,components:h.components,provide:this.$parent.$.provides?this.$parent.$.provides:{}},Object.assign({},I))}var U,q}},x1={components:{Compile:cm},mixins:[_e]},C1={class:"table-computed-cell"};function V1(e,n,r,i,s,o){const l=t.resolveComponent("compile");return t.openBlock(),t.createElementBlock("td",C1,[t.createVNode(l,{template:this.column.code},null,8,["template"])])}const E1=C(x1,[["render",V1],["__scopeId","data-v-05dd3203"]]),N1={props:{multi:{type:Boolean},last:{type:Boolean},value:{required:!0},type:{type:String},widget:{type:String}},computed:{reference(){return!!(this.value&&this.value._id)},renderValue(){return this.value?this.value.title||this.value.name||this.value:void 0},date(){return b.fromISO(this.value).toFormat("dd MMM yyyy")},actualWidget(){var e;if(this.widget)e=this.widget;else switch(this.type){case"date":e="datetime";break}return e}},methods:{clicked(e){this.$sdk.dispatch("item:view",e)}}};function T1(e,n,r,i,s,o){const l=t.resolveComponent("ux-pill");return o.reference?(t.openBlock(),t.createBlock(l,{key:0,tag:"a",value:r.value,onClick:n[0]||(n[0]=t.withModifiers(a=>o.clicked(r.value),["stop","prevent"]))},null,8,["value"])):r.type=="date"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(o.date),1)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[t.createTextVNode(t.toDisplayString(o.renderValue),1),r.multi&&!r.last?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(", ")],64)):t.createCommentVNode("",!0)],64))}const S1=C(N1,[["render",T1],["__scopeId","data-v-27442ac9"]]),B1=".total",D1={mixins:[_e],methods:{clicked(e){this.menuOpen=!1,this.$sdk.dispatch("item:view",e)}},data(){return{menuOpen:!1}},computed:{path(){return this.column.key||""},rawPath(){return this.path.slice(0,-B1.length)},itemPath(){return`${this.rawPath}.items`},value(){return en(this.row,this.column.key)},items(){return en(this.row,this.itemPath)}}},O1={class:"table-complex-cell"},M1={class:"items"};function F1(e,n,r,i,s,o){const l=t.resolveComponent("ux-button"),a=t.resolveComponent("ux-pill"),c=t.resolveComponent("ux-menu");return t.openBlock(),t.createElementBlock("td",O1,[t.createVNode(c,{modelValue:s.menuOpen,"onUpdate:modelValue":n[1]||(n[1]=d=>s.menuOpen=d)},{activator:t.withCtx(({on:d})=>[t.createVNode(l,t.mergeProps({size:"sm",onClick:n[0]||(n[0]=t.withModifiers(()=>{},["stop","prevent"]))},t.toHandlers(d),{icon:""}),{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.value),1)]),_:1},16)]),default:t.withCtx(()=>[t.createElementVNode("div",M1,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.items,d=>(t.openBlock(),t.createBlock(a,{tag:"a",value:d,onClick:t.withModifiers(m=>o.clicked(d),["stop","prevent"])},null,8,["value","onClick"]))),256))])]),_:1},8,["modelValue"])])}const I1=C(D1,[["render",F1],["__scopeId","data-v-1cdab26c"]]),A1={mixins:[_e],computed:{email(){var e;return this.row.username||((e=this.row.user)==null?void 0:e.email)||this.row.userEmailAddress||this.row.collectionEmailAddress}}},L1={class:"table-persona-email-cell"};function R1(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("td",L1,t.toDisplayString(o.email),1)}const P1=C(A1,[["render",R1],["__scopeId","data-v-9c894a39"]]),U1={mixins:[_e],computed:{className(){return this.isConnected?"connected":this.isInvited?"invited":this.isManaged?"managed":"empty"},isConnected(){return!!this.row.user},isInvited(){return!this.isConnected&&this.row.collectionEmailAddress},isManaged(){return!this.isConnected&&!this.isInvited},email(){var e;return this.row.username||((e=this.row.user)==null?void 0:e.email)||this.row.userEmailAddress||this.row.collectionEmailAddress},text(){switch(this.className){case"connected":return"Qik User";case"invited":return"Invite sent";case"managed":return"App user";default:return""}},tooltip(){var r,i,s,o;const e=this,n=(i=(r=e.user)==null?void 0:r.organisation)!=null&&i.title?`'${(o=(s=e.user)==null?void 0:s.organisation)==null?void 0:o.title}'`:void 0;switch(e.className){case"connected":return`This user can sign in to ${n||"your organisation"} on the Qik platform.`;case"invited":return"We've sent an invite to this user to join your organisation on Qik.";case"managed":return"This user can only sign in to your applications.";default:return""}},icon(){switch(this.className){case"connected":return"far fa-user";case"invited":return"far fa-envelope";case"managed":return"far fa-user";default:return}}}},$1={class:"pill"};function z1(e,n,r,i,s,o){const l=t.resolveComponent("ux-icon"),a=t.resolveComponent("tippy");return t.openBlock(),t.createElementBlock("td",{class:t.normalizeClass(["table-persona-invite-cell",o.className])},[t.createVNode(a,{content:o.tooltip},{default:t.withCtx(()=>[t.createElementVNode("div",$1,[t.createVNode(l,{icon:o.icon,left:""},null,8,["icon"]),t.createTextVNode(" "+t.toDisplayString(o.text),1)])]),_:1},8,["content"])],2)}const j1=C(U1,[["render",z1],["__scopeId","data-v-be3bef4b"]]),q1={mixins:[_e],computed:{status(){return String(this.value||"").toLowerCase()}}},H1={key:0,class:"pill"};function W1(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("td",{class:t.normalizeClass(["table-status-cell",o.status])},[o.status?(t.openBlock(),t.createElementBlock("div",H1,t.toDisplayString(o.status),1)):t.createCommentVNode("",!0)],2)}const G1=C(q1,[["render",W1],["__scopeId","data-v-357810c2"]]),Y1={mixins:[_e],computed:{typeKey(){var e;return(e=this.row.meta)==null?void 0:e.type},subtitle(){var l,a,c,d,m,u,f;const e=this,n=this.row,r=n.subtitle,i=n.description,s=(l=n.meta)==null?void 0:l.description,o=r||i||s;switch(this.typeKey){case"runsheet":return n.event?`${n.event.title} • ${e.$sdk.date.readableEventDate(n.event)}`:"";case"venue":return[(a=n.address)==null?void 0:a.addressLine1,(c=n.address)==null?void 0:c.addressLine2,(d=n.address)==null?void 0:d.suburb,(m=n.address)==null?void 0:m.state,(u=n.address)==null?void 0:u.postalCode,(f=n.address)==null?void 0:f.country].filter(Boolean).join(" ");case"event":if(n.startDate,n.endDate,e.$sdk.date)return o?`${e.$sdk.date.readableEventDate(n)} • ${o}`:`${e.$sdk.date.readableEventDate(n)}`;break}return o}}},K1={class:"title"},J1={key:0,class:"subtitle"};function Z1(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("td",{class:t.normalizeClass(["table-title-cell",e.status])},[t.createElementVNode("div",K1,t.toDisplayString(e.value),1),o.subtitle?(t.openBlock(),t.createElementBlock("div",J1,t.toDisplayString(o.subtitle),1)):t.createCommentVNode("",!0)],2)}const X1=C(Y1,[["render",Z1],["__scopeId","data-v-bf723bb2"]]),Q1={props:{value:{type:Object}},computed:{style(){var r,i;const e=(r=this.value)==null?void 0:r.color,n=(i=this.value)==null?void 0:i.bgColor;if(e||n)return{backgroundColor:n||e}}}};function v1(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("span",{class:"ux-circle",style:t.normalizeStyle(o.style)},null,4)}const ko=C(Q1,[["render",v1],["__scopeId","data-v-6f2d4cea"]]),eb={mixins:[_e],components:{UxCircle:ko},computed:{scopes(){return this.column.key==="_id"?[this.row]:(this.value||[]).filter(function({unit:n}){return!n})}}},tb={class:"scope-circles-cell"};function nb(e,n,r,i,s,o){const l=t.resolveComponent("ux-circle"),a=t.resolveComponent("tippy");return t.openBlock(),t.createElementBlock("td",tb,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.scopes,c=>(t.openBlock(),t.createBlock(a,{content:c.title},{default:t.withCtx(()=>[t.createVNode(l,{value:c},null,8,["value"])]),_:2},1032,["content"]))),256))])}const rb=C(eb,[["render",nb],["__scopeId","data-v-f79f00ee"]]),ob={mixins:[_e],created(){this.$glossary.ensure()},computed:{lookup(){return this.$glossary.hash},match(){return this.lookup?this.lookup[this.value]:null},title(){var e;return((e=this.match)==null?void 0:e.title)||this.value},plural(){var e;return((e=this.match)==null?void 0:e.plural)||this.title},rendered(){return this.column.plural?this.plural:this.title}}},ib={class:"content-type-cell"};function sb(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("td",ib,t.toDisplayString(o.title),1)}const lb=C(ob,[["render",sb],["__scopeId","data-v-f8cf385c"]]),ab={mixins:[_e],computed:{count(){return this.rosters.reduce(function(e,n){return n.slots.forEach(function(r){e+=r.assignments.length}),e},0)},rosters(){return Object.entries(this.row.join_roster||{}).map(function([n,r]){return{title:n,slots:r.items}})},rosterEnabled(){return this.$sdk.access.hasFeature(this.user,"rostering")?this.$sdk.access.canKnowOf(this.user,"roster")||this.$sdk.access.canKnowOf(this.user,"assignment"):void 0}}},cb={class:"table-roster-cell"},db={class:"event-title"},ub={class:"event-date"},mb={class:"event-subtitle"},fb={class:"preview"},hb={class:"grid"},pb={class:"face"};function gb(e,n,r,i,s,o){const l=t.resolveComponent("ux-button"),a=t.resolveComponent("ux-panel-header"),c=t.resolveComponent("ux-avatar"),d=t.resolveComponent("flex-cell"),m=t.resolveComponent("flex-row"),u=t.resolveComponent("ux-panel-body"),f=t.resolveComponent("ux-panel"),h=t.resolveComponent("ux-menu");return t.openBlock(),t.createElementBlock("td",cb,[o.rosterEnabled&&o.count?(t.openBlock(),t.createBlock(h,{key:0,right:"",group:"roster-preview"},{activator:t.withCtx(({on:g})=>[t.createVNode(l,t.mergeProps({size:"sm"},t.toHandlers(g),{icon:"",onClick:n[0]||(n[0]=t.withModifiers(()=>{},["stop"]))}),{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.count),1)]),_:1},16)]),default:t.withCtx(()=>[t.createVNode(f,null,{default:t.withCtx(()=>[t.createVNode(a,null,{default:t.withCtx(()=>[t.createElementVNode("div",db,t.toDisplayString(e.row.title),1),t.createElementVNode("div",ub,t.toDisplayString(e.$sdk.date.readableEventDate(e.row)),1),t.createElementVNode("div",mb,t.toDisplayString(e.row.subtitle),1)]),_:1}),t.createVNode(u,null,{default:t.withCtx(()=>[t.createElementVNode("div",fb,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.rosters,g=>(t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("div",hb,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(g.slots,p=>(t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("h4",null,t.toDisplayString(p.title),1),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(p.assignments,k=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["assignment",k.state||"unknown"])},[t.createVNode(m,{gap:"",center:""},{default:t.withCtx(()=>[t.createVNode(d,{shrink:""},{default:t.withCtx(()=>[t.createElementVNode("div",pb,[t.createVNode(c,{initials:`${k.profile.firstName} ${k.profile.lastName}`,id:k.profile},null,8,["initials","id"])])]),_:2},1024),t.createVNode(d,null,{default:t.withCtx(()=>{var w,_;return[t.createTextVNode(t.toDisplayString((w=k.profile)==null?void 0:w.firstName)+" "+t.toDisplayString((_=k.profile)==null?void 0:_.lastName),1)]}),_:2},1024)]),_:2},1024)],2))),256))]))),256))])]))),256))])]),_:1})]),_:1})]),_:1})):t.createCommentVNode("",!0)])}const yb=C(ab,[["render",gb],["__scopeId","data-v-88720bfa"]]),kb={mixins:[_e],data(){return{runsheets:[],creating:!1}},created(){var e,n;this.runsheets=((n=(e=this.row.join_runsheet)==null?void 0:e.runsheet)==null?void 0:n.items)||[]},methods:{async addRunsheet(){const e=this;e.creating=!0,e.$sdk.global.create("runsheet",{model:{event:e.row}}).then(function(n){e.runsheets.push(n),e.openRunsheet(n),e.creating=!1},function(n){e.creating=!1})},async openRunsheet(e){const n=this.$sdk.access.canEditItem(this.user,e);return console.log("OPEN",n,e),n?this.editRunsheet(e):this.viewRunsheet(e)},async editRunsheet(e){const n=await this.$sdk.global.edit(e,!0);e.title=n.title},async viewRunsheet(e){const n=await this.$sdk.global.view(e,!0);e.title=n.title}},computed:{count(){var e;return(e=this.runsheets)==null?void 0:e.length}}},wb={class:"table-roster-cell"},_b={class:"wrp"},bb={key:1,class:"hover"};function xb(e,n,r,i,s,o){const l=t.resolveComponent("ux-button"),a=t.resolveComponent("ux-panel-body"),c=t.resolveComponent("ux-list-item"),d=t.resolveComponent("ux-list"),m=t.resolveComponent("ux-panel"),u=t.resolveComponent("ux-menu"),f=t.resolveComponent("ux-icon"),h=t.resolveDirective("tippy");return t.openBlock(),t.createElementBlock("td",wb,[t.withDirectives((t.openBlock(),t.createElementBlock("div",_b,[o.count?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[o.count>1?(t.openBlock(),t.createBlock(u,{key:0},{activator:t.withCtx(({on:g})=>[t.createVNode(l,t.mergeProps({size:"xs"},t.toHandlers(g),{onClick:n[0]||(n[0]=t.withModifiers(()=>{},["stop"])),icon:""}),{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.count),1)]),_:1},16)]),default:t.withCtx(()=>[t.createVNode(m,null,{default:t.withCtx(()=>[t.createVNode(a,null,{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.count)+" Run Sheet"+t.toDisplayString(o.count===1?"":"s"),1)]),_:1}),t.createVNode(d,null,{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.runsheets,g=>(t.openBlock(),t.createBlock(c,{onClick:p=>o.openRunsheet(g)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(g.title),1)]),_:2},1032,["onClick"]))),256))]),_:1})]),_:1})]),_:1})):(t.openBlock(),t.createBlock(l,{key:1,size:"xs",icon:"",onClick:n[1]||(n[1]=t.withModifiers(g=>o.openRunsheet(s.runsheets[0]),["stop"]))},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.count),1)]),_:1}))],64)):(t.openBlock(),t.createElementBlock("div",bb,[t.createVNode(l,{size:"xs",icon:"",loading:s.creating,onClick:t.withModifiers(o.addRunsheet,["stop"])},{default:t.withCtx(()=>[t.createVNode(f,{icon:"fa-plus"})]),_:1},8,["loading","onClick"])]))])),[[h,{placement:"bottom",content:`${o.count} Run Sheets`}]])])}const Cb=C(kb,[["render",xb],["__scopeId","data-v-3ea39cda"]]);function Ys(e,n){if(!e||!n)return;const r=n.split("|");n=r[0];const i=r[1];var s=en(e,n);if(s)return i&&Array.isArray(s)?s.filter(function(d){var u;const m=(u=d==null?void 0:d.meta)==null?void 0:u.definition;if(i==="null")return!m;if(m)return m===i}):s;const o=n.split("."),l=o.shift(),a=o.join("."),c=en(e,l);return Array.isArray(c)?c.map(function(d){return Ys(d,a)}).flat().filter(Boolean):Ys(c,a)}const Vb={data(){return{component:null}},components:{ValueRenderer:S1},async created(){const e=this;let n,r=e.column.type,i=e.column.renderer,s=e.column.key;if(!i)switch(s){case"fileSize":i="filesize";break;case"duration":i="duration";break;case"title":i="title";break;case"status":case"paymentStatus":case"meta.status":i="status";break;case"meta.tags":i="tag";break;case"meta.definition":i="type";break}switch(e.column.widget){case"button":break;default:i=i||e.column.widget;break}switch(r){case"boolean":i="boolean";break;case"reference":e.column.referenceType==="image"&&(i="thumbnail");break}switch(i){case"filesize":n=d1;break;case"duration":n=h1;break;case"button":n=W_;break;case"security":n=y1;break;case"boolean":n=sm;break;case"roster":n=yb;break;case"runsheet":n=Cb;break;case"personainvite":n=j1;break;case"personaemail":n=P1;break;case"time":case"timefield":n=I_;break;case"date":case"datetime":n=im;break;case"due":n=i1;break;case"circles":n=rb;break;case"title":n=X1;break;case"type":n=lb;break;case"complex":n=I1;break;case"status":n=G1;break;case"computed":n=E1;break;case"url":n=lm;break;case"currency":n=z_;break;case"tag":n=E_;break;case"avatar":n=D_;break;case"thumbnail":n=P_;break;default:switch(r){case"date":n=im;break;case"boolean":n=sm;break;case"url":n=lm;break}break}e.component=n},props:{column:{type:Object,required:!0},row:{type:Object,required:!0}},computed:{nowrap(){return this.column.wrap===!1},multiValue(){return Array.isArray(this.value)},renderer(){return this.column.renderer},renderValue(){var e=this.value;if(e!=null)return e.title||e.name||e},value(){var e=Ys(this.row,this.column.key);return e}}},Eb={class:"value"};function Nb(e,n,r,i,s,o){const l=t.resolveComponent("value-renderer");return s.component?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(s.component),{key:0,column:r.column,row:r.row,value:o.value},null,8,["column","row","value"])):(t.openBlock(),t.createElementBlock("td",{key:1,class:t.normalizeClass(["table-cell",{nowrap:o.nowrap}])},[o.multiValue?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(o.value,(a,c)=>(t.openBlock(),t.createElementBlock("span",Eb,[t.createVNode(l,{type:r.column.type,multi:"",last:c===o.value.length-1,value:a},null,8,["type","last","value"])]))),256)):(t.openBlock(),t.createBlock(l,{key:1,type:r.column.type,value:o.value},null,8,["type","value"]))],2))}const dm=C(Vb,[["render",Nb],["__scopeId","data-v-43da03cf"]]),Tb={components:{TableCell:dm},props:{selected:{type:Boolean},index:{type:Number},row:{type:Object,required:!0},columns:{type:Array,required:!0},enableActions:{type:Boolean,default(){return!1}},enableSelection:{type:Boolean,default(){return!0}},hasCorner:{type:Boolean,default(){return!1}}},emits:["click:cell","click:row","click:actions","mousedown:select","mouseenter:select"],methods:{clickCell(e){this.$emit("click:cell",{row:this.row,column:e}),this.$emit("click:row",this.row)},clickActions(e){this.$emit("click:actions",e)},mousedownSelect(e){this.$emit("mousedown:select",this.row,this.index,e)},mouseenterSelect(){this.$emit("mouseenter:select",this.row,this.index)}},computed:{classes(){var n,r;var e=[];return this.selected&&e.push("selected"),((r=(n=this.row)==null?void 0:n.meta)==null?void 0:r.status)==="inactive"&&e.push("inactive"),e}}},Sb={key:2,class:"table-cell last shrink"};function Bb(e,n,r,i,s,o){const l=t.resolveComponent("ux-checkbox"),a=t.resolveComponent("table-cell"),c=t.resolveComponent("ux-icon"),d=t.resolveComponent("ux-button");return t.openBlock(),t.createElementBlock("tr",{class:t.normalizeClass([o.classes,"table-row"])},[t.renderSlot(e.$slots,"default",{},()=>[r.enableSelection?(t.openBlock(),t.createElementBlock("th",{key:0,class:"table-cell table-select first shrink",onMousedown:n[0]||(n[0]=t.withModifiers((...m)=>o.mousedownSelect&&o.mousedownSelect(...m),["prevent"])),onMouseenter:n[1]||(n[1]=(...m)=>o.mouseenterSelect&&o.mouseenterSelect(...m)),onClick:n[2]||(n[2]=t.withModifiers(()=>{},["stop","prevent"]))},[t.createVNode(l,{value:r.selected},null,8,["value"])],32)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.columns,(m,u)=>(t.openBlock(),t.createBlock(a,{key:`${m.path||m.key}-${u}-${m.type}-${m.renderer}`,onClick:t.withModifiers(f=>o.clickCell(m),["stop","prevent"]),column:m,row:r.row},null,8,["onClick","column","row"]))),128)),r.enableActions?(t.openBlock(),t.createElementBlock("th",{key:1,class:"table-cell last shrink",onClick:n[3]||(n[3]=t.withModifiers(m=>o.clickActions(r.row),["stop","prevent"]))},[t.createVNode(d,{size:"xs",icon:""},{default:t.withCtx(()=>[t.createVNode(c,{icon:"fa-ellipsis"})]),_:1})])):r.hasCorner?(t.openBlock(),t.createElementBlock("th",Sb)):t.createCommentVNode("",!0)],!0)],2)}const Db=C(Tb,[["render",Bb],["__scopeId","data-v-28bb2cce"]]),um={data(){return{scrollTop:0}},methods:{updateScroll(e){var n=this.$refs.scroll;n=(n==null?void 0:n.$el)||n,n&&(this.scrollTop=n.scrollTop)}},mounted(){var e=this.$refs.scroll;e=(e==null?void 0:e.$el)||e,e&&e.addEventListener("scroll",this.updateScroll)},beforeUnmount(){var e=this.$refs.scroll;e=(e==null?void 0:e.$el)||e,e&&e.removeEventListener("scroll",this.updateScroll)},activated(){var e=this.$refs.scroll;e=(e==null?void 0:e.$el)||e,e&&(e.scrollTop=this.scrollTop)}},Ob={mixins:[um],components:{TableRow:Db,TableCell:dm},emits:["update:sort","select:multiple","deselect:multiple","select:multiple","click:row","click:cell","click:actions","select:row:toggle","contextmenu:header"],watch:{rows(){this.$refs.scroll.scroll({top:0,left:0})},sort(e){this.sorting=e},sorting(e){this.$emit("update:sort",e)}},props:{total:{type:Number},columns:{type:Array,default(){return[]}},rows:{type:Array,default(){return[]}},scrollable:{type:Boolean,default(){return!0}},enableActions:{type:Boolean,default(){return!1}},enableSelection:{type:Boolean,default(){return!0}},sort:{type:Object,default(){return{key:"meta.created",type:"date",direction:"desc"}}},selection:{type:Array,default(){return[]}},selectAll:{type:Function},deselectAll:{type:Function},group:{type:Object,default(){return{}}}},data(){return{sorting:this.sort,lastSelectedIndex:null,lastSelectAction:null,dragging:!1,dragMode:null,dragStart:null}},beforeUnmount(){window.removeEventListener("mouseup",this.endDrag),window.removeEventListener("mousemove",this.checkDragStart)},computed:{groupedRows(){const e=this.group.key,n=this.group.type||"string";if(e){const{values:r}=this.renderRows.reduce(function(i,s){let o=en(s,e);o=String(o);let l=i.keys[o];return l||(l=i.keys[o]={title:o,rows:[]},i.values.push(l)),i},{values:[],keys:{}});return r}return[{rows:this.renderRows}]},currentSortDirection(){var e;return((e=this.sorting)==null?void 0:e.direction)||"asc"},selectionHash(){var e=this;return e.selection.reduce(function(n,r){var i=r._id||r.id;return n[i]=r,n},{})},pageSelected(){var e=this;if(!(!e.rows||!e.rows.length))return!e.rows.some(function(n){return!e.selectionHash[n._id||n.id]})},renderColumns(){return this.columns.map(function(n){var r=Object.assign({},n);return r.class=[],r.shrink&&r.class.push("shrink"),r})},renderRows(){return this.rows},someSelectedOnPage(){return this.rows.some(this.isSelected)}},methods:{togglePage(){var e=this;e.pageSelected?e.deselectPage():e.selectPage()},selectPage(){var e=this;e.$emit("select:multiple",e.rows)},deselectPage(){var e=this;e.$emit("deselect:multiple",e.rows)},isSelected(e){var n=this,r=e._id||e.id;return n.selection.some(function(i){var s=i._id||i.id;return i==e||s==r})},classes(e){let n=[];return this.isSelected(e)&&n.push("selected"),n},selectRange(e,n){const r=Math.min(e,n),i=Math.max(e,n)+1,s=this.renderRows.slice(r,i);this.$emit("select:multiple",s)},deselectRange(e,n){const r=Math.min(e,n),i=Math.max(e,n)+1,s=this.renderRows.slice(r,i);this.$emit("deselect:multiple",s)},toggleSort(e){var o,l;const n=(o=this.sorting)==null?void 0:o.key,r=((l=this.sorting)==null?void 0:l.direction)||"asc";let{key:i,direction:s}=e;i===n&&(s=r==="dsc"?"asc":"dsc"),this.sorting={key:i,direction:s,type:e.type}},clickRow(e){this.$emit("click:row",e)},clickCell({row:e,column:n}){this.$emit("click:cell",{row:e,column:n})},clickActions(e){this.$emit("click:actions",e)},mousedownSelect(e,n,r){const s=this.isSelected(e)?"deselect":"select";if(r.shiftKey&&this.lastSelectedIndex!=null&&this.lastSelectedIndex!==n){this.lastSelectAction==="deselect"?this.deselectRange(this.lastSelectedIndex,n):this.selectRange(this.lastSelectedIndex,n),this.lastSelectedIndex=n;return}s==="select"?this.$emit("select:multiple",[e]):this.$emit("deselect:multiple",[e]),this.lastSelectedIndex=n,this.lastSelectAction=s,this.dragMode=s,this.dragStart={x:r.clientX,y:r.clientY},window.addEventListener("mousemove",this.checkDragStart),window.addEventListener("mouseup",this.endDrag,{once:!0})},mouseenterSelect(e,n){if(!this.dragging)return;const r=this.isSelected(e);this.dragMode==="select"&&!r?this.$emit("select:multiple",[e]):this.dragMode==="deselect"&&r&&this.$emit("deselect:multiple",[e])},checkDragStart(e){if(!this.dragStart)return;const n=e.clientX-this.dragStart.x,r=e.clientY-this.dragStart.y;n*n+r*r>=9&&(this.dragging=!0,window.removeEventListener("mousemove",this.checkDragStart))},endDrag(){this.dragging=!1,this.dragMode=null,this.dragStart=null,window.removeEventListener("mouseup",this.endDrag),window.removeEventListener("mousemove",this.checkDragStart)}}},Mb={class:"table-scroll",ref:"scroll"},Fb={key:0,class:"first table-select shrink"},Ib=["onClick"],Ab={key:1,class:"last shrink"},Lb={key:0};function Rb(e,n,r,i,s,o){const l=t.resolveComponent("ux-checkbox"),a=t.resolveComponent("ux-list-item"),c=t.resolveComponent("ux-list"),d=t.resolveComponent("ux-menu"),m=t.resolveComponent("flex-cell"),u=t.resolveComponent("flex-row"),f=t.resolveComponent("table-row");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["table-wrapper",{dragging:s.dragging}]),onMouseup:n[5]||(n[5]=(...h)=>o.endDrag&&o.endDrag(...h))},[t.createElementVNode("div",Mb,[t.createElementVNode("table",null,[t.createElementVNode("thead",null,[t.createElementVNode("tr",{onContextmenu:n[4]||(n[4]=t.withModifiers(h=>e.$emit("contextmenu:header",h),["prevent"]))},[r.enableSelection?(t.openBlock(),t.createElementBlock("th",Fb,[t.createVNode(d,null,{activator:t.withCtx(({on:h})=>[t.createVNode(l,t.mergeProps(t.toHandlers(h),{value:o.pageSelected}),null,16,["value"])]),default:t.withCtx(()=>[t.createVNode(c,null,{default:t.withCtx(()=>[t.createVNode(a,{onClick:n[0]||(n[0]=h=>o.selectPage())},{default:t.withCtx(()=>[...n[6]||(n[6]=[t.createTextVNode(" Select Page ",-1)])]),_:1}),o.someSelectedOnPage?(t.openBlock(),t.createBlock(a,{key:0,onClick:n[1]||(n[1]=h=>o.deselectPage())},{default:t.withCtx(()=>[...n[7]||(n[7]=[t.createTextVNode(" Deselect Page ",-1)])]),_:1})):t.createCommentVNode("",!0),r.selectAll?(t.openBlock(),t.createBlock(a,{key:1,onClick:n[2]||(n[2]=h=>r.selectAll())},{default:t.withCtx(()=>[t.createTextVNode(" Select All ("+t.toDisplayString(r.total)+") ",1)]),_:1})):t.createCommentVNode("",!0),r.deselectAll?(t.openBlock(),t.createBlock(a,{key:2,onClick:n[3]||(n[3]=h=>r.deselectAll())},{default:t.withCtx(()=>[...n[8]||(n[8]=[t.createTextVNode(" Deselect All ",-1)])]),_:1})):t.createCommentVNode("",!0)]),_:1})]),_:1})])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.renderColumns,h=>{var g;return t.openBlock(),t.createElementBlock("th",{onClick:p=>o.toggleSort(h),class:t.normalizeClass([{sortable:h.sortable!==!1,active:h.key===((g=s.sorting)==null?void 0:g.key)},h.class])},[t.createVNode(u,{gap:"",vcenter:""},{default:t.withCtx(()=>{var p;return[t.createVNode(m,null,{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(h.title),1)]),_:2},1024),h.key===((p=s.sorting)==null?void 0:p.key)?(t.openBlock(),t.createBlock(m,{key:0,class:"caret",shrink:""},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.currentSortDirection==="asc"?"▲":"▼"),1)]),_:1})):t.createCommentVNode("",!0)]}),_:2},1024)],10,Ib)}),256)),r.enableActions||e.$slots.corner?(t.openBlock(),t.createElementBlock("th",Ab,[t.renderSlot(e.$slots,"corner",{},void 0,!0)])):t.createCommentVNode("",!0)],32)]),t.createElementVNode("tbody",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.groupedRows,h=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[h.title?(t.openBlock(),t.createElementBlock("tr",Lb,[t.createElementVNode("td",null,t.toDisplayString(h.title),1)])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(h.rows,(g,p)=>(t.openBlock(),t.createBlock(f,{enableSelection:r.enableSelection,enableActions:r.enableActions,hasCorner:!!e.$slots.corner,key:g._id,"onClick:cell":o.clickCell,"onClick:row":o.clickRow,"onMousedown:select":o.mousedownSelect,"onMouseenter:select":o.mouseenterSelect,"onClick:actions":o.clickActions,selected:o.isSelected(g),row:g,index:p,columns:r.columns},null,8,["enableSelection","enableActions","hasCorner","onClick:cell","onClick:row","onMousedown:select","onMouseenter:select","onClick:actions","selected","row","index","columns"]))),128))],64))),256))])])],512)],34)}const mm=C(Ob,[["render",Rb],["__scopeId","data-v-faa7539a"]]);var wo={exports:{}},fm;function Pb(){if(fm)return wo.exports;fm=1;var e=Object.prototype.hasOwnProperty;function n(s){return"[Throws: "+(s?s.message:"?")+"]"}function r(s,o){if(e.call(s,o))try{return s[o]}catch(l){return n(l)}return s[o]}function i(s){var o=[];function l(a){if(a===null||typeof a!="object")return a;if(o.indexOf(a)!==-1)return"[Circular]";if(o.push(a),typeof a.toJSON=="function")try{var c=l(a.toJSON());return o.pop(),c}catch(u){return n(u)}if(Array.isArray(a)){var d=a.map(l);return o.pop(),d}var m=Object.keys(a).reduce(function(u,f){return u[f]=l(r(a,f)),u},{});return o.pop(),m}return l(s)}return wo.exports=function(s,o,l){return JSON.stringify(i(s),o,l)},wo.exports.ensureProperties=i,wo.exports}var Ub=Pb();const Ks=vt(Ub);function $b(e,n){return e==null||n=="date"&&e.toString&&e.toString()==="Invalid Date"}function hm(e){return e!=null}const Z={emits:["touched","update:modelValue"],props:{field:{type:Object,default(){return{}}},parentModel:{type:Object}},data(){return{dynamicOptions:[],asyncOptionsAreLoading:this.field.asyncOptions,value:this.modelValue}},watch:{modelValue(e,n){this.model=e}},mounted(){this.checkAutofocus()},async created(){const e=this;e.hasAsyncOptions&&await e.reloadAsyncOptions()},inject:{form:{default(){}},fieldPath:{default(){}}},computed:{asyncOptionsURL(){const e=this;if(e.field.asyncOptions&&String(e.field.asyncOptions||"").trim().length)return e.field.asyncOptions;if(e.field.dynamicOptions){const n=e.$sdk.utils.id(e.field.dynamicOptions);if(n)return e.$sdk.api.generateEndpointURL(`/smartlist/${n}/select`)}},hasAuthenticationToken(){return this.$sdk.auth.getCurrentToken()},hasAsyncOptions(){var e;if(this.asyncOptionsURL)return!0;if(this.field.type==="reference"){if((e=this.field.allowedReferences)!=null&&e.length)return!1;switch(this.field.widget){case"select":if(this.hasAuthenticationToken)return!0;break;default:return!1}if(this.field.lockFilter)return!0}return!1},loadingAsyncOptions(){return this.hasAsyncOptions&&this.asyncOptionsAreLoading},optionLookup(){var e=this;return e.options.reduce(function(n,r){const i=e.getValue(r);return n[i]=r,n},{})},selectableOptions(){return this.options},required(){return this.minimum},model:{get(){var e=this.cleanOutput(this.value);return e},set(e){let n;(this.isGroup||this.widget==="form")&&(e===this.value?n=!1:n=!0);const r=this.cleanInput(e),i=this.cleanInput(this.value);(Ks(r)!=Ks(i)||n)&&(this.value=r,this.checkAutofocus(),this.dispatch())}},options(){var e=this;if(e.field.type==="reference"){const n=(e.field.allowedReferences||[]).filter(Boolean);if(n.length)return n.map(function(r){let{_id:i,title:s}=r;return s=s||[r.firstName,r.lastName].filter(Boolean).join(" "),{title:s,value:i,_id:i}})}return e.hasAsyncOptions?e.dynamicOptions:(e.field.options||[]).reduce(function(n,r){if(!r)return n;const i=e.getValue(r);var o={title:r.title||r.name||r.label||i,value:i,none:r.none,group:r.group,source:r};return e.field.type=="reference"&&(o._id=i),n.push(o),n},[])},prefix(){return this.field.suffix},suffix(){return this.field.suffix},type(){return this.field.type||"string"},key(){return this.field.key},isGroup(){return this.type==="group"},asObject(){return this.isGroup&&!!this.field.asObject},layoutGroup(){return this.isGroup&&!this.field.asObject},canAddValue(){if(!this.singleValue&&!(this.options.length&&this.selectableOptions.length===0))return this.maximum===0||this.numValues<this.maximum},canRemoveValue(){return this.numValues>this.minimum},widget(){return this.field.widget},singleValue(){if(this.asObject){var e=this.minimum===1&&this.maximum===1;return e}else return this.maximum===1},multiValue(){return!this.singleValue},label(){return this.field.title},title(){return this.label},plural(){return this.field.plural},description(){return this.field.description},placeholder(){return this.field.placeholder||this.field.hint},addLabel(){return this.field.addLabel?this.field.addLabel:this.numValues?`Add another ${this.label}`:`Add ${this.label}`},removeLabel(){return"Remove"},size(){return this.field.size},numValues(){return this.singleValue?1:(this.value||[]).length||0},showLabel(){return this.field.title&&!this.field.hideTitle},showDescription(){return this.description},fields(){var e=this.field.fields;if(e&&e.length)return e},minimum(){if(this.layoutGroup)return 1;var e=parseInt(this.field.minimum||0);return isNaN(e)&&(e=0),e=Math.max(e,0),e=this.maximum?Math.min(e,this.maximum):e,parseInt(e)},maximum(){if(this.layoutGroup)return 1;var e=parseInt(this.field.maximum||0);return isNaN(e)&&(e=0),e=Math.max(e,0),parseInt(e)},ask(){var e=parseInt(this.field.ask);return e=Math.max(e,this.minimum),this.maximum&&(e=Math.min(e,this.maximum)),e},minDate(){if(this.field.minDate)return new Date(this.field.minDate)},maxDate(){if(this.field.maxDate)return new Date(this.field.maxDate)}},methods:{async reloadAsyncOptions(){const e=this;if(!e.hasAsyncOptions){e.asyncOptionsAreLoading=!1;return}if(e.asyncOptionsAreLoading=!0,e.asyncOptionsURL){const{data:n}=await e.$sdk.api.get(e.asyncOptionsURL);e.dynamicOptions=(n||[]).map(function(r){let i=r==null?void 0:r.title;i||(i=r==null?void 0:r.name),i||(i=r==null?void 0:r.label),i||(i=[r.firstName,r.lastName].filter(Boolean).join(" ").trim()),i||(i=r.value||String(r));const s=String((r==null?void 0:r.value)||(r==null?void 0:r.title)||(r==null?void 0:r.name)||(r==null?void 0:r.label)||r),o=e.$sdk.utils.id((r==null?void 0:r._id)||r);return{title:i,value:s,_id:o}})}else if(e.hasAuthenticationToken){const n=e.field.referenceType,r={filter:e.field.lockFilter,sort:{key:"title",direction:"asc",type:"string"},page:{size:1e3}},{items:i}=await e.$sdk.content.list(n,r);e.dynamicOptions=i.map(function({_id:s,title:o}){return{value:s,title:o,_id:s}})}e.asyncOptionsAreLoading=!1},cleanTextInput(e,n,r){switch(n){case"url":e=r.$sdk.utils.parseURL(e);break;case"key":e=String(r.$sdk.utils.machineName(e||"")||"").trim();break;case"integer":e=parseInt(String(e).replace(/[^0-9-]/g,"")),isNaN(e)&&(e=void 0);break;case"number":case"decimal":case"float":e=Number(String(e).replace(/[^0-9.-]/g,"")),isNaN(e)&&(e=void 0);break}return e},checkAutofocus(){if(this.field.autofocus){if(this.value)return;this.$nextTick(function(){this.refocus()})}},getValue(e){if(!e)return this.cleanTextInput(e);var n=this.cleanTextInput(e._id||e.value),r=hm(n);return!r&&e.title&&!this.returnObject&&(n=e.title),n=this.cleanTextInput(n),hm(n)?n:e},getLabel(e){if(e){var n=e.title;return!n&&n!==0&&n!==!1&&(n=e.name),!n&&n!==0&&n!==!1&&(n=e.label),!n&&n!==0&&n!==!1&&(n=e.value),typeof n=="object"?"(no title)":n}},touch(){this.$emit("touched")},getNewDefaultEntry(){},add(){if(this.canAddValue){var e=this.cleanInputValue(this.getNewDefaultEntry());(!this.value||!Array.isArray(this.value))&&(this.value=[]),this.value.push(e),this.dispatch(),this.$nextTick(function(){this.refocus()}),this.touch()}},remove(e){var n=this.model.indexOf(e);this.model.splice(n,1),this.dispatch(),this.touch()},dispatch(){this.$emit("update:modelValue",this.value)},cleanInputValue(e){return e},cleanOutputValue(e){return e},cleanOutput(e){var n=this;return $b(e,n.field.type)?n.multiValue?e=[]:e=void 0:n.multiValue?(Array.isArray(e)||(e=[]),e.forEach(function(r,i){e[i]=n.cleanOutputValue(r)})):e=n.cleanOutputValue(e),e},cleanInput(e){var n=this;if(n.multiValue){for(e||(e=[]),Array.isArray(e)||(e=[e]),n.maximum&&e.length>n.maximum&&(e.length=n.maximum);e.length<n.minimum;)e.push(n.cleanInputValue(n.getNewDefaultEntry()));e=e.map(function(r){var i=n.cleanInputValue(r);return i})}else e&&(e=n.cleanInputValue(e));return e},refocus(){var r;var e=this.$refs.input;if(e){var n;Array.isArray(e)?n=e[e.length-1]:n=e,n&&(typeof n.focus=="function"?n.focus():typeof((r=n.$el)==null?void 0:r.focus)=="function"&&n.$el.focus())}}}};function zb(e){return e===void 0||typeof e>"u"||e===null||String(e)==="null"||String(e)==="undefined"}const jb={data(){return{candidate:null}},props:{modelValue:{},pills:{type:Boolean,default:!1}},mixins:[Z],created(){this.model=this.model},methods:{maybeAutoSelectSingleOption(){if(this.loadingAsyncOptions||!this.singleValue||!this.minimum||this.model||this.model===!1||this.model===0)return;const e=this.selectableOptions.filter(function(n){return!n.none});e.length===1&&(this.model=e[0])},displayLabelFromValue(e){if(!e)return;const n=e.value||e,r=this.optionLookup[n]||{};return r.title||r.name||e.title||e.value||e},addValue(e){this.canAddValue&&this.model.indexOf(e)===-1&&(this.model=[...this.model,e])},removeValue(e){var n=this.model.slice();e!=-1&&(n.splice(e,1),this.model=n)},cleanOutput(e){var n=this;return zb(e)?n.multiValue?e=[]:e=void 0:n.multiValue?e=(e||[]).filter(function(r){return r!=null}).map(function(r){return n.getValue(r)}):e=n.getValue(e),e},cleanInput(e){var n=this;if(n.multiValue)e||(e=[]),Array.isArray(e)||(e=[e]),n.maximum&&e.length>n.maximum&&(e.length=n.maximum),e=e.filter(function(i){return i!=null}).map(function(i){var s=n.getValue(i);return n.returnObject?n.optionLookup[s]:s});else{var r=n.getValue(e);switch(e=n.returnObject?n.optionLookup[r]:r,e){case"":switch(n.type){case"decimal":case"float":case"number":case"integer":e=void 0;break}break}}return e}},watch:{candidate(e){e&&(this.addValue(e),this.candidate=null)},selectableOptions:{immediate:!0,handler(){this.maybeAutoSelectSingleOption()}},loadingAsyncOptions(){this.maybeAutoSelectSingleOption()}},computed:{noneTitle(){return this.field.placeholder||"None"},usePills(){return this.field.pills||this.pills},returnObject(){return this.type=="reference"},classes(){var e=[];return this.multiValue?e.push("multiple"):e.push("single"),this.usePills&&e.push("pills"),e},summary(){if(this.multiValue)return"Select an option";const e=this.selectableOptions.find(function(i){return i.none}),n=(e==null?void 0:e.title)||(e==null?void 0:e.label),r=this.model;return r||r===!1||r===0?this.getLabel(this.optionLookup[this.model]):n||this.noneTitle||this.title||"Click to select"},grouped(){const e=this,{values:n}=e.selectableOptions.reduce(function(r,i){const s=i.group||"";let o=r.hash[s];return o||(o=r.hash[s]={title:s,options:[]},r.values.push(o)),o.options.push(i),r},{hash:{},values:[]});if(!(n.length<=1))return n},modelLookup(){var e=this;return e.multiValue?e.model.reduce(function(n,r){const i=e.getValue(r);return n[i]=r,n},{}):{}},selectableOptions(){var r;const e=this;let n=e.options;return e.multiValue&&(n=n.filter(function(i){return!e.modelLookup[e.getValue(i)]})),(r=e.field)!=null&&r.sorted?n.sort(function(i,s){var o=(i.title||i).toLowerCase(),l=(s.title||s).toLowerCase();return o<l?-1:o>l?1:0}):n},showNoneOption(){return!(!(this.singleValue&&!this.minimum)||this.selectableOptions.find(function(r){return r.none}))}}},qb={key:0,class:"ux-field-title"},Hb={key:0,class:"ux-required-marker"},Wb={key:1,class:"ux-field-description"},Gb={key:2,class:"select-tags"},Yb=["onClick"],Kb={key:3},Jb={key:4,class:"select-input-wrapper"},Zb={class:"ui-select-button"},Xb=["label"],Qb=["value"],vb=["value"],ex={class:"ui-select-button"},tx=["multiple"],nx={key:0,value:""},rx=["label"],ox=["value"],ix=["value"];function sx(e,n,r,i,s,o){var m,u;const l=t.resolveComponent("flex-cell"),a=t.resolveComponent("ux-icon"),c=t.resolveComponent("flex-row"),d=t.resolveComponent("ux-button");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["native-select",o.classes])},[e.showLabel?(t.openBlock(),t.createElementBlock("label",qb,[t.createTextVNode(t.toDisplayString(e.label)+" ",1),e.required?(t.openBlock(),t.createElementBlock("span",Hb,"*")):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),e.showDescription?(t.openBlock(),t.createElementBlock("div",Wb,t.toDisplayString(e.description),1)):t.createCommentVNode("",!0),e.multiValue?(t.openBlock(),t.createElementBlock("div",Gb,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.model,(f,h)=>(t.openBlock(),t.createElementBlock("div",{class:"select-tag",key:f.value||f},[t.createVNode(c,{gap:"",center:""},{default:t.withCtx(()=>[t.createVNode(l,null,{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.displayLabelFromValue(f)),1)]),_:2},1024),t.createVNode(l,{shrink:""},{default:t.withCtx(()=>[t.createElementVNode("a",{onClick:g=>o.removeValue(h)},[t.createVNode(a,{icon:"fa-times"})],8,Yb)]),_:2},1024)]),_:2},1024)]))),128))])):t.createCommentVNode("",!0),e.loadingAsyncOptions?(t.openBlock(),t.createElementBlock("div",Kb,[t.createVNode(a,{icon:"fa-spinner",spin:"",left:""}),n[4]||(n[4]=t.createTextVNode(" Loading Options ",-1))])):(t.openBlock(),t.createElementBlock("div",Jb,[e.multiValue?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[e.canAddValue?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createElementVNode("div",Zb,[t.renderSlot(e.$slots,"default",{},()=>[t.createVNode(d,{size:e.size,tag:"div"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.summary),1)]),_:1},8,["size"])],!0)]),t.withDirectives((t.openBlock(),t.createElementBlock("select",{onFocus:n[0]||(n[0]=(...f)=>e.touch&&e.touch(...f)),"onUpdate:modelValue":n[1]||(n[1]=f=>s.candidate=f),key:(m=e.model)==null?void 0:m.length},[n[5]||(n[5]=t.createElementVNode("option",{value:""},"Select an option",-1)),o.grouped?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(o.grouped,f=>(t.openBlock(),t.createElementBlock("optgroup",{label:f.title,key:f.title},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(f.options,h=>(t.openBlock(),t.createElementBlock("option",{value:h.value},t.toDisplayString(h.title),9,Qb))),256))],8,Xb))),128)):(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(o.selectableOptions,f=>(t.openBlock(),t.createElementBlock("option",{value:f.value},t.toDisplayString(f.title),9,vb))),256))],32)),[[t.vModelSelect,s.candidate]])],64)):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createElementVNode("div",ex,[t.renderSlot(e.$slots,"default",{},()=>[t.createVNode(d,{size:e.size,tag:"div"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.summary),1)]),_:1},8,["size"])],!0)]),t.withDirectives((t.openBlock(),t.createElementBlock("select",{onFocus:n[2]||(n[2]=(...f)=>e.touch&&e.touch(...f)),multiple:e.multiValue,"onUpdate:modelValue":n[3]||(n[3]=f=>e.model=f),key:(u=e.model)==null?void 0:u.length},[o.showNoneOption?(t.openBlock(),t.createElementBlock("option",nx,t.toDisplayString(o.noneTitle),1)):t.createCommentVNode("",!0),o.grouped?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(o.grouped,f=>(t.openBlock(),t.createElementBlock("optgroup",{label:f.title,key:f.title},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(f.options,h=>(t.openBlock(),t.createElementBlock("option",{value:h.value},t.toDisplayString(h.title),9,ox))),256))],8,rx))),128)):(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:2},t.renderList(o.selectableOptions,f=>(t.openBlock(),t.createElementBlock("option",{value:f.value},t.toDisplayString(f.title),9,ix))),256))],40,tx)),[[t.vModelSelect,e.model]])],64))]))],2)}const Tt=C(jb,[["render",sx],["__scopeId","data-v-bf1479ae"]]),lx={props:{total:{type:Number,default(){return 0}},page:{type:Object,default(){return{size:50,index:1}}},sizeOptions:{type:Array,default(){return[50,100,250,500]}}},components:{NativeSelect:Tt},watch:{totalPages(){this.currentPage=0}},computed:{perPage:{get(){return this.pageModel.size},set(e){e=Math.max(e,1),this.pageModel.size=e,this.dispatch()}},pageField(){return{type:"integer",maximum:1,minimum:1,options:Array(this.totalPages).fill(1).map((e,n)=>e+n)}},totalPages(){return Math.ceil(this.total/this.perPage)},startIndex(){return(this.currentPage-1)*this.pageModel.size},displayStartIndex(){return this.total?this.startIndex+1:0},endIndex(){return Math.min(this.startIndex+this.pageModel.size,this.total)},currentPage:{get(){return this.pageModel.index},set(e){this.totalPages&&(e=Math.min(this.totalPages,e)),e=Math.max(e,1),this.pageModel.index=e,this.dispatch()}}},methods:{dispatch(){return this.$emit("update:page",this.pageModel)},previousPage(){this.currentPage--},nextPage(){this.currentPage++}},data(){return{pageModel:this.page,perPageField:{minimum:1,maximum:1,options:this.sizeOptions.map(function(e){return{title:`${e} per page`,value:e}})}}}};function ax(e,n,r,i,s,o){const l=t.resolveComponent("native-select"),a=t.resolveComponent("flex-cell"),c=t.resolveComponent("ux-icon"),d=t.resolveComponent("ux-button"),m=t.resolveComponent("flex-row");return t.openBlock(),t.createBlock(m,{center:"",gap:""},{default:t.withCtx(()=>[t.createVNode(a,{shrink:"",class:"text"},{default:t.withCtx(()=>[t.createVNode(l,{modelValue:o.perPage,"onUpdate:modelValue":n[0]||(n[0]=u=>o.perPage=u),field:s.perPageField},{default:t.withCtx(()=>[e.$device.breakpoint.xs?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(t.toDisplayString(o.displayStartIndex)+"-"+t.toDisplayString(o.endIndex)+" of "+t.toDisplayString(r.total),1)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("Showing "+t.toDisplayString(o.displayStartIndex)+" to "+t.toDisplayString(o.endIndex)+" of "+t.toDisplayString(r.total)+" total",1)],64))]),_:1},8,["modelValue","field"])]),_:1}),t.createVNode(a),o.totalPages>1?(t.openBlock(),t.createBlock(a,{key:0,shrink:""},{default:t.withCtx(()=>[t.createVNode(m,{gap:"",center:""},{default:t.withCtx(()=>[t.createVNode(a,{shrink:"",class:"text"},{default:t.withCtx(()=>[t.createVNode(l,{modelValue:o.currentPage,"onUpdate:modelValue":n[1]||(n[1]=u=>o.currentPage=u),field:o.pageField},{default:t.withCtx(()=>[e.$device.breakpoint.xs?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(t.toDisplayString(o.currentPage)+"/"+t.toDisplayString(o.totalPages),1)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("Page "+t.toDisplayString(o.currentPage)+" of "+t.toDisplayString(o.totalPages),1)],64))]),_:1},8,["modelValue","field"])]),_:1}),t.createVNode(a,{shrink:""},{default:t.withCtx(()=>[t.createVNode(d,{size:"sm",icon:"",onClick:n[2]||(n[2]=u=>o.previousPage())},{default:t.withCtx(()=>[t.createVNode(c,{icon:"fa-arrow-left"})]),_:1})]),_:1}),t.createVNode(a,{shrink:""},{default:t.withCtx(()=>[t.createVNode(d,{size:"sm",icon:"",onClick:n[3]||(n[3]=u=>o.nextPage())},{default:t.withCtx(()=>[t.createVNode(c,{icon:"fa-arrow-right"})]),_:1})]),_:1})]),_:1})]),_:1})):t.createCommentVNode("",!0)]),_:1})}const pm=C(lx,[["render",ax],["__scopeId","data-v-93d339c8"]]);function cx(e){return t.getCurrentScope()?(t.onScopeDispose(e),!0):!1}function gm(e){return typeof e=="function"?e():t.unref(e)}const dx=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const ux=e=>e!=null,Js=()=>{};function Zs(e){var n;const r=gm(e);return(n=r==null?void 0:r.$el)!=null?n:r}const mx=dx?window:void 0;function fx(){const e=t.ref(!1),n=t.getCurrentInstance();return n&&t.onMounted(()=>{e.value=!0},n),e}function hx(e){const n=fx();return t.computed(()=>(n.value,!!e()))}function px(e,n,r={}){const{root:i,rootMargin:s="0px",threshold:o=.1,window:l=mx,immediate:a=!0}=r,c=hx(()=>l&&"IntersectionObserver"in l),d=t.computed(()=>{const g=gm(e);return(Array.isArray(g)?g:[g]).map(Zs).filter(ux)});let m=Js;const u=t.ref(a),f=c.value?t.watch(()=>[d.value,Zs(i),u.value],([g,p])=>{if(m(),!u.value||!g.length)return;const k=new IntersectionObserver(n,{root:Zs(p),rootMargin:s,threshold:o});g.forEach(w=>w&&k.observe(w)),m=()=>{k.disconnect(),m=Js}},{immediate:a,flush:"post"}):Js,h=()=>{m(),f(),u.value=!1};return cx(h),{isSupported:c,isActive:u,pause(){m(),u.value=!1},resume(){u.value=!0},stop:h}}const gx={setup(){const e=t.ref(!1),n=t.ref(),{stop:r}=px(n,([{isIntersecting:i}])=>{i&&(e.value=!0,r())},{rootMargin:"600px"});return{targetEl:n,shouldRender:e}}},yx={ref:"targetEl"};function kx(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",yx,[i.shouldRender?t.renderSlot(e.$slots,"default",{key:0}):t.createCommentVNode("",!0)],512)}const ym=C(gx,[["render",kx]]),wx={props:{icon:{type:[Object,String],default(){return"fa-exclamation"}},type:{type:String,default:"info"}},computed:{classes(){var e=[];return e.push(`ux-info-${this.type}`),e}}},_x={class:"icon-circle"};function bx(e,n,r,i,s,o){const l=t.resolveComponent("ux-icon"),a=t.resolveComponent("flex-cell"),c=t.resolveComponent("flex-row");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["ux-info-box",o.classes])},[t.createVNode(c,{style:{gap:"1em"},center:""},{default:t.withCtx(()=>[r.icon?(t.openBlock(),t.createBlock(a,{key:0,shrink:""},{default:t.withCtx(()=>[t.createElementVNode("div",_x,[t.createVNode(l,{icon:r.icon},null,8,["icon"])])]),_:1})):t.createCommentVNode("",!0),t.createVNode(a,null,{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default",{},void 0,!0)]),_:3})]),_:3})],2)}const km=C(wx,[["render",bx],["__scopeId","data-v-9669e7c0"]]),xx={props:{id:{type:[Object,String]},initials:{type:[String,Object]},cacheKey:{type:[String,Number]}},data(){return{stringID:this.$sdk.utils.id(this.id)}},watch:{id(e){this.stringID=this.$sdk.utils.id(e)}},computed:{initialString(){var s,o,l;if(typeof this.initials=="string")return this.initials;const e=((s=this.initials)==null?void 0:s.firstName)||"",n=((o=this.initials)==null?void 0:o.lastName)||"",r=`${e} ${n}`.trim(),i=(l=this.initials)==null?void 0:l.title;return r||i},initialLetters(){const e=this.initialString||"";if(!e||!e.length)return"";const n=e.split(/\s+/);let r="";return n[0]&&(r+=String(n[0][0]||"").toUpperCase()),n[1]&&(r+=String(n[1][0]||"").toUpperCase()),r},url(){const e={};return this.cacheKey&&(e.cacheKey=this.cacheKey),this.$sdk.api.generateEndpointURL(`/image/${this.stringID}`,e,{file:!0})},style(){const e={};return e.backgroundImage=`url(${this.url})`,e}}},Cx={key:0,class:"initials"};function Vx(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["avatar-image",{"with-initials":o.initialLetters}])},[o.initialLetters?(t.openBlock(),t.createElementBlock("div",Cx,t.toDisplayString(o.initialLetters),1)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"avatar-img",style:t.normalizeStyle(o.style)},null,4)],2)}const Xs=C(xx,[["render",Vx],["__scopeId","data-v-f8d86e04"]]),Ex={props:{large:{type:Boolean}}};function Nx(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["ux-spinner",{large:r.large}])},[...n[0]||(n[0]=[t.createElementVNode("svg",{width:"24",height:"24",stroke:"#000",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("g",{class:"spinner_V8m1"},[t.createElementVNode("circle",{cx:"12",cy:"12",r:"9.5",fill:"none","stroke-width":"2"})])],-1)])],2)}const bn=C(Ex,[["render",Nx],["__scopeId","data-v-d9a57955"]]),Tx={components:{Spinner:bn},props:{to:{type:[Object,String]},icon:{type:Boolean},color:{type:String,default:"default"},bgColor:{type:String},fgColor:{type:String},tag:{type:String},href:{type:String},target:{type:String},loading:{type:Boolean},active:{type:Boolean},disabled:{type:Boolean},block:{type:Boolean},size:{type:String,default:"md"}},computed:{style(){var e={};return this.bgColor&&(e.backgroundColor=this.bgColor),this.fgColor&&(e.color=this.fgColor),e},classes(){var e=[];return e.push(`ux-btn-${this.size}`),this.block&&e.push("ux-btn-block"),this.loading&&e.push("ux-btn-loading"),this.active&&e.push("ux-btn-active"),this.icon&&e.push("ux-btn-icon"),e.push(`ux-btn-color-${this.color}`),this.disabled&&e.push("ux-btn-disabled"),e},element(){switch(this.tag){case"span":return this.tag;case"submit":return"button";default:return this.to||this.href?"ux-link":this.tag||"button"}}}},Sx={class:"ux-btn-text"};function Bx(e,n,r,i,s,o){const l=t.resolveComponent("spinner");return t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.element),{type:"button",active:r.active,loading:r.loading,to:r.to,href:r.href,target:r.target,style:t.normalizeStyle(o.style),class:t.normalizeClass([o.classes,"ux-btn"]),disabled:r.disabled},{default:t.withCtx(()=>[r.loading?(t.openBlock(),t.createBlock(l,{key:0})):t.createCommentVNode("",!0),t.createElementVNode("span",Sx,[t.renderSlot(e.$slots,"default",{},void 0,!0)])]),_:3},8,["active","loading","to","href","target","style","class","disabled"])}const wm=C(Tx,[["render",Bx],["__scopeId","data-v-ea56e98b"]]),Dx={},Ox={class:"ux-btn-group"};function Mx(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",Ox,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}const _m=C(Dx,[["render",Mx],["__scopeId","data-v-a0ecb730"]]),Fx={props:{value:{type:Boolean,default(){return!1}}},computed:{classes(){var e=[];return this.value?e.push("ux-checkbox-true"):e.push("ux-checkbox-false"),e}}};function Ix(e,n,r,i,s,o){const l=t.resolveComponent("ux-icon");return t.openBlock(),t.createElementBlock("button",{class:t.normalizeClass(["ux-checkbox",o.classes])},[t.createVNode(l,{class:"icon",icon:"fa-check"})],2)}const _o=C(Fx,[["render",Ix],["__scopeId","data-v-54bb07ba"]]),Ax={props:{value:{type:Boolean,default(){return!1}},loading:{type:Boolean,default(){return!1}}},computed:{classes(){var e=[];return this.value?e.push("ux-switch-true"):e.push("ux-switch-false"),this.loading&&e.push("ux-switch-loading"),e}}};function Lx(e,n,r,i,s,o){const l=t.resolveComponent("ux-icon");return t.openBlock(),t.createElementBlock("a",{class:t.normalizeClass(["ux-switch",o.classes])},[t.createElementVNode("span",null,[t.createVNode(l,{spin:"",icon:"fa-spinner"})])],2)}const Qs=C(Ax,[["render",Lx],["__scopeId","data-v-1a0e83ee"]]),Rx={props:{to:{type:[Object,String]},href:{type:String},target:{type:String},disabled:{type:Boolean},active:{type:Boolean}},methods:{clicked(e){var n=this;if(n.to&&(n.buildMode||n.nuxtMode))return e.preventDefault(),e.stopImmediatePropagation(),n.$sdk.app.to(n.to);if(n.href){if(n.buildMode){e.preventDefault(),window.open(n.href);return}if(n.nuxtMode){e.preventDefault(),e.stopImmediatePropagation();return}}}},computed:{actualHref(){if(this.href)return this.href;if(this.nuxtMode)return this.to?this.$sdk.app.createHref(this.to):void 0;if(this.to&&this.$router&&this.$router.resolve){const e=this.$router;this.$route;const n=!1,{location:r,route:i,href:s}=e.resolve(this.to,this.$route,n);return s}},nuxtMode(){return this.to&&this.$sdk.nuxt&&this.$sdk.app&&this.$sdk.app.createHref},buildMode(){return!!this.$sdk&&this.$sdk.app&&this.$sdk.app.builder},class(){var e=[];return this.disabled&&e.push("disabled"),this.active&&e.push("active"),(this.href||this.to)&&e.push("haslink"),e},element(){return this.nuxtMode||this.buildMode?"a":this.to?"router-link":"a"}}};function Px(e,n,r,i,s,o){return t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.element),{onClick:o.clicked,to:r.to,href:o.actualHref,target:r.target,class:t.normalizeClass([o.class,"ux-link"])},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default",{},void 0,!0)]),_:3},8,["onClick","to","href","target","class"])}const bm=C(Rx,[["render",Px],["__scopeId","data-v-7a924ee2"]]),Ux={props:{icon:{type:[Object,String]},spin:{type:Boolean},left:{type:Boolean},right:{type:Boolean},fixed:{type:Boolean}},computed:{useSvgLayout(){return!!this.$slots.default||!this.icon},modifierClasses(){var e=[];return this.spin&&e.push("fa-spin"),this.left&&e.push("ux-icon-left"),this.right&&e.push("ux-icon-right"),this.fixed&&e.push("ux-icon-fixed"),e},iconClasses(){return[this.icon,...this.modifierClasses]}}};function $x(e,n,r,i,s,o){return o.useSvgLayout?(t.openBlock(),t.createElementBlock("span",{key:0,class:t.normalizeClass(["ux-icon ux-icon-svg",o.modifierClasses])},[t.renderSlot(e.$slots,"default",{},void 0,!0)],2)):(t.openBlock(),t.createElementBlock("i",{key:1,class:t.normalizeClass(["ux-icon fa",o.iconClasses])},null,2))}const xm=C(Ux,[["render",$x],["__scopeId","data-v-d3c61976"]]),bo={cache:{}},zx={props:{group:{type:String},right:{type:Boolean,default:!1},bottom:{type:Boolean,default:!1},stop:{type:Boolean,default:!1},flex:{type:Boolean,default:!1},overflow:{type:Boolean},closeOnClick:{type:Boolean,default:!0},visible:{type:Boolean,default:!0},modelValue:{type:Boolean,default:!1}},data(){return{outerStyle:{},innerStyle:{},anchorRect:null,isExpanded:this.modelValue,isVisible:this.visible,triggerEvent:null,refMenu:null,mounted:!1,repositionFrame:null,resizeObserver:null}},watch:{modelValue(e){this.expanded=e},visible(e){this.isVisible=e}},mounted(){this.refMenu=this.$refs.menu,this.mounted=!0},beforeUnmount(){this.removeListeners(),this.refMenu=null,this.mounted=!1,bo.cache[this.group]===this&&(bo.cache[this.group]=null)},methods:{removeListeners(){document.removeEventListener("click",this.globalClick),window.removeEventListener("resize",this.scheduleReposition),window.removeEventListener("scroll",this.scheduleReposition,!0),this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),this.repositionFrame&&(cancelAnimationFrame(this.repositionFrame),this.repositionFrame=null),this.refMenu&&this.refMenu.removeEventListener("click",this.immediateClick)},addEventListeners(){document.addEventListener("click",this.globalClick),window.addEventListener("resize",this.scheduleReposition),window.addEventListener("scroll",this.scheduleReposition,!0),this.$nextTick(()=>{const e=this.$refs.menu;!e||!this.isExpanded||typeof ResizeObserver>"u"||(this.resizeObserver=new ResizeObserver(this.scheduleReposition),this.resizeObserver.observe(e))}),this.refMenu&&this.refMenu.addEventListener("click",this.immediateClick)},scheduleReposition(){this.repositionFrame||(this.repositionFrame=requestAnimationFrame(()=>{this.repositionFrame=null,this.isExpanded&&this.position()}))},immediateClick(e){this.expanded&&this.closeOnClick&&(e.stopImmediatePropagation(),this.expanded=!1)},globalClick(e){if(this.triggerEvent===e)return;var n=this.$refs.menu,r=e.target||e.srcElement;if(r&&r.isConnected===!1)return;if(n&&n.contains(r)){this.closeOnClick&&(this.expanded=!1);return}const i=r.closest&&r.closest(".ux-menu-outer, .modal-wrapper");i&&!i.contains(this.$el)||(this.expanded=!1)},position(){const e=this.anchorRect||this.$el.getBoundingClientRect();let n=e.left+window.scrollX,r=e.bottom+window.scrollY;this.outerStyle.left=`${n}px`,this.outerStyle.top=`${r}px`,this.innerStyle={},this.right&&!this.anchorRect&&(this.innerStyle.right=`-${e.width}px`),this.bottom&&!this.anchorRect&&(this.innerStyle.bottom=`${e.height}px`);var i=this.getMaxZIndex();this.outerStyle.zIndex=i,this.$nextTick(()=>{this.adjustForViewportBoundaries(e)})},adjustForViewportBoundaries(e){const n=this.$refs.menu;if(!n)return;const r=n.getBoundingClientRect(),i={height:window.innerHeight},s=r.bottom>i.height,o=e.top,l=i.height-e.bottom;s&&o>l&&!this.anchorRect?(this.innerStyle={...this.innerStyle,bottom:`${e.height}px`},this.$nextTick(()=>this.ensureWithinViewport())):this.ensureWithinViewport()},ensureWithinViewport(){const e=this.$refs.menu;if(!e)return;const n=e.getBoundingClientRect(),r={width:window.innerWidth,height:window.innerHeight};let i=parseInt(this.outerStyle.left)||0,s=parseInt(this.outerStyle.top)||0;n.right>r.width&&(i-=n.right-r.width+10),n.left<0&&(i+=Math.abs(n.left)+10),n.bottom>r.height&&(s-=n.bottom-r.height+10),n.top<0&&(s+=Math.abs(n.top)+10),this.outerStyle.left=`${Math.max(0,i)}px`,this.outerStyle.top=`${Math.max(0,s)}px`},getMaxZIndex(){return Math.max(...Array.from(document.querySelectorAll("body *"),e=>parseFloat(window.getComputedStyle(e).zIndex)).filter(e=>!Number.isNaN(e)),0)},close(){this.expanded=!1},openAt(e,n){this.anchorRect={left:e,right:e,top:n,bottom:n,width:0,height:0},this.isExpanded?this.position():this.expanded=!0}},computed:{expanded:{get(){return this.isExpanded},set(e){var n;this.group&&(n=bo.cache[this.group]),this.isExpanded!=e&&(this.isExpanded=e,e?(this.position(),this.addEventListeners(),bo.cache[this.group]=this,n&&n!=this&&(n.expanded=!1)):(this.removeListeners(),this.anchorRect=null),this.$emit("update:modelValue",e))}},on(){var e=this;return{click(n){e.stop&&n.stopImmediatePropagation(),e.triggerEvent=n,e.expanded=!e.expanded}}}}};function jx(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["ux-menu",{right:r.right}])},[t.createElementVNode("span",null,[t.renderSlot(e.$slots,"activator",{on:o.on},void 0,!0)]),(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[t.createVNode(t.Transition,{name:"ux-menu-transition",appear:""},{default:t.withCtx(()=>[s.isExpanded?t.withDirectives((t.openBlock(),t.createElementBlock("div",{key:0,class:"ux-menu-outer",style:t.normalizeStyle(s.outerStyle)},[t.createElementVNode("div",{class:t.normalizeClass(["ux-menu-panel",{flex:r.flex,overflow:r.overflow}]),ref:"menu",style:t.normalizeStyle(s.innerStyle)},[t.renderSlot(e.$slots,"default",{},void 0,!0)],6)],4)),[[t.vShow,s.isVisible]]):t.createCommentVNode("",!0)]),_:3})]))],2)}const Cm=C(zx,[["render",jx],["__scopeId","data-v-54043858"]]),qx={name:"menulist",props:{items:{type:Array,default(){return[]}},depth:{type:Number,default:0},expandOn:{type:String,default:"none"},isolate:{type:Boolean,default:!0},collapseOnRouteChange:{type:Boolean,default:!0},displayCaret:{type:Boolean,default:!0}},mounted(){this.mounted=!0,this.addRouteChangeListeners()},beforeUnmount(){this.mounted=!1,this.removeRouteChangeListeners(),this.removeListeners()},computed:{actualDepth(){const e=this.depth;return isNaN(e)||!parseInt(e)?0:Math.max(e,0)},filteredItems(){const e=this;let n=e.tree.filter(function(r){return!(r.advancedOptions&&e.$sdk.utils.checkContextVisibility&&!e.$sdk.utils.checkContextVisibility(r.contextVisibility)||r.disabled)});return this.actualDepth===1&&(n=n.map(function(r){return{...r,items:[]}})),n}},data(){return{currentExpandedItems:[],tree:JSON.parse(JSON.stringify(this.items))}},methods:{globalClick(e){this.collapseAll()},routeChanged(){this.collapseOnRouteChange&&this.collapseAll()},addRouteChangeListeners(){this.$sdk.addEventListener("route:change",this.routeChanged)},removeRouteChangeListeners(){this.$sdk.removeEventListener("route:change",this.routeChanged)},addListeners(){var n;const e=(n=this.$el)==null?void 0:n.ownerDocument;e&&e.body.addEventListener("click",this.globalClick)},removeListeners(){var n;const e=(n=this.$el)==null?void 0:n.ownerDocument;e&&e.body.removeEventListener("click",this.globalClick)},expandItem(e){e.expanded=!0,this.currentExpandedItems.push(e)},collapseItem(e){const n=this.currentExpandedItems.indexOf(e);n!==-1&&(e.expanded=!1,this.currentExpandedItems.splice(n,1))},collapseAll(){this.currentExpandedItems.forEach(function(e){e.expanded=!1}),this.currentExpandedItems=[],this.currentExpandedItems.length?this.addListeners():this.removeListeners()},toggle(e){const n=e.expanded;this.isolate&&(this.currentExpandedItems.forEach(function(i){i.expanded=!1}),this.currentExpandedItems=[]);const r=this.currentExpandedItems.indexOf(e);n||r!==-1?this.collapseItem(e):this.expandItem(e),this.currentExpandedItems.length?this.addListeners():this.removeListeners()}},watch:{items:{handler(e){this.tree=JSON.parse(JSON.stringify(e))},deep:!0}}};function Hx(e,n,r,i,s,o){const l=t.resolveComponent("flex-cell"),a=t.resolveComponent("ux-icon"),c=t.resolveComponent("flex-row"),d=t.resolveComponent("ux-link"),m=t.resolveComponent("menulist",!0);return t.openBlock(),t.createElementBlock("ul",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.filteredItems,u=>{var f;return t.openBlock(),t.createElementBlock("li",{class:t.normalizeClass({expanded:u.expanded,collapsed:!u.expanded}),key:u.title},[r.expandOn==="click"&&((f=u.items)!=null&&f.length)?(t.openBlock(),t.createBlock(d,{key:0,onClick:t.withModifiers(h=>o.toggle(u),["stop","prevent"]),class:t.normalizeClass(u.class)},{default:t.withCtx(()=>[t.createVNode(c,{center:""},{default:t.withCtx(()=>[t.createVNode(l,null,{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(u.title),1)]),_:2},1024),r.displayCaret?(t.openBlock(),t.createBlock(l,{key:0,shrink:""},{default:t.withCtx(()=>[t.createVNode(a,{class:"caret",icon:"fa-angle-down"})]),_:1})):t.createCommentVNode("",!0)]),_:2},1024)]),_:2},1032,["onClick","class"])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[u.type==="url"?(t.openBlock(),t.createBlock(d,{key:0,class:t.normalizeClass(u.class),target:u.target,href:u.href||u.url},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(u.title),1)]),_:2},1032,["class","target","href"])):u.type==="route"?(t.openBlock(),t.createBlock(d,{key:1,class:t.normalizeClass(u.class),to:{name:u.route}},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(u.title),1)]),_:2},1032,["class","to"])):t.createCommentVNode("",!0)],64)),u.items&&u.items.length?(t.openBlock(),t.createBlock(m,{key:2,expandOn:r.expandOn,items:u.items,displayCaret:r.displayCaret,isolate:r.isolate,depth:o.actualDepth-1},null,8,["expandOn","items","displayCaret","isolate","depth"])):t.createCommentVNode("",!0)],2)}),128))])}const Vm=C(qx,[["render",Hx],["__scopeId","data-v-601e888e"]]),Wx={props:{item:{type:[Object,String]},alt:{type:String},width:{type:[Number,String]},height:{type:[Number,String]},auto:{type:Boolean,default:!0},inline:{type:Boolean},quality:{type:[Number,String]},contain:{type:Boolean,default:!0},preview:{type:Boolean,default:!1},crop:{type:Boolean},cover:{type:Boolean},format:{type:String},upscale:{type:Boolean,default:!0},type:{type:String,default:"image"},svg:{type:Boolean},lazy:{type:Boolean},eager:{type:Boolean}},data(){return{model:this.item,retries:0,cacheBuster:0,retryTimer:null}},watch:{item(e){this.model=e}},beforeMount(){this.$sdk.auth.ensureValidToken()},mounted(){const e=this.$refs.img;e&&e.addEventListener("error",this.imageLoadError)},beforeUnmount(){const e=this.$refs.img;e&&e.removeEventListener("error",this.imageLoadError)},methods:{imageLoadError(e){const n=this;n.retryTimer&&(clearTimeout(n.retryTimer),n.retryTimer=!1),n.retryTimer=setTimeout(function(){n.retries<5&&(n.cacheBuster++,n.retries++)},500)}},computed:{actualFormat(){var r,i;const e=((r=this.item)==null?void 0:r.fileMime)==="image/heic",n=((i=this.item)==null?void 0:i.fileExtension)==="heic";return e||n?"png":this.format},loading(){if(this.lazy)return"lazy";if(this.eager)return"eager"},altText(){var e;return this.alt||((e=this.model)==null?void 0:e.title)},className(){var e=[];return this.portrait&&e.push("img-portrait"),e.join(" ")},isSvg(){var e;if(this.svg)return!0;switch((e=this.item)==null?void 0:e.fileMime){case"image/svg+xml":case"image/svg":return!0}},portrait(){return this.crop?this.dimensionHeight>this.dimensionWidth:this.modelHeight>this.modelWidth},manualWidth(){return parseInt(this.width)},manualHeight(){return parseInt(this.height)},modelWidth(){var e;return parseInt((e=this.model)==null?void 0:e.width)},modelHeight(){var e;return parseInt((e=this.model)==null?void 0:e.height)},id(){return this.$sdk.utils.id(this.model)},params(){var n,r,i,s;var e={};if(e.access_token=this.$sdk.auth.getCurrentToken(),e.cb=this.cacheBuster,this.manualWidth&&(e.w=this.manualWidth?this.manualWidth:void 0),this.manualHeight&&(e.h=this.manualHeight?this.manualHeight:void 0),this.upscale&&(e.u=!0),this.auto&&!e.w&&!e.h){const o=(s=(i=(r=(n=this.$sdk.app)==null?void 0:n.device)==null?void 0:r.image)==null?void 0:i.auto)==null?void 0:s.med;o&&(e.w=o,e.u=!1)}return this.crop?e.c=!0:this.contain||(e.c=!!parseInt(this.manualWidth)&&!!parseInt(this.manualHeight)),this.quality&&(e.q=parseInt(this.quality)),this.actualFormat&&(e.f=this.actualFormat),e},src(){return this.$sdk.api.generateEndpointURL(`/image/${this.id}`,this.params,{file:!0})},previewSrc(){var e=Object.assign({},this.params);return e.w=50,delete e.h,this.$sdk.api.generateEndpointURL(`/image/${this.id}`,e,{file:!0})},imageStyle(){var e={};return this.crop||(e["object-fit"]="contain"),this.cover&&(e["object-fit"]="cover"),this.inline?e.maxWidth="100%":(e.width="100%",e.height="100%",e.top="0",e.left="0",e.position="absolute"),e},dimensionWidth(){if(this.manualHeight&&this.manualWidth)return this.manualWidth;if(this.modelWidth&&this.modelHeight)return this.modelWidth},dimensionHeight(){if(this.manualHeight&&this.manualWidth)return this.manualHeight;if(this.modelWidth&&this.modelHeight)return this.modelHeight},style(){var r,i,s;var e={};this.inline?e.display="inline-block":this.dimensionHeight&&this.dimensionWidth&&(e.height=0,e.overflow="hidden",e.paddingBottom=`${this.dimensionHeight/this.dimensionWidth*100}%`,e.position="relative");var n=(s=(i=(r=this.model)==null?void 0:r.fileMeta)==null?void 0:i.colors)==null?void 0:s.colors;return n&&n.length&&(e.backgroundColor=n[0]),this.isSvg||this.preview&&(e.backgroundImage=`url(${this.previewSrc})`),e}}},Gx=["alt","data"],Yx=["loading","alt","src"];function Kx(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["ux-image",o.className]),style:t.normalizeStyle(o.style)},[r.svg?(t.openBlock(),t.createElementBlock("object",{key:0,alt:o.altText,type:"image/svg+xml",data:o.src},null,8,Gx)):(t.openBlock(),t.createElementBlock("img",{key:1,ref:"img",loading:o.loading,alt:o.altText,style:t.normalizeStyle(o.imageStyle),src:o.src},null,12,Yx))],6)}const Em=C(Wx,[["render",Kx],["__scopeId","data-v-ba449734"]]),Jx={props:{item:{type:[Object,String]},width:{type:[Number,String]},height:{type:[Number,String]},controls:{type:Boolean,default:!0},controlslist:{type:String},autoplay:{type:Boolean,default:!1},playsinline:{type:Boolean,default:!1},loop:{type:Boolean,default:!1},muted:{type:Boolean,default:!1}},data(){return{model:this.item,isMuted:this.muted||this.autoplay,playsInline:this.playsinline||this.autoplay}},watch:{playsinline(e){this.playsInline=e},muted(e){this.isMuted=e}},beforeMount(){this.$sdk.auth.ensureValidToken()},computed:{padHeight(){return this.actualHeight&&this.actualWidth?`${this.actualHeight/this.actualWidth*100}%`:void 0},youtubeSrc(){return`https://www.youtube.com/embed/${this.mediaID}`},title(){var e;return(e=this.model)==null?void 0:e.title},mediaID(){var e;return(e=this.model)==null?void 0:e.mediaIntegrationID},mediaType(){var e;return((e=this.model)==null?void 0:e.mediaIntegrationType)||"upload"},mimetype(){var e;return((e=this.model)==null?void 0:e.fileMime)||"video/mp4"},actualWidth(){return parseInt(this.width)||this.modelWidth||1920},actualHeight(){return parseInt(this.height)||this.modelHeight||1080},className(){var e=[];return this.portrait&&e.push("video-portrait"),e.push(`video-type-${this.mediaType}`),e.join(" ")},portrait(){return this.actualHeight>this.actualWidth},modelWidth(){var e;return parseInt(((e=this.model)==null?void 0:e.width)||0)},modelHeight(){var e;return parseInt(((e=this.model)==null?void 0:e.height)||0)},id(){return this.$sdk.utils.id(this.model)},params(){var e={};return e.access_token=this.$sdk.auth.getCurrentToken(),e},src(){return this.$sdk.api.generateEndpointURL(`/video/${this.id}`,this.params,{file:!0})},thumbnailSrc(){var e=Object.assign({},this.params);return e.w=this.actualWidth,e.h=this.actualHeight,delete e.h,this.$sdk.api.generateEndpointURL(`/image/${this.id}/poster.png`,e,{file:!0})},embedStyle(){var e={};return this.padHeight&&(e.height=0,e.paddingBottom=this.padHeight,e.overflow="hidden",e.position="relative"),e}}},Zx=["poster","playsinline","muted","loop","autoplay","width","height","controls","controlslist"],Xx=["src","type"],Qx=["width","height","src","title"];function vx(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["ux-video",o.className])},[o.mediaType==="upload"?(t.openBlock(),t.createElementBlock("div",{key:0,class:"ux-video-embed ux-video-embed-upload",style:t.normalizeStyle(o.embedStyle)},[t.createElementVNode("video",{poster:o.thumbnailSrc,playsinline:s.playsInline,muted:s.isMuted,loop:r.loop,autoplay:r.autoplay,width:o.actualWidth,height:o.actualHeight,controls:r.controls,controlslist:r.controlslist},[t.createElementVNode("source",{src:o.src,type:o.mimetype},null,8,Xx),n[0]||(n[0]=t.createTextVNode(" Your browser does not support the video tag. ",-1))],8,Zx)],4)):t.createCommentVNode("",!0),o.mediaType==="youtube"?(t.openBlock(),t.createElementBlock("div",{key:1,class:"ux-video-embed ux-video-embed-youtube",style:t.normalizeStyle(o.embedStyle)},[t.createElementVNode("iframe",{width:o.actualWidth,height:o.actualHeight,src:o.youtubeSrc,title:o.title,frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowfullscreen:""},null,8,Qx)],4)):t.createCommentVNode("",!0)],2)}const Nm=C(Jx,[["render",vx],["__scopeId","data-v-8f908e0a"]]),eC={props:{value:{type:Number},active:{type:Boolean}},computed:{classes(){var e=[];return e.push(this.icon),this.spin&&e.push("fa-spin"),this.left&&e.push("ux-icon-left"),this.right&&e.push("ux-icon-right"),e},percent(){return this.value},barStyle(){return{width:`${this.percent}%`}},element(){return"i"}}},tC={class:"ux-progress"};function nC(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",tC,[t.createElementVNode("div",{class:t.normalizeClass(["ux-progress-bg",{active:r.active}])},null,2),t.createElementVNode("div",{class:"ux-progress-fg",style:t.normalizeStyle(o.barStyle)},null,4)])}const vs=C(eC,[["render",nC],["__scopeId","data-v-6e492d1a"]]),rC={props:{value:{},tag:{type:String,default:"span"},clickable:{type:Boolean},deleteable:{type:Boolean},icon:{type:String}},computed:{avatar(){var s;const e=(s=this.value)==null?void 0:s._id;if(!e)return;const n=e.slice(8,10)==="24",r=e.slice(8,10)==="70",i=e.slice(8,10)==="71";if(n||r||i)return e},elementType(){return this.tag||"span"},title(){var e,n,r,i,s,o,l,a;return[(e=this.value)==null?void 0:e.title,(n=this.value)==null?void 0:n.name,(r=this.value)!=null&&r.firstName&&((i=this.value)!=null&&i.lastName)?`${(s=this.value)==null?void 0:s.firstName} ${(o=this.value)==null?void 0:o.lastName}`:(l=this.value)==null?void 0:l.firstName,(a=this.value)==null?void 0:a.firstName,this.value].filter(Boolean)[0]},subtitle(){var e;if((e=this.value)!=null&&e.startDate)return this.$sdk.date?this.$sdk.date.readableEventDate(this.value):void 0},hasLink(){return this.tag==="a"||this.clickable},style(){var r,i;const e=(r=this.value)==null?void 0:r.color,n=(i=this.value)==null?void 0:i.bgColor;if(e||n)return{color:e,backgroundColor:n}}}},oC={key:0,class:"pill-avatar"},iC={class:"font-sm font-muted"};function sC(e,n,r,i,s,o){const l=t.resolveComponent("ux-avatar"),a=t.resolveComponent("ux-icon"),c=t.resolveComponent("flex-cell"),d=t.resolveComponent("flex-row");return t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.elementType),{class:t.normalizeClass(["ux-pill",{"has-link":o.hasLink}]),style:t.normalizeStyle(o.style)},{default:t.withCtx(()=>[t.createVNode(d,{gap:"",center:""},{default:t.withCtx(()=>[t.createVNode(c,null,{default:t.withCtx(()=>[o.avatar?(t.openBlock(),t.createElementBlock("div",oC,[t.createVNode(l,{id:o.avatar,initials:o.title},null,8,["id","initials"])])):t.createCommentVNode("",!0),o.subtitle?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[r.icon?(t.openBlock(),t.createBlock(a,{key:0,icon:r.icon,left:""},null,8,["icon"])):t.createCommentVNode("",!0),t.createTextVNode(t.toDisplayString(o.title),1),t.createElementVNode("span",iC," • "+t.toDisplayString(o.subtitle),1)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[r.icon?(t.openBlock(),t.createBlock(a,{key:0,icon:r.icon,left:""},null,8,["icon"])):t.createCommentVNode("",!0),t.createTextVNode(t.toDisplayString(o.title),1)],64))]),_:1}),r.deleteable?(t.openBlock(),t.createBlock(c,{key:0,shrink:""},{default:t.withCtx(()=>[t.createVNode(a,{icon:"fa-times"})]),_:1})):t.createCommentVNode("",!0)]),_:1})]),_:1},8,["class","style"])}const Tm=C(rC,[["render",sC],["__scopeId","data-v-709f24b0"]]),lC={},aC={class:"ux-list"};function cC(e,n){return t.openBlock(),t.createElementBlock("ul",aC,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}const Sm=C(lC,[["render",cC],["__scopeId","data-v-670de630"]]),dC={props:{to:{type:[Object,String]},href:{type:String},target:{type:String},disabled:{type:Boolean}},computed:{element(){return this.to||this.href?"ux-link":"div"}}};function uC(e,n,r,i,s,o){return t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.element),{class:"ux-list-item",to:r.to,href:r.href,target:r.target,disabled:r.disabled},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default",{},void 0,!0)]),_:3},8,["to","href","target","disabled"])}const Bm=C(dC,[["render",uC],["__scopeId","data-v-a5de8929"]]);var se;(function(e){e[e.AM=0]="AM",e[e.PM=1]="PM"})(se||(se={}));var ye;(function(e){e[e.SUNDAY=0]="SUNDAY",e[e.MONDAY=1]="MONDAY",e[e.TUESDAY=2]="TUESDAY",e[e.WEDNESDAY=3]="WEDNESDAY",e[e.THURSDAY=4]="THURSDAY",e[e.FRIDAY=5]="FRIDAY",e[e.SATURDAY=6]="SATURDAY"})(ye||(ye={}));var ft;(function(e){e[e.JANUARY=1]="JANUARY",e[e.FEBRUARY=2]="FEBRUARY",e[e.MARCH=3]="MARCH",e[e.APRIL=4]="APRIL",e[e.MAY=5]="MAY",e[e.JUNE=6]="JUNE",e[e.JULY=7]="JULY",e[e.AUGUST=8]="AUGUST",e[e.SEPTEMBER=9]="SEPTEMBER",e[e.OCTOBER=10]="OCTOBER",e[e.NOVEMBER=11]="NOVEMBER",e[e.DECEMBER=12]="DECEMBER"})(ft||(ft={}));function xn(e,n){e.assign("day",n.getDate()),e.assign("month",n.getMonth()+1),e.assign("year",n.getFullYear())}function Dm(e,n){e.assign("hour",n.getHours()),e.assign("minute",n.getMinutes()),e.assign("second",n.getSeconds()),e.assign("millisecond",n.getMilliseconds()),e.assign("meridiem",n.getHours()<12?se.AM:se.PM)}function Gn(e,n){e.imply("day",n.getDate()),e.imply("month",n.getMonth()+1),e.imply("year",n.getFullYear())}function el(e,n){e.imply("hour",n.getHours()),e.imply("minute",n.getMinutes()),e.imply("second",n.getSeconds()),e.imply("millisecond",n.getMilliseconds()),e.imply("meridiem",n.getHours()<12?se.AM:se.PM)}const mC={ACDT:630,ACST:570,ADT:-180,AEDT:660,AEST:600,AFT:270,AKDT:-480,AKST:-540,ALMT:360,AMST:-180,AMT:-240,ANAST:720,ANAT:720,AQTT:300,ART:-180,AST:-240,AWDT:540,AWST:480,AZOST:0,AZOT:-60,AZST:300,AZT:240,BNT:480,BOT:-240,BRST:-120,BRT:-180,BST:60,BTT:360,CAST:480,CAT:120,CCT:390,CDT:-300,CEST:120,CET:{timezoneOffsetDuringDst:2*60,timezoneOffsetNonDst:60,dstStart:e=>Om(e,ft.MARCH,ye.SUNDAY,2),dstEnd:e=>Om(e,ft.OCTOBER,ye.SUNDAY,3)},CHADT:825,CHAST:765,CKT:-600,CLST:-180,CLT:-240,COT:-300,CST:-360,CT:{timezoneOffsetDuringDst:-5*60,timezoneOffsetNonDst:-6*60,dstStart:e=>tn(e,ft.MARCH,ye.SUNDAY,2,2),dstEnd:e=>tn(e,ft.NOVEMBER,ye.SUNDAY,1,2)},CVT:-60,CXT:420,ChST:600,DAVT:420,EASST:-300,EAST:-360,EAT:180,ECT:-300,EDT:-240,EEST:180,EET:120,EGST:0,EGT:-60,EST:-300,ET:{timezoneOffsetDuringDst:-4*60,timezoneOffsetNonDst:-5*60,dstStart:e=>tn(e,ft.MARCH,ye.SUNDAY,2,2),dstEnd:e=>tn(e,ft.NOVEMBER,ye.SUNDAY,1,2)},FJST:780,FJT:720,FKST:-180,FKT:-240,FNT:-120,GALT:-360,GAMT:-540,GET:240,GFT:-180,GILT:720,GMT:0,GST:240,GYT:-240,HAA:-180,HAC:-300,HADT:-540,HAE:-240,HAP:-420,HAR:-360,HAST:-600,HAT:-90,HAY:-480,HKT:480,HLV:-210,HNA:-240,HNC:-360,HNE:-300,HNP:-480,HNR:-420,HNT:-150,HNY:-540,HOVT:420,ICT:420,IDT:180,IOT:360,IRDT:270,IRKST:540,IRKT:540,IRST:210,IST:330,JST:540,KGT:360,KRAST:480,KRAT:480,KST:540,KUYT:240,LHDT:660,LHST:630,LINT:840,MAGST:720,MAGT:720,MART:-510,MAWT:300,MDT:-360,MESZ:120,MEZ:60,MHT:720,MMT:390,MSD:240,MSK:180,MST:-420,MT:{timezoneOffsetDuringDst:-6*60,timezoneOffsetNonDst:-7*60,dstStart:e=>tn(e,ft.MARCH,ye.SUNDAY,2,2),dstEnd:e=>tn(e,ft.NOVEMBER,ye.SUNDAY,1,2)},MUT:240,MVT:300,MYT:480,NCT:660,NDT:-90,NFT:690,NOVST:420,NOVT:360,NPT:345,NST:-150,NUT:-660,NZDT:780,NZST:720,OMSST:420,OMST:420,PDT:-420,PET:-300,PETST:720,PETT:720,PGT:600,PHOT:780,PHT:480,PKT:300,PMDT:-120,PMST:-180,PONT:660,PST:-480,PT:{timezoneOffsetDuringDst:-7*60,timezoneOffsetNonDst:-8*60,dstStart:e=>tn(e,ft.MARCH,ye.SUNDAY,2,2),dstEnd:e=>tn(e,ft.NOVEMBER,ye.SUNDAY,1,2)},PWT:540,PYST:-180,PYT:-240,RET:240,SAMT:240,SAST:120,SBT:660,SCT:240,SGT:480,SRT:-180,SST:-660,TAHT:-600,TFT:300,TJT:300,TKT:780,TLT:540,TMT:300,TVT:720,ULAT:480,UTC:0,UYST:-120,UYT:-180,UZT:300,VET:-210,VLAST:660,VLAT:660,VUT:660,WAST:120,WAT:60,WEST:60,WESZ:60,WET:0,WEZ:0,WFT:720,WGST:-120,WGT:-180,WIB:420,WIT:540,WITA:480,WST:780,WT:0,YAKST:600,YAKT:600,YAPT:600,YEKST:360,YEKT:360};function tn(e,n,r,i,s=0){let o=0,l=0;for(;l<i;)o++,new Date(e,n-1,o).getDay()===r&&l++;return new Date(e,n-1,o,s)}function Om(e,n,r,i=0){const s=r===0?7:r,o=new Date(e,n-1+1,1,12),l=o.getDay()===0?7:o.getDay();let a;return l===s?a=7:l<s?a=7+l-s:a=l-s,o.setDate(o.getDate()-a),new Date(e,n-1,o.getDate(),i)}function Mm(e,n,r={}){if(e==null)return null;if(typeof e=="number")return e;const i=r[e]??mC[e];return i==null?null:typeof i=="number"?i:n==null?null:n>i.dstStart(n.getFullYear())&&!(n>i.dstEnd(n.getFullYear()))?i.timezoneOffsetDuringDst:i.timezoneOffsetNonDst}const fC={day:0,second:0,millisecond:0};function Ke(e,n){let r=new Date(e);if(n.y&&(n.year=n.y,delete n.y),n.mo&&(n.month=n.mo,delete n.mo),n.M&&(n.month=n.M,delete n.M),n.w&&(n.week=n.w,delete n.w),n.d&&(n.day=n.d,delete n.d),n.h&&(n.hour=n.h,delete n.h),n.m&&(n.minute=n.m,delete n.m),n.s&&(n.second=n.s,delete n.s),n.ms&&(n.millisecond=n.ms,delete n.ms),"year"in n){const i=Math.floor(n.year);r.setFullYear(r.getFullYear()+i);const s=n.year-i;s>0&&(n.month=(n==null?void 0:n.month)??0,n.month+=s*12)}if("quarter"in n){const i=Math.floor(n.quarter);r.setMonth(r.getMonth()+i*3)}if("month"in n){const i=Math.floor(n.month);r.setMonth(r.getMonth()+i);const s=n.month-i;s>0&&(n.week=(n==null?void 0:n.week)??0,n.week+=s*4)}if("week"in n){const i=Math.floor(n.week);r.setDate(r.getDate()+i*7);const s=n.week-i;s>0&&(n.day=(n==null?void 0:n.day)??0,n.day+=Math.round(s*7))}if("day"in n){const i=Math.floor(n.day);r.setDate(r.getDate()+i);const s=n.day-i;s>0&&(n.hour=(n==null?void 0:n.hour)??0,n.hour+=Math.round(s*24))}if("hour"in n){const i=Math.floor(n.hour);r.setHours(r.getHours()+i);const s=n.hour-i;s>0&&(n.minute=(n==null?void 0:n.minute)??0,n.minute+=Math.round(s*60))}if("minute"in n){const i=Math.floor(n.minute);r.setMinutes(r.getMinutes()+i);const s=n.minute-i;s>0&&(n.second=(n==null?void 0:n.second)??0,n.second+=Math.round(s*60))}if("second"in n){const i=Math.floor(n.second);r.setSeconds(r.getSeconds()+i);const s=n.second-i;s>0&&(n.millisecond=(n==null?void 0:n.millisecond)??0,n.millisecond+=Math.round(s*1e3))}if("millisecond"in n){const i=Math.floor(n.millisecond);r.setMilliseconds(r.getMilliseconds()+i)}return r}function xo(e){const n={};for(const r in e)n[r]=-e[r];return n}class nn{constructor(n,r){X(this,"instant");X(this,"timezoneOffset");this.instant=n??new Date,this.timezoneOffset=r??null}static fromDate(n){return new nn(n)}static fromInput(n,r){if(n instanceof Date)return nn.fromDate(n);const i=(n==null?void 0:n.instant)??new Date,s=Mm(n==null?void 0:n.timezone,i,r);return new nn(i,s)}getDateWithAdjustedTimezone(){const n=new Date(this.instant);return this.timezoneOffset!==null&&n.setMinutes(n.getMinutes()-this.getSystemTimezoneAdjustmentMinute(this.instant)),n}getSystemTimezoneAdjustmentMinute(n,r){(!n||n.getTime()<0)&&(n=new Date);const i=-n.getTimezoneOffset(),s=r??this.timezoneOffset??i;return i-s}getTimezoneOffset(){return this.timezoneOffset??-this.instant.getTimezoneOffset()}}class pe{constructor(n,r){X(this,"knownValues");X(this,"impliedValues");X(this,"reference");X(this,"_tags",new Set);if(this.reference=n,this.knownValues={},this.impliedValues={},r)for(const s in r)this.knownValues[s]=r[s];const i=n.getDateWithAdjustedTimezone();this.imply("day",i.getDate()),this.imply("month",i.getMonth()+1),this.imply("year",i.getFullYear()),this.imply("hour",12),this.imply("minute",0),this.imply("second",0),this.imply("millisecond",0)}static createRelativeFromReference(n,r=fC){let i=Ke(n.getDateWithAdjustedTimezone(),r);const s=new pe(n);return s.addTag("result/relativeDate"),"hour"in r||"minute"in r||"second"in r||"millisecond"in r?(s.addTag("result/relativeDateAndTime"),Dm(s,i),xn(s,i),s.assign("timezoneOffset",n.getTimezoneOffset())):(el(s,i),s.imply("timezoneOffset",n.getTimezoneOffset()),"day"in r?(s.assign("day",i.getDate()),s.assign("month",i.getMonth()+1),s.assign("year",i.getFullYear()),s.assign("weekday",i.getDay())):"week"in r?(s.assign("day",i.getDate()),s.assign("month",i.getMonth()+1),s.assign("year",i.getFullYear()),s.imply("weekday",i.getDay())):(s.imply("day",i.getDate()),"month"in r?(s.assign("month",i.getMonth()+1),s.assign("year",i.getFullYear())):(s.imply("month",i.getMonth()+1),"year"in r?s.assign("year",i.getFullYear()):s.imply("year",i.getFullYear())))),s}get(n){return n in this.knownValues?this.knownValues[n]:n in this.impliedValues?this.impliedValues[n]:null}isCertain(n){return n in this.knownValues}getCertainComponents(){return Object.keys(this.knownValues)}imply(n,r){return n in this.knownValues?this:(this.impliedValues[n]=r,this)}assign(n,r){return this.knownValues[n]=r,delete this.impliedValues[n],this}addDurationAsImplied(n){const r=this.dateWithoutTimezoneAdjustment(),i=Ke(r,n);return("day"in n||"week"in n||"month"in n||"year"in n)&&(this.delete(["day","weekday","month","year"]),this.imply("day",i.getDate()),this.imply("weekday",i.getDay()),this.imply("month",i.getMonth()+1),this.imply("year",i.getFullYear())),("second"in n||"minute"in n||"hour"in n)&&(this.delete(["second","minute","hour"]),this.imply("second",i.getSeconds()),this.imply("minute",i.getMinutes()),this.imply("hour",i.getHours())),this}delete(n){typeof n=="string"&&(n=[n]);for(const r of n)delete this.knownValues[r],delete this.impliedValues[r]}clone(){const n=new pe(this.reference);n.knownValues={},n.impliedValues={};for(const r in this.knownValues)n.knownValues[r]=this.knownValues[r];for(const r in this.impliedValues)n.impliedValues[r]=this.impliedValues[r];return n}isOnlyDate(){return!this.isCertain("hour")&&!this.isCertain("minute")&&!this.isCertain("second")}isOnlyTime(){return!this.isCertain("weekday")&&!this.isCertain("day")&&!this.isCertain("month")&&!this.isCertain("year")}isOnlyWeekdayComponent(){return this.isCertain("weekday")&&!this.isCertain("day")&&!this.isCertain("month")}isDateWithUnknownYear(){return this.isCertain("month")&&!this.isCertain("year")}isValidDate(){const n=this.dateWithoutTimezoneAdjustment();return!(n.getFullYear()!==this.get("year")||n.getMonth()!==this.get("month")-1||n.getDate()!==this.get("day")||this.get("hour")!=null&&n.getHours()!=this.get("hour")||this.get("minute")!=null&&n.getMinutes()!=this.get("minute"))}toString(){return`[ParsingComponents {
|
|
1
|
+
(function(D,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("@qikdev/sdk")):typeof define=="function"&&define.amd?define(["exports","vue","@qikdev/sdk"],t):(D=typeof globalThis<"u"?globalThis:D||self,t(D["@qikdev/vue-ui"]={},D.Vue,D.sdk))})(this,function(D,t,pn){"use strict";var s4=Object.defineProperty;var l4=(D,t,pn)=>t in D?s4(D,t,{enumerable:!0,configurable:!0,writable:!0,value:pn}):D[t]=pn;var X=(D,t,pn)=>l4(D,typeof t!="symbol"?t+"":t,pn);const Yg="0.5.6";class gn extends Error{}class Kg extends gn{constructor(n){super(`Invalid DateTime: ${n.toMessage()}`)}}class Jg extends gn{constructor(n){super(`Invalid Interval: ${n.toMessage()}`)}}class Zg extends gn{constructor(n){super(`Invalid Duration: ${n.toMessage()}`)}}class cr extends gn{}class hc extends gn{constructor(n){super(`Invalid unit ${n}`)}}class dt extends gn{}class Zt extends gn{constructor(){super("Zone is an abstract class")}}const F="numeric",yt="short",rt="long",gi={year:F,month:F,day:F},pc={year:F,month:yt,day:F},Xg={year:F,month:yt,day:F,weekday:yt},gc={year:F,month:rt,day:F},yc={year:F,month:rt,day:F,weekday:rt},kc={hour:F,minute:F},wc={hour:F,minute:F,second:F},_c={hour:F,minute:F,second:F,timeZoneName:yt},bc={hour:F,minute:F,second:F,timeZoneName:rt},xc={hour:F,minute:F,hourCycle:"h23"},Cc={hour:F,minute:F,second:F,hourCycle:"h23"},Vc={hour:F,minute:F,second:F,hourCycle:"h23",timeZoneName:yt},Ec={hour:F,minute:F,second:F,hourCycle:"h23",timeZoneName:rt},Nc={year:F,month:F,day:F,hour:F,minute:F},Tc={year:F,month:F,day:F,hour:F,minute:F,second:F},Sc={year:F,month:yt,day:F,hour:F,minute:F},Bc={year:F,month:yt,day:F,hour:F,minute:F,second:F},Qg={year:F,month:yt,day:F,weekday:yt,hour:F,minute:F},Dc={year:F,month:rt,day:F,hour:F,minute:F,timeZoneName:yt},Oc={year:F,month:rt,day:F,hour:F,minute:F,second:F,timeZoneName:yt},Mc={year:F,month:rt,day:F,weekday:rt,hour:F,minute:F,timeZoneName:rt},Fc={year:F,month:rt,day:F,weekday:rt,hour:F,minute:F,second:F,timeZoneName:rt};function te(e){return typeof e>"u"}function yn(e){return typeof e=="number"}function Qr(e){return typeof e=="number"&&e%1===0}function vg(e){return typeof e=="string"}function ey(e){return Object.prototype.toString.call(e)==="[object Date]"}function Ic(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function ty(e){return Array.isArray(e)?e:[e]}function Ac(e,n,r){if(e.length!==0)return e.reduce((i,s)=>{const o=[n(s),s];return i&&r(i[0],o[0])===i[0]?i:o},null)[1]}function ny(e,n){return n.reduce((r,i)=>(r[i]=e[i],r),{})}function Rn(e,n){return Object.prototype.hasOwnProperty.call(e,n)}function jt(e,n,r){return Qr(e)&&e>=n&&e<=r}function ry(e,n){return e-n*Math.floor(e/n)}function Ne(e,n=2){const r=e<0;let i;return r?i="-"+(""+-e).padStart(n,"0"):i=(""+e).padStart(n,"0"),i}function Xt(e){if(!(te(e)||e===null||e===""))return parseInt(e,10)}function kn(e){if(!(te(e)||e===null||e===""))return parseFloat(e)}function yi(e){if(!(te(e)||e===null||e==="")){const n=parseFloat("0."+e)*1e3;return Math.floor(n)}}function ki(e,n,r=!1){const i=10**n;return(r?Math.trunc:Math.round)(e*i)/i}function dr(e){return e%4===0&&(e%100!==0||e%400===0)}function ur(e){return dr(e)?366:365}function vr(e,n){const r=ry(n-1,12)+1,i=e+(n-r)/12;return r===2?dr(i)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][r-1]}function wi(e){let n=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(n=new Date(n),n.setUTCFullYear(n.getUTCFullYear()-1900)),+n}function eo(e){const n=(e+Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400))%7,r=e-1,i=(r+Math.floor(r/4)-Math.floor(r/100)+Math.floor(r/400))%7;return n===4||i===3?53:52}function _i(e){return e>99?e:e>60?1900+e:2e3+e}function Lc(e,n,r,i=null){const s=new Date(e),o={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};i&&(o.timeZone=i);const l={timeZoneName:n,...o},a=new Intl.DateTimeFormat(r,l).formatToParts(s).find(c=>c.type.toLowerCase()==="timezonename");return a?a.value:null}function to(e,n){let r=parseInt(e,10);Number.isNaN(r)&&(r=0);const i=parseInt(n,10)||0,s=r<0||Object.is(r,-0)?-i:i;return r*60+s}function Rc(e){const n=Number(e);if(typeof e=="boolean"||e===""||Number.isNaN(n))throw new dt(`Invalid unit value ${e}`);return n}function no(e,n){const r={};for(const i in e)if(Rn(e,i)){const s=e[i];if(s==null)continue;r[n(i)]=Rc(s)}return r}function mr(e,n){const r=Math.trunc(Math.abs(e/60)),i=Math.trunc(Math.abs(e%60)),s=e>=0?"+":"-";switch(n){case"short":return`${s}${Ne(r,2)}:${Ne(i,2)}`;case"narrow":return`${s}${r}${i>0?`:${i}`:""}`;case"techie":return`${s}${Ne(r,2)}${Ne(i,2)}`;default:throw new RangeError(`Value format ${n} is out of range for property format`)}}function ro(e){return ny(e,["hour","minute","second","millisecond"])}const Pc=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/,oy=["January","February","March","April","May","June","July","August","September","October","November","December"],Uc=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],iy=["J","F","M","A","M","J","J","A","S","O","N","D"];function $c(e){switch(e){case"narrow":return[...iy];case"short":return[...Uc];case"long":return[...oy];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const zc=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],jc=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],sy=["M","T","W","T","F","S","S"];function qc(e){switch(e){case"narrow":return[...sy];case"short":return[...jc];case"long":return[...zc];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Hc=["AM","PM"],ly=["Before Christ","Anno Domini"],ay=["BC","AD"],cy=["B","A"];function Wc(e){switch(e){case"narrow":return[...cy];case"short":return[...ay];case"long":return[...ly];default:return null}}function dy(e){return Hc[e.hour<12?0:1]}function uy(e,n){return qc(n)[e.weekday-1]}function my(e,n){return $c(n)[e.month-1]}function fy(e,n){return Wc(n)[e.year<0?0:1]}function hy(e,n,r="always",i=!1){const s={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},o=["hours","minutes","seconds"].indexOf(e)===-1;if(r==="auto"&&o){const u=e==="days";switch(n){case 1:return u?"tomorrow":`next ${s[e][0]}`;case-1:return u?"yesterday":`last ${s[e][0]}`;case 0:return u?"today":`this ${s[e][0]}`}}const l=Object.is(n,-0)||n<0,a=Math.abs(n),c=a===1,d=s[e],m=i?c?d[1]:d[2]||d[1]:c?s[e][0]:e;return l?`${a} ${m} ago`:`in ${a} ${m}`}function Gc(e,n){let r="";for(const i of e)i.literal?r+=i.val:r+=n(i.val);return r}const py={D:gi,DD:pc,DDD:gc,DDDD:yc,t:kc,tt:wc,ttt:_c,tttt:bc,T:xc,TT:Cc,TTT:Vc,TTTT:Ec,f:Nc,ff:Sc,fff:Dc,ffff:Mc,F:Tc,FF:Bc,FFF:Oc,FFFF:Fc};class Ye{static create(n,r={}){return new Ye(n,r)}static parseFormat(n){let r=null,i="",s=!1;const o=[];for(let l=0;l<n.length;l++){const a=n.charAt(l);a==="'"?(i.length>0&&o.push({literal:s,val:i}),r=null,i="",s=!s):s||a===r?i+=a:(i.length>0&&o.push({literal:!1,val:i}),i=a,r=a)}return i.length>0&&o.push({literal:s,val:i}),o}static macroTokenToFormatOpts(n){return py[n]}constructor(n,r){this.opts=r,this.loc=n,this.systemLoc=null}formatWithSystemDefault(n,r){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(n,{...this.opts,...r}).format()}formatDateTime(n,r={}){return this.loc.dtFormatter(n,{...this.opts,...r}).format()}formatDateTimeParts(n,r={}){return this.loc.dtFormatter(n,{...this.opts,...r}).formatToParts()}resolvedOptions(n,r={}){return this.loc.dtFormatter(n,{...this.opts,...r}).resolvedOptions()}num(n,r=0){if(this.opts.forceSimple)return Ne(n,r);const i={...this.opts};return r>0&&(i.padTo=r),this.loc.numberFormatter(i).format(n)}formatDateTimeFromString(n,r){const i=this.loc.listingMode()==="en",s=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",o=(h,g)=>this.loc.extract(n,h,g),l=h=>n.isOffsetFixed&&n.offset===0&&h.allowZ?"Z":n.isValid?n.zone.formatOffset(n.ts,h.format):"",a=()=>i?dy(n):o({hour:"numeric",hourCycle:"h12"},"dayperiod"),c=(h,g)=>i?my(n,h):o(g?{month:h}:{month:h,day:"numeric"},"month"),d=(h,g)=>i?uy(n,h):o(g?{weekday:h}:{weekday:h,month:"long",day:"numeric"},"weekday"),m=h=>{const g=Ye.macroTokenToFormatOpts(h);return g?this.formatWithSystemDefault(n,g):h},u=h=>i?fy(n,h):o({era:h},"era"),f=h=>{switch(h){case"S":return this.num(n.millisecond);case"u":case"SSS":return this.num(n.millisecond,3);case"s":return this.num(n.second);case"ss":return this.num(n.second,2);case"uu":return this.num(Math.floor(n.millisecond/10),2);case"uuu":return this.num(Math.floor(n.millisecond/100));case"m":return this.num(n.minute);case"mm":return this.num(n.minute,2);case"h":return this.num(n.hour%12===0?12:n.hour%12);case"hh":return this.num(n.hour%12===0?12:n.hour%12,2);case"H":return this.num(n.hour);case"HH":return this.num(n.hour,2);case"Z":return l({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return l({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return l({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return n.zone.offsetName(n.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return n.zone.offsetName(n.ts,{format:"long",locale:this.loc.locale});case"z":return n.zoneName;case"a":return a();case"d":return s?o({day:"numeric"},"day"):this.num(n.day);case"dd":return s?o({day:"2-digit"},"day"):this.num(n.day,2);case"c":return this.num(n.weekday);case"ccc":return d("short",!0);case"cccc":return d("long",!0);case"ccccc":return d("narrow",!0);case"E":return this.num(n.weekday);case"EEE":return d("short",!1);case"EEEE":return d("long",!1);case"EEEEE":return d("narrow",!1);case"L":return s?o({month:"numeric",day:"numeric"},"month"):this.num(n.month);case"LL":return s?o({month:"2-digit",day:"numeric"},"month"):this.num(n.month,2);case"LLL":return c("short",!0);case"LLLL":return c("long",!0);case"LLLLL":return c("narrow",!0);case"M":return s?o({month:"numeric"},"month"):this.num(n.month);case"MM":return s?o({month:"2-digit"},"month"):this.num(n.month,2);case"MMM":return c("short",!1);case"MMMM":return c("long",!1);case"MMMMM":return c("narrow",!1);case"y":return s?o({year:"numeric"},"year"):this.num(n.year);case"yy":return s?o({year:"2-digit"},"year"):this.num(n.year.toString().slice(-2),2);case"yyyy":return s?o({year:"numeric"},"year"):this.num(n.year,4);case"yyyyyy":return s?o({year:"numeric"},"year"):this.num(n.year,6);case"G":return u("short");case"GG":return u("long");case"GGGGG":return u("narrow");case"kk":return this.num(n.weekYear.toString().slice(-2),2);case"kkkk":return this.num(n.weekYear,4);case"W":return this.num(n.weekNumber);case"WW":return this.num(n.weekNumber,2);case"o":return this.num(n.ordinal);case"ooo":return this.num(n.ordinal,3);case"q":return this.num(n.quarter);case"qq":return this.num(n.quarter,2);case"X":return this.num(Math.floor(n.ts/1e3));case"x":return this.num(n.ts);default:return m(h)}};return Gc(Ye.parseFormat(r),f)}formatDurationFromString(n,r){const i=c=>{switch(c[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},s=c=>d=>{const m=i(d);return m?this.num(c.get(m),d.length):d},o=Ye.parseFormat(r),l=o.reduce((c,{literal:d,val:m})=>d?c:c.concat(m),[]),a=n.shiftTo(...l.map(i).filter(c=>c));return Gc(o,s(a))}}class kt{constructor(n,r){this.reason=n,this.explanation=r}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}class fr{get type(){throw new Zt}get name(){throw new Zt}get ianaName(){return this.name}get isUniversal(){throw new Zt}offsetName(n,r){throw new Zt}formatOffset(n,r){throw new Zt}offset(n){throw new Zt}equals(n){throw new Zt}get isValid(){throw new Zt}}let bi=null;class xi extends fr{static get instance(){return bi===null&&(bi=new xi),bi}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(n,{format:r,locale:i}){return Lc(n,r,i)}formatOffset(n,r){return mr(this.offset(n),r)}offset(n){return-new Date(n).getTimezoneOffset()}equals(n){return n.type==="system"}get isValid(){return!0}}let oo={};function gy(e){return oo[e]||(oo[e]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),oo[e]}const yy={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function ky(e,n){const r=e.format(n).replace(/\u200E/g,""),i=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(r),[,s,o,l,a,c,d,m]=i;return[l,s,o,a,c,d,m]}function wy(e,n){const r=e.formatToParts(n),i=[];for(let s=0;s<r.length;s++){const{type:o,value:l}=r[s],a=yy[o];o==="era"?i[a]=l:te(a)||(i[a]=parseInt(l,10))}return i}let io={};class qt extends fr{static create(n){return io[n]||(io[n]=new qt(n)),io[n]}static resetCache(){io={},oo={}}static isValidSpecifier(n){return this.isValidZone(n)}static isValidZone(n){if(!n)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:n}).format(),!0}catch{return!1}}constructor(n){super(),this.zoneName=n,this.valid=qt.isValidZone(n)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(n,{format:r,locale:i}){return Lc(n,r,i,this.name)}formatOffset(n,r){return mr(this.offset(n),r)}offset(n){const r=new Date(n);if(isNaN(r))return NaN;const i=gy(this.name);let[s,o,l,a,c,d,m]=i.formatToParts?wy(i,r):ky(i,r);a==="BC"&&(s=-Math.abs(s)+1);const f=wi({year:s,month:o,day:l,hour:c===24?0:c,minute:d,second:m,millisecond:0});let h=+r;const g=h%1e3;return h-=g>=0?g:1e3+g,(f-h)/(60*1e3)}equals(n){return n.type==="iana"&&n.name===this.name}get isValid(){return this.valid}}let Ci=null;class qe extends fr{static get utcInstance(){return Ci===null&&(Ci=new qe(0)),Ci}static instance(n){return n===0?qe.utcInstance:new qe(n)}static parseSpecifier(n){if(n){const r=n.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(r)return new qe(to(r[1],r[2]))}return null}constructor(n){super(),this.fixed=n}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${mr(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${mr(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(n,r){return mr(this.fixed,r)}get isUniversal(){return!0}offset(){return this.fixed}equals(n){return n.type==="fixed"&&n.fixed===this.fixed}get isValid(){return!0}}class _y extends fr{constructor(n){super(),this.zoneName=n}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function Qt(e,n){if(te(e)||e===null)return n;if(e instanceof fr)return e;if(vg(e)){const r=e.toLowerCase();return r==="local"||r==="system"?n:r==="utc"||r==="gmt"?qe.utcInstance:qe.parseSpecifier(r)||qt.create(e)}else return yn(e)?qe.instance(e):typeof e=="object"&&e.offset&&typeof e.offset=="number"?e:new _y(e)}let Yc=()=>Date.now(),Kc="system",Jc=null,Zc=null,Xc=null,Qc;class Me{static get now(){return Yc}static set now(n){Yc=n}static set defaultZone(n){Kc=n}static get defaultZone(){return Qt(Kc,xi.instance)}static get defaultLocale(){return Jc}static set defaultLocale(n){Jc=n}static get defaultNumberingSystem(){return Zc}static set defaultNumberingSystem(n){Zc=n}static get defaultOutputCalendar(){return Xc}static set defaultOutputCalendar(n){Xc=n}static get throwOnInvalid(){return Qc}static set throwOnInvalid(n){Qc=n}static resetCaches(){we.resetCache(),qt.resetCache()}}let vc={};function by(e,n={}){const r=JSON.stringify([e,n]);let i=vc[r];return i||(i=new Intl.ListFormat(e,n),vc[r]=i),i}let Vi={};function Ei(e,n={}){const r=JSON.stringify([e,n]);let i=Vi[r];return i||(i=new Intl.DateTimeFormat(e,n),Vi[r]=i),i}let Ni={};function xy(e,n={}){const r=JSON.stringify([e,n]);let i=Ni[r];return i||(i=new Intl.NumberFormat(e,n),Ni[r]=i),i}let Ti={};function Cy(e,n={}){const{base:r,...i}=n,s=JSON.stringify([e,i]);let o=Ti[s];return o||(o=new Intl.RelativeTimeFormat(e,n),Ti[s]=o),o}let hr=null;function Vy(){return hr||(hr=new Intl.DateTimeFormat().resolvedOptions().locale,hr)}function Ey(e){const n=e.indexOf("-u-");if(n===-1)return[e];{let r;const i=e.substring(0,n);try{r=Ei(e).resolvedOptions()}catch{r=Ei(i).resolvedOptions()}const{numberingSystem:s,calendar:o}=r;return[i,s,o]}}function Ny(e,n,r){return(r||n)&&(e+="-u",r&&(e+=`-ca-${r}`),n&&(e+=`-nu-${n}`)),e}function Ty(e){const n=[];for(let r=1;r<=12;r++){const i=b.utc(2016,r,1);n.push(e(i))}return n}function Sy(e){const n=[];for(let r=1;r<=7;r++){const i=b.utc(2016,11,13+r);n.push(e(i))}return n}function so(e,n,r,i,s){const o=e.listingMode(r);return o==="error"?null:o==="en"?i(n):s(n)}function By(e){return e.numberingSystem&&e.numberingSystem!=="latn"?!1:e.numberingSystem==="latn"||!e.locale||e.locale.startsWith("en")||new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem==="latn"}class Dy{constructor(n,r,i){this.padTo=i.padTo||0,this.floor=i.floor||!1;const{padTo:s,floor:o,...l}=i;if(!r||Object.keys(l).length>0){const a={useGrouping:!1,...i};i.padTo>0&&(a.minimumIntegerDigits=i.padTo),this.inf=xy(n,a)}}format(n){if(this.inf){const r=this.floor?Math.floor(n):n;return this.inf.format(r)}else{const r=this.floor?Math.floor(n):ki(n,3);return Ne(r,this.padTo)}}}class Oy{constructor(n,r,i){this.opts=i;let s;if(n.zone.isUniversal){const l=-1*(n.offset/60),a=l>=0?`Etc/GMT+${l}`:`Etc/GMT${l}`;n.offset!==0&&qt.create(a).valid?(s=a,this.dt=n):(s="UTC",i.timeZoneName?this.dt=n:this.dt=n.offset===0?n:b.fromMillis(n.ts+n.offset*60*1e3))}else n.zone.type==="system"?this.dt=n:(this.dt=n,s=n.zone.name);const o={...this.opts};s&&(o.timeZone=s),this.dtf=Ei(r,o)}format(){return this.dtf.format(this.dt.toJSDate())}formatToParts(){return this.dtf.formatToParts(this.dt.toJSDate())}resolvedOptions(){return this.dtf.resolvedOptions()}}class My{constructor(n,r,i){this.opts={style:"long",...i},!r&&Ic()&&(this.rtf=Cy(n,i))}format(n,r){return this.rtf?this.rtf.format(n,r):hy(r,n,this.opts.numeric,this.opts.style!=="long")}formatToParts(n,r){return this.rtf?this.rtf.formatToParts(n,r):[]}}class we{static fromOpts(n){return we.create(n.locale,n.numberingSystem,n.outputCalendar,n.defaultToEN)}static create(n,r,i,s=!1){const o=n||Me.defaultLocale,l=o||(s?"en-US":Vy()),a=r||Me.defaultNumberingSystem,c=i||Me.defaultOutputCalendar;return new we(l,a,c,o)}static resetCache(){hr=null,Vi={},Ni={},Ti={}}static fromObject({locale:n,numberingSystem:r,outputCalendar:i}={}){return we.create(n,r,i)}constructor(n,r,i,s){const[o,l,a]=Ey(n);this.locale=o,this.numberingSystem=r||l||null,this.outputCalendar=i||a||null,this.intl=Ny(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=s,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=By(this)),this.fastNumbersCached}listingMode(){const n=this.isEnglish(),r=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return n&&r?"en":"intl"}clone(n){return!n||Object.getOwnPropertyNames(n).length===0?this:we.create(n.locale||this.specifiedLocale,n.numberingSystem||this.numberingSystem,n.outputCalendar||this.outputCalendar,n.defaultToEN||!1)}redefaultToEN(n={}){return this.clone({...n,defaultToEN:!0})}redefaultToSystem(n={}){return this.clone({...n,defaultToEN:!1})}months(n,r=!1,i=!0){return so(this,n,i,$c,()=>{const s=r?{month:n,day:"numeric"}:{month:n},o=r?"format":"standalone";return this.monthsCache[o][n]||(this.monthsCache[o][n]=Ty(l=>this.extract(l,s,"month"))),this.monthsCache[o][n]})}weekdays(n,r=!1,i=!0){return so(this,n,i,qc,()=>{const s=r?{weekday:n,year:"numeric",month:"long",day:"numeric"}:{weekday:n},o=r?"format":"standalone";return this.weekdaysCache[o][n]||(this.weekdaysCache[o][n]=Sy(l=>this.extract(l,s,"weekday"))),this.weekdaysCache[o][n]})}meridiems(n=!0){return so(this,void 0,n,()=>Hc,()=>{if(!this.meridiemCache){const r={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[b.utc(2016,11,13,9),b.utc(2016,11,13,19)].map(i=>this.extract(i,r,"dayperiod"))}return this.meridiemCache})}eras(n,r=!0){return so(this,n,r,Wc,()=>{const i={era:n};return this.eraCache[n]||(this.eraCache[n]=[b.utc(-40,1,1),b.utc(2017,1,1)].map(s=>this.extract(s,i,"era"))),this.eraCache[n]})}extract(n,r,i){const s=this.dtFormatter(n,r),o=s.formatToParts(),l=o.find(a=>a.type.toLowerCase()===i);return l?l.value:null}numberFormatter(n={}){return new Dy(this.intl,n.forceSimple||this.fastNumbers,n)}dtFormatter(n,r={}){return new Oy(n,this.intl,r)}relFormatter(n={}){return new My(this.intl,this.isEnglish(),n)}listFormatter(n={}){return by(this.intl,n)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}equals(n){return this.locale===n.locale&&this.numberingSystem===n.numberingSystem&&this.outputCalendar===n.outputCalendar}}function Pn(...e){const n=e.reduce((r,i)=>r+i.source,"");return RegExp(`^${n}$`)}function Un(...e){return n=>e.reduce(([r,i,s],o)=>{const[l,a,c]=o(n,s);return[{...r,...l},a||i,c]},[{},null,1]).slice(0,2)}function $n(e,...n){if(e==null)return[null,null];for(const[r,i]of n){const s=r.exec(e);if(s)return i(s)}return[null,null]}function ed(...e){return(n,r)=>{const i={};let s;for(s=0;s<e.length;s++)i[e[s]]=Xt(n[r+s]);return[i,null,r+s]}}const td=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,Fy=`(?:${td.source}?(?:\\[(${Pc.source})\\])?)?`,Si=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,nd=RegExp(`${Si.source}${Fy}`),Bi=RegExp(`(?:T${nd.source})?`),Iy=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,Ay=/(\d{4})-?W(\d\d)(?:-?(\d))?/,Ly=/(\d{4})-?(\d{3})/,Ry=ed("weekYear","weekNumber","weekDay"),Py=ed("year","ordinal"),Uy=/(\d{4})-(\d\d)-(\d\d)/,rd=RegExp(`${Si.source} ?(?:${td.source}|(${Pc.source}))?`),$y=RegExp(`(?: ${rd.source})?`);function zn(e,n,r){const i=e[n];return te(i)?r:Xt(i)}function zy(e,n){return[{year:zn(e,n),month:zn(e,n+1,1),day:zn(e,n+2,1)},null,n+3]}function jn(e,n){return[{hours:zn(e,n,0),minutes:zn(e,n+1,0),seconds:zn(e,n+2,0),milliseconds:yi(e[n+3])},null,n+4]}function pr(e,n){const r=!e[n]&&!e[n+1],i=to(e[n+1],e[n+2]),s=r?null:qe.instance(i);return[{},s,n+3]}function gr(e,n){const r=e[n]?qt.create(e[n]):null;return[{},r,n+1]}const jy=RegExp(`^T?${Si.source}$`),qy=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function Hy(e){const[n,r,i,s,o,l,a,c,d]=e,m=n[0]==="-",u=c&&c[0]==="-",f=(h,g=!1)=>h!==void 0&&(g||h&&m)?-h:h;return[{years:f(kn(r)),months:f(kn(i)),weeks:f(kn(s)),days:f(kn(o)),hours:f(kn(l)),minutes:f(kn(a)),seconds:f(kn(c),c==="-0"),milliseconds:f(yi(d),u)}]}const Wy={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Di(e,n,r,i,s,o,l){const a={year:n.length===2?_i(Xt(n)):Xt(n),month:Uc.indexOf(r)+1,day:Xt(i),hour:Xt(s),minute:Xt(o)};return l&&(a.second=Xt(l)),e&&(a.weekday=e.length>3?zc.indexOf(e)+1:jc.indexOf(e)+1),a}const Gy=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function Yy(e){const[,n,r,i,s,o,l,a,c,d,m,u]=e,f=Di(n,s,i,r,o,l,a);let h;return c?h=Wy[c]:d?h=0:h=to(m,u),[f,new qe(h)]}function Ky(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const Jy=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Zy=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Xy=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function od(e){const[,n,r,i,s,o,l,a]=e;return[Di(n,s,i,r,o,l,a),qe.utcInstance]}function Qy(e){const[,n,r,i,s,o,l,a]=e;return[Di(n,a,r,i,s,o,l),qe.utcInstance]}const vy=Pn(Iy,Bi),ek=Pn(Ay,Bi),tk=Pn(Ly,Bi),nk=Pn(nd),id=Un(zy,jn,pr,gr),rk=Un(Ry,jn,pr,gr),ok=Un(Py,jn,pr,gr),ik=Un(jn,pr,gr);function sk(e){return $n(e,[vy,id],[ek,rk],[tk,ok],[nk,ik])}function lk(e){return $n(Ky(e),[Gy,Yy])}function ak(e){return $n(e,[Jy,od],[Zy,od],[Xy,Qy])}function ck(e){return $n(e,[qy,Hy])}const dk=Un(jn);function uk(e){return $n(e,[jy,dk])}const mk=Pn(Uy,$y),fk=Pn(rd),hk=Un(jn,pr,gr);function pk(e){return $n(e,[mk,id],[fk,hk])}const gk="Invalid Duration",sd={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},yk={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...sd},ut=146097/400,qn=146097/4800,kk={years:{quarters:4,months:12,weeks:ut/7,days:ut,hours:ut*24,minutes:ut*24*60,seconds:ut*24*60*60,milliseconds:ut*24*60*60*1e3},quarters:{months:3,weeks:ut/28,days:ut/4,hours:ut*24/4,minutes:ut*24*60/4,seconds:ut*24*60*60/4,milliseconds:ut*24*60*60*1e3/4},months:{weeks:qn/7,days:qn,hours:qn*24,minutes:qn*24*60,seconds:qn*24*60*60,milliseconds:qn*24*60*60*1e3},...sd},wn=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],wk=wn.slice(0).reverse();function _n(e,n,r=!1){const i={values:r?n.values:{...e.values,...n.values||{}},loc:e.loc.clone(n.loc),conversionAccuracy:n.conversionAccuracy||e.conversionAccuracy};return new oe(i)}function _k(e){return e<0?Math.floor(e):Math.ceil(e)}function ld(e,n,r,i,s){const o=e[s][r],l=n[r]/o,a=Math.sign(l)===Math.sign(i[s]),c=!a&&i[s]!==0&&Math.abs(l)<=1?_k(l):Math.trunc(l);i[s]+=c,n[r]-=c*o}function bk(e,n){wk.reduce((r,i)=>te(n[i])?r:(r&&ld(e,n,r,n,i),i),null)}class oe{constructor(n){const r=n.conversionAccuracy==="longterm"||!1;this.values=n.values,this.loc=n.loc||we.create(),this.conversionAccuracy=r?"longterm":"casual",this.invalid=n.invalid||null,this.matrix=r?kk:yk,this.isLuxonDuration=!0}static fromMillis(n,r){return oe.fromObject({milliseconds:n},r)}static fromObject(n,r={}){if(n==null||typeof n!="object")throw new dt(`Duration.fromObject: argument expected to be an object, got ${n===null?"null":typeof n}`);return new oe({values:no(n,oe.normalizeUnit),loc:we.fromObject(r),conversionAccuracy:r.conversionAccuracy})}static fromDurationLike(n){if(yn(n))return oe.fromMillis(n);if(oe.isDuration(n))return n;if(typeof n=="object")return oe.fromObject(n);throw new dt(`Unknown duration argument ${n} of type ${typeof n}`)}static fromISO(n,r){const[i]=ck(n);return i?oe.fromObject(i,r):oe.invalid("unparsable",`the input "${n}" can't be parsed as ISO 8601`)}static fromISOTime(n,r){const[i]=uk(n);return i?oe.fromObject(i,r):oe.invalid("unparsable",`the input "${n}" can't be parsed as ISO 8601`)}static invalid(n,r=null){if(!n)throw new dt("need to specify a reason the Duration is invalid");const i=n instanceof kt?n:new kt(n,r);if(Me.throwOnInvalid)throw new Zg(i);return new oe({invalid:i})}static normalizeUnit(n){const r={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[n&&n.toLowerCase()];if(!r)throw new hc(n);return r}static isDuration(n){return n&&n.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(n,r={}){const i={...r,floor:r.round!==!1&&r.floor!==!1};return this.isValid?Ye.create(this.loc,i).formatDurationFromString(this,n):gk}toHuman(n={}){const r=wn.map(i=>{const s=this.values[i];return te(s)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...n,unit:i.slice(0,-1)}).format(s)}).filter(i=>i);return this.loc.listFormatter({type:"conjunction",style:n.listStyle||"narrow",...n}).format(r)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let n="P";return this.years!==0&&(n+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(n+=this.months+this.quarters*3+"M"),this.weeks!==0&&(n+=this.weeks+"W"),this.days!==0&&(n+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(n+="T"),this.hours!==0&&(n+=this.hours+"H"),this.minutes!==0&&(n+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(n+=ki(this.seconds+this.milliseconds/1e3,3)+"S"),n==="P"&&(n+="T0S"),n}toISOTime(n={}){if(!this.isValid)return null;const r=this.toMillis();if(r<0||r>=864e5)return null;n={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...n};const i=this.shiftTo("hours","minutes","seconds","milliseconds");let s=n.format==="basic"?"hhmm":"hh:mm";(!n.suppressSeconds||i.seconds!==0||i.milliseconds!==0)&&(s+=n.format==="basic"?"ss":":ss",(!n.suppressMilliseconds||i.milliseconds!==0)&&(s+=".SSS"));let o=i.toFormat(s);return n.includePrefix&&(o="T"+o),o}toJSON(){return this.toISO()}toString(){return this.toISO()}toMillis(){return this.as("milliseconds")}valueOf(){return this.toMillis()}plus(n){if(!this.isValid)return this;const r=oe.fromDurationLike(n),i={};for(const s of wn)(Rn(r.values,s)||Rn(this.values,s))&&(i[s]=r.get(s)+this.get(s));return _n(this,{values:i},!0)}minus(n){if(!this.isValid)return this;const r=oe.fromDurationLike(n);return this.plus(r.negate())}mapUnits(n){if(!this.isValid)return this;const r={};for(const i of Object.keys(this.values))r[i]=Rc(n(this.values[i],i));return _n(this,{values:r},!0)}get(n){return this[oe.normalizeUnit(n)]}set(n){if(!this.isValid)return this;const r={...this.values,...no(n,oe.normalizeUnit)};return _n(this,{values:r})}reconfigure({locale:n,numberingSystem:r,conversionAccuracy:i}={}){const s=this.loc.clone({locale:n,numberingSystem:r}),o={loc:s};return i&&(o.conversionAccuracy=i),_n(this,o)}as(n){return this.isValid?this.shiftTo(n).get(n):NaN}normalize(){if(!this.isValid)return this;const n=this.toObject();return bk(this.matrix,n),_n(this,{values:n},!0)}shiftTo(...n){if(!this.isValid)return this;if(n.length===0)return this;n=n.map(l=>oe.normalizeUnit(l));const r={},i={},s=this.toObject();let o;for(const l of wn)if(n.indexOf(l)>=0){o=l;let a=0;for(const d in i)a+=this.matrix[d][l]*i[d],i[d]=0;yn(s[l])&&(a+=s[l]);const c=Math.trunc(a);r[l]=c,i[l]=(a*1e3-c*1e3)/1e3;for(const d in s)wn.indexOf(d)>wn.indexOf(l)&&ld(this.matrix,s,d,r,l)}else yn(s[l])&&(i[l]=s[l]);for(const l in i)i[l]!==0&&(r[o]+=l===o?i[l]:i[l]/this.matrix[o][l]);return _n(this,{values:r},!0).normalize()}negate(){if(!this.isValid)return this;const n={};for(const r of Object.keys(this.values))n[r]=this.values[r]===0?0:-this.values[r];return _n(this,{values:n},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(n){if(!this.isValid||!n.isValid||!this.loc.equals(n.loc))return!1;function r(i,s){return i===void 0||i===0?s===void 0||s===0:i===s}for(const i of wn)if(!r(this.values[i],n.values[i]))return!1;return!0}}const yr="Invalid Interval";function xk(e,n){return!e||!e.isValid?xe.invalid("missing or invalid start"):!n||!n.isValid?xe.invalid("missing or invalid end"):n<e?xe.invalid("end before start",`The end of an interval must be after its start, but you had start=${e.toISO()} and end=${n.toISO()}`):null}class xe{constructor(n){this.s=n.start,this.e=n.end,this.invalid=n.invalid||null,this.isLuxonInterval=!0}static invalid(n,r=null){if(!n)throw new dt("need to specify a reason the Interval is invalid");const i=n instanceof kt?n:new kt(n,r);if(Me.throwOnInvalid)throw new Jg(i);return new xe({invalid:i})}static fromDateTimes(n,r){const i=_r(n),s=_r(r),o=xk(i,s);return o??new xe({start:i,end:s})}static after(n,r){const i=oe.fromDurationLike(r),s=_r(n);return xe.fromDateTimes(s,s.plus(i))}static before(n,r){const i=oe.fromDurationLike(r),s=_r(n);return xe.fromDateTimes(s.minus(i),s)}static fromISO(n,r){const[i,s]=(n||"").split("/",2);if(i&&s){let o,l;try{o=b.fromISO(i,r),l=o.isValid}catch{l=!1}let a,c;try{a=b.fromISO(s,r),c=a.isValid}catch{c=!1}if(l&&c)return xe.fromDateTimes(o,a);if(l){const d=oe.fromISO(s,r);if(d.isValid)return xe.after(o,d)}else if(c){const d=oe.fromISO(i,r);if(d.isValid)return xe.before(a,d)}}return xe.invalid("unparsable",`the input "${n}" can't be parsed as ISO 8601`)}static isInterval(n){return n&&n.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(n="milliseconds"){return this.isValid?this.toDuration(n).get(n):NaN}count(n="milliseconds"){if(!this.isValid)return NaN;const r=this.start.startOf(n),i=this.end.startOf(n);return Math.floor(i.diff(r,n).get(n))+1}hasSame(n){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,n):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(n){return this.isValid?this.s>n:!1}isBefore(n){return this.isValid?this.e<=n:!1}contains(n){return this.isValid?this.s<=n&&this.e>n:!1}set({start:n,end:r}={}){return this.isValid?xe.fromDateTimes(n||this.s,r||this.e):this}splitAt(...n){if(!this.isValid)return[];const r=n.map(_r).filter(l=>this.contains(l)).sort(),i=[];let{s}=this,o=0;for(;s<this.e;){const l=r[o]||this.e,a=+l>+this.e?this.e:l;i.push(xe.fromDateTimes(s,a)),s=a,o+=1}return i}splitBy(n){const r=oe.fromDurationLike(n);if(!this.isValid||!r.isValid||r.as("milliseconds")===0)return[];let{s:i}=this,s=1,o;const l=[];for(;i<this.e;){const a=this.start.plus(r.mapUnits(c=>c*s));o=+a>+this.e?this.e:a,l.push(xe.fromDateTimes(i,o)),i=o,s+=1}return l}divideEqually(n){return this.isValid?this.splitBy(this.length()/n).slice(0,n):[]}overlaps(n){return this.e>n.s&&this.s<n.e}abutsStart(n){return this.isValid?+this.e==+n.s:!1}abutsEnd(n){return this.isValid?+n.e==+this.s:!1}engulfs(n){return this.isValid?this.s<=n.s&&this.e>=n.e:!1}equals(n){return!this.isValid||!n.isValid?!1:this.s.equals(n.s)&&this.e.equals(n.e)}intersection(n){if(!this.isValid)return this;const r=this.s>n.s?this.s:n.s,i=this.e<n.e?this.e:n.e;return r>=i?null:xe.fromDateTimes(r,i)}union(n){if(!this.isValid)return this;const r=this.s<n.s?this.s:n.s,i=this.e>n.e?this.e:n.e;return xe.fromDateTimes(r,i)}static merge(n){const[r,i]=n.sort((s,o)=>s.s-o.s).reduce(([s,o],l)=>o?o.overlaps(l)||o.abutsStart(l)?[s,o.union(l)]:[s.concat([o]),l]:[s,l],[[],null]);return i&&r.push(i),r}static xor(n){let r=null,i=0;const s=[],o=n.map(c=>[{time:c.s,type:"s"},{time:c.e,type:"e"}]),l=Array.prototype.concat(...o),a=l.sort((c,d)=>c.time-d.time);for(const c of a)i+=c.type==="s"?1:-1,i===1?r=c.time:(r&&+r!=+c.time&&s.push(xe.fromDateTimes(r,c.time)),r=null);return xe.merge(s)}difference(...n){return xe.xor([this].concat(n)).map(r=>this.intersection(r)).filter(r=>r&&!r.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:yr}toISO(n){return this.isValid?`${this.s.toISO(n)}/${this.e.toISO(n)}`:yr}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:yr}toISOTime(n){return this.isValid?`${this.s.toISOTime(n)}/${this.e.toISOTime(n)}`:yr}toFormat(n,{separator:r=" – "}={}){return this.isValid?`${this.s.toFormat(n)}${r}${this.e.toFormat(n)}`:yr}toDuration(n,r){return this.isValid?this.e.diff(this.s,n,r):oe.invalid(this.invalidReason)}mapEndpoints(n){return xe.fromDateTimes(n(this.s),n(this.e))}}let lo=class{static hasDST(n=Me.defaultZone){const r=b.now().setZone(n).set({month:12});return!n.isUniversal&&r.offset!==r.set({month:6}).offset}static isValidIANAZone(n){return qt.isValidZone(n)}static normalizeZone(n){return Qt(n,Me.defaultZone)}static months(n="long",{locale:r=null,numberingSystem:i=null,locObj:s=null,outputCalendar:o="gregory"}={}){return(s||we.create(r,i,o)).months(n)}static monthsFormat(n="long",{locale:r=null,numberingSystem:i=null,locObj:s=null,outputCalendar:o="gregory"}={}){return(s||we.create(r,i,o)).months(n,!0)}static weekdays(n="long",{locale:r=null,numberingSystem:i=null,locObj:s=null}={}){return(s||we.create(r,i,null)).weekdays(n)}static weekdaysFormat(n="long",{locale:r=null,numberingSystem:i=null,locObj:s=null}={}){return(s||we.create(r,i,null)).weekdays(n,!0)}static meridiems({locale:n=null}={}){return we.create(n).meridiems()}static eras(n="short",{locale:r=null}={}){return we.create(r,null,"gregory").eras(n)}static features(){return{relative:Ic()}}};function ad(e,n){const r=s=>s.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),i=r(n)-r(e);return Math.floor(oe.fromMillis(i).as("days"))}function Ck(e,n,r){const i=[["years",(a,c)=>c.year-a.year],["quarters",(a,c)=>c.quarter-a.quarter],["months",(a,c)=>c.month-a.month+(c.year-a.year)*12],["weeks",(a,c)=>{const d=ad(a,c);return(d-d%7)/7}],["days",ad]],s={};let o,l;for(const[a,c]of i)if(r.indexOf(a)>=0){o=a;let d=c(e,n);l=e.plus({[a]:d}),l>n?(e=e.plus({[a]:d-1}),d-=1):e=l,s[a]=d}return[e,s,l,o]}function Vk(e,n,r,i){let[s,o,l,a]=Ck(e,n,r);const c=n-s,d=r.filter(u=>["hours","minutes","seconds","milliseconds"].indexOf(u)>=0);d.length===0&&(l<n&&(l=s.plus({[a]:1})),l!==s&&(o[a]=(o[a]||0)+c/(l-s)));const m=oe.fromObject(o,i);return d.length>0?oe.fromMillis(c,i).shiftTo(...d).plus(m):m}const Oi={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},cd={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},Ek=Oi.hanidec.replace(/[\[|\]]/g,"").split("");function Nk(e){let n=parseInt(e,10);if(isNaN(n)){n="";for(let r=0;r<e.length;r++){const i=e.charCodeAt(r);if(e[r].search(Oi.hanidec)!==-1)n+=Ek.indexOf(e[r]);else for(const s in cd){const[o,l]=cd[s];i>=o&&i<=l&&(n+=i-o)}}return parseInt(n,10)}else return n}function wt({numberingSystem:e},n=""){return new RegExp(`${Oi[e||"latn"]}${n}`)}const Tk="missing Intl.DateTimeFormat.formatToParts support";function le(e,n=r=>r){return{regex:e,deser:([r])=>n(Nk(r))}}const dd="[ ]",ud=new RegExp(dd,"g");function Sk(e){return e.replace(/\./g,"\\.?").replace(ud,dd)}function md(e){return e.replace(/\./g,"").replace(ud," ").toLowerCase()}function _t(e,n){return e===null?null:{regex:RegExp(e.map(Sk).join("|")),deser:([r])=>e.findIndex(i=>md(r)===md(i))+n}}function fd(e,n){return{regex:e,deser:([,r,i])=>to(r,i),groups:n}}function Mi(e){return{regex:e,deser:([n])=>n}}function Bk(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Dk(e,n){const r=wt(n),i=wt(n,"{2}"),s=wt(n,"{3}"),o=wt(n,"{4}"),l=wt(n,"{6}"),a=wt(n,"{1,2}"),c=wt(n,"{1,3}"),d=wt(n,"{1,6}"),m=wt(n,"{1,9}"),u=wt(n,"{2,4}"),f=wt(n,"{4,6}"),h=k=>({regex:RegExp(Bk(k.val)),deser:([w])=>w,literal:!0}),p=(k=>{if(e.literal)return h(k);switch(k.val){case"G":return _t(n.eras("short",!1),0);case"GG":return _t(n.eras("long",!1),0);case"y":return le(d);case"yy":return le(u,_i);case"yyyy":return le(o);case"yyyyy":return le(f);case"yyyyyy":return le(l);case"M":return le(a);case"MM":return le(i);case"MMM":return _t(n.months("short",!0,!1),1);case"MMMM":return _t(n.months("long",!0,!1),1);case"L":return le(a);case"LL":return le(i);case"LLL":return _t(n.months("short",!1,!1),1);case"LLLL":return _t(n.months("long",!1,!1),1);case"d":return le(a);case"dd":return le(i);case"o":return le(c);case"ooo":return le(s);case"HH":return le(i);case"H":return le(a);case"hh":return le(i);case"h":return le(a);case"mm":return le(i);case"m":return le(a);case"q":return le(a);case"qq":return le(i);case"s":return le(a);case"ss":return le(i);case"S":return le(c);case"SSS":return le(s);case"u":return Mi(m);case"uu":return Mi(a);case"uuu":return le(r);case"a":return _t(n.meridiems(),0);case"kkkk":return le(o);case"kk":return le(u,_i);case"W":return le(a);case"WW":return le(i);case"E":case"c":return le(r);case"EEE":return _t(n.weekdays("short",!1,!1),1);case"EEEE":return _t(n.weekdays("long",!1,!1),1);case"ccc":return _t(n.weekdays("short",!0,!1),1);case"cccc":return _t(n.weekdays("long",!0,!1),1);case"Z":case"ZZ":return fd(new RegExp(`([+-]${a.source})(?::(${i.source}))?`),2);case"ZZZ":return fd(new RegExp(`([+-]${a.source})(${i.source})?`),2);case"z":return Mi(/[a-z_+-/]{1,256}?/i);default:return h(k)}})(e)||{invalidReason:Tk};return p.token=e,p}const Ok={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"}};function Mk(e,n,r){const{type:i,value:s}=e;if(i==="literal")return{literal:!0,val:s};const o=r[i];let l=Ok[i];if(typeof l=="object"&&(l=l[o]),l)return{literal:!1,val:l}}function Fk(e){return[`^${e.map(r=>r.regex).reduce((r,i)=>`${r}(${i.source})`,"")}$`,e]}function Ik(e,n,r){const i=e.match(n);if(i){const s={};let o=1;for(const l in r)if(Rn(r,l)){const a=r[l],c=a.groups?a.groups+1:1;!a.literal&&a.token&&(s[a.token.val[0]]=a.deser(i.slice(o,o+c))),o+=c}return[i,s]}else return[i,{}]}function Ak(e){const n=o=>{switch(o){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let r=null,i;return te(e.z)||(r=qt.create(e.z)),te(e.Z)||(r||(r=new qe(e.Z)),i=e.Z),te(e.q)||(e.M=(e.q-1)*3+1),te(e.h)||(e.h<12&&e.a===1?e.h+=12:e.h===12&&e.a===0&&(e.h=0)),e.G===0&&e.y&&(e.y=-e.y),te(e.u)||(e.S=yi(e.u)),[Object.keys(e).reduce((o,l)=>{const a=n(l);return a&&(o[a]=e[l]),o},{}),r,i]}let Fi=null;function Lk(){return Fi||(Fi=b.fromMillis(1555555555555)),Fi}function Rk(e,n){if(e.literal)return e;const r=Ye.macroTokenToFormatOpts(e.val);if(!r)return e;const o=Ye.create(n,r).formatDateTimeParts(Lk()).map(l=>Mk(l,n,r));return o.includes(void 0)?e:o}function Pk(e,n){return Array.prototype.concat(...e.map(r=>Rk(r,n)))}function hd(e,n,r){const i=Pk(Ye.parseFormat(r),e),s=i.map(l=>Dk(l,e)),o=s.find(l=>l.invalidReason);if(o)return{input:n,tokens:i,invalidReason:o.invalidReason};{const[l,a]=Fk(s),c=RegExp(l,"i"),[d,m]=Ik(n,c,a),[u,f,h]=m?Ak(m):[null,null,void 0];if(Rn(m,"a")&&Rn(m,"H"))throw new cr("Can't include meridiem when specifying 24-hour format");return{input:n,tokens:i,regex:c,rawMatches:d,matches:m,result:u,zone:f,specificOffset:h}}}function Uk(e,n,r){const{result:i,zone:s,specificOffset:o,invalidReason:l}=hd(e,n,r);return[i,s,o,l]}const pd=[0,31,59,90,120,151,181,212,243,273,304,334],gd=[0,31,60,91,121,152,182,213,244,274,305,335];function mt(e,n){return new kt("unit out of range",`you specified ${n} (of type ${typeof n}) as a ${e}, which is invalid`)}function yd(e,n,r){const i=new Date(Date.UTC(e,n-1,r));e<100&&e>=0&&i.setUTCFullYear(i.getUTCFullYear()-1900);const s=i.getUTCDay();return s===0?7:s}function kd(e,n,r){return r+(dr(e)?gd:pd)[n-1]}function wd(e,n){const r=dr(e)?gd:pd,i=r.findIndex(o=>o<n),s=n-r[i];return{month:i+1,day:s}}function Ii(e){const{year:n,month:r,day:i}=e,s=kd(n,r,i),o=yd(n,r,i);let l=Math.floor((s-o+10)/7),a;return l<1?(a=n-1,l=eo(a)):l>eo(n)?(a=n+1,l=1):a=n,{weekYear:a,weekNumber:l,weekday:o,...ro(e)}}function _d(e){const{weekYear:n,weekNumber:r,weekday:i}=e,s=yd(n,1,4),o=ur(n);let l=r*7+i-s-3,a;l<1?(a=n-1,l+=ur(a)):l>o?(a=n+1,l-=ur(n)):a=n;const{month:c,day:d}=wd(a,l);return{year:a,month:c,day:d,...ro(e)}}function Ai(e){const{year:n,month:r,day:i}=e,s=kd(n,r,i);return{year:n,ordinal:s,...ro(e)}}function bd(e){const{year:n,ordinal:r}=e,{month:i,day:s}=wd(n,r);return{year:n,month:i,day:s,...ro(e)}}function $k(e){const n=Qr(e.weekYear),r=jt(e.weekNumber,1,eo(e.weekYear)),i=jt(e.weekday,1,7);return n?r?i?!1:mt("weekday",e.weekday):mt("week",e.week):mt("weekYear",e.weekYear)}function zk(e){const n=Qr(e.year),r=jt(e.ordinal,1,ur(e.year));return n?r?!1:mt("ordinal",e.ordinal):mt("year",e.year)}function xd(e){const n=Qr(e.year),r=jt(e.month,1,12),i=jt(e.day,1,vr(e.year,e.month));return n?r?i?!1:mt("day",e.day):mt("month",e.month):mt("year",e.year)}function Cd(e){const{hour:n,minute:r,second:i,millisecond:s}=e,o=jt(n,0,23)||n===24&&r===0&&i===0&&s===0,l=jt(r,0,59),a=jt(i,0,59),c=jt(s,0,999);return o?l?a?c?!1:mt("millisecond",s):mt("second",i):mt("minute",r):mt("hour",n)}const Li="Invalid DateTime",Vd=864e13;function ao(e){return new kt("unsupported zone",`the zone "${e.name}" is not supported`)}function Ri(e){return e.weekData===null&&(e.weekData=Ii(e.c)),e.weekData}function kr(e,n){const r={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new b({...r,...n,old:r})}function Ed(e,n,r){let i=e-n*60*1e3;const s=r.offset(i);if(n===s)return[i,n];i-=(s-n)*60*1e3;const o=r.offset(i);return s===o?[i,s]:[e-Math.min(s,o)*60*1e3,Math.max(s,o)]}function Nd(e,n){e+=n*60*1e3;const r=new Date(e);return{year:r.getUTCFullYear(),month:r.getUTCMonth()+1,day:r.getUTCDate(),hour:r.getUTCHours(),minute:r.getUTCMinutes(),second:r.getUTCSeconds(),millisecond:r.getUTCMilliseconds()}}function co(e,n,r){return Ed(wi(e),n,r)}function Td(e,n){const r=e.o,i=e.c.year+Math.trunc(n.years),s=e.c.month+Math.trunc(n.months)+Math.trunc(n.quarters)*3,o={...e.c,year:i,month:s,day:Math.min(e.c.day,vr(i,s))+Math.trunc(n.days)+Math.trunc(n.weeks)*7},l=oe.fromObject({years:n.years-Math.trunc(n.years),quarters:n.quarters-Math.trunc(n.quarters),months:n.months-Math.trunc(n.months),weeks:n.weeks-Math.trunc(n.weeks),days:n.days-Math.trunc(n.days),hours:n.hours,minutes:n.minutes,seconds:n.seconds,milliseconds:n.milliseconds}).as("milliseconds"),a=wi(o);let[c,d]=Ed(a,r,e.zone);return l!==0&&(c+=l,d=e.zone.offset(c)),{ts:c,o:d}}function wr(e,n,r,i,s,o){const{setZone:l,zone:a}=r;if(e&&Object.keys(e).length!==0){const c=n||a,d=b.fromObject(e,{...r,zone:c,specificOffset:o});return l?d:d.setZone(a)}else return b.invalid(new kt("unparsable",`the input "${s}" can't be parsed as ${i}`))}function uo(e,n,r=!0){return e.isValid?Ye.create(we.create("en-US"),{allowZ:r,forceSimple:!0}).formatDateTimeFromString(e,n):null}function Pi(e,n){const r=e.c.year>9999||e.c.year<0;let i="";return r&&e.c.year>=0&&(i+="+"),i+=Ne(e.c.year,r?6:4),n?(i+="-",i+=Ne(e.c.month),i+="-",i+=Ne(e.c.day)):(i+=Ne(e.c.month),i+=Ne(e.c.day)),i}function Sd(e,n,r,i,s,o){let l=Ne(e.c.hour);return n?(l+=":",l+=Ne(e.c.minute),(e.c.second!==0||!r)&&(l+=":")):l+=Ne(e.c.minute),(e.c.second!==0||!r)&&(l+=Ne(e.c.second),(e.c.millisecond!==0||!i)&&(l+=".",l+=Ne(e.c.millisecond,3))),s&&(e.isOffsetFixed&&e.offset===0&&!o?l+="Z":e.o<0?(l+="-",l+=Ne(Math.trunc(-e.o/60)),l+=":",l+=Ne(Math.trunc(-e.o%60))):(l+="+",l+=Ne(Math.trunc(e.o/60)),l+=":",l+=Ne(Math.trunc(e.o%60)))),o&&(l+="["+e.zone.ianaName+"]"),l}const Bd={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},jk={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},qk={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Dd=["year","month","day","hour","minute","second","millisecond"],Hk=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],Wk=["year","ordinal","hour","minute","second","millisecond"];function Od(e){const n={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!n)throw new hc(e);return n}function Md(e,n){const r=Qt(n.zone,Me.defaultZone),i=we.fromObject(n),s=Me.now();let o,l;if(te(e.year))o=s;else{for(const d of Dd)te(e[d])&&(e[d]=Bd[d]);const a=xd(e)||Cd(e);if(a)return b.invalid(a);const c=r.offset(s);[o,l]=co(e,c,r)}return new b({ts:o,zone:r,loc:i,o:l})}function Fd(e,n,r){const i=te(r.round)?!0:r.round,s=(l,a)=>(l=ki(l,i||r.calendary?0:2,!0),n.loc.clone(r).relFormatter(r).format(l,a)),o=l=>r.calendary?n.hasSame(e,l)?0:n.startOf(l).diff(e.startOf(l),l).get(l):n.diff(e,l).get(l);if(r.unit)return s(o(r.unit),r.unit);for(const l of r.units){const a=o(l);if(Math.abs(a)>=1)return s(a,l)}return s(e>n?-0:0,r.units[r.units.length-1])}function Id(e){let n={},r;return e.length>0&&typeof e[e.length-1]=="object"?(n=e[e.length-1],r=Array.from(e).slice(0,e.length-1)):r=Array.from(e),[n,r]}class b{constructor(n){const r=n.zone||Me.defaultZone;let i=n.invalid||(Number.isNaN(n.ts)?new kt("invalid input"):null)||(r.isValid?null:ao(r));this.ts=te(n.ts)?Me.now():n.ts;let s=null,o=null;if(!i)if(n.old&&n.old.ts===this.ts&&n.old.zone.equals(r))[s,o]=[n.old.c,n.old.o];else{const a=r.offset(this.ts);s=Nd(this.ts,a),i=Number.isNaN(s.year)?new kt("invalid input"):null,s=i?null:s,o=i?null:a}this._zone=r,this.loc=n.loc||we.create(),this.invalid=i,this.weekData=null,this.c=s,this.o=o,this.isLuxonDateTime=!0}static now(){return new b({})}static local(){const[n,r]=Id(arguments),[i,s,o,l,a,c,d]=r;return Md({year:i,month:s,day:o,hour:l,minute:a,second:c,millisecond:d},n)}static utc(){const[n,r]=Id(arguments),[i,s,o,l,a,c,d]=r;return n.zone=qe.utcInstance,Md({year:i,month:s,day:o,hour:l,minute:a,second:c,millisecond:d},n)}static fromJSDate(n,r={}){const i=ey(n)?n.valueOf():NaN;if(Number.isNaN(i))return b.invalid("invalid input");const s=Qt(r.zone,Me.defaultZone);return s.isValid?new b({ts:i,zone:s,loc:we.fromObject(r)}):b.invalid(ao(s))}static fromMillis(n,r={}){if(yn(n))return n<-Vd||n>Vd?b.invalid("Timestamp out of range"):new b({ts:n,zone:Qt(r.zone,Me.defaultZone),loc:we.fromObject(r)});throw new dt(`fromMillis requires a numerical input, but received a ${typeof n} with value ${n}`)}static fromSeconds(n,r={}){if(yn(n))return new b({ts:n*1e3,zone:Qt(r.zone,Me.defaultZone),loc:we.fromObject(r)});throw new dt("fromSeconds requires a numerical input")}static fromObject(n,r={}){n=n||{};const i=Qt(r.zone,Me.defaultZone);if(!i.isValid)return b.invalid(ao(i));const s=Me.now(),o=te(r.specificOffset)?i.offset(s):r.specificOffset,l=no(n,Od),a=!te(l.ordinal),c=!te(l.year),d=!te(l.month)||!te(l.day),m=c||d,u=l.weekYear||l.weekNumber,f=we.fromObject(r);if((m||a)&&u)throw new cr("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(d&&a)throw new cr("Can't mix ordinal dates with month/day");const h=u||l.weekday&&!m;let g,p,k=Nd(s,o);h?(g=Hk,p=jk,k=Ii(k)):a?(g=Wk,p=qk,k=Ai(k)):(g=Dd,p=Bd);let w=!1;for(const $ of g){const L=l[$];te(L)?w?l[$]=p[$]:l[$]=k[$]:w=!0}const _=h?$k(l):a?zk(l):xd(l),S=_||Cd(l);if(S)return b.invalid(S);const I=h?_d(l):a?bd(l):l,[U,q]=co(I,o,i),V=new b({ts:U,zone:i,o:q,loc:f});return l.weekday&&m&&n.weekday!==V.weekday?b.invalid("mismatched weekday",`you can't specify both a weekday of ${l.weekday} and a date of ${V.toISO()}`):V}static fromISO(n,r={}){const[i,s]=sk(n);return wr(i,s,r,"ISO 8601",n)}static fromRFC2822(n,r={}){const[i,s]=lk(n);return wr(i,s,r,"RFC 2822",n)}static fromHTTP(n,r={}){const[i,s]=ak(n);return wr(i,s,r,"HTTP",r)}static fromFormat(n,r,i={}){if(te(n)||te(r))throw new dt("fromFormat requires an input string and a format");const{locale:s=null,numberingSystem:o=null}=i,l=we.fromOpts({locale:s,numberingSystem:o,defaultToEN:!0}),[a,c,d,m]=Uk(l,n,r);return m?b.invalid(m):wr(a,c,i,`format ${r}`,n,d)}static fromString(n,r,i={}){return b.fromFormat(n,r,i)}static fromSQL(n,r={}){const[i,s]=pk(n);return wr(i,s,r,"SQL",n)}static invalid(n,r=null){if(!n)throw new dt("need to specify a reason the DateTime is invalid");const i=n instanceof kt?n:new kt(n,r);if(Me.throwOnInvalid)throw new Kg(i);return new b({invalid:i})}static isDateTime(n){return n&&n.isLuxonDateTime||!1}get(n){return this[n]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Ri(this).weekYear:NaN}get weekNumber(){return this.isValid?Ri(this).weekNumber:NaN}get weekday(){return this.isValid?Ri(this).weekday:NaN}get ordinal(){return this.isValid?Ai(this.c).ordinal:NaN}get monthShort(){return this.isValid?lo.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?lo.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?lo.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?lo.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}get isInLeapYear(){return dr(this.year)}get daysInMonth(){return vr(this.year,this.month)}get daysInYear(){return this.isValid?ur(this.year):NaN}get weeksInWeekYear(){return this.isValid?eo(this.weekYear):NaN}resolvedLocaleOptions(n={}){const{locale:r,numberingSystem:i,calendar:s}=Ye.create(this.loc.clone(n),n).resolvedOptions(this);return{locale:r,numberingSystem:i,outputCalendar:s}}toUTC(n=0,r={}){return this.setZone(qe.instance(n),r)}toLocal(){return this.setZone(Me.defaultZone)}setZone(n,{keepLocalTime:r=!1,keepCalendarTime:i=!1}={}){if(n=Qt(n,Me.defaultZone),n.equals(this.zone))return this;if(n.isValid){let s=this.ts;if(r||i){const o=n.offset(this.ts),l=this.toObject();[s]=co(l,o,n)}return kr(this,{ts:s,zone:n})}else return b.invalid(ao(n))}reconfigure({locale:n,numberingSystem:r,outputCalendar:i}={}){const s=this.loc.clone({locale:n,numberingSystem:r,outputCalendar:i});return kr(this,{loc:s})}setLocale(n){return this.reconfigure({locale:n})}set(n){if(!this.isValid)return this;const r=no(n,Od),i=!te(r.weekYear)||!te(r.weekNumber)||!te(r.weekday),s=!te(r.ordinal),o=!te(r.year),l=!te(r.month)||!te(r.day),a=o||l,c=r.weekYear||r.weekNumber;if((a||s)&&c)throw new cr("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&s)throw new cr("Can't mix ordinal dates with month/day");let d;i?d=_d({...Ii(this.c),...r}):te(r.ordinal)?(d={...this.toObject(),...r},te(r.day)&&(d.day=Math.min(vr(d.year,d.month),d.day))):d=bd({...Ai(this.c),...r});const[m,u]=co(d,this.o,this.zone);return kr(this,{ts:m,o:u})}plus(n){if(!this.isValid)return this;const r=oe.fromDurationLike(n);return kr(this,Td(this,r))}minus(n){if(!this.isValid)return this;const r=oe.fromDurationLike(n).negate();return kr(this,Td(this,r))}startOf(n){if(!this.isValid)return this;const r={},i=oe.normalizeUnit(n);switch(i){case"years":r.month=1;case"quarters":case"months":r.day=1;case"weeks":case"days":r.hour=0;case"hours":r.minute=0;case"minutes":r.second=0;case"seconds":r.millisecond=0;break}if(i==="weeks"&&(r.weekday=1),i==="quarters"){const s=Math.ceil(this.month/3);r.month=(s-1)*3+1}return this.set(r)}endOf(n){return this.isValid?this.plus({[n]:1}).startOf(n).minus(1):this}toFormat(n,r={}){return this.isValid?Ye.create(this.loc.redefaultToEN(r)).formatDateTimeFromString(this,n):Li}toLocaleString(n=gi,r={}){return this.isValid?Ye.create(this.loc.clone(r),n).formatDateTime(this):Li}toLocaleParts(n={}){return this.isValid?Ye.create(this.loc.clone(n),n).formatDateTimeParts(this):[]}toISO({format:n="extended",suppressSeconds:r=!1,suppressMilliseconds:i=!1,includeOffset:s=!0,extendedZone:o=!1}={}){if(!this.isValid)return null;const l=n==="extended";let a=Pi(this,l);return a+="T",a+=Sd(this,l,r,i,s,o),a}toISODate({format:n="extended"}={}){return this.isValid?Pi(this,n==="extended"):null}toISOWeekDate(){return uo(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:n=!1,suppressSeconds:r=!1,includeOffset:i=!0,includePrefix:s=!1,extendedZone:o=!1,format:l="extended"}={}){return this.isValid?(s?"T":"")+Sd(this,l==="extended",r,n,i,o):null}toRFC2822(){return uo(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return uo(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?Pi(this,!0):null}toSQLTime({includeOffset:n=!0,includeZone:r=!1,includeOffsetSpace:i=!0}={}){let s="HH:mm:ss.SSS";return(r||n)&&(i&&(s+=" "),r?s+="z":n&&(s+="ZZ")),uo(this,s,!0)}toSQL(n={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(n)}`:null}toString(){return this.isValid?this.toISO():Li}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(n={}){if(!this.isValid)return{};const r={...this.c};return n.includeConfig&&(r.outputCalendar=this.outputCalendar,r.numberingSystem=this.loc.numberingSystem,r.locale=this.loc.locale),r}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(n,r="milliseconds",i={}){if(!this.isValid||!n.isValid)return oe.invalid("created by diffing an invalid DateTime");const s={locale:this.locale,numberingSystem:this.numberingSystem,...i},o=ty(r).map(oe.normalizeUnit),l=n.valueOf()>this.valueOf(),a=l?this:n,c=l?n:this,d=Vk(a,c,o,s);return l?d.negate():d}diffNow(n="milliseconds",r={}){return this.diff(b.now(),n,r)}until(n){return this.isValid?xe.fromDateTimes(this,n):this}hasSame(n,r){if(!this.isValid)return!1;const i=n.valueOf(),s=this.setZone(n.zone,{keepLocalTime:!0});return s.startOf(r)<=i&&i<=s.endOf(r)}equals(n){return this.isValid&&n.isValid&&this.valueOf()===n.valueOf()&&this.zone.equals(n.zone)&&this.loc.equals(n.loc)}toRelative(n={}){if(!this.isValid)return null;const r=n.base||b.fromObject({},{zone:this.zone}),i=n.padding?this<r?-n.padding:n.padding:0;let s=["years","months","days","hours","minutes","seconds"],o=n.unit;return Array.isArray(n.unit)&&(s=n.unit,o=void 0),Fd(r,this.plus(i),{...n,numeric:"always",units:s,unit:o})}toRelativeCalendar(n={}){return this.isValid?Fd(n.base||b.fromObject({},{zone:this.zone}),this,{...n,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...n){if(!n.every(b.isDateTime))throw new dt("min requires all arguments be DateTimes");return Ac(n,r=>r.valueOf(),Math.min)}static max(...n){if(!n.every(b.isDateTime))throw new dt("max requires all arguments be DateTimes");return Ac(n,r=>r.valueOf(),Math.max)}static fromFormatExplain(n,r,i={}){const{locale:s=null,numberingSystem:o=null}=i,l=we.fromOpts({locale:s,numberingSystem:o,defaultToEN:!0});return hd(l,n,r)}static fromStringExplain(n,r,i={}){return b.fromFormatExplain(n,r,i)}static get DATE_SHORT(){return gi}static get DATE_MED(){return pc}static get DATE_MED_WITH_WEEKDAY(){return Xg}static get DATE_FULL(){return gc}static get DATE_HUGE(){return yc}static get TIME_SIMPLE(){return kc}static get TIME_WITH_SECONDS(){return wc}static get TIME_WITH_SHORT_OFFSET(){return _c}static get TIME_WITH_LONG_OFFSET(){return bc}static get TIME_24_SIMPLE(){return xc}static get TIME_24_WITH_SECONDS(){return Cc}static get TIME_24_WITH_SHORT_OFFSET(){return Vc}static get TIME_24_WITH_LONG_OFFSET(){return Ec}static get DATETIME_SHORT(){return Nc}static get DATETIME_SHORT_WITH_SECONDS(){return Tc}static get DATETIME_MED(){return Sc}static get DATETIME_MED_WITH_SECONDS(){return Bc}static get DATETIME_MED_WITH_WEEKDAY(){return Qg}static get DATETIME_FULL(){return Dc}static get DATETIME_FULL_WITH_SECONDS(){return Oc}static get DATETIME_HUGE(){return Mc}static get DATETIME_HUGE_WITH_SECONDS(){return Fc}}function _r(e){if(b.isDateTime(e))return e;if(e&&e.valueOf&&yn(e.valueOf()))return b.fromJSDate(e);if(e&&typeof e=="object")return b.fromObject(e);throw new dt(`Unknown datetime argument: ${e}, of type ${typeof e}`)}const ue={};ue.format=function(e,n){return e=e?new Date(e):new Date,b.fromJSDate(e).toFormat(n)},ue.readableTime=function(e){if(e=String(e||""),!e||!/^\d{4}$/.test(e))return e;const n=e.substring(0,2),r=e.substring(2,4);return console.log(e,n,r),b.fromObject({hour:parseInt(n,10),minute:parseInt(r,10)}).toFormat("h:mma").toLowerCase().replace(/:00/g,"")},ue.timeago=function(e,n){return b.fromJSDate(new Date(e)).toRelative(n)},ue.getDatesBetween=function(e,n){const r=[];let i=b.fromISO(e);const s=b.fromISO(n);for(;i<=s;)r.push(i.toISODate()),i=i.plus({days:1});return r},ue.getCalendarDateLimits=function(e){const n=e.getFullYear(),r=e.getMonth(),i=new Date(n,r,1),s=new Date(n,r+1,0),o=new Date(i);o.setDate(o.getDate()-o.getDay());const l=new Date(s);l.setDate(l.getDate()+(6-l.getDay()));const a={weekday:"long",day:"numeric",month:"long",year:"numeric"},c=o.toLocaleDateString("en-US",a),d=l.toLocaleDateString("en-US",a);return{start:new Date(c),end:new Date(d)}},ue.getMiddleDate=function(e,n){const r=e.getTime(),i=n.getTime(),s=(r+i)/2;return new Date(s)},ue.shortTime=function(e){return e.toJSDate||(e=b.fromJSDate(new Date(e))),e.toFormat("mm")==="00"?e.toFormat("ha").toLowerCase():e.toFormat("h:mma").toLowerCase()},ue.readableEventDate=function({startDate:e,endDate:n,timezone:r},i){if(!e)return"";e=new Date(e),n=n?new Date(n):void 0;let s,o;try{s=r?b.fromJSDate(e).setZone(r):b.fromJSDate(e),o=n?r?b.fromJSDate(n).setZone(r):b.fromJSDate(n):s}catch{s=b.fromJSDate(e),o=n?b.fromJSDate(n):s}const l=b.now(),a=r&&s.zoneName!==b.local().zoneName?` (${s.zoneName})`:"",d=s.year!==l.year?` ${s.year}`:"";return s.hasSame(o,"day")?ue.shortTime(s)==="12am"?`${s.toFormat("d MMMM")}${d}${a}`:`${ue.shortTime(s)}, ${s.toFormat("cccc d MMMM")}${d}${a}`:s.hasSame(o,"month")?`${s.toFormat("d")}-${o.toFormat("d MMMM")}${d}${a}`:s.hasSame(o,"year")?`${s.toFormat("d MMM")} - ${o.toFormat("d MMM")}${d}${a}`:`${s.toFormat("d MMM yyyy")} - ${o.toFormat("d MMM yyyy")}${a}`},ue.readableDateRange=function(e,n,r){if(!e)return;if(!n)return ue.readableDate(e);e=b.fromJSDate(new Date(e)),n=b.fromJSDate(new Date(n));const i=e.toFormat("yyyy"),s=e.toFormat("LLL yyyy"),o=e.toFormat("WW yyyy"),l=e.toFormat("d LLL yyyy"),a=n.toFormat("yyyy"),c=n.toFormat("LLL yyyy"),d=n.toFormat("WW yyyy"),m=n.toFormat("d LLL yyyy");return l===m?ue.shortTime(e)==="12am"?`${ue.readableDate(n)}`:`${ue.shortTime(e)} - ${ue.readableDate(n)}`:o===d?`${ue.readableDate(e)} - ${ue.readableDate(n)}`:s===c?`${e.toFormat("d")} - ${n.toFormat("d LLL")}`:i===a?`${ue.readableDate(e)} - ${ue.readableDate(n)}`:`${ue.readableDate(e)} - ${ue.readableDate(n)}`},ue.readableDate=function(e){if(!e)return;const n=new Date,r=b.fromJSDate(n),i=r.toFormat("yyyy"),s=r.toFormat("LLL yyyy"),o=r.toFormat("WW yyyy"),l=r.toFormat("d LLL yyyy");e=new Date(e);const a=b.fromJSDate(e),c=a.toFormat("yyyy"),d=a.toFormat("LLL yyyy"),m=a.toFormat("WW yyyy");if(a.toFormat("d LLL yyyy")===l)return`${ue.shortTime(a)} today`;if(m===o)if(e>n){const f=parseInt(r.toFormat("d"));return parseInt(a.toFormat("d"))-f===1?`${ue.shortTime(a)} tomorrow`:`${ue.shortTime(a)} ${a.toFormat("cccc")}`}else return`${a.toRelativeCalendar()}`;return d===s?ue.shortTime(a)==="12am"?`${a.toFormat("d LLL")}`:`${ue.shortTime(a)} ${a.toFormat("d LLL")}`:c===i?a.toFormat("cccc d LLL"):a.toFormat("d LLL yyyy")};function Ad(e){var h,g;const n=t.reactive({items:[],hash:{},hex:{},loading:!1,loaded:!1,_fullyLoaded:{}});let r=null;const i={};function s(p,k){if(!(!p||!k))for(const w of Object.keys(k))p[w]=k[w]}function o(p){const k={},w={};return p.forEach(function(_){_.key&&(k[_.key]=_),_.hex&&(w[_.hex]=_)}),{hash:k,hex:w}}async function l(p){if(r)return r;if(!(n.loaded&&!p))return r=a(),r}async function a(p){if(!e.auth.getCurrentUser()){m();return}n.loading=!0;try{const{data:w}=await e.api.get("/glossary/index",{cache:!1}),_=w||[],{hash:S,hex:I}=o(_);n._fullyLoaded={},n.items=_,n.hash=S,n.hex=I,n.loaded=!0}catch(w){console.error("GlossaryService: failed to load glossary index",w)}finally{n.loading=!1,r=null}}async function c(p,k){return n._fullyLoaded[p]&&!k?n.hash[p]:(i[p]||(i[p]=d(p)),i[p])}async function d(p,k){try{const{data:w}=await e.api.get(`/glossary/index/${p}`,{cache:!1});if(!w)return;n.hash[p]?s(n.hash[p],w):n.hash[p]=w;const _=n.items.findIndex(function(S){return S.key===p});return _!==-1&&s(n.items[_],w),n._fullyLoaded[p]=!0,n.hash[p]}catch(w){console.error(`GlossaryService: failed to load definition for '${p}'`,w)}finally{delete i[p]}}n.ensure=async function(p){if(!p)return l(!1);if(await l(!1),typeof p=="string")return c(p,!1);if(Array.isArray(p))return Promise.all(p.map(function(k){return c(k,!1)}))},n.reload=async function(p){if(!p)return l(!0);if(await l(!1),typeof p=="string")return c(p,!0);if(Array.isArray(p))return Promise.all(p.map(function(k){return c(k,!0)}))},n.definitionName=function(p,k){const w=n.hash[p];return w?k?w.plural:w.title:p},n.clear=m;function m(){n.items=[],n.hash={},n.hex={},n.loaded=!1,n.loading=!1,n._fullyLoaded={},r=null;for(const p in i)delete i[p]}let u=null;e.auth.addEventListener("change",function(p){var k,w;if(p){const _=(w=(k=p==null?void 0:p.session)==null?void 0:k.organisation)==null?void 0:w._id;u&&_!==u&&m(),u=_||null,l(!1)}else u=null,m()});const f=e.auth.getCurrentUser();return f&&(u=((g=(h=f==null?void 0:f.session)==null?void 0:h.organisation)==null?void 0:g._id)||null,l(!1)),n}const mo={STRIPE_NOT_LOADED:"Stripe v3 library is not loaded",INSTANCE_NOT_DEFINED:"Instance object is not defined. Make sure you initialized Stripe before creating elements",ELEMENTS_NOT_DEFINED:"Elements object is not defined. You can't create stripe element without it",ELEMENT_TYPE_NOT_DEFINED:"elementType is required. You can't create stripe element without it"},Gk=(e,n)=>{try{if(!window.Stripe)throw new Error(mo.STRIPE_NOT_LOADED);return window.Stripe(e,n)}catch(r){return console.error(r),r}},Yk=(e,n)=>{try{if(!e)throw new Error(mo.INSTANCE_NOT_DEFINED);return e.elements(n)}catch(r){return console.error(r),r}},Kk=(e,n,r)=>{try{if(!e)throw new Error(mo.ELEMENTS_NOT_DEFINED);if(!n)throw new Error(mo.ELEMENT_TYPE_NOT_DEFINED);return e.create(n,r)}catch(i){return console.error(i),i}};var Ld=(e,n)=>{const r=e.__vccOpts||e;for(const[i,s]of n)r[i]=s;return r};const Jk=t.defineComponent({name:"StripeElement",props:{elements:{type:Object,required:!0},type:{type:String,default:()=>"card"},options:{type:Object,default:()=>({})}},setup(e,{emit:n}){const r=t.ref(document.createElement("div")),i=t.ref(),s=t.ref(),{elements:o,type:l,options:a}=t.toRefs(e);return t.onMounted(()=>{const c=()=>{i.value=Kk(o.value,l.value,a.value),i.value.mount(r.value),s.value.appendChild(r.value)},d=(u,f)=>{n(u,f)},m=()=>{["change","ready","focus","blur","click","escape"].forEach(f=>{i.value.on(f,d.bind(null,f))})};try{c(),m()}catch(u){console.error(u)}}),t.onBeforeUnmount(()=>{var c,d;(c=i.value)==null||c.unmount(),(d=i.value)==null||d.destroy()}),t.watch(a,()=>{var c;(c=i.value)==null||c.update(e.options)}),{stripeElement:i,domElement:r,mountPoint:s}}}),Zk={ref:"mountPoint"};function Xk(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",Zk,null,512)}var Ui=Ld(Jk,[["render",Xk]]);const Qk=t.defineComponent({name:"StripeElements",props:{stripeKey:{type:String,required:!0},instanceOptions:{type:Object,default:()=>({})},elementsOptions:{type:Object,default:()=>({})}},setup(e){const{stripeKey:n,instanceOptions:r,elementsOptions:i}=t.toRefs(e),s=t.ref(),o=t.ref(),l=t.computed(()=>o.value?Object.keys(o.value).length>0:!1);return t.onMounted(()=>{s.value=Gk(n.value,r.value),o.value=Yk(s.value,i.value)}),t.watch(i,()=>{var a;(a=o.value)==null||a.update(i.value)}),{elements:o,instance:s,elementsUsable:l}}}),vk={key:0};function ew(e,n,r,i,s,o){return e.elementsUsable?(t.openBlock(),t.createElementBlock("div",vk,[t.renderSlot(e.$slots,"default",{instance:e.instance,elements:e.elements})])):t.createCommentVNode("",!0)}var $i=Ld(Qk,[["render",ew]]);const C=(e,n)=>{const r=e.__vccOpts||e;for(const[i,s]of n)r[i]=s;return r},tw={props:{center:{type:Boolean},shrink:{type:Boolean}}};function nw(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["flex-column",{center:r.center,shrink:r.shrink}])},[t.renderSlot(e.$slots,"default",{},void 0,!0)],2)}const Rd=C(tw,[["render",nw],["__scopeId","data-v-b03628f8"]]),rw={},ow={class:"flex-column-body"};function iw(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",ow,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}const Pd=C(rw,[["render",iw],["__scopeId","data-v-ab49c425"]]),sw={},lw={class:"flex-column-header"};function aw(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",lw,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}const Ud=C(sw,[["render",aw],["__scopeId","data-v-968bcded"]]),cw={},dw={class:"flex-column-footer"};function uw(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",dw,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}const $d=C(cw,[["render",uw],["__scopeId","data-v-941966e2"]]),mw={props:{flex:{type:Boolean},center:{type:Boolean},vcenter:{type:Boolean},alignBottom:{type:Boolean},shrink:{type:Boolean}}};function fw(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["flex-cell",{flex:r.flex,center:r.center,vcenter:r.vcenter,"align-bottom":r.alignBottom,shrink:r.shrink}])},[t.renderSlot(e.$slots,"default",{},void 0,!0)],2)}const zd=C(mw,[["render",fw],["__scopeId","data-v-efd82fd0"]]),hw={props:{center:{type:Boolean},vcenter:{type:Boolean},gap:{type:Boolean},wrap:{type:Boolean}}};function pw(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["flex-row",{gap:r.gap,vcenter:r.vcenter,center:r.center,wrap:r.wrap}])},[t.renderSlot(e.$slots,"default",{},void 0,!0)],2)}const jd=C(hw,[["render",pw],["__scopeId","data-v-bd96c129"]]),gw={},yw={class:"flex-spacer"};function kw(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",yw)}const qd=C(gw,[["render",kw],["__scopeId","data-v-f42ac625"]]),ww={},_w={class:"panel"};function bw(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",_w,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}const Hd=C(ww,[["render",bw],["__scopeId","data-v-dc6d0d19"]]),xw={},Cw={class:"panel-body"};function Vw(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",Cw,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}const Wd=C(xw,[["render",Vw],["__scopeId","data-v-53a6d4be"]]),Ew={},Nw={class:"panel-header"};function Tw(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",Nw,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}const Gd=C(Ew,[["render",Tw],["__scopeId","data-v-49143033"]]),Sw={},Bw={class:"panel-footer"};function Dw(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",Bw,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}const Yd=C(Sw,[["render",Dw],["__scopeId","data-v-e87fc082"]]);var fo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function vt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var zi,Kd;function br(){if(Kd)return zi;Kd=1;function e(n){var r=typeof n;return n!=null&&(r=="object"||r=="function")}return zi=e,zi}var ji,Jd;function Zd(){if(Jd)return ji;Jd=1;var e=typeof fo=="object"&&fo&&fo.Object===Object&&fo;return ji=e,ji}var qi,Xd;function Hn(){if(Xd)return qi;Xd=1;var e=Zd(),n=typeof self=="object"&&self&&self.Object===Object&&self,r=e||n||Function("return this")();return qi=r,qi}var Hi,Qd;function Ow(){if(Qd)return Hi;Qd=1;var e=Hn(),n=function(){return e.Date.now()};return Hi=n,Hi}var Wi,vd;function Mw(){if(vd)return Wi;vd=1;var e=/\s/;function n(r){for(var i=r.length;i--&&e.test(r.charAt(i)););return i}return Wi=n,Wi}var Gi,eu;function Fw(){if(eu)return Gi;eu=1;var e=Mw(),n=/^\s+/;function r(i){return i&&i.slice(0,e(i)+1).replace(n,"")}return Gi=r,Gi}var Yi,tu;function Ki(){if(tu)return Yi;tu=1;var e=Hn(),n=e.Symbol;return Yi=n,Yi}var Ji,nu;function Iw(){if(nu)return Ji;nu=1;var e=Ki(),n=Object.prototype,r=n.hasOwnProperty,i=n.toString,s=e?e.toStringTag:void 0;function o(l){var a=r.call(l,s),c=l[s];try{l[s]=void 0;var d=!0}catch{}var m=i.call(l);return d&&(a?l[s]=c:delete l[s]),m}return Ji=o,Ji}var Zi,ru;function Aw(){if(ru)return Zi;ru=1;var e=Object.prototype,n=e.toString;function r(i){return n.call(i)}return Zi=r,Zi}var Xi,ou;function xr(){if(ou)return Xi;ou=1;var e=Ki(),n=Iw(),r=Aw(),i="[object Null]",s="[object Undefined]",o=e?e.toStringTag:void 0;function l(a){return a==null?a===void 0?s:i:o&&o in Object(a)?n(a):r(a)}return Xi=l,Xi}var Qi,iu;function Cr(){if(iu)return Qi;iu=1;function e(n){return n!=null&&typeof n=="object"}return Qi=e,Qi}var vi,su;function ho(){if(su)return vi;su=1;var e=xr(),n=Cr(),r="[object Symbol]";function i(s){return typeof s=="symbol"||n(s)&&e(s)==r}return vi=i,vi}var es,lu;function au(){if(lu)return es;lu=1;var e=Fw(),n=br(),r=ho(),i=NaN,s=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,l=/^0o[0-7]+$/i,a=parseInt;function c(d){if(typeof d=="number")return d;if(r(d))return i;if(n(d)){var m=typeof d.valueOf=="function"?d.valueOf():d;d=n(m)?m+"":m}if(typeof d!="string")return d===0?d:+d;d=e(d);var u=o.test(d);return u||l.test(d)?a(d.slice(2),u?2:8):s.test(d)?i:+d}return es=c,es}var ts,cu;function Lw(){if(cu)return ts;cu=1;var e=br(),n=Ow(),r=au(),i="Expected a function",s=Math.max,o=Math.min;function l(a,c,d){var m,u,f,h,g,p,k=0,w=!1,_=!1,S=!0;if(typeof a!="function")throw new TypeError(i);c=r(c)||0,e(d)&&(w=!!d.leading,_="maxWait"in d,f=_?s(r(d.maxWait)||0,c):f,S="trailing"in d?!!d.trailing:S);function I(K){var ce=m,me=u;return m=u=void 0,k=K,h=a.apply(me,ce),h}function U(K){return k=K,g=setTimeout($,c),w?I(K):h}function q(K){var ce=K-p,me=K-k,ge=c-ce;return _?o(ge,f-me):ge}function V(K){var ce=K-p,me=K-k;return p===void 0||ce>=c||ce<0||_&&me>=f}function $(){var K=n();if(V(K))return L(K);g=setTimeout($,q(K))}function L(K){return g=void 0,S&&m?I(K):(m=u=void 0,h)}function R(){g!==void 0&&clearTimeout(g),k=0,m=p=u=g=void 0}function j(){return g===void 0?h:L(n())}function re(){var K=n(),ce=V(K);if(m=arguments,u=this,p=K,ce){if(g===void 0)return U(p);if(_)return clearTimeout(g),g=setTimeout($,c),I(p)}return g===void 0&&(g=setTimeout($,c)),h}return re.cancel=R,re.flush=j,re}return ts=l,ts}var Rw=Lw();const Wn=vt(Rw),Pw=["onClick"],Uw=["onClick"],du=C({__name:"tabset",props:{vertical:Boolean,inline:Boolean,pills:Boolean,defaultTab:String},setup(e){const n=t.useSlots(),r=e,i=t.reactive({tabs:[]});t.provide("tabset",i);const s=t.ref();t.provide("activeHeading",s);const o=function(f){s.value=f},l=Wn(function(){const h=n.default().reduce(function(k,w){var _;return((_=w.type)==null?void 0:_.name)==="tab"?k.push(w):w.children&&(k=[...k,...w.children]),k},[]).filter(function(k){var w;return((w=k.type)==null?void 0:w.name)==="tab"&&k.props.enabled!==!1}).map(function(k,w){const _=k.props.heading,S=k.props.tabKey||_;return{heading:_,key:S,index:w}});i.tabs=h;const g=h.reduce(function(k,w){return k[w.key||w.heading]=!0,k},{}),p=s.value;if((!p||!g[p])&&h.length){let k;r.defaultTab&&g[r.defaultTab]?k=r.defaultTab:k=h[0].key||h[0].heading,s.value=k}});t.provide("rebuild",l);const a=t.computed(function(){return i.tabs.map(function(f){if(f)return f.heading}).filter(Boolean)}),c=t.computed(function(){return i.tabs.map(function(f){if(f)return f.key}).filter(Boolean)}),d=t.computed(function(){return a.value.length>1}),m=t.ref(null);function u(){t.nextTick(function(){const f=m.value&&m.value.$el;if(!f)return;const h=f.querySelector("a.active");if(!h){f.style.removeProperty("--ind-width");return}f.style.setProperty("--ind-left",`${h.offsetLeft}px`),f.style.setProperty("--ind-width",`${h.offsetWidth}px`)})}return t.watch(s,u),t.watch(a,u),t.onMounted(function(){u(),window.addEventListener("resize",u),document.fonts&&document.fonts.ready&&document.fonts.ready.then(u)}),t.onBeforeUnmount(function(){window.removeEventListener("resize",u)}),l(),(f,h)=>{const g=t.resolveComponent("flex-body"),p=t.resolveComponent("flex-column"),k=t.resolveComponent("ux-button"),w=t.resolveComponent("flex-row"),_=t.resolveComponent("flex-header");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["ux-tabset",{vertical:e.vertical,horizontal:!e.vertical,inline:e.inline,block:!e.inline&&!e.pills,pills:e.pills}])},[e.vertical?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[d.value?(t.openBlock(),t.createBlock(p,{key:0,class:"tabset-menu"},{default:t.withCtx(()=>[t.createVNode(g,null,{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.value,(S,I)=>(t.openBlock(),t.createElementBlock("a",{class:t.normalizeClass({active:s.value===S}),key:`tab-link-${S}`,onClick:U=>o(S)},t.toDisplayString(a.value[I]),11,Pw))),128))]),_:1})]),_:1})):t.createCommentVNode("",!0)],64)):e.pills?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[d.value?(t.openBlock(),t.createBlock(_,{key:0,class:"tabset-menu"},{default:t.withCtx(()=>[t.createVNode(w,null,{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.value,(S,I)=>(t.openBlock(),t.createBlock(k,{color:s.value===S?"primary":"",key:`tab-pill-${S}`,onClick:U=>o(S)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(a.value[I]),1)]),_:2},1032,["color","onClick"]))),128))]),_:1})]),_:1})):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[d.value?(t.openBlock(),t.createBlock(_,{key:0,class:"tabset-menu"},{default:t.withCtx(()=>[t.createVNode(w,{ref_key:"menuRow",ref:m},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.value,(S,I)=>(t.openBlock(),t.createElementBlock("a",{class:t.normalizeClass({active:s.value===S}),key:`tab-link-${S}`,onClick:U=>o(S)},t.toDisplayString(a.value[I]),11,Uw))),128))]),_:1},512)]),_:1})):t.createCommentVNode("",!0)],64)),t.createVNode(p,null,{default:t.withCtx(()=>[t.renderSlot(f.$slots,"default",{},void 0,!0)]),_:3})],2)}}},[["__scopeId","data-v-e4752404"]]),$w={emits:["mount","unmount"],name:"tab",props:{heading:{type:String,required:!0},tabKey:{type:String},enabled:{type:Boolean,default:!0},keepAlive:{type:Boolean,default:!1}},created(){this.rebuild()},unmounted(){this.rebuild()},watch:{heading(){this.rebuild()}},inject:["tabset","activeHeading","rebuild"],computed:{active(){var r;return String(this.tabKey||this.heading)===String(((r=this.activeHeading)==null?void 0:r.value)||this.activeHeading)}}};function zw(e,n,r,i,s,o){const l=t.resolveComponent("flex-column");return r.keepAlive?t.withDirectives((t.openBlock(),t.createBlock(l,{key:0},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},512)),[[t.vShow,o.active]]):o.active?(t.openBlock(),t.createBlock(l,{key:1},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3})):t.createCommentVNode("",!0)}const uu=C($w,[["render",zw]]);var ns,mu;function Vr(){if(mu)return ns;mu=1;var e=Array.isArray;return ns=e,ns}var rs,fu;function jw(){if(fu)return rs;fu=1;var e=Vr(),n=ho(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/;function s(o,l){if(e(o))return!1;var a=typeof o;return a=="number"||a=="symbol"||a=="boolean"||o==null||n(o)?!0:i.test(o)||!r.test(o)||l!=null&&o in Object(l)}return rs=s,rs}var os,hu;function pu(){if(hu)return os;hu=1;var e=xr(),n=br(),r="[object AsyncFunction]",i="[object Function]",s="[object GeneratorFunction]",o="[object Proxy]";function l(a){if(!n(a))return!1;var c=e(a);return c==i||c==s||c==r||c==o}return os=l,os}var is,gu;function qw(){if(gu)return is;gu=1;var e=Hn(),n=e["__core-js_shared__"];return is=n,is}var ss,yu;function Hw(){if(yu)return ss;yu=1;var e=qw(),n=function(){var i=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""}();function r(i){return!!n&&n in i}return ss=r,ss}var ls,ku;function Ww(){if(ku)return ls;ku=1;var e=Function.prototype,n=e.toString;function r(i){if(i!=null){try{return n.call(i)}catch{}try{return i+""}catch{}}return""}return ls=r,ls}var as,wu;function Gw(){if(wu)return as;wu=1;var e=pu(),n=Hw(),r=br(),i=Ww(),s=/[\\^$.*+?()[\]{}|]/g,o=/^\[object .+?Constructor\]$/,l=Function.prototype,a=Object.prototype,c=l.toString,d=a.hasOwnProperty,m=RegExp("^"+c.call(d).replace(s,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function u(f){if(!r(f)||n(f))return!1;var h=e(f)?m:o;return h.test(i(f))}return as=u,as}var cs,_u;function Yw(){if(_u)return cs;_u=1;function e(n,r){return n==null?void 0:n[r]}return cs=e,cs}var ds,bu;function us(){if(bu)return ds;bu=1;var e=Gw(),n=Yw();function r(i,s){var o=n(i,s);return e(o)?o:void 0}return ds=r,ds}var ms,xu;function po(){if(xu)return ms;xu=1;var e=us(),n=e(Object,"create");return ms=n,ms}var fs,Cu;function Kw(){if(Cu)return fs;Cu=1;var e=po();function n(){this.__data__=e?e(null):{},this.size=0}return fs=n,fs}var hs,Vu;function Jw(){if(Vu)return hs;Vu=1;function e(n){var r=this.has(n)&&delete this.__data__[n];return this.size-=r?1:0,r}return hs=e,hs}var ps,Eu;function Zw(){if(Eu)return ps;Eu=1;var e=po(),n="__lodash_hash_undefined__",r=Object.prototype,i=r.hasOwnProperty;function s(o){var l=this.__data__;if(e){var a=l[o];return a===n?void 0:a}return i.call(l,o)?l[o]:void 0}return ps=s,ps}var gs,Nu;function Xw(){if(Nu)return gs;Nu=1;var e=po(),n=Object.prototype,r=n.hasOwnProperty;function i(s){var o=this.__data__;return e?o[s]!==void 0:r.call(o,s)}return gs=i,gs}var ys,Tu;function Qw(){if(Tu)return ys;Tu=1;var e=po(),n="__lodash_hash_undefined__";function r(i,s){var o=this.__data__;return this.size+=this.has(i)?0:1,o[i]=e&&s===void 0?n:s,this}return ys=r,ys}var ks,Su;function vw(){if(Su)return ks;Su=1;var e=Kw(),n=Jw(),r=Zw(),i=Xw(),s=Qw();function o(l){var a=-1,c=l==null?0:l.length;for(this.clear();++a<c;){var d=l[a];this.set(d[0],d[1])}}return o.prototype.clear=e,o.prototype.delete=n,o.prototype.get=r,o.prototype.has=i,o.prototype.set=s,ks=o,ks}var ws,Bu;function e_(){if(Bu)return ws;Bu=1;function e(){this.__data__=[],this.size=0}return ws=e,ws}var _s,Du;function Ou(){if(Du)return _s;Du=1;function e(n,r){return n===r||n!==n&&r!==r}return _s=e,_s}var bs,Mu;function go(){if(Mu)return bs;Mu=1;var e=Ou();function n(r,i){for(var s=r.length;s--;)if(e(r[s][0],i))return s;return-1}return bs=n,bs}var xs,Fu;function t_(){if(Fu)return xs;Fu=1;var e=go(),n=Array.prototype,r=n.splice;function i(s){var o=this.__data__,l=e(o,s);if(l<0)return!1;var a=o.length-1;return l==a?o.pop():r.call(o,l,1),--this.size,!0}return xs=i,xs}var Cs,Iu;function n_(){if(Iu)return Cs;Iu=1;var e=go();function n(r){var i=this.__data__,s=e(i,r);return s<0?void 0:i[s][1]}return Cs=n,Cs}var Vs,Au;function r_(){if(Au)return Vs;Au=1;var e=go();function n(r){return e(this.__data__,r)>-1}return Vs=n,Vs}var Es,Lu;function o_(){if(Lu)return Es;Lu=1;var e=go();function n(r,i){var s=this.__data__,o=e(s,r);return o<0?(++this.size,s.push([r,i])):s[o][1]=i,this}return Es=n,Es}var Ns,Ru;function i_(){if(Ru)return Ns;Ru=1;var e=e_(),n=t_(),r=n_(),i=r_(),s=o_();function o(l){var a=-1,c=l==null?0:l.length;for(this.clear();++a<c;){var d=l[a];this.set(d[0],d[1])}}return o.prototype.clear=e,o.prototype.delete=n,o.prototype.get=r,o.prototype.has=i,o.prototype.set=s,Ns=o,Ns}var Ts,Pu;function s_(){if(Pu)return Ts;Pu=1;var e=us(),n=Hn(),r=e(n,"Map");return Ts=r,Ts}var Ss,Uu;function l_(){if(Uu)return Ss;Uu=1;var e=vw(),n=i_(),r=s_();function i(){this.size=0,this.__data__={hash:new e,map:new(r||n),string:new e}}return Ss=i,Ss}var Bs,$u;function a_(){if($u)return Bs;$u=1;function e(n){var r=typeof n;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?n!=="__proto__":n===null}return Bs=e,Bs}var Ds,zu;function yo(){if(zu)return Ds;zu=1;var e=a_();function n(r,i){var s=r.__data__;return e(i)?s[typeof i=="string"?"string":"hash"]:s.map}return Ds=n,Ds}var Os,ju;function c_(){if(ju)return Os;ju=1;var e=yo();function n(r){var i=e(this,r).delete(r);return this.size-=i?1:0,i}return Os=n,Os}var Ms,qu;function d_(){if(qu)return Ms;qu=1;var e=yo();function n(r){return e(this,r).get(r)}return Ms=n,Ms}var Fs,Hu;function u_(){if(Hu)return Fs;Hu=1;var e=yo();function n(r){return e(this,r).has(r)}return Fs=n,Fs}var Is,Wu;function m_(){if(Wu)return Is;Wu=1;var e=yo();function n(r,i){var s=e(this,r),o=s.size;return s.set(r,i),this.size+=s.size==o?0:1,this}return Is=n,Is}var As,Gu;function Yu(){if(Gu)return As;Gu=1;var e=l_(),n=c_(),r=d_(),i=u_(),s=m_();function o(l){var a=-1,c=l==null?0:l.length;for(this.clear();++a<c;){var d=l[a];this.set(d[0],d[1])}}return o.prototype.clear=e,o.prototype.delete=n,o.prototype.get=r,o.prototype.has=i,o.prototype.set=s,As=o,As}var Ls,Ku;function f_(){if(Ku)return Ls;Ku=1;var e=Yu(),n="Expected a function";function r(i,s){if(typeof i!="function"||s!=null&&typeof s!="function")throw new TypeError(n);var o=function(){var l=arguments,a=s?s.apply(this,l):l[0],c=o.cache;if(c.has(a))return c.get(a);var d=i.apply(this,l);return o.cache=c.set(a,d)||c,d};return o.cache=new(r.Cache||e),o}return r.Cache=e,Ls=r,Ls}var Rs,Ju;function h_(){if(Ju)return Rs;Ju=1;var e=f_(),n=500;function r(i){var s=e(i,function(l){return o.size===n&&o.clear(),l}),o=s.cache;return s}return Rs=r,Rs}var Ps,Zu;function p_(){if(Zu)return Ps;Zu=1;var e=h_(),n=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,i=e(function(s){var o=[];return s.charCodeAt(0)===46&&o.push(""),s.replace(n,function(l,a,c,d){o.push(c?d.replace(r,"$1"):a||l)}),o});return Ps=i,Ps}var Us,Xu;function Qu(){if(Xu)return Us;Xu=1;function e(n,r){for(var i=-1,s=n==null?0:n.length,o=Array(s);++i<s;)o[i]=r(n[i],i,n);return o}return Us=e,Us}var $s,vu;function g_(){if(vu)return $s;vu=1;var e=Ki(),n=Qu(),r=Vr(),i=ho(),s=e?e.prototype:void 0,o=s?s.toString:void 0;function l(a){if(typeof a=="string")return a;if(r(a))return n(a,l)+"";if(i(a))return o?o.call(a):"";var c=a+"";return c=="0"&&1/a==-1/0?"-0":c}return $s=l,$s}var zs,em;function js(){if(em)return zs;em=1;var e=g_();function n(r){return r==null?"":e(r)}return zs=n,zs}var qs,tm;function y_(){if(tm)return qs;tm=1;var e=Vr(),n=jw(),r=p_(),i=js();function s(o,l){return e(o)?o:n(o,l)?[o]:r(i(o))}return qs=s,qs}var Hs,nm;function k_(){if(nm)return Hs;nm=1;var e=ho();function n(r){if(typeof r=="string"||e(r))return r;var i=r+"";return i=="0"&&1/r==-1/0?"-0":i}return Hs=n,Hs}var Ws,rm;function w_(){if(rm)return Ws;rm=1;var e=y_(),n=k_();function r(i,s){s=e(s,i);for(var o=0,l=s.length;i!=null&&o<l;)i=i[n(s[o++])];return o&&o==l?i:void 0}return Ws=r,Ws}var Gs,om;function __(){if(om)return Gs;om=1;var e=w_();function n(r,i,s){var o=r==null?void 0:e(r,i);return o===void 0?s:o}return Gs=n,Gs}var b_=__();const en=vt(b_),_e={props:{column:{type:Object,required:!0},row:{type:Object,required:!0},value:{}}},x_={mixins:[_e],data(){return{processing:!1}},methods:{async clicked(){const e=this,n=(e.tags||[]).slice(),r=await e.$sdk.tag({title:"Edit tags",description:e.row.title,model:n.slice()}),i=e.$sdk.utils.ids(n),s=e.$sdk.utils.ids(r);JSON.stringify(i.sort())===JSON.stringify(s.sort())||(e.processing=!0,await e.$sdk.content.patch(this.itemID,{meta:{tags:r}}),e.row.meta.tags=r,e.processing=!1,e.$sdk.notify("Tags were updated"))}},computed:{canEditItem(){return this.$sdk.access.canEditItem(this.user,this.row)},itemID(){return this.row._id},tags(){var r;return((r=this.row.meta)==null?void 0:r.tags)||[]}}},C_={class:"table-quicktag-cell"};function V_(e,n,r,i,s,o){const l=t.resolveComponent("ux-pill"),a=t.resolveComponent("flex-cell"),c=t.resolveComponent("flex-row"),d=t.resolveComponent("ux-icon"),m=t.resolveComponent("ux-button");return t.openBlock(),t.createElementBlock("td",C_,[t.createVNode(c,{gap:"",center:""},{default:t.withCtx(()=>[t.createVNode(a,null,{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.tags,u=>(t.openBlock(),t.createBlock(l,{icon:"fa-tag",tag:"a",value:u},null,8,["value"]))),256))]),_:1})]),_:1}),o.canEditItem?(t.openBlock(),t.createElementBlock("div",{key:0,class:"clicker",onClick:n[0]||(n[0]=t.withModifiers((...u)=>o.clicked&&o.clicked(...u),["stop","prevent"]))},[t.createVNode(c,{gap:"",center:""},{default:t.withCtx(()=>[t.createVNode(a),t.createVNode(a,{shrink:""},{default:t.withCtx(()=>[t.createVNode(m,{icon:"",size:"xs"},{default:t.withCtx(()=>[t.createVNode(d,{icon:"fa-pen-to-square"})]),_:1})]),_:1})]),_:1})])):t.createCommentVNode("",!0)])}const E_=C(x_,[["render",V_],["__scopeId","data-v-d98dce09"]]),N_={mixins:[_e],computed:{initials(){var e,n;return`${((e=this.row)==null?void 0:e.firstName)||""} ${((n=this.row)==null?void 0:n.lastName)||""}`.trim()||this.row.title},source(){return this.$sdk.utils.id(this.value)||this.$sdk.utils.id(this.row)}}},T_={class:"table-avatar-cell"},S_={class:"avatar-wrapper"};function B_(e,n,r,i,s,o){const l=t.resolveComponent("avatar",!0);return t.openBlock(),t.createElementBlock("td",T_,[t.createElementVNode("div",S_,[t.createVNode(l,{id:o.source,initials:o.initials},null,8,["id","initials"])])])}const D_=C(N_,[["render",B_],["__scopeId","data-v-a4b42e00"]]),O_={mixins:[_e],computed:{formatted(){return this.$sdk.date.readableTime(this.value)}}},M_={class:"table-time-cell"};function F_(e,n,r,i,s,o){const l=t.resolveComponent("ux-icon");return t.openBlock(),t.createElementBlock("td",M_,[t.createVNode(l,{icon:"far fa-clock"}),t.createTextVNode(" "+t.toDisplayString(o.formatted),1)])}const I_=C(O_,[["render",F_],["__scopeId","data-v-677f555b"]]),A_={mixins:[_e],computed:{key(){return this.column.key},rawSource(){return en(this.row,this.key)},source(){return Array.isArray(this.rawSource)?this.rawSource[0]:this.rawSource?this.rawSource:this.row},imageSource(){var r;const e=this.source;if(e)switch((r=e==null?void 0:e.meta)==null?void 0:r.type){case"video":case"image":case"event":case"persona":case"profile":case"audio":case"file":return this.source;default:{const i=this.$sdk.utils.id(this.source);if(!i)return;var n=i.slice(8,10);switch(n){case"69":return{_id:i,meta:{type:"image"}};case"76":return{_id:i,meta:{type:"video"}};case"24":return{_id:i,meta:{type:"persona"}};case"70":return{_id:i,meta:{type:"profile"}};case"71":return{_id:i,meta:{type:"checkin"}}}return i}}},type(){var e,n;return(n=(e=this.imageSource)==null?void 0:e.meta)==null?void 0:n.type}},methods:{clicked(e){this.$sdk.dispatch("item:view",this.imageSource)}}},L_={class:"table-image-cell"};function R_(e,n,r,i,s,o){const l=t.resolveComponent("ux-image"),a=t.resolveComponent("ux-icon");return t.openBlock(),t.createElementBlock("td",L_,[o.imageSource?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[o.type=="image"||o.type=="video"?(t.openBlock(),t.createElementBlock("div",{key:0,onClick:n[0]||(n[0]=t.withModifiers(c=>o.clicked(e.value),["stop","prevent"])),class:"image-wrapper"},[t.createVNode(l,{lazy:"",item:o.imageSource,type:o.type,width:100,height:100},null,8,["item","type"])])):o.type==="audio"?(t.openBlock(),t.createBlock(a,{key:1,icon:"fa-music"})):o.type==="file"?(t.openBlock(),t.createBlock(a,{key:2,icon:"fa-file"})):(t.openBlock(),t.createElementBlock("div",{key:3,onClick:n[1]||(n[1]=t.withModifiers(c=>o.clicked(e.value),["stop","prevent"])),class:"image-wrapper"},[t.createVNode(l,{lazy:"",item:o.imageSource,type:o.type,width:100,height:100},null,8,["item","type"])]))],64)):t.createCommentVNode("",!0)])}const P_=C(A_,[["render",R_],["__scopeId","data-v-0d557d14"]]),U_={mixins:[_e],computed:{string(){return isNaN(this.amount)?"0.00":this.amount.toFixed(2)},amount(){return Number(parseInt(this.value)/100)},credit(){return this.amount>0},debit(){return this.amount<0},invalid(){var e;return((e=this.column)==null?void 0:e.key)==="amount"&&this.adjusted},adjusted(){return this.row.effectiveAmount!==this.row.amount},empty(){return parseInt(this.value)===0},currency(){return this.column.currency||this.row.currency}}};function $_(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("td",{class:t.normalizeClass(["table-currency-cell",{credit:o.credit,empty:o.empty,debit:o.debit,invalid:o.invalid,adjusted:o.adjusted}])},t.toDisplayString(o.string),3)}const z_=C(U_,[["render",$_],["__scopeId","data-v-c62e82ec"]]),j_={data(){return{processing:!1}},mixins:[_e],computed:{visible(){return!this.hidden},enabled(){const e=this;switch(typeof e.button.enabled){case"function":return e.button.enabled(e.row,e.column);case"undefined":case"null":return!0;default:return e.button.enabled}},hidden(){const e=this;switch(typeof e.button.hidden){case"function":return!!e.button.hidden(e.row,e.column);case"undefined":case"null":return!1;default:return!!e.button.hidden}},button(){return this.column.button},type(){var e,n;return(n=(e=this.row)==null?void 0:e.meta)==null?void 0:n.type},label(){const e=this.button;return typeof e.text=="function"?e.text(this):e.text}},methods:{async clicked(){this.processing=!0,await this.button.action(this.row,this.column,this),this.processing=!1}}},q_={class:"table-button-cell"};function H_(e,n,r,i,s,o){const l=t.resolveComponent("ux-icon"),a=t.resolveComponent("ux-button");return t.openBlock(),t.createElementBlock("td",q_,[o.visible?(t.openBlock(),t.createBlock(a,{key:0,block:o.button.block,color:o.button.color,size:o.button.size,loading:s.processing,disabled:!o.enabled,onClick:t.withModifiers(o.clicked,["stop","prevent"])},{default:t.withCtx(()=>[o.label?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(t.toDisplayString(o.label),1)],64)):t.createCommentVNode("",!0),o.button.icon?(t.openBlock(),t.createBlock(l,{key:1,icon:o.button.icon,right:""},null,8,["icon"])):t.createCommentVNode("",!0)]),_:1},8,["block","color","size","loading","disabled","onClick"])):t.createCommentVNode("",!0)])}const W_=C(j_,[["render",H_],["__scopeId","data-v-413157fd"]]),G_={mixins:[_e],methods:{timeago(e){return b.fromJSDate(e).toRelative()},readable(e){e=b.fromJSDate(e);let n=b.now(),r=n.toFormat("yyyy");return n.toFormat("MMM yyyy"),e.toFormat("yyyy")===r?e.toFormat("h:mma, ccc d MMM").replace(/:00/g,"").replace(/PM,/g,"pm,").replace(/:AM,/g,"am,"):e.toFormat("h:mma, ccc d MMM yyyy").replace(/:00/g,"").replace(/:PM,/g,"pm,").replace(/:AM,/g,"am,")}},computed:{values(){return Array.isArray(this.value)?this.value:[this.value]},mapped(){const e=this;return e.values.map(function(n){if(!n)return;const r=new Date(n);return{readable:e.readable(r),timeago:e.timeago(r)}}).filter(Boolean)}}},Y_={class:"table-date-cell"},K_={class:"date-pill"},J_={class:"off"},Z_={class:"on"},X_={class:"spacer"};function Q_(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("td",Y_,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.mapped,l=>(t.openBlock(),t.createElementBlock("div",K_,[t.createElementVNode("span",J_,t.toDisplayString(l.readable),1),t.createElementVNode("span",Z_,t.toDisplayString(l.timeago),1),t.createElementVNode("span",X_,t.toDisplayString(l.readable),1)]))),256))])}const im=C(G_,[["render",Q_],["__scopeId","data-v-f3b929d9"]]),v_={mixins:[_e],methods:{timeago(e){return b.fromJSDate(e).toRelative()},readable(e){e=b.fromJSDate(e);let n=b.now(),r=n.toFormat("yyyy");return n.toFormat("MMM yyyy"),e.toFormat("yyyy")===r?e.toFormat("h:mm a - dd MMM"):e.toFormat("h:mm a - dd MMM yyyy")}},computed:{values(){return Array.isArray(this.value)?this.value:[this.value]},mapped(){const e=this;return e.values.map(function(n){if(!n)return;const r=new Date(n),i=r<new Date;return{readable:e.readable(r),timeago:e.timeago(r),overdue:i}}).filter(Boolean)}}},e1={class:"table-date-cell"},t1={class:"off"},n1={class:"on"},r1={class:"spacer"};function o1(e,n,r,i,s,o){const l=t.resolveComponent("ux-icon");return t.openBlock(),t.createElementBlock("td",e1,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.mapped,a=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["date-pill",{overdue:a.overdue}])},[t.createElementVNode("span",t1,[t.createVNode(l,{icon:"far fa-clock",left:""}),t.createTextVNode(t.toDisplayString(a.readable),1)]),t.createElementVNode("span",n1,[t.createVNode(l,{icon:"far fa-clock",left:""}),t.createTextVNode(t.toDisplayString(a.timeago),1)]),t.createElementVNode("span",r1,[t.createVNode(l,{icon:"far fa-clock",left:""}),t.createTextVNode(t.toDisplayString(a.readable),1)])],2))),256))])}const i1=C(v_,[["render",o1],["__scopeId","data-v-0e48d460"]]),s1={mixins:[_e],computed:{boolean(){return!!this.value}}};function l1(e,n,r,i,s,o){const l=t.resolveComponent("ux-icon");return t.openBlock(),t.createElementBlock("td",{class:t.normalizeClass(["table-boolean-cell",{true:o.boolean,false:!o.boolean}])},[t.createVNode(l,{icon:o.boolean?"fa-check":"fa-times"},null,8,["icon"])],2)}const sm=C(s1,[["render",l1],["__scopeId","data-v-b180904a"]]),a1={mixins:[_e],computed:{size(){return this.$sdk.files.filesize(this.value)}}};function c1(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("td",{class:t.normalizeClass(["table-filesize-cell",{true:e.boolean,false:!e.boolean}])},t.toDisplayString(o.size),3)}const d1=C(a1,[["render",c1],["__scopeId","data-v-0419990c"]]);function u1(e){const n=Math.round(e),r=Math.floor(n/3600),i=Math.floor(n%3600/60),s=n%60;return r>0?`${r}:${i.toString().padStart(2,"0")}:${s.toString().padStart(2,"0")}`:`${i}:${s.toString().padStart(2,"0")}`}const m1={mixins:[_e],computed:{duration(){return u1(this.value)}}};function f1(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("td",{class:t.normalizeClass(["table-duration-cell",{true:e.boolean,false:!e.boolean}])},t.toDisplayString(o.duration),3)}const h1=C(m1,[["render",f1],["__scopeId","data-v-2910d792"]]),p1={mixins:[_e],methods:{async clicked(){const e=this,n=e.$sdk.utils.id(e.row),r=e.public?"secure":"public";e.processing=!0;try{await e.$sdk.content.patch(n,{meta:{security:r}}),e.row.meta||(e.row.meta={}),e.row.meta.security=r,e.$sdk.notify(`Set security to ${r}`)}catch(i){e.$sdk.error(i)}finally{e.processing=!1}}},data(){return{processing:!1}},computed:{canEdit(){var e=this.user;return this.$sdk.access.canEditItem(e,this.row)},public(){return this.security==="public"},security(){return this.value||"secure"}}};function g1(e,n,r,i,s,o){const l=t.resolveComponent("ux-icon"),a=t.resolveComponent("ux-button");return t.openBlock(),t.createElementBlock("td",{class:t.normalizeClass(["table-security-cell",o.security])},[o.canEdit?(t.openBlock(),t.createBlock(a,{key:0,size:"sm",loading:s.processing,onClick:t.withModifiers(o.clicked,["stop","prevent"])},{default:t.withCtx(()=>[t.createVNode(l,{icon:o.public?"fa-lock-open":"fa-lock"},null,8,["icon"])]),_:1},8,["loading","onClick"])):(t.openBlock(),t.createBlock(l,{key:1,icon:o.public?"fa-lock-open":"fa-lock"},null,8,["icon"]))],2)}const y1=C(p1,[["render",g1],["__scopeId","data-v-147f957e"]]),k1={mixins:[_e],methods:{open(){window.open(this.href)}},computed:{actualValue(){return String(this.value||"").trim()},href(){let e=this.actualValue;return/^https?:\/\//i.test(e)?e:"https://"+e}}},w1={class:"table-url-cell"},_1=["href"];function b1(e,n,r,i,s,o){const l=t.resolveComponent("ux-icon");return t.openBlock(),t.createElementBlock("td",w1,[o.actualValue?(t.openBlock(),t.createElementBlock("a",{key:0,href:o.href,onClick:n[0]||(n[0]=t.withModifiers((...a)=>o.open&&o.open(...a),["stop","prevent"])),target:"_blank"},[t.createTextVNode(t.toDisplayString(o.actualValue)+" ",1),t.createVNode(l,{right:"",icon:"fa-external-link"})],8,_1)):t.createCommentVNode("",!0)])}const lm=C(k1,[["render",b1],["__scopeId","data-v-aa99a5e7"]]);var am=function(e,n,r){if(!n.hasOwnProperty(r)){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i)}};const cm={props:{template:String,parent:Object,templateProps:{type:Object,default:function(){return{}}}},render:function(){if(this.template){var e=this.parent||this.$parent,n=e.$data;n===void 0&&(n={});var r=e.$props;r===void 0&&(r={});var i=e.$options;i===void 0&&(i={});var s=i.components;s===void 0&&(s={});var o=i.computed;o===void 0&&(o={});var l=i.methods;l===void 0&&(l={});var a=this.$data;a===void 0&&(a={});var c=this.$props;c===void 0&&(c={});var d=this.$options;d===void 0&&(d={});var m=d.methods;m===void 0&&(m={});var u=d.computed;u===void 0&&(u={});var f=d.components;f===void 0&&(f={});var h={$data:{},$props:{},$options:{},components:{},computed:{},methods:{}};Object.keys(n).forEach(function(V){a[V]===void 0&&(h.$data[V]=n[V])}),Object.keys(r).forEach(function(V){c[V]===void 0&&(h.$props[V]=r[V])}),Object.keys(l).forEach(function(V){m[V]===void 0&&(h.methods[V]=l[V])}),Object.keys(o).forEach(function(V){u[V]===void 0&&(h.computed[V]=o[V])}),Object.keys(s).forEach(function(V){f[V]===void 0&&(h.components[V]=s[V])});var g=Object.keys(h.methods||{}),p=Object.keys(h.$data||{}),k=Object.keys(h.$props||{}),w=Object.keys(this.templateProps),_=p.concat(k).concat(g).concat(w),S=(U=e,q={},g.forEach(function(V){return am(U,q,V)}),q),I=function(V){var $={};return V.forEach(function(L){L&&Object.getOwnPropertyNames(L).forEach(function(R){return am(L,$,R)})}),$}([h.$data,h.$props,S,this.templateProps]);return t.h({template:this.template||"<div></div>",props:_,computed:h.computed,components:h.components,provide:this.$parent.$.provides?this.$parent.$.provides:{}},Object.assign({},I))}var U,q}},x1={components:{Compile:cm},mixins:[_e]},C1={class:"table-computed-cell"};function V1(e,n,r,i,s,o){const l=t.resolveComponent("compile");return t.openBlock(),t.createElementBlock("td",C1,[t.createVNode(l,{template:this.column.code},null,8,["template"])])}const E1=C(x1,[["render",V1],["__scopeId","data-v-05dd3203"]]),N1={props:{multi:{type:Boolean},last:{type:Boolean},value:{required:!0},type:{type:String},widget:{type:String}},computed:{reference(){return!!(this.value&&this.value._id)},renderValue(){return this.value?this.value.title||this.value.name||this.value:void 0},date(){return b.fromISO(this.value).toFormat("dd MMM yyyy")},actualWidget(){var e;if(this.widget)e=this.widget;else switch(this.type){case"date":e="datetime";break}return e}},methods:{clicked(e){this.$sdk.dispatch("item:view",e)}}};function T1(e,n,r,i,s,o){const l=t.resolveComponent("ux-pill");return o.reference?(t.openBlock(),t.createBlock(l,{key:0,tag:"a",value:r.value,onClick:n[0]||(n[0]=t.withModifiers(a=>o.clicked(r.value),["stop","prevent"]))},null,8,["value"])):r.type=="date"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(o.date),1)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[t.createTextVNode(t.toDisplayString(o.renderValue),1),r.multi&&!r.last?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(", ")],64)):t.createCommentVNode("",!0)],64))}const S1=C(N1,[["render",T1],["__scopeId","data-v-27442ac9"]]),B1=".total",D1={mixins:[_e],methods:{clicked(e){this.menuOpen=!1,this.$sdk.dispatch("item:view",e)}},data(){return{menuOpen:!1}},computed:{path(){return this.column.key||""},rawPath(){return this.path.slice(0,-B1.length)},itemPath(){return`${this.rawPath}.items`},value(){return en(this.row,this.column.key)},items(){return en(this.row,this.itemPath)}}},O1={class:"table-complex-cell"},M1={class:"items"};function F1(e,n,r,i,s,o){const l=t.resolveComponent("ux-button"),a=t.resolveComponent("ux-pill"),c=t.resolveComponent("ux-menu");return t.openBlock(),t.createElementBlock("td",O1,[t.createVNode(c,{modelValue:s.menuOpen,"onUpdate:modelValue":n[1]||(n[1]=d=>s.menuOpen=d)},{activator:t.withCtx(({on:d})=>[t.createVNode(l,t.mergeProps({size:"sm",onClick:n[0]||(n[0]=t.withModifiers(()=>{},["stop","prevent"]))},t.toHandlers(d),{icon:""}),{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.value),1)]),_:1},16)]),default:t.withCtx(()=>[t.createElementVNode("div",M1,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.items,d=>(t.openBlock(),t.createBlock(a,{tag:"a",value:d,onClick:t.withModifiers(m=>o.clicked(d),["stop","prevent"])},null,8,["value","onClick"]))),256))])]),_:1},8,["modelValue"])])}const I1=C(D1,[["render",F1],["__scopeId","data-v-1cdab26c"]]),A1={mixins:[_e],computed:{email(){var e;return this.row.username||((e=this.row.user)==null?void 0:e.email)||this.row.userEmailAddress||this.row.collectionEmailAddress}}},L1={class:"table-persona-email-cell"};function R1(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("td",L1,t.toDisplayString(o.email),1)}const P1=C(A1,[["render",R1],["__scopeId","data-v-9c894a39"]]),U1={mixins:[_e],computed:{className(){return this.isConnected?"connected":this.isInvited?"invited":this.isManaged?"managed":"empty"},isConnected(){return!!this.row.user},isInvited(){return!this.isConnected&&this.row.collectionEmailAddress},isManaged(){return!this.isConnected&&!this.isInvited},email(){var e;return this.row.username||((e=this.row.user)==null?void 0:e.email)||this.row.userEmailAddress||this.row.collectionEmailAddress},text(){switch(this.className){case"connected":return"Qik User";case"invited":return"Invite sent";case"managed":return"App user";default:return""}},tooltip(){var r,i,s,o;const e=this,n=(i=(r=e.user)==null?void 0:r.organisation)!=null&&i.title?`'${(o=(s=e.user)==null?void 0:s.organisation)==null?void 0:o.title}'`:void 0;switch(e.className){case"connected":return`This user can sign in to ${n||"your organisation"} on the Qik platform.`;case"invited":return"We've sent an invite to this user to join your organisation on Qik.";case"managed":return"This user can only sign in to your applications.";default:return""}},icon(){switch(this.className){case"connected":return"far fa-user";case"invited":return"far fa-envelope";case"managed":return"far fa-user";default:return}}}},$1={class:"pill"};function z1(e,n,r,i,s,o){const l=t.resolveComponent("ux-icon"),a=t.resolveComponent("tippy");return t.openBlock(),t.createElementBlock("td",{class:t.normalizeClass(["table-persona-invite-cell",o.className])},[t.createVNode(a,{content:o.tooltip},{default:t.withCtx(()=>[t.createElementVNode("div",$1,[t.createVNode(l,{icon:o.icon,left:""},null,8,["icon"]),t.createTextVNode(" "+t.toDisplayString(o.text),1)])]),_:1},8,["content"])],2)}const j1=C(U1,[["render",z1],["__scopeId","data-v-be3bef4b"]]),q1={mixins:[_e],computed:{status(){return String(this.value||"").toLowerCase()}}},H1={key:0,class:"pill"};function W1(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("td",{class:t.normalizeClass(["table-status-cell",o.status])},[o.status?(t.openBlock(),t.createElementBlock("div",H1,t.toDisplayString(o.status),1)):t.createCommentVNode("",!0)],2)}const G1=C(q1,[["render",W1],["__scopeId","data-v-357810c2"]]),Y1={mixins:[_e],computed:{typeKey(){var e;return(e=this.row.meta)==null?void 0:e.type},subtitle(){var l,a,c,d,m,u,f;const e=this,n=this.row,r=n.subtitle,i=n.description,s=(l=n.meta)==null?void 0:l.description,o=r||i||s;switch(this.typeKey){case"runsheet":return n.event?`${n.event.title} • ${e.$sdk.date.readableEventDate(n.event)}`:"";case"venue":return[(a=n.address)==null?void 0:a.addressLine1,(c=n.address)==null?void 0:c.addressLine2,(d=n.address)==null?void 0:d.suburb,(m=n.address)==null?void 0:m.state,(u=n.address)==null?void 0:u.postalCode,(f=n.address)==null?void 0:f.country].filter(Boolean).join(" ");case"event":if(n.startDate,n.endDate,e.$sdk.date)return o?`${e.$sdk.date.readableEventDate(n)} • ${o}`:`${e.$sdk.date.readableEventDate(n)}`;break}return o}}},K1={class:"title"},J1={key:0,class:"subtitle"};function Z1(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("td",{class:t.normalizeClass(["table-title-cell",e.status])},[t.createElementVNode("div",K1,t.toDisplayString(e.value),1),o.subtitle?(t.openBlock(),t.createElementBlock("div",J1,t.toDisplayString(o.subtitle),1)):t.createCommentVNode("",!0)],2)}const X1=C(Y1,[["render",Z1],["__scopeId","data-v-bf723bb2"]]),Q1={props:{value:{type:Object}},computed:{style(){var r,i;const e=(r=this.value)==null?void 0:r.color,n=(i=this.value)==null?void 0:i.bgColor;if(e||n)return{backgroundColor:n||e}}}};function v1(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("span",{class:"ux-circle",style:t.normalizeStyle(o.style)},null,4)}const ko=C(Q1,[["render",v1],["__scopeId","data-v-6f2d4cea"]]),eb={mixins:[_e],components:{UxCircle:ko},computed:{scopes(){return this.column.key==="_id"?[this.row]:(this.value||[]).filter(function({unit:n}){return!n})}}},tb={class:"scope-circles-cell"};function nb(e,n,r,i,s,o){const l=t.resolveComponent("ux-circle"),a=t.resolveComponent("tippy");return t.openBlock(),t.createElementBlock("td",tb,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.scopes,c=>(t.openBlock(),t.createBlock(a,{content:c.title},{default:t.withCtx(()=>[t.createVNode(l,{value:c},null,8,["value"])]),_:2},1032,["content"]))),256))])}const rb=C(eb,[["render",nb],["__scopeId","data-v-f79f00ee"]]),ob={mixins:[_e],created(){this.$glossary.ensure()},computed:{lookup(){return this.$glossary.hash},match(){return this.lookup?this.lookup[this.value]:null},title(){var e;return((e=this.match)==null?void 0:e.title)||this.value},plural(){var e;return((e=this.match)==null?void 0:e.plural)||this.title},rendered(){return this.column.plural?this.plural:this.title}}},ib={class:"content-type-cell"};function sb(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("td",ib,t.toDisplayString(o.title),1)}const lb=C(ob,[["render",sb],["__scopeId","data-v-f8cf385c"]]),ab={mixins:[_e],computed:{count(){return this.rosters.reduce(function(e,n){return n.slots.forEach(function(r){e+=r.assignments.length}),e},0)},rosters(){return Object.entries(this.row.join_roster||{}).map(function([n,r]){return{title:n,slots:r.items}})},rosterEnabled(){return this.$sdk.access.hasFeature(this.user,"rostering")?this.$sdk.access.canKnowOf(this.user,"roster")||this.$sdk.access.canKnowOf(this.user,"assignment"):void 0}}},cb={class:"table-roster-cell"},db={class:"event-title"},ub={class:"event-date"},mb={class:"event-subtitle"},fb={class:"preview"},hb={class:"grid"},pb={class:"face"};function gb(e,n,r,i,s,o){const l=t.resolveComponent("ux-button"),a=t.resolveComponent("ux-panel-header"),c=t.resolveComponent("ux-avatar"),d=t.resolveComponent("flex-cell"),m=t.resolveComponent("flex-row"),u=t.resolveComponent("ux-panel-body"),f=t.resolveComponent("ux-panel"),h=t.resolveComponent("ux-menu");return t.openBlock(),t.createElementBlock("td",cb,[o.rosterEnabled&&o.count?(t.openBlock(),t.createBlock(h,{key:0,right:"",group:"roster-preview"},{activator:t.withCtx(({on:g})=>[t.createVNode(l,t.mergeProps({size:"sm"},t.toHandlers(g),{icon:"",onClick:n[0]||(n[0]=t.withModifiers(()=>{},["stop"]))}),{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.count),1)]),_:1},16)]),default:t.withCtx(()=>[t.createVNode(f,null,{default:t.withCtx(()=>[t.createVNode(a,null,{default:t.withCtx(()=>[t.createElementVNode("div",db,t.toDisplayString(e.row.title),1),t.createElementVNode("div",ub,t.toDisplayString(e.$sdk.date.readableEventDate(e.row)),1),t.createElementVNode("div",mb,t.toDisplayString(e.row.subtitle),1)]),_:1}),t.createVNode(u,null,{default:t.withCtx(()=>[t.createElementVNode("div",fb,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.rosters,g=>(t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("div",hb,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(g.slots,p=>(t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("h4",null,t.toDisplayString(p.title),1),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(p.assignments,k=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["assignment",k.state||"unknown"])},[t.createVNode(m,{gap:"",center:""},{default:t.withCtx(()=>[t.createVNode(d,{shrink:""},{default:t.withCtx(()=>[t.createElementVNode("div",pb,[t.createVNode(c,{initials:`${k.profile.firstName} ${k.profile.lastName}`,id:k.profile},null,8,["initials","id"])])]),_:2},1024),t.createVNode(d,null,{default:t.withCtx(()=>{var w,_;return[t.createTextVNode(t.toDisplayString((w=k.profile)==null?void 0:w.firstName)+" "+t.toDisplayString((_=k.profile)==null?void 0:_.lastName),1)]}),_:2},1024)]),_:2},1024)],2))),256))]))),256))])]))),256))])]),_:1})]),_:1})]),_:1})):t.createCommentVNode("",!0)])}const yb=C(ab,[["render",gb],["__scopeId","data-v-88720bfa"]]),kb={mixins:[_e],data(){return{runsheets:[],creating:!1}},created(){var e,n;this.runsheets=((n=(e=this.row.join_runsheet)==null?void 0:e.runsheet)==null?void 0:n.items)||[]},methods:{async addRunsheet(){const e=this;e.creating=!0,e.$sdk.global.create("runsheet",{model:{event:e.row}}).then(function(n){e.runsheets.push(n),e.openRunsheet(n),e.creating=!1},function(n){e.creating=!1})},async openRunsheet(e){const n=this.$sdk.access.canEditItem(this.user,e);return console.log("OPEN",n,e),n?this.editRunsheet(e):this.viewRunsheet(e)},async editRunsheet(e){const n=await this.$sdk.global.edit(e,!0);e.title=n.title},async viewRunsheet(e){const n=await this.$sdk.global.view(e,!0);e.title=n.title}},computed:{count(){var e;return(e=this.runsheets)==null?void 0:e.length}}},wb={class:"table-roster-cell"},_b={class:"wrp"},bb={key:1,class:"hover"};function xb(e,n,r,i,s,o){const l=t.resolveComponent("ux-button"),a=t.resolveComponent("ux-panel-body"),c=t.resolveComponent("ux-list-item"),d=t.resolveComponent("ux-list"),m=t.resolveComponent("ux-panel"),u=t.resolveComponent("ux-menu"),f=t.resolveComponent("ux-icon"),h=t.resolveDirective("tippy");return t.openBlock(),t.createElementBlock("td",wb,[t.withDirectives((t.openBlock(),t.createElementBlock("div",_b,[o.count?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[o.count>1?(t.openBlock(),t.createBlock(u,{key:0},{activator:t.withCtx(({on:g})=>[t.createVNode(l,t.mergeProps({size:"xs"},t.toHandlers(g),{onClick:n[0]||(n[0]=t.withModifiers(()=>{},["stop"])),icon:""}),{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.count),1)]),_:1},16)]),default:t.withCtx(()=>[t.createVNode(m,null,{default:t.withCtx(()=>[t.createVNode(a,null,{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.count)+" Run Sheet"+t.toDisplayString(o.count===1?"":"s"),1)]),_:1}),t.createVNode(d,null,{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.runsheets,g=>(t.openBlock(),t.createBlock(c,{onClick:p=>o.openRunsheet(g)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(g.title),1)]),_:2},1032,["onClick"]))),256))]),_:1})]),_:1})]),_:1})):(t.openBlock(),t.createBlock(l,{key:1,size:"xs",icon:"",onClick:n[1]||(n[1]=t.withModifiers(g=>o.openRunsheet(s.runsheets[0]),["stop"]))},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.count),1)]),_:1}))],64)):(t.openBlock(),t.createElementBlock("div",bb,[t.createVNode(l,{size:"xs",icon:"",loading:s.creating,onClick:t.withModifiers(o.addRunsheet,["stop"])},{default:t.withCtx(()=>[t.createVNode(f,{icon:"fa-plus"})]),_:1},8,["loading","onClick"])]))])),[[h,{placement:"bottom",content:`${o.count} Run Sheets`}]])])}const Cb=C(kb,[["render",xb],["__scopeId","data-v-3ea39cda"]]);function Ys(e,n){if(!e||!n)return;const r=n.split("|");n=r[0];const i=r[1];var s=en(e,n);if(s)return i&&Array.isArray(s)?s.filter(function(d){var u;const m=(u=d==null?void 0:d.meta)==null?void 0:u.definition;if(i==="null")return!m;if(m)return m===i}):s;const o=n.split("."),l=o.shift(),a=o.join("."),c=en(e,l);return Array.isArray(c)?c.map(function(d){return Ys(d,a)}).flat().filter(Boolean):Ys(c,a)}const Vb={data(){return{component:null}},components:{ValueRenderer:S1},async created(){const e=this;let n,r=e.column.type,i=e.column.renderer,s=e.column.key;if(!i)switch(s){case"fileSize":i="filesize";break;case"duration":i="duration";break;case"title":i="title";break;case"status":case"paymentStatus":case"meta.status":i="status";break;case"meta.tags":i="tag";break;case"meta.definition":i="type";break}switch(e.column.widget){case"button":break;default:i=i||e.column.widget;break}switch(r){case"boolean":i="boolean";break;case"reference":e.column.referenceType==="image"&&(i="thumbnail");break}switch(i){case"filesize":n=d1;break;case"duration":n=h1;break;case"button":n=W_;break;case"security":n=y1;break;case"boolean":n=sm;break;case"roster":n=yb;break;case"runsheet":n=Cb;break;case"personainvite":n=j1;break;case"personaemail":n=P1;break;case"time":case"timefield":n=I_;break;case"date":case"datetime":n=im;break;case"due":n=i1;break;case"circles":n=rb;break;case"title":n=X1;break;case"type":n=lb;break;case"complex":n=I1;break;case"status":n=G1;break;case"computed":n=E1;break;case"url":n=lm;break;case"currency":n=z_;break;case"tag":n=E_;break;case"avatar":n=D_;break;case"thumbnail":n=P_;break;default:switch(r){case"date":n=im;break;case"boolean":n=sm;break;case"url":n=lm;break}break}e.component=n},props:{column:{type:Object,required:!0},row:{type:Object,required:!0}},computed:{nowrap(){return this.column.wrap===!1},multiValue(){return Array.isArray(this.value)},renderer(){return this.column.renderer},renderValue(){var e=this.value;if(e!=null)return e.title||e.name||e},value(){var e=Ys(this.row,this.column.key);return e}}},Eb={class:"value"};function Nb(e,n,r,i,s,o){const l=t.resolveComponent("value-renderer");return s.component?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(s.component),{key:0,column:r.column,row:r.row,value:o.value},null,8,["column","row","value"])):(t.openBlock(),t.createElementBlock("td",{key:1,class:t.normalizeClass(["table-cell",{nowrap:o.nowrap}])},[o.multiValue?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(o.value,(a,c)=>(t.openBlock(),t.createElementBlock("span",Eb,[t.createVNode(l,{type:r.column.type,multi:"",last:c===o.value.length-1,value:a},null,8,["type","last","value"])]))),256)):(t.openBlock(),t.createBlock(l,{key:1,type:r.column.type,value:o.value},null,8,["type","value"]))],2))}const dm=C(Vb,[["render",Nb],["__scopeId","data-v-43da03cf"]]),Tb={components:{TableCell:dm},props:{selected:{type:Boolean},index:{type:Number},row:{type:Object,required:!0},columns:{type:Array,required:!0},enableActions:{type:Boolean,default(){return!1}},enableSelection:{type:Boolean,default(){return!0}},hasCorner:{type:Boolean,default(){return!1}}},emits:["click:cell","click:row","click:actions","mousedown:select","mouseenter:select"],methods:{clickCell(e){this.$emit("click:cell",{row:this.row,column:e}),this.$emit("click:row",this.row)},clickActions(e){this.$emit("click:actions",e)},mousedownSelect(e){this.$emit("mousedown:select",this.row,this.index,e)},mouseenterSelect(){this.$emit("mouseenter:select",this.row,this.index)}},computed:{classes(){var n,r;var e=[];return this.selected&&e.push("selected"),((r=(n=this.row)==null?void 0:n.meta)==null?void 0:r.status)==="inactive"&&e.push("inactive"),e}}},Sb={key:2,class:"table-cell last shrink"};function Bb(e,n,r,i,s,o){const l=t.resolveComponent("ux-checkbox"),a=t.resolveComponent("table-cell"),c=t.resolveComponent("ux-icon"),d=t.resolveComponent("ux-button");return t.openBlock(),t.createElementBlock("tr",{class:t.normalizeClass([o.classes,"table-row"])},[t.renderSlot(e.$slots,"default",{},()=>[r.enableSelection?(t.openBlock(),t.createElementBlock("th",{key:0,class:"table-cell table-select first shrink",onMousedown:n[0]||(n[0]=t.withModifiers((...m)=>o.mousedownSelect&&o.mousedownSelect(...m),["prevent"])),onMouseenter:n[1]||(n[1]=(...m)=>o.mouseenterSelect&&o.mouseenterSelect(...m)),onClick:n[2]||(n[2]=t.withModifiers(()=>{},["stop","prevent"]))},[t.createVNode(l,{value:r.selected},null,8,["value"])],32)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.columns,(m,u)=>(t.openBlock(),t.createBlock(a,{key:`${m.path||m.key}-${u}-${m.type}-${m.renderer}`,onClick:t.withModifiers(f=>o.clickCell(m),["stop","prevent"]),column:m,row:r.row},null,8,["onClick","column","row"]))),128)),r.enableActions?(t.openBlock(),t.createElementBlock("th",{key:1,class:"table-cell last shrink",onClick:n[3]||(n[3]=t.withModifiers(m=>o.clickActions(r.row),["stop","prevent"]))},[t.createVNode(d,{size:"xs",icon:""},{default:t.withCtx(()=>[t.createVNode(c,{icon:"fa-ellipsis"})]),_:1})])):r.hasCorner?(t.openBlock(),t.createElementBlock("th",Sb)):t.createCommentVNode("",!0)],!0)],2)}const Db=C(Tb,[["render",Bb],["__scopeId","data-v-28bb2cce"]]),um={data(){return{scrollTop:0}},methods:{updateScroll(e){var n=this.$refs.scroll;n=(n==null?void 0:n.$el)||n,n&&(this.scrollTop=n.scrollTop)}},mounted(){var e=this.$refs.scroll;e=(e==null?void 0:e.$el)||e,e&&e.addEventListener("scroll",this.updateScroll)},beforeUnmount(){var e=this.$refs.scroll;e=(e==null?void 0:e.$el)||e,e&&e.removeEventListener("scroll",this.updateScroll)},activated(){var e=this.$refs.scroll;e=(e==null?void 0:e.$el)||e,e&&(e.scrollTop=this.scrollTop)}},Ob={mixins:[um],components:{TableRow:Db,TableCell:dm},emits:["update:sort","select:multiple","deselect:multiple","select:multiple","click:row","click:cell","click:actions","select:row:toggle","contextmenu:header"],watch:{rows(){this.$refs.scroll.scroll({top:0,left:0})},sort(e){this.sorting=e},sorting(e){this.$emit("update:sort",e)}},props:{total:{type:Number},columns:{type:Array,default(){return[]}},rows:{type:Array,default(){return[]}},scrollable:{type:Boolean,default(){return!0}},enableActions:{type:Boolean,default(){return!1}},enableSelection:{type:Boolean,default(){return!0}},sort:{type:Object,default(){return{key:"meta.created",type:"date",direction:"desc"}}},selection:{type:Array,default(){return[]}},selectAll:{type:Function},deselectAll:{type:Function},group:{type:Object,default(){return{}}}},data(){return{sorting:this.sort,lastSelectedIndex:null,lastSelectAction:null,dragging:!1,dragMode:null,dragStart:null}},beforeUnmount(){window.removeEventListener("mouseup",this.endDrag),window.removeEventListener("mousemove",this.checkDragStart)},computed:{groupedRows(){const e=this.group.key,n=this.group.type||"string";if(e){const{values:r}=this.renderRows.reduce(function(i,s){let o=en(s,e);o=String(o);let l=i.keys[o];return l||(l=i.keys[o]={title:o,rows:[]},i.values.push(l)),i},{values:[],keys:{}});return r}return[{rows:this.renderRows}]},currentSortDirection(){var e;return((e=this.sorting)==null?void 0:e.direction)||"asc"},selectionHash(){var e=this;return e.selection.reduce(function(n,r){var i=r._id||r.id;return n[i]=r,n},{})},pageSelected(){var e=this;if(!(!e.rows||!e.rows.length))return!e.rows.some(function(n){return!e.selectionHash[n._id||n.id]})},renderColumns(){return this.columns.map(function(n){var r=Object.assign({},n);return r.class=[],r.shrink&&r.class.push("shrink"),r})},renderRows(){return this.rows},someSelectedOnPage(){return this.rows.some(this.isSelected)}},methods:{togglePage(){var e=this;e.pageSelected?e.deselectPage():e.selectPage()},selectPage(){var e=this;e.$emit("select:multiple",e.rows)},deselectPage(){var e=this;e.$emit("deselect:multiple",e.rows)},isSelected(e){var n=this,r=e._id||e.id;return n.selection.some(function(i){var s=i._id||i.id;return i==e||s==r})},classes(e){let n=[];return this.isSelected(e)&&n.push("selected"),n},selectRange(e,n){const r=Math.min(e,n),i=Math.max(e,n)+1,s=this.renderRows.slice(r,i);this.$emit("select:multiple",s)},deselectRange(e,n){const r=Math.min(e,n),i=Math.max(e,n)+1,s=this.renderRows.slice(r,i);this.$emit("deselect:multiple",s)},toggleSort(e){var o,l;const n=(o=this.sorting)==null?void 0:o.key,r=((l=this.sorting)==null?void 0:l.direction)||"asc";let{key:i,direction:s}=e;i===n&&(s=r==="dsc"?"asc":"dsc"),this.sorting={key:i,direction:s,type:e.type}},clickRow(e){this.$emit("click:row",e)},clickCell({row:e,column:n}){this.$emit("click:cell",{row:e,column:n})},clickActions(e){this.$emit("click:actions",e)},mousedownSelect(e,n,r){const s=this.isSelected(e)?"deselect":"select";if(r.shiftKey&&this.lastSelectedIndex!=null&&this.lastSelectedIndex!==n){this.lastSelectAction==="deselect"?this.deselectRange(this.lastSelectedIndex,n):this.selectRange(this.lastSelectedIndex,n),this.lastSelectedIndex=n;return}s==="select"?this.$emit("select:multiple",[e]):this.$emit("deselect:multiple",[e]),this.lastSelectedIndex=n,this.lastSelectAction=s,this.dragMode=s,this.dragStart={x:r.clientX,y:r.clientY},window.addEventListener("mousemove",this.checkDragStart),window.addEventListener("mouseup",this.endDrag,{once:!0})},mouseenterSelect(e,n){if(!this.dragging)return;const r=this.isSelected(e);this.dragMode==="select"&&!r?this.$emit("select:multiple",[e]):this.dragMode==="deselect"&&r&&this.$emit("deselect:multiple",[e])},checkDragStart(e){if(!this.dragStart)return;const n=e.clientX-this.dragStart.x,r=e.clientY-this.dragStart.y;n*n+r*r>=9&&(this.dragging=!0,window.removeEventListener("mousemove",this.checkDragStart))},endDrag(){this.dragging=!1,this.dragMode=null,this.dragStart=null,window.removeEventListener("mouseup",this.endDrag),window.removeEventListener("mousemove",this.checkDragStart)}}},Mb={class:"table-scroll",ref:"scroll"},Fb={key:0,class:"first table-select shrink"},Ib=["onClick"],Ab={key:1,class:"last shrink"},Lb={key:0};function Rb(e,n,r,i,s,o){const l=t.resolveComponent("ux-checkbox"),a=t.resolveComponent("ux-list-item"),c=t.resolveComponent("ux-list"),d=t.resolveComponent("ux-menu"),m=t.resolveComponent("flex-cell"),u=t.resolveComponent("flex-row"),f=t.resolveComponent("table-row");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["table-wrapper",{dragging:s.dragging}]),onMouseup:n[5]||(n[5]=(...h)=>o.endDrag&&o.endDrag(...h))},[t.createElementVNode("div",Mb,[t.createElementVNode("table",null,[t.createElementVNode("thead",null,[t.createElementVNode("tr",{onContextmenu:n[4]||(n[4]=t.withModifiers(h=>e.$emit("contextmenu:header",h),["prevent"]))},[r.enableSelection?(t.openBlock(),t.createElementBlock("th",Fb,[t.createVNode(d,null,{activator:t.withCtx(({on:h})=>[t.createVNode(l,t.mergeProps(t.toHandlers(h),{value:o.pageSelected}),null,16,["value"])]),default:t.withCtx(()=>[t.createVNode(c,null,{default:t.withCtx(()=>[t.createVNode(a,{onClick:n[0]||(n[0]=h=>o.selectPage())},{default:t.withCtx(()=>[...n[6]||(n[6]=[t.createTextVNode(" Select Page ",-1)])]),_:1}),o.someSelectedOnPage?(t.openBlock(),t.createBlock(a,{key:0,onClick:n[1]||(n[1]=h=>o.deselectPage())},{default:t.withCtx(()=>[...n[7]||(n[7]=[t.createTextVNode(" Deselect Page ",-1)])]),_:1})):t.createCommentVNode("",!0),r.selectAll?(t.openBlock(),t.createBlock(a,{key:1,onClick:n[2]||(n[2]=h=>r.selectAll())},{default:t.withCtx(()=>[t.createTextVNode(" Select All ("+t.toDisplayString(r.total)+") ",1)]),_:1})):t.createCommentVNode("",!0),r.deselectAll?(t.openBlock(),t.createBlock(a,{key:2,onClick:n[3]||(n[3]=h=>r.deselectAll())},{default:t.withCtx(()=>[...n[8]||(n[8]=[t.createTextVNode(" Deselect All ",-1)])]),_:1})):t.createCommentVNode("",!0)]),_:1})]),_:1})])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.renderColumns,h=>{var g;return t.openBlock(),t.createElementBlock("th",{onClick:p=>o.toggleSort(h),class:t.normalizeClass([{sortable:h.sortable!==!1,active:h.key===((g=s.sorting)==null?void 0:g.key)},h.class])},[t.createVNode(u,{gap:"",vcenter:""},{default:t.withCtx(()=>{var p;return[t.createVNode(m,null,{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(h.title),1)]),_:2},1024),h.key===((p=s.sorting)==null?void 0:p.key)?(t.openBlock(),t.createBlock(m,{key:0,class:"caret",shrink:""},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.currentSortDirection==="asc"?"▲":"▼"),1)]),_:1})):t.createCommentVNode("",!0)]}),_:2},1024)],10,Ib)}),256)),r.enableActions||e.$slots.corner?(t.openBlock(),t.createElementBlock("th",Ab,[t.renderSlot(e.$slots,"corner",{},void 0,!0)])):t.createCommentVNode("",!0)],32)]),t.createElementVNode("tbody",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.groupedRows,h=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[h.title?(t.openBlock(),t.createElementBlock("tr",Lb,[t.createElementVNode("td",null,t.toDisplayString(h.title),1)])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(h.rows,(g,p)=>(t.openBlock(),t.createBlock(f,{enableSelection:r.enableSelection,enableActions:r.enableActions,hasCorner:!!e.$slots.corner,key:g._id,"onClick:cell":o.clickCell,"onClick:row":o.clickRow,"onMousedown:select":o.mousedownSelect,"onMouseenter:select":o.mouseenterSelect,"onClick:actions":o.clickActions,selected:o.isSelected(g),row:g,index:p,columns:r.columns},null,8,["enableSelection","enableActions","hasCorner","onClick:cell","onClick:row","onMousedown:select","onMouseenter:select","onClick:actions","selected","row","index","columns"]))),128))],64))),256))])])],512)],34)}const mm=C(Ob,[["render",Rb],["__scopeId","data-v-faa7539a"]]);var wo={exports:{}},fm;function Pb(){if(fm)return wo.exports;fm=1;var e=Object.prototype.hasOwnProperty;function n(s){return"[Throws: "+(s?s.message:"?")+"]"}function r(s,o){if(e.call(s,o))try{return s[o]}catch(l){return n(l)}return s[o]}function i(s){var o=[];function l(a){if(a===null||typeof a!="object")return a;if(o.indexOf(a)!==-1)return"[Circular]";if(o.push(a),typeof a.toJSON=="function")try{var c=l(a.toJSON());return o.pop(),c}catch(u){return n(u)}if(Array.isArray(a)){var d=a.map(l);return o.pop(),d}var m=Object.keys(a).reduce(function(u,f){return u[f]=l(r(a,f)),u},{});return o.pop(),m}return l(s)}return wo.exports=function(s,o,l){return JSON.stringify(i(s),o,l)},wo.exports.ensureProperties=i,wo.exports}var Ub=Pb();const Ks=vt(Ub);function $b(e,n){return e==null||n=="date"&&e.toString&&e.toString()==="Invalid Date"}function hm(e){return e!=null}const Z={emits:["touched","update:modelValue"],props:{field:{type:Object,default(){return{}}},parentModel:{type:Object}},data(){return{dynamicOptions:[],asyncOptionsAreLoading:this.field.asyncOptions,value:this.modelValue}},watch:{modelValue(e,n){this.model=e}},mounted(){this.checkAutofocus()},async created(){const e=this;e.hasAsyncOptions&&await e.reloadAsyncOptions()},inject:{form:{default(){}},fieldPath:{default(){}}},computed:{asyncOptionsURL(){const e=this;if(e.field.asyncOptions&&String(e.field.asyncOptions||"").trim().length)return e.field.asyncOptions;if(e.field.dynamicOptions){const n=e.$sdk.utils.id(e.field.dynamicOptions);if(n)return e.$sdk.api.generateEndpointURL(`/smartlist/${n}/select`)}},hasAuthenticationToken(){return this.$sdk.auth.getCurrentToken()},hasAsyncOptions(){var e;if(this.asyncOptionsURL)return!0;if(this.field.type==="reference"){if((e=this.field.allowedReferences)!=null&&e.length)return!1;switch(this.field.widget){case"select":if(this.hasAuthenticationToken)return!0;break;default:return!1}if(this.field.lockFilter)return!0}return!1},loadingAsyncOptions(){return this.hasAsyncOptions&&this.asyncOptionsAreLoading},optionLookup(){var e=this;return e.options.reduce(function(n,r){const i=e.getValue(r);return n[i]=r,n},{})},selectableOptions(){return this.options},required(){return this.minimum},model:{get(){var e=this.cleanOutput(this.value);return e},set(e){let n;(this.isGroup||this.widget==="form")&&(e===this.value?n=!1:n=!0);const r=this.cleanInput(e),i=this.cleanInput(this.value);(Ks(r)!=Ks(i)||n)&&(this.value=r,this.checkAutofocus(),this.dispatch())}},options(){var e=this;if(e.field.type==="reference"){const n=(e.field.allowedReferences||[]).filter(Boolean);if(n.length)return n.map(function(r){let{_id:i,title:s}=r;return s=s||[r.firstName,r.lastName].filter(Boolean).join(" "),{title:s,value:i,_id:i}})}return e.hasAsyncOptions?e.dynamicOptions:(e.field.options||[]).reduce(function(n,r){if(!r)return n;const i=e.getValue(r);var o={title:r.title||r.name||r.label||i,value:i,none:r.none,group:r.group,source:r};return e.field.type=="reference"&&(o._id=i),n.push(o),n},[])},prefix(){return this.field.suffix},suffix(){return this.field.suffix},type(){return this.field.type||"string"},key(){return this.field.key},isGroup(){return this.type==="group"},asObject(){return this.isGroup&&!!this.field.asObject},layoutGroup(){return this.isGroup&&!this.field.asObject},canAddValue(){if(!this.singleValue&&!(this.options.length&&this.selectableOptions.length===0))return this.maximum===0||this.numValues<this.maximum},canRemoveValue(){return this.numValues>this.minimum},widget(){return this.field.widget},singleValue(){if(this.asObject){var e=this.minimum===1&&this.maximum===1;return e}else return this.maximum===1},multiValue(){return!this.singleValue},label(){return this.field.title},title(){return this.label},plural(){return this.field.plural},description(){return this.field.description},placeholder(){return this.field.placeholder||this.field.hint},addLabel(){return this.field.addLabel?this.field.addLabel:this.numValues?`Add another ${this.label}`:`Add ${this.label}`},removeLabel(){return"Remove"},size(){return this.field.size},numValues(){return this.singleValue?1:(this.value||[]).length||0},showLabel(){return this.field.title&&!this.field.hideTitle},showDescription(){return this.description},fields(){var e=this.field.fields;if(e&&e.length)return e},minimum(){if(this.layoutGroup)return 1;var e=parseInt(this.field.minimum||0);return isNaN(e)&&(e=0),e=Math.max(e,0),e=this.maximum?Math.min(e,this.maximum):e,parseInt(e)},maximum(){if(this.layoutGroup)return 1;var e=parseInt(this.field.maximum||0);return isNaN(e)&&(e=0),e=Math.max(e,0),parseInt(e)},ask(){var e=parseInt(this.field.ask);return e=Math.max(e,this.minimum),this.maximum&&(e=Math.min(e,this.maximum)),e},minDate(){if(this.field.minDate)return new Date(this.field.minDate)},maxDate(){if(this.field.maxDate)return new Date(this.field.maxDate)}},methods:{async reloadAsyncOptions(){const e=this;if(!e.hasAsyncOptions){e.asyncOptionsAreLoading=!1;return}if(e.asyncOptionsAreLoading=!0,e.asyncOptionsURL){const{data:n}=await e.$sdk.api.get(e.asyncOptionsURL);e.dynamicOptions=(n||[]).map(function(r){let i=r==null?void 0:r.title;i||(i=r==null?void 0:r.name),i||(i=r==null?void 0:r.label),i||(i=[r.firstName,r.lastName].filter(Boolean).join(" ").trim()),i||(i=r.value||String(r));const s=String((r==null?void 0:r.value)||(r==null?void 0:r.title)||(r==null?void 0:r.name)||(r==null?void 0:r.label)||r),o=e.$sdk.utils.id((r==null?void 0:r._id)||r);return{title:i,value:s,_id:o}})}else if(e.hasAuthenticationToken){const n=e.field.referenceType,r={filter:e.field.lockFilter,sort:{key:"title",direction:"asc",type:"string"},page:{size:1e3}},{items:i}=await e.$sdk.content.list(n,r);e.dynamicOptions=i.map(function({_id:s,title:o}){return{value:s,title:o,_id:s}})}e.asyncOptionsAreLoading=!1},cleanTextInput(e,n,r){switch(n){case"url":e=r.$sdk.utils.parseURL(e);break;case"key":e=String(r.$sdk.utils.machineName(e||"")||"").trim();break;case"integer":e=parseInt(String(e).replace(/[^0-9-]/g,"")),isNaN(e)&&(e=void 0);break;case"number":case"decimal":case"float":e=Number(String(e).replace(/[^0-9.-]/g,"")),isNaN(e)&&(e=void 0);break}return e},checkAutofocus(){if(this.field.autofocus){if(this.value)return;this.$nextTick(function(){this.refocus()})}},getValue(e){if(!e)return this.cleanTextInput(e);var n=this.cleanTextInput(e._id||e.value),r=hm(n);return!r&&e.title&&!this.returnObject&&(n=e.title),n=this.cleanTextInput(n),hm(n)?n:e},getLabel(e){if(e){var n=e.title;return!n&&n!==0&&n!==!1&&(n=e.name),!n&&n!==0&&n!==!1&&(n=e.label),!n&&n!==0&&n!==!1&&(n=e.value),typeof n=="object"?"(no title)":n}},touch(){this.$emit("touched")},getNewDefaultEntry(){},add(){if(this.canAddValue){var e=this.cleanInputValue(this.getNewDefaultEntry());(!this.value||!Array.isArray(this.value))&&(this.value=[]),this.value.push(e),this.dispatch(),this.$nextTick(function(){this.refocus()}),this.touch()}},remove(e){var n=this.model.indexOf(e);this.model.splice(n,1),this.dispatch(),this.touch()},dispatch(){this.$emit("update:modelValue",this.value)},cleanInputValue(e){return e},cleanOutputValue(e){return e},cleanOutput(e){var n=this;return $b(e,n.field.type)?n.multiValue?e=[]:e=void 0:n.multiValue?(Array.isArray(e)||(e=[]),e.forEach(function(r,i){e[i]=n.cleanOutputValue(r)})):e=n.cleanOutputValue(e),e},cleanInput(e){var n=this;if(n.multiValue){for(e||(e=[]),Array.isArray(e)||(e=[e]),n.maximum&&e.length>n.maximum&&(e.length=n.maximum);e.length<n.minimum;)e.push(n.cleanInputValue(n.getNewDefaultEntry()));e=e.map(function(r){var i=n.cleanInputValue(r);return i})}else e&&(e=n.cleanInputValue(e));return e},refocus(){var r;var e=this.$refs.input;if(e){var n;Array.isArray(e)?n=e[e.length-1]:n=e,n&&(typeof n.focus=="function"?n.focus():typeof((r=n.$el)==null?void 0:r.focus)=="function"&&n.$el.focus())}}}};function zb(e){return e===void 0||typeof e>"u"||e===null||String(e)==="null"||String(e)==="undefined"}const jb={data(){return{candidate:null}},props:{modelValue:{},pills:{type:Boolean,default:!1}},mixins:[Z],created(){this.model=this.model},methods:{maybeAutoSelectSingleOption(){if(this.loadingAsyncOptions||!this.singleValue||!this.minimum||this.model||this.model===!1||this.model===0)return;const e=this.selectableOptions.filter(function(n){return!n.none});e.length===1&&(this.model=e[0])},displayLabelFromValue(e){if(!e)return;const n=e.value||e,r=this.optionLookup[n]||{};return r.title||r.name||e.title||e.value||e},addValue(e){this.canAddValue&&this.model.indexOf(e)===-1&&(this.model=[...this.model,e])},removeValue(e){var n=this.model.slice();e!=-1&&(n.splice(e,1),this.model=n)},cleanOutput(e){var n=this;return zb(e)?n.multiValue?e=[]:e=void 0:n.multiValue?e=(e||[]).filter(function(r){return r!=null}).map(function(r){return n.getValue(r)}):e=n.getValue(e),e},cleanInput(e){var n=this;if(n.multiValue)e||(e=[]),Array.isArray(e)||(e=[e]),n.maximum&&e.length>n.maximum&&(e.length=n.maximum),e=e.filter(function(i){return i!=null}).map(function(i){var s=n.getValue(i);return n.returnObject?n.optionLookup[s]:s});else{var r=n.getValue(e);switch(e=n.returnObject?n.optionLookup[r]:r,e){case"":switch(n.type){case"decimal":case"float":case"number":case"integer":e=void 0;break}break}}return e}},watch:{candidate(e){e&&(this.addValue(e),this.candidate=null)},selectableOptions:{immediate:!0,handler(){this.maybeAutoSelectSingleOption()}},loadingAsyncOptions(){this.maybeAutoSelectSingleOption()}},computed:{noneTitle(){return this.field.placeholder||"None"},usePills(){return this.field.pills||this.pills},returnObject(){return this.type=="reference"},classes(){var e=[];return this.multiValue?e.push("multiple"):e.push("single"),this.usePills&&e.push("pills"),e},summary(){if(this.multiValue)return"Select an option";const e=this.selectableOptions.find(function(i){return i.none}),n=(e==null?void 0:e.title)||(e==null?void 0:e.label),r=this.model;return r||r===!1||r===0?this.getLabel(this.optionLookup[this.model]):n||this.noneTitle||this.title||"Click to select"},grouped(){const e=this,{values:n}=e.selectableOptions.reduce(function(r,i){const s=i.group||"";let o=r.hash[s];return o||(o=r.hash[s]={title:s,options:[]},r.values.push(o)),o.options.push(i),r},{hash:{},values:[]});if(!(n.length<=1))return n},modelLookup(){var e=this;return e.multiValue?e.model.reduce(function(n,r){const i=e.getValue(r);return n[i]=r,n},{}):{}},selectableOptions(){var r;const e=this;let n=e.options;return e.multiValue&&(n=n.filter(function(i){return!e.modelLookup[e.getValue(i)]})),(r=e.field)!=null&&r.sorted?n.sort(function(i,s){var o=(i.title||i).toLowerCase(),l=(s.title||s).toLowerCase();return o<l?-1:o>l?1:0}):n},showNoneOption(){return!(!(this.singleValue&&!this.minimum)||this.selectableOptions.find(function(r){return r.none}))}}},qb={key:0,class:"ux-field-title"},Hb={key:0,class:"ux-required-marker"},Wb={key:1,class:"ux-field-description"},Gb={key:2,class:"select-tags"},Yb=["onClick"],Kb={key:3},Jb={key:4,class:"select-input-wrapper"},Zb={class:"ui-select-button"},Xb=["label"],Qb=["value"],vb=["value"],ex={class:"ui-select-button"},tx=["multiple"],nx={key:0,value:""},rx=["label"],ox=["value"],ix=["value"];function sx(e,n,r,i,s,o){var m,u;const l=t.resolveComponent("flex-cell"),a=t.resolveComponent("ux-icon"),c=t.resolveComponent("flex-row"),d=t.resolveComponent("ux-button");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["native-select",o.classes])},[e.showLabel?(t.openBlock(),t.createElementBlock("label",qb,[t.createTextVNode(t.toDisplayString(e.label)+" ",1),e.required?(t.openBlock(),t.createElementBlock("span",Hb,"*")):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),e.showDescription?(t.openBlock(),t.createElementBlock("div",Wb,t.toDisplayString(e.description),1)):t.createCommentVNode("",!0),e.multiValue?(t.openBlock(),t.createElementBlock("div",Gb,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.model,(f,h)=>(t.openBlock(),t.createElementBlock("div",{class:"select-tag",key:f.value||f},[t.createVNode(c,{gap:"",center:""},{default:t.withCtx(()=>[t.createVNode(l,null,{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.displayLabelFromValue(f)),1)]),_:2},1024),t.createVNode(l,{shrink:""},{default:t.withCtx(()=>[t.createElementVNode("a",{onClick:g=>o.removeValue(h)},[t.createVNode(a,{icon:"fa-times"})],8,Yb)]),_:2},1024)]),_:2},1024)]))),128))])):t.createCommentVNode("",!0),e.loadingAsyncOptions?(t.openBlock(),t.createElementBlock("div",Kb,[t.createVNode(a,{icon:"fa-spinner",spin:"",left:""}),n[4]||(n[4]=t.createTextVNode(" Loading Options ",-1))])):(t.openBlock(),t.createElementBlock("div",Jb,[e.multiValue?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[e.canAddValue?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createElementVNode("div",Zb,[t.renderSlot(e.$slots,"default",{},()=>[t.createVNode(d,{size:e.size,tag:"div"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.summary),1)]),_:1},8,["size"])],!0)]),t.withDirectives((t.openBlock(),t.createElementBlock("select",{onFocus:n[0]||(n[0]=(...f)=>e.touch&&e.touch(...f)),"onUpdate:modelValue":n[1]||(n[1]=f=>s.candidate=f),key:(m=e.model)==null?void 0:m.length},[n[5]||(n[5]=t.createElementVNode("option",{value:""},"Select an option",-1)),o.grouped?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(o.grouped,f=>(t.openBlock(),t.createElementBlock("optgroup",{label:f.title,key:f.title},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(f.options,h=>(t.openBlock(),t.createElementBlock("option",{value:h.value},t.toDisplayString(h.title),9,Qb))),256))],8,Xb))),128)):(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(o.selectableOptions,f=>(t.openBlock(),t.createElementBlock("option",{value:f.value},t.toDisplayString(f.title),9,vb))),256))],32)),[[t.vModelSelect,s.candidate]])],64)):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createElementVNode("div",ex,[t.renderSlot(e.$slots,"default",{},()=>[t.createVNode(d,{size:e.size,tag:"div"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.summary),1)]),_:1},8,["size"])],!0)]),t.withDirectives((t.openBlock(),t.createElementBlock("select",{onFocus:n[2]||(n[2]=(...f)=>e.touch&&e.touch(...f)),multiple:e.multiValue,"onUpdate:modelValue":n[3]||(n[3]=f=>e.model=f),key:(u=e.model)==null?void 0:u.length},[o.showNoneOption?(t.openBlock(),t.createElementBlock("option",nx,t.toDisplayString(o.noneTitle),1)):t.createCommentVNode("",!0),o.grouped?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(o.grouped,f=>(t.openBlock(),t.createElementBlock("optgroup",{label:f.title,key:f.title},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(f.options,h=>(t.openBlock(),t.createElementBlock("option",{value:h.value},t.toDisplayString(h.title),9,ox))),256))],8,rx))),128)):(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:2},t.renderList(o.selectableOptions,f=>(t.openBlock(),t.createElementBlock("option",{value:f.value},t.toDisplayString(f.title),9,ix))),256))],40,tx)),[[t.vModelSelect,e.model]])],64))]))],2)}const Tt=C(jb,[["render",sx],["__scopeId","data-v-bf1479ae"]]),lx={props:{total:{type:Number,default(){return 0}},page:{type:Object,default(){return{size:50,index:1}}},sizeOptions:{type:Array,default(){return[50,100,250,500]}}},components:{NativeSelect:Tt},watch:{totalPages(){this.currentPage=0}},computed:{perPage:{get(){return this.pageModel.size},set(e){e=Math.max(e,1),this.pageModel.size=e,this.dispatch()}},pageField(){return{type:"integer",maximum:1,minimum:1,options:Array(this.totalPages).fill(1).map((e,n)=>e+n)}},totalPages(){return Math.ceil(this.total/this.perPage)},startIndex(){return(this.currentPage-1)*this.pageModel.size},displayStartIndex(){return this.total?this.startIndex+1:0},endIndex(){return Math.min(this.startIndex+this.pageModel.size,this.total)},currentPage:{get(){return this.pageModel.index},set(e){this.totalPages&&(e=Math.min(this.totalPages,e)),e=Math.max(e,1),this.pageModel.index=e,this.dispatch()}}},methods:{dispatch(){return this.$emit("update:page",this.pageModel)},previousPage(){this.currentPage--},nextPage(){this.currentPage++}},data(){return{pageModel:this.page,perPageField:{minimum:1,maximum:1,options:this.sizeOptions.map(function(e){return{title:`${e} per page`,value:e}})}}}};function ax(e,n,r,i,s,o){const l=t.resolveComponent("native-select"),a=t.resolveComponent("flex-cell"),c=t.resolveComponent("ux-icon"),d=t.resolveComponent("ux-button"),m=t.resolveComponent("flex-row");return t.openBlock(),t.createBlock(m,{center:"",gap:""},{default:t.withCtx(()=>[t.createVNode(a,{shrink:"",class:"text"},{default:t.withCtx(()=>[t.createVNode(l,{modelValue:o.perPage,"onUpdate:modelValue":n[0]||(n[0]=u=>o.perPage=u),field:s.perPageField},{default:t.withCtx(()=>[e.$device.breakpoint.xs?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(t.toDisplayString(o.displayStartIndex)+"-"+t.toDisplayString(o.endIndex)+" of "+t.toDisplayString(r.total),1)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("Showing "+t.toDisplayString(o.displayStartIndex)+" to "+t.toDisplayString(o.endIndex)+" of "+t.toDisplayString(r.total)+" total",1)],64))]),_:1},8,["modelValue","field"])]),_:1}),t.createVNode(a),o.totalPages>1?(t.openBlock(),t.createBlock(a,{key:0,shrink:""},{default:t.withCtx(()=>[t.createVNode(m,{gap:"",center:""},{default:t.withCtx(()=>[t.createVNode(a,{shrink:"",class:"text"},{default:t.withCtx(()=>[t.createVNode(l,{modelValue:o.currentPage,"onUpdate:modelValue":n[1]||(n[1]=u=>o.currentPage=u),field:o.pageField},{default:t.withCtx(()=>[e.$device.breakpoint.xs?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(t.toDisplayString(o.currentPage)+"/"+t.toDisplayString(o.totalPages),1)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("Page "+t.toDisplayString(o.currentPage)+" of "+t.toDisplayString(o.totalPages),1)],64))]),_:1},8,["modelValue","field"])]),_:1}),t.createVNode(a,{shrink:""},{default:t.withCtx(()=>[t.createVNode(d,{size:"sm",icon:"",onClick:n[2]||(n[2]=u=>o.previousPage())},{default:t.withCtx(()=>[t.createVNode(c,{icon:"fa-arrow-left"})]),_:1})]),_:1}),t.createVNode(a,{shrink:""},{default:t.withCtx(()=>[t.createVNode(d,{size:"sm",icon:"",onClick:n[3]||(n[3]=u=>o.nextPage())},{default:t.withCtx(()=>[t.createVNode(c,{icon:"fa-arrow-right"})]),_:1})]),_:1})]),_:1})]),_:1})):t.createCommentVNode("",!0)]),_:1})}const pm=C(lx,[["render",ax],["__scopeId","data-v-93d339c8"]]);function cx(e){return t.getCurrentScope()?(t.onScopeDispose(e),!0):!1}function gm(e){return typeof e=="function"?e():t.unref(e)}const dx=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const ux=e=>e!=null,Js=()=>{};function Zs(e){var n;const r=gm(e);return(n=r==null?void 0:r.$el)!=null?n:r}const mx=dx?window:void 0;function fx(){const e=t.ref(!1),n=t.getCurrentInstance();return n&&t.onMounted(()=>{e.value=!0},n),e}function hx(e){const n=fx();return t.computed(()=>(n.value,!!e()))}function px(e,n,r={}){const{root:i,rootMargin:s="0px",threshold:o=.1,window:l=mx,immediate:a=!0}=r,c=hx(()=>l&&"IntersectionObserver"in l),d=t.computed(()=>{const g=gm(e);return(Array.isArray(g)?g:[g]).map(Zs).filter(ux)});let m=Js;const u=t.ref(a),f=c.value?t.watch(()=>[d.value,Zs(i),u.value],([g,p])=>{if(m(),!u.value||!g.length)return;const k=new IntersectionObserver(n,{root:Zs(p),rootMargin:s,threshold:o});g.forEach(w=>w&&k.observe(w)),m=()=>{k.disconnect(),m=Js}},{immediate:a,flush:"post"}):Js,h=()=>{m(),f(),u.value=!1};return cx(h),{isSupported:c,isActive:u,pause(){m(),u.value=!1},resume(){u.value=!0},stop:h}}const gx={setup(){const e=t.ref(!1),n=t.ref(),{stop:r}=px(n,([{isIntersecting:i}])=>{i&&(e.value=!0,r())},{rootMargin:"600px"});return{targetEl:n,shouldRender:e}}},yx={ref:"targetEl"};function kx(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",yx,[i.shouldRender?t.renderSlot(e.$slots,"default",{key:0}):t.createCommentVNode("",!0)],512)}const ym=C(gx,[["render",kx]]),wx={props:{icon:{type:[Object,String],default(){return"fa-exclamation"}},type:{type:String,default:"info"}},computed:{classes(){var e=[];return e.push(`ux-info-${this.type}`),e}}},_x={class:"icon-circle"};function bx(e,n,r,i,s,o){const l=t.resolveComponent("ux-icon"),a=t.resolveComponent("flex-cell"),c=t.resolveComponent("flex-row");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["ux-info-box",o.classes])},[t.createVNode(c,{style:{gap:"1em"},center:""},{default:t.withCtx(()=>[r.icon?(t.openBlock(),t.createBlock(a,{key:0,shrink:""},{default:t.withCtx(()=>[t.createElementVNode("div",_x,[t.createVNode(l,{icon:r.icon},null,8,["icon"])])]),_:1})):t.createCommentVNode("",!0),t.createVNode(a,null,{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default",{},void 0,!0)]),_:3})]),_:3})],2)}const km=C(wx,[["render",bx],["__scopeId","data-v-9669e7c0"]]),xx={props:{id:{type:[Object,String]},initials:{type:[String,Object]},cacheKey:{type:[String,Number]}},data(){return{stringID:this.$sdk.utils.id(this.id)}},watch:{id(e){this.stringID=this.$sdk.utils.id(e)}},computed:{initialString(){var s,o,l;if(typeof this.initials=="string")return this.initials;const e=((s=this.initials)==null?void 0:s.firstName)||"",n=((o=this.initials)==null?void 0:o.lastName)||"",r=`${e} ${n}`.trim(),i=(l=this.initials)==null?void 0:l.title;return r||i},initialLetters(){const e=this.initialString||"";if(!e||!e.length)return"";const n=e.split(/\s+/);let r="";return n[0]&&(r+=String(n[0][0]||"").toUpperCase()),n[1]&&(r+=String(n[1][0]||"").toUpperCase()),r},url(){const e={};return this.cacheKey&&(e.cacheKey=this.cacheKey),this.$sdk.api.generateEndpointURL(`/image/${this.stringID}`,e,{file:!0})},style(){const e={};return e.backgroundImage=`url(${this.url})`,e}}},Cx={key:0,class:"initials"};function Vx(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["avatar-image",{"with-initials":o.initialLetters}])},[o.initialLetters?(t.openBlock(),t.createElementBlock("div",Cx,t.toDisplayString(o.initialLetters),1)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"avatar-img",style:t.normalizeStyle(o.style)},null,4)],2)}const Xs=C(xx,[["render",Vx],["__scopeId","data-v-f8d86e04"]]),Ex={props:{large:{type:Boolean}}};function Nx(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["ux-spinner",{large:r.large}])},[...n[0]||(n[0]=[t.createElementVNode("svg",{width:"24",height:"24",stroke:"#000",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("g",{class:"spinner_V8m1"},[t.createElementVNode("circle",{cx:"12",cy:"12",r:"9.5",fill:"none","stroke-width":"2"})])],-1)])],2)}const bn=C(Ex,[["render",Nx],["__scopeId","data-v-d9a57955"]]),Tx={components:{Spinner:bn},props:{to:{type:[Object,String]},icon:{type:Boolean},color:{type:String,default:"default"},bgColor:{type:String},fgColor:{type:String},tag:{type:String},href:{type:String},target:{type:String},loading:{type:Boolean},active:{type:Boolean},disabled:{type:Boolean},block:{type:Boolean},size:{type:String,default:"md"}},computed:{style(){var e={};return this.bgColor&&(e.backgroundColor=this.bgColor),this.fgColor&&(e.color=this.fgColor),e},classes(){var e=[];return e.push(`ux-btn-${this.size}`),this.block&&e.push("ux-btn-block"),this.loading&&e.push("ux-btn-loading"),this.active&&e.push("ux-btn-active"),this.icon&&e.push("ux-btn-icon"),e.push(`ux-btn-color-${this.color}`),this.disabled&&e.push("ux-btn-disabled"),e},element(){switch(this.tag){case"span":return this.tag;case"submit":return"button";default:return this.to||this.href?"ux-link":this.tag||"button"}}}},Sx={class:"ux-btn-text"};function Bx(e,n,r,i,s,o){const l=t.resolveComponent("spinner");return t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.element),{type:"button",active:r.active,loading:r.loading,to:r.to,href:r.href,target:r.target,style:t.normalizeStyle(o.style),class:t.normalizeClass([o.classes,"ux-btn"]),disabled:r.disabled},{default:t.withCtx(()=>[r.loading?(t.openBlock(),t.createBlock(l,{key:0})):t.createCommentVNode("",!0),t.createElementVNode("span",Sx,[t.renderSlot(e.$slots,"default",{},void 0,!0)])]),_:3},8,["active","loading","to","href","target","style","class","disabled"])}const wm=C(Tx,[["render",Bx],["__scopeId","data-v-ea56e98b"]]),Dx={},Ox={class:"ux-btn-group"};function Mx(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",Ox,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}const _m=C(Dx,[["render",Mx],["__scopeId","data-v-a0ecb730"]]),Fx={props:{value:{type:Boolean,default(){return!1}}},computed:{classes(){var e=[];return this.value?e.push("ux-checkbox-true"):e.push("ux-checkbox-false"),e}}};function Ix(e,n,r,i,s,o){const l=t.resolveComponent("ux-icon");return t.openBlock(),t.createElementBlock("button",{class:t.normalizeClass(["ux-checkbox",o.classes])},[t.createVNode(l,{class:"icon",icon:"fa-check"})],2)}const _o=C(Fx,[["render",Ix],["__scopeId","data-v-54bb07ba"]]),Ax={props:{value:{type:Boolean,default(){return!1}},loading:{type:Boolean,default(){return!1}}},computed:{classes(){var e=[];return this.value?e.push("ux-switch-true"):e.push("ux-switch-false"),this.loading&&e.push("ux-switch-loading"),e}}};function Lx(e,n,r,i,s,o){const l=t.resolveComponent("ux-icon");return t.openBlock(),t.createElementBlock("a",{class:t.normalizeClass(["ux-switch",o.classes])},[t.createElementVNode("span",null,[t.createVNode(l,{spin:"",icon:"fa-spinner"})])],2)}const Qs=C(Ax,[["render",Lx],["__scopeId","data-v-1a0e83ee"]]),Rx={props:{to:{type:[Object,String]},href:{type:String},target:{type:String},disabled:{type:Boolean},active:{type:Boolean}},methods:{clicked(e){var n=this;if(n.to&&(n.buildMode||n.nuxtMode))return e.preventDefault(),e.stopImmediatePropagation(),n.$sdk.app.to(n.to);if(n.href){if(n.buildMode){e.preventDefault(),window.open(n.href);return}if(n.nuxtMode){e.preventDefault(),e.stopImmediatePropagation();return}}}},computed:{actualHref(){if(this.href)return this.href;if(this.nuxtMode)return this.to?this.$sdk.app.createHref(this.to):void 0;if(this.to&&this.$router&&this.$router.resolve){const e=this.$router;this.$route;const n=!1,{location:r,route:i,href:s}=e.resolve(this.to,this.$route,n);return s}},nuxtMode(){return this.to&&this.$sdk.nuxt&&this.$sdk.app&&this.$sdk.app.createHref},buildMode(){return!!this.$sdk&&this.$sdk.app&&this.$sdk.app.builder},class(){var e=[];return this.disabled&&e.push("disabled"),this.active&&e.push("active"),(this.href||this.to)&&e.push("haslink"),e},element(){return this.nuxtMode||this.buildMode?"a":this.to?"router-link":"a"}}};function Px(e,n,r,i,s,o){return t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.element),{onClick:o.clicked,to:r.to,href:o.actualHref,target:r.target,class:t.normalizeClass([o.class,"ux-link"])},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default",{},void 0,!0)]),_:3},8,["onClick","to","href","target","class"])}const bm=C(Rx,[["render",Px],["__scopeId","data-v-7a924ee2"]]),Ux={props:{icon:{type:[Object,String]},spin:{type:Boolean},left:{type:Boolean},right:{type:Boolean},fixed:{type:Boolean}},computed:{useSvgLayout(){return!!this.$slots.default||!this.icon},modifierClasses(){var e=[];return this.spin&&e.push("fa-spin"),this.left&&e.push("ux-icon-left"),this.right&&e.push("ux-icon-right"),this.fixed&&e.push("ux-icon-fixed"),e},iconClasses(){return[this.icon,...this.modifierClasses]}}};function $x(e,n,r,i,s,o){return o.useSvgLayout?(t.openBlock(),t.createElementBlock("span",{key:0,class:t.normalizeClass(["ux-icon ux-icon-svg",o.modifierClasses])},[t.renderSlot(e.$slots,"default",{},void 0,!0)],2)):(t.openBlock(),t.createElementBlock("i",{key:1,class:t.normalizeClass(["ux-icon fa",o.iconClasses])},null,2))}const xm=C(Ux,[["render",$x],["__scopeId","data-v-d3c61976"]]),bo={cache:{}},zx={props:{group:{type:String},right:{type:Boolean,default:!1},bottom:{type:Boolean,default:!1},stop:{type:Boolean,default:!1},flex:{type:Boolean,default:!1},overflow:{type:Boolean},closeOnClick:{type:Boolean,default:!0},visible:{type:Boolean,default:!0},modelValue:{type:Boolean,default:!1}},data(){return{outerStyle:{},innerStyle:{},anchorRect:null,isExpanded:this.modelValue,isVisible:this.visible,triggerEvent:null,refMenu:null,mounted:!1,repositionFrame:null,resizeObserver:null}},watch:{modelValue(e){this.expanded=e},visible(e){this.isVisible=e}},mounted(){this.refMenu=this.$refs.menu,this.mounted=!0},beforeUnmount(){this.removeListeners(),this.refMenu=null,this.mounted=!1,bo.cache[this.group]===this&&(bo.cache[this.group]=null)},methods:{removeListeners(){document.removeEventListener("click",this.globalClick),window.removeEventListener("resize",this.scheduleReposition),window.removeEventListener("scroll",this.scheduleReposition,!0),this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),this.repositionFrame&&(cancelAnimationFrame(this.repositionFrame),this.repositionFrame=null),this.refMenu&&this.refMenu.removeEventListener("click",this.immediateClick)},addEventListeners(){document.addEventListener("click",this.globalClick),window.addEventListener("resize",this.scheduleReposition),window.addEventListener("scroll",this.scheduleReposition,!0),this.$nextTick(()=>{const e=this.$refs.menu;!e||!this.isExpanded||typeof ResizeObserver>"u"||(this.resizeObserver=new ResizeObserver(this.scheduleReposition),this.resizeObserver.observe(e))}),this.refMenu&&this.refMenu.addEventListener("click",this.immediateClick)},scheduleReposition(){this.repositionFrame||(this.repositionFrame=requestAnimationFrame(()=>{this.repositionFrame=null,this.isExpanded&&this.position()}))},immediateClick(e){this.expanded&&this.closeOnClick&&(e.stopImmediatePropagation(),this.expanded=!1)},globalClick(e){if(this.triggerEvent===e)return;var n=this.$refs.menu,r=e.target||e.srcElement;if(r&&r.isConnected===!1)return;if(n&&n.contains(r)){this.closeOnClick&&(this.expanded=!1);return}const i=r.closest&&r.closest(".ux-menu-outer, .modal-wrapper");i&&!i.contains(this.$el)||(this.expanded=!1)},position(){const e=this.anchorRect||this.$el.getBoundingClientRect();let n=e.left+window.scrollX,r=e.bottom+window.scrollY;this.outerStyle.left=`${n}px`,this.outerStyle.top=`${r}px`,this.innerStyle={},this.right&&!this.anchorRect&&(this.innerStyle.right=`-${e.width}px`),this.bottom&&!this.anchorRect&&(this.innerStyle.bottom=`${e.height}px`);var i=this.getMaxZIndex();this.outerStyle.zIndex=i,this.$nextTick(()=>{this.adjustForViewportBoundaries(e)})},adjustForViewportBoundaries(e){const n=this.$refs.menu;if(!n)return;const r=n.getBoundingClientRect(),i={height:window.innerHeight},s=r.bottom>i.height,o=e.top,l=i.height-e.bottom;s&&o>l&&!this.anchorRect?(this.innerStyle={...this.innerStyle,bottom:`${e.height}px`},this.$nextTick(()=>this.ensureWithinViewport())):this.ensureWithinViewport()},ensureWithinViewport(){const e=this.$refs.menu;if(!e)return;const n=e.getBoundingClientRect(),r={width:window.innerWidth,height:window.innerHeight};let i=parseInt(this.outerStyle.left)||0,s=parseInt(this.outerStyle.top)||0;n.right>r.width&&(i-=n.right-r.width+10),n.left<0&&(i+=Math.abs(n.left)+10),n.bottom>r.height&&(s-=n.bottom-r.height+10),n.top<0&&(s+=Math.abs(n.top)+10),this.outerStyle.left=`${Math.max(0,i)}px`,this.outerStyle.top=`${Math.max(0,s)}px`},getMaxZIndex(){return Math.max(...Array.from(document.querySelectorAll("body *"),e=>parseFloat(window.getComputedStyle(e).zIndex)).filter(e=>!Number.isNaN(e)),0)},close(){this.expanded=!1},openAt(e,n){this.anchorRect={left:e,right:e,top:n,bottom:n,width:0,height:0},this.isExpanded?this.position():this.expanded=!0}},computed:{expanded:{get(){return this.isExpanded},set(e){var n;this.group&&(n=bo.cache[this.group]),this.isExpanded!=e&&(this.isExpanded=e,e?(this.position(),this.addEventListeners(),bo.cache[this.group]=this,n&&n!=this&&(n.expanded=!1)):(this.removeListeners(),this.anchorRect=null),this.$emit("update:modelValue",e))}},on(){var e=this;return{click(n){e.stop&&n.stopImmediatePropagation(),e.triggerEvent=n,e.expanded=!e.expanded}}}}};function jx(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["ux-menu",{right:r.right}])},[t.createElementVNode("span",null,[t.renderSlot(e.$slots,"activator",{on:o.on},void 0,!0)]),(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[t.createVNode(t.Transition,{name:"ux-menu-transition",appear:""},{default:t.withCtx(()=>[s.isExpanded?t.withDirectives((t.openBlock(),t.createElementBlock("div",{key:0,class:"ux-menu-outer",style:t.normalizeStyle(s.outerStyle)},[t.createElementVNode("div",{class:t.normalizeClass(["ux-menu-panel",{flex:r.flex,overflow:r.overflow}]),ref:"menu",style:t.normalizeStyle(s.innerStyle)},[t.renderSlot(e.$slots,"default",{},void 0,!0)],6)],4)),[[t.vShow,s.isVisible]]):t.createCommentVNode("",!0)]),_:3})]))],2)}const Cm=C(zx,[["render",jx],["__scopeId","data-v-54043858"]]),qx={name:"menulist",props:{items:{type:Array,default(){return[]}},depth:{type:Number,default:0},expandOn:{type:String,default:"none"},isolate:{type:Boolean,default:!0},collapseOnRouteChange:{type:Boolean,default:!0},displayCaret:{type:Boolean,default:!0}},mounted(){this.mounted=!0,this.addRouteChangeListeners()},beforeUnmount(){this.mounted=!1,this.removeRouteChangeListeners(),this.removeListeners()},computed:{actualDepth(){const e=this.depth;return isNaN(e)||!parseInt(e)?0:Math.max(e,0)},filteredItems(){const e=this;let n=e.tree.filter(function(r){return!(r.advancedOptions&&e.$sdk.utils.checkContextVisibility&&!e.$sdk.utils.checkContextVisibility(r.contextVisibility)||r.disabled)});return this.actualDepth===1&&(n=n.map(function(r){return{...r,items:[]}})),n}},data(){return{currentExpandedItems:[],tree:JSON.parse(JSON.stringify(this.items))}},methods:{globalClick(e){this.collapseAll()},routeChanged(){this.collapseOnRouteChange&&this.collapseAll()},addRouteChangeListeners(){this.$sdk.addEventListener("route:change",this.routeChanged)},removeRouteChangeListeners(){this.$sdk.removeEventListener("route:change",this.routeChanged)},addListeners(){var n;const e=(n=this.$el)==null?void 0:n.ownerDocument;e&&e.body.addEventListener("click",this.globalClick)},removeListeners(){var n;const e=(n=this.$el)==null?void 0:n.ownerDocument;e&&e.body.removeEventListener("click",this.globalClick)},expandItem(e){e.expanded=!0,this.currentExpandedItems.push(e)},collapseItem(e){const n=this.currentExpandedItems.indexOf(e);n!==-1&&(e.expanded=!1,this.currentExpandedItems.splice(n,1))},collapseAll(){this.currentExpandedItems.forEach(function(e){e.expanded=!1}),this.currentExpandedItems=[],this.currentExpandedItems.length?this.addListeners():this.removeListeners()},toggle(e){const n=e.expanded;this.isolate&&(this.currentExpandedItems.forEach(function(i){i.expanded=!1}),this.currentExpandedItems=[]);const r=this.currentExpandedItems.indexOf(e);n||r!==-1?this.collapseItem(e):this.expandItem(e),this.currentExpandedItems.length?this.addListeners():this.removeListeners()}},watch:{items:{handler(e){this.tree=JSON.parse(JSON.stringify(e))},deep:!0}}};function Hx(e,n,r,i,s,o){const l=t.resolveComponent("flex-cell"),a=t.resolveComponent("ux-icon"),c=t.resolveComponent("flex-row"),d=t.resolveComponent("ux-link"),m=t.resolveComponent("menulist",!0);return t.openBlock(),t.createElementBlock("ul",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.filteredItems,u=>{var f;return t.openBlock(),t.createElementBlock("li",{class:t.normalizeClass({expanded:u.expanded,collapsed:!u.expanded}),key:u.title},[r.expandOn==="click"&&((f=u.items)!=null&&f.length)?(t.openBlock(),t.createBlock(d,{key:0,onClick:t.withModifiers(h=>o.toggle(u),["stop","prevent"]),class:t.normalizeClass(u.class)},{default:t.withCtx(()=>[t.createVNode(c,{center:""},{default:t.withCtx(()=>[t.createVNode(l,null,{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(u.title),1)]),_:2},1024),r.displayCaret?(t.openBlock(),t.createBlock(l,{key:0,shrink:""},{default:t.withCtx(()=>[t.createVNode(a,{class:"caret",icon:"fa-angle-down"})]),_:1})):t.createCommentVNode("",!0)]),_:2},1024)]),_:2},1032,["onClick","class"])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[u.type==="url"?(t.openBlock(),t.createBlock(d,{key:0,class:t.normalizeClass(u.class),target:u.target,href:u.href||u.url},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(u.title),1)]),_:2},1032,["class","target","href"])):u.type==="route"?(t.openBlock(),t.createBlock(d,{key:1,class:t.normalizeClass(u.class),to:{name:u.route}},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(u.title),1)]),_:2},1032,["class","to"])):t.createCommentVNode("",!0)],64)),u.items&&u.items.length?(t.openBlock(),t.createBlock(m,{key:2,expandOn:r.expandOn,items:u.items,displayCaret:r.displayCaret,isolate:r.isolate,depth:o.actualDepth-1},null,8,["expandOn","items","displayCaret","isolate","depth"])):t.createCommentVNode("",!0)],2)}),128))])}const Vm=C(qx,[["render",Hx],["__scopeId","data-v-601e888e"]]),Wx={props:{item:{type:[Object,String]},alt:{type:String},width:{type:[Number,String]},height:{type:[Number,String]},auto:{type:Boolean,default:!0},inline:{type:Boolean},quality:{type:[Number,String]},contain:{type:Boolean,default:!0},preview:{type:Boolean,default:!1},crop:{type:Boolean},cover:{type:Boolean},format:{type:String},upscale:{type:Boolean,default:!0},type:{type:String,default:"image"},svg:{type:Boolean},lazy:{type:Boolean},eager:{type:Boolean}},data(){return{model:this.item,retries:0,cacheBuster:0,retryTimer:null}},watch:{item(e){this.model=e}},beforeMount(){this.$sdk.auth.ensureValidToken()},mounted(){const e=this.$refs.img;e&&e.addEventListener("error",this.imageLoadError)},beforeUnmount(){const e=this.$refs.img;e&&e.removeEventListener("error",this.imageLoadError)},methods:{imageLoadError(e){const n=this;n.retryTimer&&(clearTimeout(n.retryTimer),n.retryTimer=!1),n.retryTimer=setTimeout(function(){n.retries<5&&(n.cacheBuster++,n.retries++)},500)}},computed:{actualFormat(){var r,i;const e=((r=this.item)==null?void 0:r.fileMime)==="image/heic",n=((i=this.item)==null?void 0:i.fileExtension)==="heic";return e||n?"png":this.format},loading(){if(this.lazy)return"lazy";if(this.eager)return"eager"},altText(){var e;return this.alt||((e=this.model)==null?void 0:e.title)},className(){var e=[];return this.portrait&&e.push("img-portrait"),e.join(" ")},isSvg(){var e;if(this.svg)return!0;switch((e=this.item)==null?void 0:e.fileMime){case"image/svg+xml":case"image/svg":return!0}},portrait(){return this.crop?this.dimensionHeight>this.dimensionWidth:this.modelHeight>this.modelWidth},manualWidth(){return parseInt(this.width)},manualHeight(){return parseInt(this.height)},modelWidth(){var e;return parseInt((e=this.model)==null?void 0:e.width)},modelHeight(){var e;return parseInt((e=this.model)==null?void 0:e.height)},id(){return this.$sdk.utils.id(this.model)},params(){var n,r,i,s;var e={};if(e.access_token=this.$sdk.auth.getCurrentToken(),e.cb=this.cacheBuster,this.manualWidth&&(e.w=this.manualWidth?this.manualWidth:void 0),this.manualHeight&&(e.h=this.manualHeight?this.manualHeight:void 0),this.upscale&&(e.u=!0),this.auto&&!e.w&&!e.h){const o=(s=(i=(r=(n=this.$sdk.app)==null?void 0:n.device)==null?void 0:r.image)==null?void 0:i.auto)==null?void 0:s.med;o&&(e.w=o,e.u=!1)}return this.crop?e.c=!0:this.contain||(e.c=!!parseInt(this.manualWidth)&&!!parseInt(this.manualHeight)),this.quality&&(e.q=parseInt(this.quality)),this.actualFormat&&(e.f=this.actualFormat),e},src(){return this.$sdk.api.generateEndpointURL(`/image/${this.id}`,this.params,{file:!0})},previewSrc(){var e=Object.assign({},this.params);return e.w=50,delete e.h,this.$sdk.api.generateEndpointURL(`/image/${this.id}`,e,{file:!0})},imageStyle(){var e={};return this.crop||(e["object-fit"]="contain"),this.cover&&(e["object-fit"]="cover"),this.inline?e.maxWidth="100%":(e.width="100%",e.height="100%",e.top="0",e.left="0",e.position="absolute"),e},dimensionWidth(){if(this.manualHeight&&this.manualWidth)return this.manualWidth;if(this.modelWidth&&this.modelHeight)return this.modelWidth},dimensionHeight(){if(this.manualHeight&&this.manualWidth)return this.manualHeight;if(this.modelWidth&&this.modelHeight)return this.modelHeight},style(){var r,i,s;var e={};this.inline?e.display="inline-block":this.dimensionHeight&&this.dimensionWidth&&(e.height=0,e.overflow="hidden",e.paddingBottom=`${this.dimensionHeight/this.dimensionWidth*100}%`,e.position="relative");var n=(s=(i=(r=this.model)==null?void 0:r.fileMeta)==null?void 0:i.colors)==null?void 0:s.colors;return n&&n.length&&(e.backgroundColor=n[0]),this.isSvg||this.preview&&(e.backgroundImage=`url(${this.previewSrc})`),e}}},Gx=["alt","data"],Yx=["loading","alt","src"];function Kx(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["ux-image",o.className]),style:t.normalizeStyle(o.style)},[r.svg?(t.openBlock(),t.createElementBlock("object",{key:0,alt:o.altText,type:"image/svg+xml",data:o.src},null,8,Gx)):(t.openBlock(),t.createElementBlock("img",{key:1,ref:"img",loading:o.loading,alt:o.altText,style:t.normalizeStyle(o.imageStyle),src:o.src},null,12,Yx))],6)}const Em=C(Wx,[["render",Kx],["__scopeId","data-v-ba449734"]]),Jx={props:{item:{type:[Object,String]},width:{type:[Number,String]},height:{type:[Number,String]},controls:{type:Boolean,default:!0},controlslist:{type:String},autoplay:{type:Boolean,default:!1},playsinline:{type:Boolean,default:!1},loop:{type:Boolean,default:!1},muted:{type:Boolean,default:!1}},data(){return{model:this.item,isMuted:this.muted||this.autoplay,playsInline:this.playsinline||this.autoplay}},watch:{playsinline(e){this.playsInline=e},muted(e){this.isMuted=e}},beforeMount(){this.$sdk.auth.ensureValidToken()},computed:{padHeight(){return this.actualHeight&&this.actualWidth?`${this.actualHeight/this.actualWidth*100}%`:void 0},youtubeSrc(){return`https://www.youtube.com/embed/${this.mediaID}`},title(){var e;return(e=this.model)==null?void 0:e.title},mediaID(){var e;return(e=this.model)==null?void 0:e.mediaIntegrationID},mediaType(){var e;return((e=this.model)==null?void 0:e.mediaIntegrationType)||"upload"},mimetype(){var e;return((e=this.model)==null?void 0:e.fileMime)||"video/mp4"},actualWidth(){return parseInt(this.width)||this.modelWidth||1920},actualHeight(){return parseInt(this.height)||this.modelHeight||1080},className(){var e=[];return this.portrait&&e.push("video-portrait"),e.push(`video-type-${this.mediaType}`),e.join(" ")},portrait(){return this.actualHeight>this.actualWidth},modelWidth(){var e;return parseInt(((e=this.model)==null?void 0:e.width)||0)},modelHeight(){var e;return parseInt(((e=this.model)==null?void 0:e.height)||0)},id(){return this.$sdk.utils.id(this.model)},params(){var e={};return e.access_token=this.$sdk.auth.getCurrentToken(),e},src(){return this.$sdk.api.generateEndpointURL(`/video/${this.id}`,this.params,{file:!0})},thumbnailSrc(){var e=Object.assign({},this.params);return e.w=this.actualWidth,e.h=this.actualHeight,delete e.h,this.$sdk.api.generateEndpointURL(`/image/${this.id}/poster.png`,e,{file:!0})},embedStyle(){var e={};return this.padHeight&&(e.height=0,e.paddingBottom=this.padHeight,e.overflow="hidden",e.position="relative"),e}}},Zx=["poster","playsinline","muted","loop","autoplay","width","height","controls","controlslist"],Xx=["src","type"],Qx=["width","height","src","title"];function vx(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["ux-video",o.className])},[o.mediaType==="upload"?(t.openBlock(),t.createElementBlock("div",{key:0,class:"ux-video-embed ux-video-embed-upload",style:t.normalizeStyle(o.embedStyle)},[t.createElementVNode("video",{poster:o.thumbnailSrc,playsinline:s.playsInline,muted:s.isMuted,loop:r.loop,autoplay:r.autoplay,width:o.actualWidth,height:o.actualHeight,controls:r.controls,controlslist:r.controlslist},[t.createElementVNode("source",{src:o.src,type:o.mimetype},null,8,Xx),n[0]||(n[0]=t.createTextVNode(" Your browser does not support the video tag. ",-1))],8,Zx)],4)):t.createCommentVNode("",!0),o.mediaType==="youtube"?(t.openBlock(),t.createElementBlock("div",{key:1,class:"ux-video-embed ux-video-embed-youtube",style:t.normalizeStyle(o.embedStyle)},[t.createElementVNode("iframe",{width:o.actualWidth,height:o.actualHeight,src:o.youtubeSrc,title:o.title,frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowfullscreen:""},null,8,Qx)],4)):t.createCommentVNode("",!0)],2)}const Nm=C(Jx,[["render",vx],["__scopeId","data-v-8f908e0a"]]),eC={props:{value:{type:Number},active:{type:Boolean}},computed:{classes(){var e=[];return e.push(this.icon),this.spin&&e.push("fa-spin"),this.left&&e.push("ux-icon-left"),this.right&&e.push("ux-icon-right"),e},percent(){return this.value},barStyle(){return{width:`${this.percent}%`}},element(){return"i"}}},tC={class:"ux-progress"};function nC(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",tC,[t.createElementVNode("div",{class:t.normalizeClass(["ux-progress-bg",{active:r.active}])},null,2),t.createElementVNode("div",{class:"ux-progress-fg",style:t.normalizeStyle(o.barStyle)},null,4)])}const vs=C(eC,[["render",nC],["__scopeId","data-v-6e492d1a"]]),rC={props:{value:{},tag:{type:String,default:"span"},clickable:{type:Boolean},deleteable:{type:Boolean},icon:{type:String}},computed:{avatar(){var s;const e=(s=this.value)==null?void 0:s._id;if(!e)return;const n=e.slice(8,10)==="24",r=e.slice(8,10)==="70",i=e.slice(8,10)==="71";if(n||r||i)return e},elementType(){return this.tag||"span"},title(){var e,n,r,i,s,o,l,a;return[(e=this.value)==null?void 0:e.title,(n=this.value)==null?void 0:n.name,(r=this.value)!=null&&r.firstName&&((i=this.value)!=null&&i.lastName)?`${(s=this.value)==null?void 0:s.firstName} ${(o=this.value)==null?void 0:o.lastName}`:(l=this.value)==null?void 0:l.firstName,(a=this.value)==null?void 0:a.firstName,this.value].filter(Boolean)[0]},subtitle(){var e;if((e=this.value)!=null&&e.startDate)return this.$sdk.date?this.$sdk.date.readableEventDate(this.value):void 0},hasLink(){return this.tag==="a"||this.clickable},style(){var r,i;const e=(r=this.value)==null?void 0:r.color,n=(i=this.value)==null?void 0:i.bgColor;if(e||n)return{color:e,backgroundColor:n}}}},oC={key:0,class:"pill-avatar"},iC={class:"font-sm font-muted"};function sC(e,n,r,i,s,o){const l=t.resolveComponent("ux-avatar"),a=t.resolveComponent("ux-icon"),c=t.resolveComponent("flex-cell"),d=t.resolveComponent("flex-row");return t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.elementType),{class:t.normalizeClass(["ux-pill",{"has-link":o.hasLink}]),style:t.normalizeStyle(o.style)},{default:t.withCtx(()=>[t.createVNode(d,{gap:"",center:""},{default:t.withCtx(()=>[t.createVNode(c,null,{default:t.withCtx(()=>[o.avatar?(t.openBlock(),t.createElementBlock("div",oC,[t.createVNode(l,{id:o.avatar,initials:o.title},null,8,["id","initials"])])):t.createCommentVNode("",!0),o.subtitle?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[r.icon?(t.openBlock(),t.createBlock(a,{key:0,icon:r.icon,left:""},null,8,["icon"])):t.createCommentVNode("",!0),t.createTextVNode(t.toDisplayString(o.title),1),t.createElementVNode("span",iC," • "+t.toDisplayString(o.subtitle),1)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[r.icon?(t.openBlock(),t.createBlock(a,{key:0,icon:r.icon,left:""},null,8,["icon"])):t.createCommentVNode("",!0),t.createTextVNode(t.toDisplayString(o.title),1)],64))]),_:1}),r.deleteable?(t.openBlock(),t.createBlock(c,{key:0,shrink:""},{default:t.withCtx(()=>[t.createVNode(a,{icon:"fa-times"})]),_:1})):t.createCommentVNode("",!0)]),_:1})]),_:1},8,["class","style"])}const Tm=C(rC,[["render",sC],["__scopeId","data-v-709f24b0"]]),lC={},aC={class:"ux-list"};function cC(e,n){return t.openBlock(),t.createElementBlock("ul",aC,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}const Sm=C(lC,[["render",cC],["__scopeId","data-v-670de630"]]),dC={props:{to:{type:[Object,String]},href:{type:String},target:{type:String},disabled:{type:Boolean}},computed:{element(){return this.to||this.href?"ux-link":"div"}}};function uC(e,n,r,i,s,o){return t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.element),{class:"ux-list-item",to:r.to,href:r.href,target:r.target,disabled:r.disabled},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default",{},void 0,!0)]),_:3},8,["to","href","target","disabled"])}const Bm=C(dC,[["render",uC],["__scopeId","data-v-a5de8929"]]);var se;(function(e){e[e.AM=0]="AM",e[e.PM=1]="PM"})(se||(se={}));var ye;(function(e){e[e.SUNDAY=0]="SUNDAY",e[e.MONDAY=1]="MONDAY",e[e.TUESDAY=2]="TUESDAY",e[e.WEDNESDAY=3]="WEDNESDAY",e[e.THURSDAY=4]="THURSDAY",e[e.FRIDAY=5]="FRIDAY",e[e.SATURDAY=6]="SATURDAY"})(ye||(ye={}));var ft;(function(e){e[e.JANUARY=1]="JANUARY",e[e.FEBRUARY=2]="FEBRUARY",e[e.MARCH=3]="MARCH",e[e.APRIL=4]="APRIL",e[e.MAY=5]="MAY",e[e.JUNE=6]="JUNE",e[e.JULY=7]="JULY",e[e.AUGUST=8]="AUGUST",e[e.SEPTEMBER=9]="SEPTEMBER",e[e.OCTOBER=10]="OCTOBER",e[e.NOVEMBER=11]="NOVEMBER",e[e.DECEMBER=12]="DECEMBER"})(ft||(ft={}));function xn(e,n){e.assign("day",n.getDate()),e.assign("month",n.getMonth()+1),e.assign("year",n.getFullYear())}function Dm(e,n){e.assign("hour",n.getHours()),e.assign("minute",n.getMinutes()),e.assign("second",n.getSeconds()),e.assign("millisecond",n.getMilliseconds()),e.assign("meridiem",n.getHours()<12?se.AM:se.PM)}function Gn(e,n){e.imply("day",n.getDate()),e.imply("month",n.getMonth()+1),e.imply("year",n.getFullYear())}function el(e,n){e.imply("hour",n.getHours()),e.imply("minute",n.getMinutes()),e.imply("second",n.getSeconds()),e.imply("millisecond",n.getMilliseconds()),e.imply("meridiem",n.getHours()<12?se.AM:se.PM)}const mC={ACDT:630,ACST:570,ADT:-180,AEDT:660,AEST:600,AFT:270,AKDT:-480,AKST:-540,ALMT:360,AMST:-180,AMT:-240,ANAST:720,ANAT:720,AQTT:300,ART:-180,AST:-240,AWDT:540,AWST:480,AZOST:0,AZOT:-60,AZST:300,AZT:240,BNT:480,BOT:-240,BRST:-120,BRT:-180,BST:60,BTT:360,CAST:480,CAT:120,CCT:390,CDT:-300,CEST:120,CET:{timezoneOffsetDuringDst:2*60,timezoneOffsetNonDst:60,dstStart:e=>Om(e,ft.MARCH,ye.SUNDAY,2),dstEnd:e=>Om(e,ft.OCTOBER,ye.SUNDAY,3)},CHADT:825,CHAST:765,CKT:-600,CLST:-180,CLT:-240,COT:-300,CST:-360,CT:{timezoneOffsetDuringDst:-5*60,timezoneOffsetNonDst:-6*60,dstStart:e=>tn(e,ft.MARCH,ye.SUNDAY,2,2),dstEnd:e=>tn(e,ft.NOVEMBER,ye.SUNDAY,1,2)},CVT:-60,CXT:420,ChST:600,DAVT:420,EASST:-300,EAST:-360,EAT:180,ECT:-300,EDT:-240,EEST:180,EET:120,EGST:0,EGT:-60,EST:-300,ET:{timezoneOffsetDuringDst:-4*60,timezoneOffsetNonDst:-5*60,dstStart:e=>tn(e,ft.MARCH,ye.SUNDAY,2,2),dstEnd:e=>tn(e,ft.NOVEMBER,ye.SUNDAY,1,2)},FJST:780,FJT:720,FKST:-180,FKT:-240,FNT:-120,GALT:-360,GAMT:-540,GET:240,GFT:-180,GILT:720,GMT:0,GST:240,GYT:-240,HAA:-180,HAC:-300,HADT:-540,HAE:-240,HAP:-420,HAR:-360,HAST:-600,HAT:-90,HAY:-480,HKT:480,HLV:-210,HNA:-240,HNC:-360,HNE:-300,HNP:-480,HNR:-420,HNT:-150,HNY:-540,HOVT:420,ICT:420,IDT:180,IOT:360,IRDT:270,IRKST:540,IRKT:540,IRST:210,IST:330,JST:540,KGT:360,KRAST:480,KRAT:480,KST:540,KUYT:240,LHDT:660,LHST:630,LINT:840,MAGST:720,MAGT:720,MART:-510,MAWT:300,MDT:-360,MESZ:120,MEZ:60,MHT:720,MMT:390,MSD:240,MSK:180,MST:-420,MT:{timezoneOffsetDuringDst:-6*60,timezoneOffsetNonDst:-7*60,dstStart:e=>tn(e,ft.MARCH,ye.SUNDAY,2,2),dstEnd:e=>tn(e,ft.NOVEMBER,ye.SUNDAY,1,2)},MUT:240,MVT:300,MYT:480,NCT:660,NDT:-90,NFT:690,NOVST:420,NOVT:360,NPT:345,NST:-150,NUT:-660,NZDT:780,NZST:720,OMSST:420,OMST:420,PDT:-420,PET:-300,PETST:720,PETT:720,PGT:600,PHOT:780,PHT:480,PKT:300,PMDT:-120,PMST:-180,PONT:660,PST:-480,PT:{timezoneOffsetDuringDst:-7*60,timezoneOffsetNonDst:-8*60,dstStart:e=>tn(e,ft.MARCH,ye.SUNDAY,2,2),dstEnd:e=>tn(e,ft.NOVEMBER,ye.SUNDAY,1,2)},PWT:540,PYST:-180,PYT:-240,RET:240,SAMT:240,SAST:120,SBT:660,SCT:240,SGT:480,SRT:-180,SST:-660,TAHT:-600,TFT:300,TJT:300,TKT:780,TLT:540,TMT:300,TVT:720,ULAT:480,UTC:0,UYST:-120,UYT:-180,UZT:300,VET:-210,VLAST:660,VLAT:660,VUT:660,WAST:120,WAT:60,WEST:60,WESZ:60,WET:0,WEZ:0,WFT:720,WGST:-120,WGT:-180,WIB:420,WIT:540,WITA:480,WST:780,WT:0,YAKST:600,YAKT:600,YAPT:600,YEKST:360,YEKT:360};function tn(e,n,r,i,s=0){let o=0,l=0;for(;l<i;)o++,new Date(e,n-1,o).getDay()===r&&l++;return new Date(e,n-1,o,s)}function Om(e,n,r,i=0){const s=r===0?7:r,o=new Date(e,n-1+1,1,12),l=o.getDay()===0?7:o.getDay();let a;return l===s?a=7:l<s?a=7+l-s:a=l-s,o.setDate(o.getDate()-a),new Date(e,n-1,o.getDate(),i)}function Mm(e,n,r={}){if(e==null)return null;if(typeof e=="number")return e;const i=r[e]??mC[e];return i==null?null:typeof i=="number"?i:n==null?null:n>i.dstStart(n.getFullYear())&&!(n>i.dstEnd(n.getFullYear()))?i.timezoneOffsetDuringDst:i.timezoneOffsetNonDst}const fC={day:0,second:0,millisecond:0};function Ke(e,n){let r=new Date(e);if(n.y&&(n.year=n.y,delete n.y),n.mo&&(n.month=n.mo,delete n.mo),n.M&&(n.month=n.M,delete n.M),n.w&&(n.week=n.w,delete n.w),n.d&&(n.day=n.d,delete n.d),n.h&&(n.hour=n.h,delete n.h),n.m&&(n.minute=n.m,delete n.m),n.s&&(n.second=n.s,delete n.s),n.ms&&(n.millisecond=n.ms,delete n.ms),"year"in n){const i=Math.floor(n.year);r.setFullYear(r.getFullYear()+i);const s=n.year-i;s>0&&(n.month=(n==null?void 0:n.month)??0,n.month+=s*12)}if("quarter"in n){const i=Math.floor(n.quarter);r.setMonth(r.getMonth()+i*3)}if("month"in n){const i=Math.floor(n.month);r.setMonth(r.getMonth()+i);const s=n.month-i;s>0&&(n.week=(n==null?void 0:n.week)??0,n.week+=s*4)}if("week"in n){const i=Math.floor(n.week);r.setDate(r.getDate()+i*7);const s=n.week-i;s>0&&(n.day=(n==null?void 0:n.day)??0,n.day+=Math.round(s*7))}if("day"in n){const i=Math.floor(n.day);r.setDate(r.getDate()+i);const s=n.day-i;s>0&&(n.hour=(n==null?void 0:n.hour)??0,n.hour+=Math.round(s*24))}if("hour"in n){const i=Math.floor(n.hour);r.setHours(r.getHours()+i);const s=n.hour-i;s>0&&(n.minute=(n==null?void 0:n.minute)??0,n.minute+=Math.round(s*60))}if("minute"in n){const i=Math.floor(n.minute);r.setMinutes(r.getMinutes()+i);const s=n.minute-i;s>0&&(n.second=(n==null?void 0:n.second)??0,n.second+=Math.round(s*60))}if("second"in n){const i=Math.floor(n.second);r.setSeconds(r.getSeconds()+i);const s=n.second-i;s>0&&(n.millisecond=(n==null?void 0:n.millisecond)??0,n.millisecond+=Math.round(s*1e3))}if("millisecond"in n){const i=Math.floor(n.millisecond);r.setMilliseconds(r.getMilliseconds()+i)}return r}function xo(e){const n={};for(const r in e)n[r]=-e[r];return n}class nn{constructor(n,r){X(this,"instant");X(this,"timezoneOffset");this.instant=n??new Date,this.timezoneOffset=r??null}static fromDate(n){return new nn(n)}static fromInput(n,r){if(n instanceof Date)return nn.fromDate(n);const i=(n==null?void 0:n.instant)??new Date,s=Mm(n==null?void 0:n.timezone,i,r);return new nn(i,s)}getDateWithAdjustedTimezone(){const n=new Date(this.instant);return this.timezoneOffset!==null&&n.setMinutes(n.getMinutes()-this.getSystemTimezoneAdjustmentMinute(this.instant)),n}getSystemTimezoneAdjustmentMinute(n,r){(!n||n.getTime()<0)&&(n=new Date);const i=-n.getTimezoneOffset(),s=r??this.timezoneOffset??i;return i-s}getTimezoneOffset(){return this.timezoneOffset??-this.instant.getTimezoneOffset()}}class pe{constructor(n,r){X(this,"knownValues");X(this,"impliedValues");X(this,"reference");X(this,"_tags",new Set);if(this.reference=n,this.knownValues={},this.impliedValues={},r)for(const s in r)this.knownValues[s]=r[s];const i=n.getDateWithAdjustedTimezone();this.imply("day",i.getDate()),this.imply("month",i.getMonth()+1),this.imply("year",i.getFullYear()),this.imply("hour",12),this.imply("minute",0),this.imply("second",0),this.imply("millisecond",0)}static createRelativeFromReference(n,r=fC){let i=Ke(n.getDateWithAdjustedTimezone(),r);const s=new pe(n);return s.addTag("result/relativeDate"),"hour"in r||"minute"in r||"second"in r||"millisecond"in r?(s.addTag("result/relativeDateAndTime"),Dm(s,i),xn(s,i),s.assign("timezoneOffset",n.getTimezoneOffset())):(el(s,i),s.imply("timezoneOffset",n.getTimezoneOffset()),"day"in r?(s.assign("day",i.getDate()),s.assign("month",i.getMonth()+1),s.assign("year",i.getFullYear()),s.assign("weekday",i.getDay())):"week"in r?(s.assign("day",i.getDate()),s.assign("month",i.getMonth()+1),s.assign("year",i.getFullYear()),s.imply("weekday",i.getDay())):(s.imply("day",i.getDate()),"month"in r?(s.assign("month",i.getMonth()+1),s.assign("year",i.getFullYear())):(s.imply("month",i.getMonth()+1),"year"in r?s.assign("year",i.getFullYear()):s.imply("year",i.getFullYear())))),s}get(n){return n in this.knownValues?this.knownValues[n]:n in this.impliedValues?this.impliedValues[n]:null}isCertain(n){return n in this.knownValues}getCertainComponents(){return Object.keys(this.knownValues)}imply(n,r){return n in this.knownValues?this:(this.impliedValues[n]=r,this)}assign(n,r){return this.knownValues[n]=r,delete this.impliedValues[n],this}addDurationAsImplied(n){const r=this.dateWithoutTimezoneAdjustment(),i=Ke(r,n);return("day"in n||"week"in n||"month"in n||"year"in n)&&(this.delete(["day","weekday","month","year"]),this.imply("day",i.getDate()),this.imply("weekday",i.getDay()),this.imply("month",i.getMonth()+1),this.imply("year",i.getFullYear())),("second"in n||"minute"in n||"hour"in n)&&(this.delete(["second","minute","hour"]),this.imply("second",i.getSeconds()),this.imply("minute",i.getMinutes()),this.imply("hour",i.getHours())),this}delete(n){typeof n=="string"&&(n=[n]);for(const r of n)delete this.knownValues[r],delete this.impliedValues[r]}clone(){const n=new pe(this.reference);n.knownValues={},n.impliedValues={};for(const r in this.knownValues)n.knownValues[r]=this.knownValues[r];for(const r in this.impliedValues)n.impliedValues[r]=this.impliedValues[r];return n}isOnlyDate(){return!this.isCertain("hour")&&!this.isCertain("minute")&&!this.isCertain("second")}isOnlyTime(){return!this.isCertain("weekday")&&!this.isCertain("day")&&!this.isCertain("month")&&!this.isCertain("year")}isOnlyWeekdayComponent(){return this.isCertain("weekday")&&!this.isCertain("day")&&!this.isCertain("month")}isDateWithUnknownYear(){return this.isCertain("month")&&!this.isCertain("year")}isValidDate(){const n=this.dateWithoutTimezoneAdjustment();return!(n.getFullYear()!==this.get("year")||n.getMonth()!==this.get("month")-1||n.getDate()!==this.get("day")||this.get("hour")!=null&&n.getHours()!=this.get("hour")||this.get("minute")!=null&&n.getMinutes()!=this.get("minute"))}toString(){return`[ParsingComponents {
|
|
2
2
|
tags: ${JSON.stringify(Array.from(this._tags).sort())},
|
|
3
3
|
knownValues: ${JSON.stringify(this.knownValues)},
|
|
4
4
|
impliedValues: ${JSON.stringify(this.impliedValues)}},
|