class e extends Error{}class r extends e{constructor(e){super("Invalid DateTime: "+e.toMessage())}}class n extends e{constructor(e){super("Invalid Interval: "+e.toMessage())}}class s extends e{constructor(e){super("Invalid Duration: "+e.toMessage())}}class N extends e{}class i extends e{constructor(e){super("Invalid unit "+e)}}class o extends e{}class a extends e{constructor(){super("Zone is an abstract class")}}var t="numeric",u="short",l="long";const c={year:t,month:t,day:t},h={year:t,month:u,day:t},d={year:t,month:u,day:t,weekday:u},m={year:t,month:l,day:t},f={year:t,month:l,day:t,weekday:l},y={hour:t,minute:t},g={hour:t,minute:t,second:t},w={hour:t,minute:t,second:t,timeZoneName:u},v={hour:t,minute:t,second:t,timeZoneName:l},p={hour:t,minute:t,hourCycle:"h23"},T={hour:t,minute:t,second:t,hourCycle:"h23"},S={hour:t,minute:t,second:t,hourCycle:"h23",timeZoneName:u},O={hour:t,minute:t,second:t,hourCycle:"h23",timeZoneName:l},b={year:t,month:t,day:t,hour:t,minute:t},k={year:t,month:t,day:t,hour:t,minute:t,second:t},M={year:t,month:u,day:t,hour:t,minute:t},D={year:t,month:u,day:t,hour:t,minute:t,second:t},E={year:t,month:u,day:t,weekday:u,hour:t,minute:t},V={year:t,month:l,day:t,hour:t,minute:t,timeZoneName:u},I={year:t,month:l,day:t,hour:t,minute:t,second:t,timeZoneName:u},x={year:t,month:l,day:t,weekday:l,hour:t,minute:t,timeZoneName:l},C={year:t,month:l,day:t,weekday:l,hour:t,minute:t,second:t,timeZoneName:l};function F(e){return void 0===e}function L(e){return"number"==typeof e}function Z(e){return"number"==typeof e&&e%1==0}function z(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(e){return!1}}function q(e,r,n){if(0!==e.length)return e.reduce((e,t)=>{t=[r(t),t];return e&&n(e[0],t[0])===e[0]?e:t},null)[1]}function A(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function j(e,t,r){return Z(e)&&t<=e&&e<=r}function _(e,t=2){let r;return r=e<0?"-"+(""+-e).padStart(t,"0"):(""+e).padStart(t,"0"),r}function U(e){if(!F(e)&&null!==e&&""!==e)return parseInt(e,10)}function $(e){if(!F(e)&&null!==e&&""!==e)return parseFloat(e)}function H(e){if(!F(e)&&null!==e&&""!==e){e=1e3*parseFloat("0."+e);return Math.floor(e)}}function W(e,t,r=!1){const n=10**t,s=r?Math.trunc:Math.round;return s(e*n)/n}function R(e){return e%4==0&&(e%100!=0||e%400==0)}function J(e){return R(e)?366:365}function P(e,t){var r,n=(r=t-1)-(n=12)*Math.floor(r/n)+1;return 2==n?R(e+(t-n)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function Y(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&0<=e.year&&(t=new Date(t),t.setUTCFullYear(t.getUTCFullYear()-1900)),+t}function G(e){var t=(e+Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400))%7,e=e-1,e=(e+Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400))%7;return 4==t||3==e?53:52}function B(e){return 99"timezonename"===e.type.toLowerCase());return t?t.value:null}function K(e,t){let r=parseInt(e,10);Number.isNaN(r)&&(r=0);t=parseInt(t,10)||0,t=r<0||Object.is(r,-0)?-t:t;return 60*r+t}function X(e){var t=Number(e);if("boolean"==typeof e||""===e||Number.isNaN(t))throw new o("Invalid unit value "+e);return t}function ee(e,t){const r={};for(const s in e){var n;!A(e,s)||null!=(n=e[s])&&(r[t(s)]=X(n))}return r}function te(e,t){var r=Math.trunc(Math.abs(e/60)),n=Math.trunc(Math.abs(e%60)),s=0<=e?"+":"-";switch(t){case"short":return s+_(r,2)+":"+_(n,2);case"narrow":return s+r+(0(e[t]=r[t],e),{});var r}var ne=/[A-Za-z_+-]{1,256}(:?\/[A-Za-z0-9_+-]{1,256}(\/[A-Za-z0-9_+-]{1,256})?)?/;const se=["January","February","March","April","May","June","July","August","September","October","November","December"],ie=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ae=["J","F","M","A","M","J","J","A","S","O","N","D"];function oe(e){switch(e){case"narrow":return[...ae];case"short":return[...ie];case"long":return[...se];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 ue=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],le=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],ce=["M","T","W","T","F","S","S"];function he(e){switch(e){case"narrow":return[...ce];case"short":return[...le];case"long":return[...ue];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const de=["AM","PM"],me=["Before Christ","Anno Domini"],fe=["BC","AD"],ye=["B","A"];function ge(e){switch(e){case"narrow":return[...ye];case"short":return[...fe];case"long":return[...me];default:return null}}function we(e,t){let r="";for(const n of e)n.literal?r+=n.val:r+=t(n.val);return r}const ve={D:c,DD:h,DDD:m,DDDD:f,t:y,tt:g,ttt:w,tttt:v,T:p,TT:T,TTT:S,TTTT:O,f:b,ff:M,fff:V,ffff:x,F:k,FF:D,FFF:I,FFFF:C};class pe{static create(e,t={}){return new pe(e,t)}static parseFormat(t){let r=null,n="",s=!1;const i=[];for(let e=0;ethis.loc.extract(r,e,t),i=e=>r.isOffsetFixed&&0===r.offset&&e.allowZ?"Z":r.isValid?r.zone.formatOffset(r.ts,e.format):"",a=()=>n?function(e){return de[e.hour<12?0:1]}(r):s({hour:"numeric",hourCycle:"h12"},"dayperiod"),o=(e,t)=>n?function(e,t){return oe(t)[e.month-1]}(r,e):s(t?{month:e}:{month:e,day:"numeric"},"month"),u=(e,t)=>n?function(e,t){return he(t)[e.weekday-1]}(r,e):s(t?{weekday:e}:{weekday:e,month:"long",day:"numeric"},"weekday"),l=e=>{var t=pe.macroTokenToFormatOpts(e);return t?this.formatWithSystemDefault(r,t):e},c=e=>n?function(e,t){return ge(t)[e.year<0?0:1]}(r,e):s({era:e},"era");return we(pe.parseFormat(e),e=>{switch(e){case"S":return this.num(r.millisecond);case"u":case"SSS":return this.num(r.millisecond,3);case"s":return this.num(r.second);case"ss":return this.num(r.second,2);case"uu":return this.num(Math.floor(r.millisecond/10),2);case"uuu":return this.num(Math.floor(r.millisecond/100));case"m":return this.num(r.minute);case"mm":return this.num(r.minute,2);case"h":return this.num(r.hour%12==0?12:r.hour%12);case"hh":return this.num(r.hour%12==0?12:r.hour%12,2);case"H":return this.num(r.hour);case"HH":return this.num(r.hour,2);case"Z":return i({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return i({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return i({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return r.zone.offsetName(r.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return r.zone.offsetName(r.ts,{format:"long",locale:this.loc.locale});case"z":return r.zoneName;case"a":return a();case"d":return t?s({day:"numeric"},"day"):this.num(r.day);case"dd":return t?s({day:"2-digit"},"day"):this.num(r.day,2);case"c":return this.num(r.weekday);case"ccc":return u("short",!0);case"cccc":return u("long",!0);case"ccccc":return u("narrow",!0);case"E":return this.num(r.weekday);case"EEE":return u("short",!1);case"EEEE":return u("long",!1);case"EEEEE":return u("narrow",!1);case"L":return t?s({month:"numeric",day:"numeric"},"month"):this.num(r.month);case"LL":return t?s({month:"2-digit",day:"numeric"},"month"):this.num(r.month,2);case"LLL":return o("short",!0);case"LLLL":return o("long",!0);case"LLLLL":return o("narrow",!0);case"M":return t?s({month:"numeric"},"month"):this.num(r.month);case"MM":return t?s({month:"2-digit"},"month"):this.num(r.month,2);case"MMM":return o("short",!1);case"MMMM":return o("long",!1);case"MMMMM":return o("narrow",!1);case"y":return t?s({year:"numeric"},"year"):this.num(r.year);case"yy":return t?s({year:"2-digit"},"year"):this.num(r.year.toString().slice(-2),2);case"yyyy":return t?s({year:"numeric"},"year"):this.num(r.year,4);case"yyyyyy":return t?s({year:"numeric"},"year"):this.num(r.year,6);case"G":return c("short");case"GG":return c("long");case"GGGGG":return c("narrow");case"kk":return this.num(r.weekYear.toString().slice(-2),2);case"kkkk":return this.num(r.weekYear,4);case"W":return this.num(r.weekNumber);case"WW":return this.num(r.weekNumber,2);case"o":return this.num(r.ordinal);case"ooo":return this.num(r.ordinal,3);case"q":return this.num(r.quarter);case"qq":return this.num(r.quarter,2);case"X":return this.num(Math.floor(r.ts/1e3));case"x":return this.num(r.ts);default:return l(e)}})}formatDurationFromString(e,t){const r=e=>{switch(e[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"M":return"month";case"y":return"year";default:return null}},n=pe.parseFormat(t),s=n.reduce((e,{literal:t,val:r})=>t?e:e.concat(r),[]),i=e.shiftTo(...s.map(r).filter(e=>e));return we(n,(a=i,e=>{var t=r(e);return t?this.num(a.get(t),e.length):e}));var a}}class Te{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?this.reason+": "+this.explanation:this.reason}}class Se{get type(){throw new a}get name(){throw new a}get isUniversal(){throw new a}offsetName(e,t){throw new a}formatOffset(e,t){throw new a}offset(e){throw new a}equals(e){throw new a}get isValid(){throw new a}}let Oe=null;class be extends Se{static get instance(){return null===Oe&&(Oe=new be),Oe}get type(){return"system"}get name(){return(new Intl.DateTimeFormat).resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:r}){return Q(e,t,r)}formatOffset(e,t){return te(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return"system"===e.type}get isValid(){return!0}}const ke=RegExp(`^${ne.source}$`);let Me={};const Ne={year:0,month:1,day:2,hour:3,minute:4,second:5};let De={};class Ee extends Se{static create(e){return De[e]||(De[e]=new Ee(e)),De[e]}static resetCache(){De={},Me={}}static isValidSpecifier(e){return!(!e||!e.match(ke))}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch(e){return!1}}constructor(e){super(),this.zoneName=e,this.valid=Ee.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:t,locale:r}){return Q(e,t,r,this.name)}formatOffset(e,t){return te(this.offset(e),t)}offset(e){var t=new Date(e);if(isNaN(t))return NaN;var r=(o=this.name,Me[o]||(Me[o]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:o,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),Me[o]),[n,s,i,a,e,o]=(r.formatToParts?function(e,t){const r=e.formatToParts(t),n=[];for(let e=0;eDate.now(),Le="system",Ze=null,ze=null,qe=null,Ae;class je{static get now(){return Fe}static set now(e){Fe=e}static set defaultZone(e){Le=e}static get defaultZone(){return Ce(Le,be.instance)}static get defaultLocale(){return Ze}static set defaultLocale(e){Ze=e}static get defaultNumberingSystem(){return ze}static set defaultNumberingSystem(e){ze=e}static get defaultOutputCalendar(){return qe}static set defaultOutputCalendar(e){qe=e}static get throwOnInvalid(){return Ae}static set throwOnInvalid(e){Ae=e}static resetCaches(){Be.resetCache(),Ee.resetCache()}}let _e={};let Ue={};function $e(e,t={}){var r=JSON.stringify([e,t]);let n=Ue[r];return n||(n=new Intl.DateTimeFormat(e,t),Ue[r]=n),n}let He={};let We={};let Re=null;function Je(e,t,r,n,s){r=e.listingMode(r);return"error"===r?null:("en"===r?n:s)(t)}class Pe{constructor(e,t,r){this.padTo=r.padTo||0,this.floor=r.floor||!1;const{padTo:n,floor:s,...i}=r;if(!t||0{const t=n?{month:r,day:"numeric"}:{month:r},e=n?"format":"standalone";return this.monthsCache[e][r]||(this.monthsCache[e][r]=function(t){const r=[];for(let e=1;e<=12;e++){var n=Jr.utc(2016,e,1);r.push(t(n))}return r}(e=>this.extract(e,t,"month"))),this.monthsCache[e][r]})}weekdays(r,n=!1,e=!0){return Je(this,r,e,he,()=>{const t=n?{weekday:r,year:"numeric",month:"long",day:"numeric"}:{weekday:r},e=n?"format":"standalone";return this.weekdaysCache[e][r]||(this.weekdaysCache[e][r]=function(t){const r=[];for(let e=1;e<=7;e++){var n=Jr.utc(2016,11,13+e);r.push(t(n))}return r}(e=>this.extract(e,t,"weekday"))),this.weekdaysCache[e][r]})}meridiems(e=!0){return Je(this,void 0,e,()=>de,()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[Jr.utc(2016,11,13,9),Jr.utc(2016,11,13,19)].map(e=>this.extract(e,t,"dayperiod"))}return this.meridiemCache})}eras(e,t=!0){return Je(this,e,t,ge,()=>{const t={era:e};return this.eraCache[e]||(this.eraCache[e]=[Jr.utc(-40,1,1),Jr.utc(2017,1,1)].map(e=>this.extract(e,t,"era"))),this.eraCache[e]})}extract(e,t,r){const n=this.dtFormatter(e,t),s=n.formatToParts(),i=s.find(e=>e.type.toLowerCase()===r);return i?i.value:null}numberFormatter(e={}){return new Pe(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new Ye(e,this.intl,t)}relFormatter(e={}){return new Ge(this.intl,this.isEnglish(),e)}listFormatter(e={}){return function(e,t={}){var r=JSON.stringify([e,t]);let n=_e[r];return n||(n=new Intl.ListFormat(e,t),_e[r]=n),n}(this.intl,e)}isEnglish(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}}function Qe(...e){e=e.reduce((e,t)=>e+t.source,"");return RegExp(`^${e}$`)}function Ke(...e){return i=>e.reduce(([e,t,r],n)=>{var[s,n,r]=n(i,r);return[{...e,...s},t||n,r]},[{},null,1]).slice(0,2)}function Xe(e,...t){if(null==e)return[null,null];for(var[r,n]of t){r=r.exec(e);if(r)return n(r)}return[null,null]}function et(...s){return(e,t)=>{const r={};let n;for(n=0;nvoid 0!==e&&(t||e&&c)?-e:e;return[{years:t($(r)),months:t($(n)),weeks:t($(s)),days:t($(i)),hours:t($(a)),minutes:t($(o)),seconds:t($(u),"-0"===u),milliseconds:t(H(l),e)}]}const dt={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function mt(e,t,r,n,s,i,a){const o={year:2===t.length?B(U(t)):U(t),month:ie.indexOf(r)+1,day:U(n),hour:U(s),minute:U(i)};return a&&(o.second=U(a)),e&&(o.weekday=3{var t=this.values[e];return F(t)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...r,unit:e.slice(0,-1)}).format(t)}).filter(e=>e);return this.loc.listFormatter({type:"conjunction",style:r.listStyle||"narrow",...r}).format(e)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return 0!==this.years&&(e+=this.years+"Y"),0===this.months&&0===this.quarters||(e+=this.months+3*this.quarters+"M"),0!==this.weeks&&(e+=this.weeks+"W"),0!==this.days&&(e+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(e+="T"),0!==this.hours&&(e+=this.hours+"H"),0!==this.minutes&&(e+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(e+=W(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===e&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;var t=this.toMillis();if(t<0||864e5<=t)return null;e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e};const r=this.shiftTo("hours","minutes","seconds","milliseconds");let n="basic"===e.format?"hhmm":"hh:mm";e.suppressSeconds&&0===r.seconds&&0===r.milliseconds||(n+="basic"===e.format?"ss":":ss",e.suppressMilliseconds&&0===r.milliseconds||(n+=".SSS"));let s=r.toFormat(n);return e.includePrefix&&(s="T"+s),s}toJSON(){return this.toISO()}toString(){return this.toISO()}toMillis(){return this.as("milliseconds")}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const t=Ht.fromDurationLike(e),r={};for(const n of jt)(A(t.values,n)||A(this.values,n))&&(r[n]=t.get(n)+this.get(n));return Ut(this,{values:r},!0)}minus(e){if(!this.isValid)return this;const t=Ht.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;const t={};for(const r of Object.keys(this.values))t[r]=X(e(this.values[r],r));return Ut(this,{values:t},!0)}get(e){return this[Ht.normalizeUnit(e)]}set(e){return this.isValid?Ut(this,{values:{...this.values,...ee(e,Ht.normalizeUnit)}}):this}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:r}={}){const n=this.loc.clone({locale:e,numberingSystem:t}),s={loc:n};return r&&(s.conversionAccuracy=r),Ut(this,s)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;var r,n,e=this.toObject();return r=this.matrix,n=e,_t.reduce((e,t)=>F(n[t])?e:(e&&$t(r,n,e,n,t),t),null),Ut(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(0===e.length)return this;e=e.map(e=>Ht.normalizeUnit(e));const t={},r={},n=this.toObject();let s;for(const a of jt)if(0<=e.indexOf(a)){s=a;let e=0;for(const o in r)e+=this.matrix[o][a]*r[o],r[o]=0;L(n[a])&&(e+=n[a]);var i=Math.trunc(e);t[a]=i,r[a]=(1e3*e-1e3*i)/1e3;for(const u in n)jt.indexOf(u)>jt.indexOf(a)&&$t(this.matrix,n,u,t,a)}else L(n[a])&&(r[a]=n[a]);for(const l in r)0!==r[l]&&(t[s]+=l===s?r[l]:r[l]/this.matrix[s][l]);return Ut(this,{values:t},!0).normalize()}negate(){if(!this.isValid)return this;const e={};for(const t of Object.keys(this.values))e[t]=-this.values[t];return Ut(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 null===this.invalid}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)return!1;if(!this.loc.equals(e.loc))return!1;for(const n of jt)if(t=this.values[n],r=e.values[n],!(void 0===t||0===t?void 0===r||0===r:t===r))return!1;var t,r;return!0}}const Wt="Invalid Interval";class Rt{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 o("need to specify a reason the Interval is invalid");t=e instanceof Te?e:new Te(e,t);if(je.throwOnInvalid)throw new n(t);return new Rt({invalid:t})}static fromDateTimes(e,t){var r=Pr(e),n=Pr(t),e=(e=n,(t=r)&&t.isValid?e&&e.isValid?ee}isBefore(e){return!!this.isValid&&this.e<=e}contains(e){return!!this.isValid&&(this.s<=e&&this.e>e)}set({start:e,end:t}={}){return this.isValid?Rt.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(Pr).filter(e=>this.contains(e)).sort(),r=[];let n=this["s"],s=0;for(;n+this.e?this.e:i;r.push(Rt.fromDateTimes(n,i)),n=i,s+=1}return r}splitBy(e){const t=Ht.fromDurationLike(e);if(!this.isValid||!t.isValid||0===t.as("milliseconds"))return[];let r=this["s"],n=1,s;const i=[];for(;re*n));s=+a>+this.e?this.e:a,i.push(Rt.fromDateTimes(r,s)),r=s,n+=1}return i}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s=e.e)}equals(e){return!(!this.isValid||!e.isValid)&&(this.s.equals(e.s)&&this.e.equals(e.e))}intersection(e){if(!this.isValid)return this;var t=(this.s>e.s?this:e).s,e=(this.ee.e?this:e).e;return Rt.fromDateTimes(t,e)}static merge(e){const[t,r]=e.sort((e,t)=>e.s-t.s).reduce(([e,t],r)=>t?t.overlaps(r)||t.abutsStart(r)?[e,t.union(r)]:[e.concat([t]),r]:[e,r],[[],null]);return r&&t.push(r),t}static xor(e){let t=null,r=0;const n=[],s=e.map(e=>[{time:e.s,type:"s"},{time:e.e,type:"e"}]),i=Array.prototype.concat(...s),a=i.sort((e,t)=>e.time-t.time);for(const o of a)r+="s"===o.type?1:-1,t=1===r?o.time:(t&&+t!=+o.time&&n.push(Rt.fromDateTimes(t,o.time)),null);return Rt.merge(n)}difference(...e){return Rt.xor([this].concat(e)).map(e=>this.intersection(e)).filter(e=>e&&!e.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Wt}toISO(e){return this.isValid?this.s.toISO(e)+"/"+this.e.toISO(e):Wt}toISODate(){return this.isValid?this.s.toISODate()+"/"+this.e.toISODate():Wt}toISOTime(e){return this.isValid?this.s.toISOTime(e)+"/"+this.e.toISOTime(e):Wt}toFormat(e,{separator:t=" – "}={}){return this.isValid?""+this.s.toFormat(e)+t+this.e.toFormat(e):Wt}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):Ht.invalid(this.invalidReason)}mapEndpoints(e){return Rt.fromDateTimes(e(this.s),e(this.e))}}class Jt{static hasDST(e=je.defaultZone){const t=Jr.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return Ee.isValidSpecifier(e)&&Ee.isValidZone(e)}static normalizeZone(e){return Ce(e,je.defaultZone)}static months(e="long",{locale:t=null,numberingSystem:r=null,locObj:n=null,outputCalendar:s="gregory"}={}){return(n||Be.create(t,r,s)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:r=null,locObj:n=null,outputCalendar:s="gregory"}={}){return(n||Be.create(t,r,s)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:r=null,locObj:n=null}={}){return(n||Be.create(t,r,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:r=null,locObj:n=null}={}){return(n||Be.create(t,r,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return Be.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return Be.create(t,null,"gregory").eras(e)}static features(){return{relative:z()}}}function Pt(e,t){var r=e=>e.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),e=r(t)-r(e);return Math.floor(Ht.fromMillis(e).as("days"))}function Yt(e,t,r,n){let[s,i,a,o]=function(t,r,e){var n,s;const i={};let a,o;for([n,s]of[["years",(e,t)=>t.year-e.year],["quarters",(e,t)=>t.quarter-e.quarter],["months",(e,t)=>t.month-e.month+12*(t.year-e.year)],["weeks",(e,t)=>{t=Pt(e,t);return(t-t%7)/7}],["days",Pt]])if(0<=e.indexOf(n)){a=n;let e=s(t,r);o=t.plus({[n]:e}),o>r?(t=t.plus({[n]:e-1}),--e):t=o,i[n]=e}return[t,i,o,a]}(e,t,r);e=t-s,r=r.filter(e=>0<=["hours","minutes","seconds","milliseconds"].indexOf(e));0===r.length&&(ae){return{regex:e,deser:([e])=>t(function(t){let r=parseInt(t,10);if(isNaN(r)){r="";for(let e=0;ee.findIndex(e=>sr(t)===sr(e))+r}}function ar(e,t){return{regex:e,deser:([,e,t])=>K(e,t),groups:t}}function or(e){return{regex:e,deser:([e])=>e}}const ur={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"}};let lr=null;function cr(e,t){if(e.literal)return e;const r=pe.macroTokenToFormatOpts(e.val);if(!r)return e;const n=pe.create(t,r),s=n.formatDateTimeParts((lr=lr||Jr.fromMillis(1555555555555),lr)),i=s.map(e=>function(e,t){var{type:r,value:e}=e;if("literal"===r)return{literal:!0,val:e};t=t[r];let n=ur[r];return"object"==typeof n&&(n=n[t]),n?{literal:!1,val:n}:void 0}(e,r));return i.includes(void 0)?e:i}function hr(t,e,r){const n=(c=pe.parseFormat(r),a=t,Array.prototype.concat(...c.map(e=>cr(e,a)))),s=n.map(e=>function(t,r){const n=Kt(r),s=Kt(r,"{2}"),i=Kt(r,"{3}"),a=Kt(r,"{4}"),o=Kt(r,"{6}"),u=Kt(r,"{1,2}"),l=Kt(r,"{1,3}"),c=Kt(r,"{1,6}"),h=Kt(r,"{1,9}"),d=Kt(r,"{2,4}"),m=Kt(r,"{4,6}"),f=e=>({regex:RegExp(e.val.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")),deser:([e])=>e,literal:!0}),e=(e=>{if(t.literal)return f(e);switch(e.val){case"G":return ir(r.eras("short",!1),0);case"GG":return ir(r.eras("long",!1),0);case"y":return er(c);case"yy":return er(d,B);case"yyyy":return er(a);case"yyyyy":return er(m);case"yyyyyy":return er(o);case"M":return er(u);case"MM":return er(s);case"MMM":return ir(r.months("short",!0,!1),1);case"MMMM":return ir(r.months("long",!0,!1),1);case"L":return er(u);case"LL":return er(s);case"LLL":return ir(r.months("short",!1,!1),1);case"LLLL":return ir(r.months("long",!1,!1),1);case"d":return er(u);case"dd":return er(s);case"o":return er(l);case"ooo":return er(i);case"HH":return er(s);case"H":return er(u);case"hh":return er(s);case"h":return er(u);case"mm":return er(s);case"m":case"q":return er(u);case"qq":return er(s);case"s":return er(u);case"ss":return er(s);case"S":return er(l);case"SSS":return er(i);case"u":return or(h);case"uu":return or(u);case"uuu":return er(n);case"a":return ir(r.meridiems(),0);case"kkkk":return er(a);case"kk":return er(d,B);case"W":return er(u);case"WW":return er(s);case"E":case"c":return er(n);case"EEE":return ir(r.weekdays("short",!1,!1),1);case"EEEE":return ir(r.weekdays("long",!1,!1),1);case"ccc":return ir(r.weekdays("short",!0,!1),1);case"cccc":return ir(r.weekdays("long",!0,!1),1);case"Z":case"ZZ":return ar(new RegExp(`([+-]${u.source})(?::(${s.source}))?`),2);case"ZZZ":return ar(new RegExp(`([+-]${u.source})(${s.source})?`),2);case"z":return or(/[a-z_+-/]{1,256}?/i);default:return f(e)}})(t)||{invalidReason:Xt};return e.token=t,e}(e,t)),i=s.find(e=>e.invalidReason);var a;if(i)return{input:e,tokens:n,invalidReason:i.invalidReason};var[o,u]=[`^${(h=s).map(e=>e.regex).reduce((e,t)=>`${e}(${t.source})`,"")}$`,h],l=RegExp(o,"i"),[r,c]=function(e,t,r){const n=e.match(t);if(n){const s={};let e=1;for(const i in r)if(A(r,i)){const a=r[i],o=a.groups?a.groups+1:1;!a.literal&&a.token&&(s[a.token.val[0]]=a.deser(n.slice(e,e+o))),e+=o}return[n,s]}return[n,{}]}(e,l,u),[h,o,u]=c?function(n){let e=null,t;return F(n.z)||(e=Ee.create(n.z)),F(n.Z)||(e=e||new Ie(n.Z),t=n.Z),F(n.q)||(n.M=3*(n.q-1)+1),F(n.h)||(n.h<12&&1===n.a?n.h+=12:12===n.h&&0===n.a&&(n.h=0)),0===n.G&&n.y&&(n.y=-n.y),F(n.u)||(n.S=H(n.u)),[Object.keys(n).reduce((e,t)=>{var r=(e=>{switch(e){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}})(t);return r&&(e[r]=n[t]),e},{}),e,t]}(c):[null,null,void 0];if(A(c,"a")&&A(c,"H"))throw new N("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:n,regex:l,rawMatches:r,matches:c,result:h,zone:o,specificOffset:u}}const dr=[0,31,59,90,120,151,181,212,243,273,304,334],mr=[0,31,60,91,121,152,182,213,244,274,305,335];function fr(e,t){return new Te("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function yr(e,t,r){r=new Date(Date.UTC(e,t-1,r)).getUTCDay();return 0===r?7:r}function gr(e,t,r){return r+(R(e)?mr:dr)[t-1]}function wr(e,t){const r=R(e)?mr:dr,n=r.findIndex(e=>eG(t)?(a=t+1,i=1):a=t,{weekYear:a,weekNumber:i,weekday:n,...re(e)}}function pr(e){var{weekYear:t,weekNumber:r,weekday:n}=e,s=yr(t,1,4),i=J(t);let a=7*r+n-s-3,o;a<1?(o=t-1,a+=J(o)):a>i?(o=t+1,a-=J(t)):o=t;var{month:i,day:t}=wr(o,a);return{year:o,month:i,day:t,...re(e)}}function Tr(e){var{year:t,month:r,day:n}=e;return{year:t,ordinal:gr(t,r,n),...re(e)}}function Sr(e){var{year:t,ordinal:r}=e,{month:n,day:r}=wr(t,r);return{year:t,month:n,day:r,...re(e)}}function Or(e){var t=Z(e.year),r=j(e.month,1,12),n=j(e.day,1,P(e.year,e.month));return t?r?!n&&fr("day",e.day):fr("month",e.month):fr("year",e.year)}function br(e){var{hour:t,minute:r,second:n,millisecond:s}=e,i=j(t,0,23)||24===t&&0===r&&0===n&&0===s,a=j(r,0,59),o=j(n,0,59),e=j(s,0,999);return i?a?o?!e&&fr("millisecond",s):fr("second",n):fr("minute",r):fr("hour",t)}const kr="Invalid DateTime";function Mr(e){return new Te("unsupported zone",`the zone "${e.name}" is not supported`)}function Nr(e){return null===e.weekData&&(e.weekData=vr(e.c)),e.weekData}function Dr(e,t){e={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new Jr({...e,...t,old:e})}function Er(e,t,r){let n=e-60*t*1e3;var s=r.offset(n);if(t===s)return[n,t];n-=60*(s-t)*1e3;r=r.offset(n);return s===r?[n,s]:[e-60*Math.min(s,r)*1e3,Math.max(s,r)]}function Vr(e,t){e+=60*t*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 Ir(e,t,r){return Er(Y(e),t,r)}function xr(e,t){var r=e.o,n=e.c.year+Math.trunc(t.years),s=e.c.month+Math.trunc(t.months)+3*Math.trunc(t.quarters),s={...e.c,year:n,month:s,day:Math.min(e.c.day,P(n,s))+Math.trunc(t.days)+7*Math.trunc(t.weeks)},t=Ht.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds");let[i,a]=Er(Y(s),r,e.zone);return 0!==t&&(i+=t,a=e.zone.offset(i)),{ts:i,o:a}}function Cr(e,t,r,n,s,i){var{setZone:a,zone:o}=r;if(e&&0!==Object.keys(e).length){const u=t||o,l=Jr.fromObject(e,{...r,zone:u,specificOffset:i});return a?l:l.setZone(o)}return Jr.invalid(new Te("unparsable",`the input "${s}" can't be parsed as `+n))}function Fr(e,t,r=!0){return e.isValid?pe.create(Be.create("en-US"),{allowZ:r,forceSimple:!0}).formatDateTimeFromString(e,t):null}function Lr(e,t){var r=9999{e=W(e,i||s.calendary?0:2,!0);const r=n.loc.clone(s).relFormatter(s);return r.format(e,t)},r=e=>s.calendary?n.hasSame(t,e)?0:n.startOf(e).diff(t.startOf(e),e).get(e):n.diff(t,e).get(e);if(s.unit)return e(r(s.unit),s.unit);for(const o of s.units){var a=r(o);if(1<=Math.abs(a))return e(a,o)}return e(nthis.set({month:1}).offset||this.offset>this.set({month:5}).offset)}get isInLeapYear(){return R(this.year)}get daysInMonth(){return P(this.year,this.month)}get daysInYear(){return this.isValid?J(this.year):NaN}get weeksInWeekYear(){return this.isValid?G(this.weekYear):NaN}resolvedLocaleOptions(e={}){var{locale:t,numberingSystem:r,calendar:e}=pe.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:r,outputCalendar:e}}toUTC(e=0,t={}){return this.setZone(Ie.instance(e),t)}toLocal(){return this.setZone(je.defaultZone)}setZone(t,{keepLocalTime:r=!1,keepCalendarTime:n=!1}={}){if((t=Ce(t,je.defaultZone)).equals(this.zone))return this;if(t.isValid){let e=this.ts;return(r||n)&&(r=t.offset(this.ts),n=this.toObject(),[e]=Ir(n,r,t)),Dr(this,{ts:e,zone:t})}return Jr.invalid(Mr(t))}reconfigure({locale:e,numberingSystem:t,outputCalendar:r}={}){r=this.loc.clone({locale:e,numberingSystem:t,outputCalendar:r});return Dr(this,{loc:r})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;var t=ee(e,$r),r=!F(t.weekYear)||!F(t.weekNumber)||!F(t.weekday),n=!F(t.ordinal),s=!F(t.year),i=!F(t.month)||!F(t.day),e=t.weekYear||t.weekNumber;if((s||i||n)&&e)throw new N("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(i&&n)throw new N("Can't mix ordinal dates with month/day");let a;r?a=pr({...vr(this.c),...t}):F(t.ordinal)?(a={...this.toObject(),...t},F(t.day)&&(a.day=Math.min(P(a.year,a.month),a.day))):a=Sr({...Tr(this.c),...t});var[r,t]=Ir(a,this.o,this.zone);return Dr(this,{ts:r,o:t})}plus(e){return this.isValid?Dr(this,xr(this,Ht.fromDurationLike(e))):this}minus(e){return this.isValid?Dr(this,xr(this,Ht.fromDurationLike(e).negate())):this}startOf(e){if(!this.isValid)return this;const t={},r=Ht.normalizeUnit(e);switch(r){case"years":t.month=1;case"quarters":case"months":t.day=1;case"weeks":case"days":t.hour=0;case"hours":t.minute=0;case"minutes":t.second=0;case"seconds":t.millisecond=0}return"weeks"===r&&(t.weekday=1),"quarters"===r&&(e=Math.ceil(this.month/3),t.month=3*(e-1)+1),this.set(t)}endOf(e){return this.isValid?this.plus({[e]:1}).startOf(e).minus(1):this}toFormat(e,t={}){return this.isValid?pe.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):kr}toLocaleString(e=c,t={}){return this.isValid?pe.create(this.loc.clone(t),e).formatDateTime(this):kr}toLocaleParts(e={}){return this.isValid?pe.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:t=!1,suppressMilliseconds:r=!1,includeOffset:n=!0}={}){if(!this.isValid)return null;var s="extended"===e,e=Lr(this,s);return e+="T",e+=Zr(this,s,t,r,n)}toISODate({format:e="extended"}={}){return this.isValid?Lr(this,"extended"===e):null}toISOWeekDate(){return Fr(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:r=!0,includePrefix:n=!1,format:s="extended"}={}){return this.isValid?(n?"T":"")+Zr(this,"extended"===s,t,e,r):null}toRFC2822(){return Fr(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Fr(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?Lr(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1}={}){let r="HH:mm:ss.SSS";return(t||e)&&(r+=" ",t?r+="z":e&&(r+="ZZ")),Fr(this,r,!0)}toSQL(e={}){return this.isValid?this.toSQLDate()+" "+this.toSQLTime(e):null}toString(){return this.isValid?this.toISO():kr}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?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",r={}){if(!this.isValid||!e.isValid)return Ht.invalid("created by diffing an invalid DateTime");r={locale:this.locale,numberingSystem:this.numberingSystem,...r};const n=(t=t,(Array.isArray(t)?t:[t]).map(Ht.normalizeUnit)),s=e.valueOf()>this.valueOf(),i=s?this:e,a=s?e:this,o=Yt(i,a,n,r);return s?o.negate():o}diffNow(e="milliseconds",t={}){return this.diff(Jr.now(),e,t)}until(e){return this.isValid?Rt.fromDateTimes(this,e):this}hasSame(e,t){if(!this.isValid)return!1;var r=e.valueOf();const n=this.setZone(e.zone,{keepLocalTime:!0});return n.startOf(t)<=r&&r<=n.endOf(t)}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;var t=e.base||Jr.fromObject({},{zone:this.zone}),r=e.padding?thise.valueOf(),Math.min)}static max(...e){if(!e.every(Jr.isDateTime))throw new o("max requires all arguments be DateTimes");return q(e,e=>e.valueOf(),Math.max)}static fromFormatExplain(e,t,r={}){var{locale:n=null,numberingSystem:r=null}=r;return hr(Be.fromOpts({locale:n,numberingSystem:r,defaultToEN:!0}),e,t)}static fromStringExplain(e,t,r={}){return Jr.fromFormatExplain(e,t,r)}static get DATE_SHORT(){return c}static get DATE_MED(){return h}static get DATE_MED_WITH_WEEKDAY(){return d}static get DATE_FULL(){return m}static get DATE_HUGE(){return f}static get TIME_SIMPLE(){return y}static get TIME_WITH_SECONDS(){return g}static get TIME_WITH_SHORT_OFFSET(){return w}static get TIME_WITH_LONG_OFFSET(){return v}static get TIME_24_SIMPLE(){return p}static get TIME_24_WITH_SECONDS(){return T}static get TIME_24_WITH_SHORT_OFFSET(){return S}static get TIME_24_WITH_LONG_OFFSET(){return O}static get DATETIME_SHORT(){return b}static get DATETIME_SHORT_WITH_SECONDS(){return k}static get DATETIME_MED(){return M}static get DATETIME_MED_WITH_SECONDS(){return D}static get DATETIME_MED_WITH_WEEKDAY(){return E}static get DATETIME_FULL(){return V}static get DATETIME_FULL_WITH_SECONDS(){return I}static get DATETIME_HUGE(){return x}static get DATETIME_HUGE_WITH_SECONDS(){return C}}function Pr(e){if(Jr.isDateTime(e))return e;if(e&&e.valueOf&&L(e.valueOf()))return Jr.fromJSDate(e);if(e&&"object"==typeof e)return Jr.fromObject(e);throw new o(`Unknown datetime argument: ${e}, of type `+typeof e)}tt="2.3.0";export{Jr as DateTime,Ht as Duration,Ie as FixedOffsetZone,Ee as IANAZone,Jt as Info,Rt as Interval,xe as InvalidZone,je as Settings,be as SystemZone,tt as VERSION,Se as Zone};