UNPKG

n8n-editor-ui

Version:

Workflow Editor UI for n8n

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