@hebcal/core 5.2.1 → 5.3.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.
- package/dist/bundle.js +9461 -8316
- package/dist/bundle.min.js +2 -2
- package/dist/index.cjs +4038 -8
- package/dist/index.mjs +4038 -8
- package/hebcal.d.ts +48 -2
- package/package.json +10 -10
- package/po/he.po +3 -0
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @hebcal/core v5.
|
|
1
|
+
/*! @hebcal/core v5.3.0 */
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
/** @private */
|
|
@@ -2028,9 +2028,4026 @@ class HebrewDateEvent extends Event {
|
|
|
2028
2028
|
}
|
|
2029
2029
|
}
|
|
2030
2030
|
|
|
2031
|
-
const n=36e11,t=864e11,e=[1,1e3,1e6,1e9,6e10,n,t],o=[9,6,3];function r(n){return n<=6}function i(n){return n>=6}const s$1=a("overflow",{constrain:0,reject:1},0);function a(n,t,e){const o=function(n,t,e){return (o,r)=>{if(void 0===o){const t=null!=r?r:e;if(void 0===t)throw new RangeError(`Must specify a ${n}`);return t}if(void 0===t[o])throw new RangeError(`Invalid ${n}: ${o}`);return t[o]}}(n,t,e);return (t,e)=>{const r=d(t);return o(r[n],e)}}function c(n,t,e,o){if(void 0===n)return t;if(!Number.isFinite(n))throw new RangeError("Number must be finite");n=Math.trunc(n);const r=Math.min(Math.max(n,t),e);if(r!==n&&1===o)throw new RangeError("Invalid overflowed value "+n);return r}function u(n,t){const e={};for(const o in t)void 0!==n[o]&&(e[o]=t[o](n[o]));return e}function d(n,t){if(void 0===n&&!t)return {};if(!h(n))throw TypeError("options must be an object or undefined");return n}const l=/object|function/;function h(n){return null!==n&&l.test(typeof n)}const f=a("roundingMode",{halfExpand:Math.round,ceil:Math.ceil,trunc:Math.trunc,floor:Math.floor});function m$1(){const n=new WeakMap;return [n.get.bind(n),n.set.bind(n)]}function g(n,t){Object.defineProperties(n.prototype,y(t,(n=>({get:n}))));}function y(n,t){const e={};for(const o in n)e[o]=t(n[o],o);return e}function w(n,t,e){const o={};for(const r of t)o[r]=e(n[r]);return o}function p(n,t){const e={};return n.forEach(((n,o)=>{e[n]=t(n,o);})),e}const v=["nanosecond","microsecond","millisecond","second","minute","hour"],M=[...v,"day","week","month","year"],b=M.map((n=>n+"s")),S=p(M,((n,t)=>t)),I=p(b,((n,t)=>t));function F(n,t,e,o){var r;let i;if(void 0===n){if(void 0===t)throw new RangeError("Unit is required");i=t;}else if(i=null!=(r=S[n])?r:I[n],void 0===i||i<e||i>o)throw new RangeError("Invalid unit "+n);return i}function O(n,t,o,r,i,s){var a;const c=d(n),u=null!=(a=c.roundingIncrement)?a:1,l=F(c.smallestUnit,o,r,i),h=f(c,s?Math.round:Math.trunc);let m=c.largestUnit;"auto"===m&&(m=void 0);const g=F(m,t=Math.max(t,l),r,i);if(l>g)throw new RangeError("Bad smallestUnit/largestUnit");if(l<6){const n=e[l+1],t=e[l]*u;if(n===t)throw new RangeError("Must not equal larger unit");if(n%t)throw new RangeError("Must divide into larger unit")}return {smallestUnit:l,largestUnit:g,roundingFunc:h,roundingIncrement:u}}function T(n,o,r,i){var s;const a=d("string"==typeof n?{smallestUnit:n}:n,!0),c=null!=(s=a.roundingIncrement)?s:1,u=F(a.smallestUnit,void 0,o,r),l=f(a,Math.round),h=e[u]*c;if(6===u){if(1!==c)throw new RangeError("When smallestUnit is days, roundingIncrement must be 1")}else {const n=i?t:e[u+1];if(!i&&n===h)throw new RangeError("Must not equal larger unit");if(n%h)throw new RangeError("Must divide into larger unit")}return {smallestUnit:u,roundingFunc:l,incNano:h}}const D$1=Symbol();function N(n,t,...e){return t instanceof n?t:n.from(t,...e)}class Y{toJSON(){return this.toString()}}class E extends Y{valueOf(){throw new Error("Cannot convert object using valueOf")}}const[Z,C]=m$1();class U extends E{constructor(n){super(),C(this,Object.freeze(n));}getISOFields(){return Z(this)}}function P(n,t){return n<t?-1:n>t?1:0}function R(n){return P(n,0)}function k(n,t,e){return e(n/t)*t}function x(n){return k(n,6e10,j)}function j(n){return Math.round(Math.abs(n))*R(n)}function q(n,t,e){const o=n.div(t).mult(t),r=n.sub(o).toNumber();return o.add(e(r/t)*t)}function H(n,t){return (n%t+t)%t}function L(n,t){return $(e=String(n),t,"0")+e;var e;}function B(n,t,e){return n+$(n,t,e)}function $(n,t,e){return new Array(Math.max(0,t-n.length+1)).join(e)}function A(n){return n<0?"-":"+"}const z=Math.pow(10,8);class W{constructor(n,t){this.high=n,this.low=t;}sign(){return R(this.high)||R(this.low)}neg(){return new W(-this.high||0,-this.low||0)}abs(){return this.sign()<0?this.neg():this}add(n){const[t,e]=J(n);return Q(this.high+t,this.low+e)}sub(n){const[t,e]=J(n);return Q(this.high-t,this.low-e)}mult(n){return Q(this.high*n,this.low*n)}div(n){const t=this.high/n;let e=String(t);-1!==e.indexOf("e-")&&(e=t.toFixed(20));const o=e.indexOf(".");let r=0;if(-1!==o){let n=e.substr(o+1);n=B(n,8,"0"),n=n.substr(0,8),r=parseInt(n)*(R(t)||1);}return Q(Math.trunc(t)||0,Math.trunc(this.low/n)+r)}toNumber(){return this.high*z+this.low}toBigInt(){return BigInt(this.high)*BigInt(z)+BigInt(this.low)}}function K(n,t){let e,o;if(n instanceof W)e=n.high,o=n.low;else if("number"==typeof n){if(t)throw new TypeError("Must supply bigint, not number");e=Math.trunc(n/z),o=n%z||0;}else if("bigint"==typeof n){const t=BigInt(z);e=Number(n/t),o=Number(n%t||0);}else {if("string"!=typeof n)throw new Error("Invalid type of BigNano");{if((n=n.trim()).match(/\D/))throw new SyntaxError(`Cannot parse ${n} to a BigInt`);const t=n.length-8;e=Number(n.substr(t)),o=Number(n.substr(0,t));}}return new W(e,o)}function G(n,t){return P(n.high,t.high)||P(n.low,t.low)}function J(n){return "number"==typeof n?[0,n]:[n.high,n.low]}function Q(n,t){let e=t%z||0,o=n+Math.trunc(t/z);const r=R(o),i=R(e);return i&&r&&i!==r&&(o+=i,e-=z*i),new W(o,e)}const V=b.concat("sign");function X(n){return w(n,V,(n=>-n||0))}function _(n,t){var e,o,r,i,s,a,c,u,d,l;return nn({years:null!=(e=t.years)?e:n.years,months:null!=(o=t.months)?o:n.months,weeks:null!=(r=t.weeks)?r:n.weeks,days:null!=(i=t.days)?i:n.days,hours:null!=(s=t.hours)?s:n.hours,minutes:null!=(a=t.minutes)?a:n.minutes,seconds:null!=(c=t.seconds)?c:n.seconds,milliseconds:null!=(u=t.milliseconds)?u:n.milliseconds,microseconds:null!=(d=t.microseconds)?d:n.microseconds,nanoseconds:null!=(l=t.nanoseconds)?l:n.nanoseconds})}function nn(n){return {...n,sign:tn(n)}}function tn(n){let t=0;for(const e of b){if(n[e]){t=R(n[e]);break}}return t}function en(n){let t=9;for(;t>0&&!n[b[t]];)t--;return t}const on={isoHour:0,isoMinute:0,isoSecond:0,isoMillisecond:0,isoMicrosecond:0,isoNanosecond:0},rn={hours:0,minutes:0,seconds:0,milliseconds:0,microseconds:0,nanoseconds:0};function sn(n){return {isoHour:n.hour||0,isoMinute:n.minute||0,isoSecond:n.second||0,isoMillisecond:n.millisecond||0,isoMicrosecond:n.microsecond||0,isoNanosecond:n.nanosecond||0}}function an(n){return K(t).mult(n.days).add(cn(n))}function cn(t){return K(t.nanoseconds).add(K(t.microseconds).mult(1e3)).add(K(t.milliseconds).mult(1e6)).add(K(t.seconds).mult(1e9)).add(K(t.minutes).mult(6e10)).add(K(t.hours).mult(n))}function un(t){return t.isoHour*n+6e10*t.isoMinute+1e9*t.isoSecond+1e6*t.isoMillisecond+1e3*t.isoMicrosecond+t.isoNanosecond}function dn(e,o){let r,i=0,s=0,a=0,c=0,u=0,d=0;switch(o){case 6:r=e.div(t),i=r.toNumber(),e=e.sub(r.mult(t));case 5:r=e.div(n),s=r.toNumber(),e=e.sub(r.mult(n));case 4:r=e.div(6e10),a=r.toNumber(),e=e.sub(r.mult(6e10));case 3:r=e.div(1e9),c=r.toNumber(),e=e.sub(r.mult(1e9));case 2:r=e.div(1e6),u=r.toNumber(),e=e.sub(r.mult(1e6));case 1:r=e.div(1e3),d=r.toNumber(),e=e.sub(r.mult(1e3));}return nn({years:0,months:0,weeks:0,days:i,hours:s,minutes:a,seconds:c,milliseconds:u,microseconds:d,nanoseconds:e.toNumber()})}function ln(e){const o=Math.floor(e/t);e-=o*t;const r=Math.floor(e/n);e-=r*n;const i=Math.floor(e/6e10);e-=6e10*i;const s=Math.floor(e/1e9);e-=1e9*s;const a=Math.floor(e/1e6);e-=1e6*a;const c=Math.floor(e/1e3);return [{isoHour:r,isoMinute:i,isoSecond:s,isoMillisecond:a,isoMicrosecond:c,isoNanosecond:e-=1e3*c},o]}const hn={gregory:{bce:-1,ce:0},ethioaa:{era0:0},ethiopic:{era0:0,era1:5500},coptic:{era0:-1,era1:0},roc:{beforeroc:-1,minguo:0},buddhist:{be:0},islamic:{ah:0},indian:{saka:0},persian:{ap:0},japanese:{bce:-1,ce:0,meiji:1867,taisho:1911,showa:1925,heisei:1988,reiwa:2018}};class fn{constructor(n){this.id=n;}monthCode(n,t){return "M"+L(n,2)}convertMonthCode(n,t){const e=/L$/.test(n),o=parseInt(n.substr(1));if(e)throw new RangeError("Calendar system doesnt support leap months");return [o,!1]}}function mn(n,t,e,o){var r;let i=null==(r=hn[gn(n)])?void 0:r[e];if(void 0===i){if(!o)throw new Error("Unkown era "+e);i=0;}return (i+t)*(R(i)||1)}function gn(n){return n.split("-")[0]}class yn extends fn{computeFields(n){const t=Fn(n);return {era:void 0,eraYear:void 0,year:t.isoYear,month:t.isoMonth,day:t.isoDay}}epochMilliseconds(n,t,e){return Sn(n,t,e)}daysInMonth(n,t){return 2===t?this.inLeapYear(n)?29:28:4===t||6===t||9===t||11===t?30:31}monthsInYear(){return 12}inLeapYear(n){return n%4==0&&(n%100!=0||n%400==0)}guessYearForMonthDay(){return pn}normalizeISOYearForMonthDay(){return pn}}const wn=new yn("iso8601"),pn=1972,vn=Symbol();function Mn(n){return bn(n.isoYear,n.isoMonth,n.isoDay,n.isoHour,n.isoMinute,n.isoSecond,n.isoMillisecond,n.isoMicrosecond,n.isoNanosecond)}function bn(n,t,e,o,r,i,s,a,c){return K(Sn(n,t,e,o,r,i,s)).mult(1e6).add(1e3*(null!=a?a:0)+(null!=c?c:0))}function Sn(n,t,e,o,r,i,s){const a=R(n);let c,u,d=0;const l=n>=0&&n<1e3,h=l?n+1200:n;for(;d<31;d++){c=e-a*d;const n=Date.UTC(h,t-1,c,null!=o?o:0,null!=r?r:0,null!=i?i:0,null!=s?s:0);if(!En(n)){u=n+a*d*864e5;break}}return (void 0===u||c<1||c>wn.daysInMonth(n,t))&&Zn(),l&&(u=new Date(u).setUTCFullYear(n)),u}function In(n){let t=n.div(1e6),e=n.sub(t.mult(1e6)).toNumber();e<0&&(e+=1e6,t=t.sub(1));const o=Math.floor(e/1e3);return e-=1e3*o,{...Fn(t.toNumber()),isoMicrosecond:o,isoNanosecond:e}}function Fn(n){const[t,e]=Yn(n);return {isoYear:t.getUTCFullYear(),isoMonth:t.getUTCMonth()+1,isoDay:t.getUTCDate()+e,isoHour:t.getUTCHours(),isoMinute:t.getUTCMinutes(),isoSecond:t.getUTCSeconds(),isoMillisecond:t.getUTCMilliseconds()}}function On(n){var t;return null!=(t=n[vn])?t:Mn(n.getISOFields())}function Tn(n){return Math.floor(Sn(n,1,1)/1e3)}function Dn(n){return Yn(n.div(1e6).toNumber())[0].getUTCFullYear()}function Nn(n,t,e){const[o,r]=Yn(Sn(n,t,e));return H(o.getUTCDay()+r,7)||7}function Yn(n){const t=R(n);let e,o=0;for(;o<31;o++){const r=new Date(n-t*o*864e5);if(!En(r)){e=r;break}}return void 0===e&&Zn(),[e,t*o]}function En(n){return isNaN(n.valueOf())}function Zn(){throw new RangeError("Date outside of supported range")}function Cn(n,t){return Math.round((t-n)/864e5)}function Un(n,t){return n+864e5*t}function Pn(n,t){return !Rn(n,t)&&n.calendar.toString()===t.calendar.toString()}function Rn(n,t){return G(Mn(n.getISOFields()),Mn(t.getISOFields()))}function kn(n,t){return P(un(n.getISOFields()),un(t.getISOFields()))}function xn(n,t){return P(n.year,t.year)||P(n.month,t.month)||P(n.day,t.day)}function jn(n,t){return G(n[vn],t[vn])}function qn(n,t,e,o,r){return [n=Number(n),t=c(t,1,o.monthsInYear(n),r),e=c(e,1,o.daysInMonth(n,t),r)]}function Hn(n,t){const[e,o,r]=qn(n.isoYear,n.isoMonth,n.isoDay,wn,t);return {isoYear:e,isoMonth:o,isoDay:r}}function Ln(n,t){return {...Hn(n,t),...Bn(n,t)}}function Bn({isoHour:n,isoMinute:t,isoSecond:e,isoMillisecond:o,isoMicrosecond:r,isoNanosecond:i},s){return {isoHour:n=c(n,0,23,s),isoMinute:t=c(t,0,59,s),isoSecond:e=c(e,0,59,s),isoMillisecond:o=c(o,0,999,s),isoMicrosecond:r=c(r,0,999,s),isoNanosecond:i=c(i,0,999,s)}}const $n={era:String,eraYear:Number,year:Number,month:Number,monthCode:String},An={...$n,day:Number},zn={hour:Number,minute:Number,second:Number,millisecond:Number,microsecond:Number,nanosecond:Number},Wn={era:String,eraYear:Number,year:Number,month:Number,monthCode:String,day:Number},Kn=p(b,(()=>Number));class Gn extends yn{computeFields(n){const t=super.computeFields(n),{year:e}=t;return {...t,era:e<1?"bce":"ce",eraYear:e<1?-(e-1):e}}}const Jn=a("calendarName",{auto:0,never:1,always:2},0),Qn=a("disambiguation",{compatible:0,earlier:1,later:2,reject:3},0);function Vn(n,t=4){const r=d(n),i=r.smallestUnit,s=r.fractionalSecondDigits;let a,u=0,l=1;return void 0!==i?(u=F(i,void 0,0,t),l=e[u],a=o[u]||0):void 0!==s&&"auto"!==s&&(a=c(s,0,9,1),l=Math.pow(10,9-a)),{smallestUnit:u,fractionalSecondDigits:a,roundingFunc:f(n,Math.trunc),incNano:l}}const Xn=a("timeZoneName",{auto:0,never:1},0);function _n(n,t){return nt(n)+"T"+et(n,t)}function nt(n){return tt(n)+"-"+L(n.isoDay,2)}function tt(n){const{isoYear:t}=n;return (t<1e3||t>9999?A(t)+L(Math.abs(t),6):L(t,4))+"-"+L(n.isoMonth,2)}function et(n,t){const e=[L(n.isoHour,2)];return t.smallestUnit<=4&&(e.push(L(n.isoMinute,2)),t.smallestUnit<=3&&e.push(L(n.isoSecond,2)+st(n.isoMillisecond,n.isoMicrosecond,n.isoNanosecond,t.fractionalSecondDigits)[0])),e.join(":")}function ot(n){const[t,e]=ln(Math.abs(n)),o=st(t.isoMillisecond,t.isoMicrosecond,t.isoNanosecond,void 0)[0];return A(n)+L(t.isoHour+24*e,2)+":"+L(t.isoMinute,2)+(t.isoSecond||o?":"+L(t.isoSecond,2)+o:"")}function rt(n,t){return n&&(2===t||1!==t&&"iso8601"!==n)?`[u-ca=${n}]`:""}function it(n){return n.map((([n,t,e])=>{if(e||n){return Math.abs(n).toLocaleString("fullwide",{useGrouping:!1})+t}return ""})).join("")}function st(n,t,o,r,i,s){let a=K(n).mult(1e6).add(K(t).mult(1e3)).add(o);i&&(a=q(a,void 0===r?e[s]:Math.pow(10,9-r),i));const c=a.abs(),u=c.div(1e9);let d=L(c.sub(u.mult(1e9)).toNumber(),9);return d=void 0===r?d.replace(/0+$/,""):d.substr(0,r),[d?"."+d:"",u.toNumber()*(a.sign()||1)]}function at(n){g(n,{epochNanoseconds(){return this[vn].toBigInt()},epochMicroseconds(){return this[vn].div(1e3).toBigInt()},epochMilliseconds(){return this[vn].div(1e6).toNumber()},epochSeconds(){return this[vn].div(1e9).toNumber()}});}const ct={calendar:"calendar"};for(const n of M)ct[n]="iso"+((ut=n).charAt(0).toUpperCase()+ut.slice(1));var ut;function dt(n,t=[]){g(n,p(t.concat("calendar"),(n=>function(){return this.getISOFields()[ct[n]]})));}const lt=["era","eraYear","year","month","monthCode","daysInMonth","daysInYear","monthsInYear","inLeapYear"],ht=[...lt,"day","dayOfWeek","dayOfYear","weekOfYear","daysInWeek"];function ft(n,t){g(n,p(t,(n=>function(){const t=this.calendar[n](this);return Object.defineProperty(this,n,{value:t}),t})));}function mt(n,t){(n.prototype||n)[Symbol.toStringTag]="Temporal."+t;}const gt=a("offset",{prefer:0,use:1,ignore:2,reject:3});function yt(n,e,o=0){const r=n.getPossibleInstantsFor(e);if(1===r.length)return r[0];if(3===o)throw new RangeError("Ambiguous offset");if(r.length)return r[2===o?1:0];{const r=function(n,e){const o=On(e),r=n.getOffsetNanosecondsFor(new Yr(o.sub(t)));return n.getOffsetNanosecondsFor(new Yr(o.add(t)))-r}(n,e),i=n.getPossibleInstantsFor(e.add({nanoseconds:r*(1===o?-1:1)}));return i[1===o?0:i.length-1]}}function wt({year:n,month:t,day:e},o,r,i){n+=o;const s=c(t,1,r.monthsInYear(n),i);let a=t===s?e:1;return a=c(a,1,r.daysInMonth(n,s),i),{year:n,month:s,day:a}}function pt({year:n,month:t,day:e},o,r,i){if(o){if(t+=o,o<0)for(;t<1;)t+=r.monthsInYear(--n);else {let e;for(;t>(e=r.monthsInYear(n));)t-=e,n++;}e=c(e,1,r.daysInMonth(n,t),i);}return {year:n,month:t,day:e}}function vt({isoYear:n,isoMonth:t,isoDay:e},o){if(o){let r=Sn(n,t,e);r=Un(r,o),({isoYear:n,isoMonth:t,isoDay:e}=Fn(r));}return {isoYear:n,isoMonth:t,isoDay:e}}function Mt(n,t){if(en(t)>=6)throw new RangeError("Duration cant have units >= days");return n.add(cn(t))}function bt(n,t,e=3,o){const{offsetNanoseconds:r,timeZone:i,Z:s}=n;if(void 0!==r&&2!==e){if(1===e||s)return Mn(n).sub(r);{const o=St(n,r,i,t);if(void 0!==o)return o;if(3===e)throw new RangeError("Mismatching offset/timezone")}}return yt(i,Ho(n),Qn(o))[vn]}function St(n,t,e,o){const r=e.getPossibleInstantsFor(Ho(n)),i=Mn(n),s=o?x(t):t;for(const n of r){const t=n[vn],e=i.sub(t).toNumber();if((o?x(e):e)===s)return t}}function It(n){const{timeZone:t}=n,e={...n,...on,calendar:new mr("iso8601")},o={...vt(e,1),...on,calendar:new mr("iso8601")},r=yt(t,Ho(e))[vn];return yt(t,Ho(o))[vn].sub(r).toNumber()}const Ft="(\\d{2})(:?(\\d{2})(:?(\\d{2})([.,](\\d{1,9}))?)?)?",Ot="([+-])"+Ft,Tt="(Z|"+Ot+")?(\\[([^=\\]]+)\\])?(\\[u-ca=([^\\]]+)\\])?",Dt=Pt("([+-]\\d{6}|\\d{4})-?(\\d{2})"+Tt),Nt=Pt("(--)?(\\d{2})-?(\\d{2})"+Tt),Yt=Pt("([+-]\\d{6}|\\d{4})-?(\\d{2})-?(\\d{2})([T ](\\d{2})(:?(\\d{2})(:?(\\d{2})([.,](\\d{1,9}))?)?)?)?"+Tt),Et=Pt("T?"+Ft+Tt),Zt=Pt(Ot),Ct=/^([-+])?P(\d+Y)?(\d+M)?(\d+W)?(\d+D)?(T((\d+)([.,](\d{1,9}))?H)?((\d+)([.,](\d{1,9}))?M)?((\d+)([.,](\d{1,9}))?S)?)?$/i,Ut=/\u2212/g;function Pt(n){return new RegExp(`^${n}$`,"i")}function Rt(n){return n.replace(Ut,"-")}function kt(n){const t=Lt(n);if(!t)throw _t("dateTime",n);return t}function xt(n){const t=Bt(n);if(!t)throw _t("dateTime",n);return t}function jt(n){const t=zt(n);if(void 0===t)throw _t("timeZone",n);return t}function qt(n){let t=function(n){const t=Et.exec(Rt(n));if(t)return Kt(t.slice(1))}(n);if(void 0!==t){if("T"!==n.charAt(0)){const e=$t(n)||At(n);e&&function(n){try{return Hn(n,1),!0}catch(n){return !1}}(e)&&(t=void 0);}}else t=Bt(n,!0);if(void 0===t)throw _t("time",n);return t}const Ht=/^Z$/i;function Lt(n){const t=Yt.exec(Rt(n));if(t)return function(n){const t=n[11];let e,o=!1;t&&(o=Ht.test(t),e=o?0:Gt(n.slice(12)));return {...Wt(n),timeZone:n[21],offsetNanoseconds:e,Z:o}}(t.slice(1))}function Bt(n,t,e){const o=Yt.exec(Rt(n));if(o&&(e||!Ht.test(o[12]))&&(!t||o[4]))return Wt(o.slice(1))}function $t(n){const t=Dt.exec(Rt(n));if(t)return {calendar:(e=t.slice(1))[14],isoYear:Vt(e[0]),isoMonth:Vt(e[1]),isoDay:1};var e;}function At(n){const t=Nt.exec(Rt(n));if(t)return {calendar:(e=t.slice(1))[15],isoYear:pn,isoMonth:Vt(e[1]),isoDay:Vt(e[2])};var e;}function zt(n){const t=Zt.exec(Rt(n));if(t)return Gt(t.slice(1))}function Wt(n){return {calendar:n[23],isoYear:Vt(n[0]),isoMonth:Vt(n[1]),isoDay:Vt(n[2]),...Kt(n.slice(4))}}function Kt(n){const t=Qt(n[4]);return {...ln(Jt(n[6]||""))[0],isoHour:Qt(n[0]),isoMinute:Qt(n[2]),isoSecond:60===t?59:t}}function Gt(t){return ("+"===t[0]?1:-1)*function(t){return Qt(t[0])*n+6e10*Qt(t[2])+1e9*Qt(t[4])+Jt(t[6]||"")}(t.slice(1))}function Jt(n){return parseInt(B(n,9,"0"))}function Qt(n){return parseInt(n||"0")}function Vt(n){return parseInt(n||"1")}function Xt(n){return void 0===n?void 0:parseInt(n)}function _t(n,t){throw new RangeError(`Cannot parse ${n} '${t}'`)}function ne(n){return {...n,calendar:void 0===n.calendar?gr():new mr(n.calendar)}}function te(n){return {...ne(n),timeZone:new we(n.timeZone)}}class ee{constructor(n){this.id=n;}}class oe extends ee{constructor(n,t){super(n),this.offsetNano=t;}getPossibleOffsets(){return [this.offsetNano]}getOffset(){return this.offsetNano}getTransition(){}}function re(n,t){const e={},o=n.formatToParts(t);for(const n of o)e[n.type]=n.value;return e}const ie={bc:"bce",ad:"ce"};function se(n){return n=n.toLowerCase().normalize("NFD").replace(/[^a-z0-9]/g,""),ie[n]||n}const ae=Intl.DateTimeFormat;function ce(n){return [].concat(n||[])}const ue={"Pacific/Apia":{2011:[[de(13017528e5),-36e12,-396e11],[de(13168728e5),-396e11,-36e12],[de(13252392e5),-36e12,504e11]]}};function de(n){return K(n).mult(1e6)}const le=(new Date).getUTCFullYear()+10,he=[182,91,273];class fe extends ee{constructor(n){const t=new ae("en-GB",{era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",timeZone:n});super(t.resolvedOptions().timeZone),this.format=t,this.yearEndOffsets={},this.transitionsInYear=ue[n]||{};}getPossibleOffsets(n){let t;const e=[this.getTransition(n,-1),this.getTransition(n.sub(1),1)].filter(Boolean);for(const o of e){const[e,r,i]=o,s=n.sub(r),a=n.sub(i);if(G(e,s)>0&&G(e,a)>0)return [r];if(!(G(e,s)<=0&&G(e,a)<=0))return r<i?[]:[r,i];t=i;}return void 0!==t?[t]:[1e9*this.getYearEndOffsetSec(Dn(n))]}getOffset(n){return 1e9*this.getOffsetForEpochSecs(n.div(1e9).toNumber())}getOffsetForEpochSecs(n){const t=re(this.format,1e3*n);let e=parseInt(t.year);"bce"===se(t.era)&&(e=-(e-1));const o=Sn(e,parseInt(t.month),parseInt(t.day),parseInt(t.hour),parseInt(t.minute),parseInt(t.second));return Math.floor(o/1e3)-n}getTransition(n,t){let e=Dn(n);if(e>le){const o=this.getTransitionFrom(e,e+t,t,n);if(o||t>0)return o;e=le;}return this.getTransitionFrom(Math.max(e,1847),t<0?1846:le,t,n)}getTransitionFrom(n,t,e,o){for(;n!==t;n+=e){let t=this.getTransitionsInYear(n);e<0&&(t=t.slice().reverse());for(const n of t)if(G(n[0],o)===e)return n}}getYearEndOffsetSec(n){const{yearEndOffsets:t}=this;return t[n]||(t[n]=this.getOffsetForEpochSecs(Tn(n+1)-1))}getTransitionsInYear(n){const{transitionsInYear:t}=this;return t[n]||(t[n]=this.computeTransitionsInYear(n))}computeTransitionsInYear(n){const t=this.getYearEndOffsetSec(n-1),e=this.getYearEndOffsetSec(n),o=Tn(n)-1,r=Tn(n+1)-1;if(t!==e)return [this.searchTransition(o,r,t,e)];const i=this.searchIsland(t,o);return void 0!==i?[this.searchTransition(o,i[0],t,i[1]),this.searchTransition(i[0],r,i[1],e)]:[]}searchTransition(n,t,e,o){for(;t-n>1;){const o=Math.floor(n+(t-n)/2);this.getOffsetForEpochSecs(o)===e?n=o:t=o;}return [K(t).mult(1e9),1e9*e,1e9*o]}searchIsland(n,t){for(const e of he){const o=t+86400*e,r=this.getOffsetForEpochSecs(o);if(r!==n)return [o,r]}}}const me={UTC:new oe("UTC",0)};const[ge,ye]=m$1();class we extends Y{constructor(n){if(!n)throw new RangeError("Invalid timezone ID");super(),ye(this,function(n){const e=(n=String(n)).toLocaleUpperCase();if(me[e])return me[e];const o=zt(n);if(void 0!==o){if(Math.abs(o)>t)throw new RangeError("Offset out of bounds");return new oe(ot(o),o)}return me[e]=new fe(n)}(n));}static from(n){if(h(n))return function(n){const t=n.timeZone;if(void 0===t)return n;if(h(t)&&void 0===t.timeZone)return t;return new we(t)}(n);const t=Lt(String(n));if(t){if(t.timeZone){const n=te(t);return function(n){const{offsetNanoseconds:t,timeZone:e,Z:o}=n;if(void 0!==t&&!o&&void 0===St(n,t,e,!0))throw new RangeError("Mismatching offset/timezone")}(n),n.timeZone}if(t.Z)return new we("UTC");if(void 0!==t.offsetNanoseconds)return new we(ot(t.offsetNanoseconds))}return new we(String(n))}get id(){return this.toString()}getOffsetStringFor(n){return ot(this.getOffsetNanosecondsFor(n))}getOffsetNanosecondsFor(n){const t=N(Yr,n);return ge(this).getOffset(t[vn])}getPlainDateTimeFor(n,t=gr()){const e=N(Yr,n);return Ho({...In(e[vn].add(this.getOffsetNanosecondsFor(e))),calendar:N(mr,t)})}getInstantFor(n,t){return yt(this,N(qo,n),Qn(t))}getPossibleInstantsFor(n){const t=Mn(N(qo,n).getISOFields());return ge(this).getPossibleOffsets(t).map((n=>new Yr(t.sub(n))))}getPreviousTransition(n){const t=N(Yr,n),e=ge(this).getTransition(t[vn],-1);return e?new Yr(e[0]):null}getNextTransition(n){const t=N(Yr,n),e=ge(this).getTransition(t[vn],1);return e?new Yr(e[0]):null}toString(){return ge(this).id}}function pe(n){if(void 0===n.timeZone)throw new TypeError("Must specify timeZone");return N(we,n.timeZone)}mt(we,"TimeZone");const ve=Le((function(n,t,e){const o=Ce(n,t,e);if(o)return {...o,timeZone:pe(n),offsetNanoseconds:void 0!==n.offset?jt(String(n.offset)):void 0}})),Me=Le(Ce),be=Le(Ue),Se=Le((function(n,t){const e=pr(n),o=je(n,$n,e);if(Be(o))return e.yearMonthFromFields(o,t)})),Ie=Le((function(n,t){const e=pr(n),o=je(n,Wn,e);if(Be(o))return void 0===n.year&&void 0===n.calendar&&(o.year=pn),e.monthDayFromFields(o,t)})),Fe=Le(Pe),Oe=Le((function(n,t,e,o){const r=Re(n,t,e,o),i=void 0!==t.offset;if(r||i)return {...r||n.getISOFields(),timeZone:n.timeZone,offsetNanoseconds:i?jt(String(t.offset)):n.offsetNanoseconds}}),!0),Te=Le(Re,!0),De=Le(ke,!0),Ne=Le((function(n,t,e){const o=n.calendar;if(Be(je(t,$n,o))){const r=He(n,t,$n,o);return o.yearMonthFromFields(r,e)}}),!0),Ye=Le((function(n,t,e){const o=n.calendar;if(Be(je(t,Wn,o))){const r=He(n,t,Wn,o);return o.monthDayFromFields(r,e)}}),!0),Ee=Le(xe,!0),Ze=Le((function(n){const t=u(n,Kn);if(Be(t))return t}));function Ce(n,t,e){const o=Ue(n,e),r=Pe(n,t);if(o)return {...o.getISOFields(),...r||on}}function Ue(n,t){const e=pr(n),o=je(n,An,e);if(Be(o))return e.dateFromFields(o,t)}function Pe(n,t){const e=u(n,zn);if(Be(e))return Bn(sn(e),t)}function Re(n,t,e,o){const r=ke(n,t,o),i=xe(n,t,e);if(r||i)return {...n.getISOFields(),...r?r.getISOFields():{},...i}}function ke(n,t,e){const o=n.calendar,r=je(t,An,o);if(Be(r)){const t=He(n,r,An,o);return o.dateFromFields(t,e)}}function xe(n,t,e){const o=u(t,zn);if(Be(o)){return Bn(sn((r=n,i=o,y(zn,((n,t)=>{var e;return null!=(e=i[t])?e:r[t]})))),e)}var r,i;}function je(n,t,e){let o=Object.keys(t);return o=e.fields?Array.prototype.slice.call(e.fields(o)):Object.keys(qe(e,o)),qe(n,o)}function qe(n,t){const e={};for(const o of t)void 0!==n[o]&&(e[o]=n[o]);return e}function He(n,t,e,o){const r=je(n,e,o);return o.mergeFields?o.mergeFields(r,t):yr(r,t)}function Le(n,t){return (...e)=>{if(t){const n=e[1];if(!h(n))throw new TypeError("must be object-like");if(void 0!==n.calendar)throw new TypeError("calendar not allowed");if(void 0!==n.timeZone)throw new TypeError("timeZone not allowed")}const o=n(...e);if(!o)throw new TypeError("No valid fields");return o}}function Be(n){return Object.keys(n).length>0}const $e=K(t).mult(1e8),Ae=$e.mult(-1),ze=$e.add(86399999999999),We=Ae.sub(86399999999999);function Ke(n,t){const e=Mn(n);Ge(e),cr(e,t);}function Ge(n){-1!==G(n,We)&&1!==G(n,ze)||Zn();}function Je(n,t){const e=Xe(un(n),t),[o,r]=ln(e);return {...vt(n,r),...o}}function Qe(n,t){const e=Xe(un(n),t),[o]=ln(e);return o}function Ve(n,t){const[e,o]=function(n){const t=In(n);return [bn(t.isoYear,t.isoMonth,t.isoDay),un(t)]}(n),r=Xe(o,t);return e.add(r)}function Xe(n,t){return k(n,t.incNano,t.roundingFunc)}function _e(n,t,e){return (o,r)=>{const i=io(n,r)?{}:{...n,...t};return {buildKey:ro(o,r,!1),buildFormat:function(n,t){return new ae(o,{calendar:n,timeZone:t||void 0,...i,...r,...e})},buildEpochMilli:no}}}function no(n){return n.epochMilliseconds}function to(n,t,e){return (o,r)=>{const i=io(n,r)?{}:n;return {buildKey:ro(o,r,e),buildFormat:function(n,e){return new ae(o,{calendar:n,...i,...r,...t,timeZone:e,timeZoneName:void 0})},buildEpochMilli:void 0!==r.timeZone?eo.bind(null,new we(r.timeZone)):oo}}}function eo(n,t){const e=Ho({...on,...t.getISOFields()});return n.getInstantFor(e).epochMilliseconds}function oo(n){return Sn((t=n.getISOFields()).isoYear,t.isoMonth,t.isoDay,t.isoHour,t.isoMinute,t.isoSecond,t.isoMillisecond);var t;}function ro(n,t,e){var o;const r=null!=(o=t.calendar)?o:function(n){for(const t of n){const n=t.match(/-u-ca-(.*)$/);if(n)return n[1]}return}(n),i=t.timeZone;return function(n,t){var o,s,a,c;const u=null==(o=n.calendar)?void 0:o.id,d=null==(s=n.timeZone)?void 0:s.id;if(t){if((null==(a=t.calendar)?void 0:a.id)!==u)throw new RangeError("Mismatching calendar");if((null==(c=t.timeZone)?void 0:c.id)!==d)throw new RangeError("Mismatching timeZone")}if((e||"iso8601"!==u)&&void 0!==u&&void 0!==r&&r!==u)throw new RangeError("Non-iso calendar mismatch");if(void 0!==d&&void 0!==i&&i!==d)throw new RangeError("Given timeZone must agree");return [r||u||"iso8601",i||d||"UTC"]}}function io(n,t){for(const e in n)if(void 0!==t[e])return !0;return !1}function so(n,t){n.prototype.toLocaleString=function(n,e){const o=t(ce(n),e||{});return o.buildFormat(...o.buildKey(this)).format(o.buildEpochMilli(this))},n.prototype[D$1]=t;}function ao(n){return null==n?void 0:n[D$1]}function co(n){const t=function(n){const t=Ct.exec(Rt(n));if(t){let n,e,o,r;[n,r]=uo(t[8],t[10],5,void 0),[e,r]=uo(t[12],t[14],4,r),[o,r]=uo(t[16],t[18],3,r);const i=function(n){const t={};for(const e in n)void 0!==n[e]&&(t[e]=n[e]);return t}({years:Xt(t[2]),months:Xt(t[3]),weeks:Xt(t[4]),days:Xt(t[5]),hours:n,minutes:e,seconds:o});if(!Object.keys(i).length)throw new RangeError("Duration string must have at least one field");const s=dn(K(r||0),2);i.milliseconds=s.milliseconds,i.microseconds=s.microseconds,i.nanoseconds=s.nanoseconds;let a=nn(i);return "-"===t[1]&&(a=X(a)),a}}(n);if(void 0===t)throw _t("duration",n);return t}function uo(n,t,o,r){if(void 0!==n){if(void 0!==r)throw new RangeError("Partial units must be last unit");return [parseInt(n),void 0!==t?Jt(t)*(e[o]/1e9):void 0]}if(void 0!==r){const n=Math.trunc(r/e[o]);return [n,r-n*e[o]]}return [void 0,void 0]}const lo=a("offset",{auto:0,never:1},0);class ho extends U{constructor(n=0,t=0,e=0,o=0,r=0,i=0){super({...Bn({isoHour:n,isoMinute:t,isoSecond:e,isoMillisecond:o,isoMicrosecond:r,isoNanosecond:i},1),calendar:gr()});}static from(n,t){const e=s$1(t);return fo(n instanceof ho?n.getISOFields():"object"==typeof n?Fe(n,e):qt(String(n)))}static compare(n,t){return kn(N(ho,n),N(ho,t))}with(n,t){return fo(Ee(this,n,s$1(t)))}add(n){return go(this,N(ko,n))}subtract(n){return go(this,X(N(ko,n)))}until(n,t){return yo(this,N(ho,n),t)}since(n,t){return yo(N(ho,n),this,t)}round(n){const t=T(n,0,5);return fo(Qe(this.getISOFields(),t))}equals(n){return !kn(this,N(ho,n))}toString(n){const t=Vn(n);return et(Qe(this.getISOFields(),t),t)}toZonedDateTime(n){const t=N(Sr,n.plainDate),e=N(we,n.timeZone);return Fo({...t.getISOFields(),...this.getISOFields(),timeZone:e})}toPlainDateTime(n){return N(Sr,n).toPlainDateTime(this)}}function fo(n){return new ho(n.isoHour,n.isoMinute,n.isoSecond,n.isoMillisecond,n.isoMicrosecond,n.isoNanosecond)}function mo(n){return N(ho,null!=n?n:{hour:0})}function go(n,t){return fo(function(n,t){const e=un(n)+cn(t).toNumber(),[o]=ln(e);return o}(n.getISOFields(),t))}function yo(n,t,o){const r=O(o,5,0,0,5);return xo(function(n,t,o){return dn(K(k(un(t)-un(n),e[o.smallestUnit]*o.roundingIncrement,o.roundingFunc)),o.largestUnit)}(n.getISOFields(),t.getISOFields(),r))}mt(ho,"PlainTime"),dt(ho,v),so(ho,(function(n,t){return {buildKey:()=>["",""],buildFormat:()=>new ae(n,{hour:"numeric",minute:"2-digit",second:"2-digit",...t,timeZone:"UTC",timeZoneName:void 0,year:void 0,month:void 0,day:void 0,weekday:void 0}),buildEpochMilli:n=>Math.trunc(un(n.getISOFields())/1e6)}}));const wo={day:1};class po extends U{constructor(n,t,e=gr(),o=1){const r=Hn({isoYear:n,isoMonth:t,isoDay:o},1),i=N(mr,e);var s,a;s=r,a=i.toString(),cr(Mn(s),a),super({...r,calendar:i});}static from(n,t){if(s$1(t),n instanceof po)return vo(n.getISOFields());if("object"==typeof n)return Se(n,t);const e=function(n){const t=$t(n)||Bt(n);if(!t)throw _t("yearMonth",n);return t}(String(n));return void 0===e.calendar&&(e.isoDay=1),vo(ne(e))}static compare(n,t){return Rn(N(po,n),N(po,t))}with(n,t){return Ne(this,n,t)}add(n,t){return Mo(this,N(ko,n),t)}subtract(n,t){return Mo(this,X(N(ko,n)),t)}until(n,t){return bo(this,N(po,n),!1,t)}since(n,t){return bo(this,N(po,n),!0,t)}equals(n){return !Rn(this,N(po,n))}toString(n){const t=this.getISOFields(),e=t.calendar.toString(),o=Jn(n);return ("iso8601"===e?tt(t):nt(t))+rt(e,o)}toPlainDate(n){return this.calendar.dateFromFields({year:this.year,month:this.month,day:n.day})}}function vo(n){return new po(n.isoYear,n.isoMonth,n.calendar,n.isoDay)}function Mo(n,t,e){return n.toPlainDate({day:t.sign<0?n.daysInMonth:1}).add(t,e).toPlainYearMonth()}function bo(n,t,e,o){return xo(Tr(n.toPlainDate(wo),t.toPlainDate(wo),vr(n,t),e,O(o,9,8,8,9)))}mt(po,"PlainYearMonth"),dt(po),ft(po,lt),so(po,to({year:"numeric",month:"numeric"},{weekday:void 0,day:void 0,hour:void 0,minute:void 0,second:void 0},!0));const So=Symbol();class Io extends U{constructor(n,t,e=gr()){const o=N(we,t),r=N(mr,e),i=K(n),[s,a]=Oo(i,o);Ke(s,r.toString()),super({...s,calendar:r,timeZone:o,offset:ot(a)}),this[vn]=i,this[So]=a;}static from(n,t){const e=gt(t,3),o=s$1(t);if(n instanceof Io)return new Io(n.epochNanoseconds,n.timeZone,n.calendar);const r="object"==typeof n;return Fo(r?ve(n,o,t):te(kt(String(n))),!r,e,t)}static compare(n,t){return jn(N(Io,n),N(Io,t))}get timeZone(){return this.getISOFields().timeZone}get offsetNanoseconds(){return this[So]}get offset(){return this.getISOFields().offset}with(n,t){Qn(t);const e=s$1(t),o=gt(t,0);return Fo(Oe(this,n,e,t),!1,o,t)}withPlainDate(n){const t=N(Sr,n),e=t.toPlainDateTime(this),{timeZone:o}=this,r=yt(o,e);return new Io(r.epochNanoseconds,o,Mr(this,t))}withPlainTime(n){return Fo({...this.getISOFields(),...void 0===n?on:N(ho,n).getISOFields()})}withCalendar(n){return new Io(this.epochNanoseconds,this.timeZone,n)}withTimeZone(n){return new Io(this.epochNanoseconds,n,this.calendar)}add(n,t){return To(this,N(ko,n),t)}subtract(n,t){return To(this,X(N(ko,n)),t)}until(n,t){return No(this,N(Io,n),!1,t)}since(n,t){return No(this,N(Io,n),!0,t)}round(n){return Do(this,T(n,0,6))}equals(n){return t=this,e=N(Io,n),Pn(t,e)&&t.timeZone.toString()===e.timeZone.toString();var t,e;}startOfDay(){return Fo({...this.getISOFields(),...on,offsetNanoseconds:this.offsetNanoseconds},!1,0)}get hoursInDay(){return It(this.getISOFields())/n}toString(n){const t=Vn(n),e=lo(n),o=Xn(n),r=Jn(n),i=Do(this,t);return _n(i.getISOFields(),t)+(0===e?ot(x(i.offsetNanoseconds)):"")+(s=this.timeZone.toString(),1!==o?`[${s}]`:"")+rt(this.calendar.toString(),r);var s;}toPlainYearMonth(){return vo(this.getISOFields())}toPlainMonthDay(){return this.calendar.monthDayFromFields(this)}toPlainDateTime(){return Ho(this.getISOFields())}toPlainDate(){return Ir(this.getISOFields())}toPlainTime(){return fo(this.getISOFields())}toInstant(){return new Yr(this.epochNanoseconds)}}function Fo(n,t,e,o){const r=bt(n,t,e,o);return new Io(r,n.timeZone,n.calendar)}function Oo(n,t){const e=new Yr(n),o=t.getOffsetNanosecondsFor(e);return [In(n.add(o)),o]}function To(n,t,e){const o=n.getISOFields(),r=function(n,t,e){const{calendar:o,timeZone:r}=n,i=o.dateAdd(Ir(n),_(t,rn),e);return yt(r,Ho({...n,...i.getISOFields()}))[vn].add(cn(t))}(o,t,e);return new Io(r,o.timeZone,o.calendar)}function Do(n,t){const e=n.getISOFields(),o=function(n,t,e){const{calendar:o,timeZone:r}=n;let i,s,a=un(n);return 6===e.smallestUnit?(i=on,s=e.roundingFunc(a/It(n))):(a=Xe(a,e),[i,s]=ln(a)),bt({...vt(n,s),...i,offsetNanoseconds:t,calendar:o,timeZone:r},!1,0)}(e,n.offsetNanoseconds,t);return new Io(o,e.timeZone,e.calendar)}function No(n,t,e,o){const r=O(o,5,0,0,9),{largestUnit:i}=r;if(i>=6&&n.timeZone.id!==t.timeZone.id)throw new Error("Must be same timeZone");return xo(Or(n,t,vr(n,t),e,r))}function Yo(n){if(void 0===n)return;if(h(n))return n instanceof Io||n instanceof qo?n:N(void 0!==n.timeZone?Io:qo,n);if("symbol"==typeof n)throw new TypeError("Incorrect relativeTo type");const t=Lt(String(n));if(t)return void 0!==t.timeZone?Fo(te(t),!0):Ho(ne(t));throw new RangeError("Invalid value of relativeTo")}function Eo(n,t,e,o){return (e instanceof Sr?function(n,t,e,o){const r=e.add(n);return [o.dateUntil(e,r,{largestUnit:M[t]}),r]}(n,Math.max(6,t),e,o):Zo(n,t,e,o))[0]}function Zo(n,t,e,o,r){const i=!0!==r&&t>7&&n.weeks;i&&(n=_(n,{weeks:0}));let s=e.add(n),a=Dr(e,s,o,t);return i&&(a=_(a,{weeks:i}),s=s.add({weeks:i})),[a,s]}function Co(n,t,e,o){const r=b[t],{sign:i}=n;if(!i)return n;const s={};for(let e=9;e>=t;e--){const t=b[e];s[t]=n[t];}const a={[r]:i},c=e.add(s),u=c.add(a),d=On(c),l=On(u),h=On(o).sub(d).toNumber()/l.sub(d).toNumber()*i;return s[r]+=h,s}function Uo(n,t,o,r,s,a){const{largestUnit:c,smallestUnit:u,roundingIncrement:d,roundingFunc:l}=a;if(!i(c)){return dn(q(On(o).sub(On(t)).mult(s?-1:1),e[u]*d,l),c)}let h=Co(n,u,t,o);const f=b[u];function m(){const n=h[f];h[f]=k(n,d,l);}return l===Math.round&&m(),s&&(h=X(h)),l!==Math.round&&m(),u>0&&(h=s?X(Eo(X(h),c,t,r)):Eo(h,c,t,r)),h}mt(Io,"ZonedDateTime"),dt(Io,v),ft(Io,ht),at(Io),so(Io,_e({year:"numeric",month:"numeric",day:"numeric",weekday:void 0,hour:"numeric",minute:"2-digit",second:"2-digit"},{timeZoneName:"short"},{}));const[Po,Ro]=m$1();class ko extends E{constructor(n=0,t=0,e=0,o=0,r=0,i=0,s=0,a=0,c=0,u=0){super();const d=Ze({years:n,months:t,weeks:e,days:o,hours:r,minutes:i,seconds:s,milliseconds:a,microseconds:c,nanoseconds:u});Ro(this,function(n){const t=nn(n),{sign:e}=t;for(const n of b){const o=t[n],r=R(t[n]);if(r&&r!==e)throw new RangeError("All fields must be same sign");if(!Number.isInteger(o))throw new RangeError("Duration fields must be integers")}return t}(d));}static from(n){return xo("object"==typeof n?Ze(n):co(n))}static compare(n,t,e){return function(n,t,e){if(void 0===e&&en(n)<=6&&en(t)<=6)return G(an(n),an(t));if(!e)throw new RangeError("Need relativeTo");const o=e.add(n),r=e.add(t);return void 0!==e[vn]?jn(o,r):Rn(o,r)}(N(ko,n),N(ko,t),Yo(d(e).relativeTo))}get years(){return Po(this).years}get months(){return Po(this).months}get weeks(){return Po(this).weeks}get days(){return Po(this).days}get hours(){return Po(this).hours}get minutes(){return Po(this).minutes}get seconds(){return Po(this).seconds}get milliseconds(){return Po(this).milliseconds}get microseconds(){return Po(this).microseconds}get nanoseconds(){return Po(this).nanoseconds}get sign(){return Po(this).sign}get blank(){return !this.sign}with(n){return xo({...Po(this),...Ze(n)})}negated(){return xo(X(Po(this)))}abs(){return xo(w(Po(this),V,(n=>Math.abs(n))))}add(n,t){return jo(this,N(ko,n),t)}subtract(n,t){return jo(this,X(N(ko,n)),t)}round(n){const t="string"==typeof n?{smallestUnit:n}:n;if(!h(t))throw new TypeError("Must specify options");if(void 0===t.largestUnit&&void 0===t.smallestUnit)throw new RangeError("Must specify either largestUnit or smallestUnit");const o=O(t,en(this),0,0,9,!0),i=Yo(t.relativeTo);return xo(function(n,t,o,i){const{largestUnit:s,smallestUnit:a,roundingIncrement:c,roundingFunc:u}=t;if(void 0===o&&en(n)<=6&&r(s)&&r(a))return dn(q(an(n),e[a]*c,u),s);if(!o)throw new RangeError("Need relativeTo");const[d,l]=Zo(n,s,o,i);return Uo(d,o,l,i,!1,t)}(this,o,i,i?i.calendar:void 0))}total(n){const t=function(n){let t,e;return "string"==typeof n?e=n:(e=d(n).unit,t=n.relativeTo),{unit:F(e,void 0,0,9),relativeTo:t}}(n),o=Yo(t.relativeTo);return function(n,t,o,i){if(void 0===o&&en(n)<=6&&r(t))return an(n).toNumber()/e[t];if(!o)throw new RangeError("Need relativeTo");const[s,a]=Zo(n,t,o,i,!0);return Co(s,t,o,a)[b[t]]}(this,t.unit,o,o?o.calendar:void 0)}toString(n){const t=Vn(n,3);return function(n,t){const{smallestUnit:e,fractionalSecondDigits:o,roundingFunc:r}=t,{sign:i}=n,s=n.hours,a=n.minutes;let c=n.seconds,u="";if(e<=3){const t=st(n.milliseconds,n.microseconds,n.nanoseconds,o,r,e);u=t[0],c+=t[1];}const d=void 0!==o||u||!i;return (i<0?"-":"")+"P"+it([[n.years,"Y"],[n.months,"M"],[n.weeks,"W"],[n.days,"D"]])+(s||a||c||d?"T"+it([[s,"H"],[a,"M"],[e<=3?c:0,u+"S",d]]):"")}(Po(this),t)}toLocaleString(n,t){return this.toString()}}function xo(n){return new ko(n.years,n.months,n.weeks,n.days,n.hours,n.minutes,n.seconds,n.milliseconds,n.microseconds,n.nanoseconds)}function jo(n,t,e){const o=Yo(d(e).relativeTo);return xo(function(n,t,e,o){const r=Math.max(en(n),en(t));if(void 0===e&&r<=6)return dn(an(n).add(an(t)),r);if(!e)throw new RangeError("Need relativeTo");const i=e.add(n).add(t);return Dr(e,i,o,r)}(n,t,o,o?o.calendar:void 0))}mt(ko,"Duration");class qo extends U{constructor(n,t,e,o=0,r=0,i=0,s=0,a=0,c=0,u=gr()){const d=Ln({isoYear:n,isoMonth:t,isoDay:e,isoHour:o,isoMinute:r,isoSecond:i,isoMillisecond:s,isoMicrosecond:a,isoNanosecond:c},1),l=N(mr,u);Ke(d,l.toString()),super({...d,calendar:l});}static from(n,t){const e=s$1(t);return Ho(n instanceof qo?n.getISOFields():"object"==typeof n?Me(n,e,t):ne(xt(String(n))))}static compare(n,t){return Rn(N(qo,n),N(qo,t))}with(n,t){const e=s$1(t);return Ho(Te(this,n,e,t))}withPlainDate(n){const t=N(Sr,n);return Ho({...this.getISOFields(),...t.getISOFields(),calendar:Mr(this,t)})}withPlainTime(n){return Ho({...this.getISOFields(),...mo(n).getISOFields()})}withCalendar(n){return Ho({...this.getISOFields(),calendar:N(mr,n)})}add(n,t){return Lo(this,N(ko,n),t)}subtract(n,t){return Lo(this,X(N(ko,n)),t)}until(n,t){return Bo(this,N(qo,n),!1,t)}since(n,t){return Bo(this,N(qo,n),!0,t)}round(n){const t=T(n,0,6);return Ho({...Je(this.getISOFields(),t),calendar:this.calendar})}equals(n){return Pn(this,N(qo,n))}toString(n){const t=Vn(n),e=Jn(n);return _n(Je(this.getISOFields(),t),t)+rt(this.calendar.toString(),e)}toZonedDateTime(n,t){const e=N(we,n),o=yt(e,this,Qn(t));return new Io(o.epochNanoseconds,e,this.calendar)}toPlainYearMonth(){return vo(this.getISOFields())}toPlainMonthDay(){return this.calendar.monthDayFromFields(this)}toPlainDate(){return Ir(this.getISOFields())}toPlainTime(){return fo(this.getISOFields())}}function Ho(n){return new qo(n.isoYear,n.isoMonth,n.isoDay,n.isoHour,n.isoMinute,n.isoSecond,n.isoMillisecond,n.isoMicrosecond,n.isoNanosecond,n.calendar)}function Lo(n,t,e){const o=function(n,t,e){const{calendar:o}=n;return In(Mn(o.dateAdd(Ir(n),_(t,rn),e).getISOFields()).add(un(n)).add(cn(t)))}(n.getISOFields(),t,e);return Ho({...o,calendar:n.calendar})}function Bo(n,t,e,o){const r=O(o,6,0,0,9);return xo(Or(n,t,vr(n,t),e,r))}mt(qo,"PlainDateTime"),dt(qo,v),ft(qo,ht),so(qo,to({year:"numeric",month:"numeric",day:"numeric",weekday:void 0,hour:"numeric",minute:"2-digit",second:"2-digit"},{}));class $o extends U{constructor(n,t,e=gr(),o=pn){super({...Hn({isoYear:o,isoMonth:n,isoDay:t},1),calendar:N(mr,e)});}static from(n,t){if(s$1(t),n instanceof $o)return Ao(n.getISOFields());if("object"==typeof n)return Ie(n,t);const e=function(n){const t=At(n)||Bt(n);if(!t)throw _t("monthDay",n);return t}(String(n));return void 0===e.calendar&&(e.isoYear=pn),Ao(ne(e))}with(n,t){return Ye(this,n,t)}equals(n){return !Rn(this,N($o,n))}toString(n){const t=this.getISOFields(),e=t.calendar.toString(),o=Jn(n);return ("iso8601"===e?function(n){return L(n.isoMonth,2)+"-"+L(n.isoDay,2)}(t):nt(t))+rt(e,o)}toPlainDate(n){return this.calendar.dateFromFields({year:n.year,monthCode:this.monthCode,day:this.day},{overflow:"reject"})}}function Ao(n){return new $o(n.isoMonth,n.isoDay,n.calendar,n.isoYear)}function zo(n){return n instanceof Sr||n instanceof qo||n instanceof Io||n instanceof po||n instanceof $o}function Wo(n,t,e){let o;if(n instanceof Sr)o=n;else if(zo(n)){if(e&&n instanceof $o)throw new TypeError("PlainMonthDay not allowed");o=Ir(n.getISOFields());}else o=Sr.from(n);return br(o.calendar,t),o}function Ko(n,t,e){if(zo(n))return n.getISOFields();let{era:o,eraYear:r,year:i,month:a,monthCode:c,day:u}=n;const d=void 0!==r&&void 0!==o?mn(t.id,r,o):void 0;if(void 0===i){if(void 0===d)throw new TypeError("Must specify either a year or an era & eraYear");i=d;}else if(void 0!==d&&d!==i)throw new RangeError("year and era/eraYear must match");if(void 0===u)throw new TypeError("Must specify day");const l=s$1(e);if(void 0!==c){const[n,e]=t.convertMonthCode(c,i);if(void 0!==a&&a!==n)throw new RangeError("Month doesnt match with monthCode");if(a=n,e){if(1===l)throw new RangeError("Month code out of range");u=t.daysInMonth(i,a);}}else if(void 0===a)throw new TypeError("Must specify either a month or monthCode");return [i,a,u]=qn(i,a,u,t,l),Fn(t.epochMilliseconds(i,a,u))}function Go(n,t){if(zo(n)){if(t&&n instanceof $o)throw new TypeError("PlainMonthDay not allowed");return n.getISOFields()}return Sr.from(n).getISOFields()}function Jo(n,t){return Cn(n.epochMilliseconds(t,1,1),n.epochMilliseconds(t+1,1,1))}function Qo(n,t,e,o){return Cn(n.epochMilliseconds(t,1,1),n.epochMilliseconds(t,e,o))+1}mt($o,"PlainMonthDay"),dt($o),ft($o,["monthCode","day"]),so($o,to({month:"numeric",day:"numeric"},{weekday:void 0,year:void 0,hour:void 0,minute:void 0,second:void 0},!0));const Vo={hebrew:6,chinese:0,dangi:0};class Xo extends fn{constructor(n){const t=_o(n);if(e=n,o=t.resolvedOptions().calendar,gn(e)!==gn(o))throw new RangeError("Invalid calendar: "+n);var e,o;super(n),this.format=t,this.yearCorrection=this.computeFieldsDumb(0).year-1970,this.monthCacheByYear={};}epochMilliseconds(n,t,e){return Un(this.queryMonthCache(n)[0][t-1],e-1)}daysInMonth(n,t){const e=this.queryMonthCache(n)[0],o=e[t-1];t>=e.length&&(n++,t=0);return Cn(o,this.queryMonthCache(n)[0][t])}monthsInYear(n){return this.queryMonthCache(n)[0].length}monthCode(n,t){const e=this.queryLeapMonthByYear(t);return !e||n<e?super.monthCode(n,t):super.monthCode(n-1,t)+(n===e?"L":"")}convertMonthCode(n,t){const e=this.queryLeapMonthByYear(t);let o=/L$/.test(n),r=parseInt(n.substr(1)),i=!1;if(o){const n=Vo[this.id];if(void 0===n)throw new RangeError("Calendar system doesnt support leap months");if(n){if(r!==n-1)throw new RangeError("Invalid leap-month month code")}else if(r<=1||r>=12)throw new RangeError("Invalid leap-month month code")}return !o||e&&r===e-1||(i=!0,o=!1),(o||e&&r>=e)&&r++,[r,i]}inLeapYear(n){const t=Jo(this,n);return t>Jo(this,n-1)&&t>Jo(this,n+1)}guessYearForMonthDay(n,t){let e=1970+this.yearCorrection;const o=e+100;for(;e<o;e++){const[o,r]=this.convertMonthCode(n,e);if(!r&&o<=this.monthsInYear(e)&&t<=this.daysInMonth(e,o))return e}throw new Error("Could not guess year")}normalizeISOYearForMonthDay(n){return n}computeFields(n){const t=this.computeFieldsDumb(n),e=this.queryMonthCache(t.year)[2];return {...t,month:e[t.month]}}computeFieldsDumb(n){const t=re(this.format,n);let e,o,r=parseInt(t.relatedYear||t.year);var i;return t.era&&(i=this.id,void 0!==hn[gn(i)])&&(e=se(t.era),o=r,r=mn(this.id,o,e,!0)),{era:e,eraYear:o,year:r,month:t.month,day:parseInt(t.day)}}queryLeapMonthByYear(n){const t=this.queryMonthCache(n),e=this.queryMonthCache(n-1),o=this.queryMonthCache(n+1);if(t[0].length>e[0].length&&t[0].length>o[0].length){const n=t[1],o=e[1];for(let t=0;t<o.length;t++)if(o[t]!==n[t])return t+1}}queryMonthCache(n){const{monthCacheByYear:t}=this;return t[n]||(t[n]=this.buildMonthCache(n))}buildMonthCache(n){const t=[],e=[],o={};let r=Sn(this.guessISOYear(n),1,1);for(r=Un(r,400);;){const o=this.computeFieldsDumb(r);if(o.year<n)break;r=Un(r,1-o.day),o.year===n&&(t.unshift(r),e.unshift(o.month)),r=Un(r,-1);}for(let n=0;n<e.length;n++)o[e[n]]=n+1;return [t,e,o]}guessISOYear(n){return n-this.yearCorrection}}function _o(n){return new ae("en-US",{calendar:n,era:"short",year:"numeric",month:"short",day:"numeric",timeZone:"UTC"})}const nr=Sn(1868,9,8);const tr={gregory:Gn,japanese:class extends Gn{constructor(){super(...arguments),this.format=_o("japanese");}computeFields(n){const t=super.computeFields(n);if(n>=nr){const e=re(this.format,n);t.era=se(e.era),t.eraYear=parseInt(e.relatedYear||e.year);}return t}},islamic:class extends Xo{guessISOYear(n){return Math.ceil(32*n/33+622)}}},er={iso8601:wn};function or(n){const t=(n=String(n)).toLocaleLowerCase();return er[t]||(er[t]=new(tr[gn(t)]||Xo)(n))}const rr=Sn(1582,10,15),ir=Sn(622,7,18),sr={buddhist:rr,japanese:rr,roc:rr,islamic:ir,"islamic-rgsa":ir,indian:0},ar={};function cr(n,t){return ur(n.div(1e6).toNumber(),t)}function ur(n,t){if(function(n,t){return function(n){let t=ar[n];if(void 0===t){const e=sr[n];if(void 0===e)t=!1;else {let o=or(n);o instanceof Xo||(o=new Xo(n));const r=e-864e5,i=o.computeFields(r);t=r!==o.epochMilliseconds(i.year,i.month,i.day);}ar[n]=t;}return t}(t)&&n<sr[t]}(n,t))throw new RangeError("Invalid timestamp for calendar")}function dr(n,t,e){const o=7+t-e;return -H(Nn(n,1,o)-t,7)+o-1}function lr(n,t,e){const o=dr(n,t,e),r=dr(n+1,t,e);return (Jo(wn,n)-o+r)/7}const[hr,fr]=m$1();class mr extends Y{constructor(n){super(),"islamicc"===n&&(n="islamic-civil"),fr(this,or(n));}static from(n){if(h(n))return function(n){const t=n.calendar;if(void 0===t)return n;if(h(t)&&void 0===t.calendar)return t;return new mr(t)}(n);const t=Bt(String(n),!1,!0);return new mr(t?t.calendar||"iso8601":String(n))}get id(){return this.toString()}era(n){const t=Go(n,!0);return wr(hr(this),t.isoYear,t.isoMonth,t.isoDay).era}eraYear(n){const t=Go(n,!0);return wr(hr(this),t.isoYear,t.isoMonth,t.isoDay).eraYear}year(n){const t=Go(n,!0);return wr(hr(this),t.isoYear,t.isoMonth,t.isoDay).year}month(n){const t=Go(n,!0);return wr(hr(this),t.isoYear,t.isoMonth,t.isoDay).month}monthCode(n){const t=Wo(n,this);return hr(this).monthCode(t.month,t.year)}day(n){const t=Go(n);return wr(hr(this),t.isoYear,t.isoMonth,t.isoDay).day}dayOfWeek(n){const t=Go(n,!0);return Nn(t.isoYear,t.isoMonth,t.isoDay)}dayOfYear(n){const t=Wo(n,this,!0);return Qo(hr(this),t.year,t.month,t.day)}weekOfYear(n){const t=Go(n,!0);return function(n,t,e,o,r){const i=dr(n,o,r),s=Math.floor((Qo(wn,n,t,e)-i-1)/7)+1;if(s<1)return s+lr(n-1,o,r);const a=lr(n,o,r);return s>a?s-a:s}(t.isoYear,t.isoMonth,t.isoDay,1,4)}daysInWeek(n){return Go(n,!0),7}daysInMonth(n){const t=Wo(n,this,!0);return hr(this).daysInMonth(t.year,t.month)}daysInYear(n){const t=Wo(n,this,!0);return Jo(hr(this),t.year)}monthsInYear(n){const t=Wo(n,this,!0);return hr(this).monthsInYear(t.year)}inLeapYear(n){return hr(this).inLeapYear(this.year(n))}dateFromFields(n,t){const e=Ko(u(n,An),hr(this),t);return new Sr(e.isoYear,e.isoMonth,e.isoDay,this)}yearMonthFromFields(n,t){const e=Ko({...u(n,$n),day:1},hr(this),t);return new po(e.isoYear,e.isoMonth,this,e.isoDay)}monthDayFromFields(n,t){const e=hr(this);let{era:o,eraYear:r,year:i,month:s,monthCode:a,day:c}=u(n,Wn);if(void 0===c)throw new TypeError("required property 'day' missing or undefined");if(void 0!==a?i=pn:void 0!==o&&void 0!==r&&(i=mn(e.id,r,o)),void 0===i){if(void 0===a)throw new TypeError("either year or monthCode required with month");i=e.guessYearForMonthDay(a,c);}const d=Ko({year:i,month:s,monthCode:a,day:c},e,t);return new $o(d.isoMonth,d.isoDay,this,e.normalizeISOYearForMonthDay(d.isoYear))}dateAdd(n,e,o){const r=hr(this),i=function(n,e,o,r){n=pt(n=wt(n,e.years,o,r),e.months,o,r);let i=o.epochMilliseconds(n.year,n.month,n.day);const s=Math.trunc(cn(e).div(t).toNumber());return i=Un(i,7*e.weeks+e.days+s),Fn(i)}(N(Sr,n,o),N(ko,e),r,s$1(o));return new Sr(i.isoYear,i.isoMonth,i.isoDay,this)}dateUntil(n,t,e){const o=hr(this),r=N(Sr,n),i=N(Sr,t),s=d(e).largestUnit,a="auto"===s?6:F(s,6,6,9);return br(this,vr(r,i)),xo(function(n,t,e,o){let r=0,i=0,s=0,a=0;switch(o){case 9:r=function(n,t,e){const[,o,r]=qn(t.year,n.month,n.day,e,0),i=xn(t,n),s=P(t.month,o)||P(t.day,r);return t.year-n.year-(s&&i&&s!==i?i:0)}(n,t,e),n=wt(n,r,e,0);case 8:i=function(n,t,e){let o=0;const r=xn(t,n);if(r){let{year:i}=n;for(;i!==t.year;)o+=e.monthsInYear(i)*r,i+=r;const[,s,a]=qn(t.year,n.month,n.day,e,0);o+=t.month-s;const c=P(t.day,a);c&&r&&c!==r&&(o-=r);}return o}(n,t,e),n=pt(n,i,e,0);}a=Cn(e.epochMilliseconds(n.year,n.month,n.day),e.epochMilliseconds(t.year,t.month,t.day)),7===o&&(s=Math.trunc(a/7),a%=7);return nn({years:r,months:i,weeks:s,days:a,hours:0,minutes:0,seconds:0,milliseconds:0,microseconds:0,nanoseconds:0})}(r,i,o,a))}fields(n){return n.slice()}mergeFields(n,t){return yr(n,t)}toString(){return hr(this).id}}function gr(){return new mr("iso8601")}function yr(n,t){var e;const o={...n,...t};if(void 0!==n.year){delete o.era,delete o.eraYear,delete o.year;let e=!1;void 0===t.era&&void 0===t.eraYear||(o.era=t.era,o.eraYear=t.eraYear,e=!0),void 0!==t.year&&(o.year=t.year,e=!0),e||(o.year=n.year);}if(void 0!==n.monthCode){delete o.monthCode,delete o.month;let e=!1;void 0!==t.month&&(o.month=t.month,e=!0),void 0!==t.monthCode&&(o.monthCode=t.monthCode,e=!0),e||(o.monthCode=n.monthCode);}return void 0!==n.day&&(o.day=null!=(e=t.day)?e:n.day),o}function wr(n,t,e,o){const r=Sn(t,e,o);return ur(r,n.id),n.computeFields(r)}function pr(n){return void 0===n.calendar?gr():N(mr,n.calendar)}function vr(n,t){const{calendar:e}=n;return br(e,t.calendar),e}function Mr(n,t){const e=n.calendar,o=t.calendar;if("iso8601"===e.id)return o;if("iso8601"===o.id)return e;if(e.id!==o.id)throw new RangeError("Non-ISO calendars incompatible");return e}function br(n,t){if(n.toString()!==t.toString())throw new RangeError("Calendars must match")}mt(mr,"Calendar");class Sr extends U{constructor(n,t,e,o=gr()){const r=Hn({isoYear:n,isoMonth:t,isoDay:e},1),i=N(mr,o);!function(n,t){const e=Mn(n);Ge(e.add(e.sign()<0?86399999999999:0)),cr(e,t);}(r,i.toString()),super({...r,calendar:i});}static from(n,t){return s$1(t),n instanceof Sr?Ir(n.getISOFields()):"object"==typeof n?be(n,t):Ir(ne(xt(String(n))))}static compare(n,t){return Rn(N(Sr,n),N(Sr,t))}with(n,t){return De(this,n,t)}withCalendar(n){const t=this.getISOFields();return new Sr(t.isoYear,t.isoMonth,t.isoDay,n)}add(n,t){return this.calendar.dateAdd(this,n,t)}subtract(n,t){return this.calendar.dateAdd(this,N(ko,n).negated(),t)}until(n,t){return Fr(this,N(Sr,n),!1,t)}since(n,t){return Fr(this,N(Sr,n),!0,t)}equals(n){return !Rn(this,N(Sr,n))}toString(n){const t=Jn(n),e=this.getISOFields();return nt(e)+rt(e.calendar.toString(),t)}toZonedDateTime(n){const t=function(n){let t,e;if("string"==typeof n)e=n;else {if("object"!=typeof n)throw new TypeError("Invalid options/timeZone argument");if(void 0!==n.id?e=n:(e=n.timeZone,t=n.plainTime),void 0===e)throw new TypeError("Invalid timeZone argument")}return {plainTime:t,timeZone:e}}(n),e=N(we,t.timeZone),o=void 0===t.plainTime?void 0:N(ho,t.plainTime);return Fo({...this.getISOFields(),...o?o.getISOFields():on,timeZone:e})}toPlainDateTime(n){return Ho({...this.getISOFields(),...mo(n).getISOFields()})}toPlainYearMonth(){return vo(this.getISOFields())}toPlainMonthDay(){return this.calendar.monthDayFromFields(this)}}function Ir(n){return new Sr(n.isoYear,n.isoMonth,n.isoDay,n.calendar)}function Fr(n,t,e,o){return xo(Tr(n,t,vr(n,t),e,O(o,6,6,6,9)))}function Or(n,t,e,o,r){return Uo(Dr(n,t,e,r.largestUnit),n,t,e,o,r)}function Tr(n,t,e,o,r){return Uo(e.dateUntil(n,t,{largestUnit:M[r.largestUnit]}),n,t,e,o,r)}function Dr(n,t,e,o){if(!i(o))return Nr(n,t,o);const r=Ir({...n.getISOFields(),calendar:e});let s,a,c,u,d,l=Ir({...t.getISOFields(),calendar:e});do{a=e.dateUntil(r,l,{largestUnit:M[o]}),s=n.add(a),c=Nr(s,t,5),u=a.sign,d=c.sign;}while(u&&d&&u!==d&&(l=l.add({days:d})));return f=c,{sign:(h=a).sign||f.sign,years:h.years+f.years,months:h.months+f.months,weeks:h.weeks+f.weeks,days:h.days+f.days,hours:h.hours+f.hours,minutes:h.minutes+f.minutes,seconds:h.seconds+f.seconds,milliseconds:h.milliseconds+f.milliseconds,microseconds:h.microseconds+f.microseconds,nanoseconds:h.nanoseconds+f.nanoseconds};var h,f;}function Nr(n,t,e){return dn(On(t).sub(On(n)),e)}mt(Sr,"PlainDate"),dt(Sr),ft(Sr,ht),so(Sr,to({year:"numeric",month:"numeric",day:"numeric",weekday:void 0},{hour:void 0,minute:void 0,second:void 0}));class Yr extends E{constructor(n){super();const t=K(n,!0);!function(n){-1!==G(n,Ae)&&1!==G(n,$e)||Zn();}(t),this[vn]=t;}static from(n){if(n instanceof Yr)return new Yr(n.epochNanoseconds);const t=kt(String(n)),e=t.offsetNanoseconds;if(void 0===e)throw new RangeError("Must specify an offset");return new Yr(Mn(Ln(t,1)).sub(e))}static fromEpochSeconds(n){return new Yr(K(n).mult(1e9))}static fromEpochMilliseconds(n){return new Yr(K(n).mult(1e6))}static fromEpochMicroseconds(n){return new Yr(n*BigInt(1e3))}static fromEpochNanoseconds(n){return new Yr(n)}static compare(n,t){return jn(N(Yr,n),N(Yr,t))}add(n){return new Yr(Mt(this[vn],N(ko,n)))}subtract(n){return new Yr(Mt(this[vn],X(N(ko,n))))}until(n,t){return Er(this,N(Yr,n),t)}since(n,t){return Er(N(Yr,n),this,t)}round(n){const t=T(n,0,5,!0);return new Yr(Ve(this[vn],t))}equals(n){return !jn(this,N(Yr,n))}toString(n){const t=d(n).timeZone;return this.toZonedDateTimeISO(null!=t?t:"UTC").toString({...n,offset:void 0===t?"never":"auto",timeZoneName:"never"})+(void 0===t?"Z":"")}toZonedDateTimeISO(n){return new Io(this.epochNanoseconds,n)}toZonedDateTime(n){if(!h(n))throw new TypeError("Must specify options");if(void 0===n.calendar)throw new TypeError("Must specify a calendar");if(void 0===n.timeZone)throw new TypeError("Must specify a timeZone");return new Io(this.epochNanoseconds,n.timeZone,n.calendar)}}function Er(n,t,o){const r=O(o,3,0,0,5);return xo(function(n,t,o){return dn(q(t.sub(n),e[o.smallestUnit]*o.roundingIncrement,o.roundingFunc),o.largestUnit)}(n[vn],t[vn],r))}function Zr(){return Yr.fromEpochMilliseconds(this.valueOf())}mt(Yr,"Instant"),at(Yr),so(Yr,_e({year:"numeric",month:"numeric",day:"numeric",weekday:void 0,hour:"numeric",minute:"2-digit",second:"2-digit"},{timeZoneName:void 0},{}));const Cr=Symbol(),Ur=Symbol(),Pr=Symbol();class Rr extends Intl.DateTimeFormat{constructor(n,t){const e=ce(n),o=function(n){const t={};for(const e in n){let o=n[e];h(o)&&(o=o.toString()),t[e]=o;}return t}(t||{});super(e,o),this[Cr]=e,this[Ur]=o,this[Pr]=new Map;}format(n){const t=xr(this,n);return t[0]===this?super.format(t[1]):t[0].format(t[1])}formatToParts(n){return super.formatToParts.call(...xr(this,n))}formatRange(n,t){return super.formatRange.call(...jr(this,n,t))}formatRangeToParts(n,t){return super.formatRangeToParts.call(...jr(this,n,t))}}const kr=Rr;function xr(n,t){const e=ao(t);if(e){const o=qr(n,e);return [o.buildFormat(t),o.buildEpochMilli(t)]}return [n,t]}function jr(n,t,e){const o=ao(t);if(o!==ao(e))throw new TypeError("Mismatch of types");if(o){const r=qr(n,o);return [r.buildFormat(t,e),new Date(r.buildEpochMilli(t)),new Date(r.buildEpochMilli(e))]}return [n,t,e]}function qr(n,t){const e=n[Pr];let o=e.get(t);return o||(o=function(n){const t={};return {buildFormat:function(e,o){const r=n.buildKey(e,o),i=r.join("|");return t[i]||(t[i]=n.buildFormat(...r))},buildEpochMilli:n.buildEpochMilli}}(t(n[Cr],n[Ur])),e.set(t,o)),o}const Hr={zonedDateTimeISO:function(n){return Fo(Br("iso8601",n))},zonedDateTime:function(n,t){return Fo(Br(n,t))},plainDateTimeISO:function(n){return Ho(Br("iso8601",n))},plainDateTime:function(n,t){return Ho(Br(n,t))},plainDateISO:function(n){return Ir(Br("iso8601",n))},plainDate:function(n,t){return Ir(Br(n,t))},plainTimeISO:function(n){return fo(Br("iso8601",n))},instant:function(){return new Yr($r())},timeZone:Lr};mt(Hr,"Now");function Lr(){return new we((new ae).resolvedOptions().timeZone)}function Br(n,t=Lr()){const e=N(we,t);return {...Oo($r(),e)[0],timeZone:e,calendar:N(mr,n)}}function $r(){return K(Date.now()).mult(1e6)}const Ar={PlainYearMonth:po,PlainMonthDay:$o,PlainDate:Sr,PlainTime:ho,PlainDateTime:qo,ZonedDateTime:Io,Instant:Yr,Calendar:mr,TimeZone:we,Duration:ko,Now:Hr,[Symbol.toStringTag]:"Temporal"};function zr(){return "undefined"!=typeof globalThis?globalThis:window}
|
|
2031
|
+
function clampProp(e, n, t, o, r) {
|
|
2032
|
+
return clampEntity(n, getDefinedProp(e, n), t, o, r);
|
|
2033
|
+
}
|
|
2034
|
+
|
|
2035
|
+
function clampEntity(e, n, t, o, r, i) {
|
|
2036
|
+
const a = clampNumber(n, t, o);
|
|
2037
|
+
if (r && n !== a) {
|
|
2038
|
+
throw new RangeError(numberOutOfRange(e, n, t, o, i));
|
|
2039
|
+
}
|
|
2040
|
+
return a;
|
|
2041
|
+
}
|
|
2042
|
+
|
|
2043
|
+
function getDefinedProp(e, n) {
|
|
2044
|
+
const t = e[n];
|
|
2045
|
+
if (void 0 === t) {
|
|
2046
|
+
throw new TypeError(missingField(n));
|
|
2047
|
+
}
|
|
2048
|
+
return t;
|
|
2049
|
+
}
|
|
2050
|
+
|
|
2051
|
+
function isObjectLike(e) {
|
|
2052
|
+
return null !== e && /object|function/.test(typeof e);
|
|
2053
|
+
}
|
|
2054
|
+
|
|
2055
|
+
function memoize(e, n = Map) {
|
|
2056
|
+
const t = new n;
|
|
2057
|
+
return (n, ...o) => {
|
|
2058
|
+
if (t.has(n)) {
|
|
2059
|
+
return t.get(n);
|
|
2060
|
+
}
|
|
2061
|
+
const r = e(n, ...o);
|
|
2062
|
+
return t.set(n, r), r;
|
|
2063
|
+
};
|
|
2064
|
+
}
|
|
2065
|
+
|
|
2066
|
+
function createNameDescriptors(e) {
|
|
2067
|
+
return createPropDescriptors({
|
|
2068
|
+
name: e
|
|
2069
|
+
}, 1);
|
|
2070
|
+
}
|
|
2071
|
+
|
|
2072
|
+
function createPropDescriptors(e, n) {
|
|
2073
|
+
return mapProps((e => ({
|
|
2074
|
+
value: e,
|
|
2075
|
+
configurable: 1,
|
|
2076
|
+
writable: !n
|
|
2077
|
+
})), e);
|
|
2078
|
+
}
|
|
2079
|
+
|
|
2080
|
+
function createGetterDescriptors(e) {
|
|
2081
|
+
return mapProps((e => ({
|
|
2082
|
+
get: e,
|
|
2083
|
+
configurable: 1
|
|
2084
|
+
})), e);
|
|
2085
|
+
}
|
|
2086
|
+
|
|
2087
|
+
function createStringTagDescriptors(e) {
|
|
2088
|
+
return {
|
|
2089
|
+
[Symbol.toStringTag]: {
|
|
2090
|
+
value: e,
|
|
2091
|
+
configurable: 1
|
|
2092
|
+
}
|
|
2093
|
+
};
|
|
2094
|
+
}
|
|
2095
|
+
|
|
2096
|
+
function zipProps(e, n) {
|
|
2097
|
+
const t = {};
|
|
2098
|
+
let o = e.length;
|
|
2099
|
+
for (const r of n) {
|
|
2100
|
+
t[e[--o]] = r;
|
|
2101
|
+
}
|
|
2102
|
+
return t;
|
|
2103
|
+
}
|
|
2104
|
+
|
|
2105
|
+
function mapProps(e, n, t) {
|
|
2106
|
+
const o = {};
|
|
2107
|
+
for (const r in n) {
|
|
2108
|
+
o[r] = e(n[r], r, t);
|
|
2109
|
+
}
|
|
2110
|
+
return o;
|
|
2111
|
+
}
|
|
2112
|
+
|
|
2113
|
+
function mapPropNames(e, n, t) {
|
|
2114
|
+
const o = {};
|
|
2115
|
+
for (let r = 0; r < n.length; r++) {
|
|
2116
|
+
const i = n[r];
|
|
2117
|
+
o[i] = e(i, r, t);
|
|
2118
|
+
}
|
|
2119
|
+
return o;
|
|
2120
|
+
}
|
|
2121
|
+
|
|
2122
|
+
function remapProps(e, n, t) {
|
|
2123
|
+
const o = {};
|
|
2124
|
+
for (let r = 0; r < e.length; r++) {
|
|
2125
|
+
o[n[r]] = t[e[r]];
|
|
2126
|
+
}
|
|
2127
|
+
return o;
|
|
2128
|
+
}
|
|
2129
|
+
|
|
2130
|
+
function pluckProps(e, n) {
|
|
2131
|
+
const t = {};
|
|
2132
|
+
for (const o of e) {
|
|
2133
|
+
t[o] = n[o];
|
|
2134
|
+
}
|
|
2135
|
+
return t;
|
|
2136
|
+
}
|
|
2137
|
+
|
|
2138
|
+
function excludePropsByName(e, n) {
|
|
2139
|
+
const t = {};
|
|
2140
|
+
for (const o in n) {
|
|
2141
|
+
e.has(o) || (t[o] = n[o]);
|
|
2142
|
+
}
|
|
2143
|
+
return t;
|
|
2144
|
+
}
|
|
2145
|
+
|
|
2146
|
+
function excludeUndefinedProps(e) {
|
|
2147
|
+
e = {
|
|
2148
|
+
...e
|
|
2149
|
+
};
|
|
2150
|
+
const n = Object.keys(e);
|
|
2151
|
+
for (const t of n) {
|
|
2152
|
+
void 0 === e[t] && delete e[t];
|
|
2153
|
+
}
|
|
2154
|
+
return e;
|
|
2155
|
+
}
|
|
2156
|
+
|
|
2157
|
+
function hasAllPropsByName(e, n) {
|
|
2158
|
+
for (const t of n) {
|
|
2159
|
+
if (!(t in e)) {
|
|
2160
|
+
return 0;
|
|
2161
|
+
}
|
|
2162
|
+
}
|
|
2163
|
+
return 1;
|
|
2164
|
+
}
|
|
2165
|
+
|
|
2166
|
+
function allPropsEqual(e, n, t) {
|
|
2167
|
+
for (const o of e) {
|
|
2168
|
+
if (n[o] !== t[o]) {
|
|
2169
|
+
return 0;
|
|
2170
|
+
}
|
|
2171
|
+
}
|
|
2172
|
+
return 1;
|
|
2173
|
+
}
|
|
2174
|
+
|
|
2175
|
+
function bindArgs(e, ...n) {
|
|
2176
|
+
return (...t) => e(...n, ...t);
|
|
2177
|
+
}
|
|
2178
|
+
|
|
2179
|
+
function capitalize(e) {
|
|
2180
|
+
return e[0].toUpperCase() + e.substring(1);
|
|
2181
|
+
}
|
|
2182
|
+
|
|
2183
|
+
function sortStrings(e) {
|
|
2184
|
+
return e.slice().sort();
|
|
2185
|
+
}
|
|
2186
|
+
|
|
2187
|
+
function padNumber(e, n) {
|
|
2188
|
+
return String(n).padStart(e, "0");
|
|
2189
|
+
}
|
|
2190
|
+
|
|
2191
|
+
function compareNumbers(e, n) {
|
|
2192
|
+
return Math.sign(e - n);
|
|
2193
|
+
}
|
|
2194
|
+
|
|
2195
|
+
function clampNumber(e, n, t) {
|
|
2196
|
+
return Math.min(Math.max(e, n), t);
|
|
2197
|
+
}
|
|
2198
|
+
|
|
2199
|
+
function divModFloor(e, n) {
|
|
2200
|
+
return [ Math.floor(e / n), modFloor(e, n) ];
|
|
2201
|
+
}
|
|
2202
|
+
|
|
2203
|
+
function modFloor(e, n) {
|
|
2204
|
+
return (e % n + n) % n;
|
|
2205
|
+
}
|
|
2206
|
+
|
|
2207
|
+
function divModTrunc(e, n) {
|
|
2208
|
+
return [ divTrunc(e, n), modTrunc(e, n) ];
|
|
2209
|
+
}
|
|
2210
|
+
|
|
2211
|
+
function divTrunc(e, n) {
|
|
2212
|
+
return Math.trunc(e / n) || 0;
|
|
2213
|
+
}
|
|
2214
|
+
|
|
2215
|
+
function modTrunc(e, n) {
|
|
2216
|
+
return e % n || 0;
|
|
2217
|
+
}
|
|
2218
|
+
|
|
2219
|
+
function hasHalf(e) {
|
|
2220
|
+
return .5 === Math.abs(e % 1);
|
|
2221
|
+
}
|
|
2222
|
+
|
|
2223
|
+
function givenFieldsToBigNano(e, n, t) {
|
|
2224
|
+
let o = 0, r = 0;
|
|
2225
|
+
for (let i = 0; i <= n; i++) {
|
|
2226
|
+
const n = e[t[i]], a = j[i], s = W / a, [c, u] = divModTrunc(n, s);
|
|
2227
|
+
o += u * a, r += c;
|
|
2228
|
+
}
|
|
2229
|
+
const [i, a] = divModTrunc(o, W);
|
|
2230
|
+
return [ r + i, a ];
|
|
2231
|
+
}
|
|
2232
|
+
|
|
2233
|
+
function nanoToGivenFields(e, n, t) {
|
|
2234
|
+
const o = {};
|
|
2235
|
+
for (let r = n; r >= 0; r--) {
|
|
2236
|
+
const n = j[r];
|
|
2237
|
+
o[t[r]] = divTrunc(e, n), e = modTrunc(e, n);
|
|
2238
|
+
}
|
|
2239
|
+
return o;
|
|
2240
|
+
}
|
|
2241
|
+
|
|
2242
|
+
function getRequiredYearMonthFields(e) {
|
|
2243
|
+
return e === ce ? Q : [];
|
|
2244
|
+
}
|
|
2245
|
+
|
|
2246
|
+
function getRequiredMonthDayFields(e) {
|
|
2247
|
+
return e === ce ? ne : [];
|
|
2248
|
+
}
|
|
2249
|
+
|
|
2250
|
+
function getRequiredDateFields(e) {
|
|
2251
|
+
return e === ce ? [ "year", "day" ] : [];
|
|
2252
|
+
}
|
|
2253
|
+
|
|
2254
|
+
function createBigNano(e, n) {
|
|
2255
|
+
let [t, o] = divModTrunc(n, W), r = e + t;
|
|
2256
|
+
const i = Math.sign(r);
|
|
2257
|
+
return i && i === -Math.sign(o) && (r -= i, o += i * W), [ r, o ];
|
|
2258
|
+
}
|
|
2259
|
+
|
|
2260
|
+
function addBigNanoAndNumber(e, n) {
|
|
2261
|
+
return createBigNano(e[0], e[1] + n);
|
|
2262
|
+
}
|
|
2263
|
+
|
|
2264
|
+
function addBigNanos(e, n, t = 1) {
|
|
2265
|
+
return createBigNano(e[0] + n[0] * t, e[1] + n[1] * t);
|
|
2266
|
+
}
|
|
2267
|
+
|
|
2268
|
+
function diffBigNanos(e, n) {
|
|
2269
|
+
return addBigNanos(n, e, -1);
|
|
2270
|
+
}
|
|
2271
|
+
|
|
2272
|
+
function compareBigNanos(e, n) {
|
|
2273
|
+
return compareNumbers(e[0], n[0]) || compareNumbers(e[1], n[1]);
|
|
2274
|
+
}
|
|
2275
|
+
|
|
2276
|
+
function bigIntToBigNano(e, n = 1) {
|
|
2277
|
+
const t = BigInt(W / n);
|
|
2278
|
+
return [ Number(e / t), Number(e % t) * n ];
|
|
2279
|
+
}
|
|
2280
|
+
|
|
2281
|
+
function numberToBigNano(e, n = 1) {
|
|
2282
|
+
const t = W / n, [o, r] = divModTrunc(e, t);
|
|
2283
|
+
return [ o, r * n ];
|
|
2284
|
+
}
|
|
2285
|
+
|
|
2286
|
+
function bigNanoToBigInt(e, n = 1) {
|
|
2287
|
+
const [t, o] = e, r = Math.floor(o / n), i = W / n;
|
|
2288
|
+
return BigInt(t) * BigInt(i) + BigInt(r);
|
|
2289
|
+
}
|
|
2290
|
+
|
|
2291
|
+
function bigNanoToNumber(e, n = 1, t) {
|
|
2292
|
+
const [o, r] = e, [i, a] = divModTrunc(r, n);
|
|
2293
|
+
return o * (W / n) + (i + (t ? a / n : 0));
|
|
2294
|
+
}
|
|
2295
|
+
|
|
2296
|
+
function divModBigNano(e, n, t = divModFloor) {
|
|
2297
|
+
const [o, r] = e, [i, a] = t(r, n);
|
|
2298
|
+
return [ o * (W / n) + i, a ];
|
|
2299
|
+
}
|
|
2300
|
+
|
|
2301
|
+
function hashIntlFormatParts(e, n) {
|
|
2302
|
+
const t = e.formatToParts(n), o = {};
|
|
2303
|
+
for (const e of t) {
|
|
2304
|
+
o[e.type] = e.value;
|
|
2305
|
+
}
|
|
2306
|
+
return o;
|
|
2307
|
+
}
|
|
2308
|
+
|
|
2309
|
+
function checkIsoYearMonthInBounds(e) {
|
|
2310
|
+
return clampProp(e, "isoYear", Ze, Re, 1), e.isoYear === Ze ? clampProp(e, "isoMonth", 4, 12, 1) : e.isoYear === Re && clampProp(e, "isoMonth", 1, 9, 1),
|
|
2311
|
+
e;
|
|
2312
|
+
}
|
|
2313
|
+
|
|
2314
|
+
function checkIsoDateInBounds(e) {
|
|
2315
|
+
return checkIsoDateTimeInBounds({
|
|
2316
|
+
...e,
|
|
2317
|
+
...be,
|
|
2318
|
+
isoHour: 12
|
|
2319
|
+
}), e;
|
|
2320
|
+
}
|
|
2321
|
+
|
|
2322
|
+
function checkIsoDateTimeInBounds(e) {
|
|
2323
|
+
const n = clampProp(e, "isoYear", Ze, Re, 1), t = n === Ze ? 1 : n === Re ? -1 : 0;
|
|
2324
|
+
return t && checkEpochNanoInBounds(isoToEpochNano({
|
|
2325
|
+
...e,
|
|
2326
|
+
isoDay: e.isoDay + t,
|
|
2327
|
+
isoNanosecond: e.isoNanosecond - t
|
|
2328
|
+
})), e;
|
|
2329
|
+
}
|
|
2330
|
+
|
|
2331
|
+
function checkEpochNanoInBounds(e) {
|
|
2332
|
+
if (!e || -1 === compareBigNanos(e, Ce) || 1 === compareBigNanos(e, Ye)) {
|
|
2333
|
+
throw new RangeError(N);
|
|
2334
|
+
}
|
|
2335
|
+
return e;
|
|
2336
|
+
}
|
|
2337
|
+
|
|
2338
|
+
function isoTimeFieldsToNano(e) {
|
|
2339
|
+
return givenFieldsToBigNano(e, 5, ye)[1];
|
|
2340
|
+
}
|
|
2341
|
+
|
|
2342
|
+
function nanoToIsoTimeAndDay(e) {
|
|
2343
|
+
const [n, t] = divModFloor(e, W);
|
|
2344
|
+
return [ nanoToGivenFields(t, 5, ye), n ];
|
|
2345
|
+
}
|
|
2346
|
+
|
|
2347
|
+
function epochNanoToSec(e) {
|
|
2348
|
+
return epochNanoToSecMod(e)[0];
|
|
2349
|
+
}
|
|
2350
|
+
|
|
2351
|
+
function epochNanoToSecMod(e) {
|
|
2352
|
+
return divModBigNano(e, A);
|
|
2353
|
+
}
|
|
2354
|
+
|
|
2355
|
+
function epochNanoToMilli(e) {
|
|
2356
|
+
return divModBigNano(e, q)[0];
|
|
2357
|
+
}
|
|
2358
|
+
|
|
2359
|
+
function isoToEpochMilli(e) {
|
|
2360
|
+
return isoArgsToEpochMilli(e.isoYear, e.isoMonth, e.isoDay, e.isoHour, e.isoMinute, e.isoSecond, e.isoMillisecond);
|
|
2361
|
+
}
|
|
2362
|
+
|
|
2363
|
+
function isoToEpochNano(e) {
|
|
2364
|
+
const n = isoToEpochMilli(e);
|
|
2365
|
+
if (void 0 !== n) {
|
|
2366
|
+
const [t, o] = divModTrunc(n, R);
|
|
2367
|
+
return [ t, o * q + (e.isoMicrosecond || 0) * z + (e.isoNanosecond || 0) ];
|
|
2368
|
+
}
|
|
2369
|
+
}
|
|
2370
|
+
|
|
2371
|
+
function isoToEpochNanoWithOffset(e, n) {
|
|
2372
|
+
const [t, o] = nanoToIsoTimeAndDay(isoTimeFieldsToNano(e) - n);
|
|
2373
|
+
return checkEpochNanoInBounds(isoToEpochNano({
|
|
2374
|
+
...e,
|
|
2375
|
+
isoDay: e.isoDay + o,
|
|
2376
|
+
...t
|
|
2377
|
+
}));
|
|
2378
|
+
}
|
|
2379
|
+
|
|
2380
|
+
function isoArgsToEpochSec(...e) {
|
|
2381
|
+
return isoArgsToEpochMilli(...e) / Z;
|
|
2382
|
+
}
|
|
2383
|
+
|
|
2384
|
+
function isoArgsToEpochMilli(...e) {
|
|
2385
|
+
const [n, t] = isoToLegacyDate(...e), o = n.getTime();
|
|
2386
|
+
if (!isNaN(o)) {
|
|
2387
|
+
return o - t * R;
|
|
2388
|
+
}
|
|
2389
|
+
}
|
|
2390
|
+
|
|
2391
|
+
function isoToLegacyDate(e, n = 1, t = 1, o = 0, r = 0, i = 0, a = 0) {
|
|
2392
|
+
const s = e === Ze ? 1 : e === Re ? -1 : 0, c = new Date;
|
|
2393
|
+
return c.setUTCHours(o, r, i, a), c.setUTCFullYear(e, n - 1, t + s), [ c, s ];
|
|
2394
|
+
}
|
|
2395
|
+
|
|
2396
|
+
function epochNanoToIso(e, n) {
|
|
2397
|
+
let [t, o] = addBigNanoAndNumber(e, n);
|
|
2398
|
+
o < 0 && (o += W, t -= 1);
|
|
2399
|
+
const [r, i] = divModFloor(o, q), [a, s] = divModFloor(i, z);
|
|
2400
|
+
return {
|
|
2401
|
+
...epochMilliToIso(t * R + r),
|
|
2402
|
+
isoMicrosecond: a,
|
|
2403
|
+
isoNanosecond: s
|
|
2404
|
+
};
|
|
2405
|
+
}
|
|
2406
|
+
|
|
2407
|
+
function epochMilliToIso(e) {
|
|
2408
|
+
const n = Math.ceil(Math.max(0, Math.abs(e) - ke) / R) * Math.sign(e), t = new Date(e - n * R);
|
|
2409
|
+
return zipProps(Pe, [ t.getUTCFullYear(), t.getUTCMonth() + 1, t.getUTCDate() + n, t.getUTCHours(), t.getUTCMinutes(), t.getUTCSeconds(), t.getUTCMilliseconds() ]);
|
|
2410
|
+
}
|
|
2411
|
+
|
|
2412
|
+
function computeIsoMonthsInYear() {
|
|
2413
|
+
return Ae;
|
|
2414
|
+
}
|
|
2415
|
+
|
|
2416
|
+
function computeIsoDaysInMonth(e, n) {
|
|
2417
|
+
switch (n) {
|
|
2418
|
+
case 2:
|
|
2419
|
+
return computeIsoInLeapYear(e) ? 29 : 28;
|
|
2420
|
+
|
|
2421
|
+
case 4:
|
|
2422
|
+
case 6:
|
|
2423
|
+
case 9:
|
|
2424
|
+
case 11:
|
|
2425
|
+
return 30;
|
|
2426
|
+
}
|
|
2427
|
+
return 31;
|
|
2428
|
+
}
|
|
2429
|
+
|
|
2430
|
+
function computeIsoDaysInYear(e) {
|
|
2431
|
+
return computeIsoInLeapYear(e) ? 366 : 365;
|
|
2432
|
+
}
|
|
2433
|
+
|
|
2434
|
+
function computeIsoInLeapYear(e) {
|
|
2435
|
+
return e % 4 == 0 && (e % 100 != 0 || e % 400 == 0);
|
|
2436
|
+
}
|
|
2437
|
+
|
|
2438
|
+
function computeIsoDayOfYear(e) {
|
|
2439
|
+
return diffEpochMilliByDay(isoToEpochMilli((e => ({
|
|
2440
|
+
...e,
|
|
2441
|
+
isoMonth: 1,
|
|
2442
|
+
isoDay: 1,
|
|
2443
|
+
...be
|
|
2444
|
+
}))(e)), isoToEpochMilli({
|
|
2445
|
+
...e,
|
|
2446
|
+
...be
|
|
2447
|
+
})) + 1;
|
|
2448
|
+
}
|
|
2449
|
+
|
|
2450
|
+
function computeIsoDayOfWeek(e) {
|
|
2451
|
+
const [n, t] = isoToLegacyDate(e.isoYear, e.isoMonth, e.isoDay);
|
|
2452
|
+
return modFloor(n.getUTCDay() - t, 7) || 7;
|
|
2453
|
+
}
|
|
2454
|
+
|
|
2455
|
+
function computeGregoryEraParts({isoYear: e}) {
|
|
2456
|
+
return e < 1 ? [ "bce", 1 - e ] : [ "ce", e ];
|
|
2457
|
+
}
|
|
2458
|
+
|
|
2459
|
+
function computeJapaneseEraParts(e) {
|
|
2460
|
+
const n = isoToEpochMilli(e);
|
|
2461
|
+
if (n < Le) {
|
|
2462
|
+
return computeGregoryEraParts(e);
|
|
2463
|
+
}
|
|
2464
|
+
const t = hashIntlFormatParts(Kn(le), n), {era: o, eraYear: r} = parseIntlYear(t, le);
|
|
2465
|
+
return [ o, r ];
|
|
2466
|
+
}
|
|
2467
|
+
|
|
2468
|
+
function checkIsoDateTimeFields(e) {
|
|
2469
|
+
return checkIsoDateFields(e), constrainIsoTimeFields(e, 1), e;
|
|
2470
|
+
}
|
|
2471
|
+
|
|
2472
|
+
function checkIsoDateFields(e) {
|
|
2473
|
+
return constrainIsoDateFields(e, 1), e;
|
|
2474
|
+
}
|
|
2475
|
+
|
|
2476
|
+
function isIsoDateFieldsValid(e) {
|
|
2477
|
+
return allPropsEqual(ve, e, constrainIsoDateFields(e));
|
|
2478
|
+
}
|
|
2479
|
+
|
|
2480
|
+
function constrainIsoDateFields(e, n) {
|
|
2481
|
+
const {isoYear: t} = e, o = clampProp(e, "isoMonth", 1, computeIsoMonthsInYear(), n);
|
|
2482
|
+
return {
|
|
2483
|
+
isoYear: t,
|
|
2484
|
+
isoMonth: o,
|
|
2485
|
+
isoDay: clampProp(e, "isoDay", 1, computeIsoDaysInMonth(t, o), n)
|
|
2486
|
+
};
|
|
2487
|
+
}
|
|
2488
|
+
|
|
2489
|
+
function constrainIsoTimeFields(e, n) {
|
|
2490
|
+
return zipProps(ye, [ clampProp(e, "isoHour", 0, 23, n), clampProp(e, "isoMinute", 0, 59, n), clampProp(e, "isoSecond", 0, 59, n), clampProp(e, "isoMillisecond", 0, 999, n), clampProp(e, "isoMicrosecond", 0, 999, n), clampProp(e, "isoNanosecond", 0, 999, n) ]);
|
|
2491
|
+
}
|
|
2492
|
+
|
|
2493
|
+
function requireStringOrUndefined(e) {
|
|
2494
|
+
if (void 0 !== e) {
|
|
2495
|
+
return We(e);
|
|
2496
|
+
}
|
|
2497
|
+
}
|
|
2498
|
+
|
|
2499
|
+
function requirePositiveIntegerOrUndefined(e) {
|
|
2500
|
+
if (void 0 !== e) {
|
|
2501
|
+
return requirePositiveInteger(e);
|
|
2502
|
+
}
|
|
2503
|
+
}
|
|
2504
|
+
|
|
2505
|
+
function requireIntegerOrUndefined(e) {
|
|
2506
|
+
if (void 0 !== e) {
|
|
2507
|
+
return requireInteger(e);
|
|
2508
|
+
}
|
|
2509
|
+
}
|
|
2510
|
+
|
|
2511
|
+
function requirePositiveInteger(e) {
|
|
2512
|
+
return requireNumberIsPositive(requireInteger(e));
|
|
2513
|
+
}
|
|
2514
|
+
|
|
2515
|
+
function requireInteger(e) {
|
|
2516
|
+
return requireNumberIsInteger($e(e));
|
|
2517
|
+
}
|
|
2518
|
+
|
|
2519
|
+
function requireNonNullish(e) {
|
|
2520
|
+
if (null == e) {
|
|
2521
|
+
throw new TypeError("Cannot be null or undefined");
|
|
2522
|
+
}
|
|
2523
|
+
return e;
|
|
2524
|
+
}
|
|
2525
|
+
|
|
2526
|
+
function requirePropDefined(e, n) {
|
|
2527
|
+
if (null == n) {
|
|
2528
|
+
throw new RangeError(missingField(e));
|
|
2529
|
+
}
|
|
2530
|
+
return n;
|
|
2531
|
+
}
|
|
2532
|
+
|
|
2533
|
+
function requireObjectLike(e) {
|
|
2534
|
+
if (!isObjectLike(e)) {
|
|
2535
|
+
throw new TypeError(n);
|
|
2536
|
+
}
|
|
2537
|
+
return e;
|
|
2538
|
+
}
|
|
2539
|
+
|
|
2540
|
+
function requireType(e, n, t = e) {
|
|
2541
|
+
if (typeof n !== e) {
|
|
2542
|
+
throw new TypeError(invalidEntity(t, n));
|
|
2543
|
+
}
|
|
2544
|
+
return n;
|
|
2545
|
+
}
|
|
2546
|
+
|
|
2547
|
+
function requireNumberIsInteger(e, n = "number") {
|
|
2548
|
+
if (!Number.isInteger(e)) {
|
|
2549
|
+
throw new RangeError(expectedInteger(n, e));
|
|
2550
|
+
}
|
|
2551
|
+
return e || 0;
|
|
2552
|
+
}
|
|
2553
|
+
|
|
2554
|
+
function requireNumberIsPositive(e, n = "number") {
|
|
2555
|
+
if (e <= 0) {
|
|
2556
|
+
throw new RangeError(expectedPositive(n, e));
|
|
2557
|
+
}
|
|
2558
|
+
return e;
|
|
2559
|
+
}
|
|
2560
|
+
|
|
2561
|
+
function toString(n) {
|
|
2562
|
+
if ("symbol" == typeof n) {
|
|
2563
|
+
throw new TypeError(e);
|
|
2564
|
+
}
|
|
2565
|
+
return String(n);
|
|
2566
|
+
}
|
|
2567
|
+
|
|
2568
|
+
function toStringViaPrimitive(e, n) {
|
|
2569
|
+
return isObjectLike(e) ? String(e) : We(e, n);
|
|
2570
|
+
}
|
|
2571
|
+
|
|
2572
|
+
function toBigInt(e) {
|
|
2573
|
+
if ("string" == typeof e) {
|
|
2574
|
+
return BigInt(e);
|
|
2575
|
+
}
|
|
2576
|
+
if ("bigint" != typeof e) {
|
|
2577
|
+
throw new TypeError(invalidBigInt(e));
|
|
2578
|
+
}
|
|
2579
|
+
return e;
|
|
2580
|
+
}
|
|
2581
|
+
|
|
2582
|
+
function toNumber(e, n = "number") {
|
|
2583
|
+
if ("bigint" == typeof e) {
|
|
2584
|
+
throw new TypeError(forbiddenBigIntToNumber(n));
|
|
2585
|
+
}
|
|
2586
|
+
if (e = Number(e), !Number.isFinite(e)) {
|
|
2587
|
+
throw new RangeError(expectedFinite(n, e));
|
|
2588
|
+
}
|
|
2589
|
+
return e;
|
|
2590
|
+
}
|
|
2591
|
+
|
|
2592
|
+
function toInteger(e, n) {
|
|
2593
|
+
return Math.trunc(toNumber(e, n)) || 0;
|
|
2594
|
+
}
|
|
2595
|
+
|
|
2596
|
+
function toStrictInteger(e, n) {
|
|
2597
|
+
return requireNumberIsInteger(toNumber(e, n), n);
|
|
2598
|
+
}
|
|
2599
|
+
|
|
2600
|
+
function toPositiveInteger(e, n) {
|
|
2601
|
+
return requireNumberIsPositive(toInteger(e, n), n);
|
|
2602
|
+
}
|
|
2603
|
+
|
|
2604
|
+
function refineOverflowOptions(e) {
|
|
2605
|
+
return void 0 === e ? 0 : un(requireObjectLike(e));
|
|
2606
|
+
}
|
|
2607
|
+
|
|
2608
|
+
function refineZonedFieldOptions(e, n = 0) {
|
|
2609
|
+
e = normalizeOptions(e);
|
|
2610
|
+
const t = ln(e), o = fn(e, n);
|
|
2611
|
+
return [ un(e), o, t ];
|
|
2612
|
+
}
|
|
2613
|
+
|
|
2614
|
+
function refineEpochDisambigOptions(e) {
|
|
2615
|
+
return ln(normalizeOptions(e));
|
|
2616
|
+
}
|
|
2617
|
+
|
|
2618
|
+
function refineCalendarDiffOptions(e) {
|
|
2619
|
+
return e = normalizeOptions(e), sn(e, 9, 6, 1);
|
|
2620
|
+
}
|
|
2621
|
+
|
|
2622
|
+
function refineDiffOptions(e, n, t, o = 9, r = 0, i = 4) {
|
|
2623
|
+
n = normalizeOptions(n);
|
|
2624
|
+
let a = sn(n, o, r), s = parseRoundingIncInteger(n), c = hn(n, i);
|
|
2625
|
+
const u = an(n, o, r, 1);
|
|
2626
|
+
return null == a ? a = Math.max(t, u) : checkLargestSmallestUnit(a, u), s = refineRoundingInc(s, u, 1),
|
|
2627
|
+
e && (c = (e => e < 4 ? (e + 2) % 4 : e)(c)), [ a, u, s, c ];
|
|
2628
|
+
}
|
|
2629
|
+
|
|
2630
|
+
function refineRoundOptions(e, n = 6, t) {
|
|
2631
|
+
let o = parseRoundingIncInteger(e = normalizeUnitNameOptions(e, He));
|
|
2632
|
+
const r = hn(e, 7);
|
|
2633
|
+
let i = an(e, n);
|
|
2634
|
+
return i = requirePropDefined(He, i), o = refineRoundingInc(o, i, void 0, t), [ i, o, r ];
|
|
2635
|
+
}
|
|
2636
|
+
|
|
2637
|
+
function refineDateDisplayOptions(e) {
|
|
2638
|
+
return dn(normalizeOptions(e));
|
|
2639
|
+
}
|
|
2640
|
+
|
|
2641
|
+
function refineTimeDisplayOptions(e, n) {
|
|
2642
|
+
return refineTimeDisplayTuple(normalizeOptions(e), n);
|
|
2643
|
+
}
|
|
2644
|
+
|
|
2645
|
+
function refineTimeDisplayTuple(e, n = 4) {
|
|
2646
|
+
const t = refineSubsecDigits(e);
|
|
2647
|
+
return [ hn(e, 4), ...refineSmallestUnitAndSubsecDigits(an(e, n), t) ];
|
|
2648
|
+
}
|
|
2649
|
+
|
|
2650
|
+
function refineSmallestUnitAndSubsecDigits(e, n) {
|
|
2651
|
+
return null != e ? [ j[e], e < 4 ? 9 - 3 * e : -1 ] : [ void 0 === n ? 1 : 10 ** (9 - n), n ];
|
|
2652
|
+
}
|
|
2653
|
+
|
|
2654
|
+
function parseRoundingIncInteger(e) {
|
|
2655
|
+
const n = e[Ve];
|
|
2656
|
+
return void 0 === n ? 1 : toInteger(n, Ve);
|
|
2657
|
+
}
|
|
2658
|
+
|
|
2659
|
+
function refineRoundingInc(e, n, t, o) {
|
|
2660
|
+
const r = o ? W : j[n + 1];
|
|
2661
|
+
if (r) {
|
|
2662
|
+
const t = j[n];
|
|
2663
|
+
if (r % ((e = clampEntity(Ve, e, 1, r / t - (o ? 0 : 1), 1)) * t)) {
|
|
2664
|
+
throw new RangeError(invalidEntity(Ve, e));
|
|
2665
|
+
}
|
|
2666
|
+
} else {
|
|
2667
|
+
e = clampEntity(Ve, e, 1, t ? 10 ** 9 : 1, 1);
|
|
2668
|
+
}
|
|
2669
|
+
return e;
|
|
2670
|
+
}
|
|
2671
|
+
|
|
2672
|
+
function refineSubsecDigits(e) {
|
|
2673
|
+
let n = e[_e];
|
|
2674
|
+
if (void 0 !== n) {
|
|
2675
|
+
if ("number" != typeof n) {
|
|
2676
|
+
if ("auto" === toString(n)) {
|
|
2677
|
+
return;
|
|
2678
|
+
}
|
|
2679
|
+
throw new RangeError(invalidEntity(_e, n));
|
|
2680
|
+
}
|
|
2681
|
+
n = clampEntity(_e, Math.floor(n), 0, 9, 1);
|
|
2682
|
+
}
|
|
2683
|
+
return n;
|
|
2684
|
+
}
|
|
2685
|
+
|
|
2686
|
+
function normalizeOptions(e) {
|
|
2687
|
+
return void 0 === e ? {} : requireObjectLike(e);
|
|
2688
|
+
}
|
|
2689
|
+
|
|
2690
|
+
function normalizeUnitNameOptions(e, n) {
|
|
2691
|
+
return "string" == typeof e ? {
|
|
2692
|
+
[n]: e
|
|
2693
|
+
} : requireObjectLike(e);
|
|
2694
|
+
}
|
|
2695
|
+
|
|
2696
|
+
function copyOptions(e) {
|
|
2697
|
+
if (void 0 !== e) {
|
|
2698
|
+
if (isObjectLike(e)) {
|
|
2699
|
+
return Object.assign(Object.create(null), e);
|
|
2700
|
+
}
|
|
2701
|
+
throw new TypeError(n);
|
|
2702
|
+
}
|
|
2703
|
+
}
|
|
2704
|
+
|
|
2705
|
+
function overrideOverflowOptions(e, n) {
|
|
2706
|
+
return e && Object.assign(Object.create(null), e, {
|
|
2707
|
+
overflow: Qe[n]
|
|
2708
|
+
});
|
|
2709
|
+
}
|
|
2710
|
+
|
|
2711
|
+
function refineUnitOption(e, n, t = 9, o = 0, r) {
|
|
2712
|
+
let i = n[e];
|
|
2713
|
+
if (void 0 === i) {
|
|
2714
|
+
return r ? o : void 0;
|
|
2715
|
+
}
|
|
2716
|
+
if (i = toString(i), "auto" === i) {
|
|
2717
|
+
return r ? o : null;
|
|
2718
|
+
}
|
|
2719
|
+
let a = Y[i];
|
|
2720
|
+
if (void 0 === a && (a = Ie[i]), void 0 === a) {
|
|
2721
|
+
throw new RangeError(invalidChoice(e, i, Y));
|
|
2722
|
+
}
|
|
2723
|
+
return clampEntity(e, a, o, t, 1, C), a;
|
|
2724
|
+
}
|
|
2725
|
+
|
|
2726
|
+
function refineChoiceOption(e, n, t, o = 0) {
|
|
2727
|
+
const r = t[e];
|
|
2728
|
+
if (void 0 === r) {
|
|
2729
|
+
return o;
|
|
2730
|
+
}
|
|
2731
|
+
const i = toString(r), a = n[i];
|
|
2732
|
+
if (void 0 === a) {
|
|
2733
|
+
throw new RangeError(invalidChoice(e, i, n));
|
|
2734
|
+
}
|
|
2735
|
+
return a;
|
|
2736
|
+
}
|
|
2737
|
+
|
|
2738
|
+
function checkLargestSmallestUnit(e, n) {
|
|
2739
|
+
if (n > e) {
|
|
2740
|
+
throw new RangeError(F);
|
|
2741
|
+
}
|
|
2742
|
+
}
|
|
2743
|
+
|
|
2744
|
+
function createInstantSlots(e) {
|
|
2745
|
+
return {
|
|
2746
|
+
branding: yn,
|
|
2747
|
+
epochNanoseconds: e
|
|
2748
|
+
};
|
|
2749
|
+
}
|
|
2750
|
+
|
|
2751
|
+
function createZonedDateTimeSlots(e, n, t) {
|
|
2752
|
+
return {
|
|
2753
|
+
branding: Nn,
|
|
2754
|
+
calendar: t,
|
|
2755
|
+
timeZone: n,
|
|
2756
|
+
epochNanoseconds: e
|
|
2757
|
+
};
|
|
2758
|
+
}
|
|
2759
|
+
|
|
2760
|
+
function createPlainDateTimeSlots(e, n = e.calendar) {
|
|
2761
|
+
return {
|
|
2762
|
+
branding: In,
|
|
2763
|
+
calendar: n,
|
|
2764
|
+
...pluckProps(Fe, e)
|
|
2765
|
+
};
|
|
2766
|
+
}
|
|
2767
|
+
|
|
2768
|
+
function createPlainDateSlots(e, n = e.calendar) {
|
|
2769
|
+
return {
|
|
2770
|
+
branding: Dn,
|
|
2771
|
+
calendar: n,
|
|
2772
|
+
...pluckProps(Ee, e)
|
|
2773
|
+
};
|
|
2774
|
+
}
|
|
2775
|
+
|
|
2776
|
+
function createPlainYearMonthSlots(e, n = e.calendar) {
|
|
2777
|
+
return {
|
|
2778
|
+
branding: Tn,
|
|
2779
|
+
calendar: n,
|
|
2780
|
+
...pluckProps(Ee, e)
|
|
2781
|
+
};
|
|
2782
|
+
}
|
|
2783
|
+
|
|
2784
|
+
function createPlainMonthDaySlots(e, n = e.calendar) {
|
|
2785
|
+
return {
|
|
2786
|
+
branding: gn,
|
|
2787
|
+
calendar: n,
|
|
2788
|
+
...pluckProps(Ee, e)
|
|
2789
|
+
};
|
|
2790
|
+
}
|
|
2791
|
+
|
|
2792
|
+
function createPlainTimeSlots(e) {
|
|
2793
|
+
return {
|
|
2794
|
+
branding: Mn,
|
|
2795
|
+
...pluckProps(Se, e)
|
|
2796
|
+
};
|
|
2797
|
+
}
|
|
2798
|
+
|
|
2799
|
+
function createDurationSlots(e) {
|
|
2800
|
+
return {
|
|
2801
|
+
branding: vn,
|
|
2802
|
+
sign: computeDurationSign(e),
|
|
2803
|
+
...pluckProps(he, e)
|
|
2804
|
+
};
|
|
2805
|
+
}
|
|
2806
|
+
|
|
2807
|
+
function getEpochSeconds(e) {
|
|
2808
|
+
return epochNanoToSec(e.epochNanoseconds);
|
|
2809
|
+
}
|
|
2810
|
+
|
|
2811
|
+
function getEpochMilliseconds(e) {
|
|
2812
|
+
return epochNanoToMilli(e.epochNanoseconds);
|
|
2813
|
+
}
|
|
2814
|
+
|
|
2815
|
+
function getEpochMicroseconds(e) {
|
|
2816
|
+
return bigNanoToBigInt(e.epochNanoseconds, z);
|
|
2817
|
+
}
|
|
2818
|
+
|
|
2819
|
+
function getEpochNanoseconds(e) {
|
|
2820
|
+
return bigNanoToBigInt(e.epochNanoseconds);
|
|
2821
|
+
}
|
|
2822
|
+
|
|
2823
|
+
function getId(e) {
|
|
2824
|
+
return "string" == typeof e ? e : We(e.id);
|
|
2825
|
+
}
|
|
2826
|
+
|
|
2827
|
+
function isIdLikeEqual(e, n) {
|
|
2828
|
+
return e === n || getId(e) === getId(n);
|
|
2829
|
+
}
|
|
2830
|
+
|
|
2831
|
+
function createRelativeSystem(e, n, t) {
|
|
2832
|
+
const o = e(t.calendar);
|
|
2833
|
+
return t.epochNanoseconds ? [ t, o, n(t.timeZone) ] : [ {
|
|
2834
|
+
...t,
|
|
2835
|
+
...be
|
|
2836
|
+
}, o ];
|
|
2837
|
+
}
|
|
2838
|
+
|
|
2839
|
+
function relativeMarkerToEpochNano(e, n) {
|
|
2840
|
+
return n ? e.epochNanoseconds : isoToEpochNano(e);
|
|
2841
|
+
}
|
|
2842
|
+
|
|
2843
|
+
function totalDuration(e, n, t, o, r) {
|
|
2844
|
+
const i = getLargestDurationUnit(o), [a, s] = ((e, n) => {
|
|
2845
|
+
const t = n((e = normalizeUnitNameOptions(e, Ge))[Je]);
|
|
2846
|
+
let o = cn(e);
|
|
2847
|
+
return o = requirePropDefined(Ge, o), [ o, t ];
|
|
2848
|
+
})(r, e), c = Math.max(a, i);
|
|
2849
|
+
if (c < 6 || 6 === c && (!s || !s.epochNanoseconds)) {
|
|
2850
|
+
return ((e, n) => totalBigNano(durationFieldsToBigNano(e), n))(o, a);
|
|
2851
|
+
}
|
|
2852
|
+
if (!s) {
|
|
2853
|
+
throw new RangeError(P);
|
|
2854
|
+
}
|
|
2855
|
+
const u = createRelativeSystem(n, t, s);
|
|
2856
|
+
return ((e, n, t, o, r, i) => {
|
|
2857
|
+
const a = computeDurationSign(e), [s, c] = clampRelativeDuration(clearDurationFields(e, t - 1), t, a, o, r, i), u = computeEpochNanoFrac(s, c, n);
|
|
2858
|
+
return e[pe[t]] + u * a;
|
|
2859
|
+
})(...spanDuration(o, void 0, a, ...u), a, ...u);
|
|
2860
|
+
}
|
|
2861
|
+
|
|
2862
|
+
function totalBigNano(e, n) {
|
|
2863
|
+
return bigNanoToNumber(e, j[n], 1);
|
|
2864
|
+
}
|
|
2865
|
+
|
|
2866
|
+
function clampRelativeDuration(e, n, t, o, r, i) {
|
|
2867
|
+
const a = {
|
|
2868
|
+
...Me,
|
|
2869
|
+
[pe[n]]: t
|
|
2870
|
+
}, s = moveRelativeMarker(e, o, r, i), c = moveRelativeMarker(a, s, r, i);
|
|
2871
|
+
return [ relativeMarkerToEpochNano(s, i), relativeMarkerToEpochNano(c, i) ];
|
|
2872
|
+
}
|
|
2873
|
+
|
|
2874
|
+
function computeEpochNanoFrac(e, n, t) {
|
|
2875
|
+
const o = bigNanoToNumber(diffBigNanos(e, n));
|
|
2876
|
+
if (!o) {
|
|
2877
|
+
throw new RangeError(m);
|
|
2878
|
+
}
|
|
2879
|
+
return bigNanoToNumber(diffBigNanos(e, t)) / o;
|
|
2880
|
+
}
|
|
2881
|
+
|
|
2882
|
+
function roundInstant(e, n) {
|
|
2883
|
+
const [t, o, r] = refineRoundOptions(n, 5, 1);
|
|
2884
|
+
return createInstantSlots(roundBigNano(e.epochNanoseconds, t, o, r, 1));
|
|
2885
|
+
}
|
|
2886
|
+
|
|
2887
|
+
function roundZonedDateTime(e, n, t) {
|
|
2888
|
+
let {epochNanoseconds: o, timeZone: r, calendar: i} = n;
|
|
2889
|
+
const [a, s, c] = refineRoundOptions(t);
|
|
2890
|
+
if (0 === a && 1 === s) {
|
|
2891
|
+
return n;
|
|
2892
|
+
}
|
|
2893
|
+
const u = e(r), l = u.getOffsetNanosecondsFor(o);
|
|
2894
|
+
let f = {
|
|
2895
|
+
...epochNanoToIso(o, l),
|
|
2896
|
+
calendar: i
|
|
2897
|
+
};
|
|
2898
|
+
return f = {
|
|
2899
|
+
calendar: i,
|
|
2900
|
+
...roundDateTime(f, a, s, c, u)
|
|
2901
|
+
}, o = getMatchingInstantFor(u, f, l, 2, 0, 1), createZonedDateTimeSlots(o, r, i);
|
|
2902
|
+
}
|
|
2903
|
+
|
|
2904
|
+
function roundPlainDateTime(e, n) {
|
|
2905
|
+
return createPlainDateTimeSlots(roundDateTime(e, ...refineRoundOptions(n)), e.calendar);
|
|
2906
|
+
}
|
|
2907
|
+
|
|
2908
|
+
function roundPlainTime(e, n) {
|
|
2909
|
+
return createPlainTimeSlots(((e, n, t, o) => roundTimeToNano(e, computeNanoInc(n, t), o)[0])(e, ...refineRoundOptions(n, 5)));
|
|
2910
|
+
}
|
|
2911
|
+
|
|
2912
|
+
function roundDateTime(e, n, t, o, r) {
|
|
2913
|
+
return 6 === n ? ((e, n, t) => {
|
|
2914
|
+
if (n) {
|
|
2915
|
+
const o = computeTimeInDay(n, e);
|
|
2916
|
+
return checkIsoDateTimeInBounds({
|
|
2917
|
+
...moveByIsoDays(e, roundByInc(isoTimeFieldsToNano(e), o, t) / o),
|
|
2918
|
+
...be
|
|
2919
|
+
});
|
|
2920
|
+
}
|
|
2921
|
+
return roundDateTimeToNano(e, W, t);
|
|
2922
|
+
})(e, r, o) : roundDateTimeToNano(e, computeNanoInc(n, t), o);
|
|
2923
|
+
}
|
|
2924
|
+
|
|
2925
|
+
function roundDateTimeToNano(e, n, t) {
|
|
2926
|
+
const [o, r] = roundTimeToNano(e, n, t);
|
|
2927
|
+
return checkIsoDateTimeInBounds({
|
|
2928
|
+
...moveByIsoDays(e, r),
|
|
2929
|
+
...o
|
|
2930
|
+
});
|
|
2931
|
+
}
|
|
2932
|
+
|
|
2933
|
+
function roundTimeToNano(e, n, t) {
|
|
2934
|
+
return nanoToIsoTimeAndDay(roundByInc(isoTimeFieldsToNano(e), n, t));
|
|
2935
|
+
}
|
|
2936
|
+
|
|
2937
|
+
function balanceDayTimeDuration(e, n, t, o, r) {
|
|
2938
|
+
return nanoToDurationDayTimeFields(roundBigNano(durationFieldsToBigNano(e), t, o, r), n);
|
|
2939
|
+
}
|
|
2940
|
+
|
|
2941
|
+
function balanceDayTimeDurationByInc(e, n, t, o) {
|
|
2942
|
+
return nanoToDurationDayTimeFields(roundBigNanoByInc(durationFieldsToBigNano(e, n), t, o), n);
|
|
2943
|
+
}
|
|
2944
|
+
|
|
2945
|
+
function roundRelativeDuration(e, n, t, o, r, i, a, s, c) {
|
|
2946
|
+
const u = o > 6 ? nudgeRelativeDuration : c && o < 6 ? nudgeRelativeDurationTime : nudgeDurationDayTime;
|
|
2947
|
+
let [l, f, d] = u(e, n, t, o, r, i, a, s, c);
|
|
2948
|
+
return d && (l = ((e, n, t, o, r, i, a) => {
|
|
2949
|
+
const s = computeDurationSign(e);
|
|
2950
|
+
for (let c = o + 1; c <= t; c++) {
|
|
2951
|
+
if (7 === c && 7 !== t) {
|
|
2952
|
+
continue;
|
|
2953
|
+
}
|
|
2954
|
+
const o = clearDurationFields(e, c - 1);
|
|
2955
|
+
o[pe[c]] += s;
|
|
2956
|
+
const u = bigNanoToNumber(diffBigNanos(relativeMarkerToEpochNano(moveRelativeMarker(o, r, i, a), a), n));
|
|
2957
|
+
if (u && Math.sign(u) !== s) {
|
|
2958
|
+
break;
|
|
2959
|
+
}
|
|
2960
|
+
e = o;
|
|
2961
|
+
}
|
|
2962
|
+
return e;
|
|
2963
|
+
})(l, f, t, Math.max(6, o), a, s, c)), l;
|
|
2964
|
+
}
|
|
2965
|
+
|
|
2966
|
+
function computeNanoInc(e, n) {
|
|
2967
|
+
return j[e] * n;
|
|
2968
|
+
}
|
|
2969
|
+
|
|
2970
|
+
function roundByInc(e, n, t) {
|
|
2971
|
+
return ((e, n) => Pn[n](e))(e / n, t) * n;
|
|
2972
|
+
}
|
|
2973
|
+
|
|
2974
|
+
function roundToMinute(e) {
|
|
2975
|
+
return roundByInc(e, L, 7);
|
|
2976
|
+
}
|
|
2977
|
+
|
|
2978
|
+
function roundBigNano(e, n, t, o, r) {
|
|
2979
|
+
return 6 === n ? [ roundByInc(totalBigNano(e, 6), t, o), 0 ] : roundBigNanoByInc(e, computeNanoInc(n, t), o, r);
|
|
2980
|
+
}
|
|
2981
|
+
|
|
2982
|
+
function roundBigNanoByInc(e, n, t, o) {
|
|
2983
|
+
let [r, i] = e;
|
|
2984
|
+
o && i < 0 && (i += W, r -= 1);
|
|
2985
|
+
const [a, s] = divModFloor(roundByInc(i, n, t), W);
|
|
2986
|
+
return createBigNano(r + a, s);
|
|
2987
|
+
}
|
|
2988
|
+
|
|
2989
|
+
function nudgeDurationDayTime(e, n, t, o, r, i) {
|
|
2990
|
+
const a = computeDurationSign(e), s = durationFieldsToBigNano(e), c = roundBigNano(s, o, r, i), u = diffBigNanos(s, c), l = Math.sign(c[0] - s[0]) === a, f = nanoToDurationDayTimeFields(c, Math.min(t, 6));
|
|
2991
|
+
return [ {
|
|
2992
|
+
...e,
|
|
2993
|
+
...f
|
|
2994
|
+
}, addBigNanos(n, u), l ];
|
|
2995
|
+
}
|
|
2996
|
+
|
|
2997
|
+
function nudgeRelativeDurationTime(e, n, t, o, r, i, a, s, c) {
|
|
2998
|
+
const u = computeDurationSign(e);
|
|
2999
|
+
let [l, f] = givenFieldsToBigNano(e, 5, pe);
|
|
3000
|
+
const d = computeNanoInc(o, r);
|
|
3001
|
+
let m = roundByInc(f, d, i);
|
|
3002
|
+
const [p, h] = clampRelativeDuration({
|
|
3003
|
+
...e,
|
|
3004
|
+
...Ne
|
|
3005
|
+
}, 6, u, a, s, c), T = m - bigNanoToNumber(diffBigNanos(p, h));
|
|
3006
|
+
T && Math.sign(T) !== u ? n = addBigNanoAndNumber(p, m) : (l += u, m = roundByInc(T, d, i),
|
|
3007
|
+
n = addBigNanoAndNumber(h, m));
|
|
3008
|
+
const g = nanoToDurationTimeFields(m);
|
|
3009
|
+
return [ {
|
|
3010
|
+
...e,
|
|
3011
|
+
...g,
|
|
3012
|
+
days: e.days + l
|
|
3013
|
+
}, n, Boolean(l) ];
|
|
3014
|
+
}
|
|
3015
|
+
|
|
3016
|
+
function nudgeRelativeDuration(e, n, t, o, r, i, a, s, c) {
|
|
3017
|
+
const u = computeDurationSign(e), l = pe[o], f = clearDurationFields(e, o - 1), d = divTrunc(e[l], r) * r;
|
|
3018
|
+
f[l] = d;
|
|
3019
|
+
const [m, p] = clampRelativeDuration(f, o, r * u, a, s, c), h = d + computeEpochNanoFrac(m, p, n) * u * r, T = roundByInc(h, r, i), g = Math.sign(T - h) === u;
|
|
3020
|
+
return f[l] = T, [ f, g ? p : m, g ];
|
|
3021
|
+
}
|
|
3022
|
+
|
|
3023
|
+
function formatInstantIso(e, n, t, o) {
|
|
3024
|
+
const [r, i, a, s] = (e => {
|
|
3025
|
+
const n = refineTimeDisplayTuple(e = normalizeOptions(e));
|
|
3026
|
+
return [ e.timeZone, ...n ];
|
|
3027
|
+
})(o), c = void 0 !== r;
|
|
3028
|
+
return ((e, n, t, o, r, i) => {
|
|
3029
|
+
t = roundBigNanoByInc(t, r, o, 1);
|
|
3030
|
+
const a = n.getOffsetNanosecondsFor(t);
|
|
3031
|
+
return formatIsoDateTimeFields(epochNanoToIso(t, a), i) + (e ? formatOffsetNano(roundToMinute(a)) : "Z");
|
|
3032
|
+
})(c, n(c ? e(r) : En), t.epochNanoseconds, i, a, s);
|
|
3033
|
+
}
|
|
3034
|
+
|
|
3035
|
+
function formatZonedDateTimeIso(e, n, t) {
|
|
3036
|
+
return ((e, n, t, o, r, i, a, s, c, u) => {
|
|
3037
|
+
o = roundBigNanoByInc(o, c, s, 1);
|
|
3038
|
+
const l = e(t).getOffsetNanosecondsFor(o);
|
|
3039
|
+
return formatIsoDateTimeFields(epochNanoToIso(o, l), u) + formatOffsetNano(roundToMinute(l), a) + ((e, n) => 1 !== n ? "[" + (2 === n ? "!" : "") + getId(e) + "]" : "")(t, i) + formatCalendar(n, r);
|
|
3040
|
+
})(e, n.calendar, n.timeZone, n.epochNanoseconds, ...(e => {
|
|
3041
|
+
e = normalizeOptions(e);
|
|
3042
|
+
const n = dn(e), t = refineSubsecDigits(e), o = pn(e), r = hn(e, 4), i = an(e, 4);
|
|
3043
|
+
return [ n, mn(e), o, r, ...refineSmallestUnitAndSubsecDigits(i, t) ];
|
|
3044
|
+
})(t));
|
|
3045
|
+
}
|
|
3046
|
+
|
|
3047
|
+
function formatPlainDateTimeIso(e, n) {
|
|
3048
|
+
return ((e, n, t, o, r, i) => formatIsoDateTimeFields(roundDateTimeToNano(n, r, o), i) + formatCalendar(e, t))(e.calendar, e, ...(e => (e = normalizeOptions(e),
|
|
3049
|
+
[ dn(e), ...refineTimeDisplayTuple(e) ]))(n));
|
|
3050
|
+
}
|
|
3051
|
+
|
|
3052
|
+
function formatPlainDateIso(e, n) {
|
|
3053
|
+
return t = e.calendar, o = e, r = refineDateDisplayOptions(n), formatIsoDateFields(o) + formatCalendar(t, r);
|
|
3054
|
+
var t, o, r;
|
|
3055
|
+
}
|
|
3056
|
+
|
|
3057
|
+
function formatPlainYearMonthIso(e, n) {
|
|
3058
|
+
return formatDateLikeIso(e.calendar, formatIsoYearMonthFields, e, refineDateDisplayOptions(n));
|
|
3059
|
+
}
|
|
3060
|
+
|
|
3061
|
+
function formatPlainMonthDayIso(e, n) {
|
|
3062
|
+
return formatDateLikeIso(e.calendar, formatIsoMonthDayFields, e, refineDateDisplayOptions(n));
|
|
3063
|
+
}
|
|
3064
|
+
|
|
3065
|
+
function formatPlainTimeIso(e, n) {
|
|
3066
|
+
return ((e, n, t, o) => formatIsoTimeFields(roundTimeToNano(e, t, n)[0], o))(e, ...refineTimeDisplayOptions(n));
|
|
3067
|
+
}
|
|
3068
|
+
|
|
3069
|
+
function formatDurationIso(e, n) {
|
|
3070
|
+
const [t, o, r] = refineTimeDisplayOptions(n, 3);
|
|
3071
|
+
return o > 1 && (e = {
|
|
3072
|
+
...e,
|
|
3073
|
+
...balanceDayTimeDurationByInc(e, Math.min(getLargestDurationUnit(e), 6), o, t)
|
|
3074
|
+
}), ((e, n) => {
|
|
3075
|
+
const {sign: t} = e, o = -1 === t ? negateDurationFields(e) : e, {hours: r, minutes: i} = o, [a, s] = divModBigNano(givenFieldsToBigNano(o, 3, pe), A, divModTrunc);
|
|
3076
|
+
checkDurationTimeUnit(a);
|
|
3077
|
+
const c = formatSubsecNano(s, n), u = n >= 0 || !t || c;
|
|
3078
|
+
return (t < 0 ? "-" : "") + "P" + formatDurationFragments({
|
|
3079
|
+
Y: formatDurationNumber(o.years),
|
|
3080
|
+
M: formatDurationNumber(o.months),
|
|
3081
|
+
W: formatDurationNumber(o.weeks),
|
|
3082
|
+
D: formatDurationNumber(o.days)
|
|
3083
|
+
}) + (r || i || a || u ? "T" + formatDurationFragments({
|
|
3084
|
+
H: formatDurationNumber(r),
|
|
3085
|
+
M: formatDurationNumber(i),
|
|
3086
|
+
S: formatDurationNumber(a, u) + c
|
|
3087
|
+
}) : "");
|
|
3088
|
+
})(e, r);
|
|
3089
|
+
}
|
|
3090
|
+
|
|
3091
|
+
function formatDateLikeIso(e, n, t, o) {
|
|
3092
|
+
const r = getId(e), i = o > 1 || 0 === o && r !== ce;
|
|
3093
|
+
return 1 === o ? r === ce ? n(t) : formatIsoDateFields(t) : i ? formatIsoDateFields(t) + formatCalendarId(r, 2 === o) : n(t);
|
|
3094
|
+
}
|
|
3095
|
+
|
|
3096
|
+
function formatDurationFragments(e) {
|
|
3097
|
+
const n = [];
|
|
3098
|
+
for (const t in e) {
|
|
3099
|
+
const o = e[t];
|
|
3100
|
+
o && n.push(o, t);
|
|
3101
|
+
}
|
|
3102
|
+
return n.join("");
|
|
3103
|
+
}
|
|
3104
|
+
|
|
3105
|
+
function formatIsoDateTimeFields(e, n) {
|
|
3106
|
+
return formatIsoDateFields(e) + "T" + formatIsoTimeFields(e, n);
|
|
3107
|
+
}
|
|
3108
|
+
|
|
3109
|
+
function formatIsoDateFields(e) {
|
|
3110
|
+
return formatIsoYearMonthFields(e) + "-" + k(e.isoDay);
|
|
3111
|
+
}
|
|
3112
|
+
|
|
3113
|
+
function formatIsoYearMonthFields(e) {
|
|
3114
|
+
const {isoYear: n} = e;
|
|
3115
|
+
return (n < 0 || n > 9999 ? getSignStr(n) + padNumber(6, Math.abs(n)) : padNumber(4, n)) + "-" + k(e.isoMonth);
|
|
3116
|
+
}
|
|
3117
|
+
|
|
3118
|
+
function formatIsoMonthDayFields(e) {
|
|
3119
|
+
return k(e.isoMonth) + "-" + k(e.isoDay);
|
|
3120
|
+
}
|
|
3121
|
+
|
|
3122
|
+
function formatIsoTimeFields(e, n) {
|
|
3123
|
+
const t = [ k(e.isoHour), k(e.isoMinute) ];
|
|
3124
|
+
return -1 !== n && t.push(k(e.isoSecond) + ((e, n, t, o) => formatSubsecNano(e * q + n * z + t, o))(e.isoMillisecond, e.isoMicrosecond, e.isoNanosecond, n)),
|
|
3125
|
+
t.join(":");
|
|
3126
|
+
}
|
|
3127
|
+
|
|
3128
|
+
function formatOffsetNano(e, n = 0) {
|
|
3129
|
+
if (1 === n) {
|
|
3130
|
+
return "";
|
|
3131
|
+
}
|
|
3132
|
+
const [t, o] = divModFloor(Math.abs(e), U), [r, i] = divModFloor(o, L), [a, s] = divModFloor(i, A);
|
|
3133
|
+
return getSignStr(e) + k(t) + ":" + k(r) + (a || s ? ":" + k(a) + formatSubsecNano(s) : "");
|
|
3134
|
+
}
|
|
3135
|
+
|
|
3136
|
+
function formatCalendar(e, n) {
|
|
3137
|
+
if (1 !== n) {
|
|
3138
|
+
const t = getId(e);
|
|
3139
|
+
if (n > 1 || 0 === n && t !== ce) {
|
|
3140
|
+
return formatCalendarId(t, 2 === n);
|
|
3141
|
+
}
|
|
3142
|
+
}
|
|
3143
|
+
return "";
|
|
3144
|
+
}
|
|
3145
|
+
|
|
3146
|
+
function formatCalendarId(e, n) {
|
|
3147
|
+
return "[" + (n ? "!" : "") + "u-ca=" + e + "]";
|
|
3148
|
+
}
|
|
3149
|
+
|
|
3150
|
+
function formatSubsecNano(e, n) {
|
|
3151
|
+
let t = padNumber(9, e);
|
|
3152
|
+
return t = void 0 === n ? t.replace(On, "") : t.slice(0, n), t ? "." + t : "";
|
|
3153
|
+
}
|
|
3154
|
+
|
|
3155
|
+
function getSignStr(e) {
|
|
3156
|
+
return e < 0 ? "-" : "+";
|
|
3157
|
+
}
|
|
3158
|
+
|
|
3159
|
+
function formatDurationNumber(e, n) {
|
|
3160
|
+
return e || n ? e.toLocaleString("fullwide", {
|
|
3161
|
+
useGrouping: 0
|
|
3162
|
+
}) : "";
|
|
3163
|
+
}
|
|
3164
|
+
|
|
3165
|
+
function _zonedEpochSlotsToIso(e, n) {
|
|
3166
|
+
const {epochNanoseconds: t} = e, o = (n.getOffsetNanosecondsFor ? n : n(e.timeZone)).getOffsetNanosecondsFor(t), r = epochNanoToIso(t, o);
|
|
3167
|
+
return {
|
|
3168
|
+
calendar: e.calendar,
|
|
3169
|
+
...r,
|
|
3170
|
+
offsetNanoseconds: o
|
|
3171
|
+
};
|
|
3172
|
+
}
|
|
3173
|
+
|
|
3174
|
+
function buildZonedIsoFields(e, n) {
|
|
3175
|
+
const t = wn(n, e);
|
|
3176
|
+
return {
|
|
3177
|
+
calendar: n.calendar,
|
|
3178
|
+
...pluckProps(Fe, t),
|
|
3179
|
+
offset: formatOffsetNano(t.offsetNanoseconds),
|
|
3180
|
+
timeZone: n.timeZone
|
|
3181
|
+
};
|
|
3182
|
+
}
|
|
3183
|
+
|
|
3184
|
+
function getMatchingInstantFor(e, n, t, o = 0, r = 0, i, a) {
|
|
3185
|
+
if (void 0 !== t && 1 === o && (1 === o || a)) {
|
|
3186
|
+
return isoToEpochNanoWithOffset(n, t);
|
|
3187
|
+
}
|
|
3188
|
+
const s = e.getPossibleInstantsFor(n);
|
|
3189
|
+
if (void 0 !== t && 3 !== o) {
|
|
3190
|
+
const e = ((e, n, t, o) => {
|
|
3191
|
+
const r = isoToEpochNano(n);
|
|
3192
|
+
o && (t = roundToMinute(t));
|
|
3193
|
+
for (const n of e) {
|
|
3194
|
+
let e = bigNanoToNumber(diffBigNanos(n, r));
|
|
3195
|
+
if (o && (e = roundToMinute(e)), e === t) {
|
|
3196
|
+
return n;
|
|
3197
|
+
}
|
|
3198
|
+
}
|
|
3199
|
+
})(s, n, t, i);
|
|
3200
|
+
if (void 0 !== e) {
|
|
3201
|
+
return e;
|
|
3202
|
+
}
|
|
3203
|
+
if (0 === o) {
|
|
3204
|
+
throw new RangeError(I);
|
|
3205
|
+
}
|
|
3206
|
+
}
|
|
3207
|
+
return a ? isoToEpochNano(n) : getSingleInstantFor(e, n, r, s);
|
|
3208
|
+
}
|
|
3209
|
+
|
|
3210
|
+
function getSingleInstantFor(e, n, t = 0, o = e.getPossibleInstantsFor(n)) {
|
|
3211
|
+
if (1 === o.length) {
|
|
3212
|
+
return o[0];
|
|
3213
|
+
}
|
|
3214
|
+
if (1 === t) {
|
|
3215
|
+
throw new RangeError(M);
|
|
3216
|
+
}
|
|
3217
|
+
if (o.length) {
|
|
3218
|
+
return o[3 === t ? 1 : 0];
|
|
3219
|
+
}
|
|
3220
|
+
const r = isoToEpochNano(n), i = ((e, n) => {
|
|
3221
|
+
const t = e.getOffsetNanosecondsFor(addBigNanoAndNumber(n, -W));
|
|
3222
|
+
return validateTimeZoneGap(e.getOffsetNanosecondsFor(addBigNanoAndNumber(n, W)) - t);
|
|
3223
|
+
})(e, r), a = i * (2 === t ? -1 : 1);
|
|
3224
|
+
return (o = e.getPossibleInstantsFor(epochNanoToIso(r, a)))[2 === t ? 0 : o.length - 1];
|
|
3225
|
+
}
|
|
3226
|
+
|
|
3227
|
+
function computeStartOfDay(e, n) {
|
|
3228
|
+
let {epochNanoseconds: t, timeZone: o, calendar: r} = n;
|
|
3229
|
+
const i = e(o);
|
|
3230
|
+
return t = getMatchingInstantFor(i, {
|
|
3231
|
+
...wn(n, i),
|
|
3232
|
+
...be
|
|
3233
|
+
}, void 0, 0, 0, 1), createZonedDateTimeSlots(t, o, r);
|
|
3234
|
+
}
|
|
3235
|
+
|
|
3236
|
+
function computeHoursInDay(e, n) {
|
|
3237
|
+
const t = e(n.timeZone);
|
|
3238
|
+
return computeTimeInDay(t, wn(n, t), U);
|
|
3239
|
+
}
|
|
3240
|
+
|
|
3241
|
+
function computeTimeInDay(e, n, t) {
|
|
3242
|
+
n = {
|
|
3243
|
+
...n,
|
|
3244
|
+
...be
|
|
3245
|
+
};
|
|
3246
|
+
const o = bigNanoToNumber(diffBigNanos(getSingleInstantFor(e, {
|
|
3247
|
+
...n,
|
|
3248
|
+
...be
|
|
3249
|
+
}), getSingleInstantFor(e, {
|
|
3250
|
+
...moveByIsoDays(n, 1),
|
|
3251
|
+
...be
|
|
3252
|
+
})), t, 1);
|
|
3253
|
+
if (o <= 0) {
|
|
3254
|
+
throw new RangeError(m);
|
|
3255
|
+
}
|
|
3256
|
+
return o;
|
|
3257
|
+
}
|
|
3258
|
+
|
|
3259
|
+
function validateTimeZoneOffset(e) {
|
|
3260
|
+
if (Math.abs(e) >= W) {
|
|
3261
|
+
throw new RangeError(g);
|
|
3262
|
+
}
|
|
3263
|
+
return e;
|
|
3264
|
+
}
|
|
3265
|
+
|
|
3266
|
+
function validateTimeZoneGap(e) {
|
|
3267
|
+
if (e > W) {
|
|
3268
|
+
throw new RangeError(D$1);
|
|
3269
|
+
}
|
|
3270
|
+
return e;
|
|
3271
|
+
}
|
|
3272
|
+
|
|
3273
|
+
function moveInstant(e, n, t) {
|
|
3274
|
+
return createInstantSlots(checkEpochNanoInBounds(addBigNanos(n.epochNanoseconds, (e => {
|
|
3275
|
+
if (durationHasDateParts(e)) {
|
|
3276
|
+
throw new RangeError(E);
|
|
3277
|
+
}
|
|
3278
|
+
return durationFieldsToBigNano(e, 5);
|
|
3279
|
+
})(e ? negateDurationFields(t) : t))));
|
|
3280
|
+
}
|
|
3281
|
+
|
|
3282
|
+
function moveZonedDateTime(e, n, t, o, r, i = Object.create(null)) {
|
|
3283
|
+
const a = n(o.timeZone), s = moveZonedEpochSlots(e(o.calendar), a, o, t ? negateDurationFields(r) : r, i);
|
|
3284
|
+
return {
|
|
3285
|
+
...o,
|
|
3286
|
+
epochNanoseconds: s
|
|
3287
|
+
};
|
|
3288
|
+
}
|
|
3289
|
+
|
|
3290
|
+
function movePlainDateTime(e, n, t, o, r = Object.create(null)) {
|
|
3291
|
+
const {calendar: i} = t;
|
|
3292
|
+
return createPlainDateTimeSlots(moveDateTime(e(i), t, n ? negateDurationFields(o) : o, r), i);
|
|
3293
|
+
}
|
|
3294
|
+
|
|
3295
|
+
function movePlainDate(e, n, t, o, r) {
|
|
3296
|
+
const {calendar: i} = t;
|
|
3297
|
+
return createPlainDateSlots(moveDateEfficient(e(i), t, n ? negateDurationFields(o) : o, r), i);
|
|
3298
|
+
}
|
|
3299
|
+
|
|
3300
|
+
function movePlainYearMonth(e, n, t, o, r = Object.create(null)) {
|
|
3301
|
+
const i = t.calendar, a = e(i);
|
|
3302
|
+
let s = moveToMonthStart(a, t);
|
|
3303
|
+
n && (o = negateDuration(o)), o.sign < 0 && (s = a.dateAdd(s, {
|
|
3304
|
+
...Me,
|
|
3305
|
+
months: 1
|
|
3306
|
+
}), s = moveByIsoDays(s, -1));
|
|
3307
|
+
const c = a.dateAdd(s, o, r);
|
|
3308
|
+
return createPlainYearMonthSlots(moveToMonthStart(a, c), i);
|
|
3309
|
+
}
|
|
3310
|
+
|
|
3311
|
+
function movePlainTime(e, n, t) {
|
|
3312
|
+
return createPlainTimeSlots(moveTime(n, e ? negateDurationFields(t) : t)[0]);
|
|
3313
|
+
}
|
|
3314
|
+
|
|
3315
|
+
function moveRelativeMarker(e, n, t, o) {
|
|
3316
|
+
return o ? {
|
|
3317
|
+
epochNanoseconds: moveZonedEpochSlots(t, o, n, e)
|
|
3318
|
+
} : moveDateTime(t, n, e);
|
|
3319
|
+
}
|
|
3320
|
+
|
|
3321
|
+
function moveZonedEpochSlots(e, n, t, o, r) {
|
|
3322
|
+
const i = durationFieldsToBigNano(o, 5);
|
|
3323
|
+
let a = t.epochNanoseconds;
|
|
3324
|
+
if (durationHasDateParts(o)) {
|
|
3325
|
+
const s = wn(t, n);
|
|
3326
|
+
a = addBigNanos(getSingleInstantFor(n, {
|
|
3327
|
+
...moveDateEfficient(e, s, {
|
|
3328
|
+
...o,
|
|
3329
|
+
...Ne
|
|
3330
|
+
}, r),
|
|
3331
|
+
...pluckProps(ye, s),
|
|
3332
|
+
calendar: ce
|
|
3333
|
+
}), i);
|
|
3334
|
+
} else {
|
|
3335
|
+
a = addBigNanos(a, i), refineOverflowOptions(r);
|
|
3336
|
+
}
|
|
3337
|
+
return checkEpochNanoInBounds(a);
|
|
3338
|
+
}
|
|
3339
|
+
|
|
3340
|
+
function moveDateTime(e, n, t, o) {
|
|
3341
|
+
const [r, i] = moveTime(n, t);
|
|
3342
|
+
return checkIsoDateTimeInBounds({
|
|
3343
|
+
...moveDateEfficient(e, n, {
|
|
3344
|
+
...t,
|
|
3345
|
+
...Ne,
|
|
3346
|
+
days: t.days + i
|
|
3347
|
+
}, o),
|
|
3348
|
+
...r
|
|
3349
|
+
});
|
|
3350
|
+
}
|
|
3351
|
+
|
|
3352
|
+
function moveDateEfficient(e, n, t, o) {
|
|
3353
|
+
if (t.years || t.months || t.weeks) {
|
|
3354
|
+
return e.dateAdd(n, t, o);
|
|
3355
|
+
}
|
|
3356
|
+
refineOverflowOptions(o);
|
|
3357
|
+
const r = t.days + givenFieldsToBigNano(t, 5, pe)[0];
|
|
3358
|
+
return r ? checkIsoDateInBounds(moveByIsoDays(n, r)) : n;
|
|
3359
|
+
}
|
|
3360
|
+
|
|
3361
|
+
function moveToMonthStart(e, n) {
|
|
3362
|
+
return moveByIsoDays(n, 1 - e.day(n));
|
|
3363
|
+
}
|
|
3364
|
+
|
|
3365
|
+
function moveTime(e, n) {
|
|
3366
|
+
const [t, o] = givenFieldsToBigNano(n, 5, pe), [r, i] = nanoToIsoTimeAndDay(isoTimeFieldsToNano(e) + o);
|
|
3367
|
+
return [ r, t + i ];
|
|
3368
|
+
}
|
|
3369
|
+
|
|
3370
|
+
function moveByIsoDays(e, n) {
|
|
3371
|
+
return n && (e = epochMilliToIso(isoToEpochMilli(e) + n * R)), e;
|
|
3372
|
+
}
|
|
3373
|
+
|
|
3374
|
+
function spanDuration(e, n, t, o, r, i) {
|
|
3375
|
+
let a = moveRelativeMarker(e, o, r, i);
|
|
3376
|
+
n && (a = moveRelativeMarker(n, a, r, i));
|
|
3377
|
+
const s = ((e, n, t, o, r) => r ? ((e, n, t, o, r) => {
|
|
3378
|
+
const i = compareBigNanos(o.epochNanoseconds, t.epochNanoseconds);
|
|
3379
|
+
return i ? r < 6 ? diffEpochNanoExact(t.epochNanoseconds, o.epochNanoseconds, r) : diffZonedEpochNanoViaCalendar(e, n, i, t, o, r, void 0) : Me;
|
|
3380
|
+
})(o, r, n, t, e) : ((e, n, t, o) => {
|
|
3381
|
+
const r = isoToEpochNano(n), i = isoToEpochNano(t), a = compareBigNanos(i, r);
|
|
3382
|
+
return a ? o <= 6 ? diffEpochNanoExact(r, i, o) : diffDateTimesViaCalendar(e, a, n, t, o, void 0) : Me;
|
|
3383
|
+
})(o, n, t, e))(t, o, a, r, i);
|
|
3384
|
+
return [ s, relativeMarkerToEpochNano(a, i) ];
|
|
3385
|
+
}
|
|
3386
|
+
|
|
3387
|
+
function addDurations(e, n, t, o, r, i, a) {
|
|
3388
|
+
const s = e(normalizeOptions(a).relativeTo), c = Math.max(getLargestDurationUnit(r), getLargestDurationUnit(i));
|
|
3389
|
+
if (c < 6 || 6 === c && (!s || !s.epochNanoseconds)) {
|
|
3390
|
+
return createDurationSlots(checkDurationUnits(((e, n, t, o) => {
|
|
3391
|
+
const r = addBigNanos(durationFieldsToBigNano(e), durationFieldsToBigNano(n), o ? -1 : 1);
|
|
3392
|
+
if (!Number.isFinite(r[0])) {
|
|
3393
|
+
throw new RangeError(N);
|
|
3394
|
+
}
|
|
3395
|
+
return {
|
|
3396
|
+
...Me,
|
|
3397
|
+
...nanoToDurationDayTimeFields(r, t)
|
|
3398
|
+
};
|
|
3399
|
+
})(r, i, c, o)));
|
|
3400
|
+
}
|
|
3401
|
+
if (!s) {
|
|
3402
|
+
throw new RangeError(P);
|
|
3403
|
+
}
|
|
3404
|
+
return o && (i = negateDurationFields(i)), createDurationSlots(spanDuration(r, i, c, ...createRelativeSystem(n, t, s))[0]);
|
|
3405
|
+
}
|
|
3406
|
+
|
|
3407
|
+
function roundDuration(e, n, t, o, r) {
|
|
3408
|
+
const i = getLargestDurationUnit(o), [a, s, c, u, l] = ((e, n, t) => {
|
|
3409
|
+
e = normalizeUnitNameOptions(e, He);
|
|
3410
|
+
let o = sn(e);
|
|
3411
|
+
const r = t(e[Je]);
|
|
3412
|
+
let i = parseRoundingIncInteger(e);
|
|
3413
|
+
const a = hn(e, 7);
|
|
3414
|
+
let s = an(e);
|
|
3415
|
+
if (void 0 === o && void 0 === s) {
|
|
3416
|
+
throw new RangeError(S);
|
|
3417
|
+
}
|
|
3418
|
+
return null == s && (s = 0), null == o && (o = Math.max(s, n)), checkLargestSmallestUnit(o, s),
|
|
3419
|
+
i = refineRoundingInc(i, s, 1), [ o, s, i, a, r ];
|
|
3420
|
+
})(r, i, e), f = Math.max(i, a);
|
|
3421
|
+
if (f < 6 || 6 === f && (!l || !l.epochNanoseconds)) {
|
|
3422
|
+
return createDurationSlots(checkDurationUnits(((e, n, t, o, r) => ({
|
|
3423
|
+
...Me,
|
|
3424
|
+
...balanceDayTimeDuration(e, n, t, o, r)
|
|
3425
|
+
}))(o, a, s, c, u)));
|
|
3426
|
+
}
|
|
3427
|
+
if (!l) {
|
|
3428
|
+
throw new RangeError(P);
|
|
3429
|
+
}
|
|
3430
|
+
const d = createRelativeSystem(n, t, l);
|
|
3431
|
+
let p = 0;
|
|
3432
|
+
o.weeks && 7 === s && (p = o.weeks, o = {
|
|
3433
|
+
...o,
|
|
3434
|
+
weeks: 0
|
|
3435
|
+
});
|
|
3436
|
+
let [h, T] = spanDuration(o, void 0, a, ...d);
|
|
3437
|
+
const g = o.sign, D = computeDurationSign(h);
|
|
3438
|
+
if (g && D && g !== D) {
|
|
3439
|
+
throw new RangeError(m);
|
|
3440
|
+
}
|
|
3441
|
+
return !D || 0 === s && 1 === c || (h = roundRelativeDuration(h, T, a, s, c, u, ...d)),
|
|
3442
|
+
h.weeks += p, createDurationSlots(h);
|
|
3443
|
+
}
|
|
3444
|
+
|
|
3445
|
+
function absDuration(e) {
|
|
3446
|
+
return -1 === e.sign ? negateDuration(e) : e;
|
|
3447
|
+
}
|
|
3448
|
+
|
|
3449
|
+
function negateDuration(e) {
|
|
3450
|
+
return createDurationSlots(negateDurationFields(e));
|
|
3451
|
+
}
|
|
3452
|
+
|
|
3453
|
+
function negateDurationFields(e) {
|
|
3454
|
+
const n = {};
|
|
3455
|
+
for (const t of pe) {
|
|
3456
|
+
n[t] = -1 * e[t] || 0;
|
|
3457
|
+
}
|
|
3458
|
+
return n;
|
|
3459
|
+
}
|
|
3460
|
+
|
|
3461
|
+
function getDurationBlank(e) {
|
|
3462
|
+
return !e.sign;
|
|
3463
|
+
}
|
|
3464
|
+
|
|
3465
|
+
function computeDurationSign(e, n = pe) {
|
|
3466
|
+
let t = 0;
|
|
3467
|
+
for (const o of n) {
|
|
3468
|
+
const n = Math.sign(e[o]);
|
|
3469
|
+
if (n) {
|
|
3470
|
+
if (t && t !== n) {
|
|
3471
|
+
throw new RangeError(v);
|
|
3472
|
+
}
|
|
3473
|
+
t = n;
|
|
3474
|
+
}
|
|
3475
|
+
}
|
|
3476
|
+
return t;
|
|
3477
|
+
}
|
|
3478
|
+
|
|
3479
|
+
function checkDurationUnits(e) {
|
|
3480
|
+
for (const n of De) {
|
|
3481
|
+
clampEntity(n, e[n], -Bn, Bn, 1);
|
|
3482
|
+
}
|
|
3483
|
+
return checkDurationTimeUnit(bigNanoToNumber(durationFieldsToBigNano(e), A)), e;
|
|
3484
|
+
}
|
|
3485
|
+
|
|
3486
|
+
function checkDurationTimeUnit(e) {
|
|
3487
|
+
if (!Number.isSafeInteger(e)) {
|
|
3488
|
+
throw new RangeError(y);
|
|
3489
|
+
}
|
|
3490
|
+
}
|
|
3491
|
+
|
|
3492
|
+
function durationFieldsToBigNano(e, n = 6) {
|
|
3493
|
+
return givenFieldsToBigNano(e, n, pe);
|
|
3494
|
+
}
|
|
3495
|
+
|
|
3496
|
+
function nanoToDurationDayTimeFields(e, n = 6) {
|
|
3497
|
+
const [t, o] = e, r = nanoToGivenFields(o, n, pe);
|
|
3498
|
+
if (r[pe[n]] += t * (W / j[n]), !Number.isFinite(r[pe[n]])) {
|
|
3499
|
+
throw new RangeError(N);
|
|
3500
|
+
}
|
|
3501
|
+
return r;
|
|
3502
|
+
}
|
|
3503
|
+
|
|
3504
|
+
function nanoToDurationTimeFields(e, n = 5) {
|
|
3505
|
+
return nanoToGivenFields(e, n, pe);
|
|
3506
|
+
}
|
|
3507
|
+
|
|
3508
|
+
function clearDurationFields(e, n) {
|
|
3509
|
+
const t = {
|
|
3510
|
+
...e
|
|
3511
|
+
};
|
|
3512
|
+
for (let e = 0; e <= n; e++) {
|
|
3513
|
+
t[pe[e]] = 0;
|
|
3514
|
+
}
|
|
3515
|
+
return t;
|
|
3516
|
+
}
|
|
3517
|
+
|
|
3518
|
+
function durationHasDateParts(e) {
|
|
3519
|
+
return Boolean(computeDurationSign(e, ge));
|
|
3520
|
+
}
|
|
3521
|
+
|
|
3522
|
+
function getLargestDurationUnit(e) {
|
|
3523
|
+
let n = 9;
|
|
3524
|
+
for (;n > 0 && !e[pe[n]]; n--) {}
|
|
3525
|
+
return n;
|
|
3526
|
+
}
|
|
3527
|
+
|
|
3528
|
+
function createSplitTuple(e, n) {
|
|
3529
|
+
return [ e, n ];
|
|
3530
|
+
}
|
|
3531
|
+
|
|
3532
|
+
function computePeriod(e) {
|
|
3533
|
+
const n = Math.floor(e / Sn) * Sn;
|
|
3534
|
+
return [ n, n + Sn ];
|
|
3535
|
+
}
|
|
3536
|
+
|
|
3537
|
+
function parseInstant(e) {
|
|
3538
|
+
const n = parseDateTimeLike(e = toStringViaPrimitive(e));
|
|
3539
|
+
if (!n) {
|
|
3540
|
+
throw new RangeError(failedParse(e));
|
|
3541
|
+
}
|
|
3542
|
+
let t;
|
|
3543
|
+
if (n.o) {
|
|
3544
|
+
t = 0;
|
|
3545
|
+
} else {
|
|
3546
|
+
if (!n.offset) {
|
|
3547
|
+
throw new RangeError(failedParse(e));
|
|
3548
|
+
}
|
|
3549
|
+
t = parseOffsetNano(n.offset);
|
|
3550
|
+
}
|
|
3551
|
+
return n.timeZone && parseOffsetNanoMaybe(n.timeZone, 1), createInstantSlots(isoToEpochNanoWithOffset(checkIsoDateTimeFields(n), t));
|
|
3552
|
+
}
|
|
3553
|
+
|
|
3554
|
+
function parseRelativeToSlots(e) {
|
|
3555
|
+
const n = parseDateTimeLike(We(e));
|
|
3556
|
+
if (!n) {
|
|
3557
|
+
throw new RangeError(failedParse(e));
|
|
3558
|
+
}
|
|
3559
|
+
if (n.timeZone) {
|
|
3560
|
+
return finalizeZonedDateTime(n, n.offset ? parseOffsetNano(n.offset) : void 0);
|
|
3561
|
+
}
|
|
3562
|
+
if (n.o) {
|
|
3563
|
+
throw new RangeError(failedParse(e));
|
|
3564
|
+
}
|
|
3565
|
+
return finalizeDate(n);
|
|
3566
|
+
}
|
|
3567
|
+
|
|
3568
|
+
function parseZonedDateTime(e, n) {
|
|
3569
|
+
const t = parseDateTimeLike(We(e));
|
|
3570
|
+
if (!t || !t.timeZone) {
|
|
3571
|
+
throw new RangeError(failedParse(e));
|
|
3572
|
+
}
|
|
3573
|
+
const {offset: o} = t, r = o ? parseOffsetNano(o) : void 0, [, i, a] = refineZonedFieldOptions(n);
|
|
3574
|
+
return finalizeZonedDateTime(t, r, i, a);
|
|
3575
|
+
}
|
|
3576
|
+
|
|
3577
|
+
function parseOffsetNano(e) {
|
|
3578
|
+
const n = parseOffsetNanoMaybe(e);
|
|
3579
|
+
if (void 0 === n) {
|
|
3580
|
+
throw new RangeError(failedParse(e));
|
|
3581
|
+
}
|
|
3582
|
+
return n;
|
|
3583
|
+
}
|
|
3584
|
+
|
|
3585
|
+
function parsePlainDateTime(e) {
|
|
3586
|
+
const n = parseDateTimeLike(We(e));
|
|
3587
|
+
if (!n || n.o) {
|
|
3588
|
+
throw new RangeError(failedParse(e));
|
|
3589
|
+
}
|
|
3590
|
+
return createPlainDateTimeSlots(finalizeDateTime(n));
|
|
3591
|
+
}
|
|
3592
|
+
|
|
3593
|
+
function parsePlainDate(e) {
|
|
3594
|
+
const n = parseDateTimeLike(We(e));
|
|
3595
|
+
if (!n || n.o) {
|
|
3596
|
+
throw new RangeError(failedParse(e));
|
|
3597
|
+
}
|
|
3598
|
+
return createPlainDateSlots(n.i ? finalizeDateTime(n) : finalizeDate(n));
|
|
3599
|
+
}
|
|
3600
|
+
|
|
3601
|
+
function parsePlainYearMonth(e, n) {
|
|
3602
|
+
const t = parseYearMonthOnly(We(n));
|
|
3603
|
+
if (t) {
|
|
3604
|
+
return requireIsoCalendar(t), createPlainYearMonthSlots(checkIsoYearMonthInBounds(checkIsoDateFields(t)));
|
|
3605
|
+
}
|
|
3606
|
+
const o = parsePlainDate(n), r = moveToMonthStart(e(o.calendar), o);
|
|
3607
|
+
return createPlainYearMonthSlots({
|
|
3608
|
+
...o,
|
|
3609
|
+
...r
|
|
3610
|
+
});
|
|
3611
|
+
}
|
|
3612
|
+
|
|
3613
|
+
function requireIsoCalendar(e) {
|
|
3614
|
+
if (e.calendar !== ce) {
|
|
3615
|
+
throw new RangeError(invalidSubstring(e.calendar));
|
|
3616
|
+
}
|
|
3617
|
+
}
|
|
3618
|
+
|
|
3619
|
+
function parsePlainMonthDay(e, n) {
|
|
3620
|
+
const t = parseMonthDayOnly(We(n));
|
|
3621
|
+
if (t) {
|
|
3622
|
+
return requireIsoCalendar(t), createPlainMonthDaySlots(checkIsoDateFields(t));
|
|
3623
|
+
}
|
|
3624
|
+
const o = parsePlainDate(n), {calendar: r} = o, i = e(r), [a, s, c] = i.u(o), [u, l] = i.l(a, s), [f, d] = i.m(u, l, c);
|
|
3625
|
+
return createPlainMonthDaySlots(i.p(f, d, c), r);
|
|
3626
|
+
}
|
|
3627
|
+
|
|
3628
|
+
function parsePlainTime(e) {
|
|
3629
|
+
let n, t = (e => {
|
|
3630
|
+
const n = $n.exec(e);
|
|
3631
|
+
return n ? (organizeAnnotationParts(n[10]), organizeTimeParts(n)) : void 0;
|
|
3632
|
+
})(We(e));
|
|
3633
|
+
if (!t) {
|
|
3634
|
+
if (t = parseDateTimeLike(e), !t) {
|
|
3635
|
+
throw new RangeError(failedParse(e));
|
|
3636
|
+
}
|
|
3637
|
+
if (!t.i) {
|
|
3638
|
+
throw new RangeError(failedParse(e));
|
|
3639
|
+
}
|
|
3640
|
+
if (t.o) {
|
|
3641
|
+
throw new RangeError(invalidSubstring("Z"));
|
|
3642
|
+
}
|
|
3643
|
+
requireIsoCalendar(t);
|
|
3644
|
+
}
|
|
3645
|
+
if ((n = parseYearMonthOnly(e)) && isIsoDateFieldsValid(n)) {
|
|
3646
|
+
throw new RangeError(failedParse(e));
|
|
3647
|
+
}
|
|
3648
|
+
if ((n = parseMonthDayOnly(e)) && isIsoDateFieldsValid(n)) {
|
|
3649
|
+
throw new RangeError(failedParse(e));
|
|
3650
|
+
}
|
|
3651
|
+
return createPlainTimeSlots(constrainIsoTimeFields(t, 1));
|
|
3652
|
+
}
|
|
3653
|
+
|
|
3654
|
+
function parseDuration(e) {
|
|
3655
|
+
const n = (e => {
|
|
3656
|
+
const n = Gn.exec(e);
|
|
3657
|
+
return n ? (e => {
|
|
3658
|
+
function parseUnit(e, r, i) {
|
|
3659
|
+
let a = 0, s = 0;
|
|
3660
|
+
if (i && ([a, o] = divModFloor(o, j[i])), void 0 !== e) {
|
|
3661
|
+
if (t) {
|
|
3662
|
+
throw new RangeError(invalidSubstring(e));
|
|
3663
|
+
}
|
|
3664
|
+
s = (e => {
|
|
3665
|
+
const n = parseInt(e);
|
|
3666
|
+
if (!Number.isFinite(n)) {
|
|
3667
|
+
throw new RangeError(invalidSubstring(e));
|
|
3668
|
+
}
|
|
3669
|
+
return n;
|
|
3670
|
+
})(e), n = 1, r && (o = parseSubsecNano(r) * (j[i] / A), t = 1);
|
|
3671
|
+
}
|
|
3672
|
+
return a + s;
|
|
3673
|
+
}
|
|
3674
|
+
let n = 0, t = 0, o = 0, r = {
|
|
3675
|
+
...zipProps(pe, [ parseUnit(e[2]), parseUnit(e[3]), parseUnit(e[4]), parseUnit(e[5]), parseUnit(e[6], e[7], 5), parseUnit(e[8], e[9], 4), parseUnit(e[10], e[11], 3) ]),
|
|
3676
|
+
...nanoToGivenFields(o, 2, pe)
|
|
3677
|
+
};
|
|
3678
|
+
if (!n) {
|
|
3679
|
+
throw new RangeError(noValidFields(pe));
|
|
3680
|
+
}
|
|
3681
|
+
return parseSign(e[1]) < 0 && (r = negateDurationFields(r)), r;
|
|
3682
|
+
})(n) : void 0;
|
|
3683
|
+
})(We(e));
|
|
3684
|
+
if (!n) {
|
|
3685
|
+
throw new RangeError(failedParse(e));
|
|
3686
|
+
}
|
|
3687
|
+
return createDurationSlots(checkDurationUnits(n));
|
|
3688
|
+
}
|
|
3689
|
+
|
|
3690
|
+
function parseCalendarId(e) {
|
|
3691
|
+
const n = parseDateTimeLike(e) || parseYearMonthOnly(e) || parseMonthDayOnly(e);
|
|
3692
|
+
return n ? n.calendar : e;
|
|
3693
|
+
}
|
|
3694
|
+
|
|
3695
|
+
function parseTimeZoneId(e) {
|
|
3696
|
+
const n = parseDateTimeLike(e);
|
|
3697
|
+
return n && (n.timeZone || n.o && En || n.offset) || e;
|
|
3698
|
+
}
|
|
3699
|
+
|
|
3700
|
+
function finalizeZonedDateTime(e, n, t = 0, o = 0) {
|
|
3701
|
+
const r = resolveTimeZoneId(e.timeZone), i = kn(r);
|
|
3702
|
+
return createZonedDateTimeSlots(getMatchingInstantFor(i, checkIsoDateTimeFields(e), n, t, o, !i.h, e.o), r, resolveCalendarId(e.calendar));
|
|
3703
|
+
}
|
|
3704
|
+
|
|
3705
|
+
function finalizeDateTime(e) {
|
|
3706
|
+
return resolveSlotsCalendar(checkIsoDateTimeInBounds(checkIsoDateTimeFields(e)));
|
|
3707
|
+
}
|
|
3708
|
+
|
|
3709
|
+
function finalizeDate(e) {
|
|
3710
|
+
return resolveSlotsCalendar(checkIsoDateInBounds(checkIsoDateFields(e)));
|
|
3711
|
+
}
|
|
3712
|
+
|
|
3713
|
+
function resolveSlotsCalendar(e) {
|
|
3714
|
+
return {
|
|
3715
|
+
...e,
|
|
3716
|
+
calendar: resolveCalendarId(e.calendar)
|
|
3717
|
+
};
|
|
3718
|
+
}
|
|
3719
|
+
|
|
3720
|
+
function parseDateTimeLike(e) {
|
|
3721
|
+
const n = jn.exec(e);
|
|
3722
|
+
return n ? (e => {
|
|
3723
|
+
const n = e[10], t = "Z" === (n || "").toUpperCase();
|
|
3724
|
+
return {
|
|
3725
|
+
isoYear: organizeIsoYearParts(e),
|
|
3726
|
+
isoMonth: parseInt(e[4]),
|
|
3727
|
+
isoDay: parseInt(e[5]),
|
|
3728
|
+
...organizeTimeParts(e.slice(5)),
|
|
3729
|
+
...organizeAnnotationParts(e[16]),
|
|
3730
|
+
i: Boolean(e[6]),
|
|
3731
|
+
o: t,
|
|
3732
|
+
offset: t ? void 0 : n
|
|
3733
|
+
};
|
|
3734
|
+
})(n) : void 0;
|
|
3735
|
+
}
|
|
3736
|
+
|
|
3737
|
+
function parseYearMonthOnly(e) {
|
|
3738
|
+
const n = Un.exec(e);
|
|
3739
|
+
return n ? (e => ({
|
|
3740
|
+
isoYear: organizeIsoYearParts(e),
|
|
3741
|
+
isoMonth: parseInt(e[4]),
|
|
3742
|
+
isoDay: 1,
|
|
3743
|
+
...organizeAnnotationParts(e[5])
|
|
3744
|
+
}))(n) : void 0;
|
|
3745
|
+
}
|
|
3746
|
+
|
|
3747
|
+
function parseMonthDayOnly(e) {
|
|
3748
|
+
const n = Wn.exec(e);
|
|
3749
|
+
return n ? (e => ({
|
|
3750
|
+
isoYear: qe,
|
|
3751
|
+
isoMonth: parseInt(e[1]),
|
|
3752
|
+
isoDay: parseInt(e[2]),
|
|
3753
|
+
...organizeAnnotationParts(e[3])
|
|
3754
|
+
}))(n) : void 0;
|
|
3755
|
+
}
|
|
3756
|
+
|
|
3757
|
+
function parseOffsetNanoMaybe(e, n) {
|
|
3758
|
+
const t = xn.exec(e);
|
|
3759
|
+
return t ? ((e, n) => {
|
|
3760
|
+
const t = e[4] || e[5];
|
|
3761
|
+
if (n && t) {
|
|
3762
|
+
throw new RangeError(invalidSubstring(t));
|
|
3763
|
+
}
|
|
3764
|
+
return validateTimeZoneOffset((parseInt0(e[2]) * U + parseInt0(e[3]) * L + parseInt0(e[4]) * A + parseSubsecNano(e[5] || "")) * parseSign(e[1]));
|
|
3765
|
+
})(t, n) : void 0;
|
|
3766
|
+
}
|
|
3767
|
+
|
|
3768
|
+
function organizeIsoYearParts(e) {
|
|
3769
|
+
const n = parseSign(e[1]), t = parseInt(e[2] || e[3]);
|
|
3770
|
+
if (n < 0 && !t) {
|
|
3771
|
+
throw new RangeError(invalidSubstring(-0));
|
|
3772
|
+
}
|
|
3773
|
+
return n * t;
|
|
3774
|
+
}
|
|
3775
|
+
|
|
3776
|
+
function organizeTimeParts(e) {
|
|
3777
|
+
const n = parseInt0(e[3]);
|
|
3778
|
+
return {
|
|
3779
|
+
...nanoToIsoTimeAndDay(parseSubsecNano(e[4] || ""))[0],
|
|
3780
|
+
isoHour: parseInt0(e[1]),
|
|
3781
|
+
isoMinute: parseInt0(e[2]),
|
|
3782
|
+
isoSecond: 60 === n ? 59 : n
|
|
3783
|
+
};
|
|
3784
|
+
}
|
|
3785
|
+
|
|
3786
|
+
function organizeAnnotationParts(e) {
|
|
3787
|
+
let n, t;
|
|
3788
|
+
const o = [];
|
|
3789
|
+
if (e.replace(Hn, ((e, r, i) => {
|
|
3790
|
+
const a = Boolean(r), [s, c] = i.split("=").reverse();
|
|
3791
|
+
if (c) {
|
|
3792
|
+
if ("u-ca" === c) {
|
|
3793
|
+
o.push(s), n || (n = a);
|
|
3794
|
+
} else if (a) {
|
|
3795
|
+
throw new RangeError(invalidSubstring(e));
|
|
3796
|
+
}
|
|
3797
|
+
} else {
|
|
3798
|
+
if (t) {
|
|
3799
|
+
throw new RangeError(invalidSubstring(e));
|
|
3800
|
+
}
|
|
3801
|
+
t = s;
|
|
3802
|
+
}
|
|
3803
|
+
return "";
|
|
3804
|
+
})), o.length > 1 && n) {
|
|
3805
|
+
throw new RangeError(invalidSubstring(e));
|
|
3806
|
+
}
|
|
3807
|
+
return {
|
|
3808
|
+
timeZone: t,
|
|
3809
|
+
calendar: o[0] || ce
|
|
3810
|
+
};
|
|
3811
|
+
}
|
|
3812
|
+
|
|
3813
|
+
function parseSubsecNano(e) {
|
|
3814
|
+
return parseInt(e.padEnd(9, "0"));
|
|
3815
|
+
}
|
|
3816
|
+
|
|
3817
|
+
function createRegExp(e) {
|
|
3818
|
+
return new RegExp(`^${e}$`, "i");
|
|
3819
|
+
}
|
|
3820
|
+
|
|
3821
|
+
function parseSign(e) {
|
|
3822
|
+
return e && "+" !== e ? -1 : 1;
|
|
3823
|
+
}
|
|
3824
|
+
|
|
3825
|
+
function parseInt0(e) {
|
|
3826
|
+
return void 0 === e ? 0 : parseInt(e);
|
|
3827
|
+
}
|
|
3828
|
+
|
|
3829
|
+
function resolveTimeZoneId(e) {
|
|
3830
|
+
const n = getTimeZoneEssence(e);
|
|
3831
|
+
return "number" == typeof n ? formatOffsetNano(n) : n ? (e => {
|
|
3832
|
+
if (_n.test(e)) {
|
|
3833
|
+
throw new RangeError(T);
|
|
3834
|
+
}
|
|
3835
|
+
return e.toLowerCase().split("/").map(((e, n) => (e.length <= 3 || /\d/.test(e)) && !/etc|yap/.test(e) ? e.toUpperCase() : e.replace(/baja|dumont|[a-z]+/g, ((e, t) => e.length <= 2 && !n || "in" === e || "chat" === e ? e.toUpperCase() : e.length > 2 || !t ? capitalize(e).replace(/island|noronha|murdo|rivadavia|urville/, capitalize) : e)))).join("/");
|
|
3836
|
+
})(e) : En;
|
|
3837
|
+
}
|
|
3838
|
+
|
|
3839
|
+
function getTimeZoneAtomic(e) {
|
|
3840
|
+
const n = getTimeZoneEssence(e);
|
|
3841
|
+
return "number" == typeof n ? n : n ? n.resolvedOptions().timeZone : En;
|
|
3842
|
+
}
|
|
3843
|
+
|
|
3844
|
+
function getTimeZoneEssence(e) {
|
|
3845
|
+
const n = parseOffsetNanoMaybe(e = e.toUpperCase(), 1);
|
|
3846
|
+
return void 0 !== n ? n : e !== En ? Vn(e) : void 0;
|
|
3847
|
+
}
|
|
3848
|
+
|
|
3849
|
+
function compareInstants(e, n) {
|
|
3850
|
+
return compareBigNanos(e.epochNanoseconds, n.epochNanoseconds);
|
|
3851
|
+
}
|
|
3852
|
+
|
|
3853
|
+
function compareZonedDateTimes(e, n) {
|
|
3854
|
+
return compareBigNanos(e.epochNanoseconds, n.epochNanoseconds);
|
|
3855
|
+
}
|
|
3856
|
+
|
|
3857
|
+
function compareDurations(e, n, t, o, r, i) {
|
|
3858
|
+
const a = e(normalizeOptions(i).relativeTo), s = Math.max(getLargestDurationUnit(o), getLargestDurationUnit(r));
|
|
3859
|
+
if (allPropsEqual(pe, o, r)) {
|
|
3860
|
+
return 0;
|
|
3861
|
+
}
|
|
3862
|
+
if (s < 6 || 6 === s && (!a || !a.epochNanoseconds)) {
|
|
3863
|
+
return compareBigNanos(givenFieldsToBigNano(o, 6, pe), givenFieldsToBigNano(r, 6, pe));
|
|
3864
|
+
}
|
|
3865
|
+
if (!a) {
|
|
3866
|
+
throw new RangeError(P);
|
|
3867
|
+
}
|
|
3868
|
+
const [c, u, l] = createRelativeSystem(n, t, a);
|
|
3869
|
+
return compareBigNanos(relativeMarkerToEpochNano(moveRelativeMarker(o, c, u, l), l), relativeMarkerToEpochNano(moveRelativeMarker(r, c, u, l), l));
|
|
3870
|
+
}
|
|
3871
|
+
|
|
3872
|
+
function compareIsoDateTimeFields(e, n) {
|
|
3873
|
+
return compareIsoDateFields(e, n) || compareIsoTimeFields(e, n);
|
|
3874
|
+
}
|
|
3875
|
+
|
|
3876
|
+
function compareIsoDateFields(e, n) {
|
|
3877
|
+
return compareNumbers(isoToEpochMilli(e), isoToEpochMilli(n));
|
|
3878
|
+
}
|
|
3879
|
+
|
|
3880
|
+
function compareIsoTimeFields(e, n) {
|
|
3881
|
+
return compareNumbers(isoTimeFieldsToNano(e), isoTimeFieldsToNano(n));
|
|
3882
|
+
}
|
|
3883
|
+
|
|
3884
|
+
function instantsEqual(e, n) {
|
|
3885
|
+
return !compareInstants(e, n);
|
|
3886
|
+
}
|
|
3887
|
+
|
|
3888
|
+
function zonedDateTimesEqual(e, n) {
|
|
3889
|
+
return !compareZonedDateTimes(e, n) && !!isTimeZoneSlotsEqual(e.timeZone, n.timeZone) && isIdLikeEqual(e.calendar, n.calendar);
|
|
3890
|
+
}
|
|
3891
|
+
|
|
3892
|
+
function plainDateTimesEqual(e, n) {
|
|
3893
|
+
return !compareIsoDateTimeFields(e, n) && isIdLikeEqual(e.calendar, n.calendar);
|
|
3894
|
+
}
|
|
3895
|
+
|
|
3896
|
+
function plainDatesEqual(e, n) {
|
|
3897
|
+
return !compareIsoDateFields(e, n) && isIdLikeEqual(e.calendar, n.calendar);
|
|
3898
|
+
}
|
|
3899
|
+
|
|
3900
|
+
function plainYearMonthsEqual(e, n) {
|
|
3901
|
+
return !compareIsoDateFields(e, n) && isIdLikeEqual(e.calendar, n.calendar);
|
|
3902
|
+
}
|
|
3903
|
+
|
|
3904
|
+
function plainMonthDaysEqual(e, n) {
|
|
3905
|
+
return !compareIsoDateFields(e, n) && isIdLikeEqual(e.calendar, n.calendar);
|
|
3906
|
+
}
|
|
3907
|
+
|
|
3908
|
+
function plainTimesEqual(e, n) {
|
|
3909
|
+
return !compareIsoTimeFields(e, n);
|
|
3910
|
+
}
|
|
3911
|
+
|
|
3912
|
+
function isTimeZoneSlotsEqual(e, n) {
|
|
3913
|
+
if (e === n) {
|
|
3914
|
+
return 1;
|
|
3915
|
+
}
|
|
3916
|
+
const t = getId(e), o = getId(n);
|
|
3917
|
+
if (t === o) {
|
|
3918
|
+
return 1;
|
|
3919
|
+
}
|
|
3920
|
+
try {
|
|
3921
|
+
return getTimeZoneAtomic(t) === getTimeZoneAtomic(o);
|
|
3922
|
+
} catch (e) {}
|
|
3923
|
+
}
|
|
3924
|
+
|
|
3925
|
+
function diffInstants(e, n, t, o) {
|
|
3926
|
+
const r = refineDiffOptions(e, copyOptions(o), 3, 5), i = diffEpochNano(n.epochNanoseconds, t.epochNanoseconds, ...r);
|
|
3927
|
+
return createDurationSlots(e ? negateDurationFields(i) : i);
|
|
3928
|
+
}
|
|
3929
|
+
|
|
3930
|
+
function diffZonedDateTimes(e, n, t, o, r, i) {
|
|
3931
|
+
const a = getCommonCalendarSlot(o.calendar, r.calendar), s = copyOptions(i), [c, u, l, f] = refineDiffOptions(t, s, 5), d = o.epochNanoseconds, m = r.epochNanoseconds, p = compareBigNanos(m, d);
|
|
3932
|
+
let T;
|
|
3933
|
+
if (p) {
|
|
3934
|
+
if (c < 6) {
|
|
3935
|
+
T = diffEpochNano(d, m, c, u, l, f);
|
|
3936
|
+
} else {
|
|
3937
|
+
const t = n(((e, n) => {
|
|
3938
|
+
if (!isTimeZoneSlotsEqual(e, n)) {
|
|
3939
|
+
throw new RangeError(h);
|
|
3940
|
+
}
|
|
3941
|
+
return e;
|
|
3942
|
+
})(o.timeZone, r.timeZone)), i = e(a);
|
|
3943
|
+
T = diffZonedEpochNanoViaCalendar(i, t, p, o, r, c, s), !p || 0 === u && 1 === l || (T = roundRelativeDuration(T, m, c, u, l, f, o, i, t));
|
|
3944
|
+
}
|
|
3945
|
+
} else {
|
|
3946
|
+
T = Me;
|
|
3947
|
+
}
|
|
3948
|
+
return createDurationSlots(t ? negateDurationFields(T) : T);
|
|
3949
|
+
}
|
|
3950
|
+
|
|
3951
|
+
function diffPlainDateTimes(e, n, t, o, r) {
|
|
3952
|
+
const i = getCommonCalendarSlot(t.calendar, o.calendar), a = copyOptions(r), [s, c, u, l] = refineDiffOptions(n, a, 6), f = isoToEpochNano(t), d = isoToEpochNano(o), m = compareBigNanos(d, f);
|
|
3953
|
+
let p;
|
|
3954
|
+
if (m) {
|
|
3955
|
+
if (s <= 6) {
|
|
3956
|
+
p = diffEpochNano(f, d, s, c, u, l);
|
|
3957
|
+
} else {
|
|
3958
|
+
const n = e(i);
|
|
3959
|
+
p = diffDateTimesViaCalendar(n, m, t, o, s, a), !m || 0 === c && 1 === u || (p = roundRelativeDuration(p, d, s, c, u, l, t, n));
|
|
3960
|
+
}
|
|
3961
|
+
} else {
|
|
3962
|
+
p = Me;
|
|
3963
|
+
}
|
|
3964
|
+
return createDurationSlots(n ? negateDurationFields(p) : p);
|
|
3965
|
+
}
|
|
3966
|
+
|
|
3967
|
+
function diffPlainDates(e, n, t, o, r) {
|
|
3968
|
+
const i = getCommonCalendarSlot(t.calendar, o.calendar), a = copyOptions(r);
|
|
3969
|
+
return diffDateLike(n || 0, (() => e(i)), t, o, ...refineDiffOptions(n, a, 6, 9, 6), a);
|
|
3970
|
+
}
|
|
3971
|
+
|
|
3972
|
+
function diffPlainYearMonth(e, n, t, o, r) {
|
|
3973
|
+
const i = getCommonCalendarSlot(t.calendar, o.calendar), a = copyOptions(r), s = refineDiffOptions(n, a, 9, 9, 8), c = e(i);
|
|
3974
|
+
return diffDateLike(n || 0, (() => c), moveToMonthStart(c, t), moveToMonthStart(c, o), ...s, a);
|
|
3975
|
+
}
|
|
3976
|
+
|
|
3977
|
+
function diffDateLike(e, n, t, o, r, i, a, s, c) {
|
|
3978
|
+
const u = isoToEpochNano(t), l = isoToEpochNano(o);
|
|
3979
|
+
let f;
|
|
3980
|
+
if (compareBigNanos(l, u)) {
|
|
3981
|
+
let e;
|
|
3982
|
+
6 === r ? f = diffByDay(t, o) : (e = n(), f = e.dateUntil(t, o, r, c)), 6 === i && 1 === a || (e || (e = n()),
|
|
3983
|
+
f = roundRelativeDuration(f, l, r, i, a, s, {
|
|
3984
|
+
...t,
|
|
3985
|
+
...be
|
|
3986
|
+
}, e));
|
|
3987
|
+
} else {
|
|
3988
|
+
f = Me;
|
|
3989
|
+
}
|
|
3990
|
+
return createDurationSlots(e ? negateDurationFields(f) : f);
|
|
3991
|
+
}
|
|
3992
|
+
|
|
3993
|
+
function diffPlainTimes(e, n, t, o) {
|
|
3994
|
+
const r = copyOptions(o), [i, a, s, c] = refineDiffOptions(e, r, 5, 5), u = isoTimeFieldsToNano(n), l = roundByInc(isoTimeFieldsToNano(t) - u, computeNanoInc(a, s), c), f = {
|
|
3995
|
+
...Me,
|
|
3996
|
+
...nanoToDurationTimeFields(l, i)
|
|
3997
|
+
};
|
|
3998
|
+
return createDurationSlots(e ? negateDurationFields(f) : f);
|
|
3999
|
+
}
|
|
4000
|
+
|
|
4001
|
+
function diffZonedEpochNanoViaCalendar(e, n, t, o, r, i, a) {
|
|
4002
|
+
const s = wn(o, n), c = pluckProps(ye, s), u = wn(r, n), l = r.epochNanoseconds, f = bindArgs(getSingleInstantFor, n);
|
|
4003
|
+
let d, p, h, T = 0;
|
|
4004
|
+
do {
|
|
4005
|
+
if (T > 2) {
|
|
4006
|
+
throw new RangeError(m);
|
|
4007
|
+
}
|
|
4008
|
+
d = {
|
|
4009
|
+
...moveByIsoDays(u, T++ * -t),
|
|
4010
|
+
...c
|
|
4011
|
+
}, p = f(d), h = compareBigNanos(l, p);
|
|
4012
|
+
} while (h === -t);
|
|
4013
|
+
return {
|
|
4014
|
+
...6 === i ? diffByDay(s, d) : e.dateUntil(s, d, i, a),
|
|
4015
|
+
...nanoToDurationTimeFields(bigNanoToNumber(diffBigNanos(p, l)))
|
|
4016
|
+
};
|
|
4017
|
+
}
|
|
4018
|
+
|
|
4019
|
+
function diffDateTimesViaCalendar(e, n, t, o, r, i) {
|
|
4020
|
+
const a = isoTimeFieldsToNano(t);
|
|
4021
|
+
let s = isoTimeFieldsToNano(o) - a, c = t;
|
|
4022
|
+
return Math.sign(s) === -n && (c = moveByIsoDays(t, n), s += W * n), {
|
|
4023
|
+
...e.dateUntil({
|
|
4024
|
+
...c,
|
|
4025
|
+
...be
|
|
4026
|
+
}, {
|
|
4027
|
+
...o,
|
|
4028
|
+
...be
|
|
4029
|
+
}, r, i),
|
|
4030
|
+
...nanoToDurationTimeFields(s)
|
|
4031
|
+
};
|
|
4032
|
+
}
|
|
4033
|
+
|
|
4034
|
+
function diffEpochNano(e, n, t, o, r, i) {
|
|
4035
|
+
return {
|
|
4036
|
+
...Me,
|
|
4037
|
+
...nanoToDurationDayTimeFields(roundBigNano(diffBigNanos(e, n), o, r, i), t)
|
|
4038
|
+
};
|
|
4039
|
+
}
|
|
4040
|
+
|
|
4041
|
+
function diffEpochNanoExact(e, n, t) {
|
|
4042
|
+
return {
|
|
4043
|
+
...Me,
|
|
4044
|
+
...nanoToDurationDayTimeFields(diffBigNanos(e, n), t)
|
|
4045
|
+
};
|
|
4046
|
+
}
|
|
4047
|
+
|
|
4048
|
+
function diffByDay(e, n) {
|
|
4049
|
+
return {
|
|
4050
|
+
...Me,
|
|
4051
|
+
days: diffDays(e, n)
|
|
4052
|
+
};
|
|
4053
|
+
}
|
|
4054
|
+
|
|
4055
|
+
function diffDays(e, n) {
|
|
4056
|
+
return diffEpochMilliByDay(isoToEpochMilli(e), isoToEpochMilli(n));
|
|
4057
|
+
}
|
|
4058
|
+
|
|
4059
|
+
function diffEpochMilliByDay(e, n) {
|
|
4060
|
+
return Math.round((n - e) / R);
|
|
4061
|
+
}
|
|
4062
|
+
|
|
4063
|
+
function getCommonCalendarSlot(e, n) {
|
|
4064
|
+
if (!isIdLikeEqual(e, n)) {
|
|
4065
|
+
throw new RangeError(p);
|
|
4066
|
+
}
|
|
4067
|
+
return e;
|
|
4068
|
+
}
|
|
4069
|
+
|
|
4070
|
+
function createIntlCalendar(e) {
|
|
4071
|
+
function epochMilliToIntlFields(e) {
|
|
4072
|
+
return ((e, n) => ({
|
|
4073
|
+
...parseIntlYear(e, n),
|
|
4074
|
+
month: e.month,
|
|
4075
|
+
day: parseInt(e.day)
|
|
4076
|
+
}))(hashIntlFormatParts(n, e), t);
|
|
4077
|
+
}
|
|
4078
|
+
const n = Kn(e), t = computeCalendarIdBase(e);
|
|
4079
|
+
return {
|
|
4080
|
+
id: e,
|
|
4081
|
+
I: createIntlFieldCache(epochMilliToIntlFields),
|
|
4082
|
+
N: createIntlYearMonthCache(epochMilliToIntlFields)
|
|
4083
|
+
};
|
|
4084
|
+
}
|
|
4085
|
+
|
|
4086
|
+
function createIntlFieldCache(e) {
|
|
4087
|
+
return memoize((n => {
|
|
4088
|
+
const t = isoToEpochMilli(n);
|
|
4089
|
+
return e(t);
|
|
4090
|
+
}), WeakMap);
|
|
4091
|
+
}
|
|
4092
|
+
|
|
4093
|
+
function createIntlYearMonthCache(e) {
|
|
4094
|
+
const n = e(0).year - ze;
|
|
4095
|
+
return memoize((t => {
|
|
4096
|
+
let o, r = isoArgsToEpochMilli(t - n);
|
|
4097
|
+
const i = [], a = [];
|
|
4098
|
+
do {
|
|
4099
|
+
r += 400 * R;
|
|
4100
|
+
} while ((o = e(r)).year <= t);
|
|
4101
|
+
do {
|
|
4102
|
+
r += (1 - o.day) * R, o.year === t && (i.push(r), a.push(o.month)), r -= R;
|
|
4103
|
+
} while ((o = e(r)).year >= t);
|
|
4104
|
+
return {
|
|
4105
|
+
v: i.reverse(),
|
|
4106
|
+
P: w(a.reverse())
|
|
4107
|
+
};
|
|
4108
|
+
}));
|
|
4109
|
+
}
|
|
4110
|
+
|
|
4111
|
+
function parseIntlYear(e, n) {
|
|
4112
|
+
let t, o, r = parseIntlPartsYear(e);
|
|
4113
|
+
if (e.era) {
|
|
4114
|
+
const a = fe[n];
|
|
4115
|
+
void 0 !== a && (i = (i = e.era).normalize("NFD").toLowerCase().replace(/[^a-z0-9]/g, ""),
|
|
4116
|
+
t = de[i] || i, o = r, r = eraYearToYear(o, a[t] || 0));
|
|
4117
|
+
}
|
|
4118
|
+
var i;
|
|
4119
|
+
return {
|
|
4120
|
+
era: t,
|
|
4121
|
+
eraYear: o,
|
|
4122
|
+
year: r
|
|
4123
|
+
};
|
|
4124
|
+
}
|
|
4125
|
+
|
|
4126
|
+
function parseIntlPartsYear(e) {
|
|
4127
|
+
return parseInt(e.relatedYear || e.year);
|
|
4128
|
+
}
|
|
4129
|
+
|
|
4130
|
+
function computeIntlDateParts(e) {
|
|
4131
|
+
const {year: n, month: t, day: o} = this.I(e), {P: r} = this.N(n);
|
|
4132
|
+
return [ n, r[t] + 1, o ];
|
|
4133
|
+
}
|
|
4134
|
+
|
|
4135
|
+
function computeIntlEpochMilli(e, n = 1, t = 1) {
|
|
4136
|
+
return this.N(e).v[n - 1] + (t - 1) * R;
|
|
4137
|
+
}
|
|
4138
|
+
|
|
4139
|
+
function computeIntlLeapMonth(e) {
|
|
4140
|
+
const n = queryMonthStrs(this, e), t = queryMonthStrs(this, e - 1), o = n.length;
|
|
4141
|
+
if (o > t.length) {
|
|
4142
|
+
const e = getCalendarLeapMonthMeta(this);
|
|
4143
|
+
if (e < 0) {
|
|
4144
|
+
return -e;
|
|
4145
|
+
}
|
|
4146
|
+
for (let e = 0; e < o; e++) {
|
|
4147
|
+
if (n[e] !== t[e]) {
|
|
4148
|
+
return e + 1;
|
|
4149
|
+
}
|
|
4150
|
+
}
|
|
4151
|
+
}
|
|
4152
|
+
}
|
|
4153
|
+
|
|
4154
|
+
function computeIntlDaysInYear(e) {
|
|
4155
|
+
return diffEpochMilliByDay(computeIntlEpochMilli.call(this, e), computeIntlEpochMilli.call(this, e + 1));
|
|
4156
|
+
}
|
|
4157
|
+
|
|
4158
|
+
function computeIntlDaysInMonth(e, n) {
|
|
4159
|
+
const {v: t} = this.N(e);
|
|
4160
|
+
let o = n + 1, r = t;
|
|
4161
|
+
return o > t.length && (o = 1, r = this.N(e + 1).v), diffEpochMilliByDay(t[n - 1], r[o - 1]);
|
|
4162
|
+
}
|
|
4163
|
+
|
|
4164
|
+
function computeIntlMonthsInYear(e) {
|
|
4165
|
+
return this.N(e).v.length;
|
|
4166
|
+
}
|
|
4167
|
+
|
|
4168
|
+
function queryMonthStrs(e, n) {
|
|
4169
|
+
return Object.keys(e.N(n).P);
|
|
4170
|
+
}
|
|
4171
|
+
|
|
4172
|
+
function resolveCalendarId(e) {
|
|
4173
|
+
if ((e = e.toLowerCase()) !== ce && e !== ue && computeCalendarIdBase(e) !== computeCalendarIdBase(Kn(e).resolvedOptions().calendar)) {
|
|
4174
|
+
throw new RangeError(invalidCalendar(e));
|
|
4175
|
+
}
|
|
4176
|
+
return e;
|
|
4177
|
+
}
|
|
4178
|
+
|
|
4179
|
+
function computeCalendarIdBase(e) {
|
|
4180
|
+
return "islamicc" === e && (e = "islamic"), e.split("-")[0];
|
|
4181
|
+
}
|
|
4182
|
+
|
|
4183
|
+
function computeNativeWeekOfYear(e) {
|
|
4184
|
+
return this.F(e)[0];
|
|
4185
|
+
}
|
|
4186
|
+
|
|
4187
|
+
function computeNativeYearOfWeek(e) {
|
|
4188
|
+
return this.F(e)[1];
|
|
4189
|
+
}
|
|
4190
|
+
|
|
4191
|
+
function parseMonthCode(e) {
|
|
4192
|
+
const n = Qn.exec(e);
|
|
4193
|
+
if (!n) {
|
|
4194
|
+
throw new RangeError(invalidMonthCode(e));
|
|
4195
|
+
}
|
|
4196
|
+
return [ parseInt(n[1]), Boolean(n[2]) ];
|
|
4197
|
+
}
|
|
4198
|
+
|
|
4199
|
+
function monthCodeNumberToMonth(e, n, t) {
|
|
4200
|
+
return e + (n || t && e >= t ? 1 : 0);
|
|
4201
|
+
}
|
|
4202
|
+
|
|
4203
|
+
function monthToMonthCodeNumber(e, n) {
|
|
4204
|
+
return e - (n && e >= n ? 1 : 0);
|
|
4205
|
+
}
|
|
4206
|
+
|
|
4207
|
+
function eraYearToYear(e, n) {
|
|
4208
|
+
return (n + e) * (Math.sign(n) || 1) || 0;
|
|
4209
|
+
}
|
|
4210
|
+
|
|
4211
|
+
function getCalendarEraOrigins(e) {
|
|
4212
|
+
return fe[getCalendarIdBase(e)];
|
|
4213
|
+
}
|
|
4214
|
+
|
|
4215
|
+
function getCalendarLeapMonthMeta(e) {
|
|
4216
|
+
return me[getCalendarIdBase(e)];
|
|
4217
|
+
}
|
|
4218
|
+
|
|
4219
|
+
function getCalendarIdBase(e) {
|
|
4220
|
+
return computeCalendarIdBase(e.id || ce);
|
|
4221
|
+
}
|
|
4222
|
+
|
|
4223
|
+
function refineMaybeZonedDateTimeBag(e, n, t, o) {
|
|
4224
|
+
const r = refineCalendarFields(t, o, re, [], _);
|
|
4225
|
+
if (void 0 !== r.timeZone) {
|
|
4226
|
+
const o = t.dateFromFields(r), i = refineTimeBag(r), a = e(r.timeZone);
|
|
4227
|
+
return {
|
|
4228
|
+
epochNanoseconds: getMatchingInstantFor(n(a), {
|
|
4229
|
+
...o,
|
|
4230
|
+
...i
|
|
4231
|
+
}, void 0 !== r.offset ? parseOffsetNano(r.offset) : void 0),
|
|
4232
|
+
timeZone: a
|
|
4233
|
+
};
|
|
4234
|
+
}
|
|
4235
|
+
return {
|
|
4236
|
+
...t.dateFromFields(r),
|
|
4237
|
+
...be
|
|
4238
|
+
};
|
|
4239
|
+
}
|
|
4240
|
+
|
|
4241
|
+
function refineZonedDateTimeBag(e, n, t, o, r, i) {
|
|
4242
|
+
const a = refineCalendarFields(t, r, re, G, _), s = e(a.timeZone), [c, u, l] = refineZonedFieldOptions(i), f = t.dateFromFields(a, overrideOverflowOptions(i, c)), d = refineTimeBag(a, c);
|
|
4243
|
+
return createZonedDateTimeSlots(getMatchingInstantFor(n(s), {
|
|
4244
|
+
...f,
|
|
4245
|
+
...d
|
|
4246
|
+
}, void 0 !== a.offset ? parseOffsetNano(a.offset) : void 0, u, l), s, o);
|
|
4247
|
+
}
|
|
4248
|
+
|
|
4249
|
+
function refinePlainDateTimeBag(e, n, t) {
|
|
4250
|
+
const o = refineCalendarFields(e, n, re, [], $), r = refineOverflowOptions(t);
|
|
4251
|
+
return createPlainDateTimeSlots(checkIsoDateTimeInBounds({
|
|
4252
|
+
...e.dateFromFields(o, overrideOverflowOptions(t, r)),
|
|
4253
|
+
...refineTimeBag(o, r)
|
|
4254
|
+
}));
|
|
4255
|
+
}
|
|
4256
|
+
|
|
4257
|
+
function refinePlainDateBag(e, n, t, o = []) {
|
|
4258
|
+
const r = refineCalendarFields(e, n, re, o);
|
|
4259
|
+
return e.dateFromFields(r, t);
|
|
4260
|
+
}
|
|
4261
|
+
|
|
4262
|
+
function refinePlainYearMonthBag(e, n, t, o) {
|
|
4263
|
+
const r = refineCalendarFields(e, n, te, o);
|
|
4264
|
+
return e.yearMonthFromFields(r, t);
|
|
4265
|
+
}
|
|
4266
|
+
|
|
4267
|
+
function refinePlainMonthDayBag(e, n, t, o, r = []) {
|
|
4268
|
+
const i = refineCalendarFields(e, t, re, r);
|
|
4269
|
+
return n && void 0 !== i.month && void 0 === i.monthCode && void 0 === i.year && (i.year = qe),
|
|
4270
|
+
e.monthDayFromFields(i, o);
|
|
4271
|
+
}
|
|
4272
|
+
|
|
4273
|
+
function refinePlainTimeBag(e, n) {
|
|
4274
|
+
const t = refineOverflowOptions(n);
|
|
4275
|
+
return createPlainTimeSlots(refineTimeBag(refineFields(e, x, [], 1), t));
|
|
4276
|
+
}
|
|
4277
|
+
|
|
4278
|
+
function refineDurationBag(e) {
|
|
4279
|
+
const n = refineFields(e, he);
|
|
4280
|
+
return createDurationSlots(checkDurationUnits({
|
|
4281
|
+
...Me,
|
|
4282
|
+
...n
|
|
4283
|
+
}));
|
|
4284
|
+
}
|
|
4285
|
+
|
|
4286
|
+
function refineCalendarFields(e, n, t, o = [], r = []) {
|
|
4287
|
+
return refineFields(n, [ ...e.fields(t), ...r ].sort(), o);
|
|
4288
|
+
}
|
|
4289
|
+
|
|
4290
|
+
function refineFields(e, n, t, o = !t) {
|
|
4291
|
+
const r = {};
|
|
4292
|
+
let i, a = 0;
|
|
4293
|
+
for (const o of n) {
|
|
4294
|
+
if (o === i) {
|
|
4295
|
+
throw new RangeError(duplicateFields(o));
|
|
4296
|
+
}
|
|
4297
|
+
if ("constructor" === o || "__proto__" === o) {
|
|
4298
|
+
throw new RangeError(forbiddenField(o));
|
|
4299
|
+
}
|
|
4300
|
+
let n = e[o];
|
|
4301
|
+
if (void 0 !== n) {
|
|
4302
|
+
a = 1, tt[o] && (n = tt[o](n, o)), r[o] = n;
|
|
4303
|
+
} else if (t) {
|
|
4304
|
+
if (t.includes(o)) {
|
|
4305
|
+
throw new TypeError(missingField(o));
|
|
4306
|
+
}
|
|
4307
|
+
r[o] = se[o];
|
|
4308
|
+
}
|
|
4309
|
+
i = o;
|
|
4310
|
+
}
|
|
4311
|
+
if (o && !a) {
|
|
4312
|
+
throw new TypeError(noValidFields(n));
|
|
4313
|
+
}
|
|
4314
|
+
return r;
|
|
4315
|
+
}
|
|
4316
|
+
|
|
4317
|
+
function refineTimeBag(e, n) {
|
|
4318
|
+
return constrainIsoTimeFields(ot({
|
|
4319
|
+
...se,
|
|
4320
|
+
...e
|
|
4321
|
+
}), n);
|
|
4322
|
+
}
|
|
4323
|
+
|
|
4324
|
+
function zonedDateTimeWithFields(e, n, t, o, r, i) {
|
|
4325
|
+
const a = copyOptions(i), {calendar: s, timeZone: c} = t;
|
|
4326
|
+
return createZonedDateTimeSlots(((e, n, t, o, r) => {
|
|
4327
|
+
const i = mergeCalendarFields(e, t, o, re, V, H), [a, s, c] = refineZonedFieldOptions(r, 2);
|
|
4328
|
+
return getMatchingInstantFor(n, {
|
|
4329
|
+
...e.dateFromFields(i, overrideOverflowOptions(r, a)),
|
|
4330
|
+
...refineTimeBag(i, a)
|
|
4331
|
+
}, parseOffsetNano(i.offset), s, c);
|
|
4332
|
+
})(e(s), n(c), o, r, a), c, s);
|
|
4333
|
+
}
|
|
4334
|
+
|
|
4335
|
+
function plainDateTimeWithFields(e, n, t, o, r) {
|
|
4336
|
+
const i = copyOptions(r);
|
|
4337
|
+
return createPlainDateTimeSlots(((e, n, t, o) => {
|
|
4338
|
+
const r = mergeCalendarFields(e, n, t, re, $), i = refineOverflowOptions(o);
|
|
4339
|
+
return checkIsoDateTimeInBounds({
|
|
4340
|
+
...e.dateFromFields(r, overrideOverflowOptions(o, i)),
|
|
4341
|
+
...refineTimeBag(r, i)
|
|
4342
|
+
});
|
|
4343
|
+
})(e(n.calendar), t, o, i));
|
|
4344
|
+
}
|
|
4345
|
+
|
|
4346
|
+
function plainDateWithFields(e, n, t, o, r) {
|
|
4347
|
+
const i = copyOptions(r);
|
|
4348
|
+
return ((e, n, t, o) => {
|
|
4349
|
+
const r = mergeCalendarFields(e, n, t, re);
|
|
4350
|
+
return e.dateFromFields(r, o);
|
|
4351
|
+
})(e(n.calendar), t, o, i);
|
|
4352
|
+
}
|
|
4353
|
+
|
|
4354
|
+
function plainYearMonthWithFields(e, n, t, o, r) {
|
|
4355
|
+
const i = copyOptions(r);
|
|
4356
|
+
return createPlainYearMonthSlots(((e, n, t, o) => {
|
|
4357
|
+
const r = mergeCalendarFields(e, n, t, te);
|
|
4358
|
+
return e.yearMonthFromFields(r, o);
|
|
4359
|
+
})(e(n.calendar), t, o, i));
|
|
4360
|
+
}
|
|
4361
|
+
|
|
4362
|
+
function plainMonthDayWithFields(e, n, t, o, r) {
|
|
4363
|
+
const i = copyOptions(r);
|
|
4364
|
+
return ((e, n, t, o) => {
|
|
4365
|
+
const r = mergeCalendarFields(e, n, t, re);
|
|
4366
|
+
return e.monthDayFromFields(r, o);
|
|
4367
|
+
})(e(n.calendar), t, o, i);
|
|
4368
|
+
}
|
|
4369
|
+
|
|
4370
|
+
function plainTimeWithFields(e, n, t) {
|
|
4371
|
+
return createPlainTimeSlots(((e, n, t) => {
|
|
4372
|
+
const o = refineOverflowOptions(t);
|
|
4373
|
+
return refineTimeBag({
|
|
4374
|
+
...pluckProps(x, e),
|
|
4375
|
+
...refineFields(n, x)
|
|
4376
|
+
}, o);
|
|
4377
|
+
})(e, n, t));
|
|
4378
|
+
}
|
|
4379
|
+
|
|
4380
|
+
function durationWithFields(e, n) {
|
|
4381
|
+
return createDurationSlots((t = e, o = n, checkDurationUnits({
|
|
4382
|
+
...t,
|
|
4383
|
+
...refineFields(o, he)
|
|
4384
|
+
})));
|
|
4385
|
+
var t, o;
|
|
4386
|
+
}
|
|
4387
|
+
|
|
4388
|
+
function mergeCalendarFields(e, n, t, o, r = [], i = []) {
|
|
4389
|
+
const a = [ ...e.fields(o), ...r ].sort();
|
|
4390
|
+
let s = refineFields(n, a, i);
|
|
4391
|
+
const c = refineFields(t, a);
|
|
4392
|
+
return s = e.mergeFields(s, c), refineFields(s, a, []);
|
|
4393
|
+
}
|
|
4394
|
+
|
|
4395
|
+
function convertToPlainMonthDay(e, n) {
|
|
4396
|
+
const t = refineCalendarFields(e, n, ae);
|
|
4397
|
+
return e.monthDayFromFields(t);
|
|
4398
|
+
}
|
|
4399
|
+
|
|
4400
|
+
function convertToPlainYearMonth(e, n, t) {
|
|
4401
|
+
const o = refineCalendarFields(e, n, oe);
|
|
4402
|
+
return e.yearMonthFromFields(o, t);
|
|
4403
|
+
}
|
|
4404
|
+
|
|
4405
|
+
function convertToIso(e, n, t, o, r) {
|
|
4406
|
+
n = pluckProps(t = e.fields(t), n), o = refineFields(o, r = e.fields(r), []);
|
|
4407
|
+
let i = e.mergeFields(n, o);
|
|
4408
|
+
return i = refineFields(i, [ ...t, ...r ].sort(), []), e.dateFromFields(i);
|
|
4409
|
+
}
|
|
4410
|
+
|
|
4411
|
+
function refineYear(e, n) {
|
|
4412
|
+
let {era: t, eraYear: o, year: r} = n;
|
|
4413
|
+
const c = getCalendarEraOrigins(e);
|
|
4414
|
+
if (void 0 !== t || void 0 !== o) {
|
|
4415
|
+
if (void 0 === t || void 0 === o) {
|
|
4416
|
+
throw new TypeError(a);
|
|
4417
|
+
}
|
|
4418
|
+
if (!c) {
|
|
4419
|
+
throw new RangeError(i);
|
|
4420
|
+
}
|
|
4421
|
+
const e = c[t];
|
|
4422
|
+
if (void 0 === e) {
|
|
4423
|
+
throw new RangeError(invalidEra(t));
|
|
4424
|
+
}
|
|
4425
|
+
const n = eraYearToYear(o, e);
|
|
4426
|
+
if (void 0 !== r && r !== n) {
|
|
4427
|
+
throw new RangeError(s);
|
|
4428
|
+
}
|
|
4429
|
+
r = n;
|
|
4430
|
+
} else if (void 0 === r) {
|
|
4431
|
+
throw new TypeError(missingYear(c));
|
|
4432
|
+
}
|
|
4433
|
+
return r;
|
|
4434
|
+
}
|
|
4435
|
+
|
|
4436
|
+
function refineMonth(e, n, t, o) {
|
|
4437
|
+
let {month: r, monthCode: i} = n;
|
|
4438
|
+
if (void 0 !== i) {
|
|
4439
|
+
const n = ((e, n, t, o) => {
|
|
4440
|
+
const r = e.O(t), [i, a] = parseMonthCode(n);
|
|
4441
|
+
let s = monthCodeNumberToMonth(i, a, r);
|
|
4442
|
+
if (a) {
|
|
4443
|
+
const n = getCalendarLeapMonthMeta(e);
|
|
4444
|
+
if (void 0 === n) {
|
|
4445
|
+
throw new RangeError(f);
|
|
4446
|
+
}
|
|
4447
|
+
if (n > 0) {
|
|
4448
|
+
if (s > n) {
|
|
4449
|
+
throw new RangeError(f);
|
|
4450
|
+
}
|
|
4451
|
+
if (void 0 === r) {
|
|
4452
|
+
if (1 === o) {
|
|
4453
|
+
throw new RangeError(f);
|
|
4454
|
+
}
|
|
4455
|
+
s--;
|
|
4456
|
+
}
|
|
4457
|
+
} else {
|
|
4458
|
+
if (s !== -n) {
|
|
4459
|
+
throw new RangeError(f);
|
|
4460
|
+
}
|
|
4461
|
+
if (void 0 === r && 1 === o) {
|
|
4462
|
+
throw new RangeError(f);
|
|
4463
|
+
}
|
|
4464
|
+
}
|
|
4465
|
+
}
|
|
4466
|
+
return s;
|
|
4467
|
+
})(e, i, t, o);
|
|
4468
|
+
if (void 0 !== r && r !== n) {
|
|
4469
|
+
throw new RangeError(c);
|
|
4470
|
+
}
|
|
4471
|
+
r = n, o = 1;
|
|
4472
|
+
} else if (void 0 === r) {
|
|
4473
|
+
throw new TypeError(u);
|
|
4474
|
+
}
|
|
4475
|
+
return clampEntity("month", r, 1, e.B(t), o);
|
|
4476
|
+
}
|
|
4477
|
+
|
|
4478
|
+
function refineDay(e, n, t, o, r) {
|
|
4479
|
+
return clampProp(n, "day", 1, e.k(o, t), r);
|
|
4480
|
+
}
|
|
4481
|
+
|
|
4482
|
+
function spliceFields(e, n, t, o) {
|
|
4483
|
+
let r = 0;
|
|
4484
|
+
const i = [];
|
|
4485
|
+
for (const e of t) {
|
|
4486
|
+
void 0 !== n[e] ? r = 1 : i.push(e);
|
|
4487
|
+
}
|
|
4488
|
+
if (Object.assign(e, n), r) {
|
|
4489
|
+
for (const n of o || i) {
|
|
4490
|
+
delete e[n];
|
|
4491
|
+
}
|
|
4492
|
+
}
|
|
4493
|
+
}
|
|
4494
|
+
|
|
4495
|
+
function constructInstantSlots(e) {
|
|
4496
|
+
return createInstantSlots(checkEpochNanoInBounds(bigIntToBigNano(toBigInt(e))));
|
|
4497
|
+
}
|
|
4498
|
+
|
|
4499
|
+
function constructZonedDateTimeSlots(e, n, t, o, r = ce) {
|
|
4500
|
+
return createZonedDateTimeSlots(checkEpochNanoInBounds(bigIntToBigNano(toBigInt(t))), n(o), e(r));
|
|
4501
|
+
}
|
|
4502
|
+
|
|
4503
|
+
function constructPlainDateTimeSlots(e, n, t, o, r = 0, i = 0, a = 0, s = 0, c = 0, u = 0, l = ce) {
|
|
4504
|
+
return createPlainDateTimeSlots(checkIsoDateTimeInBounds(checkIsoDateTimeFields(mapProps(toInteger, zipProps(Pe, [ n, t, o, r, i, a, s, c, u ])))), e(l));
|
|
4505
|
+
}
|
|
4506
|
+
|
|
4507
|
+
function constructPlainDateSlots(e, n, t, o, r = ce) {
|
|
4508
|
+
return createPlainDateSlots(checkIsoDateInBounds(checkIsoDateFields(mapProps(toInteger, {
|
|
4509
|
+
isoYear: n,
|
|
4510
|
+
isoMonth: t,
|
|
4511
|
+
isoDay: o
|
|
4512
|
+
}))), e(r));
|
|
4513
|
+
}
|
|
4514
|
+
|
|
4515
|
+
function constructPlainYearMonthSlots(e, n, t, o = ce, r = 1) {
|
|
4516
|
+
const i = toInteger(n), a = toInteger(t), s = e(o);
|
|
4517
|
+
return createPlainYearMonthSlots(checkIsoYearMonthInBounds(checkIsoDateFields({
|
|
4518
|
+
isoYear: i,
|
|
4519
|
+
isoMonth: a,
|
|
4520
|
+
isoDay: toInteger(r)
|
|
4521
|
+
})), s);
|
|
4522
|
+
}
|
|
4523
|
+
|
|
4524
|
+
function constructPlainMonthDaySlots(e, n, t, o = ce, r = qe) {
|
|
4525
|
+
const i = toInteger(n), a = toInteger(t), s = e(o);
|
|
4526
|
+
return createPlainMonthDaySlots(checkIsoDateInBounds(checkIsoDateFields({
|
|
4527
|
+
isoYear: toInteger(r),
|
|
4528
|
+
isoMonth: i,
|
|
4529
|
+
isoDay: a
|
|
4530
|
+
})), s);
|
|
4531
|
+
}
|
|
4532
|
+
|
|
4533
|
+
function constructPlainTimeSlots(e = 0, n = 0, t = 0, o = 0, r = 0, i = 0) {
|
|
4534
|
+
return createPlainTimeSlots(constrainIsoTimeFields(mapProps(toInteger, zipProps(ye, [ e, n, t, o, r, i ])), 1));
|
|
4535
|
+
}
|
|
4536
|
+
|
|
4537
|
+
function constructDurationSlots(e = 0, n = 0, t = 0, o = 0, r = 0, i = 0, a = 0, s = 0, c = 0, u = 0) {
|
|
4538
|
+
return createDurationSlots(checkDurationUnits(mapProps(toStrictInteger, zipProps(pe, [ e, n, t, o, r, i, a, s, c, u ]))));
|
|
4539
|
+
}
|
|
4540
|
+
|
|
4541
|
+
function instantToZonedDateTime(e, n, t = ce) {
|
|
4542
|
+
return createZonedDateTimeSlots(e.epochNanoseconds, n, t);
|
|
4543
|
+
}
|
|
4544
|
+
|
|
4545
|
+
function zonedDateTimeToInstant(e) {
|
|
4546
|
+
return createInstantSlots(e.epochNanoseconds);
|
|
4547
|
+
}
|
|
4548
|
+
|
|
4549
|
+
function zonedDateTimeToPlainDateTime(e, n) {
|
|
4550
|
+
return createPlainDateTimeSlots(wn(n, e));
|
|
4551
|
+
}
|
|
4552
|
+
|
|
4553
|
+
function zonedDateTimeToPlainDate(e, n) {
|
|
4554
|
+
return createPlainDateSlots(wn(n, e));
|
|
4555
|
+
}
|
|
4556
|
+
|
|
4557
|
+
function zonedDateTimeToPlainYearMonth(e, n, t) {
|
|
4558
|
+
return convertToPlainYearMonth(e(n.calendar), t);
|
|
4559
|
+
}
|
|
4560
|
+
|
|
4561
|
+
function zonedDateTimeToPlainMonthDay(e, n, t) {
|
|
4562
|
+
return convertToPlainMonthDay(e(n.calendar), t);
|
|
4563
|
+
}
|
|
4564
|
+
|
|
4565
|
+
function zonedDateTimeToPlainTime(e, n) {
|
|
4566
|
+
return createPlainTimeSlots(wn(n, e));
|
|
4567
|
+
}
|
|
4568
|
+
|
|
4569
|
+
function plainDateTimeToZonedDateTime(e, n, t, o) {
|
|
4570
|
+
return createZonedDateTimeSlots(((e, n, t, o) => {
|
|
4571
|
+
const r = refineEpochDisambigOptions(o);
|
|
4572
|
+
return checkEpochNanoInBounds(getSingleInstantFor(e(n), t, r));
|
|
4573
|
+
})(e, t, n, o), t, n.calendar);
|
|
4574
|
+
}
|
|
4575
|
+
|
|
4576
|
+
function plainDateTimeToPlainYearMonth(e, n, t) {
|
|
4577
|
+
const o = e(n.calendar);
|
|
4578
|
+
return createPlainYearMonthSlots({
|
|
4579
|
+
...n,
|
|
4580
|
+
...convertToPlainYearMonth(o, t)
|
|
4581
|
+
});
|
|
4582
|
+
}
|
|
4583
|
+
|
|
4584
|
+
function plainDateTimeToPlainMonthDay(e, n, t) {
|
|
4585
|
+
return convertToPlainMonthDay(e(n.calendar), t);
|
|
4586
|
+
}
|
|
4587
|
+
|
|
4588
|
+
function plainDateToZonedDateTime(e, n, t, o, r) {
|
|
4589
|
+
const i = e(r.timeZone), a = r.plainTime, s = void 0 !== a ? n(a) : be;
|
|
4590
|
+
return createZonedDateTimeSlots(getSingleInstantFor(t(i), {
|
|
4591
|
+
...o,
|
|
4592
|
+
...s
|
|
4593
|
+
}), i, o.calendar);
|
|
4594
|
+
}
|
|
4595
|
+
|
|
4596
|
+
function plainDateToPlainDateTime(e, n = be) {
|
|
4597
|
+
return createPlainDateTimeSlots(checkIsoDateTimeInBounds({
|
|
4598
|
+
...e,
|
|
4599
|
+
...n
|
|
4600
|
+
}));
|
|
4601
|
+
}
|
|
4602
|
+
|
|
4603
|
+
function plainDateToPlainYearMonth(e, n, t) {
|
|
4604
|
+
return convertToPlainYearMonth(e(n.calendar), t);
|
|
4605
|
+
}
|
|
4606
|
+
|
|
4607
|
+
function plainDateToPlainMonthDay(e, n, t) {
|
|
4608
|
+
return convertToPlainMonthDay(e(n.calendar), t);
|
|
4609
|
+
}
|
|
4610
|
+
|
|
4611
|
+
function plainYearMonthToPlainDate(e, n, t, o) {
|
|
4612
|
+
return ((e, n, t) => convertToIso(e, n, oe, requireObjectLike(t), ne))(e(n.calendar), t, o);
|
|
4613
|
+
}
|
|
4614
|
+
|
|
4615
|
+
function plainMonthDayToPlainDate(e, n, t, o) {
|
|
4616
|
+
return ((e, n, t) => convertToIso(e, n, ae, requireObjectLike(t), Q))(e(n.calendar), t, o);
|
|
4617
|
+
}
|
|
4618
|
+
|
|
4619
|
+
function plainTimeToZonedDateTime(e, n, t, o, r) {
|
|
4620
|
+
const i = requireObjectLike(r), a = n(i.plainDate), s = e(i.timeZone);
|
|
4621
|
+
return createZonedDateTimeSlots(getSingleInstantFor(t(s), {
|
|
4622
|
+
...a,
|
|
4623
|
+
...o
|
|
4624
|
+
}), s, a.calendar);
|
|
4625
|
+
}
|
|
4626
|
+
|
|
4627
|
+
function plainTimeToPlainDateTime(e, n) {
|
|
4628
|
+
return createPlainDateTimeSlots(checkIsoDateTimeInBounds({
|
|
4629
|
+
...e,
|
|
4630
|
+
...n
|
|
4631
|
+
}));
|
|
4632
|
+
}
|
|
4633
|
+
|
|
4634
|
+
function epochSecToInstant(e) {
|
|
4635
|
+
return createInstantSlots(checkEpochNanoInBounds(numberToBigNano(e, A)));
|
|
4636
|
+
}
|
|
4637
|
+
|
|
4638
|
+
function epochMilliToInstant(e) {
|
|
4639
|
+
return createInstantSlots(checkEpochNanoInBounds(numberToBigNano(e, q)));
|
|
4640
|
+
}
|
|
4641
|
+
|
|
4642
|
+
function epochMicroToInstant(e) {
|
|
4643
|
+
return createInstantSlots(checkEpochNanoInBounds(bigIntToBigNano(toBigInt(e), z)));
|
|
4644
|
+
}
|
|
4645
|
+
|
|
4646
|
+
function epochNanoToInstant(e) {
|
|
4647
|
+
return createInstantSlots(checkEpochNanoInBounds(bigIntToBigNano(toBigInt(e))));
|
|
4648
|
+
}
|
|
4649
|
+
|
|
4650
|
+
function zonedDateTimeWithPlainTime(e, n, t = be) {
|
|
4651
|
+
const o = n.timeZone, r = e(o), i = {
|
|
4652
|
+
...wn(n, r),
|
|
4653
|
+
...t
|
|
4654
|
+
};
|
|
4655
|
+
return createZonedDateTimeSlots(getMatchingInstantFor(r, i, i.offsetNanoseconds, 2), o, n.calendar);
|
|
4656
|
+
}
|
|
4657
|
+
|
|
4658
|
+
function zonedDateTimeWithPlainDate(e, n, t) {
|
|
4659
|
+
const o = n.timeZone, r = e(o), i = {
|
|
4660
|
+
...wn(n, r),
|
|
4661
|
+
...t
|
|
4662
|
+
}, a = getPreferredCalendarSlot(n.calendar, t.calendar);
|
|
4663
|
+
return createZonedDateTimeSlots(getMatchingInstantFor(r, i, i.offsetNanoseconds, 2), o, a);
|
|
4664
|
+
}
|
|
4665
|
+
|
|
4666
|
+
function plainDateTimeWithPlainTime(e, n = be) {
|
|
4667
|
+
return createPlainDateTimeSlots({
|
|
4668
|
+
...e,
|
|
4669
|
+
...n
|
|
4670
|
+
});
|
|
4671
|
+
}
|
|
4672
|
+
|
|
4673
|
+
function plainDateTimeWithPlainDate(e, n) {
|
|
4674
|
+
return createPlainDateTimeSlots({
|
|
4675
|
+
...e,
|
|
4676
|
+
...n
|
|
4677
|
+
}, getPreferredCalendarSlot(e.calendar, n.calendar));
|
|
4678
|
+
}
|
|
4679
|
+
|
|
4680
|
+
function slotsWithCalendar(e, n) {
|
|
4681
|
+
return {
|
|
4682
|
+
...e,
|
|
4683
|
+
calendar: n
|
|
4684
|
+
};
|
|
4685
|
+
}
|
|
4686
|
+
|
|
4687
|
+
function slotsWithTimeZone(e, n) {
|
|
4688
|
+
return {
|
|
4689
|
+
...e,
|
|
4690
|
+
timeZone: n
|
|
4691
|
+
};
|
|
4692
|
+
}
|
|
4693
|
+
|
|
4694
|
+
function getPreferredCalendarSlot(e, n) {
|
|
4695
|
+
if (e === n) {
|
|
4696
|
+
return e;
|
|
4697
|
+
}
|
|
4698
|
+
const t = getId(e), o = getId(n);
|
|
4699
|
+
if (t === o || t === ce) {
|
|
4700
|
+
return n;
|
|
4701
|
+
}
|
|
4702
|
+
if (o === ce) {
|
|
4703
|
+
return e;
|
|
4704
|
+
}
|
|
4705
|
+
throw new RangeError(p);
|
|
4706
|
+
}
|
|
4707
|
+
|
|
4708
|
+
function createNativeOpsCreator(e, n) {
|
|
4709
|
+
return t => t === ce ? e : t === ue || t === le ? Object.assign(Object.create(e), {
|
|
4710
|
+
id: t
|
|
4711
|
+
}) : Object.assign(Object.create(n), Jn(t));
|
|
4712
|
+
}
|
|
4713
|
+
|
|
4714
|
+
function createOptionsTransformer(e, n, t = []) {
|
|
4715
|
+
const o = new Set(t);
|
|
4716
|
+
return t => (((e, n) => {
|
|
4717
|
+
for (const t of n) {
|
|
4718
|
+
if (t in e) {
|
|
4719
|
+
return 1;
|
|
4720
|
+
}
|
|
4721
|
+
}
|
|
4722
|
+
return 0;
|
|
4723
|
+
})(t = excludePropsByName(o, t), e) || Object.assign(t, n), t);
|
|
4724
|
+
}
|
|
4725
|
+
|
|
4726
|
+
function isoDateFieldsToEpochNano(e, n) {
|
|
4727
|
+
return getSingleInstantFor(kn(n.timeZone), {
|
|
4728
|
+
...be,
|
|
4729
|
+
isoHour: 12,
|
|
4730
|
+
...e
|
|
4731
|
+
});
|
|
4732
|
+
}
|
|
4733
|
+
|
|
4734
|
+
function extractEpochNano(e) {
|
|
4735
|
+
return e.epochNanoseconds;
|
|
4736
|
+
}
|
|
4737
|
+
|
|
4738
|
+
function createFormatPrepper(e, n = createFormatForPrep) {
|
|
4739
|
+
const [t, , , o] = e;
|
|
4740
|
+
return (r, i = Rt, ...a) => {
|
|
4741
|
+
const s = n(o ? o(...a) : void 0, r, i, t), c = s.resolvedOptions();
|
|
4742
|
+
return [ s, ...toEpochMillis(e, c, ...a) ];
|
|
4743
|
+
};
|
|
4744
|
+
}
|
|
4745
|
+
|
|
4746
|
+
function createFormatForPrep(e, n, t, o) {
|
|
4747
|
+
if (t = o(t), e) {
|
|
4748
|
+
if (void 0 !== t.timeZone) {
|
|
4749
|
+
throw new TypeError(O);
|
|
4750
|
+
}
|
|
4751
|
+
t.timeZone = e;
|
|
4752
|
+
}
|
|
4753
|
+
return new Oe(n, t);
|
|
4754
|
+
}
|
|
4755
|
+
|
|
4756
|
+
function toEpochMillis(e, n, ...t) {
|
|
4757
|
+
const [, o, r] = e;
|
|
4758
|
+
return t.map((e => (e.calendar && ((e, n, t) => {
|
|
4759
|
+
if ((t || e !== ce) && e !== n) {
|
|
4760
|
+
throw new RangeError(p);
|
|
4761
|
+
}
|
|
4762
|
+
})(getId(e.calendar), n.calendar, r), epochNanoToMilli(o(e, n)))));
|
|
4763
|
+
}
|
|
4764
|
+
|
|
4765
|
+
function getCurrentIsoDateTime(e) {
|
|
4766
|
+
const n = getCurrentEpochNano();
|
|
4767
|
+
return epochNanoToIso(n, e.getOffsetNanosecondsFor(n));
|
|
4768
|
+
}
|
|
4769
|
+
|
|
4770
|
+
function getCurrentEpochNano() {
|
|
4771
|
+
return numberToBigNano(Date.now(), q);
|
|
4772
|
+
}
|
|
4773
|
+
|
|
4774
|
+
function getCurrentTimeZoneId() {
|
|
4775
|
+
return Zt || (Zt = (new Oe).resolvedOptions().timeZone);
|
|
4776
|
+
}
|
|
4777
|
+
|
|
4778
|
+
const expectedInteger = (e, n) => `Non-integer ${e}: ${n}`, expectedPositive = (e, n) => `Non-positive ${e}: ${n}`, expectedFinite = (e, n) => `Non-finite ${e}: ${n}`, forbiddenBigIntToNumber = e => `Cannot convert bigint to ${e}`, invalidBigInt = e => `Invalid bigint: ${e}`, e = "Cannot convert Symbol to string", n = "Invalid object", numberOutOfRange = (e, n, t, o, r) => r ? numberOutOfRange(e, r[n], r[t], r[o]) : invalidEntity(e, n) + `; must be between ${t}-${o}`, invalidEntity = (e, n) => `Invalid ${e}: ${n}`, missingField = e => `Missing ${e}`, forbiddenField = e => `Invalid field ${e}`, duplicateFields = e => `Duplicate field ${e}`, noValidFields = e => "No valid fields: " + e.join(), t = "Invalid bag", invalidChoice = (e, n, t) => invalidEntity(e, n) + "; must be " + Object.keys(t).join(), o = "Cannot use valueOf", r = "Invalid calling context", i = "Forbidden era/eraYear", a = "Mismatching era/eraYear", s = "Mismatching year/eraYear", invalidEra = e => `Invalid era: ${e}`, missingYear = e => "Missing year" + (e ? "/era/eraYear" : ""), invalidMonthCode = e => `Invalid monthCode: ${e}`, c = "Mismatching month/monthCode", u = "Missing month/monthCode", l = "Cannot guess year", f = "Invalid leap month", d = "Invalid protocol", m = "Invalid protocol results", p = "Mismatching Calendars", invalidCalendar = e => `Invalid Calendar: ${e}`, h = "Mismatching TimeZones", T = "Forbidden ICU TimeZone", g = "Out-of-bounds offset", D$1 = "Out-of-bounds TimeZone gap", I = "Invalid TimeZone offset", M = "Ambiguous offset", N = "Out-of-bounds date", y = "Out-of-bounds duration", v = "Cannot mix duration signs", P = "Missing relativeTo", E = "Cannot use large units", S = "Required smallestUnit or largestUnit", F = "smallestUnit > largestUnit", failedParse = e => `Cannot parse: ${e}`, invalidSubstring = e => `Invalid substring: ${e}`, invalidFormatType = e => `Cannot format ${e}`, b = "Mismatching types for formatting", O = "Cannot specify TimeZone", w = /*@__PURE__*/ bindArgs(mapPropNames, ((e, n) => n)), B = /*@__PURE__*/ bindArgs(mapPropNames, ((e, n, t) => t)), k = /*@__PURE__*/ bindArgs(padNumber, 2), Y = {
|
|
4779
|
+
nanosecond: 0,
|
|
4780
|
+
microsecond: 1,
|
|
4781
|
+
millisecond: 2,
|
|
4782
|
+
second: 3,
|
|
4783
|
+
minute: 4,
|
|
4784
|
+
hour: 5,
|
|
4785
|
+
day: 6,
|
|
4786
|
+
week: 7,
|
|
4787
|
+
month: 8,
|
|
4788
|
+
year: 9
|
|
4789
|
+
}, C = /*@__PURE__*/ Object.keys(Y), R = 864e5, Z = 1e3, z = 1e3, q = 1e6, A = 1e9, L = 6e10, U = 36e11, W = 864e11, j = [ 1, z, q, A, L, U, W ], $ = /*@__PURE__*/ C.slice(0, 6), x = /*@__PURE__*/ sortStrings($), H = [ "offset" ], G = [ "timeZone" ], V = /*@__PURE__*/ $.concat(H), _ = /*@__PURE__*/ V.concat(G), J = [ "era", "eraYear" ], K = /*@__PURE__*/ J.concat([ "year" ]), Q = [ "year" ], X = [ "monthCode" ], ee = /*@__PURE__*/ [ "month" ].concat(X), ne = [ "day" ], te = /*@__PURE__*/ ee.concat(Q), oe = /*@__PURE__*/ X.concat(Q), re = /*@__PURE__*/ ne.concat(te), ie = /*@__PURE__*/ ne.concat(ee), ae = /*@__PURE__*/ ne.concat(X), se = /*@__PURE__*/ B($, 0), ce = "iso8601", ue = "gregory", le = "japanese", fe = {
|
|
4790
|
+
[ue]: {
|
|
4791
|
+
bce: -1,
|
|
4792
|
+
ce: 0
|
|
4793
|
+
},
|
|
4794
|
+
[le]: {
|
|
4795
|
+
bce: -1,
|
|
4796
|
+
ce: 0,
|
|
4797
|
+
meiji: 1867,
|
|
4798
|
+
taisho: 1911,
|
|
4799
|
+
showa: 1925,
|
|
4800
|
+
heisei: 1988,
|
|
4801
|
+
reiwa: 2018
|
|
4802
|
+
},
|
|
4803
|
+
ethioaa: {
|
|
4804
|
+
era0: 0
|
|
4805
|
+
},
|
|
4806
|
+
ethiopic: {
|
|
4807
|
+
era0: 0,
|
|
4808
|
+
era1: 5500
|
|
4809
|
+
},
|
|
4810
|
+
coptic: {
|
|
4811
|
+
era0: -1,
|
|
4812
|
+
era1: 0
|
|
4813
|
+
},
|
|
4814
|
+
roc: {
|
|
4815
|
+
beforeroc: -1,
|
|
4816
|
+
minguo: 0
|
|
4817
|
+
},
|
|
4818
|
+
buddhist: {
|
|
4819
|
+
be: 0
|
|
4820
|
+
},
|
|
4821
|
+
islamic: {
|
|
4822
|
+
ah: 0
|
|
4823
|
+
},
|
|
4824
|
+
indian: {
|
|
4825
|
+
saka: 0
|
|
4826
|
+
},
|
|
4827
|
+
persian: {
|
|
4828
|
+
ap: 0
|
|
4829
|
+
}
|
|
4830
|
+
}, de = {
|
|
4831
|
+
bc: "bce",
|
|
4832
|
+
ad: "ce"
|
|
4833
|
+
}, me = {
|
|
4834
|
+
chinese: 13,
|
|
4835
|
+
dangi: 13,
|
|
4836
|
+
hebrew: -6
|
|
4837
|
+
}, pe = /*@__PURE__*/ C.map((e => e + "s")), he = /*@__PURE__*/ sortStrings(pe), Te = /*@__PURE__*/ pe.slice(0, 6), ge = /*@__PURE__*/ pe.slice(6), De = /*@__PURE__*/ ge.slice(1), Ie = /*@__PURE__*/ w(pe), Me = /*@__PURE__*/ B(pe, 0), Ne = /*@__PURE__*/ B(Te, 0), ye = [ "isoNanosecond", "isoMicrosecond", "isoMillisecond", "isoSecond", "isoMinute", "isoHour" ], ve = [ "isoDay", "isoMonth", "isoYear" ], Pe = /*@__PURE__*/ ye.concat(ve), Ee = /*@__PURE__*/ sortStrings(ve), Se = /*@__PURE__*/ sortStrings(ye), Fe = /*@__PURE__*/ sortStrings(Pe), be = /*@__PURE__*/ B(Se, 0), Oe = Intl.DateTimeFormat, we = "en-GB", Be = 1e8, ke = Be * R, Ye = [ Be, 0 ], Ce = [ -Be, 0 ], Re = 275760, Ze = -271821, ze = 1970, qe = 1972, Ae = 12, Le = /*@__PURE__*/ isoArgsToEpochMilli(1868, 9, 8), Ue = /*@__PURE__*/ memoize(computeJapaneseEraParts, WeakMap), We = /*@__PURE__*/ bindArgs(requireType, "string"), je = /*@__PURE__*/ bindArgs(requireType, "boolean"), $e = /*@__PURE__*/ bindArgs(requireType, "number"), xe = /*@__PURE__*/ bindArgs(requireType, "function"), He = "smallestUnit", Ge = "unit", Ve = "roundingIncrement", _e = "fractionalSecondDigits", Je = "relativeTo", Ke = {
|
|
4838
|
+
constrain: 0,
|
|
4839
|
+
reject: 1
|
|
4840
|
+
}, Qe = /*@__PURE__*/ Object.keys(Ke), Xe = {
|
|
4841
|
+
compatible: 0,
|
|
4842
|
+
reject: 1,
|
|
4843
|
+
earlier: 2,
|
|
4844
|
+
later: 3
|
|
4845
|
+
}, en = {
|
|
4846
|
+
reject: 0,
|
|
4847
|
+
use: 1,
|
|
4848
|
+
prefer: 2,
|
|
4849
|
+
ignore: 3
|
|
4850
|
+
}, nn = {
|
|
4851
|
+
auto: 0,
|
|
4852
|
+
never: 1,
|
|
4853
|
+
critical: 2,
|
|
4854
|
+
always: 3
|
|
4855
|
+
}, tn = {
|
|
4856
|
+
auto: 0,
|
|
4857
|
+
never: 1,
|
|
4858
|
+
critical: 2
|
|
4859
|
+
}, on = {
|
|
4860
|
+
auto: 0,
|
|
4861
|
+
never: 1
|
|
4862
|
+
}, rn = {
|
|
4863
|
+
floor: 0,
|
|
4864
|
+
halfFloor: 1,
|
|
4865
|
+
ceil: 2,
|
|
4866
|
+
halfCeil: 3,
|
|
4867
|
+
trunc: 4,
|
|
4868
|
+
halfTrunc: 5,
|
|
4869
|
+
expand: 6,
|
|
4870
|
+
halfExpand: 7,
|
|
4871
|
+
halfEven: 8
|
|
4872
|
+
}, an = /*@__PURE__*/ bindArgs(refineUnitOption, He), sn = /*@__PURE__*/ bindArgs(refineUnitOption, "largestUnit"), cn = /*@__PURE__*/ bindArgs(refineUnitOption, Ge), un = /*@__PURE__*/ bindArgs(refineChoiceOption, "overflow", Ke), ln = /*@__PURE__*/ bindArgs(refineChoiceOption, "disambiguation", Xe), fn = /*@__PURE__*/ bindArgs(refineChoiceOption, "offset", en), dn = /*@__PURE__*/ bindArgs(refineChoiceOption, "calendarName", nn), mn = /*@__PURE__*/ bindArgs(refineChoiceOption, "timeZoneName", tn), pn = /*@__PURE__*/ bindArgs(refineChoiceOption, "offset", on), hn = /*@__PURE__*/ bindArgs(refineChoiceOption, "roundingMode", rn), Tn = "PlainYearMonth", gn = "PlainMonthDay", Dn = "PlainDate", In = "PlainDateTime", Mn = "PlainTime", Nn = "ZonedDateTime", yn = "Instant", vn = "Duration", Pn = [ Math.floor, e => hasHalf(e) ? Math.floor(e) : Math.round(e), Math.ceil, e => hasHalf(e) ? Math.ceil(e) : Math.round(e), Math.trunc, e => hasHalf(e) ? Math.trunc(e) || 0 : Math.round(e), e => e < 0 ? Math.floor(e) : Math.ceil(e), e => Math.sign(e) * Math.round(Math.abs(e)) || 0, e => hasHalf(e) ? (e = Math.trunc(e) || 0) + e % 2 : Math.round(e) ], En = "UTC", Sn = 5184e3, Fn = /*@__PURE__*/ isoArgsToEpochSec(1847), bn = /*@__PURE__*/ isoArgsToEpochSec(/*@__PURE__*/ (/*@__PURE__*/ new Date).getUTCFullYear() + 10), On = /0+$/, wn = /*@__PURE__*/ memoize(_zonedEpochSlotsToIso, WeakMap), Bn = 2 ** 32 - 1, kn = /*@__PURE__*/ memoize((e => {
|
|
4873
|
+
const n = getTimeZoneEssence(e);
|
|
4874
|
+
return "object" == typeof n ? new IntlTimeZone(n) : new FixedTimeZone(n || 0);
|
|
4875
|
+
}));
|
|
4876
|
+
|
|
4877
|
+
class FixedTimeZone {
|
|
4878
|
+
constructor(e) {
|
|
4879
|
+
this.h = e;
|
|
4880
|
+
}
|
|
4881
|
+
getOffsetNanosecondsFor() {
|
|
4882
|
+
return this.h;
|
|
4883
|
+
}
|
|
4884
|
+
getPossibleInstantsFor(e) {
|
|
4885
|
+
return [ isoToEpochNanoWithOffset(e, this.h) ];
|
|
4886
|
+
}
|
|
4887
|
+
C() {}
|
|
4888
|
+
}
|
|
4889
|
+
|
|
4890
|
+
class IntlTimeZone {
|
|
4891
|
+
constructor(e) {
|
|
4892
|
+
this.R = (e => {
|
|
4893
|
+
function getOffsetSec(e) {
|
|
4894
|
+
const i = clampNumber(e, o, r), [a, s] = computePeriod(i), c = n(a), u = n(s);
|
|
4895
|
+
return c === u ? c : pinch(t(a, s), c, u, e);
|
|
4896
|
+
}
|
|
4897
|
+
function pinch(n, t, o, r) {
|
|
4898
|
+
let i, a;
|
|
4899
|
+
for (;(void 0 === r || void 0 === (i = r < n[0] ? t : r >= n[1] ? o : void 0)) && (a = n[1] - n[0]); ) {
|
|
4900
|
+
const t = n[0] + Math.floor(a / 2);
|
|
4901
|
+
e(t) === o ? n[1] = t : n[0] = t + 1;
|
|
4902
|
+
}
|
|
4903
|
+
return i;
|
|
4904
|
+
}
|
|
4905
|
+
const n = memoize(e), t = memoize(createSplitTuple);
|
|
4906
|
+
let o = Fn, r = bn;
|
|
4907
|
+
return {
|
|
4908
|
+
q(e) {
|
|
4909
|
+
const n = getOffsetSec(e - 86400), t = getOffsetSec(e + 86400), o = e - n, r = e - t;
|
|
4910
|
+
if (n === t) {
|
|
4911
|
+
return [ o ];
|
|
4912
|
+
}
|
|
4913
|
+
const i = getOffsetSec(o);
|
|
4914
|
+
return i === getOffsetSec(r) ? [ e - i ] : n > t ? [ o, r ] : [];
|
|
4915
|
+
},
|
|
4916
|
+
L: getOffsetSec,
|
|
4917
|
+
C(e, i) {
|
|
4918
|
+
const a = clampNumber(e, o, r);
|
|
4919
|
+
let [s, c] = computePeriod(a);
|
|
4920
|
+
const u = Sn * i, l = i < 0 ? () => c > o || (o = a, 0) : () => s < r || (r = a,
|
|
4921
|
+
0);
|
|
4922
|
+
for (;l(); ) {
|
|
4923
|
+
const o = n(s), r = n(c);
|
|
4924
|
+
if (o !== r) {
|
|
4925
|
+
const n = t(s, c);
|
|
4926
|
+
pinch(n, o, r);
|
|
4927
|
+
const a = n[0];
|
|
4928
|
+
if ((compareNumbers(a, e) || 1) === i) {
|
|
4929
|
+
return a;
|
|
4930
|
+
}
|
|
4931
|
+
}
|
|
4932
|
+
s += u, c += u;
|
|
4933
|
+
}
|
|
4934
|
+
}
|
|
4935
|
+
};
|
|
4936
|
+
})((e => n => {
|
|
4937
|
+
const t = hashIntlFormatParts(e, n * Z);
|
|
4938
|
+
return isoArgsToEpochSec(parseIntlPartsYear(t), parseInt(t.month), parseInt(t.day), parseInt(t.hour), parseInt(t.minute), parseInt(t.second)) - n;
|
|
4939
|
+
})(e));
|
|
4940
|
+
}
|
|
4941
|
+
getOffsetNanosecondsFor(e) {
|
|
4942
|
+
return this.R.L(epochNanoToSec(e)) * A;
|
|
4943
|
+
}
|
|
4944
|
+
getPossibleInstantsFor(e) {
|
|
4945
|
+
const [n, t] = [ isoArgsToEpochSec((o = e).isoYear, o.isoMonth, o.isoDay, o.isoHour, o.isoMinute, o.isoSecond), o.isoMillisecond * q + o.isoMicrosecond * z + o.isoNanosecond ];
|
|
4946
|
+
var o;
|
|
4947
|
+
return this.R.q(n).map((e => checkEpochNanoInBounds(addBigNanoAndNumber(numberToBigNano(e, A), t))));
|
|
4948
|
+
}
|
|
4949
|
+
C(e, n) {
|
|
4950
|
+
const [t, o] = epochNanoToSecMod(e), r = this.R.C(t + (n > 0 || o ? 1 : 0), n);
|
|
4951
|
+
if (void 0 !== r) {
|
|
4952
|
+
return numberToBigNano(r, A);
|
|
4953
|
+
}
|
|
4954
|
+
}
|
|
4955
|
+
}
|
|
4956
|
+
|
|
4957
|
+
const Yn = "([+−-])", Cn = "(?:[.,](\\d{1,9}))?", Rn = `(?:(?:${Yn}(\\d{6}))|(\\d{4}))-?(\\d{2})`, Zn = "(\\d{2})(?::?(\\d{2})(?::?(\\d{2})" + Cn + ")?)?", zn = Yn + Zn, qn = Rn + "-?(\\d{2})(?:[T ]" + Zn + "(Z|" + zn + ")?)?", An = "\\[(!?)([^\\]]*)\\]", Ln = `((?:${An}){0,9})`, Un = /*@__PURE__*/ createRegExp(Rn + Ln), Wn = /*@__PURE__*/ createRegExp("(?:--)?(\\d{2})-?(\\d{2})" + Ln), jn = /*@__PURE__*/ createRegExp(qn + Ln), $n = /*@__PURE__*/ createRegExp("T?" + Zn + "(?:" + zn + ")?" + Ln), xn = /*@__PURE__*/ createRegExp(zn), Hn = /*@__PURE__*/ new RegExp(An, "g"), Gn = /*@__PURE__*/ createRegExp(`${Yn}?P(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(?:T(?:(\\d+)${Cn}H)?(?:(\\d+)${Cn}M)?(?:(\\d+)${Cn}S)?)?`), Vn = /*@__PURE__*/ memoize((e => new Oe(we, {
|
|
4958
|
+
timeZone: e,
|
|
4959
|
+
era: "short",
|
|
4960
|
+
year: "numeric",
|
|
4961
|
+
month: "numeric",
|
|
4962
|
+
day: "numeric",
|
|
4963
|
+
hour: "numeric",
|
|
4964
|
+
minute: "numeric",
|
|
4965
|
+
second: "numeric"
|
|
4966
|
+
}))), _n = /^(AC|AE|AG|AR|AS|BE|BS|CA|CN|CS|CT|EA|EC|IE|IS|JS|MI|NE|NS|PL|PN|PR|PS|SS|VS)T$/, Jn = /*@__PURE__*/ memoize(createIntlCalendar), Kn = /*@__PURE__*/ memoize((e => new Oe(we, {
|
|
4967
|
+
calendar: e,
|
|
4968
|
+
timeZone: En,
|
|
4969
|
+
era: "short",
|
|
4970
|
+
year: "numeric",
|
|
4971
|
+
month: "short",
|
|
4972
|
+
day: "numeric"
|
|
4973
|
+
}))), Qn = /^M(\d{2})(L?)$/, Xn = {
|
|
4974
|
+
era: toStringViaPrimitive,
|
|
4975
|
+
eraYear: toInteger,
|
|
4976
|
+
year: toInteger,
|
|
4977
|
+
month: toPositiveInteger,
|
|
4978
|
+
monthCode: toStringViaPrimitive,
|
|
4979
|
+
day: toPositiveInteger
|
|
4980
|
+
}, et = /*@__PURE__*/ B($, toInteger), nt = /*@__PURE__*/ B(pe, toStrictInteger), tt = /*@__PURE__*/ Object.assign({}, Xn, et, nt, {
|
|
4981
|
+
offset: toStringViaPrimitive
|
|
4982
|
+
}), ot = /*@__PURE__*/ bindArgs(remapProps, $, ye), rt = {
|
|
4983
|
+
dateAdd(e, n, t) {
|
|
4984
|
+
const o = refineOverflowOptions(t);
|
|
4985
|
+
let r, {years: i, months: a, weeks: s, days: c} = n;
|
|
4986
|
+
if (c += givenFieldsToBigNano(n, 5, pe)[0], i || a) {
|
|
4987
|
+
let [n, t, s] = this.u(e);
|
|
4988
|
+
if (i) {
|
|
4989
|
+
const [e, r] = this.l(n, t);
|
|
4990
|
+
n += i, t = monthCodeNumberToMonth(e, r, this.O(n)), t = clampEntity("month", t, 1, this.B(n), o);
|
|
4991
|
+
}
|
|
4992
|
+
a && ([n, t] = this.U(n, t, a)), s = clampEntity("day", s, 1, this.k(n, t), o),
|
|
4993
|
+
r = this.j(n, t, s);
|
|
4994
|
+
} else {
|
|
4995
|
+
if (!s && !c) {
|
|
4996
|
+
return e;
|
|
4997
|
+
}
|
|
4998
|
+
r = isoToEpochMilli(e);
|
|
4999
|
+
}
|
|
5000
|
+
return r += (7 * s + c) * R, checkIsoDateInBounds(epochMilliToIso(r));
|
|
5001
|
+
},
|
|
5002
|
+
dateUntil(e, n, t) {
|
|
5003
|
+
if (t <= 7) {
|
|
5004
|
+
let o = 0, r = diffDays(e, n);
|
|
5005
|
+
return 7 === t && ([o, r] = divModTrunc(r, 7)), {
|
|
5006
|
+
...Me,
|
|
5007
|
+
weeks: o,
|
|
5008
|
+
days: r
|
|
5009
|
+
};
|
|
5010
|
+
}
|
|
5011
|
+
const o = this.u(e), r = this.u(n);
|
|
5012
|
+
let [i, a, s] = ((e, n, t, o, r, i, a) => {
|
|
5013
|
+
let s = r - n, c = i - t, u = a - o;
|
|
5014
|
+
if (s || c) {
|
|
5015
|
+
const l = Math.sign(s || c);
|
|
5016
|
+
let f = e.k(r, i), d = 0;
|
|
5017
|
+
if (Math.sign(u) === -l) {
|
|
5018
|
+
const o = f;
|
|
5019
|
+
[r, i] = e.U(r, i, -l), s = r - n, c = i - t, f = e.k(r, i), d = l < 0 ? -o : f;
|
|
5020
|
+
}
|
|
5021
|
+
if (u = a - Math.min(o, f) + d, s) {
|
|
5022
|
+
const [o, a] = e.l(n, t), [u, f] = e.l(r, i);
|
|
5023
|
+
if (c = u - o || Number(f) - Number(a), Math.sign(c) === -l) {
|
|
5024
|
+
const t = l < 0 && -e.B(r);
|
|
5025
|
+
s = (r -= l) - n, c = i - monthCodeNumberToMonth(o, a, e.O(r)) + (t || e.B(r));
|
|
5026
|
+
}
|
|
5027
|
+
}
|
|
5028
|
+
}
|
|
5029
|
+
return [ s, c, u ];
|
|
5030
|
+
})(this, ...o, ...r);
|
|
5031
|
+
return 8 === t && (a += this.$(i, o[0]), i = 0), {
|
|
5032
|
+
...Me,
|
|
5033
|
+
years: i,
|
|
5034
|
+
months: a,
|
|
5035
|
+
days: s
|
|
5036
|
+
};
|
|
5037
|
+
},
|
|
5038
|
+
dateFromFields(e, n) {
|
|
5039
|
+
const t = refineOverflowOptions(n), o = refineYear(this, e), r = refineMonth(this, e, o, t), i = refineDay(this, e, r, o, t);
|
|
5040
|
+
return createPlainDateSlots(checkIsoDateInBounds(this.p(o, r, i)), this.id || ce);
|
|
5041
|
+
},
|
|
5042
|
+
yearMonthFromFields(e, n) {
|
|
5043
|
+
const t = refineOverflowOptions(n), o = refineYear(this, e), r = refineMonth(this, e, o, t);
|
|
5044
|
+
return createPlainYearMonthSlots(checkIsoYearMonthInBounds(this.p(o, r, 1)), this.id || ce);
|
|
5045
|
+
},
|
|
5046
|
+
monthDayFromFields(e, n) {
|
|
5047
|
+
const t = refineOverflowOptions(n), o = !this.id, {monthCode: r, year: i, month: a} = e;
|
|
5048
|
+
let s, u, f, d, m;
|
|
5049
|
+
if (void 0 !== r) {
|
|
5050
|
+
[s, u] = parseMonthCode(r), m = getDefinedProp(e, "day");
|
|
5051
|
+
const n = this.m(s, u, m);
|
|
5052
|
+
if (!n) {
|
|
5053
|
+
throw new RangeError(l);
|
|
5054
|
+
}
|
|
5055
|
+
if ([f, d] = n, void 0 !== a && a !== d) {
|
|
5056
|
+
throw new RangeError(c);
|
|
5057
|
+
}
|
|
5058
|
+
o && (d = clampEntity("month", d, 1, Ae, 1), m = clampEntity("day", m, 1, computeIsoDaysInMonth(void 0 !== i ? i : f, d), t));
|
|
5059
|
+
} else {
|
|
5060
|
+
f = void 0 === i && o ? qe : refineYear(this, e), d = refineMonth(this, e, f, t),
|
|
5061
|
+
m = refineDay(this, e, d, f, t);
|
|
5062
|
+
const n = this.O(f);
|
|
5063
|
+
u = d === n, s = monthToMonthCodeNumber(d, n);
|
|
5064
|
+
const r = this.m(s, u, m);
|
|
5065
|
+
if (!r) {
|
|
5066
|
+
throw new RangeError(l);
|
|
5067
|
+
}
|
|
5068
|
+
[f, d] = r;
|
|
5069
|
+
}
|
|
5070
|
+
return createPlainMonthDaySlots(this.p(f, d, m), this.id || ce);
|
|
5071
|
+
},
|
|
5072
|
+
fields(e) {
|
|
5073
|
+
return getCalendarEraOrigins(this) && e.includes("year") ? [ ...e, ...J ] : e;
|
|
5074
|
+
},
|
|
5075
|
+
mergeFields(e, n) {
|
|
5076
|
+
const t = Object.assign(Object.create(null), e);
|
|
5077
|
+
return spliceFields(t, n, ee), getCalendarEraOrigins(this) && (spliceFields(t, n, K),
|
|
5078
|
+
this.id === le && spliceFields(t, n, ie, J)), t;
|
|
5079
|
+
},
|
|
5080
|
+
inLeapYear(e) {
|
|
5081
|
+
const [n] = this.u(e);
|
|
5082
|
+
return this.G(n);
|
|
5083
|
+
},
|
|
5084
|
+
monthsInYear(e) {
|
|
5085
|
+
const [n] = this.u(e);
|
|
5086
|
+
return this.B(n);
|
|
5087
|
+
},
|
|
5088
|
+
daysInMonth(e) {
|
|
5089
|
+
const [n, t] = this.u(e);
|
|
5090
|
+
return this.k(n, t);
|
|
5091
|
+
},
|
|
5092
|
+
daysInYear(e) {
|
|
5093
|
+
const [n] = this.u(e);
|
|
5094
|
+
return this.V(n);
|
|
5095
|
+
},
|
|
5096
|
+
era(e) {
|
|
5097
|
+
return this._(e)[0];
|
|
5098
|
+
},
|
|
5099
|
+
eraYear(e) {
|
|
5100
|
+
return this._(e)[1];
|
|
5101
|
+
},
|
|
5102
|
+
monthCode(e) {
|
|
5103
|
+
const [n, t] = this.u(e), [o, r] = this.l(n, t);
|
|
5104
|
+
return ((e, n) => "M" + k(e) + (n ? "L" : ""))(o, r);
|
|
5105
|
+
},
|
|
5106
|
+
dayOfWeek: computeIsoDayOfWeek,
|
|
5107
|
+
daysInWeek() {
|
|
5108
|
+
return 7;
|
|
5109
|
+
}
|
|
5110
|
+
}, it = {
|
|
5111
|
+
weekOfYear: computeNativeWeekOfYear,
|
|
5112
|
+
yearOfWeek: computeNativeYearOfWeek,
|
|
5113
|
+
F(e) {
|
|
5114
|
+
function computeWeekShift(e) {
|
|
5115
|
+
return (7 - e < n ? 7 : 0) - e;
|
|
5116
|
+
}
|
|
5117
|
+
function computeWeeksInYear(e) {
|
|
5118
|
+
const n = computeIsoDaysInYear(u + e), t = e || 1;
|
|
5119
|
+
return (n + (computeWeekShift(modFloor(a + n * t, 7)) - s) * t) / 7;
|
|
5120
|
+
}
|
|
5121
|
+
const n = this.id ? 1 : 4, t = computeIsoDayOfWeek(e), o = computeIsoDayOfYear(e), r = modFloor(t - 1, 7), i = o - 1, a = modFloor(r - i, 7), s = computeWeekShift(a);
|
|
5122
|
+
let c = Math.floor((i - s) / 7) + 1, u = e.isoYear;
|
|
5123
|
+
return c ? c > computeWeeksInYear(0) && (c = 1, u++) : (c = computeWeeksInYear(-1),
|
|
5124
|
+
u--), [ c, u ];
|
|
5125
|
+
}
|
|
5126
|
+
}, at = {
|
|
5127
|
+
weekOfYear: computeNativeWeekOfYear,
|
|
5128
|
+
yearOfWeek: computeNativeYearOfWeek,
|
|
5129
|
+
F() {
|
|
5130
|
+
return [];
|
|
5131
|
+
}
|
|
5132
|
+
}, st = /*@__PURE__*/ createNativeOpsCreator(/*@__PURE__*/ Object.assign({}, rt, it, {
|
|
5133
|
+
u: e => [ e.isoYear, e.isoMonth, e.isoDay ],
|
|
5134
|
+
_(e) {
|
|
5135
|
+
return this.id === ue ? computeGregoryEraParts(e) : this.id === le ? Ue(e) : [];
|
|
5136
|
+
},
|
|
5137
|
+
l: (e, n) => [ n, 0 ],
|
|
5138
|
+
m(e, n) {
|
|
5139
|
+
if (!n) {
|
|
5140
|
+
return [ qe, e ];
|
|
5141
|
+
}
|
|
5142
|
+
},
|
|
5143
|
+
G: computeIsoInLeapYear,
|
|
5144
|
+
O() {},
|
|
5145
|
+
B: computeIsoMonthsInYear,
|
|
5146
|
+
$: e => e * Ae,
|
|
5147
|
+
k: computeIsoDaysInMonth,
|
|
5148
|
+
V: computeIsoDaysInYear,
|
|
5149
|
+
dayOfYear: computeIsoDayOfYear,
|
|
5150
|
+
p: (e, n, t) => ({
|
|
5151
|
+
isoYear: e,
|
|
5152
|
+
isoMonth: n,
|
|
5153
|
+
isoDay: t
|
|
5154
|
+
}),
|
|
5155
|
+
j: isoArgsToEpochMilli,
|
|
5156
|
+
U: (e, n, t) => (e += divTrunc(t, Ae), (n += modTrunc(t, Ae)) < 1 ? (e--, n += Ae) : n > Ae && (e++,
|
|
5157
|
+
n -= Ae), [ e, n ]),
|
|
5158
|
+
year(e) {
|
|
5159
|
+
return e.isoYear;
|
|
5160
|
+
},
|
|
5161
|
+
month(e) {
|
|
5162
|
+
return e.isoMonth;
|
|
5163
|
+
},
|
|
5164
|
+
day: e => e.isoDay
|
|
5165
|
+
}), /*@__PURE__*/ Object.assign({}, rt, at, {
|
|
5166
|
+
u: computeIntlDateParts,
|
|
5167
|
+
_(e) {
|
|
5168
|
+
const n = this.I(e);
|
|
5169
|
+
return [ n.era, n.eraYear ];
|
|
5170
|
+
},
|
|
5171
|
+
l(e, n) {
|
|
5172
|
+
const t = computeIntlLeapMonth.call(this, e);
|
|
5173
|
+
return [ monthToMonthCodeNumber(n, t), t === n ];
|
|
5174
|
+
},
|
|
5175
|
+
m(e, n, t) {
|
|
5176
|
+
let [o, r, i] = computeIntlDateParts.call(this, {
|
|
5177
|
+
isoYear: qe,
|
|
5178
|
+
isoMonth: Ae,
|
|
5179
|
+
isoDay: 31
|
|
5180
|
+
});
|
|
5181
|
+
const a = computeIntlLeapMonth.call(this, o), s = r === a;
|
|
5182
|
+
1 === (compareNumbers(e, monthToMonthCodeNumber(r, a)) || compareNumbers(Number(n), Number(s)) || compareNumbers(t, i)) && o--;
|
|
5183
|
+
for (let r = 0; r < 100; r++) {
|
|
5184
|
+
const i = o - r, a = computeIntlLeapMonth.call(this, i), s = monthCodeNumberToMonth(e, n, a);
|
|
5185
|
+
if (n === (s === a) && t <= computeIntlDaysInMonth.call(this, i, s)) {
|
|
5186
|
+
return [ i, s ];
|
|
5187
|
+
}
|
|
5188
|
+
}
|
|
5189
|
+
},
|
|
5190
|
+
G(e) {
|
|
5191
|
+
const n = computeIntlDaysInYear.call(this, e);
|
|
5192
|
+
return n > computeIntlDaysInYear.call(this, e - 1) && n > computeIntlDaysInYear.call(this, e + 1);
|
|
5193
|
+
},
|
|
5194
|
+
O: computeIntlLeapMonth,
|
|
5195
|
+
B: computeIntlMonthsInYear,
|
|
5196
|
+
$(e, n) {
|
|
5197
|
+
const t = n + e, o = Math.sign(e), r = o < 0 ? -1 : 0;
|
|
5198
|
+
let i = 0;
|
|
5199
|
+
for (let e = n; e !== t; e += o) {
|
|
5200
|
+
i += computeIntlMonthsInYear.call(this, e + r);
|
|
5201
|
+
}
|
|
5202
|
+
return i;
|
|
5203
|
+
},
|
|
5204
|
+
k: computeIntlDaysInMonth,
|
|
5205
|
+
V: computeIntlDaysInYear,
|
|
5206
|
+
dayOfYear(e) {
|
|
5207
|
+
const n = isoToEpochMilli({
|
|
5208
|
+
...e,
|
|
5209
|
+
...be
|
|
5210
|
+
}), {year: t} = this.I(e);
|
|
5211
|
+
return diffEpochMilliByDay(computeIntlEpochMilli.call(this, t), n) + 1;
|
|
5212
|
+
},
|
|
5213
|
+
p(e, n, t) {
|
|
5214
|
+
return checkIsoDateInBounds({
|
|
5215
|
+
...epochMilliToIso(computeIntlEpochMilli.call(this, e, n, t))
|
|
5216
|
+
});
|
|
5217
|
+
},
|
|
5218
|
+
j: computeIntlEpochMilli,
|
|
5219
|
+
U(e, n, t) {
|
|
5220
|
+
if (t) {
|
|
5221
|
+
if (n += t, !Number.isSafeInteger(n)) {
|
|
5222
|
+
throw new RangeError(N);
|
|
5223
|
+
}
|
|
5224
|
+
if (t < 0) {
|
|
5225
|
+
for (;n < 1; ) {
|
|
5226
|
+
n += computeIntlMonthsInYear.call(this, --e);
|
|
5227
|
+
}
|
|
5228
|
+
} else {
|
|
5229
|
+
let t;
|
|
5230
|
+
for (;n > (t = computeIntlMonthsInYear.call(this, e)); ) {
|
|
5231
|
+
n -= t, e++;
|
|
5232
|
+
}
|
|
5233
|
+
}
|
|
5234
|
+
}
|
|
5235
|
+
return [ e, n ];
|
|
5236
|
+
},
|
|
5237
|
+
year(e) {
|
|
5238
|
+
return this.I(e).year;
|
|
5239
|
+
},
|
|
5240
|
+
month(e) {
|
|
5241
|
+
const {year: n, month: t} = this.I(e), {P: o} = this.N(n);
|
|
5242
|
+
return o[t] + 1;
|
|
5243
|
+
},
|
|
5244
|
+
day(e) {
|
|
5245
|
+
return this.I(e).day;
|
|
5246
|
+
}
|
|
5247
|
+
})), ct = "numeric", ut = [ "timeZoneName" ], lt = {
|
|
5248
|
+
month: ct,
|
|
5249
|
+
day: ct
|
|
5250
|
+
}, ft = {
|
|
5251
|
+
year: ct,
|
|
5252
|
+
month: ct
|
|
5253
|
+
}, dt = /*@__PURE__*/ Object.assign({}, ft, {
|
|
5254
|
+
day: ct
|
|
5255
|
+
}), mt = {
|
|
5256
|
+
hour: ct,
|
|
5257
|
+
minute: ct,
|
|
5258
|
+
second: ct
|
|
5259
|
+
}, pt = /*@__PURE__*/ Object.assign({}, dt, mt), ht = /*@__PURE__*/ Object.assign({}, pt, {
|
|
5260
|
+
timeZoneName: "short"
|
|
5261
|
+
}), Tt = /*@__PURE__*/ Object.keys(lt), gt = /*@__PURE__*/ Object.keys(ft), Dt = /*@__PURE__*/ Object.keys(dt), It = /*@__PURE__*/ Object.keys(mt), Mt = /*@__PURE__*/ Dt.concat([ "weekday", "dateStyle" ]), Nt = /*@__PURE__*/ It.concat([ "dayPeriod", "timeStyle" ]), yt = /*@__PURE__*/ Mt.concat(Nt), vt = /*@__PURE__*/ yt.concat(ut), Pt = /*@__PURE__*/ ut.concat(Nt), Et = /*@__PURE__*/ ut.concat(Mt), St = /*@__PURE__*/ ut.concat([ "day", "weekday", "dateStyle" ], Nt), Ft = /*@__PURE__*/ createOptionsTransformer(Tt, lt, /*@__PURE__*/ ut.concat([ "year", "weekday", "dateStyle" ], Nt)), bt = [ /*@__PURE__*/ createOptionsTransformer(gt, ft, St), isoDateFieldsToEpochNano, 1 ], Ot = [ Ft, isoDateFieldsToEpochNano, 1 ], wt = [ /*@__PURE__*/ createOptionsTransformer(Mt, dt, Pt), isoDateFieldsToEpochNano ], Bt = [ /*@__PURE__*/ createOptionsTransformer(yt, pt, ut), isoDateFieldsToEpochNano ], kt = [ /*@__PURE__*/ createOptionsTransformer(Nt, mt, Et), (e, n) => getSingleInstantFor(kn(n.timeZone), {
|
|
5262
|
+
isoYear: ze,
|
|
5263
|
+
isoMonth: 1,
|
|
5264
|
+
isoDay: 1,
|
|
5265
|
+
...e
|
|
5266
|
+
}) ], Yt = [ /*@__PURE__*/ createOptionsTransformer(yt, pt), extractEpochNano ], Ct = [ /*@__PURE__*/ createOptionsTransformer(vt, ht), extractEpochNano, 0, (e, n) => {
|
|
5267
|
+
const t = getId(e.timeZone);
|
|
5268
|
+
if (n && getId(n.timeZone) !== t) {
|
|
5269
|
+
throw new RangeError(h);
|
|
5270
|
+
}
|
|
5271
|
+
return t;
|
|
5272
|
+
} ], Rt = {};
|
|
5273
|
+
|
|
5274
|
+
let Zt;
|
|
5275
|
+
|
|
5276
|
+
function createSlotClass(e, t, n, o, a) {
|
|
5277
|
+
function Class(...e) {
|
|
5278
|
+
if (!(this instanceof Class)) {
|
|
5279
|
+
throw new TypeError(r);
|
|
5280
|
+
}
|
|
5281
|
+
za(this, t(...e));
|
|
5282
|
+
}
|
|
5283
|
+
function bindMethod(e, t) {
|
|
5284
|
+
return Object.defineProperties((function(...t) {
|
|
5285
|
+
return e.call(this, getSpecificSlots(this), ...t);
|
|
5286
|
+
}), createNameDescriptors(t));
|
|
5287
|
+
}
|
|
5288
|
+
function getSpecificSlots(t) {
|
|
5289
|
+
const n = Ua(t);
|
|
5290
|
+
if (!n || n.branding !== e) {
|
|
5291
|
+
throw new TypeError(r);
|
|
5292
|
+
}
|
|
5293
|
+
return n;
|
|
5294
|
+
}
|
|
5295
|
+
return Object.defineProperties(Class.prototype, {
|
|
5296
|
+
...createGetterDescriptors(mapProps(bindMethod, n)),
|
|
5297
|
+
...createPropDescriptors(mapProps(bindMethod, o)),
|
|
5298
|
+
...createStringTagDescriptors("Temporal." + e)
|
|
5299
|
+
}), Object.defineProperties(Class, {
|
|
5300
|
+
...createPropDescriptors(a),
|
|
5301
|
+
...createNameDescriptors(e)
|
|
5302
|
+
}), [ Class, e => {
|
|
5303
|
+
const t = Object.create(Class.prototype);
|
|
5304
|
+
return za(t, e), t;
|
|
5305
|
+
}, getSpecificSlots ];
|
|
5306
|
+
}
|
|
5307
|
+
|
|
5308
|
+
function createProtocolValidator(e) {
|
|
5309
|
+
return e = e.concat("id").sort(), t => {
|
|
5310
|
+
if (!hasAllPropsByName(t, e)) {
|
|
5311
|
+
throw new TypeError(d);
|
|
5312
|
+
}
|
|
5313
|
+
return t;
|
|
5314
|
+
};
|
|
5315
|
+
}
|
|
5316
|
+
|
|
5317
|
+
function rejectInvalidBag(e) {
|
|
5318
|
+
if (Ua(e) || void 0 !== e.calendar || void 0 !== e.timeZone) {
|
|
5319
|
+
throw new TypeError(t);
|
|
5320
|
+
}
|
|
5321
|
+
return e;
|
|
5322
|
+
}
|
|
5323
|
+
|
|
5324
|
+
function createDateTimeFormatClass() {
|
|
5325
|
+
const e = Oe.prototype, t = Object.getOwnPropertyDescriptors(e), n = Object.getOwnPropertyDescriptors(Oe), DateTimeFormat = function(e, t = {}) {
|
|
5326
|
+
if (!(this instanceof DateTimeFormat)) {
|
|
5327
|
+
return new DateTimeFormat(e, t);
|
|
5328
|
+
}
|
|
5329
|
+
Ha.set(this, ((e, t = {}) => {
|
|
5330
|
+
const n = new Oe(e, t), o = n.resolvedOptions(), r = o.locale, a = pluckProps(Object.keys(t), o), i = memoize(createFormatPrepperForBranding), prepFormat = (...e) => {
|
|
5331
|
+
let t;
|
|
5332
|
+
const o = e.map(((e, n) => {
|
|
5333
|
+
const o = Ua(e), r = (o || {}).branding;
|
|
5334
|
+
if (n && t && t !== r) {
|
|
5335
|
+
throw new TypeError(b);
|
|
5336
|
+
}
|
|
5337
|
+
return t = r, o;
|
|
5338
|
+
}));
|
|
5339
|
+
return t ? i(t)(r, a, ...o) : [ n, ...e ];
|
|
5340
|
+
};
|
|
5341
|
+
return prepFormat.J = n, prepFormat;
|
|
5342
|
+
})(e, t));
|
|
5343
|
+
};
|
|
5344
|
+
for (const e in t) {
|
|
5345
|
+
const n = t[e], o = e.startsWith("format") && createFormatMethod(e);
|
|
5346
|
+
"function" == typeof n.value ? n.value = "constructor" === e ? DateTimeFormat : o || createProxiedMethod(e) : o && (n.get = function() {
|
|
5347
|
+
return o.bind(this);
|
|
5348
|
+
});
|
|
5349
|
+
}
|
|
5350
|
+
return n.prototype.value = Object.create(e, t), Object.defineProperties(DateTimeFormat, n),
|
|
5351
|
+
DateTimeFormat;
|
|
5352
|
+
}
|
|
5353
|
+
|
|
5354
|
+
function createFormatMethod(e) {
|
|
5355
|
+
return function(...t) {
|
|
5356
|
+
const n = Ha.get(this), [o, ...r] = n(...t);
|
|
5357
|
+
return o[e](...r);
|
|
5358
|
+
};
|
|
5359
|
+
}
|
|
5360
|
+
|
|
5361
|
+
function createProxiedMethod(e) {
|
|
5362
|
+
return function(...t) {
|
|
5363
|
+
return Ha.get(this).J[e](...t);
|
|
5364
|
+
};
|
|
5365
|
+
}
|
|
5366
|
+
|
|
5367
|
+
function createFormatPrepperForBranding(e) {
|
|
5368
|
+
const t = Ka[e];
|
|
5369
|
+
if (!t) {
|
|
5370
|
+
throw new TypeError(invalidFormatType(e));
|
|
5371
|
+
}
|
|
5372
|
+
return createFormatPrepper(t, memoize(createFormatForPrep));
|
|
5373
|
+
}
|
|
5374
|
+
|
|
5375
|
+
function createCalendarFieldMethods(e, t) {
|
|
5376
|
+
const n = {};
|
|
5377
|
+
for (const o in e) {
|
|
5378
|
+
n[o] = ({K: e}, n) => {
|
|
5379
|
+
const r = Ua(n) || {}, {branding: a} = r, i = a === Dn || t.includes(a) ? r : toPlainDateSlots(n);
|
|
5380
|
+
return e[o](i);
|
|
5381
|
+
};
|
|
5382
|
+
}
|
|
5383
|
+
return n;
|
|
5384
|
+
}
|
|
5385
|
+
|
|
5386
|
+
function createCalendarGetters(e) {
|
|
5387
|
+
const t = {};
|
|
5388
|
+
for (const n in e) {
|
|
5389
|
+
t[n] = e => {
|
|
5390
|
+
const {calendar: t} = e;
|
|
5391
|
+
return (o = t, "string" == typeof o ? st(o) : (r = o, Object.assign(Object.create(mi), {
|
|
5392
|
+
X: r
|
|
5393
|
+
})))[n](e);
|
|
5394
|
+
var o, r;
|
|
5395
|
+
};
|
|
5396
|
+
}
|
|
5397
|
+
return t;
|
|
5398
|
+
}
|
|
5399
|
+
|
|
5400
|
+
function neverValueOf() {
|
|
5401
|
+
throw new TypeError(o);
|
|
5402
|
+
}
|
|
5403
|
+
|
|
5404
|
+
function createCalendarFromSlots({calendar: e}) {
|
|
5405
|
+
return "string" == typeof e ? new ds(e) : e;
|
|
5406
|
+
}
|
|
5407
|
+
|
|
5408
|
+
function toPlainMonthDaySlots(e, t) {
|
|
5409
|
+
if (t = copyOptions(t), isObjectLike(e)) {
|
|
5410
|
+
const n = Ua(e);
|
|
5411
|
+
if (n && n.branding === gn) {
|
|
5412
|
+
return refineOverflowOptions(t), n;
|
|
5413
|
+
}
|
|
5414
|
+
const o = extractCalendarSlotFromBag(e);
|
|
5415
|
+
return refinePlainMonthDayBag(_i(o || ce), !o, e, t);
|
|
5416
|
+
}
|
|
5417
|
+
const n = parsePlainMonthDay(st, e);
|
|
5418
|
+
return refineOverflowOptions(t), n;
|
|
5419
|
+
}
|
|
5420
|
+
|
|
5421
|
+
function getOffsetNanosecondsForAdapter(e, t, n) {
|
|
5422
|
+
return o = t.call(e, bi(createInstantSlots(n))), validateTimeZoneOffset(requireInteger(o));
|
|
5423
|
+
var o;
|
|
5424
|
+
}
|
|
5425
|
+
|
|
5426
|
+
function createAdapterOps(e, t = Ci) {
|
|
5427
|
+
const n = Object.keys(t).sort(), o = {};
|
|
5428
|
+
for (const r of n) {
|
|
5429
|
+
o[r] = bindArgs(t[r], e, xe(e[r]));
|
|
5430
|
+
}
|
|
5431
|
+
return o;
|
|
5432
|
+
}
|
|
5433
|
+
|
|
5434
|
+
function createTimeZoneOps(e, t) {
|
|
5435
|
+
return "string" == typeof e ? kn(e) : createAdapterOps(e, t);
|
|
5436
|
+
}
|
|
5437
|
+
|
|
5438
|
+
function createTimeZoneOffsetOps(e) {
|
|
5439
|
+
return createTimeZoneOps(e, gi);
|
|
5440
|
+
}
|
|
5441
|
+
|
|
5442
|
+
function toInstantSlots(e) {
|
|
5443
|
+
if (isObjectLike(e)) {
|
|
5444
|
+
const t = Ua(e);
|
|
5445
|
+
if (t) {
|
|
5446
|
+
switch (t.branding) {
|
|
5447
|
+
case yn:
|
|
5448
|
+
return t;
|
|
5449
|
+
|
|
5450
|
+
case Nn:
|
|
5451
|
+
return createInstantSlots(t.epochNanoseconds);
|
|
5452
|
+
}
|
|
5453
|
+
}
|
|
5454
|
+
}
|
|
5455
|
+
return parseInstant(e);
|
|
5456
|
+
}
|
|
5457
|
+
|
|
5458
|
+
function xt() {
|
|
5459
|
+
return bi(createInstantSlots(numberToBigNano(this.valueOf(), q)));
|
|
5460
|
+
}
|
|
5461
|
+
|
|
5462
|
+
function getImplTransition(e, t, n) {
|
|
5463
|
+
const o = t.C(toInstantSlots(n).epochNanoseconds, e);
|
|
5464
|
+
return o ? bi(createInstantSlots(o)) : null;
|
|
5465
|
+
}
|
|
5466
|
+
|
|
5467
|
+
function refineTimeZoneSlot(e) {
|
|
5468
|
+
return isObjectLike(e) ? (Ua(e) || {}).timeZone || wi(e) : (e => resolveTimeZoneId(parseTimeZoneId(We(e))))(e);
|
|
5469
|
+
}
|
|
5470
|
+
|
|
5471
|
+
function toPlainTimeSlots(e, t) {
|
|
5472
|
+
if (isObjectLike(e)) {
|
|
5473
|
+
const n = Ua(e) || {};
|
|
5474
|
+
switch (n.branding) {
|
|
5475
|
+
case Mn:
|
|
5476
|
+
return refineOverflowOptions(t), n;
|
|
5477
|
+
|
|
5478
|
+
case In:
|
|
5479
|
+
return refineOverflowOptions(t), createPlainTimeSlots(n);
|
|
5480
|
+
|
|
5481
|
+
case Nn:
|
|
5482
|
+
return refineOverflowOptions(t), zonedDateTimeToPlainTime(createTimeZoneOffsetOps, n);
|
|
5483
|
+
}
|
|
5484
|
+
return refinePlainTimeBag(e, t);
|
|
5485
|
+
}
|
|
5486
|
+
return refineOverflowOptions(t), parsePlainTime(e);
|
|
5487
|
+
}
|
|
5488
|
+
|
|
5489
|
+
function optionalToPlainTimeFields(e) {
|
|
5490
|
+
return void 0 === e ? void 0 : toPlainTimeSlots(e);
|
|
5491
|
+
}
|
|
5492
|
+
|
|
5493
|
+
function toPlainYearMonthSlots(e, t) {
|
|
5494
|
+
if (t = copyOptions(t), isObjectLike(e)) {
|
|
5495
|
+
const n = Ua(e);
|
|
5496
|
+
return n && n.branding === Tn ? (refineOverflowOptions(t), n) : refinePlainYearMonthBag(Xi(getCalendarSlotFromBag(e)), e, t);
|
|
5497
|
+
}
|
|
5498
|
+
const n = parsePlainYearMonth(st, e);
|
|
5499
|
+
return refineOverflowOptions(t), n;
|
|
5500
|
+
}
|
|
5501
|
+
|
|
5502
|
+
function toPlainDateTimeSlots(e, t) {
|
|
5503
|
+
if (t = copyOptions(t), isObjectLike(e)) {
|
|
5504
|
+
const n = Ua(e) || {};
|
|
5505
|
+
switch (n.branding) {
|
|
5506
|
+
case In:
|
|
5507
|
+
return refineOverflowOptions(t), n;
|
|
5508
|
+
|
|
5509
|
+
case Dn:
|
|
5510
|
+
return refineOverflowOptions(t), createPlainDateTimeSlots({
|
|
5511
|
+
...n,
|
|
5512
|
+
...be
|
|
5513
|
+
});
|
|
5514
|
+
|
|
5515
|
+
case Nn:
|
|
5516
|
+
return refineOverflowOptions(t), zonedDateTimeToPlainDateTime(createTimeZoneOffsetOps, n);
|
|
5517
|
+
}
|
|
5518
|
+
return refinePlainDateTimeBag($i(getCalendarSlotFromBag(e)), e, t);
|
|
5519
|
+
}
|
|
5520
|
+
const n = parsePlainDateTime(e);
|
|
5521
|
+
return refineOverflowOptions(t), n;
|
|
5522
|
+
}
|
|
5523
|
+
|
|
5524
|
+
function toPlainDateSlots(e, t) {
|
|
5525
|
+
if (t = copyOptions(t), isObjectLike(e)) {
|
|
5526
|
+
const n = Ua(e) || {};
|
|
5527
|
+
switch (n.branding) {
|
|
5528
|
+
case Dn:
|
|
5529
|
+
return refineOverflowOptions(t), n;
|
|
5530
|
+
|
|
5531
|
+
case In:
|
|
5532
|
+
return refineOverflowOptions(t), createPlainDateSlots(n);
|
|
5533
|
+
|
|
5534
|
+
case Nn:
|
|
5535
|
+
return refineOverflowOptions(t), zonedDateTimeToPlainDate(createTimeZoneOffsetOps, n);
|
|
5536
|
+
}
|
|
5537
|
+
return refinePlainDateBag($i(getCalendarSlotFromBag(e)), e, t);
|
|
5538
|
+
}
|
|
5539
|
+
const n = parsePlainDate(e);
|
|
5540
|
+
return refineOverflowOptions(t), n;
|
|
5541
|
+
}
|
|
5542
|
+
|
|
5543
|
+
function dayAdapter(e, t, n) {
|
|
5544
|
+
return requirePositiveInteger(t.call(e, Vi(createPlainDateSlots(n, e))));
|
|
5545
|
+
}
|
|
5546
|
+
|
|
5547
|
+
function createCompoundOpsCreator(e) {
|
|
5548
|
+
return t => "string" == typeof t ? st(t) : ((e, t) => {
|
|
5549
|
+
const n = Object.keys(t).sort(), o = {};
|
|
5550
|
+
for (const r of n) {
|
|
5551
|
+
o[r] = bindArgs(t[r], e, e[r]);
|
|
5552
|
+
}
|
|
5553
|
+
return o;
|
|
5554
|
+
})(t, e);
|
|
5555
|
+
}
|
|
5556
|
+
|
|
5557
|
+
function toDurationSlots(e) {
|
|
5558
|
+
if (isObjectLike(e)) {
|
|
5559
|
+
const t = Ua(e);
|
|
5560
|
+
return t && t.branding === vn ? t : refineDurationBag(e);
|
|
5561
|
+
}
|
|
5562
|
+
return parseDuration(e);
|
|
5563
|
+
}
|
|
5564
|
+
|
|
5565
|
+
function refinePublicRelativeTo(e) {
|
|
5566
|
+
if (void 0 !== e) {
|
|
5567
|
+
if (isObjectLike(e)) {
|
|
5568
|
+
const t = Ua(e) || {};
|
|
5569
|
+
switch (t.branding) {
|
|
5570
|
+
case Nn:
|
|
5571
|
+
case Dn:
|
|
5572
|
+
return t;
|
|
5573
|
+
|
|
5574
|
+
case In:
|
|
5575
|
+
return createPlainDateSlots(t);
|
|
5576
|
+
}
|
|
5577
|
+
const n = getCalendarSlotFromBag(e);
|
|
5578
|
+
return {
|
|
5579
|
+
...refineMaybeZonedDateTimeBag(refineTimeZoneSlot, createTimeZoneOps, $i(n), e),
|
|
5580
|
+
calendar: n
|
|
5581
|
+
};
|
|
5582
|
+
}
|
|
5583
|
+
return parseRelativeToSlots(e);
|
|
5584
|
+
}
|
|
5585
|
+
}
|
|
5586
|
+
|
|
5587
|
+
function getCalendarSlotFromBag(e) {
|
|
5588
|
+
return extractCalendarSlotFromBag(e) || ce;
|
|
5589
|
+
}
|
|
5590
|
+
|
|
5591
|
+
function extractCalendarSlotFromBag(e) {
|
|
5592
|
+
const {calendar: t} = e;
|
|
5593
|
+
if (void 0 !== t) {
|
|
5594
|
+
return refineCalendarSlot(t);
|
|
5595
|
+
}
|
|
5596
|
+
}
|
|
5597
|
+
|
|
5598
|
+
function refineCalendarSlot(e) {
|
|
5599
|
+
return isObjectLike(e) ? (Ua(e) || {}).calendar || fs(e) : (e => resolveCalendarId(parseCalendarId(We(e))))(e);
|
|
5600
|
+
}
|
|
5601
|
+
|
|
5602
|
+
function toZonedDateTimeSlots(e, t) {
|
|
5603
|
+
if (t = copyOptions(t), isObjectLike(e)) {
|
|
5604
|
+
const n = Ua(e);
|
|
5605
|
+
if (n && n.branding === Nn) {
|
|
5606
|
+
return refineZonedFieldOptions(t), n;
|
|
5607
|
+
}
|
|
5608
|
+
const o = getCalendarSlotFromBag(e);
|
|
5609
|
+
return refineZonedDateTimeBag(refineTimeZoneSlot, createTimeZoneOps, $i(o), o, e, t);
|
|
5610
|
+
}
|
|
5611
|
+
return parseZonedDateTime(e, t);
|
|
5612
|
+
}
|
|
5613
|
+
|
|
5614
|
+
function slotsToIso(e) {
|
|
5615
|
+
return wn(e, createTimeZoneOffsetOps);
|
|
5616
|
+
}
|
|
2032
5617
|
|
|
2033
|
-
|
|
5618
|
+
function adaptDateMethods(e) {
|
|
5619
|
+
return mapProps((e => t => e(slotsToIso(t))), e);
|
|
5620
|
+
}
|
|
5621
|
+
|
|
5622
|
+
const Ga = /*@__PURE__*/ new WeakMap, Ua = /*@__PURE__*/ Ga.get.bind(Ga), za = /*@__PURE__*/ Ga.set.bind(Ga), qt = /*@__PURE__*/ createDateTimeFormatClass(), Ha = /*@__PURE__*/ new WeakMap, Ka = {
|
|
5623
|
+
PlainYearMonth: bt,
|
|
5624
|
+
PlainMonthDay: Ot,
|
|
5625
|
+
PlainDate: wt,
|
|
5626
|
+
PlainDateTime: Bt,
|
|
5627
|
+
PlainTime: kt,
|
|
5628
|
+
Instant: Yt
|
|
5629
|
+
}, Qa = /*@__PURE__*/ createFormatPrepper(bt), Xa = /*@__PURE__*/ createFormatPrepper(Ot), $a = /*@__PURE__*/ createFormatPrepper(wt), _a = /*@__PURE__*/ createFormatPrepper(Bt), ei = /*@__PURE__*/ createFormatPrepper(kt), ti = /*@__PURE__*/ createFormatPrepper(Yt), ni = /*@__PURE__*/ createFormatPrepper(Ct), oi = {
|
|
5630
|
+
era: requireStringOrUndefined,
|
|
5631
|
+
eraYear: requireIntegerOrUndefined,
|
|
5632
|
+
year: requireInteger,
|
|
5633
|
+
month: requirePositiveInteger,
|
|
5634
|
+
daysInMonth: requirePositiveInteger,
|
|
5635
|
+
daysInYear: requirePositiveInteger,
|
|
5636
|
+
inLeapYear: je,
|
|
5637
|
+
monthsInYear: requirePositiveInteger
|
|
5638
|
+
}, ri = {
|
|
5639
|
+
monthCode: We
|
|
5640
|
+
}, ai = {
|
|
5641
|
+
day: requirePositiveInteger
|
|
5642
|
+
}, ii = {
|
|
5643
|
+
dayOfWeek: requirePositiveInteger,
|
|
5644
|
+
dayOfYear: requirePositiveInteger,
|
|
5645
|
+
weekOfYear: requirePositiveIntegerOrUndefined,
|
|
5646
|
+
yearOfWeek: requireIntegerOrUndefined,
|
|
5647
|
+
daysInWeek: requirePositiveInteger
|
|
5648
|
+
}, si = /*@__PURE__*/ Object.assign({}, oi, ri, ai, ii), li = {
|
|
5649
|
+
...createCalendarFieldMethods(oi, [ Tn ]),
|
|
5650
|
+
...createCalendarFieldMethods(ii, []),
|
|
5651
|
+
...createCalendarFieldMethods(ri, [ Tn, gn ]),
|
|
5652
|
+
...createCalendarFieldMethods(ai, [ gn ])
|
|
5653
|
+
}, ci = /*@__PURE__*/ createCalendarGetters(si), ui = /*@__PURE__*/ createCalendarGetters({
|
|
5654
|
+
...oi,
|
|
5655
|
+
...ri
|
|
5656
|
+
}), di = /*@__PURE__*/ createCalendarGetters({
|
|
5657
|
+
...ri,
|
|
5658
|
+
...ai
|
|
5659
|
+
}), fi = {
|
|
5660
|
+
calendarId: e => getId(e.calendar)
|
|
5661
|
+
}, mi = /*@__PURE__*/ mapProps(((e, t) => function(n) {
|
|
5662
|
+
const {X: o} = this;
|
|
5663
|
+
return e(o[t](Vi(createPlainDateSlots(n, o))));
|
|
5664
|
+
}), si), Si = /*@__PURE__*/ mapPropNames((e => t => t[e]), pe.concat("sign")), Oi = /*@__PURE__*/ mapPropNames(((e, t) => e => e[ye[t]]), $), Ti = {
|
|
5665
|
+
epochSeconds: getEpochSeconds,
|
|
5666
|
+
epochMilliseconds: getEpochMilliseconds,
|
|
5667
|
+
epochMicroseconds: getEpochMicroseconds,
|
|
5668
|
+
epochNanoseconds: getEpochNanoseconds
|
|
5669
|
+
}, pi = /*@__PURE__*/ bindArgs(excludePropsByName, new Set([ "branding" ])), [hi, Pi, Di] = createSlotClass(gn, bindArgs(constructPlainMonthDaySlots, refineCalendarSlot), {
|
|
5670
|
+
...fi,
|
|
5671
|
+
...di
|
|
5672
|
+
}, {
|
|
5673
|
+
with(e, t, n) {
|
|
5674
|
+
return Pi(plainMonthDayWithFields(ns, e, this, rejectInvalidBag(t), n));
|
|
5675
|
+
},
|
|
5676
|
+
equals: (e, t) => plainMonthDaysEqual(e, toPlainMonthDaySlots(t)),
|
|
5677
|
+
toString: formatPlainMonthDayIso,
|
|
5678
|
+
toJSON: e => formatPlainMonthDayIso(e),
|
|
5679
|
+
toLocaleString(e, t, n) {
|
|
5680
|
+
const [o, r] = Xa(t, n, e);
|
|
5681
|
+
return o.format(r);
|
|
5682
|
+
},
|
|
5683
|
+
toPlainDate(e, t) {
|
|
5684
|
+
return Vi(plainMonthDayToPlainDate(ts, e, this, t));
|
|
5685
|
+
},
|
|
5686
|
+
getISOFields: pi,
|
|
5687
|
+
getCalendar: createCalendarFromSlots,
|
|
5688
|
+
valueOf: neverValueOf
|
|
5689
|
+
}, {
|
|
5690
|
+
from: (e, t) => Pi(toPlainMonthDaySlots(e, t))
|
|
5691
|
+
}), Ci = {
|
|
5692
|
+
getOffsetNanosecondsFor: getOffsetNanosecondsForAdapter,
|
|
5693
|
+
getPossibleInstantsFor(e, t, n) {
|
|
5694
|
+
const o = [ ...t.call(e, Ai(createPlainDateTimeSlots(n, ce))) ].map((e => Fi(e).epochNanoseconds)), r = o.length;
|
|
5695
|
+
return r > 1 && (o.sort(compareBigNanos), validateTimeZoneGap(bigNanoToNumber(diffBigNanos(o[0], o[r - 1])))), o;
|
|
5696
|
+
}
|
|
5697
|
+
}, gi = {
|
|
5698
|
+
getOffsetNanosecondsFor: getOffsetNanosecondsForAdapter
|
|
5699
|
+
}, [Zi, bi, Fi] = createSlotClass(yn, constructInstantSlots, Ti, {
|
|
5700
|
+
add: (e, t) => bi(moveInstant(0, e, toDurationSlots(t))),
|
|
5701
|
+
subtract: (e, t) => bi(moveInstant(1, e, toDurationSlots(t))),
|
|
5702
|
+
until: (e, t, n) => ls(diffInstants(0, e, toInstantSlots(t), n)),
|
|
5703
|
+
since: (e, t, n) => ls(diffInstants(1, e, toInstantSlots(t), n)),
|
|
5704
|
+
round: (e, t) => bi(roundInstant(e, t)),
|
|
5705
|
+
equals: (e, t) => instantsEqual(e, toInstantSlots(t)),
|
|
5706
|
+
toString: (e, t) => formatInstantIso(refineTimeZoneSlot, createTimeZoneOffsetOps, e, t),
|
|
5707
|
+
toJSON: e => formatInstantIso(refineTimeZoneSlot, createTimeZoneOffsetOps, e),
|
|
5708
|
+
toLocaleString(e, t, n) {
|
|
5709
|
+
const [o, r] = ti(t, n, e);
|
|
5710
|
+
return o.format(r);
|
|
5711
|
+
},
|
|
5712
|
+
toZonedDateTimeISO: (e, t) => Ss(instantToZonedDateTime(e, refineTimeZoneSlot(t))),
|
|
5713
|
+
toZonedDateTime(e, t) {
|
|
5714
|
+
const n = requireObjectLike(t);
|
|
5715
|
+
return Ss(instantToZonedDateTime(e, refineTimeZoneSlot(n.timeZone), refineCalendarSlot(n.calendar)));
|
|
5716
|
+
},
|
|
5717
|
+
valueOf: neverValueOf
|
|
5718
|
+
}, {
|
|
5719
|
+
from: e => bi(toInstantSlots(e)),
|
|
5720
|
+
fromEpochSeconds: e => bi(epochSecToInstant(e)),
|
|
5721
|
+
fromEpochMilliseconds: e => bi(epochMilliToInstant(e)),
|
|
5722
|
+
fromEpochMicroseconds: e => bi(epochMicroToInstant(e)),
|
|
5723
|
+
fromEpochNanoseconds: e => bi(epochNanoToInstant(e)),
|
|
5724
|
+
compare: (e, t) => compareInstants(toInstantSlots(e), toInstantSlots(t))
|
|
5725
|
+
}), [Ii, vi] = createSlotClass("TimeZone", (e => {
|
|
5726
|
+
const t = resolveTimeZoneId(e);
|
|
5727
|
+
return {
|
|
5728
|
+
branding: "TimeZone",
|
|
5729
|
+
id: t,
|
|
5730
|
+
K: kn(t)
|
|
5731
|
+
};
|
|
5732
|
+
}), {
|
|
5733
|
+
id: e => e.id
|
|
5734
|
+
}, {
|
|
5735
|
+
toString: e => e.id,
|
|
5736
|
+
toJSON: e => e.id,
|
|
5737
|
+
getPossibleInstantsFor: ({K: e}, t) => e.getPossibleInstantsFor(toPlainDateTimeSlots(t)).map((e => bi(createInstantSlots(e)))),
|
|
5738
|
+
getOffsetNanosecondsFor: ({K: e}, t) => e.getOffsetNanosecondsFor(toInstantSlots(t).epochNanoseconds),
|
|
5739
|
+
getOffsetStringFor(e, t) {
|
|
5740
|
+
const n = toInstantSlots(t).epochNanoseconds, o = createAdapterOps(this, gi).getOffsetNanosecondsFor(n);
|
|
5741
|
+
return formatOffsetNano(o);
|
|
5742
|
+
},
|
|
5743
|
+
getPlainDateTimeFor(e, t, n = ce) {
|
|
5744
|
+
const o = toInstantSlots(t).epochNanoseconds, r = createAdapterOps(this, gi).getOffsetNanosecondsFor(o);
|
|
5745
|
+
return Ai(createPlainDateTimeSlots(epochNanoToIso(o, r), refineCalendarSlot(n)));
|
|
5746
|
+
},
|
|
5747
|
+
getInstantFor(e, t, n) {
|
|
5748
|
+
const o = toPlainDateTimeSlots(t), r = refineEpochDisambigOptions(n), a = createAdapterOps(this);
|
|
5749
|
+
return bi(createInstantSlots(getSingleInstantFor(a, o, r)));
|
|
5750
|
+
},
|
|
5751
|
+
getNextTransition: ({K: e}, t) => getImplTransition(1, e, t),
|
|
5752
|
+
getPreviousTransition: ({K: e}, t) => getImplTransition(-1, e, t),
|
|
5753
|
+
equals(e, t) {
|
|
5754
|
+
return !!isTimeZoneSlotsEqual(this, refineTimeZoneSlot(t));
|
|
5755
|
+
}
|
|
5756
|
+
}, {
|
|
5757
|
+
from(e) {
|
|
5758
|
+
const t = refineTimeZoneSlot(e);
|
|
5759
|
+
return "string" == typeof t ? new Ii(t) : t;
|
|
5760
|
+
}
|
|
5761
|
+
}), wi = /*@__PURE__*/ createProtocolValidator(Object.keys(Ci)), [ji, Mi] = createSlotClass(Mn, constructPlainTimeSlots, Oi, {
|
|
5762
|
+
with(e, t, n) {
|
|
5763
|
+
return Mi(plainTimeWithFields(this, rejectInvalidBag(t), n));
|
|
5764
|
+
},
|
|
5765
|
+
add: (e, t) => Mi(movePlainTime(0, e, toDurationSlots(t))),
|
|
5766
|
+
subtract: (e, t) => Mi(movePlainTime(1, e, toDurationSlots(t))),
|
|
5767
|
+
until: (e, t, n) => ls(diffPlainTimes(0, e, toPlainTimeSlots(t), n)),
|
|
5768
|
+
since: (e, t, n) => ls(diffPlainTimes(1, e, toPlainTimeSlots(t), n)),
|
|
5769
|
+
round: (e, t) => Mi(roundPlainTime(e, t)),
|
|
5770
|
+
equals: (e, t) => plainTimesEqual(e, toPlainTimeSlots(t)),
|
|
5771
|
+
toString: formatPlainTimeIso,
|
|
5772
|
+
toJSON: e => formatPlainTimeIso(e),
|
|
5773
|
+
toLocaleString(e, t, n) {
|
|
5774
|
+
const [o, r] = ei(t, n, e);
|
|
5775
|
+
return o.format(r);
|
|
5776
|
+
},
|
|
5777
|
+
toZonedDateTime: (e, t) => Ss(plainTimeToZonedDateTime(refineTimeZoneSlot, toPlainDateSlots, createTimeZoneOps, e, t)),
|
|
5778
|
+
toPlainDateTime: (e, t) => Ai(plainTimeToPlainDateTime(e, toPlainDateSlots(t))),
|
|
5779
|
+
getISOFields: pi,
|
|
5780
|
+
valueOf: neverValueOf
|
|
5781
|
+
}, {
|
|
5782
|
+
from: (e, t) => Mi(toPlainTimeSlots(e, t)),
|
|
5783
|
+
compare: (e, t) => compareIsoTimeFields(toPlainTimeSlots(e), toPlainTimeSlots(t))
|
|
5784
|
+
}), [yi, Ni, Bi] = createSlotClass(Tn, bindArgs(constructPlainYearMonthSlots, refineCalendarSlot), {
|
|
5785
|
+
...fi,
|
|
5786
|
+
...ui
|
|
5787
|
+
}, {
|
|
5788
|
+
with(e, t, n) {
|
|
5789
|
+
return Ni(plainYearMonthWithFields(es, e, this, rejectInvalidBag(t), n));
|
|
5790
|
+
},
|
|
5791
|
+
add: (e, t, n) => Ni(movePlainYearMonth(as, 0, e, toDurationSlots(t), n)),
|
|
5792
|
+
subtract: (e, t, n) => Ni(movePlainYearMonth(as, 1, e, toDurationSlots(t), n)),
|
|
5793
|
+
until: (e, t, n) => ls(diffPlainYearMonth(is, 0, e, toPlainYearMonthSlots(t), n)),
|
|
5794
|
+
since: (e, t, n) => ls(diffPlainYearMonth(is, 1, e, toPlainYearMonthSlots(t), n)),
|
|
5795
|
+
equals: (e, t) => plainYearMonthsEqual(e, toPlainYearMonthSlots(t)),
|
|
5796
|
+
toString: formatPlainYearMonthIso,
|
|
5797
|
+
toJSON: e => formatPlainYearMonthIso(e),
|
|
5798
|
+
toLocaleString(e, t, n) {
|
|
5799
|
+
const [o, r] = Qa(t, n, e);
|
|
5800
|
+
return o.format(r);
|
|
5801
|
+
},
|
|
5802
|
+
toPlainDate(e, t) {
|
|
5803
|
+
return Vi(plainYearMonthToPlainDate(ts, e, this, t));
|
|
5804
|
+
},
|
|
5805
|
+
getISOFields: pi,
|
|
5806
|
+
getCalendar: createCalendarFromSlots,
|
|
5807
|
+
valueOf: neverValueOf
|
|
5808
|
+
}, {
|
|
5809
|
+
from: (e, t) => Ni(toPlainYearMonthSlots(e, t)),
|
|
5810
|
+
compare: (e, t) => compareIsoDateFields(toPlainYearMonthSlots(e), toPlainYearMonthSlots(t))
|
|
5811
|
+
}), [Yi, Ai] = createSlotClass(In, bindArgs(constructPlainDateTimeSlots, refineCalendarSlot), {
|
|
5812
|
+
...fi,
|
|
5813
|
+
...ci,
|
|
5814
|
+
...Oi
|
|
5815
|
+
}, {
|
|
5816
|
+
with(e, t, n) {
|
|
5817
|
+
return Ai(plainDateTimeWithFields(ts, e, this, rejectInvalidBag(t), n));
|
|
5818
|
+
},
|
|
5819
|
+
withPlainTime: (e, t) => Ai(plainDateTimeWithPlainTime(e, optionalToPlainTimeFields(t))),
|
|
5820
|
+
withPlainDate: (e, t) => Ai(plainDateTimeWithPlainDate(e, toPlainDateSlots(t))),
|
|
5821
|
+
withCalendar: (e, t) => Ai(slotsWithCalendar(e, refineCalendarSlot(t))),
|
|
5822
|
+
add: (e, t, n) => Ai(movePlainDateTime(os, 0, e, toDurationSlots(t), n)),
|
|
5823
|
+
subtract: (e, t, n) => Ai(movePlainDateTime(os, 1, e, toDurationSlots(t), n)),
|
|
5824
|
+
until: (e, t, n) => ls(diffPlainDateTimes(rs, 0, e, toPlainDateTimeSlots(t), n)),
|
|
5825
|
+
since: (e, t, n) => ls(diffPlainDateTimes(rs, 1, e, toPlainDateTimeSlots(t), n)),
|
|
5826
|
+
round: (e, t) => Ai(roundPlainDateTime(e, t)),
|
|
5827
|
+
equals: (e, t) => plainDateTimesEqual(e, toPlainDateTimeSlots(t)),
|
|
5828
|
+
toString: (e, t) => formatPlainDateTimeIso(e, t),
|
|
5829
|
+
toJSON: e => formatPlainDateTimeIso(e),
|
|
5830
|
+
toLocaleString(e, t, n) {
|
|
5831
|
+
const [o, r] = _a(t, n, e);
|
|
5832
|
+
return o.format(r);
|
|
5833
|
+
},
|
|
5834
|
+
toZonedDateTime: (e, t, n) => Ss(plainDateTimeToZonedDateTime(createTimeZoneOps, e, refineTimeZoneSlot(t), n)),
|
|
5835
|
+
toPlainDate: e => Vi(createPlainDateSlots(e)),
|
|
5836
|
+
toPlainYearMonth(e) {
|
|
5837
|
+
return Ni(plainDateTimeToPlainYearMonth(Xi, e, this));
|
|
5838
|
+
},
|
|
5839
|
+
toPlainMonthDay(e) {
|
|
5840
|
+
return Pi(plainDateTimeToPlainMonthDay(_i, e, this));
|
|
5841
|
+
},
|
|
5842
|
+
toPlainTime: e => Mi(createPlainTimeSlots(e)),
|
|
5843
|
+
getISOFields: pi,
|
|
5844
|
+
getCalendar: createCalendarFromSlots,
|
|
5845
|
+
valueOf: neverValueOf
|
|
5846
|
+
}, {
|
|
5847
|
+
from: (e, t) => Ai(toPlainDateTimeSlots(e, t)),
|
|
5848
|
+
compare: (e, t) => compareIsoDateTimeFields(toPlainDateTimeSlots(e), toPlainDateTimeSlots(t))
|
|
5849
|
+
}), [Ei, Vi, Ji] = createSlotClass(Dn, bindArgs(constructPlainDateSlots, refineCalendarSlot), {
|
|
5850
|
+
...fi,
|
|
5851
|
+
...ci
|
|
5852
|
+
}, {
|
|
5853
|
+
with(e, t, n) {
|
|
5854
|
+
return Vi(plainDateWithFields(ts, e, this, rejectInvalidBag(t), n));
|
|
5855
|
+
},
|
|
5856
|
+
withCalendar: (e, t) => Vi(slotsWithCalendar(e, refineCalendarSlot(t))),
|
|
5857
|
+
add: (e, t, n) => Vi(movePlainDate(os, 0, e, toDurationSlots(t), n)),
|
|
5858
|
+
subtract: (e, t, n) => Vi(movePlainDate(os, 1, e, toDurationSlots(t), n)),
|
|
5859
|
+
until: (e, t, n) => ls(diffPlainDates(rs, 0, e, toPlainDateSlots(t), n)),
|
|
5860
|
+
since: (e, t, n) => ls(diffPlainDates(rs, 1, e, toPlainDateSlots(t), n)),
|
|
5861
|
+
equals: (e, t) => plainDatesEqual(e, toPlainDateSlots(t)),
|
|
5862
|
+
toString: formatPlainDateIso,
|
|
5863
|
+
toJSON: e => formatPlainDateIso(e),
|
|
5864
|
+
toLocaleString(e, t, n) {
|
|
5865
|
+
const [o, r] = $a(t, n, e);
|
|
5866
|
+
return o.format(r);
|
|
5867
|
+
},
|
|
5868
|
+
toZonedDateTime(e, t) {
|
|
5869
|
+
const n = !isObjectLike(t) || t instanceof Ii ? {
|
|
5870
|
+
timeZone: t
|
|
5871
|
+
} : t;
|
|
5872
|
+
return Ss(plainDateToZonedDateTime(refineTimeZoneSlot, toPlainTimeSlots, createTimeZoneOps, e, n));
|
|
5873
|
+
},
|
|
5874
|
+
toPlainDateTime: (e, t) => Ai(plainDateToPlainDateTime(e, optionalToPlainTimeFields(t))),
|
|
5875
|
+
toPlainYearMonth(e) {
|
|
5876
|
+
return Ni(plainDateToPlainYearMonth(Xi, e, this));
|
|
5877
|
+
},
|
|
5878
|
+
toPlainMonthDay(e) {
|
|
5879
|
+
return Pi(plainDateToPlainMonthDay(_i, e, this));
|
|
5880
|
+
},
|
|
5881
|
+
getISOFields: pi,
|
|
5882
|
+
getCalendar: createCalendarFromSlots,
|
|
5883
|
+
valueOf: neverValueOf
|
|
5884
|
+
}, {
|
|
5885
|
+
from: (e, t) => Vi(toPlainDateSlots(e, t)),
|
|
5886
|
+
compare: (e, t) => compareIsoDateFields(toPlainDateSlots(e), toPlainDateSlots(t))
|
|
5887
|
+
}), Li = {
|
|
5888
|
+
fields(e, t, n) {
|
|
5889
|
+
return [ ...t.call(e, n) ];
|
|
5890
|
+
}
|
|
5891
|
+
}, qi = /*@__PURE__*/ Object.assign({
|
|
5892
|
+
dateFromFields(e, t, n, o) {
|
|
5893
|
+
return Ji(t.call(e, Object.assign(Object.create(null), n), o));
|
|
5894
|
+
}
|
|
5895
|
+
}, Li), ki = /*@__PURE__*/ Object.assign({
|
|
5896
|
+
yearMonthFromFields(e, t, n, o) {
|
|
5897
|
+
return Bi(t.call(e, Object.assign(Object.create(null), n), o));
|
|
5898
|
+
}
|
|
5899
|
+
}, Li), xi = /*@__PURE__*/ Object.assign({
|
|
5900
|
+
monthDayFromFields(e, t, n, o) {
|
|
5901
|
+
return Di(t.call(e, Object.assign(Object.create(null), n), o));
|
|
5902
|
+
}
|
|
5903
|
+
}, Li), Ri = {
|
|
5904
|
+
mergeFields(e, t, n, o) {
|
|
5905
|
+
return requireObjectLike(t.call(e, Object.assign(Object.create(null), n), Object.assign(Object.create(null), o)));
|
|
5906
|
+
}
|
|
5907
|
+
}, Wi = /*@__PURE__*/ Object.assign({}, qi, Ri), Gi = /*@__PURE__*/ Object.assign({}, ki, Ri), Ui = /*@__PURE__*/ Object.assign({}, xi, Ri), zi = {
|
|
5908
|
+
dateAdd(e, t, n, o, r) {
|
|
5909
|
+
return Ji(t.call(e, Vi(createPlainDateSlots(n, e)), ls(createDurationSlots(o)), r));
|
|
5910
|
+
}
|
|
5911
|
+
}, Hi = /*@__PURE__*/ Object.assign({}, zi, {
|
|
5912
|
+
dateUntil(e, t, n, o, r, a) {
|
|
5913
|
+
return cs(t.call(e, Vi(createPlainDateSlots(n, e)), Vi(createPlainDateSlots(o, e)), Object.assign(Object.create(null), a, {
|
|
5914
|
+
largestUnit: C[r]
|
|
5915
|
+
})));
|
|
5916
|
+
}
|
|
5917
|
+
}), Ki = /*@__PURE__*/ Object.assign({}, zi, {
|
|
5918
|
+
day: dayAdapter
|
|
5919
|
+
}), Qi = /*@__PURE__*/ Object.assign({}, Hi, {
|
|
5920
|
+
day: dayAdapter
|
|
5921
|
+
}), Xi = /*@__PURE__*/ createCompoundOpsCreator(ki), $i = /*@__PURE__*/ createCompoundOpsCreator(qi), _i = /*@__PURE__*/ createCompoundOpsCreator(xi), es = /*@__PURE__*/ createCompoundOpsCreator(Gi), ts = /*@__PURE__*/ createCompoundOpsCreator(Wi), ns = /*@__PURE__*/ createCompoundOpsCreator(Ui), os = /*@__PURE__*/ createCompoundOpsCreator(zi), rs = /*@__PURE__*/ createCompoundOpsCreator(Hi), as = /*@__PURE__*/ createCompoundOpsCreator(Ki), is = /*@__PURE__*/ createCompoundOpsCreator(Qi), [ss, ls, cs] = createSlotClass(vn, constructDurationSlots, {
|
|
5922
|
+
...Si,
|
|
5923
|
+
blank: getDurationBlank
|
|
5924
|
+
}, {
|
|
5925
|
+
with: (e, t) => ls(durationWithFields(e, t)),
|
|
5926
|
+
add: (e, t, n) => ls(addDurations(refinePublicRelativeTo, rs, createTimeZoneOps, 0, e, toDurationSlots(t), n)),
|
|
5927
|
+
subtract: (e, t, n) => ls(addDurations(refinePublicRelativeTo, rs, createTimeZoneOps, 1, e, toDurationSlots(t), n)),
|
|
5928
|
+
negated: e => ls(negateDuration(e)),
|
|
5929
|
+
abs: e => ls(absDuration(e)),
|
|
5930
|
+
round: (e, t) => ls(roundDuration(refinePublicRelativeTo, rs, createTimeZoneOps, e, t)),
|
|
5931
|
+
total: (e, t) => totalDuration(refinePublicRelativeTo, rs, createTimeZoneOps, e, t),
|
|
5932
|
+
toString: formatDurationIso,
|
|
5933
|
+
toLocaleString(e, t, n) {
|
|
5934
|
+
return Intl.DurationFormat ? new Intl.DurationFormat(t, n).format(this) : formatDurationIso(e);
|
|
5935
|
+
},
|
|
5936
|
+
toJSON: e => formatDurationIso(e),
|
|
5937
|
+
valueOf: neverValueOf
|
|
5938
|
+
}, {
|
|
5939
|
+
from: e => ls(toDurationSlots(e)),
|
|
5940
|
+
compare: (e, t, n) => compareDurations(refinePublicRelativeTo, os, createTimeZoneOps, toDurationSlots(e), toDurationSlots(t), n)
|
|
5941
|
+
}), us = {
|
|
5942
|
+
toString: e => e.id,
|
|
5943
|
+
toJSON: e => e.id,
|
|
5944
|
+
...li,
|
|
5945
|
+
dateAdd: ({id: e, K: t}, n, o, r) => Vi(createPlainDateSlots(t.dateAdd(toPlainDateSlots(n), toDurationSlots(o), r), e)),
|
|
5946
|
+
dateUntil: ({K: e}, t, n, o) => ls(createDurationSlots(e.dateUntil(toPlainDateSlots(t), toPlainDateSlots(n), refineCalendarDiffOptions(o)))),
|
|
5947
|
+
dateFromFields: ({id: e, K: t}, n, o) => Vi(refinePlainDateBag(t, n, o, getRequiredDateFields(e))),
|
|
5948
|
+
yearMonthFromFields: ({id: e, K: t}, n, o) => Ni(refinePlainYearMonthBag(t, n, o, getRequiredYearMonthFields(e))),
|
|
5949
|
+
monthDayFromFields: ({id: e, K: t}, n, o) => Pi(refinePlainMonthDayBag(t, 0, n, o, getRequiredMonthDayFields(e))),
|
|
5950
|
+
fields({K: e}, t) {
|
|
5951
|
+
const n = new Set(re), o = [];
|
|
5952
|
+
for (const e of t) {
|
|
5953
|
+
if (We(e), !n.has(e)) {
|
|
5954
|
+
throw new RangeError(forbiddenField(e));
|
|
5955
|
+
}
|
|
5956
|
+
n.delete(e), o.push(e);
|
|
5957
|
+
}
|
|
5958
|
+
return e.fields(o);
|
|
5959
|
+
},
|
|
5960
|
+
mergeFields: ({K: e}, t, n) => e.mergeFields(excludeUndefinedProps(requireNonNullish(t)), excludeUndefinedProps(requireNonNullish(n)))
|
|
5961
|
+
}, [ds] = createSlotClass("Calendar", (e => {
|
|
5962
|
+
const t = resolveCalendarId(We(e));
|
|
5963
|
+
return {
|
|
5964
|
+
branding: "Calendar",
|
|
5965
|
+
id: t,
|
|
5966
|
+
K: st(t)
|
|
5967
|
+
};
|
|
5968
|
+
}), {
|
|
5969
|
+
id: e => e.id
|
|
5970
|
+
}, us, {
|
|
5971
|
+
from(e) {
|
|
5972
|
+
const t = refineCalendarSlot(e);
|
|
5973
|
+
return "string" == typeof t ? new ds(t) : t;
|
|
5974
|
+
}
|
|
5975
|
+
}), fs = /*@__PURE__*/ createProtocolValidator(Object.keys(us).slice(4)), [ms, Ss] = createSlotClass(Nn, bindArgs(constructZonedDateTimeSlots, refineCalendarSlot, refineTimeZoneSlot), {
|
|
5976
|
+
...Ti,
|
|
5977
|
+
...fi,
|
|
5978
|
+
...adaptDateMethods(ci),
|
|
5979
|
+
...adaptDateMethods(Oi),
|
|
5980
|
+
hoursInDay: e => computeHoursInDay(createTimeZoneOps, e),
|
|
5981
|
+
offsetNanoseconds: e => slotsToIso(e).offsetNanoseconds,
|
|
5982
|
+
offset: e => formatOffsetNano(slotsToIso(e).offsetNanoseconds),
|
|
5983
|
+
timeZoneId: e => getId(e.timeZone)
|
|
5984
|
+
}, {
|
|
5985
|
+
with(e, t, n) {
|
|
5986
|
+
return Ss(zonedDateTimeWithFields(ts, createTimeZoneOps, e, this, rejectInvalidBag(t), n));
|
|
5987
|
+
},
|
|
5988
|
+
withPlainTime: (e, t) => Ss(zonedDateTimeWithPlainTime(createTimeZoneOps, e, optionalToPlainTimeFields(t))),
|
|
5989
|
+
withPlainDate: (e, t) => Ss(zonedDateTimeWithPlainDate(createTimeZoneOps, e, toPlainDateSlots(t))),
|
|
5990
|
+
withTimeZone: (e, t) => Ss(slotsWithTimeZone(e, refineTimeZoneSlot(t))),
|
|
5991
|
+
withCalendar: (e, t) => Ss(slotsWithCalendar(e, refineCalendarSlot(t))),
|
|
5992
|
+
add: (e, t, n) => Ss(moveZonedDateTime(os, createTimeZoneOps, 0, e, toDurationSlots(t), n)),
|
|
5993
|
+
subtract: (e, t, n) => Ss(moveZonedDateTime(os, createTimeZoneOps, 1, e, toDurationSlots(t), n)),
|
|
5994
|
+
until: (e, t, n) => ls(createDurationSlots(diffZonedDateTimes(rs, createTimeZoneOps, 0, e, toZonedDateTimeSlots(t), n))),
|
|
5995
|
+
since: (e, t, n) => ls(createDurationSlots(diffZonedDateTimes(rs, createTimeZoneOps, 1, e, toZonedDateTimeSlots(t), n))),
|
|
5996
|
+
round: (e, t) => Ss(roundZonedDateTime(createTimeZoneOps, e, t)),
|
|
5997
|
+
startOfDay: e => Ss(computeStartOfDay(createTimeZoneOps, e)),
|
|
5998
|
+
equals: (e, t) => zonedDateTimesEqual(e, toZonedDateTimeSlots(t)),
|
|
5999
|
+
toString: (e, t) => formatZonedDateTimeIso(createTimeZoneOffsetOps, e, t),
|
|
6000
|
+
toJSON: e => formatZonedDateTimeIso(createTimeZoneOffsetOps, e),
|
|
6001
|
+
toLocaleString(e, t, n = {}) {
|
|
6002
|
+
const [o, r] = ni(t, n, e);
|
|
6003
|
+
return o.format(r);
|
|
6004
|
+
},
|
|
6005
|
+
toInstant: e => bi(zonedDateTimeToInstant(e)),
|
|
6006
|
+
toPlainDate: e => Vi(zonedDateTimeToPlainDate(createTimeZoneOffsetOps, e)),
|
|
6007
|
+
toPlainTime: e => Mi(zonedDateTimeToPlainTime(createTimeZoneOffsetOps, e)),
|
|
6008
|
+
toPlainDateTime: e => Ai(zonedDateTimeToPlainDateTime(createTimeZoneOffsetOps, e)),
|
|
6009
|
+
toPlainYearMonth(e) {
|
|
6010
|
+
return Ni(zonedDateTimeToPlainYearMonth(Xi, e, this));
|
|
6011
|
+
},
|
|
6012
|
+
toPlainMonthDay(e) {
|
|
6013
|
+
return Pi(zonedDateTimeToPlainMonthDay(_i, e, this));
|
|
6014
|
+
},
|
|
6015
|
+
getISOFields: e => buildZonedIsoFields(createTimeZoneOffsetOps, e),
|
|
6016
|
+
getCalendar: createCalendarFromSlots,
|
|
6017
|
+
getTimeZone: ({timeZone: e}) => "string" == typeof e ? new Ii(e) : e,
|
|
6018
|
+
valueOf: neverValueOf
|
|
6019
|
+
}, {
|
|
6020
|
+
from: (e, t) => Ss(toZonedDateTimeSlots(e, t)),
|
|
6021
|
+
compare: (e, t) => compareZonedDateTimes(toZonedDateTimeSlots(e), toZonedDateTimeSlots(t))
|
|
6022
|
+
}), Os = /*@__PURE__*/ Object.defineProperties({}, {
|
|
6023
|
+
...createStringTagDescriptors("Temporal.Now"),
|
|
6024
|
+
...createPropDescriptors({
|
|
6025
|
+
timeZoneId: () => getCurrentTimeZoneId(),
|
|
6026
|
+
instant: () => bi(createInstantSlots(getCurrentEpochNano())),
|
|
6027
|
+
zonedDateTime: (e, t = getCurrentTimeZoneId()) => Ss(createZonedDateTimeSlots(getCurrentEpochNano(), refineTimeZoneSlot(t), refineCalendarSlot(e))),
|
|
6028
|
+
zonedDateTimeISO: (e = getCurrentTimeZoneId()) => Ss(createZonedDateTimeSlots(getCurrentEpochNano(), refineTimeZoneSlot(e), ce)),
|
|
6029
|
+
plainDateTime: (e, t = getCurrentTimeZoneId()) => Ai(createPlainDateTimeSlots(getCurrentIsoDateTime(createTimeZoneOffsetOps(refineTimeZoneSlot(t))), refineCalendarSlot(e))),
|
|
6030
|
+
plainDateTimeISO: (e = getCurrentTimeZoneId()) => Ai(createPlainDateTimeSlots(getCurrentIsoDateTime(createTimeZoneOffsetOps(refineTimeZoneSlot(e))), ce)),
|
|
6031
|
+
plainDate: (e, t = getCurrentTimeZoneId()) => Vi(createPlainDateSlots(getCurrentIsoDateTime(createTimeZoneOffsetOps(refineTimeZoneSlot(t))), refineCalendarSlot(e))),
|
|
6032
|
+
plainDateISO: (e = getCurrentTimeZoneId()) => Vi(createPlainDateSlots(getCurrentIsoDateTime(createTimeZoneOffsetOps(refineTimeZoneSlot(e))), ce)),
|
|
6033
|
+
plainTimeISO: (e = getCurrentTimeZoneId()) => Mi(createPlainTimeSlots(getCurrentIsoDateTime(createTimeZoneOffsetOps(refineTimeZoneSlot(e)))))
|
|
6034
|
+
})
|
|
6035
|
+
}), jt = /*@__PURE__*/ Object.defineProperties({}, {
|
|
6036
|
+
...createStringTagDescriptors("Temporal"),
|
|
6037
|
+
...createPropDescriptors({
|
|
6038
|
+
PlainYearMonth: yi,
|
|
6039
|
+
PlainMonthDay: hi,
|
|
6040
|
+
PlainDate: Ei,
|
|
6041
|
+
PlainTime: ji,
|
|
6042
|
+
PlainDateTime: Yi,
|
|
6043
|
+
ZonedDateTime: ms,
|
|
6044
|
+
Instant: Zi,
|
|
6045
|
+
Calendar: ds,
|
|
6046
|
+
TimeZone: Ii,
|
|
6047
|
+
Duration: ss,
|
|
6048
|
+
Now: Os
|
|
6049
|
+
})
|
|
6050
|
+
});
|
|
2034
6051
|
|
|
2035
6052
|
/**
|
|
2036
6053
|
* java.lang.Math.toRadians
|
|
@@ -2763,7 +6780,7 @@ class NOAACalculator {
|
|
|
2763
6780
|
return cal
|
|
2764
6781
|
.toZonedDateTime({
|
|
2765
6782
|
timeZone: 'UTC',
|
|
2766
|
-
plainTime: new
|
|
6783
|
+
plainTime: new jt.PlainTime(hours, minutes, seconds, Math.trunc(calculatedTime * 1000)),
|
|
2767
6784
|
})
|
|
2768
6785
|
.withTimeZone(this.geoLocation.getTimeZone());
|
|
2769
6786
|
}
|
|
@@ -3492,9 +7509,13 @@ function pad4(number) {
|
|
|
3492
7509
|
return String(number);
|
|
3493
7510
|
}
|
|
3494
7511
|
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
7512
|
+
Object.defineProperties(globalThis, createPropDescriptors({
|
|
7513
|
+
Temporal: jt
|
|
7514
|
+
})), Object.defineProperties(Intl, createPropDescriptors({
|
|
7515
|
+
DateTimeFormat: qt
|
|
7516
|
+
})), Object.defineProperties(Date.prototype, createPropDescriptors({
|
|
7517
|
+
toTemporalInstant: xt
|
|
7518
|
+
}));
|
|
3498
7519
|
|
|
3499
7520
|
/**
|
|
3500
7521
|
* @private
|
|
@@ -5796,6 +9817,14 @@ const staticModernHolidays = [{
|
|
|
5796
9817
|
mm: Cheshvan,
|
|
5797
9818
|
dd: 7,
|
|
5798
9819
|
desc: 'Yom HaAliyah School Observance'
|
|
9820
|
+
},
|
|
9821
|
+
// https://www.gov.il/he/departments/policies/2012_des5234
|
|
9822
|
+
{
|
|
9823
|
+
firstYear: 5773,
|
|
9824
|
+
mm: months.TEVET,
|
|
9825
|
+
dd: 21,
|
|
9826
|
+
desc: 'Hebrew Language Day',
|
|
9827
|
+
friSatMovetoThu: true
|
|
5799
9828
|
}];
|
|
5800
9829
|
|
|
5801
9830
|
/*
|
|
@@ -6334,7 +10363,7 @@ class DailyLearning {
|
|
|
6334
10363
|
}
|
|
6335
10364
|
|
|
6336
10365
|
// DO NOT EDIT THIS AUTO-GENERATED FILE!
|
|
6337
|
-
const version = '5.
|
|
10366
|
+
const version = '5.3.0';
|
|
6338
10367
|
|
|
6339
10368
|
const NONE$1 = 0;
|
|
6340
10369
|
const HALF = 1;
|
|
@@ -6698,6 +10727,7 @@ var poHe = {
|
|
|
6698
10727
|
"Jabotinsky Day": ["יוֹם ז׳בוטינסקי"],
|
|
6699
10728
|
"Herzl Day": ["יוֹם הרצל"],
|
|
6700
10729
|
"Ben-Gurion Day": ["יוֹם בן־גוריון"],
|
|
10730
|
+
"Hebrew Language Day": ["יוֹם הַשָׂפָה הַעִברִית"],
|
|
6701
10731
|
"Birkat Hachamah": ["בִרְכַּת הַחַמָּה"],
|
|
6702
10732
|
"Shushan Purim Katan": ["שׁוּשָׁן פּוּרִים קָטָן"],
|
|
6703
10733
|
"Purim Meshulash": ["פּוּרִים מְשׁוּלָּשׁ"],
|