2 lines
70 KiB
JavaScript
2 lines
70 KiB
JavaScript
import{a as jn}from"./Check.BHN-SUwW.js";import{_ as Qn}from"./_plugin-vue_export-helper.BN1snXvA.js";import{r as Kn,o as ft,c as dt,e as Xn,a as es,d as ts,n as ns}from"./runtime-dom.esm-bundler.DYN7TRGp.js";const ss={emits:["close-alert"],components:{SvgClose:jn},props:{type:{type:String,default(){return"blue"}},size:{type:String,default(){return"medium"}},showClose:Boolean}};function rs(n,e,t,s,r,i){const a=Kn("svg-close");return ft(),dt("div",{class:ns(["aioseo-alert",{[t.type]:t.type,[t.size]:t.size}])},[Xn(n.$slots,"default"),t.showClose?(ft(),dt("span",{key:0,onClick:e[0]||(e[0]=o=>n.$emit("close-alert")),class:"aioseo-alert-close"},[es(a)])):ts("",!0)],2)}const ai=Qn(ss,[["render",rs]]);class P extends Error{}class is extends P{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class as extends P{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class os extends P{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class Q extends P{}class Ht extends P{constructor(e){super(`Invalid unit ${e}`)}}class M extends P{}class z extends P{constructor(){super("Zone is an abstract class")}}const c="numeric",L="short",I="long",Ee={year:c,month:c,day:c},Yt={year:c,month:L,day:c},us={year:c,month:L,day:c,weekday:L},_t={year:c,month:I,day:c},Pt={year:c,month:I,day:c,weekday:I},Gt={hour:c,minute:c},Jt={hour:c,minute:c,second:c},Bt={hour:c,minute:c,second:c,timeZoneName:L},jt={hour:c,minute:c,second:c,timeZoneName:I},Qt={hour:c,minute:c,hourCycle:"h23"},Kt={hour:c,minute:c,second:c,hourCycle:"h23"},Xt={hour:c,minute:c,second:c,hourCycle:"h23",timeZoneName:L},en={hour:c,minute:c,second:c,hourCycle:"h23",timeZoneName:I},tn={year:c,month:c,day:c,hour:c,minute:c},nn={year:c,month:c,day:c,hour:c,minute:c,second:c},sn={year:c,month:L,day:c,hour:c,minute:c},rn={year:c,month:L,day:c,hour:c,minute:c,second:c},ls={year:c,month:L,day:c,weekday:L,hour:c,minute:c},an={year:c,month:I,day:c,hour:c,minute:c,timeZoneName:L},on={year:c,month:I,day:c,hour:c,minute:c,second:c,timeZoneName:L},un={year:c,month:I,day:c,weekday:I,hour:c,minute:c,timeZoneName:I},ln={year:c,month:I,day:c,weekday:I,hour:c,minute:c,second:c,timeZoneName:I};class me{get type(){throw new z}get name(){throw new z}get ianaName(){return this.name}get isUniversal(){throw new z}offsetName(e,t){throw new z}formatOffset(e,t){throw new z}offset(e){throw new z}equals(e){throw new z}get isValid(){throw new z}}let Le=null;class be extends me{static get instance(){return Le===null&&(Le=new be),Le}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:s}){return pn(e,t,s)}formatOffset(e,t){return de(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}}const Ye=new Map;function cs(n){let e=Ye.get(n);return e===void 0&&(e=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:n,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),Ye.set(n,e)),e}const fs={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function ds(n,e){const t=n.format(e).replace(/\u200E/g,""),s=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(t),[,r,i,a,o,u,l,f]=s;return[a,r,i,o,u,l,f]}function hs(n,e){const t=n.formatToParts(e),s=[];for(let r=0;r<t.length;r++){const{type:i,value:a}=t[r],o=fs[i];i==="era"?s[o]=a:h(o)||(s[o]=parseInt(a,10))}return s}const $e=new Map;class A extends me{static create(e){let t=$e.get(e);return t===void 0&&$e.set(e,t=new A(e)),t}static resetCache(){$e.clear(),Ye.clear()}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch{return!1}}constructor(e){super(),this.zoneName=e,this.valid=A.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:t,locale:s}){return pn(e,t,s,this.name)}formatOffset(e,t){return de(this.offset(e),t)}offset(e){if(!this.valid)return NaN;const t=new Date(e);if(isNaN(t))return NaN;const s=cs(this.name);let[r,i,a,o,u,l,f]=s.formatToParts?hs(s,t):ds(s,t);o==="BC"&&(r=-Math.abs(r)+1);const T=Ce({year:r,month:i,day:a,hour:u===24?0:u,minute:l,second:f,millisecond:0});let d=+t;const O=d%1e3;return d-=O>=0?O:1e3+O,(T-d)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}}let ht={};function ms(n,e={}){const t=JSON.stringify([n,e]);let s=ht[t];return s||(s=new Intl.ListFormat(n,e),ht[t]=s),s}const _e=new Map;function Pe(n,e={}){const t=JSON.stringify([n,e]);let s=_e.get(t);return s===void 0&&(s=new Intl.DateTimeFormat(n,e),_e.set(t,s)),s}const Ge=new Map;function ys(n,e={}){const t=JSON.stringify([n,e]);let s=Ge.get(t);return s===void 0&&(s=new Intl.NumberFormat(n,e),Ge.set(t,s)),s}const Je=new Map;function gs(n,e={}){const{base:t,...s}=e,r=JSON.stringify([n,s]);let i=Je.get(r);return i===void 0&&(i=new Intl.RelativeTimeFormat(n,e),Je.set(r,i)),i}let le=null;function ws(){return le||(le=new Intl.DateTimeFormat().resolvedOptions().locale,le)}const Be=new Map;function cn(n){let e=Be.get(n);return e===void 0&&(e=new Intl.DateTimeFormat(n).resolvedOptions(),Be.set(n,e)),e}const je=new Map;function ks(n){let e=je.get(n);if(!e){const t=new Intl.Locale(n);e="getWeekInfo"in t?t.getWeekInfo():t.weekInfo,"minimalDays"in e||(e={...fn,...e}),je.set(n,e)}return e}function Ts(n){const e=n.indexOf("-x-");e!==-1&&(n=n.substring(0,e));const t=n.indexOf("-u-");if(t===-1)return[n];{let s,r;try{s=Pe(n).resolvedOptions(),r=n}catch{const u=n.substring(0,t);s=Pe(u).resolvedOptions(),r=u}const{numberingSystem:i,calendar:a}=s;return[r,i,a]}}function ps(n,e,t){return(t||e)&&(n.includes("-u-")||(n+="-u"),t&&(n+=`-ca-${t}`),e&&(n+=`-nu-${e}`)),n}function Ss(n){const e=[];for(let t=1;t<=12;t++){const s=m.utc(2009,t,1);e.push(n(s))}return e}function Os(n){const e=[];for(let t=1;t<=7;t++){const s=m.utc(2016,11,13+t);e.push(n(s))}return e}function ke(n,e,t,s){const r=n.listingMode();return r==="error"?null:r==="en"?t(e):s(e)}function vs(n){return n.numberingSystem&&n.numberingSystem!=="latn"?!1:n.numberingSystem==="latn"||!n.locale||n.locale.startsWith("en")||cn(n.locale).numberingSystem==="latn"}class Ms{constructor(e,t,s){this.padTo=s.padTo||0,this.floor=s.floor||!1;const{padTo:r,floor:i,...a}=s;if(!t||Object.keys(a).length>0){const o={useGrouping:!1,...s};s.padTo>0&&(o.minimumIntegerDigits=s.padTo),this.inf=ys(e,o)}}format(e){if(this.inf){const t=this.floor?Math.floor(e):e;return this.inf.format(t)}else{const t=this.floor?Math.floor(e):it(e,3);return v(t,this.padTo)}}}class Ns{constructor(e,t,s){this.opts=s,this.originalZone=void 0;let r;if(this.opts.timeZone)this.dt=e;else if(e.zone.type==="fixed"){const a=-1*(e.offset/60),o=a>=0?`Etc/GMT+${a}`:`Etc/GMT${a}`;e.offset!==0&&A.create(o).valid?(r=o,this.dt=e):(r="UTC",this.dt=e.offset===0?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else e.zone.type==="system"?this.dt=e:e.zone.type==="iana"?(this.dt=e,r=e.zone.name):(r="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);const i={...this.opts};i.timeZone=i.timeZone||r,this.dtf=Pe(t,i)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(t=>{if(t.type==="timeZoneName"){const s=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...t,value:s}}else return t}):e}resolvedOptions(){return this.dtf.resolvedOptions()}}class Es{constructor(e,t,s){this.opts={style:"long",...s},!t&&kn()&&(this.rtf=gs(e,s))}format(e,t){return this.rtf?this.rtf.format(e,t):Js(t,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}const fn={firstDay:1,minimalDays:4,weekend:[6,7]};class k{static fromOpts(e){return k.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,t,s,r,i=!1){const a=e||S.defaultLocale,o=a||(i?"en-US":ws()),u=t||S.defaultNumberingSystem,l=s||S.defaultOutputCalendar,f=Ke(r)||S.defaultWeekSettings;return new k(o,u,l,f,a)}static resetCache(){le=null,_e.clear(),Ge.clear(),Je.clear(),Be.clear(),je.clear()}static fromObject({locale:e,numberingSystem:t,outputCalendar:s,weekSettings:r}={}){return k.create(e,t,s,r)}constructor(e,t,s,r,i){const[a,o,u]=Ts(e);this.locale=a,this.numberingSystem=t||o||null,this.outputCalendar=s||u||null,this.weekSettings=r,this.intl=ps(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=vs(this)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),t=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&t?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:k.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,Ke(e.weekSettings)||this.weekSettings,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1){return ke(this,e,vn,()=>{const s=this.intl==="ja"||this.intl.startsWith("ja-");t&=!s;const r=t?{month:e,day:"numeric"}:{month:e},i=t?"format":"standalone";if(!this.monthsCache[i][e]){const a=s?o=>this.dtFormatter(o,r).format():o=>this.extract(o,r,"month");this.monthsCache[i][e]=Ss(a)}return this.monthsCache[i][e]})}weekdays(e,t=!1){return ke(this,e,En,()=>{const s=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},r=t?"format":"standalone";return this.weekdaysCache[r][e]||(this.weekdaysCache[r][e]=Os(i=>this.extract(i,s,"weekday"))),this.weekdaysCache[r][e]})}meridiems(){return ke(this,void 0,()=>In,()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[m.utc(2016,11,13,9),m.utc(2016,11,13,19)].map(t=>this.extract(t,e,"dayperiod"))}return this.meridiemCache})}eras(e){return ke(this,e,Dn,()=>{const t={era:e};return this.eraCache[e]||(this.eraCache[e]=[m.utc(-40,1,1),m.utc(2017,1,1)].map(s=>this.extract(s,t,"era"))),this.eraCache[e]})}extract(e,t,s){const r=this.dtFormatter(e,t),i=r.formatToParts(),a=i.find(o=>o.type.toLowerCase()===s);return a?a.value:null}numberFormatter(e={}){return new Ms(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new Ns(e,this.intl,t)}relFormatter(e={}){return new Es(this.intl,this.isEnglish(),e)}listFormatter(e={}){return ms(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||cn(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:Tn()?ks(this.locale):fn}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let Ze=null;class E extends me{static get utcInstance(){return Ze===null&&(Ze=new E(0)),Ze}static instance(e){return e===0?E.utcInstance:new E(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new E(Ve(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${de(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${de(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return de(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}}class Is extends me{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function R(n,e){if(h(n)||n===null)return e;if(n instanceof me)return n;if(Vs(n)){const t=n.toLowerCase();return t==="default"?e:t==="local"||t==="system"?be.instance:t==="utc"||t==="gmt"?E.utcInstance:E.parseSpecifier(t)||A.create(n)}else return q(n)?E.instance(n):typeof n=="object"&&"offset"in n&&typeof n.offset=="function"?n:new Is(n)}const tt={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},mt={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]},Ds=tt.hanidec.replace(/[\[|\]]/g,"").split("");function xs(n){let e=parseInt(n,10);if(isNaN(e)){e="";for(let t=0;t<n.length;t++){const s=n.charCodeAt(t);if(n[t].search(tt.hanidec)!==-1)e+=Ds.indexOf(n[t]);else for(const r in mt){const[i,a]=mt[r];s>=i&&s<=a&&(e+=s-i)}}return parseInt(e,10)}else return e}const Qe=new Map;function bs(){Qe.clear()}function C({numberingSystem:n},e=""){const t=n||"latn";let s=Qe.get(t);s===void 0&&(s=new Map,Qe.set(t,s));let r=s.get(e);return r===void 0&&(r=new RegExp(`${tt[t]}${e}`),s.set(e,r)),r}let yt=()=>Date.now(),gt="system",wt=null,kt=null,Tt=null,pt=60,St,Ot=null;class S{static get now(){return yt}static set now(e){yt=e}static set defaultZone(e){gt=e}static get defaultZone(){return R(gt,be.instance)}static get defaultLocale(){return wt}static set defaultLocale(e){wt=e}static get defaultNumberingSystem(){return kt}static set defaultNumberingSystem(e){kt=e}static get defaultOutputCalendar(){return Tt}static set defaultOutputCalendar(e){Tt=e}static get defaultWeekSettings(){return Ot}static set defaultWeekSettings(e){Ot=Ke(e)}static get twoDigitCutoffYear(){return pt}static set twoDigitCutoffYear(e){pt=e%100}static get throwOnInvalid(){return St}static set throwOnInvalid(e){St=e}static resetCaches(){k.resetCache(),A.resetCache(),m.resetCache(),bs()}}class W{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const dn=[0,31,59,90,120,151,181,212,243,273,304,334],hn=[0,31,60,91,121,152,182,213,244,274,305,335];function x(n,e){return new W("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${n}, which is invalid`)}function nt(n,e,t){const s=new Date(Date.UTC(n,e-1,t));n<100&&n>=0&&s.setUTCFullYear(s.getUTCFullYear()-1900);const r=s.getUTCDay();return r===0?7:r}function mn(n,e,t){return t+(ye(n)?hn:dn)[e-1]}function yn(n,e){const t=ye(n)?hn:dn,s=t.findIndex(i=>i<e),r=e-t[s];return{month:s+1,day:r}}function st(n,e){return(n-e+7)%7+1}function Ie(n,e=4,t=1){const{year:s,month:r,day:i}=n,a=mn(s,r,i),o=st(nt(s,r,i),t);let u=Math.floor((a-o+14-e)/7),l;return u<1?(l=s-1,u=he(l,e,t)):u>he(s,e,t)?(l=s+1,u=1):l=s,{weekYear:l,weekNumber:u,weekday:o,...We(n)}}function vt(n,e=4,t=1){const{weekYear:s,weekNumber:r,weekday:i}=n,a=st(nt(s,1,e),t),o=K(s);let u=r*7+i-a-7+e,l;u<1?(l=s-1,u+=K(l)):u>o?(l=s+1,u-=K(s)):l=s;const{month:f,day:y}=yn(l,u);return{year:l,month:f,day:y,...We(n)}}function Ae(n){const{year:e,month:t,day:s}=n,r=mn(e,t,s);return{year:e,ordinal:r,...We(n)}}function Mt(n){const{year:e,ordinal:t}=n,{month:s,day:r}=yn(e,t);return{year:e,month:s,day:r,...We(n)}}function Nt(n,e){if(!h(n.localWeekday)||!h(n.localWeekNumber)||!h(n.localWeekYear)){if(!h(n.weekday)||!h(n.weekNumber)||!h(n.weekYear))throw new Q("Cannot mix locale-based week fields with ISO-based week fields");return h(n.localWeekday)||(n.weekday=n.localWeekday),h(n.localWeekNumber)||(n.weekNumber=n.localWeekNumber),h(n.localWeekYear)||(n.weekYear=n.localWeekYear),delete n.localWeekday,delete n.localWeekNumber,delete n.localWeekYear,{minDaysInFirstWeek:e.getMinDaysInFirstWeek(),startOfWeek:e.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function Fs(n,e=4,t=1){const s=Fe(n.weekYear),r=b(n.weekNumber,1,he(n.weekYear,e,t)),i=b(n.weekday,1,7);return s?r?i?!1:x("weekday",n.weekday):x("week",n.weekNumber):x("weekYear",n.weekYear)}function Cs(n){const e=Fe(n.year),t=b(n.ordinal,1,K(n.year));return e?t?!1:x("ordinal",n.ordinal):x("year",n.year)}function gn(n){const e=Fe(n.year),t=b(n.month,1,12),s=b(n.day,1,De(n.year,n.month));return e?t?s?!1:x("day",n.day):x("month",n.month):x("year",n.year)}function wn(n){const{hour:e,minute:t,second:s,millisecond:r}=n,i=b(e,0,23)||e===24&&t===0&&s===0&&r===0,a=b(t,0,59),o=b(s,0,59),u=b(r,0,999);return i?a?o?u?!1:x("millisecond",r):x("second",s):x("minute",t):x("hour",e)}function h(n){return typeof n>"u"}function q(n){return typeof n=="number"}function Fe(n){return typeof n=="number"&&n%1===0}function Vs(n){return typeof n=="string"}function Ws(n){return Object.prototype.toString.call(n)==="[object Date]"}function kn(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function Tn(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function Ls(n){return Array.isArray(n)?n:[n]}function Et(n,e,t){if(n.length!==0)return n.reduce((s,r)=>{const i=[e(r),r];return s&&t(s[0],i[0])===s[0]?s:i},null)[1]}function $s(n,e){return e.reduce((t,s)=>(t[s]=n[s],t),{})}function ee(n,e){return Object.prototype.hasOwnProperty.call(n,e)}function Ke(n){if(n==null)return null;if(typeof n!="object")throw new M("Week settings must be an object");if(!b(n.firstDay,1,7)||!b(n.minimalDays,1,7)||!Array.isArray(n.weekend)||n.weekend.some(e=>!b(e,1,7)))throw new M("Invalid week settings");return{firstDay:n.firstDay,minimalDays:n.minimalDays,weekend:Array.from(n.weekend)}}function b(n,e,t){return Fe(n)&&n>=e&&n<=t}function Zs(n,e){return n-e*Math.floor(n/e)}function v(n,e=2){const t=n<0;let s;return t?s="-"+(""+-n).padStart(e,"0"):s=(""+n).padStart(e,"0"),s}function U(n){if(!(h(n)||n===null||n===""))return parseInt(n,10)}function H(n){if(!(h(n)||n===null||n===""))return parseFloat(n)}function rt(n){if(!(h(n)||n===null||n==="")){const e=parseFloat("0."+n)*1e3;return Math.floor(e)}}function it(n,e,t="round"){const s=10**e;switch(t){case"expand":return n>0?Math.ceil(n*s)/s:Math.floor(n*s)/s;case"trunc":return Math.trunc(n*s)/s;case"round":return Math.round(n*s)/s;case"floor":return Math.floor(n*s)/s;case"ceil":return Math.ceil(n*s)/s;default:throw new RangeError(`Value rounding ${t} is out of range`)}}function ye(n){return n%4===0&&(n%100!==0||n%400===0)}function K(n){return ye(n)?366:365}function De(n,e){const t=Zs(e-1,12)+1,s=n+(e-t)/12;return t===2?ye(s)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][t-1]}function Ce(n){let e=Date.UTC(n.year,n.month-1,n.day,n.hour,n.minute,n.second,n.millisecond);return n.year<100&&n.year>=0&&(e=new Date(e),e.setUTCFullYear(n.year,n.month-1,n.day)),+e}function It(n,e,t){return-st(nt(n,1,e),t)+e-1}function he(n,e=4,t=1){const s=It(n,e,t),r=It(n+1,e,t);return(K(n)-s+r)/7}function Xe(n){return n>99?n:n>S.twoDigitCutoffYear?1900+n:2e3+n}function pn(n,e,t,s=null){const r=new Date(n),i={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};s&&(i.timeZone=s);const a={timeZoneName:e,...i},o=new Intl.DateTimeFormat(t,a).formatToParts(r).find(u=>u.type.toLowerCase()==="timezonename");return o?o.value:null}function Ve(n,e){let t=parseInt(n,10);Number.isNaN(t)&&(t=0);const s=parseInt(e,10)||0,r=t<0||Object.is(t,-0)?-s:s;return t*60+r}function Sn(n){const e=Number(n);if(typeof n=="boolean"||n===""||!Number.isFinite(e))throw new M(`Invalid unit value ${n}`);return e}function xe(n,e){const t={};for(const s in n)if(ee(n,s)){const r=n[s];if(r==null)continue;t[e(s)]=Sn(r)}return t}function de(n,e){const t=Math.trunc(Math.abs(n/60)),s=Math.trunc(Math.abs(n%60)),r=n>=0?"+":"-";switch(e){case"short":return`${r}${v(t,2)}:${v(s,2)}`;case"narrow":return`${r}${t}${s>0?`:${s}`:""}`;case"techie":return`${r}${v(t,2)}${v(s,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function We(n){return $s(n,["hour","minute","second","millisecond"])}const As=["January","February","March","April","May","June","July","August","September","October","November","December"],On=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],zs=["J","F","M","A","M","J","J","A","S","O","N","D"];function vn(n){switch(n){case"narrow":return[...zs];case"short":return[...On];case"long":return[...As];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 Mn=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Nn=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Us=["M","T","W","T","F","S","S"];function En(n){switch(n){case"narrow":return[...Us];case"short":return[...Nn];case"long":return[...Mn];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const In=["AM","PM"],Rs=["Before Christ","Anno Domini"],qs=["BC","AD"],Hs=["B","A"];function Dn(n){switch(n){case"narrow":return[...Hs];case"short":return[...qs];case"long":return[...Rs];default:return null}}function Ys(n){return In[n.hour<12?0:1]}function _s(n,e){return En(e)[n.weekday-1]}function Ps(n,e){return vn(e)[n.month-1]}function Gs(n,e){return Dn(e)[n.year<0?0:1]}function Js(n,e,t="always",s=!1){const r={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},i=["hours","minutes","seconds"].indexOf(n)===-1;if(t==="auto"&&i){const y=n==="days";switch(e){case 1:return y?"tomorrow":`next ${r[n][0]}`;case-1:return y?"yesterday":`last ${r[n][0]}`;case 0:return y?"today":`this ${r[n][0]}`}}const a=Object.is(e,-0)||e<0,o=Math.abs(e),u=o===1,l=r[n],f=s?u?l[1]:l[2]||l[1]:u?r[n][0]:n;return a?`${o} ${f} ago`:`in ${o} ${f}`}function Dt(n,e){let t="";for(const s of n)s.literal?t+=s.val:t+=e(s.val);return t}const Bs={D:Ee,DD:Yt,DDD:_t,DDDD:Pt,t:Gt,tt:Jt,ttt:Bt,tttt:jt,T:Qt,TT:Kt,TTT:Xt,TTTT:en,f:tn,ff:sn,fff:an,ffff:un,F:nn,FF:rn,FFF:on,FFFF:ln};class N{static create(e,t={}){return new N(e,t)}static parseFormat(e){let t=null,s="",r=!1;const i=[];for(let a=0;a<e.length;a++){const o=e.charAt(a);o==="'"?((s.length>0||r)&&i.push({literal:r||/^\s+$/.test(s),val:s===""?"'":s}),t=null,s="",r=!r):r||o===t?s+=o:(s.length>0&&i.push({literal:/^\s+$/.test(s),val:s}),s=o,t=o)}return s.length>0&&i.push({literal:r||/^\s+$/.test(s),val:s}),i}static macroTokenToFormatOpts(e){return Bs[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}dtFormatter(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t})}formatDateTime(e,t){return this.dtFormatter(e,t).format()}formatDateTimeParts(e,t){return this.dtFormatter(e,t).formatToParts()}formatInterval(e,t){return this.dtFormatter(e.start,t).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,t){return this.dtFormatter(e,t).resolvedOptions()}num(e,t=0,s=void 0){if(this.opts.forceSimple)return v(e,t);const r={...this.opts};return t>0&&(r.padTo=t),s&&(r.signDisplay=s),this.loc.numberFormatter(r).format(e)}formatDateTimeFromString(e,t){const s=this.loc.listingMode()==="en",r=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",i=(d,O)=>this.loc.extract(e,d,O),a=d=>e.isOffsetFixed&&e.offset===0&&d.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,d.format):"",o=()=>s?Ys(e):i({hour:"numeric",hourCycle:"h12"},"dayperiod"),u=(d,O)=>s?Ps(e,d):i(O?{month:d}:{month:d,day:"numeric"},"month"),l=(d,O)=>s?_s(e,d):i(O?{weekday:d}:{weekday:d,month:"long",day:"numeric"},"weekday"),f=d=>{const O=N.macroTokenToFormatOpts(d);return O?this.formatWithSystemDefault(e,O):d},y=d=>s?Gs(e,d):i({era:d},"era"),T=d=>{switch(d){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12===0?12:e.hour%12);case"hh":return this.num(e.hour%12===0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return a({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return a({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return a({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return o();case"d":return r?i({day:"numeric"},"day"):this.num(e.day);case"dd":return r?i({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return l("short",!0);case"cccc":return l("long",!0);case"ccccc":return l("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return l("short",!1);case"EEEE":return l("long",!1);case"EEEEE":return l("narrow",!1);case"L":return r?i({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return r?i({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return u("short",!0);case"LLLL":return u("long",!0);case"LLLLL":return u("narrow",!0);case"M":return r?i({month:"numeric"},"month"):this.num(e.month);case"MM":return r?i({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return u("short",!1);case"MMMM":return u("long",!1);case"MMMMM":return u("narrow",!1);case"y":return r?i({year:"numeric"},"year"):this.num(e.year);case"yy":return r?i({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return r?i({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return r?i({year:"numeric"},"year"):this.num(e.year,6);case"G":return y("short");case"GG":return y("long");case"GGGGG":return y("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return f(d)}};return Dt(N.parseFormat(t),T)}formatDurationFromString(e,t){const s=this.opts.signMode==="negativeLargestOnly"?-1:1,r=f=>{switch(f[0]){case"S":return"milliseconds";case"s":return"seconds";case"m":return"minutes";case"h":return"hours";case"d":return"days";case"w":return"weeks";case"M":return"months";case"y":return"years";default:return null}},i=(f,y)=>T=>{const d=r(T);if(d){const O=y.isNegativeDuration&&d!==y.largestUnit?s:1;let F;return this.opts.signMode==="negativeLargestOnly"&&d!==y.largestUnit?F="never":this.opts.signMode==="all"?F="always":F="auto",this.num(f.get(d)*O,T.length,F)}else return T},a=N.parseFormat(t),o=a.reduce((f,{literal:y,val:T})=>y?f:f.concat(T),[]),u=e.shiftTo(...o.map(r).filter(f=>f)),l={isNegativeDuration:u<0,largestUnit:Object.keys(u.values)[0]};return Dt(a,i(u,l))}}const xn=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function te(...n){const e=n.reduce((t,s)=>t+s.source,"");return RegExp(`^${e}$`)}function ne(...n){return e=>n.reduce(([t,s,r],i)=>{const[a,o,u]=i(e,r);return[{...t,...a},o||s,u]},[{},null,1]).slice(0,2)}function se(n,...e){if(n==null)return[null,null];for(const[t,s]of e){const r=t.exec(n);if(r)return s(r)}return[null,null]}function bn(...n){return(e,t)=>{const s={};let r;for(r=0;r<n.length;r++)s[n[r]]=U(e[t+r]);return[s,null,t+r]}}const Fn=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,js=`(?:${Fn.source}?(?:\\[(${xn.source})\\])?)?`,at=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,Cn=RegExp(`${at.source}${js}`),ot=RegExp(`(?:[Tt]${Cn.source})?`),Qs=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,Ks=/(\d{4})-?W(\d\d)(?:-?(\d))?/,Xs=/(\d{4})-?(\d{3})/,er=bn("weekYear","weekNumber","weekDay"),tr=bn("year","ordinal"),nr=/(\d{4})-(\d\d)-(\d\d)/,Vn=RegExp(`${at.source} ?(?:${Fn.source}|(${xn.source}))?`),sr=RegExp(`(?: ${Vn.source})?`);function X(n,e,t){const s=n[e];return h(s)?t:U(s)}function rr(n,e){return[{year:X(n,e),month:X(n,e+1,1),day:X(n,e+2,1)},null,e+3]}function re(n,e){return[{hours:X(n,e,0),minutes:X(n,e+1,0),seconds:X(n,e+2,0),milliseconds:rt(n[e+3])},null,e+4]}function ge(n,e){const t=!n[e]&&!n[e+1],s=Ve(n[e+1],n[e+2]),r=t?null:E.instance(s);return[{},r,e+3]}function we(n,e){const t=n[e]?A.create(n[e]):null;return[{},t,e+1]}const ir=RegExp(`^T?${at.source}$`),ar=/^-?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 or(n){const[e,t,s,r,i,a,o,u,l]=n,f=e[0]==="-",y=u&&u[0]==="-",T=(d,O=!1)=>d!==void 0&&(O||d&&f)?-d:d;return[{years:T(H(t)),months:T(H(s)),weeks:T(H(r)),days:T(H(i)),hours:T(H(a)),minutes:T(H(o)),seconds:T(H(u),u==="-0"),milliseconds:T(rt(l),y)}]}const ur={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function ut(n,e,t,s,r,i,a){const o={year:e.length===2?Xe(U(e)):U(e),month:On.indexOf(t)+1,day:U(s),hour:U(r),minute:U(i)};return a&&(o.second=U(a)),n&&(o.weekday=n.length>3?Mn.indexOf(n)+1:Nn.indexOf(n)+1),o}const lr=/^(?:(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 cr(n){const[,e,t,s,r,i,a,o,u,l,f,y]=n,T=ut(e,r,s,t,i,a,o);let d;return u?d=ur[u]:l?d=0:d=Ve(f,y),[T,new E(d)]}function fr(n){return n.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const dr=/^(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$/,hr=/^(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$/,mr=/^(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 xt(n){const[,e,t,s,r,i,a,o]=n;return[ut(e,r,s,t,i,a,o),E.utcInstance]}function yr(n){const[,e,t,s,r,i,a,o]=n;return[ut(e,o,t,s,r,i,a),E.utcInstance]}const gr=te(Qs,ot),wr=te(Ks,ot),kr=te(Xs,ot),Tr=te(Cn),Wn=ne(rr,re,ge,we),pr=ne(er,re,ge,we),Sr=ne(tr,re,ge,we),Or=ne(re,ge,we);function vr(n){return se(n,[gr,Wn],[wr,pr],[kr,Sr],[Tr,Or])}function Mr(n){return se(fr(n),[lr,cr])}function Nr(n){return se(n,[dr,xt],[hr,xt],[mr,yr])}function Er(n){return se(n,[ar,or])}const Ir=ne(re);function Dr(n){return se(n,[ir,Ir])}const xr=te(nr,sr),br=te(Vn),Fr=ne(re,ge,we);function Cr(n){return se(n,[xr,Wn],[br,Fr])}const bt="Invalid Duration",Ln={weeks:{days:7,hours:168,minutes:10080,seconds:10080*60,milliseconds:10080*60*1e3},days:{hours:24,minutes:1440,seconds:1440*60,milliseconds:1440*60*1e3},hours:{minutes:60,seconds:3600,milliseconds:3600*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},Vr={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:2184,minutes:2184*60,seconds:2184*60*60,milliseconds:2184*60*60*1e3},months:{weeks:4,days:30,hours:720,minutes:720*60,seconds:720*60*60,milliseconds:720*60*60*1e3},...Ln},D=146097/400,J=146097/4800,Wr={years:{quarters:4,months:12,weeks:D/7,days:D,hours:D*24,minutes:D*24*60,seconds:D*24*60*60,milliseconds:D*24*60*60*1e3},quarters:{months:3,weeks:D/28,days:D/4,hours:D*24/4,minutes:D*24*60/4,seconds:D*24*60*60/4,milliseconds:D*24*60*60*1e3/4},months:{weeks:J/7,days:J,hours:J*24,minutes:J*24*60,seconds:J*24*60*60,milliseconds:J*24*60*60*1e3},...Ln},_=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Lr=_.slice(0).reverse();function Z(n,e,t=!1){const s={values:t?e.values:{...n.values,...e.values||{}},loc:n.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||n.conversionAccuracy,matrix:e.matrix||n.matrix};return new g(s)}function $n(n,e){let t=e.milliseconds??0;for(const s of Lr.slice(1))e[s]&&(t+=e[s]*n[s].milliseconds);return t}function Ft(n,e){const t=$n(n,e)<0?-1:1;_.reduceRight((s,r)=>{if(h(e[r]))return s;if(s){const i=e[s]*t,a=n[r][s],o=Math.floor(i/a);e[r]+=o*t,e[s]-=o*a*t}return r},null),_.reduce((s,r)=>{if(h(e[r]))return s;if(s){const i=e[s]%1;e[s]-=i,e[r]+=i*n[s][r]}return r},null)}function Ct(n){const e={};for(const[t,s]of Object.entries(n))s!==0&&(e[t]=s);return e}class g{constructor(e){const t=e.conversionAccuracy==="longterm"||!1;let s=t?Wr:Vr;e.matrix&&(s=e.matrix),this.values=e.values,this.loc=e.loc||k.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=s,this.isLuxonDuration=!0}static fromMillis(e,t){return g.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(e==null||typeof e!="object")throw new M(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new g({values:xe(e,g.normalizeUnit),loc:k.fromObject(t),conversionAccuracy:t.conversionAccuracy,matrix:t.matrix})}static fromDurationLike(e){if(q(e))return g.fromMillis(e);if(g.isDuration(e))return e;if(typeof e=="object")return g.fromObject(e);throw new M(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[s]=Er(e);return s?g.fromObject(s,t):g.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[s]=Dr(e);return s?g.fromObject(s,t):g.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new M("need to specify a reason the Duration is invalid");const s=e instanceof W?e:new W(e,t);if(S.throwOnInvalid)throw new os(s);return new g({invalid:s})}static normalizeUnit(e){const t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(!t)throw new Ht(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,t={}){const s={...t,floor:t.round!==!1&&t.floor!==!1};return this.isValid?N.create(this.loc,s).formatDurationFromString(this,e):bt}toHuman(e={}){if(!this.isValid)return bt;const t=e.showZeros!==!1,s=_.map(r=>{const i=this.values[r];return h(i)||i===0&&!t?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:r.slice(0,-1)}).format(i)}).filter(r=>r);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(s)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return this.years!==0&&(e+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+"M"),this.weeks!==0&&(e+=this.weeks+"W"),this.days!==0&&(e+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+="T"),this.hours!==0&&(e+=this.hours+"H"),this.minutes!==0&&(e+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(e+=it(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const t=this.toMillis();return t<0||t>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},m.fromMillis(t,{zone:"UTC"}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?$n(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const t=g.fromDurationLike(e),s={};for(const r of _)(ee(t.values,r)||ee(this.values,r))&&(s[r]=t.get(r)+this.get(r));return Z(this,{values:s},!0)}minus(e){if(!this.isValid)return this;const t=g.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;const t={};for(const s of Object.keys(this.values))t[s]=Sn(e(this.values[s],s));return Z(this,{values:t},!0)}get(e){return this[g.normalizeUnit(e)]}set(e){if(!this.isValid)return this;const t={...this.values,...xe(e,g.normalizeUnit)};return Z(this,{values:t})}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:s,matrix:r}={}){const a={loc:this.loc.clone({locale:e,numberingSystem:t}),matrix:r,conversionAccuracy:s};return Z(this,a)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return Ft(this.matrix,e),Z(this,{values:e},!0)}rescale(){if(!this.isValid)return this;const e=Ct(this.normalize().shiftToAll().toObject());return Z(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(a=>g.normalizeUnit(a));const t={},s={},r=this.toObject();let i;for(const a of _)if(e.indexOf(a)>=0){i=a;let o=0;for(const l in s)o+=this.matrix[l][a]*s[l],s[l]=0;q(r[a])&&(o+=r[a]);const u=Math.trunc(o);t[a]=u,s[a]=(o*1e3-u*1e3)/1e3}else q(r[a])&&(s[a]=r[a]);for(const a in s)s[a]!==0&&(t[i]+=a===i?s[a]:s[a]/this.matrix[i][a]);return Ft(this.matrix,t),Z(this,{values:t},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const e={};for(const t of Object.keys(this.values))e[t]=this.values[t]===0?0:-this.values[t];return Z(this,{values:e},!0)}removeZeros(){if(!this.isValid)return this;const e=Ct(this.values);return Z(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function t(s,r){return s===void 0||s===0?r===void 0||r===0:s===r}for(const s of _)if(!t(this.values[s],e.values[s]))return!1;return!0}}const B="Invalid Interval";function $r(n,e){return!n||!n.isValid?p.invalid("missing or invalid start"):!e||!e.isValid?p.invalid("missing or invalid end"):e<n?p.invalid("end before start",`The end of an interval must be after its start, but you had start=${n.toISO()} and end=${e.toISO()}`):null}class p{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,t=null){if(!e)throw new M("need to specify a reason the Interval is invalid");const s=e instanceof W?e:new W(e,t);if(S.throwOnInvalid)throw new as(s);return new p({invalid:s})}static fromDateTimes(e,t){const s=ue(e),r=ue(t),i=$r(s,r);return i??new p({start:s,end:r})}static after(e,t){const s=g.fromDurationLike(t),r=ue(e);return p.fromDateTimes(r,r.plus(s))}static before(e,t){const s=g.fromDurationLike(t),r=ue(e);return p.fromDateTimes(r.minus(s),r)}static fromISO(e,t){const[s,r]=(e||"").split("/",2);if(s&&r){let i,a;try{i=m.fromISO(s,t),a=i.isValid}catch{a=!1}let o,u;try{o=m.fromISO(r,t),u=o.isValid}catch{u=!1}if(a&&u)return p.fromDateTimes(i,o);if(a){const l=g.fromISO(r,t);if(l.isValid)return p.after(i,l)}else if(u){const l=g.fromISO(s,t);if(l.isValid)return p.before(o,l)}}return p.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e="milliseconds"){return this.isValid?this.toDuration(e).get(e):NaN}count(e="milliseconds",t){if(!this.isValid)return NaN;const s=this.start.startOf(e,t);let r;return t?.useLocaleWeeks?r=this.end.reconfigure({locale:s.locale}):r=this.end,r=r.startOf(e,t),Math.floor(r.diff(s,e).get(e))+(r.valueOf()!==this.end.valueOf())}hasSame(e){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,e):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return this.isValid?this.s>e:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:t}={}){return this.isValid?p.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(ue).filter(a=>this.contains(a)).sort((a,o)=>a.toMillis()-o.toMillis()),s=[];let{s:r}=this,i=0;for(;r<this.e;){const a=t[i]||this.e,o=+a>+this.e?this.e:a;s.push(p.fromDateTimes(r,o)),r=o,i+=1}return s}splitBy(e){const t=g.fromDurationLike(e);if(!this.isValid||!t.isValid||t.as("milliseconds")===0)return[];let{s}=this,r=1,i;const a=[];for(;s<this.e;){const o=this.start.plus(t.mapUnits(u=>u*r));i=+o>+this.e?this.e:o,a.push(p.fromDateTimes(s,i)),s=i,r+=1}return a}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return this.isValid?+this.e==+e.s:!1}abutsEnd(e){return this.isValid?+e.e==+this.s:!1}engulfs(e){return this.isValid?this.s<=e.s&&this.e>=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;const t=this.s>e.s?this.s:e.s,s=this.e<e.e?this.e:e.e;return t>=s?null:p.fromDateTimes(t,s)}union(e){if(!this.isValid)return this;const t=this.s<e.s?this.s:e.s,s=this.e>e.e?this.e:e.e;return p.fromDateTimes(t,s)}static merge(e){const[t,s]=e.sort((r,i)=>r.s-i.s).reduce(([r,i],a)=>i?i.overlaps(a)||i.abutsStart(a)?[r,i.union(a)]:[r.concat([i]),a]:[r,a],[[],null]);return s&&t.push(s),t}static xor(e){let t=null,s=0;const r=[],i=e.map(u=>[{time:u.s,type:"s"},{time:u.e,type:"e"}]),a=Array.prototype.concat(...i),o=a.sort((u,l)=>u.time-l.time);for(const u of o)s+=u.type==="s"?1:-1,s===1?t=u.time:(t&&+t!=+u.time&&r.push(p.fromDateTimes(t,u.time)),t=null);return p.merge(r)}difference(...e){return p.xor([this].concat(e)).map(t=>this.intersection(t)).filter(t=>t&&!t.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:B}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=Ee,t={}){return this.isValid?N.create(this.s.loc.clone(t),e).formatInterval(this):B}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:B}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:B}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:B}toFormat(e,{separator:t=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:B}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):g.invalid(this.invalidReason)}mapEndpoints(e){return p.fromDateTimes(e(this.s),e(this.e))}}class Te{static hasDST(e=S.defaultZone){const t=m.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return A.isValidZone(e)}static normalizeZone(e){return R(e,S.defaultZone)}static getStartOfWeek({locale:e=null,locObj:t=null}={}){return(t||k.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:t=null}={}){return(t||k.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:t=null}={}){return(t||k.create(e)).getWeekendDays().slice()}static months(e="long",{locale:t=null,numberingSystem:s=null,locObj:r=null,outputCalendar:i="gregory"}={}){return(r||k.create(t,s,i)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:s=null,locObj:r=null,outputCalendar:i="gregory"}={}){return(r||k.create(t,s,i)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:s=null,locObj:r=null}={}){return(r||k.create(t,s,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:s=null,locObj:r=null}={}){return(r||k.create(t,s,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return k.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return k.create(t,null,"gregory").eras(e)}static features(){return{relative:kn(),localeWeek:Tn()}}}function Vt(n,e){const t=r=>r.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),s=t(e)-t(n);return Math.floor(g.fromMillis(s).as("days"))}function Zr(n,e,t){const s=[["years",(u,l)=>l.year-u.year],["quarters",(u,l)=>l.quarter-u.quarter+(l.year-u.year)*4],["months",(u,l)=>l.month-u.month+(l.year-u.year)*12],["weeks",(u,l)=>{const f=Vt(u,l);return(f-f%7)/7}],["days",Vt]],r={},i=n;let a,o;for(const[u,l]of s)t.indexOf(u)>=0&&(a=u,r[u]=l(n,e),o=i.plus(r),o>e?(r[u]--,n=i.plus(r),n>e&&(o=n,r[u]--,n=i.plus(r))):n=o);return[n,r,o,a]}function Ar(n,e,t,s){let[r,i,a,o]=Zr(n,e,t);const u=e-r,l=t.filter(y=>["hours","minutes","seconds","milliseconds"].indexOf(y)>=0);l.length===0&&(a<e&&(a=r.plus({[o]:1})),a!==r&&(i[o]=(i[o]||0)+u/(a-r)));const f=g.fromObject(i,s);return l.length>0?g.fromMillis(u,s).shiftTo(...l).plus(f):f}const zr="missing Intl.DateTimeFormat.formatToParts support";function w(n,e=t=>t){return{regex:n,deser:([t])=>e(xs(t))}}const Ur=" ",Zn=`[ ${Ur}]`,An=new RegExp(Zn,"g");function Rr(n){return n.replace(/\./g,"\\.?").replace(An,Zn)}function Wt(n){return n.replace(/\./g,"").replace(An," ").toLowerCase()}function V(n,e){return n===null?null:{regex:RegExp(n.map(Rr).join("|")),deser:([t])=>n.findIndex(s=>Wt(t)===Wt(s))+e}}function Lt(n,e){return{regex:n,deser:([,t,s])=>Ve(t,s),groups:e}}function pe(n){return{regex:n,deser:([e])=>e}}function qr(n){return n.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Hr(n,e){const t=C(e),s=C(e,"{2}"),r=C(e,"{3}"),i=C(e,"{4}"),a=C(e,"{6}"),o=C(e,"{1,2}"),u=C(e,"{1,3}"),l=C(e,"{1,6}"),f=C(e,"{1,9}"),y=C(e,"{2,4}"),T=C(e,"{4,6}"),d=$=>({regex:RegExp(qr($.val)),deser:([G])=>G,literal:!0}),F=($=>{if(n.literal)return d($);switch($.val){case"G":return V(e.eras("short"),0);case"GG":return V(e.eras("long"),0);case"y":return w(l);case"yy":return w(y,Xe);case"yyyy":return w(i);case"yyyyy":return w(T);case"yyyyyy":return w(a);case"M":return w(o);case"MM":return w(s);case"MMM":return V(e.months("short",!0),1);case"MMMM":return V(e.months("long",!0),1);case"L":return w(o);case"LL":return w(s);case"LLL":return V(e.months("short",!1),1);case"LLLL":return V(e.months("long",!1),1);case"d":return w(o);case"dd":return w(s);case"o":return w(u);case"ooo":return w(r);case"HH":return w(s);case"H":return w(o);case"hh":return w(s);case"h":return w(o);case"mm":return w(s);case"m":return w(o);case"q":return w(o);case"qq":return w(s);case"s":return w(o);case"ss":return w(s);case"S":return w(u);case"SSS":return w(r);case"u":return pe(f);case"uu":return pe(o);case"uuu":return w(t);case"a":return V(e.meridiems(),0);case"kkkk":return w(i);case"kk":return w(y,Xe);case"W":return w(o);case"WW":return w(s);case"E":case"c":return w(t);case"EEE":return V(e.weekdays("short",!1),1);case"EEEE":return V(e.weekdays("long",!1),1);case"ccc":return V(e.weekdays("short",!0),1);case"cccc":return V(e.weekdays("long",!0),1);case"Z":case"ZZ":return Lt(new RegExp(`([+-]${o.source})(?::(${s.source}))?`),2);case"ZZZ":return Lt(new RegExp(`([+-]${o.source})(${s.source})?`),2);case"z":return pe(/[a-z_+-/]{1,256}?/i);case" ":return pe(/[^\S\n\r]/);default:return d($)}})(n)||{invalidReason:zr};return F.token=n,F}const Yr={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function _r(n,e,t){const{type:s,value:r}=n;if(s==="literal"){const u=/^\s+$/.test(r);return{literal:!u,val:u?" ":r}}const i=e[s];let a=s;s==="hour"&&(e.hour12!=null?a=e.hour12?"hour12":"hour24":e.hourCycle!=null?e.hourCycle==="h11"||e.hourCycle==="h12"?a="hour12":a="hour24":a=t.hour12?"hour12":"hour24");let o=Yr[a];if(typeof o=="object"&&(o=o[i]),o)return{literal:!1,val:o}}function Pr(n){return[`^${n.map(t=>t.regex).reduce((t,s)=>`${t}(${s.source})`,"")}$`,n]}function Gr(n,e,t){const s=n.match(e);if(s){const r={};let i=1;for(const a in t)if(ee(t,a)){const o=t[a],u=o.groups?o.groups+1:1;!o.literal&&o.token&&(r[o.token.val[0]]=o.deser(s.slice(i,i+u))),i+=u}return[s,r]}else return[s,{}]}function Jr(n){const e=i=>{switch(i){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let t=null,s;return h(n.z)||(t=A.create(n.z)),h(n.Z)||(t||(t=new E(n.Z)),s=n.Z),h(n.q)||(n.M=(n.q-1)*3+1),h(n.h)||(n.h<12&&n.a===1?n.h+=12:n.h===12&&n.a===0&&(n.h=0)),n.G===0&&n.y&&(n.y=-n.y),h(n.u)||(n.S=rt(n.u)),[Object.keys(n).reduce((i,a)=>{const o=e(a);return o&&(i[o]=n[a]),i},{}),t,s]}let ze=null;function Br(){return ze||(ze=m.fromMillis(1555555555555)),ze}function jr(n,e){if(n.literal)return n;const t=N.macroTokenToFormatOpts(n.val),s=qn(t,e);return s==null||s.includes(void 0)?n:s}function zn(n,e){return Array.prototype.concat(...n.map(t=>jr(t,e)))}class Un{constructor(e,t){if(this.locale=e,this.format=t,this.tokens=zn(N.parseFormat(t),e),this.units=this.tokens.map(s=>Hr(s,e)),this.disqualifyingUnit=this.units.find(s=>s.invalidReason),!this.disqualifyingUnit){const[s,r]=Pr(this.units);this.regex=RegExp(s,"i"),this.handlers=r}}explainFromTokens(e){if(this.isValid){const[t,s]=Gr(e,this.regex,this.handlers),[r,i,a]=s?Jr(s):[null,null,void 0];if(ee(s,"a")&&ee(s,"H"))throw new Q("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:t,matches:s,result:r,zone:i,specificOffset:a}}else return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function Rn(n,e,t){return new Un(n,t).explainFromTokens(e)}function Qr(n,e,t){const{result:s,zone:r,specificOffset:i,invalidReason:a}=Rn(n,e,t);return[s,r,i,a]}function qn(n,e){if(!n)return null;const s=N.create(e,n).dtFormatter(Br()),r=s.formatToParts(),i=s.resolvedOptions();return r.map(a=>_r(a,n,i))}const Ue="Invalid DateTime",$t=864e13;function ce(n){return new W("unsupported zone",`the zone "${n.name}" is not supported`)}function Re(n){return n.weekData===null&&(n.weekData=Ie(n.c)),n.weekData}function qe(n){return n.localWeekData===null&&(n.localWeekData=Ie(n.c,n.loc.getMinDaysInFirstWeek(),n.loc.getStartOfWeek())),n.localWeekData}function Y(n,e){const t={ts:n.ts,zone:n.zone,c:n.c,o:n.o,loc:n.loc,invalid:n.invalid};return new m({...t,...e,old:t})}function Hn(n,e,t){let s=n-e*60*1e3;const r=t.offset(s);if(e===r)return[s,e];s-=(r-e)*60*1e3;const i=t.offset(s);return r===i?[s,r]:[n-Math.min(r,i)*60*1e3,Math.max(r,i)]}function Se(n,e){n+=e*60*1e3;const t=new Date(n);return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds(),millisecond:t.getUTCMilliseconds()}}function ve(n,e,t){return Hn(Ce(n),e,t)}function Zt(n,e){const t=n.o,s=n.c.year+Math.trunc(e.years),r=n.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,i={...n.c,year:s,month:r,day:Math.min(n.c.day,De(s,r))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},a=g.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),o=Ce(i);let[u,l]=Hn(o,t,n.zone);return a!==0&&(u+=a,l=n.zone.offset(u)),{ts:u,o:l}}function j(n,e,t,s,r,i){const{setZone:a,zone:o}=t;if(n&&Object.keys(n).length!==0||e){const u=e||o,l=m.fromObject(n,{...t,zone:u,specificOffset:i});return a?l:l.setZone(o)}else return m.invalid(new W("unparsable",`the input "${r}" can't be parsed as ${s}`))}function Oe(n,e,t=!0){return n.isValid?N.create(k.create("en-US"),{allowZ:t,forceSimple:!0}).formatDateTimeFromString(n,e):null}function He(n,e,t){const s=n.c.year>9999||n.c.year<0;let r="";if(s&&n.c.year>=0&&(r+="+"),r+=v(n.c.year,s?6:4),t==="year")return r;if(e){if(r+="-",r+=v(n.c.month),t==="month")return r;r+="-"}else if(r+=v(n.c.month),t==="month")return r;return r+=v(n.c.day),r}function At(n,e,t,s,r,i,a){let o=!t||n.c.millisecond!==0||n.c.second!==0,u="";switch(a){case"day":case"month":case"year":break;default:if(u+=v(n.c.hour),a==="hour")break;if(e){if(u+=":",u+=v(n.c.minute),a==="minute")break;o&&(u+=":",u+=v(n.c.second))}else{if(u+=v(n.c.minute),a==="minute")break;o&&(u+=v(n.c.second))}if(a==="second")break;o&&(!s||n.c.millisecond!==0)&&(u+=".",u+=v(n.c.millisecond,3))}return r&&(n.isOffsetFixed&&n.offset===0&&!i?u+="Z":n.o<0?(u+="-",u+=v(Math.trunc(-n.o/60)),u+=":",u+=v(Math.trunc(-n.o%60))):(u+="+",u+=v(Math.trunc(n.o/60)),u+=":",u+=v(Math.trunc(n.o%60)))),i&&(u+="["+n.zone.ianaName+"]"),u}const Yn={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},Kr={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},Xr={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Me=["year","month","day","hour","minute","second","millisecond"],ei=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],ti=["year","ordinal","hour","minute","second","millisecond"];function Ne(n){const e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[n.toLowerCase()];if(!e)throw new Ht(n);return e}function zt(n){switch(n.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return Ne(n)}}function ni(n){if(fe===void 0&&(fe=S.now()),n.type!=="iana")return n.offset(fe);const e=n.name;let t=et.get(e);return t===void 0&&(t=n.offset(fe),et.set(e,t)),t}function Ut(n,e){const t=R(e.zone,S.defaultZone);if(!t.isValid)return m.invalid(ce(t));const s=k.fromObject(e);let r,i;if(h(n.year))r=S.now();else{for(const u of Me)h(n[u])&&(n[u]=Yn[u]);const a=gn(n)||wn(n);if(a)return m.invalid(a);const o=ni(t);[r,i]=ve(n,o,t)}return new m({ts:r,zone:t,loc:s,o:i})}function Rt(n,e,t){const s=h(t.round)?!0:t.round,r=h(t.rounding)?"trunc":t.rounding,i=(o,u)=>(o=it(o,s||t.calendary?0:2,t.calendary?"round":r),e.loc.clone(t).relFormatter(t).format(o,u)),a=o=>t.calendary?e.hasSame(n,o)?0:e.startOf(o).diff(n.startOf(o),o).get(o):e.diff(n,o).get(o);if(t.unit)return i(a(t.unit),t.unit);for(const o of t.units){const u=a(o);if(Math.abs(u)>=1)return i(u,o)}return i(n>e?-0:0,t.units[t.units.length-1])}function qt(n){let e={},t;return n.length>0&&typeof n[n.length-1]=="object"?(e=n[n.length-1],t=Array.from(n).slice(0,n.length-1)):t=Array.from(n),[e,t]}let fe;const et=new Map;class m{constructor(e){const t=e.zone||S.defaultZone;let s=e.invalid||(Number.isNaN(e.ts)?new W("invalid input"):null)||(t.isValid?null:ce(t));this.ts=h(e.ts)?S.now():e.ts;let r=null,i=null;if(!s)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[r,i]=[e.old.c,e.old.o];else{const o=q(e.o)&&!e.old?e.o:t.offset(this.ts);r=Se(this.ts,o),s=Number.isNaN(r.year)?new W("invalid input"):null,r=s?null:r,i=s?null:o}this._zone=t,this.loc=e.loc||k.create(),this.invalid=s,this.weekData=null,this.localWeekData=null,this.c=r,this.o=i,this.isLuxonDateTime=!0}static now(){return new m({})}static local(){const[e,t]=qt(arguments),[s,r,i,a,o,u,l]=t;return Ut({year:s,month:r,day:i,hour:a,minute:o,second:u,millisecond:l},e)}static utc(){const[e,t]=qt(arguments),[s,r,i,a,o,u,l]=t;return e.zone=E.utcInstance,Ut({year:s,month:r,day:i,hour:a,minute:o,second:u,millisecond:l},e)}static fromJSDate(e,t={}){const s=Ws(e)?e.valueOf():NaN;if(Number.isNaN(s))return m.invalid("invalid input");const r=R(t.zone,S.defaultZone);return r.isValid?new m({ts:s,zone:r,loc:k.fromObject(t)}):m.invalid(ce(r))}static fromMillis(e,t={}){if(q(e))return e<-$t||e>$t?m.invalid("Timestamp out of range"):new m({ts:e,zone:R(t.zone,S.defaultZone),loc:k.fromObject(t)});throw new M(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(q(e))return new m({ts:e*1e3,zone:R(t.zone,S.defaultZone),loc:k.fromObject(t)});throw new M("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};const s=R(t.zone,S.defaultZone);if(!s.isValid)return m.invalid(ce(s));const r=k.fromObject(t),i=xe(e,zt),{minDaysInFirstWeek:a,startOfWeek:o}=Nt(i,r),u=S.now(),l=h(t.specificOffset)?s.offset(u):t.specificOffset,f=!h(i.ordinal),y=!h(i.year),T=!h(i.month)||!h(i.day),d=y||T,O=i.weekYear||i.weekNumber;if((d||f)&&O)throw new Q("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(T&&f)throw new Q("Can't mix ordinal dates with month/day");const F=O||i.weekday&&!d;let $,G,ie=Se(u,l);F?($=ei,G=Kr,ie=Ie(ie,a,o)):f?($=ti,G=Xr,ie=Ae(ie)):($=Me,G=Yn);let lt=!1;for(const oe of $){const Bn=i[oe];h(Bn)?lt?i[oe]=G[oe]:i[oe]=ie[oe]:lt=!0}const _n=F?Fs(i,a,o):f?Cs(i):gn(i),ct=_n||wn(i);if(ct)return m.invalid(ct);const Pn=F?vt(i,a,o):f?Mt(i):i,[Gn,Jn]=ve(Pn,l,s),ae=new m({ts:Gn,zone:s,o:Jn,loc:r});return i.weekday&&d&&e.weekday!==ae.weekday?m.invalid("mismatched weekday",`you can't specify both a weekday of ${i.weekday} and a date of ${ae.toISO()}`):ae.isValid?ae:m.invalid(ae.invalid)}static fromISO(e,t={}){const[s,r]=vr(e);return j(s,r,t,"ISO 8601",e)}static fromRFC2822(e,t={}){const[s,r]=Mr(e);return j(s,r,t,"RFC 2822",e)}static fromHTTP(e,t={}){const[s,r]=Nr(e);return j(s,r,t,"HTTP",t)}static fromFormat(e,t,s={}){if(h(e)||h(t))throw new M("fromFormat requires an input string and a format");const{locale:r=null,numberingSystem:i=null}=s,a=k.fromOpts({locale:r,numberingSystem:i,defaultToEN:!0}),[o,u,l,f]=Qr(a,e,t);return f?m.invalid(f):j(o,u,s,`format ${t}`,e,l)}static fromString(e,t,s={}){return m.fromFormat(e,t,s)}static fromSQL(e,t={}){const[s,r]=Cr(e);return j(s,r,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new M("need to specify a reason the DateTime is invalid");const s=e instanceof W?e:new W(e,t);if(S.throwOnInvalid)throw new is(s);return new m({invalid:s})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,t={}){const s=qn(e,k.fromObject(t));return s?s.map(r=>r?r.val:null).join(""):null}static expandFormat(e,t={}){return zn(N.parseFormat(e),k.fromObject(t)).map(r=>r.val).join("")}static resetCache(){fe=void 0,et.clear()}get(e){return this[e]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Re(this).weekYear:NaN}get weekNumber(){return this.isValid?Re(this).weekNumber:NaN}get weekday(){return this.isValid?Re(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?qe(this).weekday:NaN}get localWeekNumber(){return this.isValid?qe(this).weekNumber:NaN}get localWeekYear(){return this.isValid?qe(this).weekYear:NaN}get ordinal(){return this.isValid?Ae(this.c).ordinal:NaN}get monthShort(){return this.isValid?Te.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Te.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Te.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Te.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const e=864e5,t=6e4,s=Ce(this.c),r=this.zone.offset(s-e),i=this.zone.offset(s+e),a=this.zone.offset(s-r*t),o=this.zone.offset(s-i*t);if(a===o)return[this];const u=s-a*t,l=s-o*t,f=Se(u,a),y=Se(l,o);return f.hour===y.hour&&f.minute===y.minute&&f.second===y.second&&f.millisecond===y.millisecond?[Y(this,{ts:u}),Y(this,{ts:l})]:[this]}get isInLeapYear(){return ye(this.year)}get daysInMonth(){return De(this.year,this.month)}get daysInYear(){return this.isValid?K(this.year):NaN}get weeksInWeekYear(){return this.isValid?he(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?he(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){const{locale:t,numberingSystem:s,calendar:r}=N.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:s,outputCalendar:r}}toUTC(e=0,t={}){return this.setZone(E.instance(e),t)}toLocal(){return this.setZone(S.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:s=!1}={}){if(e=R(e,S.defaultZone),e.equals(this.zone))return this;if(e.isValid){let r=this.ts;if(t||s){const i=e.offset(this.ts),a=this.toObject();[r]=ve(a,i,e)}return Y(this,{ts:r,zone:e})}else return m.invalid(ce(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:s}={}){const r=this.loc.clone({locale:e,numberingSystem:t,outputCalendar:s});return Y(this,{loc:r})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const t=xe(e,zt),{minDaysInFirstWeek:s,startOfWeek:r}=Nt(t,this.loc),i=!h(t.weekYear)||!h(t.weekNumber)||!h(t.weekday),a=!h(t.ordinal),o=!h(t.year),u=!h(t.month)||!h(t.day),l=o||u,f=t.weekYear||t.weekNumber;if((l||a)&&f)throw new Q("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(u&&a)throw new Q("Can't mix ordinal dates with month/day");let y;i?y=vt({...Ie(this.c,s,r),...t},s,r):h(t.ordinal)?(y={...this.toObject(),...t},h(t.day)&&(y.day=Math.min(De(y.year,y.month),y.day))):y=Mt({...Ae(this.c),...t});const[T,d]=ve(y,this.o,this.zone);return Y(this,{ts:T,o:d})}plus(e){if(!this.isValid)return this;const t=g.fromDurationLike(e);return Y(this,Zt(this,t))}minus(e){if(!this.isValid)return this;const t=g.fromDurationLike(e).negate();return Y(this,Zt(this,t))}startOf(e,{useLocaleWeeks:t=!1}={}){if(!this.isValid)return this;const s={},r=g.normalizeUnit(e);switch(r){case"years":s.month=1;case"quarters":case"months":s.day=1;case"weeks":case"days":s.hour=0;case"hours":s.minute=0;case"minutes":s.second=0;case"seconds":s.millisecond=0;break}if(r==="weeks")if(t){const i=this.loc.getStartOfWeek(),{weekday:a}=this;a<i&&(s.weekNumber=this.weekNumber-1),s.weekday=i}else s.weekday=1;if(r==="quarters"){const i=Math.ceil(this.month/3);s.month=(i-1)*3+1}return this.set(s)}endOf(e,t){return this.isValid?this.plus({[e]:1}).startOf(e,t).minus(1):this}toFormat(e,t={}){return this.isValid?N.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):Ue}toLocaleString(e=Ee,t={}){return this.isValid?N.create(this.loc.clone(t),e).formatDateTime(this):Ue}toLocaleParts(e={}){return this.isValid?N.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:t=!1,suppressMilliseconds:s=!1,includeOffset:r=!0,extendedZone:i=!1,precision:a="milliseconds"}={}){if(!this.isValid)return null;a=Ne(a);const o=e==="extended";let u=He(this,o,a);return Me.indexOf(a)>=3&&(u+="T"),u+=At(this,o,t,s,r,i,a),u}toISODate({format:e="extended",precision:t="day"}={}){return this.isValid?He(this,e==="extended",Ne(t)):null}toISOWeekDate(){return Oe(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:s=!0,includePrefix:r=!1,extendedZone:i=!1,format:a="extended",precision:o="milliseconds"}={}){return this.isValid?(o=Ne(o),(r&&Me.indexOf(o)>=3?"T":"")+At(this,a==="extended",t,e,s,i,o)):null}toRFC2822(){return Oe(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Oe(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?He(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:s=!0}={}){let r="HH:mm:ss.SSS";return(t||e)&&(s&&(r+=" "),t?r+="z":e&&(r+="ZZ")),Oe(this,r,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():Ue}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};const t={...this.c};return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,t="milliseconds",s={}){if(!this.isValid||!e.isValid)return g.invalid("created by diffing an invalid DateTime");const r={locale:this.locale,numberingSystem:this.numberingSystem,...s},i=Ls(t).map(g.normalizeUnit),a=e.valueOf()>this.valueOf(),o=a?this:e,u=a?e:this,l=Ar(o,u,i,r);return a?l.negate():l}diffNow(e="milliseconds",t={}){return this.diff(m.now(),e,t)}until(e){return this.isValid?p.fromDateTimes(this,e):this}hasSame(e,t,s){if(!this.isValid)return!1;const r=e.valueOf(),i=this.setZone(e.zone,{keepLocalTime:!0});return i.startOf(t,s)<=r&&r<=i.endOf(t,s)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const t=e.base||m.fromObject({},{zone:this.zone}),s=e.padding?this<t?-e.padding:e.padding:0;let r=["years","months","days","hours","minutes","seconds"],i=e.unit;return Array.isArray(e.unit)&&(r=e.unit,i=void 0),Rt(t,this.plus(s),{...e,numeric:"always",units:r,unit:i})}toRelativeCalendar(e={}){return this.isValid?Rt(e.base||m.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(m.isDateTime))throw new M("min requires all arguments be DateTimes");return Et(e,t=>t.valueOf(),Math.min)}static max(...e){if(!e.every(m.isDateTime))throw new M("max requires all arguments be DateTimes");return Et(e,t=>t.valueOf(),Math.max)}static fromFormatExplain(e,t,s={}){const{locale:r=null,numberingSystem:i=null}=s,a=k.fromOpts({locale:r,numberingSystem:i,defaultToEN:!0});return Rn(a,e,t)}static fromStringExplain(e,t,s={}){return m.fromFormatExplain(e,t,s)}static buildFormatParser(e,t={}){const{locale:s=null,numberingSystem:r=null}=t,i=k.fromOpts({locale:s,numberingSystem:r,defaultToEN:!0});return new Un(i,e)}static fromFormatParser(e,t,s={}){if(h(e)||h(t))throw new M("fromFormatParser requires an input string and a format parser");const{locale:r=null,numberingSystem:i=null}=s,a=k.fromOpts({locale:r,numberingSystem:i,defaultToEN:!0});if(!a.equals(t.locale))throw new M(`fromFormatParser called with a locale of ${a}, but the format parser was created for ${t.locale}`);const{result:o,zone:u,specificOffset:l,invalidReason:f}=t.explainFromTokens(e);return f?m.invalid(f):j(o,u,s,`format ${t.format}`,e,l)}static get DATE_SHORT(){return Ee}static get DATE_MED(){return Yt}static get DATE_MED_WITH_WEEKDAY(){return us}static get DATE_FULL(){return _t}static get DATE_HUGE(){return Pt}static get TIME_SIMPLE(){return Gt}static get TIME_WITH_SECONDS(){return Jt}static get TIME_WITH_SHORT_OFFSET(){return Bt}static get TIME_WITH_LONG_OFFSET(){return jt}static get TIME_24_SIMPLE(){return Qt}static get TIME_24_WITH_SECONDS(){return Kt}static get TIME_24_WITH_SHORT_OFFSET(){return Xt}static get TIME_24_WITH_LONG_OFFSET(){return en}static get DATETIME_SHORT(){return tn}static get DATETIME_SHORT_WITH_SECONDS(){return nn}static get DATETIME_MED(){return sn}static get DATETIME_MED_WITH_SECONDS(){return rn}static get DATETIME_MED_WITH_WEEKDAY(){return ls}static get DATETIME_FULL(){return an}static get DATETIME_FULL_WITH_SECONDS(){return on}static get DATETIME_HUGE(){return un}static get DATETIME_HUGE_WITH_SECONDS(){return ln}}function ue(n){if(m.isDateTime(n))return n;if(n&&n.valueOf&&q(n.valueOf()))return m.fromJSDate(n);if(n&&typeof n=="object")return m.fromObject(n);throw new M(`Unknown datetime argument: ${n}, of type ${typeof n}`)}export{ai as C,m as D};
|