@fr0st/datetime 6.0.1 → 7.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1,2 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).DateTime=t()}(this,(function(){"use strict";const e={};function t(t,n){return t in e||(e[t]=n()),e[t]}function n(e){return t(`dateFormatter.${e}`,(t=>r("en",{timeZone:e,hourCycle:"h23",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric"})))}function r(e,t){return new Intl.DateTimeFormat(e,{timeZone:"UTC",...t})}const i=(new Intl.DateTimeFormat).resolvedOptions(),s={clampDates:!0,defaultLocale:i.locale,defaultTimeZone:i.timeZone},o=/\s(?:UTC|GMT|Z|[\+\-]\d)|\d{4}\-\d{2}\-\d{2}T\d{2}\:\d{2}\:\d{2}\.\d{3}[\+\-]\d{2}\:\d{2}/i,u="eee MMM dd yyyy",a="yyyy-MM-dd'T'HH:mm:ss.SSSxxx",f="eee MMM dd yyyy HH:mm:ss xx (VV)",c="HH:mm:ss xx (VV)",h=/([a-z])\1*|'[^']*'/i,l=[31,28,31,30,31,30,31,31,30,31,30,31],d=/(?:GMT)?([\+\-])(\d{2})(\:?)(\d{2})?/,g=[["year","weekYear"],["era"],["quarter","month","week","dayOfYear"],["weekOfMonth"],["date","weekDay"],["weekDayInMonth"],["hours24","hours12","dayPeriod"],["minutes","seconds","milliseconds"]],m={year:"diffInYears",month:"diffInMonths",week:"diffInWeeks",day:"diffInDays",hour:"diffInHours",minute:"diffInMinutes",second:"diffInSeconds"},y={month:12,week:null,day:7,hour:24,minute:60,second:60};function D(e,t,n,r=!0){switch(t=t.setTimeZone(e.getTimeZone()),n){case"year":return k(e,t.setYear(e.getYear()),e.getYear()-t.getYear(),!r,-1);case"month":return k(e,t.setYear(e.getYear(),e.getMonth()),12*(e.getYear()-t.getYear())+e.getMonth()-t.getMonth(),!r,-1);case"week":return k(e,t.setWeekYear(e.getWeekYear(),e.getWeek()),(e-t)/6048e5,r);case"day":return k(e,t.setYear(e.getYear(),e.getMonth(),e.getDate()),(e-t)/864e5,r);case"hour":return k(e,t.setYear(e.getYear(),e.getMonth(),e.getDate()).setHours(e.getHours()),(e-t)/36e5,r);case"minute":return k(e,t.setYear(e.getYear(),e.getMonth(),e.getDate()).setHours(e.getHours(),e.getMinutes()),(e-t)/6e4,r);case"second":return k(e,t.setYear(e.getYear(),e.getMonth(),e.getDate()).setHours(e.getHours(),e.getMinutes(),e.getSeconds()),(e-t)/1e3,r);default:throw new Error("Invalid time unit supplied")}}function k(e,t,n,r=!0,i=1){return n>0?(n=Math.floor(n),r&&e<t&&(n+=i)):n<0&&(n=Math.ceil(n),r&&e>t&&(n-=i)),n}function M(e){const t=e.getTimeZone();if("UTC"===t)return 0;const r=n("UTC").format(e),i=n(t).format(e);return(new Date(r)-new Date(i))/6e4}function T(e){return e.getTime()-6e4*e.getTimeZoneOffset()}function p(e,t){let n=0;for(const r of e){if(r!==t[n])throw new Error(`Unmatched character in DateTime string: ${r}`);n++}}function w(e,t){const n=e.getTimeZoneOffset(),r=t+6e4*n,i=e.setTime(r),s=i.getTimeZoneOffset();return n===s?i:i.setTime(r-6e4*(n-s))}function I(e,n="long"){return t(`periods.${e}.${n}`,(t=>{const n=r(e,{hour:"numeric",hourCycle:"h11"});return new Array(2).fill().map(((e,t)=>n.formatToParts(Date.UTC(2018,0,1,12*t)).find((e=>"dayPeriod"===e.type)).value))}))}function Y(e,n="long",i=!0){return t(`days.${e}.${n}.${i}`,(t=>{if(i){const t=r(e,{weekday:n});return new Array(7).fill().map(((e,n)=>t.format(Date.UTC(2018,0,n))))}const s=r(e,{year:"numeric",month:"numeric",day:"numeric",weekday:n});return new Array(7).fill().map(((e,t)=>s.formatToParts(Date.UTC(2018,0,t)).find((e=>"weekday"===e.type)).value))}))}function O(e,n="long"){return t(`eras.${e}.${n}`,(t=>{const i=r(e,{era:n});return new Array(2).fill().map(((e,t)=>i.formatToParts(Date.UTC(t-1,0,1)).find((e=>"era"===e.type)).value))}))}function S(e,n="long",i=!0){return t(`months.${e}.${n}.${i}`,(t=>{if(i){const t=r(e,{month:n});return new Array(12).fill().map(((e,n)=>t.format(Date.UTC(2018,n,1))))}const s=r(e,{year:"numeric",month:n,day:"numeric"});return new Array(12).fill().map(((e,t)=>s.formatToParts(Date.UTC(2018,t,1)).find((e=>"month"===e.type)).value))}))}function Z(e){return t(`numbers.${e}`,(t=>{const n=r(e,{minute:"numeric"});return new Array(10).fill().map(((e,t)=>n.format(Date.UTC(2018,0,1,0,t))))}))}function W(e){return`(?:${Z(e).join("|")})+`}function L(e,t,n="long",r=!0){return Y(e,n,r)[t]}function H(e,t,n="long",r=!0){return S(e,n,r)[t-1]}function b(e,t,n=0){const r=Z(e);return`${t}`.padStart(n,0).replace(/\d/g,(e=>r[e]))}function x(e,t=!0,n=!1){const r=Math.abs(e/60|0),i=Math.abs(e%60),s=e>0?"-":"+",o=`${r}`.padStart(2,0),u=i||!n?`${i}`.padStart(2,0):"";return`${s}${o}${t&&u?":":""}${u}`}function C(e,n,r){const i=function(e){return"RelativeTimeFormat"in Intl?t(`relativeFormatter.${e}`,(t=>new Intl.RelativeTimeFormat(e,{numeric:"auto",style:"long"}))):null}(e);if(!i)throw new Error("RelativeTimeFormat not supported");return i.format(n,r)}class U{constructor(e=null,t={}){let n,r=!1;if(null===e)n=Date.now();else if(!isNaN(parseInt(e))&&isFinite(e))n=e;else{if(e!==`${e}`)throw new Error("Invalid date supplied");if(n=Date.parse(e),isNaN(n))throw new Error("Invalid date string supplied");e.match(o)||(n-=6e4*(new Date).getTimezoneOffset()),r=!0}this._date=new Date(n),this._dynamicTz=!1,this.isValid=!0;let i=t.timeZone;i||(i=s.defaultTimeZone),["Z","GMT"].includes(i)&&(i="UTC");const u=i.match(d);if(u?(this._offset=60*u[2]+parseInt(u[4]||0),this._offset&&"+"===u[1]&&(this._offset*=-1),this._offset?this._timeZone=x(this._offset):(this._dynamicTz=!0,this._timeZone="UTC")):(this._dynamicTz=!0,this._timeZone=i),this._dynamicTz&&(this._offset=M(this)),r&&this._offset){const e=this._offset;this._date.setTime(this.getTime()+6e4*this._offset),this._dynamicTz&&(this._offset=M(this),e!==this._offset&&this._date.setTime(this.getTime()-6e4*(e-offset)))}"locale"in t||(t.locale=s.defaultLocale),this._locale=t.locale}getLocale(){return this._locale}getTime(){return this._date.getTime()}getTimeZone(){return this._timeZone}getTimeZoneOffset(){return this._offset}setLocale(e){return new U(this.getTime(),{locale:e,timeZone:this._timeZone})}setTime(e){return new U(e,{locale:this._locale,timeZone:this._timeZone})}setTimeZone(e){return new U(this.getTime(),{locale:this._locale,timeZone:e})}setTimeZoneOffset(e){return new U(this.getTime(),{locale:this._locale,timeZone:x(e)})}valueOf(){return this.getTime()}[Symbol.toPrimitive](e){return"number"===e?this.valueOf():this.toString()}}const A={1:["af","am","ar-il","ar-sa","ar-ye","as","bn","bo","brx","ccp","ceb","chr","dav","dz","ebu","en","fil","gu","guz","haw","he","hi","id","ii","ja","jv","kam","ki","kln","km","kn","ko","kok","ks","lkt","lo","luo","luy","mas","mer","mgh","ml","mr","mt","my","nd","ne","om","or","pa","ps-pk","pt","qu","saq","sd","seh","sn","ta","te","th","ti","ug","ur","xh","yue","zh","zu"],7:["ar","ckb","en-ae","en-sd","fa","kab","lrc","mzn","ps"]},v={4:["ast","bg","br","ca","ce","cs","cy","da","de","dsb","el","en-at","en-be","en-ch","en-de","en-dk","en-fi","en-fj","en-gb","en-gg","en-gi","en-ie","en-im","en-je","en-nl","en-se","es","et","eu","fi","fo","fr","fur","fy","ga","gd","gl","gsw","gv","hsb","hu","is","it","ksh","kw","lb","lt","nb","nds","nl","nn","os-ru","pl","pt-ch","pt-lu","pt-pt","rm","ru","sah","se","sk","smn","sv","tt","wae"]};function $(e){switch(e){case 5:return"narrow";case 4:return"long";default:return"short"}}function _(e){return t(`minimumDays.${e}`,(t=>{let n=1;const r=e.toLowerCase().split("-");for(;1===n&&r.length;){for(const e in v)if({}.hasOwnProperty.call(v,e)&&v[e].includes(r.join("-"))){n=parseInt(e);break}r.pop()}return n}))}function B(e,n){return(7+parseInt(n)-function(e){return t(`weekStartOffset.${e}`,(t=>{let n;const r=e.toLowerCase().split("-");for(;!n&&r.length;){for(const e in A)if({}.hasOwnProperty.call(A,e)&&A[e].includes(r.join("-"))){n=parseInt(e);break}r.pop()}return n?n-2:0}))}(e))%7||7}function j(e,t,n="long",r=!0){return B(e,Y(e,n,r).indexOf(t)||7)}function z(e,t,n="long",r=!0){return S(e,n,r).indexOf(t)+1}function F(e,t){const n=Z(e);return parseInt(`${t}`.replace(/./g,(e=>n.indexOf(e))))}var G={G:{key:"era",maxLength:5,regex:(e,t)=>O(e,$(t)).join("|"),input:(e,t,n)=>function(e,t,n="long"){return O(e,n).indexOf(t)}(e,t,$(n)),output:(e,t)=>{const n=$(t);return e.era(n)}},y:{key:"year",regex:e=>W(e),input:(e,t,n)=>(t=F(e,t),2!==n||2!==`${t}`.length?t:t>40?1900+t:2e3+t),output:(e,t)=>{let n=e.getYear();return 2===t&&(n=`${n}`.slice(-2)),b(e.getLocale(),Math.abs(n),t)}},Y:{key:"weekYear",regex:e=>W(e),input:(e,t,n)=>(t=F(e,t),2!==n||2!==`${t}`.length?t:t>40?1900+t:2e3+t),output:(e,t)=>{let n=e.getWeekYear();return 2===t&&(n=`${n}`.slice(-2)),b(e.getLocale(),Math.abs(n),t)}},Q:{key:"quarter",regex:e=>W(e),input:(e,t)=>F(e,t),output:(e,t)=>b(e.getLocale(),e.getQuarter(),t)},q:{key:"quarter",regex:e=>W(e),input:(e,t)=>F(e,t),output:(e,t)=>b(e.getLocale(),e.getQuarter(),t)},M:{key:"month",regex:(e,t)=>{switch(t){case 5:case 4:case 3:return S(e,$(t),!1).join("|");default:return W(e)}},input:(e,t,n)=>{switch(n){case 5:return null;case 4:case 3:return z(e,t,$(n),!1);default:return F(e,t)}},output:(e,t)=>{const n=e.getLocale(),r=e.getMonth();switch(t){case 5:case 4:case 3:return H(n,r,$(t),!1);default:return b(n,r,t)}}},L:{key:"month",regex:(e,t)=>{switch(t){case 5:case 4:case 3:return S(e,$(t)).join("|");default:return W(e)}},input:(e,t,n)=>{switch(n){case 5:return null;case 4:case 3:return z(e,t,$(n));default:return F(e,t)}},output:(e,t)=>{const n=e.getLocale(),r=e.getMonth();switch(t){case 5:case 4:case 3:return H(n,r,$(t));default:return b(n,r,t)}}},w:{key:"week",regex:e=>W(e),input:(e,t)=>F(e,t),output:(e,t)=>b(e.getLocale(),e.getWeek(),t)},W:{key:"weekOfMonth",regex:e=>W(e),input:(e,t)=>F(e,t),output:e=>b(e.getLocale(),e.getWeekOfMonth())},d:{key:"date",regex:e=>W(e),input:(e,t)=>F(e,t),output:(e,t)=>b(e.getLocale(),e.getDate(),t)},D:{key:"dayOfYear",regex:e=>W(e),input:(e,t)=>F(e,t),output:(e,t)=>b(e.getLocale(),e.getDayOfYear(),t)},F:{key:"weekDayInMonth",regex:e=>W(e),input:(e,t)=>F(e,t),output:e=>b(e.getLocale(),e.getWeekDayInMonth())},E:{key:"weekDay",regex:(e,t)=>Y(e,$(t),!1).join("|"),input:(e,t,n)=>5===n?null:j(e,t,$(n),!1),output:(e,t)=>{const n=$(t);return L(e.getLocale(),e.getDay(),n,!1)}},e:{key:"weekDay",maxLength:5,regex:(e,t)=>{switch(t){case 5:case 4:case 3:return Y(e,$(t),!1).join("|");default:return W(e)}},input:(e,t,n)=>{switch(n){case 5:return null;case 4:case 3:return j(e,t,$(n),!1);default:return F(e,t)}},output:(e,t)=>{const n=e.getLocale();switch(t){case 5:case 4:case 3:const r=$(t);return L(n,e.getDay(),r,!1);default:return b(n,e.getWeekDay(),t)}}},c:{key:"weekDay",maxLength:5,regex:(e,t)=>{switch(t){case 5:case 4:case 3:return Y(e,$(t)).join("|");default:return W(e)}},input:(e,t,n)=>{switch(n){case 5:return null;case 4:case 3:return j(e,t,$(n));default:return F(e,t)}},output:(e,t)=>{const n=e.getLocale();switch(t){case 5:case 4:case 3:const r=$(t);return L(n,e.getDay(),r);default:return b(n,e.getWeekDay())}}},a:{key:"dayPeriod",regex:(e,t)=>I(e,$(t)).join("|"),input:(e,t,n)=>function(e,t,n="long"){return I(e,n).indexOf(t)}(e,t,$(n)),output:(e,t)=>{const n=$(t);return e.dayPeriod(n)}},h:{key:"hours12",regex:e=>W(e),input:(e,t)=>(12===(t=F(e,t))&&(t=0),t),output:(e,t)=>b(e.getLocale(),e.getHours()%12||12,t)},H:{key:"hours24",regex:e=>W(e),input:(e,t)=>F(e,t),output:(e,t)=>b(e.getLocale(),e.getHours(),t)},K:{key:"hours12",regex:e=>W(e),input:(e,t)=>F(e,t),output:(e,t)=>b(e.getLocale(),e.getHours()%12,t)},k:{key:"hours24",regex:e=>W(e),input:(e,t)=>(24===(t=F(e,t))&&(t=0),t),output:(e,t)=>b(e.getLocale(),e.getHours()||24,t)},m:{key:"minutes",regex:e=>W(e),input:(e,t)=>F(e,t),output:(e,t)=>b(e.getLocale(),e.getMinutes(),t)},s:{key:"seconds",regex:e=>W(e),input:(e,t)=>F(e,t),output:(e,t)=>b(e.getLocale(),e.getSeconds(),t)},S:{key:"milliseconds",regex:e=>W(e),input:e=>0,output:(e,t)=>b(e.getLocale(),`${Math.floor(1e3*e.getMilliseconds())}`.padEnd(t,"0").slice(0,t))},z:{output:(e,t)=>{5===t&&(t=1);const n=$(t);return e.timeZoneName(n)}},Z:{key:"timeZone",regex:(e,t)=>{switch(t){case 5:return"[\\+\\-]\\d{2}\\:\\d{2}|Z";case 4:return"GMT[\\+\\-]\\d{2}\\:\\d{2}|GMT";default:return"[\\+\\-]\\d{4}"}},input:(e,t)=>t,output:(e,t)=>{const n=e.getTimeZoneOffset();let r=!0,i="";switch(t){case 5:if(!n)return"Z";break;case 4:if(i="GMT",!n)return i;break;default:r=!1}return i+x(n,r)}},O:{key:"timeZone",regex:(e,t)=>4===t?"GMT[\\+\\-]\\d{2}\\:\\d{2}|GMT":"GMT[\\+\\-]\\d{2}|GMT",input:(e,t)=>t,output:(e,t)=>{const n=e.getTimeZoneOffset();if(!n)return"GMT";let r=!1;return 4===t||(r=!0),"GMT"+x(n,!0,r)}},V:{key:"timeZone",regex:e=>"([a-zA-Z_/]+)",input:(e,t)=>t,output:e=>e.getTimeZone()},X:{key:"timeZone",regex:(e,t)=>{switch(t){case 5:case 3:return"[\\+\\-]\\d{2}\\:\\d{2}|Z";case 4:case 2:return"[\\+\\-]\\d{4}|Z";default:return"[\\+\\-]\\d{2}(?:\\d{2})?|Z"}},input:(e,t)=>t,output:(e,t)=>{const n=e.getTimeZoneOffset();if(!n)return"Z";let r;switch(t){case 5:case 3:r=!0;break;default:r=!1}return x(n,r,1===t)}},x:{key:"timeZone",regex:(e,t)=>{switch(t){case 5:case 3:return"[\\+\\-]\\d{2}\\:\\d{2}";case 4:case 2:return"[\\+\\-]\\d{4}";default:return"[\\+\\-]\\d{2}(?:\\d{2})?"}},input:(e,t)=>t,output:(e,t)=>{let n;switch(t){case 5:case 3:n=!0;break;default:n=!1}return x(e.getTimeZoneOffset(),n,1===t)}}};function P(e,t,n){return new Array(t-1).fill().reduce(((t,n,r)=>t+E(e,r+1)),n)}function E(e,t){const n=new Date(Date.UTC(e,t-1));return t=n.getUTCMonth(),l[t]+(1==t&&N(n.getUTCFullYear())?1:0)}function Q(e){return N(e)?366:365}function N(e){return 29===new Date(e,1,29).getDate()}U.dayOfYear=P,U.daysInMonth=E,U.daysInYear=Q,U.fromArray=function(e,t={}){const n=e.slice(0,3),r=e.slice(3);return n.length<3&&n.push(...new Array(3-n.length).fill(1)),r.length<4&&r.push(...new Array(4-r.length).fill(0)),new U(null,t).setTimestamp(0).setYear(...n).setHours(...r)},U.fromDate=function(e,t={}){return new U(e.getTime(),t)},U.fromFormat=function(e,t,n={}){"locale"in n||(n.locale=s.defaultLocale);const r=[];let i;for(;e&&(i=e.match(h));){const s=i[1],o=i.index,u=i[0].length;if(o&&p(e.substring(0,o),t),e=e.substring(o+u),t=t.substring(o),!s){const e=i[0].slice(1,-1);p(e||"'",t),t=t.substring(e.length);continue}if(!(s in G))throw new Error(`Invalid token in DateTime format: ${s}`);const a=G[s].regex(n.locale,u),f=t.match(new RegExp(`^${a}`));if(!f)throw new Error(`Unmatched token in DateTime string: ${s}`);const c=f[0],h=G[s].input(n.locale,c,u);if(null!==h){const e=G[s].key;r.push({key:e,value:h,literal:c,token:s,length:u})}t=t.substring(c.length)}e&&p(e,t),"timeZone"in n||(n.timeZone=s.defaultTimeZone);let o=n.timeZone;for(const{key:e,value:t}of r)"timeZone"===e&&(o=t);let u=this.fromTimestamp(0,{locale:n.locale}).setYear(1).setTimeZone(o);const a=function(){let e=!1,t=!0;return{date:{get:e=>e.getDate(),set:(e,t)=>e.setDate(t)},dayPeriod:{get:e=>e.getHours()<12?0:1,set:(n,r)=>{e=r;let i=r?12:0;return t&&(i+=n.getHours()),n.setHours(i)}},dayOfYear:{get:e=>e.getDayOfYear(),set:(e,t)=>e.setDayOfYear(t)},era:{get:e=>e.getYear()<1?0:1,set:(e,t)=>{const n=t?1:-1;return e.setYear(e.getYear()*n)}},hours12:{get:e=>e.getHours()%12,set:(n,r)=>(e&&(r+=12),t=!0,n.setHours(r))},hours24:{get:e=>e.getHours(),set:(e,n)=>(t=!1,e.setHours(n))},milliseconds:{get:e=>e.getMilliseconds(),set:(e,t)=>e.setMilliseconds(t)},minutes:{get:e=>e.getMinutes(),set:(e,t)=>e.setMinutes(t)},month:{get:e=>e.getMonth(),set:(e,t)=>e.setMonth(t)},quarter:{get:e=>e.getQuarter(),set:(e,t)=>e.setQuarter(t)},seconds:{get:e=>e.getSeconds(),set:(e,t)=>e.setSeconds(t)},week:{get:e=>e.getWeek(),set:(e,t)=>e.setWeek(t)},weekDay:{get:e=>e.getWeekDay(),set:(e,t)=>e.setWeekDay(t)},weekDayInMonth:{get:e=>e.getWeekDayInMonth(),set:(e,t)=>e.setWeekDayInMonth(t)},weekOfMonth:{get:e=>e.getWeekOfMonth(),set:(e,t)=>e.setWeekOfMonth(t)},weekYear:{get:e=>e.getWeekYear(),set:(e,t)=>e.setWeekYear(t)},year:{get:e=>{const t=e.getYear();return Math.abs(t)},set:(e,t)=>e.setYear(t)}}}(),f=[];for(const e of g)for(const t of e)if("era"!==t||r.find((e=>"year"===e.key)))for(const e of r){const{key:n,value:r,literal:i,token:s,length:o}=e;if(n===t){if(5===o&&["M","L","E","e","c"].includes(s)){const e=s.repeat(o);if(u.format(e)===i)continue}u=a[n].set(u,r),f.push(e)}}let c=!0;for(const{key:e,value:t}of f)if(e in a&&a[e].get(u)!==t){c=!1;break}return n.timeZone!==o&&(u=u.setTimeZone(n.timeZone)),u.isValid=c,u},U.fromISOString=function(e,t={}){let n=this.fromFormat(a,e,{locale:"en"});return"timeZone"in t&&(n=n.setTimeZone(t.timeZone)),"locale"in t&&(n=n.setLocale(t.locale)),n},U.fromTimestamp=function(e,t={}){return new U(null,t).setTimestamp(e)},U.getDefaultLocale=function(){return s.defaultLocale},U.getDefaultTimeZone=function(){return s.defaultTimeZone},U.isLeapYear=N,U.now=function(e={}){return new U(null,e)},U.setDateClamping=function(e){s.clampDates=e},U.setDefaultLocale=function(e){s.defaultLocale=e},U.setDefaultTimeZone=function(e){s.defaultTimeZone=e};const q=U.prototype;return q.addDay=function(){return this.addDays(1)},q.addDays=function(e){return this.setDate(this.getDate()+e)},q.addHour=function(){return this.addHours(1)},q.addHours=function(e){return this.setTime(this.getTime()+36e5*e)},q.addMinute=function(){return this.addMinutes(1)},q.addMinutes=function(e){return this.setTime(this.getTime()+6e4*e)},q.addMonth=function(){return this.addMonths(1)},q.addMonths=function(e){return this.setMonth(this.getMonth()+e)},q.addSecond=function(){return this.addSeconds(1)},q.addSeconds=function(e){return this.setTime(this.getTime()+1e3*e)},q.addWeek=function(){return this.addWeeks(1)},q.addWeeks=function(e){return this.setDate(this.getDate()+7*e)},q.addYear=function(){return this.addYears(1)},q.addYears=function(e){return this.setYear(this.getYear()+e)},q.dayName=function(e="long"){return L(this.getLocale(),this.getDay(),e)},q.dayPeriod=function(e="long"){return function(e,t,n="long"){return I(e,n)[t]}(this.getLocale(),this.getHours()<12?0:1,e)},q.daysInMonth=function(){return E(this.getYear(),this.getMonth())},q.daysInYear=function(){return Q(this.getYear())},q.diff=function(e){return this-e},q.diffInDays=function(e,{relative:t=!0}={}){return D(this,e,"day",t)},q.diffInHours=function(e,{relative:t=!0}={}){return D(this,e,"hour",t)},q.diffInMinutes=function(e,{relative:t=!0}={}){return D(this,e,"minute",t)},q.diffInMonths=function(e,{relative:t=!0}={}){return D(this,e,"month",t)},q.diffInSeconds=function(e,{relative:t=!0}={}){return D(this,e,"second",t)},q.diffInWeeks=function(e,{relative:t=!0}={}){return D(this,e,"week",t)},q.diffInYears=function(e,{relative:t=!0}={}){return D(this,e,"year",t)},q.endOfDay=function(){return this.setHours(23,59,59,999)},q.endOfHour=function(){return this.setMinutes(59,59,999)},q.endOfMinute=function(){return this.setSeconds(59,999)},q.endOfMonth=function(){return this.setDate(this.daysInMonth()).endOfDay()},q.endOfQuarter=function(){const e=3*this.getQuarter();return this.setMonth(e,E(this.getYear(),e)).endOfDay()},q.endOfSecond=function(){return this.setMilliseconds(999)},q.endOfWeek=function(){return this.setWeekDay(7).endOfDay()},q.endOfYear=function(){return this.setMonth(12,31).endOfDay()},q.era=function(e="long"){return function(e,t,n="long"){return O(e,n)[t]}(this.getLocale(),this.getYear()<0?0:1,e)},q.format=function(e){let t,n="";for(;e&&(t=e.match(h));){const r=t[1],i=t.index,s=t[0].length;if(i&&(n+=e.substring(0,i)),e=e.substring(i+s),r){if(!(r in G))throw new Error(`Invalid token in DateTime format: ${r}`);n+=G[r].output(this,s)}else n+=t[0].slice(1,-1)}return n+=e,n},q.getDate=function(){return new Date(T(this)).getUTCDate()},q.getDay=function(){return new Date(T(this)).getUTCDay()},q.getDayOfYear=function(){return P(this.getYear(),this.getMonth(),this.getDate())},q.getHours=function(){return new Date(T(this)).getUTCHours()},q.getMilliseconds=function(){return new Date(T(this)).getUTCMilliseconds()},q.getMinutes=function(){return new Date(T(this)).getUTCMinutes()},q.getMonth=function(){return new Date(T(this)).getUTCMonth()+1},q.getQuarter=function(){return Math.ceil(this.getMonth()/3)},q.getSeconds=function(){return new Date(T(this)).getUTCSeconds()},q.getTimestamp=function(){return Math.floor(this.getTime()/1e3)},q.getWeek=function(){const e=this.startOfDay().setWeekDay(1),t=e.setWeek(1,1);return 1+((e-t)/6048e5|0)},q.getWeekDay=function(){return B(this.getLocale(),this.getDay())},q.getWeekDayInMonth=function(){const e=this.getWeek(),t=this.setDate(1),n=t.getWeek(),r=t.getWeekDay()>this.getWeekDay()?0:1;return n>e?e+r:e-n+r},q.getWeekOfMonth=function(){const e=this.getWeek(),t=this.setDate(1).getWeek();return t>e?e+1:e-t+1},q.getWeekYear=function(){const e=_(this.getLocale());return this.setWeekDay(7-e+1).getYear()},q.getYear=function(){return new Date(T(this)).getUTCFullYear()},q.humanDiff=function(e){const[t,n]=function(e,t){let n;for(const[r,i]of Object.entries(m)){const s=e[i](t);if(n&&y[r]&&Math.abs(s)>=y[r])return n;if(e[i](t,{relative:!1}))return[s,r];n=s?[s,r]:null}return n||[0,"second"]}(this,e);return C(this.getLocale(),t,n)},q.humanDiffInDays=function(e){return C(this.getLocale(),this.diffInDays(e),"day")},q.humanDiffInHours=function(e){return C(this.getLocale(),this.diffInHours(e),"hour")},q.humanDiffInMinutes=function(e){return C(this.getLocale(),this.diffInMinutes(e),"minute")},q.humanDiffInMonths=function(e){return C(this.getLocale(),this.diffInMonths(e),"month")},q.humanDiffInSeconds=function(e){return C(this.getLocale(),this.diffInSeconds(e),"second")},q.humanDiffInWeeks=function(e){return C(this.getLocale(),this.diffInWeeks(e),"week")},q.humanDiffInYears=function(e){return C(this.getLocale(),this.diffInYears(e),"year")},q.isAfter=function(e){return this.diff(e)>0},q.isAfterDay=function(e){return this.diffInDays(e)>0},q.isAfterHour=function(e){return this.diffInHours(e)>0},q.isAfterMinute=function(e){return this.diffInMinutes(e)>0},q.isAfterMonth=function(e){return this.diffInMonths(e)>0},q.isAfterSecond=function(e){return this.diffInSeconds(e)>0},q.isAfterWeek=function(e){return this.diffInWeeks(e)>0},q.isAfterYear=function(e){return this.diffInYears(e)>0},q.isBefore=function(e){return this.diff(e)<0},q.isBeforeDay=function(e){return this.diffInDays(e)<0},q.isBeforeHour=function(e){return this.diffInHours(e)<0},q.isBeforeMinute=function(e){return this.diffInMinutes(e)<0},q.isBeforeMonth=function(e){return this.diffInMonths(e)<0},q.isBeforeSecond=function(e){return this.diffInSeconds(e)<0},q.isBeforeWeek=function(e){return this.diffInWeeks(e)<0},q.isBeforeYear=function(e){return this.diffInYears(e)<0},q.isBetween=function(e,t){return this.isAfter(e)&&this.isBefore(t)},q.isBetweenDay=function(e,t){return this.isAfterDay(e)&&this.isBeforeDay(t)},q.isBetweenHour=function(e,t){return this.isAfterHour(e)&&this.isBeforeHour(t)},q.isBetweenMinute=function(e,t){return this.isAfterMinute(e)&&this.isBeforeMinute(t)},q.isBetweenMonth=function(e,t){return this.isAfterMonth(e)&&this.isBeforeMonth(t)},q.isBetweenSecond=function(e,t){return this.isAfterSecond(e)&&this.isBeforeSecond(t)},q.isBetweenWeek=function(e,t){return this.isAfterWeek(e)&&this.isBeforeWeek(t)},q.isBetweenYear=function(e,t){return this.isAfterYear(e)&&this.isBeforeYear(t)},q.isDST=function(){if(!this._dynamicTz)return!1;const e=this.getYear(),t=U.fromArray([e,1,1],{timeZone:this.getTimeZone()}),n=U.fromArray([e,6,1],{timeZone:this.getTimeZone()});return this.getTimeZoneOffset()<Math.max(t.getTimeZoneOffset(),n.getTimeZoneOffset())},q.isLeapYear=function(){return N(this.getYear())},q.isSame=function(e){return 0===this.diff(e)},q.isSameDay=function(e){return 0===this.diffInDays(e)},q.isSameHour=function(e){return 0===this.diffInHours(e)},q.isSameMinute=function(e){return 0===this.diffInMinutes(e)},q.isSameMonth=function(e){return 0===this.diffInMonths(e)},q.isSameSecond=function(e){return 0===this.diffInSeconds(e)},q.isSameWeek=function(e){return 0===this.diffInWeeks(e)},q.isSameYear=function(e){return 0===this.diffInYears(e)},q.isSameOrAfter=function(e){return this.diff(e)>=0},q.isSameOrAfterDay=function(e){return this.diffInDays(e)>=0},q.isSameOrAfterHour=function(e){return this.diffInHours(e)>=0},q.isSameOrAfterMinute=function(e){return this.diffInMinutes(e)>=0},q.isSameOrAfterMonth=function(e){return this.diffInMonths(e)>=0},q.isSameOrAfterSecond=function(e){return this.diffInSeconds(e)>=0},q.isSameOrAfterWeek=function(e){return this.diffInWeeks(e)>=0},q.isSameOrAfterYear=function(e){return this.diffInYears(e)>=0},q.isSameOrBefore=function(e){return this.diff(e)<=0},q.isSameOrBeforeDay=function(e){return this.diffInDays(e)<=0},q.isSameOrBeforeHour=function(e){return this.diffInHours(e)<=0},q.isSameOrBeforeMinute=function(e){return this.diffInMinutes(e)<=0},q.isSameOrBeforeMonth=function(e){return this.diffInMonths(e)<=0},q.isSameOrBeforeSecond=function(e){return this.diffInSeconds(e)<=0},q.isSameOrBeforeWeek=function(e){return this.diffInWeeks(e)<=0},q.isSameOrBeforeYear=function(e){return this.diffInYears(e)<=0},q.monthName=function(e="long"){return H(this.getLocale(),this.getMonth(),e)},q.setDate=function(e){return w(this,new Date(T(this)).setUTCDate(e))},q.setDay=function(e){return w(this,new Date(T(this)).setUTCDate(this.getDate()-this.getDay()+parseInt(e)))},q.setDayOfYear=function(e){return w(this,new Date(T(this)).setUTCMonth(0,e))},q.setHours=function(...e){return w(this,new Date(T(this)).setUTCHours(...e))},q.setMilliseconds=function(e){return w(this,new Date(T(this)).setUTCMilliseconds(e))},q.setMinutes=function(...e){return w(this,new Date(T(this)).setUTCMinutes(...e))},q.setMonth=function(e,t=null){return null===t&&(t=this.getDate(),s.clampDates&&(t=Math.min(t,E(this.getYear(),e)))),w(this,new Date(T(this)).setUTCMonth(e-1,t))},q.setQuarter=function(e){return w(this,new Date(T(this)).setUTCMonth(3*e-3))},q.setSeconds=function(...e){return w(this,new Date(T(this)).setUTCSeconds(...e))},q.setTimestamp=function(e){return this.setTime(1e3*e)},q.setWeek=function(e,t=null){null===t&&(t=this.getWeekDay());const n=_(this.getLocale());return this.setYear(this.getWeekYear(),1,n+7*(e-1)).setWeekDay(t)},q.setWeekDay=function(e){return w(this,new Date(T(this)).setUTCDate(this.getDate()-this.getWeekDay()+parseInt(e)))},q.setWeekDayInMonth=function(e){return this.setDate(this.getDate()+7*(e-this.getWeekDayInMonth()))},q.setWeekOfMonth=function(e){return this.setDate(this.getDate()+7*(e-this.getWeekOfMonth()))},q.setWeekYear=function(e,t=null,n=null){const r=_(this.getLocale());return null===t&&(t=Math.min(this.getWeek(),U.fromArray([e,1,r]).weeksInYear())),null===n&&(n=this.getWeekDay()),this.setYear(e,1,r+7*(t-1)).setWeekDay(n)},q.setYear=function(e,t=null,n=null){return null===t&&(t=this.getMonth()),null===n&&(n=this.getDate(),s.clampDates&&(n=Math.min(n,E(this.getYear(),t)))),w(this,new Date(T(this)).setUTCFullYear(e,t-1,n))},q.startOfDay=function(){return this.setHours(0,0,0,0)},q.startOfHour=function(){return this.setMinutes(0,0,0)},q.startOfMinute=function(){return this.setSeconds(0,0)},q.startOfMonth=function(){return this.setDate(1).startOfDay()},q.startOfQuarter=function(){const e=3*this.getQuarter()-2;return this.setMonth(e,1).startOfDay()},q.startOfSecond=function(){return this.setMilliseconds(0)},q.startOfWeek=function(){return this.setWeekDay(1).startOfDay()},q.startOfYear=function(){return this.setMonth(1,1).startOfDay()},q.subDay=function(){return this.addDays(-1)},q.subDays=function(e){return this.addDays(-e)},q.subHour=function(){return this.addHours(-1)},q.subHours=function(e){return this.addHours(-e)},q.subMinute=function(){return this.addMinutes(-1)},q.subMinutes=function(e){return this.addMinutes(-e)},q.subMonth=function(){return this.addMonths(-1)},q.subMonths=function(e){return this.addMonths(-e)},q.subSecond=function(){return this.addSeconds(-1)},q.subSeconds=function(e){return this.addSeconds(-e)},q.subWeek=function(){return this.addWeeks(-1)},q.subWeeks=function(e){return this.addWeeks(-e)},q.subYear=function(){return this.addYears(-1)},q.subYears=function(e){return this.addYears(-e)},q.timeZoneName=function(e="long"){return this._dynamicTz?function(e,t,n,i="long"){return r(e,{second:"numeric",timeZone:n,timeZoneName:i}).formatToParts(t).find((e=>"timeZoneName"===e.type)).value}(this.getLocale(),this.getTime(),this.getTimeZone(),e):"GMT"+x(this.getTimeZoneOffset(),!0,"short"===e)},q.toDateString=function(){return this.format(u)},q.toISOString=function(){return this.setLocale("en").setTimeZone("UTC").format(a)},q.toString=function(){return this.format(f)},q.toTimeString=function(){return this.format(c)},q.toUTCString=function(){return this.setLocale("en").setTimeZone("UTC").toString()},q.weeksInYear=function(){const e=_(this.getLocale());return this.setMonth(12,24+e).getWeek()},U}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).DateTime=t()}(this,function(){"use strict";const e=new Map;function t(t,n){return e.has(t)||e.set(t,n()),e.get(t)}function n(e,t){return new Intl.DateTimeFormat(e,{timeZone:"UTC",...t,calendar:"gregory"})}const r=(new Intl.DateTimeFormat).resolvedOptions(),s={clampDates:!0,defaultLocale:r.locale,defaultTimeZone:r.timeZone},i=/(?:\b(?:UTC|GMT)\b|[T\s]\d{2}:\d{2}(?::\d{2}(?:\.\d{3})?)?(?:Z|[+-]\d{2}(?::?\d{2})?)\b)/i,a="eee MMM dd yyyy",o="yyyy-MM-dd'T'HH:mm:ss.SSSxxx",u="eee MMM dd yyyy HH:mm:ss xx (VV)",h="HH:mm:ss xx (VV)",f=/([a-z])\1*|''|'(?:[^']|'')*'/i,c=[31,28,31,30,31,30,31,31,30,31,30,31],l=/^(?:GMT)?([+-])([01]\d|2[0-3])(?:(:?)([0-5]\d)(?:\3([0-5]\d))?)?$/,d=[["year","weekYear"],["era"],["quarter","month","week","dayOfYear"],["weekOfMonth"],["date","weekDay"],["weekDayInMonth"],["hours24","hours12","dayPeriod"],["minutes","seconds","milliseconds"]],g={year:"diffInYears",month:"diffInMonths",week:"diffInWeeks",day:"diffInDays",hour:"diffInHours",minute:"diffInMinutes",second:"diffInSeconds"},m={month:12,week:null,day:7,hour:24,minute:60,second:60};function w(e){const t=new Date(0);return t.setUTCFullYear(e.getYear(),e.getMonth()-1,e.getDate()),t.getTime()/864e5}function y(e,t,n,r=!0){switch(t=t.withTimeZone(e.getTimeZone()),n){case"year":return D(e,t.withYear(e.getYear()),e.getYear()-t.getYear(),!r,-1);case"month":return D(e,t.withYear(e.getYear(),e.getMonth()),12*(e.getYear()-t.getYear())+e.getMonth()-t.getMonth(),!r,-1);case"week":if(r){const n=e.startOfWeek(),r=t.withLocale(e.getLocale()).startOfWeek();return(w(n)-w(r))/7}return D(e,t.withWeekYear(e.getWeekYear(),e.getWeek()),(e-t)/6048e5,r);case"day":return r?w(e)-w(t):D(e,t.withYear(e.getYear(),e.getMonth(),e.getDate()),(e-t)/864e5,r);case"hour":return D(e,t.withYear(e.getYear(),e.getMonth(),e.getDate()).withHours(e.getHours()),(e-t)/36e5,r);case"minute":return D(e,t.withYear(e.getYear(),e.getMonth(),e.getDate()).withHours(e.getHours(),e.getMinutes()),(e-t)/6e4,r);case"second":return D(e,t.withYear(e.getYear(),e.getMonth(),e.getDate()).withHours(e.getHours(),e.getMinutes(),e.getSeconds()),(e-t)/1e3,r);default:throw new Error("Invalid time unit supplied")}}function p(e){return e.slice().sort((e,t)=>t.length-e.length).map(e=>function(e){return e.replace(/[|\\{}()[\]^$+*?.-]/g,"\\$&")}(`${e}`)).join("|")}function D(e,t,n,r=!0,s=1){return n>0?(n=Math.floor(n),r&&e<t&&(n+=s)):n<0&&(n=Math.ceil(n),r&&e>t&&(n-=s)),n}function k(e){return e.getTime()-6e4*e.getTimeZoneOffset()}function M(e,t){let n=0;for(const r of e){if(r!==t[n])throw new Error(`Unmatched character in DateTime string: ${r}`);n++}}function T(e,t,n=1){const r=e.withTime(t+6e4*e.getTimeZoneOffset()),s=k(r);if(s===t)return r;const i=e.withTime(t+6e4*r.getTimeZoneOffset()),a=k(i);return a===t?i:n<0?s<a?r:i:s>a?r:i}function I(e,r="long"){return t(`periods.${e}.${r}`,()=>{const t=n(e,{hour:"numeric",hourCycle:"h11"});return new Array(2).fill().map((e,n)=>t.formatToParts(Date.UTC(2018,0,1,12*n)).find(e=>"dayPeriod"===e.type).value)})}function Y(e,r="long",s=!0){return t(`days.${e}.${r}.${s}`,()=>{if(s){const t=n(e,{weekday:r});return new Array(7).fill().map((e,n)=>t.format(Date.UTC(2018,0,n)))}const t=n(e,{year:"numeric",month:"numeric",day:"numeric",weekday:r});return new Array(7).fill().map((e,n)=>t.formatToParts(Date.UTC(2018,0,n)).find(e=>"weekday"===e.type).value)})}function O(e,r="long"){return t(`eras.${e}.${r}`,()=>{const t=n(e,{era:r});return new Array(2).fill().map((e,n)=>t.formatToParts(Date.UTC(n-1,0,1)).find(e=>"era"===e.type).value)})}function S(e,r="long",s=!0){return t(`months.${e}.${r}.${s}`,()=>{if(s){const t=n(e,{month:r});return new Array(12).fill().map((e,n)=>t.format(Date.UTC(2018,n,1)))}const t=n(e,{year:"numeric",month:r,day:"numeric"});return new Array(12).fill().map((e,n)=>t.formatToParts(Date.UTC(2018,n,1)).find(e=>"month"===e.type).value)})}function b(e){return t(`numbers.${e}`,()=>{const t=n(e,{minute:"numeric"});return new Array(10).fill().map((e,n)=>t.format(Date.UTC(2018,0,1,0,n)))})}function W(e,t=null){const n=null===t?"+":`{${t}}`;return`(?:${p(b(e))})${n}`}function Z(e,t,n="long",r=!0){return Y(e,n,r)[t]}function L(e,t,n="long",r=!0){return S(e,n,r)[t-1]}function H(e,t,n=0){const r=b(e);return`${t}`.padStart(n,"0").replace(/\d/g,e=>r[e])}function x(e,t=!0,n=!1,r=!0){const s=Math.abs(60*e),i=Math.round(s),a=Number.EPSILON*Math.max(1,s),o=Math.abs(s-i);if(!Number.isFinite(s)||o>a||i>=86400)throw new Error("Invalid time zone offset supplied");const u=Math.floor(i/3600),h=Math.floor(i%3600/60),f=i%60,c=e>0?"-":"+",l=[`${u}`.padStart(2,"0")];return(!n||h||f)&&l.push(`${h}`.padStart(2,"0")),r&&f&&l.push(`${f}`.padStart(2,"0")),c+l.join(t?":":"")}function C(e,n,r){const s=function(e){return"RelativeTimeFormat"in Intl?t(`relativeFormatter.${e}`,()=>new Intl.RelativeTimeFormat(e,{numeric:"auto",style:"long"})):null}(e);if(!s)throw new Error("RelativeTimeFormat not supported");return s.format(n,r)}const U={1:["af","am","ar-il","ar-sa","ar-ye","as","bn","bo","brx","ccp","ceb","chr","dav","doi","dz","ebu","en","es-br","es-bz","es-co","es-do","es-gt","es-hn","es-mx","es-ni","es-pa","es-pe","es-ph","es-pr","es-py","es-sv","es-us","es-ve","fil","fr-ca","gu","guz","haw","he","hi","id","ii","ja","jv","kam","ki","kln","km","kn","ko","kok","ks","lkt","lo","luo","luy","mai","mas","mer","mgh","ml","mni","mr","ms-id","ms-sg","mt","my","nd","ne","om","or","pa","ps-pk","pt","qu","sa","saq","sat","sd","seh","sn","so-et","so-ke","su","sw-ke","ta","te","teo-ke","th","ti","ug","ur","xh","yue","zh","zu"],2:["af-na","ar-001","ar-eh","ar-er","ar-km","ar-lb","ar-ma","ar-mr","ar-ps","ar-so","ar-ss","ar-td","ar-tn","en-001","en-150","en-ai","en-at","en-au","en-bb","en-be","en-bi","en-bm","en-cc","en-ch","en-ck","en-cm","en-cx","en-cy","en-de","en-dg","en-dk","en-er","en-fi","en-fj","en-fk","en-fm","en-gb","en-gd","en-gg","en-gh","en-gi","en-gm","en-gy","en-ie","en-im","en-io","en-je","en-ki","en-kn","en-ky","en-lc","en-lr","en-ls","en-mg","en-mp","en-ms","en-mu","en-mw","en-my","en-na","en-nf","en-ng","en-nl","en-nr","en-nu","en-nz","en-pg","en-pn","en-pw","en-rw","en-sb","en-sc","en-se","en-sh","en-si","en-sl","en-ss","en-sx","en-sz","en-tc","en-tk","en-to","en-tv","en-tz","en-ug","en-vc","en-vg","en-vu","en-zm","ko-kp","mas-tz","pt-ao","pt-ch","pt-cv","pt-gq","pt-gw","pt-lu","pt-st","pt-tl","qu-bo","qu-ec","ta-lk","ta-my","ti-er"],7:["ar","ckb","en-ae","en-sd","fa","fr-dj","fr-dz","fr-sy","kab","lrc","mzn","ps","so-dj","uz-arab","uz-arab-af"]},v={4:["ast","bg","br","ca","ce","cs","cy","da","de","dsb","el","en-at","en-be","en-ch","en-de","en-dk","en-fi","en-fj","en-gb","en-gg","en-gi","en-ie","en-im","en-je","en-nl","en-se","es","et","eu","fi","fo","fr","fur","fy","ga","gd","gl","gsw","gv","hsb","hu","is","it","ksh","kw","lb","lt","nb","nl","nn","no","os-ru","pl","pt-ch","pt-lu","pt-pt","rm","ru","sah","sc","se","sk","smn","sv","tt","wae"],1:["da-gl","el-cy","es-419","es-ar","es-bo","es-br","es-bz","es-cl","es-co","es-cr","es-cu","es-do","es-ea","es-ec","es-gq","es-gt","es-hn","es-ic","es-mx","es-ni","es-pa","es-pe","es-ph","es-pr","es-py","es-sv","es-us","es-uy","es-ve","fr-bf","fr-bi","fr-bj","fr-bl","fr-ca","fr-cd","fr-cf","fr-cg","fr-ci","fr-cm","fr-dj","fr-dz","fr-ga","fr-gn","fr-gq","fr-ht","fr-km","fr-ma","fr-mf","fr-mg","fr-ml","fr-mr","fr-mu","fr-nc","fr-ne","fr-pf","fr-pm","fr-rw","fr-sc","fr-sn","fr-sy","fr-td","fr-tg","fr-tn","fr-vu","fr-wf","fr-yt","nl-aw","nl-bq","nl-cw","nl-sr","nl-sx","ru-by","ru-kg","ru-kz","ru-md","ru-ua"]};function $(e,t,n){for(const n of t)for(const[t,r]of Object.entries(e))if(r.includes(n))return parseInt(t,10);return n}function A(e){return t(`weekInfo.${e}`,()=>{const t=new Intl.Locale(e),n=t.getWeekInfo?.()||t.weekInfo||{};let{firstDay:r=null,minimalDays:s=null}=n;const i=r&&s?[]:function(e){const t=e.toString().split("-x-",1)[0].match(/-u-(?:[a-z0-9]{2,8}-)*rg-([a-z]{2}|\d{3})zzzz(?:-|$)/i),n=t?.[1]||e.region;return[[e.language,e.script,n],[e.language,n],[e.language,e.script],[e.language]].map(e=>e.filter(e=>!!e).join("-").toLowerCase())}(t);if(!r){const e=$(U,i,2);r=1===e?7:e-1}return s||(s=$(v,i,1)),{firstDay:r,minimalDays:s}})}function z(e){return"''"===e?"'":e.slice(1,-1).replace(/''/g,"'")}function B(e){switch(e){case 5:return"narrow";case 4:return"long";default:return"short"}}function _(e,t,n,r,s){const i=W(r);let a=!0;return e!==i?a=!1:(s||t===i)&&(e=W(r,n)),{numeric:a,source:e}}function E(e){return A(e).minimalDays}function F(e,t){return(7+parseInt(t,10)-A(e).firstDay%7)%7+1}function j(e,t,n="long",r=!0){const s=Y(e,n,r).indexOf(t);if(-1===s)throw new Error(`Unmatched day string in DateTime string: ${t}`);return F(e,s)}function G(e,t,n="long",r=!0){return S(e,n,r).indexOf(t)+1}function P(e,t){const n=b(e);return Array.from(t,e=>n.indexOf(e)).join("")}function q(e,t){return parseInt(P(e,t),10)}var N={G:{key:"era",regex:(e,t)=>p(O(e,B(t))),input:(e,t,n)=>function(e,t,n="long"){return O(e,n).indexOf(t)}(e,t,B(n)),output:(e,t)=>{const n=B(t);return e.era(n)}},y:{key:"year",regex:e=>W(e),input:(e,t,n)=>(t=q(e,t),2!==n||2!==`${t}`.length?t:t>40?1900+t:2e3+t),output:(e,t)=>{let n=e.getYear();return 2===t&&(n=`${n}`.slice(-2)),H(e.getLocale(),Math.abs(n),t)}},Y:{key:"weekYear",regex:e=>W(e),input:(e,t,n)=>(t=q(e,t),2!==n||2!==`${t}`.length?t:t>40?1900+t:2e3+t),output:(e,t)=>{let n=e.getWeekYear();return 2===t&&(n=`${n}`.slice(-2)),H(e.getLocale(),Math.abs(n),t)}},Q:{key:"quarter",supportsLength:e=>3!==e&&4!==e,regex:e=>W(e),input:(e,t)=>q(e,t),output:(e,t)=>H(e.getLocale(),e.getQuarter(),t<3?t:0)},q:{key:"quarter",supportsLength:e=>3!==e&&4!==e,regex:e=>W(e),input:(e,t)=>q(e,t),output:(e,t)=>H(e.getLocale(),e.getQuarter(),t<3?t:0)},M:{key:"month",supportsLength:(e,t)=>!t||5!==e,regex:(e,t)=>{switch(t){case 5:case 4:case 3:return p(S(e,B(t),!1));default:return W(e)}},input:(e,t,n)=>{switch(n){case 4:case 3:return G(e,t,B(n),!1);default:return q(e,t)}},output:(e,t)=>{const n=e.getLocale(),r=e.getMonth();switch(t){case 5:case 4:case 3:return L(n,r,B(t),!1);default:return H(n,r,t)}}},L:{key:"month",supportsLength:(e,t)=>!t||5!==e,regex:(e,t)=>{switch(t){case 5:case 4:case 3:return p(S(e,B(t)));default:return W(e)}},input:(e,t,n)=>{switch(n){case 4:case 3:return G(e,t,B(n));default:return q(e,t)}},output:(e,t)=>{const n=e.getLocale(),r=e.getMonth();switch(t){case 5:case 4:case 3:return L(n,r,B(t));default:return H(n,r,t)}}},w:{key:"week",regex:e=>W(e),input:(e,t)=>q(e,t),output:(e,t)=>H(e.getLocale(),e.getWeek(),t)},W:{key:"weekOfMonth",regex:e=>W(e),input:(e,t)=>q(e,t),output:(e,t)=>H(e.getLocale(),e.getWeekOfMonth(),t)},d:{key:"date",regex:e=>W(e),input:(e,t)=>q(e,t),output:(e,t)=>H(e.getLocale(),e.getDate(),t)},D:{key:"dayOfYear",regex:e=>W(e),input:(e,t)=>q(e,t),output:(e,t)=>H(e.getLocale(),e.getDayOfYear(),t)},F:{key:"weekDayInMonth",regex:e=>W(e),input:(e,t)=>q(e,t),output:(e,t)=>H(e.getLocale(),e.getWeekDayInMonth(),t)},E:{key:"weekDay",supportsLength:(e,t)=>6!==e&&(!t||5!==e),regex:(e,t)=>p(Y(e,B(t),!1)),input:(e,t,n)=>j(e,t,B(n),!1),output:(e,t)=>{const n=B(t);return Z(e.getLocale(),e.getDay(),n,!1)}},e:{key:"weekDay",supportsLength:(e,t)=>6!==e&&(!t||5!==e),regex:(e,t)=>t<3?W(e):p(Y(e,B(t),!1)),input:(e,t,n)=>n<3?q(e,t):j(e,t,B(n),!1),output:(e,t)=>{const n=e.getLocale();if(t<3)return H(n,e.getWeekDay(),t);const r=B(t);return Z(n,e.getDay(),r,!1)}},c:{key:"weekDay",supportsLength:(e,t)=>6!==e&&(!t||5!==e),regex:(e,t)=>t<3?W(e):p(Y(e,B(t))),input:(e,t,n)=>n<3?q(e,t):j(e,t,B(n)),output:(e,t)=>{const n=e.getLocale();if(t<3)return H(n,e.getWeekDay());const r=B(t);return Z(n,e.getDay(),r)}},a:{key:"dayPeriod",supportsLength:e=>e<=4,regex:(e,t)=>p(I(e,B(t))),input:(e,t,n)=>function(e,t,n="long"){return I(e,n).indexOf(t)}(e,t,B(n)),output:(e,t)=>{const n=B(t);return e.dayPeriod(n)}},h:{key:"hours12",regex:e=>W(e),input:(e,t)=>(12===(t=q(e,t))&&(t=0),t),output:(e,t)=>H(e.getLocale(),e.getHours()%12||12,t)},H:{key:"hours24",regex:e=>W(e),input:(e,t)=>q(e,t),output:(e,t)=>H(e.getLocale(),e.getHours(),t)},K:{key:"hours12",regex:e=>W(e),input:(e,t)=>q(e,t),output:(e,t)=>H(e.getLocale(),e.getHours()%12,t)},k:{key:"hours24",regex:e=>W(e),input:(e,t)=>(24===(t=q(e,t))&&(t=0),t),output:(e,t)=>H(e.getLocale(),e.getHours()||24,t)},m:{key:"minutes",regex:e=>W(e),input:(e,t)=>q(e,t),output:(e,t)=>H(e.getLocale(),e.getMinutes(),t)},s:{key:"seconds",regex:e=>W(e),input:(e,t)=>q(e,t),output:(e,t)=>H(e.getLocale(),e.getSeconds(),t)},S:{key:"milliseconds",regex:e=>W(e),input:(e,t)=>parseInt(P(e,t).padEnd(3,"0").slice(0,3),10),output:(e,t)=>{const n=`${e.getMilliseconds()}`.padStart(3,"0");return H(e.getLocale(),n.padEnd(t,"0").slice(0,t))}},z:{supportsLength:(e,t)=>!t,output:(e,t)=>{const n=B(Math.min(t,4));return e.timeZoneName(n)}},Z:{key:"timeZone",regex:(e,t)=>5===t?"[\\+\\-]\\d{2}\\:\\d{2}(?:\\:\\d{2})?|Z":t>=4?"GMT[\\+\\-]\\d{2}\\:\\d{2}|GMT":"[\\+\\-]\\d{4}",input:(e,t)=>t,output:(e,t)=>{const n=e.getTimeZoneOffset();let r=!0,s="";if(5===t){if(!n)return"Z"}else if(t>=4){if(s="GMT",!n)return s}else r=!1;return s+x(n,r,!1,5===t)}},O:{key:"timeZone",supportsLength:e=>1===e||4===e,regex:(e,t)=>4===t?"GMT[\\+\\-]\\d{2}\\:\\d{2}|GMT":"GMT[\\+\\-]\\d{2}|GMT",input:(e,t)=>t,output:(e,t)=>{const n=e.getTimeZoneOffset();if(!n)return"GMT";let r=!1;return 4===t||(r=!0),"GMT"+x(n,!0,r)}},V:{key:"timeZone",supportsLength:e=>2===e,regex:e=>"([A-Za-z0-9_.+\\-/]+)",input:(e,t)=>t,output:e=>e.getTimeZone()},X:{key:"timeZone",supportsLength:e=>e<=5,regex:(e,t)=>{switch(t){case 5:return"[\\+\\-]\\d{2}\\:\\d{2}(?:\\:\\d{2})?|Z";case 4:return"[\\+\\-]\\d{4}(?:\\d{2})?|Z";case 3:return"[\\+\\-]\\d{2}\\:\\d{2}|Z";case 2:return"[\\+\\-]\\d{4}|Z";default:return"[\\+\\-]\\d{2}(?:\\d{2})?|Z"}},input:(e,t)=>t,output:(e,t)=>{const n=e.getTimeZoneOffset();if(!n)return"Z";let r;switch(t){case 5:case 3:r=!0;break;default:r=!1}return x(n,r,1===t,t>=4)}},x:{key:"timeZone",supportsLength:e=>e<=5,regex:(e,t)=>{switch(t){case 5:return"[\\+\\-]\\d{2}\\:\\d{2}(?:\\:\\d{2})?";case 4:return"[\\+\\-]\\d{4}(?:\\d{2})?";case 3:return"[\\+\\-]\\d{2}\\:\\d{2}";case 2:return"[\\+\\-]\\d{4}";default:return"[\\+\\-]\\d{2}(?:\\d{2})?"}},input:(e,t)=>t,output:(e,t)=>{let n;switch(t){case 5:case 3:n=!0;break;default:n=!1}return x(e.getTimeZoneOffset(),n,1===t,t>=4)}}};class Q{static clearDataCache(){e.clear()}static dayOfYear(e,t,n){return new Array(t-1).fill().reduce((t,n,r)=>t+this.daysInMonth(e,r+1),n)}static daysInMonth(e,t){const n=new Date(0);return n.setUTCFullYear(e,t-1,1),t=n.getUTCMonth(),c[t]+(1===t&&this.isLeapYear(n.getUTCFullYear())?1:0)}static daysInYear(e){return this.isLeapYear(e)?366:365}static fromArray(e,t={}){const n=e.slice(0,3),r=e.slice(3);return n.length<3&&n.push(...new Array(3-n.length).fill(1)),r.length<4&&r.push(...new Array(4-r.length).fill(0)),new this(null,t).withTimestamp(0).withYear(...n).withHours(...r)}static fromDate(e,t={}){return new this(e.getTime(),t)}static fromFormat(e,t,n={}){const r="locale"in n?n.locale:s.defaultLocale,i="timeZone"in n?n.timeZone:s.defaultTimeZone,a=[];let o,u=!1;for(;e&&(o=e.match(f));){const n=o[1],s=o.index,i=o[0].length;if(s&&M(e.substring(0,s),t),e=e.substring(s+i),t=t.substring(s),!n){const e=z(o[0]);M(e,t),t=t.substring(e.length),u=!1;continue}if(!(n in N))throw new Error(`Invalid token in DateTime format: ${n}`);if(!1===N[n].supportsLength?.(i,!0))throw new Error(`Unsupported parsing token in DateTime format: ${n.repeat(i)}`);const h=u&&!s;let f=null;if(!h){const t=e[0];if(t&&t in N){const n=e.match(/^(.)\1*/)[0].length;f=N[t].regex(r,n)}}const{numeric:c,source:l}=_(N[n].regex(r,i),f,i,r,h),d=t.match(new RegExp(`^${l}`));if(!d)throw new Error(`Unmatched token in DateTime string: ${n}`);const g=d[0],m=N[n].input(r,g,i);if(null!==m){const e=N[n].key;a.push({key:e,value:m,literal:g,token:n,length:i})}t=t.substring(g.length),u=c}if(e&&(M(e,t),t=t.substring(e.length)),t)throw new Error(`Unmatched trailing characters in DateTime string: ${t}`);let h=i;for(const{key:e,value:t}of a)"timeZone"===e&&(h=t);let c=this.fromArray([1970,1,1],{locale:r,timeZone:h});const l=function(){let e=!1,t=!0;return{date:{get:e=>e.getDate(),set:(e,t)=>e.withDate(t)},dayPeriod:{get:e=>e.getHours()<12?0:1,set:(n,r)=>{e=r;let s=r?12:0;return t&&(s+=n.getHours()),n.withHours(s)}},dayOfYear:{get:e=>e.getDayOfYear(),set:(e,t)=>e.withDayOfYear(t)},era:{get:e=>e.getYear()<0?0:1,set:(e,t)=>{const n=t?1:-1;return e.withYear(e.getYear()*n)}},hours12:{get:e=>e.getHours()%12,set:(n,r)=>(e&&(r+=12),t=!0,n.withHours(r))},hours24:{get:e=>e.getHours(),set:(e,n)=>(t=!1,e.withHours(n))},milliseconds:{get:e=>e.getMilliseconds(),set:(e,t)=>e.withMilliseconds(t)},minutes:{get:e=>e.getMinutes(),set:(e,t)=>e.withMinutes(t)},month:{get:e=>e.getMonth(),set:(e,t)=>e.withMonth(t)},quarter:{get:e=>e.getQuarter(),set:(e,t)=>e.withQuarter(t)},seconds:{get:e=>e.getSeconds(),set:(e,t)=>e.withSeconds(t)},week:{get:e=>e.getWeek(),set:(e,t)=>e.withWeek(t)},weekDay:{get:e=>e.getWeekDay(),set:(e,t)=>e.withWeekDay(t)},weekDayInMonth:{get:e=>e.getWeekDayInMonth(),set:(e,t)=>e.withWeekDayInMonth(t)},weekOfMonth:{get:e=>e.getWeekOfMonth(),set:(e,t)=>e.withWeekOfMonth(t)},weekYear:{get:e=>e.getWeekYear(),set:(e,t)=>e.withWeekYear(t)},year:{get:e=>{const t=e.getYear();return Math.abs(t)},set:(e,t)=>e.withYear(t)}}}(),g=[];for(const e of d)for(const t of e)if("era"!==t||a.find(e=>"year"===e.key))for(const e of a){const{key:n,value:r}=e;n===t&&(c=l[n].set(c,r),g.push(e))}let m=!0;for(const{key:e,value:t}of g)if(e in l&&l[e].get(c)!==t){m=!1;break}return i!==h&&(c=c.withTimeZone(i)),c.isValid=m,c}static fromISOString(e,t={}){let n=this.fromFormat(o,e,{locale:"en"});return"timeZone"in t&&(n=n.withTimeZone(t.timeZone)),"locale"in t&&(n=n.withLocale(t.locale)),n}static fromTimestamp(e,t={}){return new this(null,t).withTimestamp(e)}static getDefaultLocale(){return s.defaultLocale}static getDefaultTimeZone(){return s.defaultTimeZone}static isLeapYear(e){const t=new Date(0);return t.setUTCFullYear(e,1,29),29===t.getUTCDate()}static now(e={}){return new this(null,e)}static setDateClamping(e){s.clampDates=e}static setDefaultLocale(e){s.defaultLocale=e}static setDefaultTimeZone(e){s.defaultTimeZone=e}constructor(e=null,r={}){let a,o=!1;if(null===e)a=Date.now();else if("number"==typeof e&&Number.isFinite(e))a=e;else{if(e!==`${e}`)throw new Error("Invalid date supplied");if(a=Date.parse(e),isNaN(a))throw new Error("Invalid date string supplied");if(o=!i.test(e),o){const t=function(e){const t=e.match(/^(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?$/)||e.match(/^(\d{4})-(\d{2})-(\d{2})[T ](\d{2}):(\d{2})(?::(\d{2})(?:\.(\d+))?)?$/);if(!t)return null;const[,n,r=1,s=1,i=0,a=0,o=0,u=""]=t,h=new Date(0);return h.setUTCFullYear(n,r-1,s),h.setUTCHours(i,a,o,u.padEnd(3,"0").substring(0,3)),h.getTime()}(e);null===t?a-=6e4*new Date(a).getTimezoneOffset():a=t}}this._date=new Date(a),this._dynamicTz=!1,this.isValid=!0;let u=r.timeZone;u||(u=s.defaultTimeZone),["Z","GMT"].includes(u)&&(u="UTC");const h=u.match(l);if(h?(this._offset=60*h[2]+parseInt(h[4]||0,10)+parseInt(h[5]||0,10)/60,this._offset&&"+"===h[1]&&(this._offset*=-1),this._offset?this._timeZone=x(this._offset):(this._dynamicTz=!0,this._timeZone="UTC")):(this._dynamicTz=!0,this._timeZone=u),this._locale="locale"in r?r.locale:s.defaultLocale,this._dynamicTz&&(this._offset=function(e){const r=e.getTimeZone();if("UTC"===r)return 0;const s=Object.fromEntries(function(e){return t(`dateFormatter.${e}`,()=>n("en",{timeZone:e,hourCycle:"h23",era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",fractionalSecondDigits:3}))}(r).formatToParts(e).filter(e=>"literal"!==e.type).map(({type:e,value:t})=>[e,t]));let i=parseInt(s.year,10);"BC"===s.era&&(i=1-i);const a=new Date(0);a.setUTCFullYear(i,parseInt(s.month,10)-1,parseInt(s.day,10));const o=a.setUTCHours(parseInt(s.hour,10),parseInt(s.minute,10),parseInt(s.second,10),parseInt(s.fractionalSecond,10));return(e.getTime()-o)/6e4}(this)),o&&this._offset){const e=T(this,a);this._date.setTime(e.getTime()),this._offset=e.getTimeZoneOffset()}}addDay(){return this.addDays(1)}addDays(e){return T(this,new Date(k(this)).setUTCDate(this.getDate()+e),e)}addHour(){return this.addHours(1)}addHours(e){return this.withTime(this.getTime()+36e5*e)}addMinute(){return this.addMinutes(1)}addMinutes(e){return this.withTime(this.getTime()+6e4*e)}addMonth(){return this.addMonths(1)}addMonths(e){return this.withMonth(this.getMonth()+e)}addSecond(){return this.addSeconds(1)}addSeconds(e){return this.withTime(this.getTime()+1e3*e)}addWeek(){return this.addWeeks(1)}addWeeks(e){return this.withDate(this.getDate()+7*e)}addYear(){return this.addYears(1)}addYears(e){return this.withYear(this.getYear()+e)}dayName(e="long"){return Z(this.getLocale(),this.getDay(),e)}dayPeriod(e="long"){return function(e,t,n="long"){return I(e,n)[t]}(this.getLocale(),this.getHours()<12?0:1,e)}daysInMonth(){return this.constructor.daysInMonth(this.getYear(),this.getMonth())}daysInYear(){return this.constructor.daysInYear(this.getYear())}diff(e){return this-e}diffInDays(e,{relative:t=!0}={}){return y(this,e,"day",t)}diffInHours(e,{relative:t=!0}={}){return y(this,e,"hour",t)}diffInMinutes(e,{relative:t=!0}={}){return y(this,e,"minute",t)}diffInMonths(e,{relative:t=!0}={}){return y(this,e,"month",t)}diffInSeconds(e,{relative:t=!0}={}){return y(this,e,"second",t)}diffInWeeks(e,{relative:t=!0}={}){return y(this,e,"week",t)}diffInYears(e,{relative:t=!0}={}){return y(this,e,"year",t)}endOfDay(){return this.withHours(23,59,59,999)}endOfHour(){return this.withMinutes(59,59,999)}endOfMinute(){return this.withSeconds(59,999)}endOfMonth(){return this.withDate(this.daysInMonth()).endOfDay()}endOfQuarter(){const e=3*this.getQuarter();return this.withMonth(e,this.constructor.daysInMonth(this.getYear(),e)).endOfDay()}endOfSecond(){return this.withMilliseconds(999)}endOfWeek(){return this.withWeekDay(7).endOfDay()}endOfYear(){return this.withMonth(12,31).endOfDay()}era(e="long"){return function(e,t,n="long"){return O(e,n)[t]}(this.getLocale(),this.getYear()<0?0:1,e)}format(e){let t,n="";for(;e&&(t=e.match(f));){const r=t[1],s=t.index,i=t[0].length;if(s&&(n+=e.substring(0,s)),e=e.substring(s+i),r){if(!(r in N))throw new Error(`Invalid token in DateTime format: ${r}`);if(!1===N[r].supportsLength?.(i))throw new Error(`Unsupported token in DateTime format: ${r.repeat(i)}`);n+=N[r].output(this,i)}else n+=z(t[0])}return n+=e,n}getDate(){return new Date(k(this)).getUTCDate()}getDay(){return new Date(k(this)).getUTCDay()}getDayOfYear(){return this.constructor.dayOfYear(this.getYear(),this.getMonth(),this.getDate())}getHours(){return new Date(k(this)).getUTCHours()}getLocale(){return this._locale}getMilliseconds(){return new Date(k(this)).getUTCMilliseconds()}getMinutes(){return new Date(k(this)).getUTCMinutes()}getMonth(){return new Date(k(this)).getUTCMonth()+1}getQuarter(){return Math.ceil(this.getMonth()/3)}getSeconds(){return new Date(k(this)).getUTCSeconds()}getTime(){return this._date.getTime()}getTimestamp(){return Math.floor(this.getTime()/1e3)}getTimeZone(){return this._timeZone}getTimeZoneOffset(){return this._offset}getWeek(){const e=this.startOfDay().withWeekDay(1),t=e.withWeek(1,1);return 1+Math.floor((k(e)-k(t))/6048e5)}getWeekDay(){return F(this.getLocale(),this.getDay())}getWeekDayInMonth(){const e=this.getWeek(),t=this.withDate(1),n=t.getWeek(),r=t.getWeekDay()>this.getWeekDay()?0:1;return n>e?e+r:e-n+r}getWeekOfMonth(){const e=this.getWeek(),t=this.withDate(1).getWeek();return t>e?e+1:e-t+1}getWeekYear(){const e=E(this.getLocale());return this.withWeekDay(7-e+1).getYear()}getYear(){return new Date(k(this)).getUTCFullYear()}humanDiff(e){const[t,n]=function(e,t){let n;for(const[r,s]of Object.entries(g)){const i=e[s](t);if(n&&m[r]&&Math.abs(i)>=m[r])return n;if(e[s](t,{relative:!1}))return[i,r];n=i?[i,r]:null}return n||[0,"second"]}(this,e);return C(this.getLocale(),t,n)}humanDiffInDays(e){return C(this.getLocale(),this.diffInDays(e),"day")}humanDiffInHours(e){return C(this.getLocale(),this.diffInHours(e),"hour")}humanDiffInMinutes(e){return C(this.getLocale(),this.diffInMinutes(e),"minute")}humanDiffInMonths(e){return C(this.getLocale(),this.diffInMonths(e),"month")}humanDiffInSeconds(e){return C(this.getLocale(),this.diffInSeconds(e),"second")}humanDiffInWeeks(e){return C(this.getLocale(),this.diffInWeeks(e),"week")}humanDiffInYears(e){return C(this.getLocale(),this.diffInYears(e),"year")}isAfter(e){return this.diff(e)>0}isAfterDay(e){return this.diffInDays(e)>0}isAfterHour(e){return this.diffInHours(e)>0}isAfterMinute(e){return this.diffInMinutes(e)>0}isAfterMonth(e){return this.diffInMonths(e)>0}isAfterSecond(e){return this.diffInSeconds(e)>0}isAfterWeek(e){return this.diffInWeeks(e)>0}isAfterYear(e){return this.diffInYears(e)>0}isBefore(e){return this.diff(e)<0}isBeforeDay(e){return this.diffInDays(e)<0}isBeforeHour(e){return this.diffInHours(e)<0}isBeforeMinute(e){return this.diffInMinutes(e)<0}isBeforeMonth(e){return this.diffInMonths(e)<0}isBeforeSecond(e){return this.diffInSeconds(e)<0}isBeforeWeek(e){return this.diffInWeeks(e)<0}isBeforeYear(e){return this.diffInYears(e)<0}isBetween(e,t){return this.isAfter(e)&&this.isBefore(t)}isBetweenDay(e,t){return this.isAfterDay(e)&&this.isBeforeDay(t)}isBetweenHour(e,t){return this.isAfterHour(e)&&this.isBeforeHour(t)}isBetweenMinute(e,t){return this.isAfterMinute(e)&&this.isBeforeMinute(t)}isBetweenMonth(e,t){return this.isAfterMonth(e)&&this.isBeforeMonth(t)}isBetweenSecond(e,t){return this.isAfterSecond(e)&&this.isBeforeSecond(t)}isBetweenWeek(e,t){return this.isAfterWeek(e)&&this.isBeforeWeek(t)}isBetweenYear(e,t){return this.isAfterYear(e)&&this.isBeforeYear(t)}isDst(){if(!this._dynamicTz)return!1;const e=this.getYear(),t=this.constructor.fromArray([e,1,1],{timeZone:this.getTimeZone()}),n=this.constructor.fromArray([e,6,1],{timeZone:this.getTimeZone()});return this.getTimeZoneOffset()<Math.max(t.getTimeZoneOffset(),n.getTimeZoneOffset())}isLeapYear(){return this.constructor.isLeapYear(this.getYear())}isSame(e){return 0===this.diff(e)}isSameDay(e){return 0===this.diffInDays(e)}isSameHour(e){return 0===this.diffInHours(e)}isSameMinute(e){return 0===this.diffInMinutes(e)}isSameMonth(e){return 0===this.diffInMonths(e)}isSameOrAfter(e){return this.diff(e)>=0}isSameOrAfterDay(e){return this.diffInDays(e)>=0}isSameOrAfterHour(e){return this.diffInHours(e)>=0}isSameOrAfterMinute(e){return this.diffInMinutes(e)>=0}isSameOrAfterMonth(e){return this.diffInMonths(e)>=0}isSameOrAfterSecond(e){return this.diffInSeconds(e)>=0}isSameOrAfterWeek(e){return this.diffInWeeks(e)>=0}isSameOrAfterYear(e){return this.diffInYears(e)>=0}isSameOrBefore(e){return this.diff(e)<=0}isSameOrBeforeDay(e){return this.diffInDays(e)<=0}isSameOrBeforeHour(e){return this.diffInHours(e)<=0}isSameOrBeforeMinute(e){return this.diffInMinutes(e)<=0}isSameOrBeforeMonth(e){return this.diffInMonths(e)<=0}isSameOrBeforeSecond(e){return this.diffInSeconds(e)<=0}isSameOrBeforeWeek(e){return this.diffInWeeks(e)<=0}isSameOrBeforeYear(e){return this.diffInYears(e)<=0}isSameSecond(e){return 0===this.diffInSeconds(e)}isSameWeek(e){return 0===this.diffInWeeks(e)}isSameYear(e){return 0===this.diffInYears(e)}monthName(e="long"){return L(this.getLocale(),this.getMonth(),e)}startOfDay(){return this.withHours(0,0,0,0)}startOfHour(){return this.withMinutes(0,0,0)}startOfMinute(){return this.withSeconds(0,0)}startOfMonth(){return this.withDate(1).startOfDay()}startOfQuarter(){const e=3*this.getQuarter()-2;return this.withMonth(e,1).startOfDay()}startOfSecond(){return this.withMilliseconds(0)}startOfWeek(){return this.withWeekDay(1).startOfDay()}startOfYear(){return this.withMonth(1,1).startOfDay()}subDay(){return this.addDays(-1)}subDays(e){return this.addDays(-e)}subHour(){return this.addHours(-1)}subHours(e){return this.addHours(-e)}subMinute(){return this.addMinutes(-1)}subMinutes(e){return this.addMinutes(-e)}subMonth(){return this.addMonths(-1)}subMonths(e){return this.addMonths(-e)}subSecond(){return this.addSeconds(-1)}subSeconds(e){return this.addSeconds(-e)}subWeek(){return this.addWeeks(-1)}subWeeks(e){return this.addWeeks(-e)}subYear(){return this.addYears(-1)}subYears(e){return this.addYears(-e)}[Symbol.toPrimitive](e){return"number"===e?this.valueOf():this.toString()}timeZoneName(e="long"){return this._dynamicTz?function(e,t,r,s="long"){return n(e,{second:"numeric",timeZone:r,timeZoneName:s}).formatToParts(t).find(e=>"timeZoneName"===e.type).value}(this.getLocale(),this.getTime(),this.getTimeZone(),e):"GMT"+x(this.getTimeZoneOffset(),!0,"short"===e)}toDateString(){return this.format(a)}toISOString(){return this.withLocale("en").withTimeZone("UTC").format(o)}toJSON(){return this.isValid?this.toISOString():null}toString(){return this.format(u)}toTimeString(){return this.format(h)}toUTCString(){return this.withLocale("en").withTimeZone("UTC").toString()}valueOf(){return this.getTime()}weeksInYear(){const e=E(this.getLocale());return this.withMonth(12,24+e).getWeek()}withDate(e){return T(this,new Date(k(this)).setUTCDate(e))}withDay(e){return T(this,new Date(k(this)).setUTCDate(this.getDate()-this.getDay()+parseInt(e,10)))}withDayOfYear(e){return T(this,new Date(k(this)).setUTCMonth(0,e))}withHours(...e){return T(this,new Date(k(this)).setUTCHours(...e))}withLocale(e){return new this.constructor(this.getTime(),{locale:e,timeZone:this._timeZone})}withMilliseconds(e){return T(this,new Date(k(this)).setUTCMilliseconds(e))}withMinutes(...e){return T(this,new Date(k(this)).setUTCMinutes(...e))}withMonth(e,t=null){return null===t&&(t=this.getDate(),s.clampDates&&(t=Math.min(t,this.constructor.daysInMonth(this.getYear(),e)))),T(this,new Date(k(this)).setUTCMonth(e-1,t))}withQuarter(e){return T(this,new Date(k(this)).setUTCMonth(3*e-3))}withSeconds(...e){return T(this,new Date(k(this)).setUTCSeconds(...e))}withTime(e){return new this.constructor(e,{locale:this._locale,timeZone:this._timeZone})}withTimestamp(e){return this.withTime(1e3*e)}withTimeZone(e){return new this.constructor(this.getTime(),{locale:this._locale,timeZone:e})}withTimeZoneOffset(e){return new this.constructor(this.getTime(),{locale:this._locale,timeZone:x(e)})}withWeek(e,t=null){null===t&&(t=this.getWeekDay());const n=E(this.getLocale());return this.withYear(this.getWeekYear(),1,n+7*(e-1)).withWeekDay(t)}withWeekDay(e){return T(this,new Date(k(this)).setUTCDate(this.getDate()-this.getWeekDay()+parseInt(e,10)))}withWeekDayInMonth(e){return this.withDate(this.getDate()+7*(e-this.getWeekDayInMonth()))}withWeekOfMonth(e){return this.withDate(this.getDate()+7*(e-this.getWeekOfMonth()))}withWeekYear(e,t=null,n=null){const r=E(this.getLocale()),s=this.constructor;return null===t&&(t=Math.min(this.getWeek(),s.fromArray([e,1,r],{locale:this.getLocale(),timeZone:this.getTimeZone()}).weeksInYear())),null===n&&(n=this.getWeekDay()),this.withYear(e,1,r+7*(t-1)).withWeekDay(n)}withYear(e,t=null,n=null){return null===t&&(t=this.getMonth()),null===n&&(n=this.getDate(),s.clampDates&&(n=Math.min(n,this.constructor.daysInMonth(e,t)))),T(this,new Date(k(this)).setUTCFullYear(e,t-1,n))}}return Q});
2
+ //# sourceMappingURL=frost-datetime.min.js.map