@johnhenry/temporals-viaframe 0.0.0-stage → 0.1.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.
@@ -0,0 +1,1393 @@
1
+ {
2
+ "$schema": "https://viaframe.johnhenry.me/schemas/viaframe-package.v1.schema.json",
3
+ "format": "viaframe-package",
4
+ "version": 1,
5
+ "name": "@johnhenry/temporals-viaframe",
6
+ "packageVersion": "0.1.0",
7
+ "description": "Calendar and duration panes for viaframe, from @johnhenry/temporals: working hours (open now? next opening), business time between two moments, adding business days over holidays, durations in words, relative time and RRULE occurrences. Offline: no network, no server.",
8
+ "license": "MIT",
9
+ "panes": [
10
+ {
11
+ "id": "working-hours",
12
+ "title": "Working hours",
13
+ "description": "Is a schedule open at a moment, and if not, when does it open next? Working windows in a time zone, a weekend and holidays (the US federal list, Easter-based days, fixed dates) give `open`, `closesAt`, `nextOpen` and the wait in milliseconds and in words.",
14
+ "icon": "<svg viewBox=\"0 0 16 16\"><circle cx=\"8\" cy=\"8\" r=\"5.5\" stroke=\"currentColor\" fill=\"none\" stroke-width=\"1.2\"/><path d=\"M8 5v3.2l2.2 1.3\" stroke=\"currentColor\" fill=\"none\" stroke-width=\"1.2\"/></svg>",
15
+ "canvas": {
16
+ "format": "viaframe-canvas",
17
+ "version": 3,
18
+ "name": "working-hours",
19
+ "panes": [
20
+ {
21
+ "id": "i_at",
22
+ "type": "input",
23
+ "name": "at",
24
+ "rect": {
25
+ "x": 0,
26
+ "y": 0,
27
+ "width": 260
28
+ },
29
+ "inputs": [],
30
+ "widget": {
31
+ "kind": "text",
32
+ "value": "2026-11-26T15:00:00Z"
33
+ },
34
+ "control": {
35
+ "group": "When",
36
+ "help": "An ISO time with an offset or Z, one with a [zone], a wall-clock time read in `zone` (2026-11-26T10:00), or \"now\"."
37
+ }
38
+ },
39
+ {
40
+ "id": "i_zone",
41
+ "type": "input",
42
+ "name": "zone",
43
+ "rect": {
44
+ "x": 0,
45
+ "y": 150,
46
+ "width": 260
47
+ },
48
+ "inputs": [],
49
+ "widget": {
50
+ "kind": "text",
51
+ "value": "America/New_York"
52
+ },
53
+ "control": {
54
+ "group": "Schedule",
55
+ "help": "The IANA time zone the working hours are read in."
56
+ }
57
+ },
58
+ {
59
+ "id": "i_windows",
60
+ "type": "input",
61
+ "name": "windows",
62
+ "rect": {
63
+ "x": 0,
64
+ "y": 300,
65
+ "width": 260
66
+ },
67
+ "inputs": [],
68
+ "widget": {
69
+ "kind": "json",
70
+ "value": "[[\"09:00\",\"17:00\"]]"
71
+ },
72
+ "valueType": "array",
73
+ "control": {
74
+ "group": "Schedule",
75
+ "help": "Working windows as [open, close] wall-clock times, read in `zone`. A window that ends before it starts crosses midnight ([\"22:00\", \"06:00\"])."
76
+ }
77
+ },
78
+ {
79
+ "id": "i_weekend",
80
+ "type": "input",
81
+ "name": "weekend",
82
+ "rect": {
83
+ "x": 0,
84
+ "y": 450,
85
+ "width": 260
86
+ },
87
+ "inputs": [],
88
+ "widget": {
89
+ "kind": "json",
90
+ "value": "[\"SA\",\"SU\"]"
91
+ },
92
+ "valueType": "array",
93
+ "control": {
94
+ "group": "Schedule",
95
+ "help": "The days that are never working days: MO TU WE TH FR SA SU (or 1-7, 1 is Monday).",
96
+ "advanced": true
97
+ }
98
+ },
99
+ {
100
+ "id": "i_holidays",
101
+ "type": "input",
102
+ "name": "holidays",
103
+ "rect": {
104
+ "x": 0,
105
+ "y": 600,
106
+ "width": 260
107
+ },
108
+ "inputs": [],
109
+ "widget": {
110
+ "kind": "json",
111
+ "value": "[\"us-federal\"]"
112
+ },
113
+ "valueType": "array",
114
+ "control": {
115
+ "group": "Schedule",
116
+ "help": "Days off: us-federal (the 11 US federal holidays, weekend-observed), easter, good-friday, easter-monday, a date (2026-12-24), a month and day every year (12-25), or { month, day, observed }, { month, weekday, nth } ({ month: 11, weekday: \"TH\", nth: 4 }), { easter: offset }."
117
+ }
118
+ },
119
+ {
120
+ "id": "result",
121
+ "type": "eval",
122
+ "name": "result",
123
+ "rect": {
124
+ "x": 340,
125
+ "y": 0,
126
+ "width": 380
127
+ },
128
+ "inputs": [
129
+ {
130
+ "name": "at",
131
+ "source": "i_at"
132
+ },
133
+ {
134
+ "name": "zone",
135
+ "source": "i_zone"
136
+ },
137
+ {
138
+ "name": "windows",
139
+ "source": "i_windows"
140
+ },
141
+ {
142
+ "name": "weekend",
143
+ "source": "i_weekend"
144
+ },
145
+ {
146
+ "name": "holidays",
147
+ "source": "i_holidays"
148
+ }
149
+ ],
150
+ "autorun": true,
151
+ "mode": "function",
152
+ "outputs": [
153
+ {
154
+ "name": "open"
155
+ },
156
+ {
157
+ "name": "closesAt"
158
+ },
159
+ {
160
+ "name": "nextOpen"
161
+ },
162
+ {
163
+ "name": "wait"
164
+ },
165
+ {
166
+ "name": "waitWords"
167
+ },
168
+ {
169
+ "name": "summary"
170
+ }
171
+ ],
172
+ "code": "const T = temporalsLibrary();\nconst hours = T.workingHours({ windows, weekend, holidays });\nconst now = String(at).trim().toLowerCase() === \"now\" ? T.Temporal().Now.zonedDateTimeISO(zone || \"UTC\") : T.zoned(at, zone);\nconst open = hours.isOpen(now);\n// While open, the stretch it is in ends at closesAt; while closed, nextOpen is the next opening (within a year).\nconst stretch = open ? hours.intervalsBetween(now, now.add({ days: 2 })).intervals[0] : undefined;\nconst next = open ? now : hours.nextOpen(now);\nconst wait = next ? next.epochMilliseconds - now.epochMilliseconds : null;\nconst waitWords = wait === null ? null : T.words(wait, { max: 2 });\nconst day = (z) => z.toPlainDate().toLocaleString(\"en-US\", { weekday: \"short\" }) + \" \" + z.toPlainDate().toString() + \" \" + z.toPlainTime().toString({ smallestUnit: \"minute\" });\nreturn {\n open,\n closesAt: stretch ? T.iso(stretch.end) : null,\n nextOpen: next ? T.iso(next) : null,\n wait,\n waitWords,\n summary: open\n ? \"open until \" + day(stretch.end) + \" (\" + T.words(stretch.end.epochMilliseconds - now.epochMilliseconds, { max: 2 }) + \" left)\"\n : next ? \"closed; opens \" + day(next) + \" (in \" + waitWords + \")\" : \"closed, and not open within a year\",\n};\n\n// @johnhenry/temporals 0.3.0 and temporal-polyfill 1.0.1 (both MIT), bundled from viaframe/src/lib.ts by viaframe/scripts/build.mjs\n// in github.com/johnhenry/temporals. A pane package can't import a module or share code between\n// its panes, so each pane carries this copy; it uses the runtime's own Temporal when there is one.\nfunction temporalsLibrary() {\n\"use strict\";var temporals=(()=>{var zo=Object.defineProperty;var sd=Object.getOwnPropertyDescriptor;var cd=Object.getOwnPropertyNames;var ud=Object.prototype.hasOwnProperty;var dd=(e,n)=>{for(var t in n)zo(e,t,{get:n[t],enumerable:!0})},ld=(e,n,t,o)=>{if(n&&typeof n==\"object\"||typeof n==\"function\")for(let r of cd(n))!ud.call(e,r)&&r!==t&&zo(e,r,{get:()=>n[r],enumerable:!(o=sd(n,r))||o.enumerable});return e};var md=e=>ld(zo({},\"__esModule\",{value:!0}),e);var km={};dd(km,{BusinessCalendar:()=>Vt,Temporal:()=>Om,WorkingHours:()=>_t,businessCalendar:()=>id,businessDuration:()=>_u,duration:()=>la,durationMs:()=>Sm,formatRelative:()=>Ju,holidayRules:()=>rd,humanizeDuration:()=>ia,iso:()=>Nm,parseDuration:()=>aa,plainDate:()=>Mm,recurFromString:()=>ua,temporalSource:()=>vm,weekdayCode:()=>da,words:()=>Pm,workingHours:()=>wm,zoned:()=>ad});var Vo=globalThis.Temporal;var ma=(e,n)=>`Non-positive ${e}: ${n}`,fa=(e,n)=>`Non-finite ${e}: ${n}`,ha=e=>`Cannot convert bigint to ${e}`,pa=\"Invalid object\",ot=(e,n,t,o)=>un(e,n)+`; must be between ${t}-${o}`,un=(e,n)=>`Invalid ${e}: ${n}`;var _o=1e3,Jo=1e6,Ko=1e9,Qo=6e10,Xo=36e11;function ie(e){return e===void 0?Object.create(null):dn(e)}function Qt(e,n=\"number\"){if(typeof e==\"bigint\")throw new TypeError(ha(n));if(e=Number(e),!Number.isFinite(e))throw new RangeError(fa(n,e));return e}function U(e,n){return Math.trunc(Qt(e,n))||0}function Xt(e,n){return ya(U(e,n),n)}function ya(e,n=\"number\"){if(e<=0)throw new RangeError(ma(n,e));return e}function er(e,n,t){return Math.min(Math.max(e,n),t)}function Nn(e){return e!==null&&(typeof e==\"object\"||typeof e==\"function\")}function dn(e){if(!Nn(e))throw new TypeError(pa);return e}var so=un;var dt=e=>`Missing ${e}`,Pa=e=>\"No valid fields: \"+e.join(),Na=\"Invalid bag\",Oa=(e,n,t)=>un(e,n)+\"; must be \"+Object.keys(t).join(),ka=\"Cannot use valueOf\",Ea=\"Invalid calling context\",co=e=>\"Missing year\"+(e?\"/era/eraYear\":\"\"),mn=\"Invalid leap month\",xa=e=>un(\"Calendar\",e),Za=(e,n)=>`Unknown calendar ${e}; might need ${n}`,pr=e=>un(\"TimeZone\",e),$e=\"Out-of-bounds date\";var Fa=e=>`Cannot parse: ${e}`,Ze=e=>`Invalid substring: ${e}`;var yr=er,ee=Nn;function T(e){throw new RangeError(e)}function S(e){throw new TypeError(e)}function rr(e,n,t,o,r){return we(n,((i,a)=>{let s=i[a];return s===void 0&&S(dt(a)),s})(e,n),t,o,r)}function we(e,n,t,o,r,i){let a=yr(n,t,o);return r&&n!==a&&T(((s,c,u,d,l)=>l?ot(s,l[c],l[u],l[d]):ot(s,c,u,d))(e,n,t,o,i)),a}function En(e,n=Map){let t=new n;return(o,...r)=>{if(t.has(o))return t.get(o);let i=e(o,...r);return t.set(o,i),i}}var Ra=e=>uo({name:e},1),uo=(e,n)=>Ve(t=>({value:t,configurable:1,writable:!n}),e),lt=e=>({[Symbol.toStringTag]:{value:e,configurable:1}});function Ve(e,n){let t={};for(let o in n)t[o]=e(n[o],o);return t}function mt(e,n){let t={};for(let o of e)t[o]=n;return t}function lo(e){let n={};for(let t of e)n[t]=o=>o[t];return n}function Me(e,n,t=Object.create(null)){for(let o of e)t[o]=n[o];return t}function Ca(e,n,t){for(let o of e)if(n[o]!==t[o])return 0;return 1}function Td(e,n,t){let o={...t};for(let r=0;r<n;r++)o[e[r]]=0;return o}function C(e,...n){return(...t)=>e(...n,...t)}function Tr(){}function Ta(e){return e[0].toUpperCase()+e.substring(1)}function A(...e){return[].concat(...e).sort()}function Rn(e){return new RegExp(`^${e}$`,\"i\")}function gr(e){return parseInt(e.padEnd(9,\"0\"))}function Dr(e){return e&&e!==\"+\"?-1:1}function On(e){return e===void 0?0:parseInt(e)}function oo(e,n){return String(n).padStart(e,\"0\")}var pe=C(oo,2);function Fe(e,n){return Math.sign(e-n)}function x(e,n){return e<n?-1:e>n?1:0}function Ya(e,n){let t=e/n;return e%n<0n?t-1n:t}function br(e,n){let t=Ya(e,n);return[t,e-t*n]}function ve(e,n){return[Math.floor(e/n),mo(e,n)]}function mo(e,n){return(e%n+n)%n}function Cn(e,n){return Math.trunc(e/n)||0}function vr(e,n){return e%n||0}function Ba(e,n=1){return n*(.5+e/5)}function eo(e){return Math.abs(e%1)===.5}var Ir=\"iso8601\",Wa=\"gregory\",gd={bce:-1,ce:0};function Aa(e){let n=e.normalize(\"NFD\").toLowerCase().replace(/[^a-z0-9]/g,\"\");return n===\"bc\"||n===\"b\"?\"bce\":n===\"ad\"||n===\"a\"?\"ce\":n}var se=void 0,Ua=0;function ye(e){return e===se?\"iso8601\":e===0?\"gregory\":e.id}var Dd=/^M(\\d{2})(L?)$/;function La(e){let n=Dd.exec(e);return n||T((t=>`Invalid monthCode: ${t}`)(e)),[parseInt(n[1]),!!n[2]]}function qa(e,n){return\"M\"+pe(e)+(n?\"L\":\"\")}function ir(e,n,t){return e+(n||t&&e>=t?1:0)}var ar={nanosecond:0,microsecond:1,millisecond:2,second:3,minute:4,hour:5,day:6,week:7,month:8,year:9},wr=Object.keys(ar);var ft=_o,ht=Jo,_e=Ko,pt=Qo,yt=Xo,Ye=864e11,Te=[1,ft,ht,_e,pt,yt,Ye],bd=BigInt(ft),Yn=BigInt(ht),hn=BigInt(_e),vd=BigInt(pt),Id=BigInt(yt),O=BigInt(Ye);function ja(e,n){let t=Number(e/O),o=Number(e%O);return t*(Ye/n)+(Math.trunc(o/n)+o%n/n)}var _=wr.slice(0,6),Tt=lo(_),fo=[\"year\"],Tn=[\"day\"],Mr=[\"day\",\"month\",\"year\"],ho=[\"offset\"],Sr=[\"timeZone\"],Bn=[\"era\",\"eraYear\"],wd=[\"era\",\"eraYear\",\"year\"],$a=[\"month\",\"monthCode\"],Md=[\"day\",\"month\",\"monthCode\"],sr=A(_),Sd=A(Bn,fo),gt=A($a,fo),Ha=A(Bn,gt),Dt=A([\"monthCode\"],fo),Ga=A(Bn,Dt),za=A(Tn,[\"monthCode\"]),gn=A(Tn,gt),Dn=A(Tn,Bn,gt),Va=A(gn,_),_a=A(Dn,_),Pd=A(gn,_,ho),Nd=A(Dn,_,ho),Ja=A(gn,_,ho,Sr),Ka=A(Dn,_,ho,Sr),Od=A(Tn,Dt),kd=A(Tn,Bn,Dt),ce=mt(_,0);function bt(e){return po(e,1),e}var Ed={hour:23,minute:59,second:59};function po(e,n){let t={};for(let o of _)t[o]=we(o,e[o],0,Ed[o]||999,n);return t}function oe(e){return Nr(e)*_e+Qa(e)}function Pr(e){return 1e3*Nr(e)+e.millisecond}function Nr(e){return 3600*e.hour+60*e.minute+e.second}function Qa(e){return e.millisecond*ht+e.microsecond*ft+e.nanosecond}function Or(e){let[n,t]=ve(e,Ye);return[Xa(t),n]}function Xa(e){let[n,t]=ve(e,ht),[o,r]=ve(t,ft);return xd(n,o,r)}function xd(e,n=0,t=0){let[o,r]=ve(e,36e5),[i,a]=ve(r,6e4),[s,c]=ve(a,1e3);return{hour:o,minute:i,second:s,millisecond:c,microsecond:n,nanosecond:t}}function ga(e){let[n,t]=br(e,hn);return[Number(n),Number(t)]}function Ie(e){return fn(e)+BigInt(oe(e))}function es(e){return vt(e)+Pr(e)}function fn(e){return BigInt(Se(e))*O}function vt(e){return 864e5*Se(e)}function Se(e){return rt(e.year,e.month,e.day)}function rt(e,n=1,t=1){let o=n-1;return e+=Math.floor(o/12),n=mo(o,12),Date.UTC(e%400-400,n,0)/864e5+146097*(Cn(e,400)+1)+t}function It(e){let[n,t]=br(e,O);return{...ns(Number(n)),...Xa(Number(t))}}function ns(e){let n=new Date(864e5*mo(e,146097));return{year:n.getUTCFullYear()+400*Math.floor(e/146097),month:n.getUTCMonth()+1,day:n.getUTCDate()}}var ts=1972;function Zd(e){return[e,0]}function cr(e,n){if(!n)return{year:1972,month:e}}function Fd(e,n,t){return{year:e,month:n,day:t}}function os(e,n){switch(n){case 2:return yo(e)?29:28;case 4:case 6:case 9:case 11:return 30}return 31}function Rd(e){return yo(e)?366:365}function yo(e){return e%4==0&&(e%100!=0||e%400==0)}function rs(e,n,t){return e+=Cn(t,12),(n+=vr(t,12))<1?(e--,n+=12):n>12&&(e++,n-=12),{year:e,month:n}}function Cd(e,n,t,o){return 12*(t-e)+o-n}function To(e){return mo(rt(e.year,e.month,e.day)+4,7)||7}function is(e){return rt(e.year,e.month,e.day)-rt(e.year)+1}function as(e){let n=e.year,t=Math.floor((is(e)-To(e)+10)/7),o=nr(n);return t<1?t=o=nr(--n):t>o&&(t=1,o=nr(++n)),{weekOfYear:t,yearOfWeek:n,Ie:o}}function nr(e){let n=To({year:e,month:1,day:1});return n===4||n===3&&yo(e)?53:52}function Yd({year:e}){return e<1?{era:\"bce\",eraYear:1-e}:{era:\"ce\",eraYear:e}}function wt(e){return Be(e),bt(e)}function Be(e){return ss(e,1),e}function Da(e){return Ca(Mr,e,ss(e))}function ss(e,n){let{year:t}=e,o=rr(e,\"month\",1,12,n);return{year:t,month:o,day:rr(e,\"day\",1,os(t,o),n)}}function P(e,n){return e?e.ie(n):n}function pn(e,n,t){return e?e.O(n,t):Zd(t)}function Mt(e,n){return e===0?Yd(n):e?e.h(n):{}}function yn(e,n,t,o){return e?e.je(n,t,o):Fd(n,t,o)}function it(e,n){return e?e.k(n):12}function at(e,n,t){return e?e.p(n,t):os(n,t)}function go(e,n){let{year:t,month:o}=P(e,n),[r,i]=pn(e,t,o);return qa(r,i)}function kr(e,n){let{year:t}=P(e,n);return e?e.u(t):yo(t)}function Er(e,n){let{year:t}=P(e,n);return it(e,t)}function xr(e,n){let{year:t,month:o}=P(e,n);return at(e,t,o)}function Zr(e,n){let{year:t}=P(e,n);return e?e.j(t):Rd(t)}function cs(e,n){if(!e)return is(n);let{year:t}=P(e,n),o=yn(e,t,1,1);return Se(n)-Se(o)+1}function us(e,n){return e===se?as(n).weekOfYear:void 0}function ds(e,n){return e===se?as(n).yearOfWeek:void 0}var k=wr.map(e=>e+\"s\"),Fr=lo(k),ls=A(k),Bd=k.slice(0,6),ms=k.slice(6),Wd=ms.slice(1),Ad=k.reduce((e,n,t)=>(e[n]=t,e),{}),R=mt(k,0),Rr=mt(Bd,0),Cr=C(Td,k);function fs(e,n){return n==null&&T(dt(e)),n}var $=C(Ud,\"string\");function Ud(e,n,t=e){return typeof n!==e&&S(so(t,n)),n}function Yr(e,n=\"number\"){return Number.isInteger(e)||T(((t,o)=>`Non-integer ${t}: ${o}`)(n,e)),e||0}function Br(e){return typeof e==\"symbol\"&&S(\"Cannot convert Symbol to string\"),String(e)}function Wr(e,n){return Nn(e)?String(e):$(e,n)}function Do(e){return typeof e==\"boolean\"?BigInt(e?1:0):typeof e==\"string\"?BigInt(e):(typeof e!=\"bigint\"&&S(`Invalid bigint: ${e}`),e)}function bo(e,n){return Yr(Qt(e,n),n)}function vo(e,n){return typeof e==\"string\"?((t,o)=>{let r=Object.create(null);return r[t]=o,r})(n,e):dn(e)}var Re=\"smallestUnit\";var Ld={constrain:0,reject:1},qd={compatible:0,reject:1,earlier:2,later:3},jd={reject:0,use:1,prefer:2,ignore:3},$d={auto:0,never:1,critical:2,always:3},Hd={auto:0,never:1,critical:2},Gd={auto:0,never:1},zd={floor:0,halfFloor:1,ceil:2,halfCeil:3,trunc:4,halfTrunc:5,expand:6,halfExpand:7,halfEven:8},Vd=[Math.floor,e=>eo(e)?Math.floor(e):Math.round(e),Math.ceil,e=>eo(e)?Math.ceil(e):Math.round(e),Math.trunc,e=>eo(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=>eo(e)?(e=Math.trunc(e)||0)+e%2:Math.round(e)],_d={previous:-1,next:1};function Ar(e){let n=e.roundingIncrement;return n===void 0?1:U(n,\"roundingIncrement\")}function Ur(e){let n=e.fractionalSecondDigits;if(n!==void 0){if(typeof n!=\"number\"){if(Br(n)===\"auto\")return;T(so(\"fractionalSecondDigits\",n))}n=we(\"fractionalSecondDigits\",Math.floor(n),0,9,1)}return n}function Lr(e,n,t=0,o){let r=n[e];if(r===void 0)return o?t:void 0;if(r=Br(r),r===\"auto\")return o?t:null;let i=ar[r];return i===void 0&&(i=Ad[r]),i===void 0&&T(Oa(e,r,ar)),i}function Je(e,n,t,o=0){let r=t[e];if(r===void 0)return o;let i=Br(r),a=n[i];return a===void 0&&T(Oa(e,i,n)),a}var Wn=C(Lr,Re),hs=C(Lr,\"largestUnit\"),Jd=C(Lr,\"unit\"),ps=C(Je,\"overflow\",Ld),ys=C(Je,\"disambiguation\",qd),Kd=C(Je,\"offset\",jd),qr=C(Je,\"calendarName\",$d),Qd=C(Je,\"timeZoneName\",Hd),Xd=C(Je,\"offset\",Gd),An=C(Je,\"roundingMode\",zd),el=C(Je,\"direction\",_d);function jr(e,n,t,o){let r=o?Ye:Te[n+1];if(r){let i=Te[n];r%((e=we(\"roundingIncrement\",e,1,r/i-(o?0:1),1))*i)&&T(so(\"roundingIncrement\",e))}else e=we(\"roundingIncrement\",e,1,t?10**9:1,1);return e}function xn(e,n,t,o){return n!=null&&we(e,n,t,o,1,wr),n}function Ts(e,n){n>e&&T(\"smallestUnit > largestUnit\")}function Un(e,n,t,o=9,r=0,i=4){n=ie(n);let a=hs(n,r),s=Ar(n),c=An(n,i),u=Wn(n,r,1);return a=xn(\"largestUnit\",a,r,o),u=xn(Re,u,r,o),a==null?a=Math.max(t,u):Ts(a,u),s=jr(s,u,1),e&&(c=(d=>d<4?(d+2)%4:d)(c)),[a,u,s,c]}function St(e,n=6,t){let o=Ar(e=vo(e,Re)),r=An(e,7),i=Wn(e);return i=fs(Re,i),i=xn(Re,i,0,n),o=jr(o,i,void 0,t),[i,o,r]}function E(e,n){return Me(Mr,e,Me(_,n))}function w(e){return e===void 0?0:ps(dn(e))}function Zn(e,n=0){e=ie(e);let t=ys(e),o=Kd(e,n);return[ps(e),o,t]}var gs=BigInt(1e8)*O,$r=BigInt(-1e8)*O,Ds=$r-O,bs=-3261848;function Io(e){let n=12*e.year+e.month;return(n<bs||n>3309129)&&T($e),e}function X(e,n=1){return vs(fn(e),n),e}function bn(e){let n=fn(e);return vs(n),n!==Ds||oe(e)||T($e),e}function vs(e,n=1){(e<(n?Ds:$r)||e>gs)&&T($e)}function ge(e){return(e<$r||e>gs)&&T($e),e}function Hr(e,n){return ge(fn(e)+BigInt(oe(e)-n))}function ue(e){return{epochNanoseconds:e}}function De(e,n,t){return{calendar:t,timeZone:n,epochNanoseconds:e}}function Pe(e,n){return Me(_,e,N(e,n))}function N(e,n){return Me(Mr,e,{calendar:n})}function vn(e){return Me(_,e)}function B(e){return Me(k,e,{sign:xo(e)})}function Pt(e){return n=e.epochNanoseconds,Number(Ya(n,Yn));var n}function Nt(e){return e.epochNanoseconds}function Is(e,n,t){let o=ze(n),[r,i]=((u,d)=>{let l=d((u=vo(u,\"unit\")).relativeTo),m=Jd(u);return m=fs(\"unit\",m),[m,l]})(t,e);if(!i&&kn(Math.max(r,o),i))return ba(n,r);if(i||T(\"Missing relativeTo\"),!n.sign&&kn(r,i))return 0;let a=Eo(i),s=a.G(a.i,n);Cs(a,s);let c=a.re(a.i,s,r);return kn(r,i)?ba(c,r):nl(c,a.V(s),r,a)}function nl(e,n,t,o){let r=xo(e)||1,i=Gr(Cr(t,e),t,r,o,n),a=i.ae,s=i.de,c=Number(s-a),u=Number(n-a);return i.ye[k[t]]+u/c*r}function ba(e,n){return ja(Ce(e),Te[n])}function Gr(e,n,t,o,r){let i=k[n],a=e,s=0,c=va(a,i,t,o);return r&&!((u,d,l,m)=>m>0?x(d,u)<=0&&x(u,l)<=0:x(l,u)<=0&&x(u,d)<=0)(r,c.ae,c.de,Math.sign(t))&&(a={...e,[i]:e[i]+t},s=1,c=va(a,i,t,o)),{...c,ye:a,He:s}}function va(e,n,t,o){let r={...e,[n]:e[n]+t};return{ae:ct(o,e),de:ct(o,r),Ae:r}}function ws(e,n,t){let o=t-n,r=e-n;if(!r)return 0;let i=r<0n?-r:r,a=o<0n?-o:o,s=x(r,0n)===x(o,0n)?1:-1;return x(i,a)<=0?i===a?s:Ba(x(2n*i,a),s):Number(r)/Number(o)}function Ms(e,n,t,o){let{epochNanoseconds:r}=e,{timeZone:i,calendar:a}=e;if(n===0&&t===1)return{epochNanoseconds:r,timeZone:i,calendar:a};if(n===6){let s=E(W(e),ce),c=E(Ke(s,1),ce),u=He(i,s),d=He(i,c);r=zr(ws(r,u,d),o)?d:u}else{let s=W(e),c=s.offsetNanoseconds;r=qn(i,wo(s,Ln(n,t),o),c,2,0,1)}return{epochNanoseconds:r,timeZone:i,calendar:a}}function Ss(e){let{timeZone:n}=e,t=E(W(e),ce),o=E(Ke(t,1),ce),r=He(n,t);return ja(He(n,o)-r,yt)}function Ps(e){let{timeZone:n,calendar:t}=e;return De(He(n,E(W(e),ce)),n,t)}function wo(e,n,t){let[o,r]=Mo(e,n,t),i=E(Ke(e,r),o);return bn(i),i}function Mo(e,n,t){return Or(Fn(oe(e),n,t))}function ro(e){return Fn(e,pt,7)}function Ln(e,n){return Te[e]*n}function Ot(e,n){return BigInt(Te[e])*BigInt(n)}function tl(e,n,t){let o=Math.min(ze(e),6);return Ge(Po(Ce(e),BigInt(n),t),o)}function So(e,n,t,o,r,i,a){if(o===0&&r===1)return e;let s=xo(e)||1,c=kn(o,a.i)?Zt(a.i)&&o<6&&t>=6?rl:ol:il,[u,d,l]=c(s,e,n,t,o,r,i,a);return l&&o!==7&&(u=((m,f,p,h,y,b)=>{for(let v=h+1;v<=p;v++){if(v===7&&p!==7)continue;let D=Cr(v,m);D[k[v]]+=y;let I=x(f,ct(b,D));if(I&&I!==y)break;m=D}return m})(u,d,t,Math.max(6,o),s,a)),u}function Po(e,n,t){return Ns(e,n,t,e/n%2n)}function No(e,n,t){let[o,r]=br(e,O),i=o*O;return i+Ns(r,n,t,(i/n+r/n)%2n)}function Ns(e,n,t,o){let r=e/n,i=e%n,a=0;i&&(a=Ba(x(2n*(i<0n?-i:i),n),Math.sign(Number(i))));let s=zr(Number(o)+a,t);return(r-o+BigInt(s))*n}function Fn(e,n,t){return zr(e/n,t)*n}function zr(e,n){return Vd[n](e)}function ol(e,n,t,o,r,i,a){let s=Ce(n),c=Po(s,Ot(r,i),a),u=c-s,d=Math.sign(Number(c/O)-Number(s/O))===e,l=Ge(c,Math.min(o,6));return[{...n,...l},t+u,d]}function rl(e,n,t,o,r,i,a,s){let c=Number(In(n)),u=Ln(r,i),d=Fn(c,u,a),l=Gr({...n,...Rr},6,e,s,t),m=l.ae,f=l.de,p=d-Number(f-m),h=0;p&&Math.sign(p)!==e?t=m+BigInt(d):(h+=e,d=Fn(p,u,a),t=f+BigInt(d));let y=Zo(d);return[{...n,...y,days:n.days+h},t,!!h]}function il(e,n,t,o,r,i,a,s){let c=k[r],u=Cr(r,n);r===7&&(n={...n,weeks:n.weeks+Math.trunc(n.days/7)});let d=Cn(n[c],i)*i;u[c]=d;let l=Gr(u,r,i*e,s,t),m=l.ae,f=l.de,p=ws(t,m,f),h=l.ye[c],y=l.Ae[c],b=Fn(h+p*e*i,i,a),v=b===y;return u[c]=b,[u,v?f:m,l.He||v]}function Os(e,n){return e.timeZone.U(e.epochNanoseconds,(t=>{let o=vo(t,\"direction\"),r=el(o,0);return r||T(so(\"direction\",r)),r})(n))}var W=En(al,WeakMap);function al(e){let{epochNanoseconds:n,timeZone:t}=e,o=t.C(n);return{...It(n+BigInt(o)),offsetNanoseconds:o}}function qn(e,n,t,o=0,r=0,i,a){if(t!==void 0&&o===1&&(o===1||a))return Hr(n,t);o!==2&&o!==0||X(n,0);let s=e.R(n);if(t!==void 0&&o!==3){let c=((u,d,l,m)=>{let f=Ie(d);m&&(l=ro(l));for(let p of u){let h=Number(f-p);if(m&&(h=ro(h)),h===l)return p}})(s,n,t,i);if(c!==void 0)return c;o===0&&T(\"Invalid TimeZone offset\")}return a?Ie(n):kt(e,n,r,s)}function kt(e,n,t=0,o=e.R(n)){if(o.length===1)return o[0];if(t===1&&T(\"Ambiguous offset\"),o.length)return o[t===3?1:0];let r=Ie(n),i=((s,c)=>{let u=s.C(c-O);return(d=>(d>Ye&&T(\"Out-of-bounds TimeZone gap\"),d))(s.C(c+O)-u)})(e,r),a=It(r+BigInt(i*(t===2?-1:1)));return(o=e.R(a))[t===2?0:o.length-1]}function He(e,n){let t=e.R(n);if(t.length)return t[0];let o=Ie(n)-O;return e.U(o,1)}function Vr(e,n,t,o,r){let i=w(r);o.sign&&ze(o)<8&&T(\"Cannot use small units\");let a=X(st(n,t));return st(n,ks(n,a,e?H(o):o,i))}function _r(e,n){return ge(e+(Ls(t=n)&&T(\"Cannot use large units\"),In(t)));var t}function Et(e,n,t){let{calendar:o,epochNanoseconds:r,timeZone:i}=e,a=In(n),s=r;if(Ls(n)){let c=W(e);s=kt(i,E(jn(o,c,{...n,...Rr},t),c))+a}else s+=a,w(t);return{...e,epochNanoseconds:ge(s)}}function xt(e,n,t,o){let[r,i]=Oo(n,t),a=E(jn(e,n,{...t,...Rr,days:t.days+i},o),r);return bn(a),a}function jn(e,n,t,o){if(t.years||t.months||t.weeks)return ks(e,n,t,w(o));w(o);let r=t.days+Number(In(t)/O);return r?X(Ke(n,r)):n}function st(e,n){return Ke(n,1-P(e,n).day)}function Oo(e,n){let t=In(n),o=Number(t/O),r=Number(t%O),[i,a]=Or(oe(e)+r);return[i,o+a]}function Ke(e,n){return n?ns(Se(e)+n):e}function ks(e,n,t,o){let{years:r,months:i,weeks:a,days:s}=t,c;if(s+=Number(In(t)/O),r||i)c=ur(e,n,r,i,o);else{if(!a&&!s)return n;c=n}return(a||s)&&(c=Ke(c,7*a+s)),X(c)}function ur(e,n,t,o,r){let i=P(e,n),{year:a,month:s,day:c}=i;if(t){let[u,d]=pn(e,a,s);a+=t,s=dr(e,u,d,e?e.q(a):void 0,r),s=we(\"month\",s,1,it(e,a),r)}return o&&({year:a,month:s}=e?e.N(a,s,o):rs(a,s,o)),c=we(\"day\",c,1,at(e,a,s),r),yn(e,a,s,c)}function dr(e,n,t,o,r){if(t){let i=e?e.m:void 0;return o!==void 0&&(i<0||o===n+1)?o:(r===1&&T(mn),i<0?-i:n)}return ir(n,0,o)}function We(e,n){return ye(e)!==ye(n)&&T(\"Mismatching Calendars\"),e}function sl(e,n){return e.o!==n.o&&T(\"Mismatching TimeZones\"),e}function Es(e){return e.timeZone.id}function Jr(e,n,t,o){let[r,i,a,s]=Un(e,o,3,5),c=ko(n.epochNanoseconds,t.epochNanoseconds,r,i,a,s);return B(e?H(c):c)}function Kr(e,n,t,o,r){let[i,a,s,c]=Un(e,r,5),u=t.epochNanoseconds,d=o.epochNanoseconds,l;return x(d,u)?i<6?l=ko(u,d,i,a,s,c):(l=Zs(sl(t.timeZone,o.timeZone),n,t,o,i),l=So(l,d,i,a,s,c,oi(t,Nt,Et))):l=R,B(e?H(l):l)}function Qr(e,n,t,o,r){let[i,a,s,c]=Un(e,r,6),u=Ie(t),d=Ie(o),l=x(d,u),m;return l?i<=6?m=ko(u,d,i,a,s,c):(m=Fs(n,t,o,l,i),m=So(m,d,i,a,s,c,oi(t,Ie,C(xt,n)))):m=R,B(e?H(m):m)}function Xr(e,n,t,o,r){let[i,a,s,c]=Un(e,r,6,9,6);return xs(e,n,t,o,i,a,s,c)}function ei(e,n,t,o,r){let[i,a,s,c]=Un(e,r,9,9,8),u=st(n,t),d=st(n,o);return Rs(u,d)?xs(e,n,X(u),X(d),i,a,s,c,8):B(R)}function xs(e,n,t,o,r,i,a,s,c=6){let u=fn(t),d=fn(o),l;return x(d,u)?r===6?l=ko(u,d,r,i,a,s):(l=ti(n,t,o,r),i===c&&a===1||(l=So(l,d,r,i,a,s,oi(t,fn,C(jn,n))))):l=R,B(e?H(l):l)}function ni(e,n,t,o){let[r,i,a,s]=Un(e,o,5,5),c=Fn(oe(t)-oe(n),Ln(i,a),s),u={...R,...Zo(c,r)};return B(e?H(u):u)}function Zs(e,n,t,o,r){let i=x(o.epochNanoseconds,t.epochNanoseconds);if(!i)return R;if(r<6)return{...R,...Ge(o.epochNanoseconds-t.epochNanoseconds,r)};if(!Rs(W(t),W(o)))return{...R,...Ge(o.epochNanoseconds-t.epochNanoseconds,5)};let[a,s,c]=ul(e,t,o,i);return{...r===6?{...R,days:to(a,s)}:ti(n,a,s,r),...Zo(c)}}function cl(e,n,t,o){let r=Ie(n),i=Ie(t),a=x(i,r);return a?o<=6?{...R,...Ge(i-r,o)}:Fs(e,n,t,a,o):R}function Fs(e,n,t,o,r){let i=t,a=oe(t)-oe(n);return Math.sign(a)===-o&&(i=Ke(t,-o),a+=Ye*o),{...ti(e,n,i,r),...Zo(a)}}function ti(e,n,t,o){if(o<=7){let h=to(n,t);return o===7?{...R,weeks:Cn(h,7),days:vr(h,7)}:{...R,days:h}}let r=P(e,n),i=P(e,t);if(o===8){let{year:h,month:y,day:b}=r,{year:v,month:D,day:I}=i,F=Math.sign(Fe(v,h)||Fe(D,y)||to(n,t)),j=0,K=0;if(F){j=e?e.ne(h,y,v,D):Cd(h,y,v,D);let Q=ur(e,n,0,j,0);F*Fe(b,I)>0&&(j-=F,Q=ur(e,n,0,j,0)),K=to(Q,t)}return{...R,months:j,days:K}}let{year:a,month:s,day:c}=r,{year:u,month:d,day:l}=i,m=u-a,f=d-s,p=l-c;if(m||f){let h=Math.sign(m||f),y=at(e,u,d),b=0;if(Math.sign(l-c)===-h){let v=y;({year:u,month:d}=e?e.N(u,d,-h):rs(u,d,-h)),m=u-a,f=d-s,y=at(e,u,d),b=h<0?-v:y}if(p=l-Math.min(c,y)+b,m){let[v,D]=pn(e,a,s),[I,F]=pn(e,u,d),j=e?e.m:void 0;if(f=j!==void 0&&D&&!F&&(j<0?h>0&&I===-j:h<0&&I===v)?0:I-v||Number(F)-Number(D),Math.sign(f)===-h){let K=h<0&&-it(e,u);u-=h,m=u-a,f=d-dr(e,v,D,e?e.q(u):void 0,0)+(K||it(e,u))}else if(e){let K=dr(e,v,D,e.q(u),0);f=e.ne(u,K,u,d)}}}return{...R,years:m,months:f,days:p}}function Rs(e,n){return Fe(e.year,n.year)||Fe(e.month,n.month)||Fe(e.day,n.day)}function ul(e,n,t,o){let r=W(n),i=W(t),a=t.epochNanoseconds,s=0,c=oe(i)-oe(r);Math.sign(c)===-o&&s++;let u=s+(o>0?1:0);for(;s<=u;s++){let d=Ke(i,s*-o),l=kt(e,E(d,r));if(x(a,l)!==-o)return[r,d,Number(a-l)]}}function ko(e,n,t,o,r,i){return{...R,...Ge(Po(n-e,Ot(o,r),i),t)}}function to(e,n){return Se(n)-Se(e)}function oi(e,n,t){return{i:e,V:n,G:t}}function Eo(e){let{calendar:n}=e;if(Zt(e)){let{timeZone:t}=e;return{i:e,V:Nt,G:Et,re:C(Zs,t,n)}}return{i:Ys(e),V:Ie,G:C(xt,n),re:C(cl,n)}}function ct(e,n){return e.V(e.G(e.i,n))}function Zt(e){return\"timeZone\"in e}function Cs(e,n){Zt(e.i)||(Ia(e.i),Ia(n))}function Ys(e){return E(e,\"hour\"in e?e:ce)}function Ia(e){bn(Ys(e))}function kn(e,n){return e<=6-(n&&Zt(n)?1:0)}function ri(e,n,t){let o={};for(let r=n;r>=0;r--){let i=Te[r];o[t[r]]=Cn(e,i),e=vr(e,i)}return o}var dl=2**53;function ii(e,n,t,o,r){let i=e(ie(r).relativeTo),a=Math.max(ze(t),ze(o));if(kn(a,i))return ll(n,t,o,a);i||T(\"Missing relativeTo\"),n&&(o=H(o));let s=Eo(i),c=s.G(s.i,t),u=s.G(c,o);return B(s.re(s.i,u,a))}function ll(e,n,t,o){return B(Qe(((r,i,a,s)=>{let c=Ce(r)+Ce(i)*BigInt(s?-1:1);return Number.isFinite(Number(c/O))||T($e),{...R,...Ge(c,a)}})(n,t,o,e)))}function Bs(e,n,t){let o=ze(n),[r,i,a,s,c]=((f,p,h)=>{f=vo(f,Re);let y=hs(f),b=h(f.relativeTo),v=Ar(f),D=An(f,7),I=Wn(f);return y===void 0&&I===void 0&&T(\"Required smallestUnit or largestUnit\"),I==null&&(I=0),y==null&&(y=Math.max(I,p)),Ts(y,I),v=jr(v,I,1),v>1&&I>5&&y!==I&&T(\"For calendar units with roundingIncrement > 1, use largestUnit = smallestUnit\"),[y,I,v,D,b]})(t,o,e);if(!c&&Math.max(o,r)<=6)return B(Qe(((f,p,h,y,b)=>{let v=Po(Ce(f),Ot(h,y),b);return{...R,...Ge(v,p)}})(n,r,i,a,s)));let u=c&&Zt(c)&&r>=6&&i<6;if(!n.sign&&!u)return n;c||T(\"Missing relativeTo\");let d=Eo(c),l=d.G(d.i,n);Cs(d,l);let m=d.re(d.i,l,r);return m=So(m,d.V(l),r,i,a,s,d),B(m)}function Ws(e){return e.sign===-1?ai(e):e}function ai(e){return B(H(e))}function H(e){let n={};for(let t of k)n[t]=-1*e[t]||0;return n}function xo(e,n=k){let t=0;for(let o of n){let r=Math.sign(e[o]);r&&(t&&t!==r&&T(\"Cannot mix duration signs\"),t=r)}return t}function Qe(e){for(let t of Wd)we(t,e[t],-4294967295,4294967295,1);let n=Ce(e);return As(Number(n/hn)),e}function As(e){Number.isSafeInteger(e)||T(\"Out-of-bounds duration\")}function Ce(e){return BigInt(e.days)*O+In(e)}function In(e){return BigInt(e.hours)*Id+BigInt(e.minutes)*vd+Us(e)}function Us(e){return BigInt(e.seconds)*hn+BigInt(e.milliseconds)*Yn+BigInt(e.microseconds)*bd+BigInt(e.nanoseconds)}function Ge(e,n=6){let t=Number(e/O),o=Number(e%O),r=Te[n],i=n<=3?Number(e/BigInt(r)):t*(Ye/r)+Cn(o,r);Number.isFinite(i)||T($e),n<=3&&Math.abs(i)/(_e/Te[n])>=dl&&T($e);let a=ri(o,n,k);return a[k[n]]=i,a}function Zo(e,n=5){return ri(e,n,k)}function Ls(e){return!!xo(e,ms)}function ze(e){let n=9;for(;n>0&&!e[k[n]];n--);return n}function si(e,n){return x(e.epochNanoseconds,n.epochNanoseconds)}function ci(e,n){return x(e.epochNanoseconds,n.epochNanoseconds)}function qs(e,n,t,o){let r=e(ie(o).relativeTo),i=Math.max(ze(n),ze(t));if(Ca(k,n,t))return 0;if(kn(i,r))return x(Ce(n),Ce(t));r||T(\"Missing relativeTo\");let a=Eo(r);return x(ct(a,n),ct(a,t))}function ui(e,n){return wn(e,n)||Fo(e,n)}function wn(e,n){return Fe(Se(e),Se(n))}function Fo(e,n){return Fe(oe(e),oe(n))}function js(e,n){return!si(e,n)}function $s(e,n){return!ci(e,n)&&e.timeZone.o===n.timeZone.o&&e.calendar===n.calendar}function Hs(e,n){return!ui(e,n)&&e.calendar===n.calendar}function Gs(e,n){return!wn(e,n)&&e.calendar===n.calendar}function zs(e,n){return!wn(e,n)&&e.calendar===n.calendar}function Vs(e,n){return!wn(e,n)&&e.calendar===n.calendar}function _s(e,n){return!Fo(e,n)}function $n(e){return e===0?gd:e?e.l:void 0}function J(e,n,t=n){return $n(e)?t:n}function di(e,n){let t=e||void 0,o=$n(e),{era:r,eraYear:i,year:a}=n;if(a!==void 0&&(a=U(a,\"year\")),i!==void 0&&(i=U(i,\"eraYear\")),r!==void 0||i!==void 0){r!==void 0&&i!==void 0||S(\"Mismatching era/eraYear\"),o||T(\"Forbidden era/eraYear\");let s=Aa(r),c=o[s];c===void 0&&T((d=>`Invalid era: ${d}`)(r));let u=t?.te?t.te(i,s,c):ml(i,c);a!==void 0&&a!==u&&T(\"Mismatching year/eraYear\"),a=u}else a===void 0&&S(co(o));return a}function io(e,n,t,o,r){let{month:i,monthCode:a}=n;if(a!==void 0){let s=((c,u,d,l,m=La(u))=>{let f=c?c.q(d):void 0,[p,h]=m,y=ir(p,h,f);if(h){let b=c?c.m:void 0;b===void 0&&T(mn),b>0?(y>b&&T(mn),f!==y&&(l===1&&T(mn),y=ir(p,0,f))):(y!==-b&&T(mn),f===void 0&&l===1&&T(mn))}return y})(e,a,t,o,r);i!==void 0&&i!==s&&T(\"Mismatching month/monthCode\"),i=s,o=1}else i===void 0&&S(\"Missing month/monthCode\");return we(\"month\",i,1,it(e,t),o)}function lr(e,n,t,o,r){return rr(n,\"day\",1,at(e,o,t),r)}function ml(e,n){return(n+e)*(Math.sign(n)||1)||0}function Ft(e,n){return po(Me(_,{...ce,...e}),n)}var fl=Rn(\"([+-])(\\\\d{2})(?::?(\\\\d{2})(?::?(\\\\d{2})(?:[.,](\\\\d{1,9}))?)?)?\");function Ro(e){let n=li(e);return n===void 0&&T(Fa(e)),n}function li(e,n){let t=fl.exec(e);if(t&&(o=>(r=>{r[0]!==\"T\"&&r[0]!==\"t\"||(r=r.slice(1));let i=r.search(/[.,]/),a=i<0?r:r.slice(0,i),s=a.split(\":\");return s.length===1?/^(?:\\d{2}|\\d{4}|\\d{6})$/i.test(a):(s.length===2||s.length===3)&&s.every(c=>c.length===2&&/^\\d{2}$/i.test(c))})(o.slice(1)))(t[0]))return((o,r)=>{let i=o[4]||o[5];return r&&i&&T(Ze(i)),s=(On(o[2])*yt+On(o[3])*pt+On(o[4])*_e+gr(o[5]||\"\"))*Dr(o[1]),Math.abs(s)>=Ye&&T(\"Out-of-bounds offset\"),s;var s})(t,n)}var de={era:Wr,month:Xt,monthCode(e,n=\"monthCode\"){return((t,o)=>{if(typeof t==\"string\")return t;if(t&&typeof t==\"object\"){let r=t.toString;if(typeof r==\"function\")return $(r.call(t),o)}return $(t,o)})(e,n)},day:Xt},mi=mt(_,U),Js=mt(k,bo),hl={offset(e){return Ro(Wr(e))}},fi=Object.assign({},de,mi),hi=Object.assign({},fi,hl);function Z(e,n,t,o,r=!o){let i={},a=0;for(let s of n){let c=e[s];if(c!==void 0){a=1;let u=t[s];u&&(c=u(c,s)),i[s]=c}else o&&o.includes(s)&&S(dt(s))}return r&&!a&&S(Pa(n)),i}function Rt(e,n=ce,t){let o=E(e,n);return bn(o),Pe(o,t)}function ut(e,n,t){return Ks(e,n,Qs(e,n),w(t))}function Co(e,n,t){let o=Qs(e,n),r=t();return[Ks(e,n,o,r[0]),...r]}function Ks(e,n,t,o){let r=t[1],i=io(e,n,r,o,t[0]);return N(X(yn(e,r,i,lr(e,n,i,r,o))),e)}function pi(e){if(e.monthCode!==void 0)return La(e.monthCode)}function Qs(e,n){let t=$n(e);return n.year!==void 0||n.era!==void 0&&n.eraYear!==void 0||S(co(t)),n.monthCode===void 0&&n.month===void 0&&S(\"Missing month/monthCode\"),n.day===void 0&&S(dt(\"day\")),[pi(n),di(e,n)]}function yi(e,n,t){let o=$n(e);n.year!==void 0||n.era!==void 0&&n.eraYear!==void 0||S(co(o)),n.monthCode===void 0&&n.month===void 0&&S(\"Missing month/monthCode\");let r=pi(n),i=di(e,n);return N(Io(yn(e,i,io(e,n,i,w(t),r),1)),e)}function Ti(e,n,t){let o=e===se,r=$n(e);n.day===void 0&&S(dt(\"day\")),o||n.month===void 0||n.year!==void 0||n.era!==void 0&&n.eraYear!==void 0||S(co(r));let i=pi(n),a=n.eraYear!==void 0||n.year!==void 0?di(e,n):void 0,s=w(t),c,u,d;if(a===void 0&&o&&(a=1972),a!==void 0){o||X(yn(e,a,1,1));let p=io(e,n,a,s,i);c=lr(e,n,p,a,s),[u,d]=pn(e,a,p)}else{n.monthCode===void 0&&S(\"Missing month/monthCode\"),[u,d]=i;let p=e?e.ge:1972;if(p!==void 0)c=lr(e,n,io(e,n,p,s,i),p,s);else{let h=s===0&&e?e.ke?.(u,d,n.day):void 0;c=h!==void 0?h:n.day}}d&&((e&&e.Z?.[u])??1/0)<n.day&&(s===1&&T(mn),d=0,c=yr(n.day,1,(e&&e.X)??1/0));let l=e?e.v(u,!!d,c):cr(u,!!d);for(;!l&&s===0&&c>1;)c--,l=e?e.v(u,!!d,c):cr(u,!!d);l||T(\"Cannot guess year\");let{year:m,month:f}=l;return N(X(yn(e,m,f,c)),e)}var Ne=Intl.DateTimeFormat;function pl(e,n){n<-864e13&&T($e);let t=e.formatToParts(n),o={};for(let r of t)o[r.type]=r.value;return o}var yl={El_Aaiun:17,Tucuman:12,Tirane:11,Riga:10,Simferopol:9,Vienna:9,Tunis:8,Boa_Vista:6,Fortaleza:6,Maceio:6,Noronha:6,Recife:6,Gaza:6,Hebron:6,DeNoronha:6},tr=-388152e4;function Xs(e,n=4){let t=Ur(e),o=An(e,4),r=Wn(e);return[o,...Di(xn(Re,r,0,n),t)]}function gi(e){return qr(ie(e))}function ec(e,n){return Xs(ie(e),n)}function Di(e,n){return e!=null?[Te[e],e<4?9-3*e:-1]:[n===void 0?1:10**(9-n),n]}function bi(e,n,t){let[o,r,i,a]=(c=>{let u=Ur(c=ie(c)),d=An(c,4),l=Wn(c);return[c.timeZone,d,...Di(xn(Re,l,0,4),u)]})(t),s=o!==void 0;return((c,u,d,l,m,f)=>{d=No(d,BigInt(m),l);let p=u.C(d);return Ni(It(d+BigInt(p)),f)+(c?Ct(ro(p)):\"Z\")})(s,ne(s?e(o):\"UTC\"),n.epochNanoseconds,r,i,a)}function vi(e,n){let t=(o=>{o=ie(o);let r=qr(o),i=Ur(o),a=Xd(o),s=An(o,4),c=Wn(o);return[r,Qd(o),a,s,...Di(xn(Re,c,0,4),i)]})(n);return((o,r,i,a,s,c,u,d,l,m)=>{a=No(a,BigInt(l),d);let f=i.C(a);return Ni(It(a+BigInt(f)),m)+Ct(ro(f),u)+Dl(r,c)+Oi(o,s)})(e.calendar,e.timeZone.id,e.timeZone,e.epochNanoseconds,...t)}function Ii(e,n){let t=(o=>(o=ie(o),[qr(o),...Xs(o)]))(n);return((o,r,i,a,s,c)=>Ni(wo(r,s,a),c)+Oi(o,i))(e.calendar,e,...t)}function wi(e,n){return t=e.calendar,o=e,r=gi(n),ao(o)+Oi(t,r);var t,o,r}function Mi(e,n){return nc(e.calendar,tc,e,gi(n))}function Si(e,n){return nc(e.calendar,gl,e,gi(n))}function nc(e,n,t,o){let r=o>1||o===0&&e!==se;return o===1?e===se?n(t):ao(t):r?ao(t)+rc(ye(e),o===2):n(t)}function Pi(e,n){return((t,o,r,i)=>oc(Mo(t,r,o)[0],i))(e,...ec(n))}function Yo(e,n){let[t,o,r]=ec(n,3);return o>1&&Qe(e={...e,...tl(e,o,t)}),Tl(e,r)}function Tl(e,n){let{sign:t}=e,o=t===-1?H(e):e,{hours:r,minutes:i}=o,a=Us(o),s=Number(a/hn),c=Number(a%hn);As(s);let u=ki(c,n),d=n>=0||!t||u;return(t<0?\"-\":\"\")+\"P\"+wa({Y:ln(o.years),M:ln(o.months),W:ln(o.weeks),D:ln(o.days)})+(r||i||s||d?\"T\"+wa({H:ln(r),M:ln(i),S:ln(s,d)+u}):\"\")}function wa(e){let n=[];for(let t in e){let o=e[t];o&&n.push(o,t)}return n.join(\"\")}function ln(e,n){if(!e&&!n)return\"\";let t=Object.create(null);return t.useGrouping=0,e.toLocaleString(\"fullwide\",t)}function Ni(e,n){return ao(e)+\"T\"+oc(e,n)}function ao(e){return tc(e)+\"-\"+pe(e.day)}function tc(e){let{year:n}=e;return(n<0||n>9999?ic(n)+oo(6,Math.abs(n)):oo(4,n))+\"-\"+pe(e.month)}function gl(e){return pe(e.month)+\"-\"+pe(e.day)}function oc(e,n){let t=[pe(e.hour),pe(e.minute)];return n!==-1&&t.push(pe(e.second)+((o,r,i,a)=>ki(o*ht+r*ft+i,a))(e.millisecond,e.microsecond,e.nanosecond,n)),t.join(\":\")}function Ct(e,n=0){if(n===1)return\"\";let[t,o]=ve(Math.abs(e),yt),[r,i]=ve(o,pt),[a,s]=ve(i,_e);return ic(e)+pe(t)+\":\"+pe(r)+(a||s?\":\"+pe(a)+ki(s):\"\")}function Dl(e,n){return n!==1?\"[\"+(n===2?\"!\":\"\")+e+\"]\":\"\"}function Oi(e,n){return n>1||n===0&&e!==se?rc(ye(e),n===2):\"\"}function rc(e,n){return\"[\"+(n?\"!\":\"\")+\"u-ca=\"+e+\"]\"}var bl=/0+$/;function ki(e,n){let t=oo(9,e);return t=n===void 0?t.replace(bl,\"\"):t.slice(0,n),t?\".\"+t:\"\"}function ic(e){return e<0?\"-\":\"+\"}var vl=/^(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$/,Il=/[^\\w\\/:+-]+/;function ac(e){return Bo($(e))}function Bo(e){return sc(e).id}function sc(e){let n=e.toUpperCase(),t=(r=>{let i=li(r,1);if(i!==void 0)return{id:Ct(i),_:i,o:i}})(n);if(t)return{kind:\"fixed\",...t};let o=n===\"UTC\"?\"UTC\":(r=>(Il.test(r)&&T(pr(r)),vl.test(r)&&T(\"Forbidden ICU TimeZone\"),r.toLowerCase().split(\"/\").map((i,a)=>(i.length<=3||/\\d/.test(i))&&!/etc|yap/.test(i)?i.toUpperCase():i.replace(/baja|dumont|[a-z]+/g,(s,c)=>s.length<=2&&!a||s===\"in\"||s===\"chat\"?s.toUpperCase():s.length>2||!c?Ta(s).replace(/island|noronha|murdo|rivadavia|urville/,Ta):s)).join(\"/\")))(e);return wl(o)}var wl=En(e=>{if(e===\"UTC\")return{kind:\"utc\",id:e,o:e};let n=e.toUpperCase(),t=Ml(n);return{kind:\"named\",id:e,format:t,o:t.resolvedOptions().timeZone}}),Ml=En(e=>new Ne(\"en-u-hc-h23\",{calendar:\"iso8601\",timeZone:e,era:\"short\",year:\"numeric\",month:\"numeric\",day:\"numeric\",hour:\"numeric\",minute:\"numeric\",second:\"numeric\"}));function ne(e){let n=sc(e);return Sl(n.id,n)}var Sl=En((e,n)=>n.kind===\"named\"?new fr(e,n.o,n.format):new mr(e,n.o,n.kind===\"fixed\"?n._:0)),mr=class{constructor(n,t,o){this.id=n,this.o=t,this._=o}C(){return this._}R(n){return[Hr(n,this._)]}U(){}},fr=class{constructor(n,t,o){this.id=n,this.o=t,this.qe=((r,i)=>{let a=En(r),s=En(Pl),c=86400*i;function u(l){let[m,f]=Sa(l,c),p=no(m),h=no(f),y=a(p),b=a(h);return y===b?y:d(s(p,h),y,b,l)}function d(l,m,f,p){let h,y;for(;(p===void 0||(h=p<l[0]?m:p>=l[1]?f:void 0)===void 0)&&(y=l[1]-l[0]);){let b=l[0]+Math.floor(y/2);r(b)===f?l[1]=b:l[0]=b+1}return h}return{Ee(l){let m=u(l-86400),f=u(l+86400),p=l-m,h=l-f;if(m===f)return[p];let y=u(p);return y===u(h)?[l-y]:m>f?[p,h]:[]},De:u,U:function l(m,f){if(f>0&&m>=864e10)return;if(f<0){if(m<=tr)return;let I=Ma()+94867200;if(m>I)return l(I,-1)}let p=f>0?Math.max(m,tr):m,[h,y]=Sa(p,c),b=c*f,v=f>0?Math.max(m,Ma())+94867200:tr,D=()=>f<0?y>v:h<v;for(;D();){let I=no(h),F=no(y),j=a(I),K=a(F);if(j!==K){let Q=s(I,F);d(Q,j,K);let V=Q[0];if((Fe(V,m)||1)===f)return V}h+=b,y+=b}}}})((r=>i=>{let a=pl(r,1e3*i);return 86400*rt((s=>{let c=s.relatedYear;if(c!==void 0)return parseInt(c);let u=parseInt(s.year);return s.era!==void 0&&Aa(s.era)===\"bce\"?1-u:u})(a),parseInt(a.month),parseInt(a.day))+3600*parseInt(a.hour)+60*parseInt(a.minute)+parseInt(a.second)-i})(o),(r=>{let i=r.split(\"/\").pop();return yl[i]||60})(n))}C(n){return this.qe.De((t=>ga(t)[0])(n))*_e}R(n){let t=86400*Se(n)+Nr(n),o=Qa(n);return this.qe.Ee(t).map(r=>ge(BigInt(r)*hn+BigInt(o)))}U(n,t){let[o,r]=ga(n),i=this.qe.U(o+(t>0||r?1:0),t);if(i!==void 0)return BigInt(i)*hn}};function Ma(){return Math.floor(Date.now()/1e3)}function Pl(e,n){return[e,n]}function Sa(e,n){let t=Math.floor(e/n)*n;return[t,t+n]}function no(e){return yr(e,-1e10,864e10)}function cc(e,n,t){let o=Z(t,J(n,Ja,Ka),hi,[],0);if(o.timeZone!==void 0){let r=ut(n,o),i=Ft(o),a=ne(e(o.timeZone));return{epochNanoseconds:qn(a,E(r,i),o.offset),timeZone:a,calendar:n}}return ut(n,o)}function uc(e,n,t,o){let r=Z(t,J(n,Ja,Ka),hi,Sr,0),i=e(r.timeZone),[a,s,c,u]=Co(n,r,()=>Zn(o)),d=Ft(r,s),l=ne(i);return De(qn(l,E(a,d),r.offset,c,u),l,n)}function dc(e,n,t){let o=Z(n,J(e,Va,_a),fi,[],0),[r,i]=Co(e,o,()=>[w(t)]);return Rt(r,Ft(o,i),e)}function lc(e,n,t,o=[]){return ut(e,Z(n,J(e,gn,Dn),de,o),t)}function mc(e,n,t,o){return yi(e,Z(n,J(e,gt,Ha),de,o),t)}function fc(e,n,t,o){let r=Z(t,J(e,gn,Dn),de,Tn,0);return n&&r.month!==void 0&&r.monthCode===void 0&&r.year===void 0&&(r.year=1972),Ti(e,r,o)}function hc(e,n){return Ft(Z(e,sr,mi,[],1),w(n))}function pc(e){let n=Z(e,ls,Js);return B(Qe({...R,...n}))}function ae(e){T(Fa(e))}function yc(e){let n=Xe(e=Wr(e)),t;return n||ae(e),n.F?t=0:n.offset?t=Ro(n.offset):ae(e),n.timeZoneId&&li(n.timeZoneId,1),wt(n),ue(Hr(n,t))}function Tc(e,n){let t=Xe($(e));return t||ae(e),t.timeZoneId?Nc(t,n,void 0):(t.F&&ae(e),hr(t,n))}function gc(e,n,t){let o=Xe($(e));return o&&o.timeZoneId||ae(e),Nc(o,n,t)}function Dc(e,n){let t=Xe($(e));return t&&!t.F||ae(e),Oc(t,n)}function bc(e,n){let t=Zi(xi($(e)),void 0,n);return N(t,t.calendar)}function vc(e,n){let t=Ri($(e));if(t)return Ei(t),N(Io(Be(t)),n(t.calendarId));let o=Zi(xi(e),Nl,n),{calendar:r}=o;return N(st(r,o),r)}function Ei(e){e.calendarId!==\"iso8601\"&&T(Ze(e.calendarId))}function Ic(e,n){let t=Ci($(e));if(t)return Ei(t),N(Be(t),n(t.calendarId));let o=Zi(xi(e),Ol,n),{calendar:r}=o,{year:i,month:a,day:s}=P(r,o),[c,u]=pn(r,i,a),{year:d,month:l}=((m,f,p,h)=>{let y=m?m.v(f,p,h):cr(f,p);return y||T(\"Cannot guess year\"),y})(r,c,u,s);return N(X(yn(r,d,l,s)),r)}function wc(e){let n=(o=>{let r=Ec(o);return r?(Yt(r[13]),xc(r,1)):void 0})(e=$(e)),t;return n||(n=Xe(e),n?(n.fe||ae(e),n.F&&T(Ze(\"Z\")),Ei(n)):ae(e)),(t=Ri(e))&&Da(t)&&ae(e),(t=Ci(e))&&Da(t)&&ae(e),vn(bt(n))}function Mc(e){let n=(t=>{let o=Cl.exec(t);return o?(r=>{let i=0,a=0,s=0,c={years:u(r[2]),months:u(r[3]),weeks:u(r[4]),days:u(r[5]),hours:u(r[6],r[7],5),minutes:u(r[8],r[9],4),seconds:u(r[10],r[11],3),...ri(s,2,k)};return i||T(Pa(k)),Dr(r[1])<0&&(c=H(c)),c;function u(d,l,m){let f=0,p=0;return m&&([f,s]=ve(s,Te[m])),d!==void 0&&(a&&T(Ze(d)),p=(h=>{let y=parseInt(h);return Number.isFinite(y)||T(Ze(h)),y})(d),i=1,l&&(s=gr(l)*(Te[m]/_e),a=1)),f+p}})(o):void 0})($(e));return n||ae(e),B(Qe(n))}function Sc(e){let n=Xe(e)||Ri(e)||Ci(e);if(n)return n.calendarId;let t=Ec(e);return t?Yt(t[13]).calendarId:e}function Pc(e){let n=Xe(e);return n&&(n.timeZoneId||n.F&&\"UTC\"||n.offset)||e}function xi(e){let n=Xe(e);return n&&!n.F||ae(e),n}function Zi(e,n,t){return n&&e.calendarId===\"iso8601\"?(Be(e),e.fe&&bt(e),hr(n(e),t)):e.fe?Oc(e,t):hr(e,t)}function Nl(e){let n=12*e.year+e.month===bs?20:1;return{...e,day:n}}function Ol(e){return{...e,year:1972}}function Nc(e,n,t){let o=ne(Bo(e.timeZoneId)),r;if(wt(e),e.fe){let a=e.offset?Ro(e.offset):void 0,[,s,c]=Zn(t);r=qn(o,e,a,s,c,!(o._||e.offset===void 0||(i=e.offset,i.replace(/\\D/g,\"\").length>4)),e.F)}else Zn(t),r=He(o,e);var i;return ge(r),De(r,o,n(e.calendarId))}function Oc(e,n){return wt(e),bn(e),{...E(e,e),calendar:n(e.calendarId)}}function hr(e,n){return Be(e),X(e),{calendar:n(e.calendarId),year:e.year,month:e.month,day:e.day}}function Fi(e){return`(\\\\d{2})(?:(:?)(\\\\d{2})(?:\\\\${e}(\\\\d{2})(?:[.,](\\\\d{1,9}))?)?)?`}function kc(e){return\"([+-])\"+Fi(e)}var kl=\"(?:(?:([+-])(\\\\d{6}))|(\\\\d{4}))(-?)(\\\\d{2})\\\\4(\\\\d{2})(?:[T ]\"+Fi(8)+\"(Z|\"+kc(15)+\")?)?\",El=Rn(\"(?:(?:([+-])(\\\\d{6}))|(\\\\d{4}))-?(\\\\d{2})((?:\\\\[(!?)([^\\\\]]*)\\\\]){0,9})\"),xl=Rn(\"(?:--)?(\\\\d{2})-?(\\\\d{2})((?:\\\\[(!?)([^\\\\]]*)\\\\]){0,9})\"),Zl=Rn(kl+\"((?:\\\\[(!?)([^\\\\]]*)\\\\]){0,9})\"),Fl=Rn(\"T?\"+Fi(2)+`(${kc(9)})?((?:\\\\[(!?)([^\\\\]]*)\\\\]){0,9})`),Rl=new RegExp(\"\\\\[(!?)([^\\\\]]*)\\\\]\",\"g\"),Cl=Rn(\"([+-])?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)?)?\");function Xe(e){let n=Zl.exec(e);return n?(t=>{let o=t[12],r=(o||\"\").toUpperCase()===\"Z\";return{year:Zc(t),month:parseInt(t[5]),day:parseInt(t[6]),...xc(t,7),...Yt(t[19]),fe:!!t[7],F:r,offset:r?void 0:o}})(n):void 0}function Ri(e){let n=El.exec(e);if(n)return(t=>({year:Zc(t),month:parseInt(t[4]),day:1,...Yt(t[5])}))(n)}function Ci(e){let n=xl.exec(e);return n?(t=>({year:1972,month:parseInt(t[1]),day:parseInt(t[2]),...Yt(t[3])}))(n):void 0}function Ec(e){let n=Fl.exec(e);if(n)return n[6]&&Ro(n[6]),n}function xc(e,n){let t=On(e[n+3]);return{...Or(gr(e[n+4]||\"\"))[0],hour:On(e[n]),minute:On(e[n+2]),second:t===60?59:t}}function Zc(e){let n=Dr(e[1]),t=parseInt(e[2]||e[3]);return n<0&&!t&&T(Ze(-0)),n*t}function Yt(e){let n,t,o=[];return e.replace(Rl,(r,i,a)=>{let s=!!i,[c,u]=a.split(\"=\").reverse();return u?u===\"u-ca\"?(o.push(c.toLowerCase()),n||(n=s)):(s||/[A-Z]/.test(u))&&T(Ze(r)):(t&&T(Ze(r)),t=c),\"\"}),o.length>1&&n&&T(Ze(e)),{timeZoneId:t,calendarId:o[0]||\"iso8601\"}}function Hn(e,n,t){let o=Object.assign(Object.create(null),n);return or(o,t,$a),$n(e)&&(or(o,t,wd),e&&e.le&&or(o,t,Md,Bn)),o}function or(e,n,t,o){let r=0,i=[];for(let a of t)n[a]!==void 0?r=1:i.push(a);if(Object.assign(e,n),r)for(let a of o||i)delete e[a]}function Fc(e,n,t){let{calendar:o,timeZone:r}=e,i=J(o,Pd,Nd),a=W(e),{year:s,month:c,day:u}=P(o,a),d={year:s,monthCode:Bt(o,s,c),day:u,hour:a.hour,minute:a.minute,second:a.second,millisecond:a.millisecond,microsecond:a.microsecond,nanosecond:a.nanosecond,offset:a.offsetNanoseconds},l=Z(n,i,hi),m=Hn(o,d,l),f={...d,...l},[p,h,y,b]=Co(o,m,()=>Zn(t,2));return De(qn(r,E(p,po(f,h)),f.offset,y,b),r,o)}function Rc(e,n,t){let{calendar:o}=e,r=J(o,Va,_a),{year:i,month:a,day:s}=P(o,e),c={year:i,monthCode:Bt(o,i,a),day:s,hour:e.hour,minute:e.minute,second:e.second,millisecond:e.millisecond,microsecond:e.microsecond,nanosecond:e.nanosecond},u=Z(n,r,fi),d=Hn(o,c,u),l={...c,...u},[m,f]=Co(o,d,()=>[w(t)]);return Rt(m,po(l,f),o)}function Cc(e,n,t){let{calendar:o}=e,r=J(o,gn,Dn),{year:i,month:a,day:s}=P(o,e);return ut(o,Hn(o,{year:i,monthCode:Bt(o,i,a),day:s},Z(n,r,de)),t)}function Yc(e,n,t){let{calendar:o}=e,r=J(o,gt,Ha),{year:i,month:a}=P(o,e);return yi(o,Hn(o,{year:i,monthCode:Bt(o,i,a)},Z(n,r,de)),t)}function Bc(e,n,t){let{calendar:o}=e,r=J(o,gn,Dn),{year:i,month:a,day:s}=P(o,e);return Ti(o,Hn(o,{monthCode:Bt(o,i,a),day:s},Z(n,r,de)),t)}function Wc(e,n,t){return((o,r,i)=>Ft({...Me(sr,o),...Z(r,sr,mi)},w(i)))(e,n,t)}function Ac(e,n){return B((t=e,o=n,Qe({...t,...Z(o,ls,Js)})));var t,o}function Bt(e,n,t){let[o,r]=pn(e,n,t);return qa(o,r)}function Uc(e,n,t){return De(e.epochNanoseconds,n,t)}function Lc(e){return ue(e.epochNanoseconds)}function Yi(e){return Pe(W(e),e.calendar)}function Bi(e){return N(W(e),e.calendar)}function Wi(e){return vn(W(e))}function qc(e,n,t){let o=((r,i,a)=>{let s=(c=>ys(ie(c)))(a);return kt(r,i,s)})(n,e,t);return De(ge(o),n,e.calendar)}function jc(e,n,t,o){let r=e(o.timeZone),i=o.plainTime,a=i!==void 0?n(i):void 0,s=ne(r),c;return c=a?kt(s,E(t,a)):He(s,E(t,ce)),De(c,s,t.calendar)}function $c(e,n,t){return Vc(e,Me(J(e,Dt,Ga),n),Z(dn(t),Tn,de,[]))}function Hc(e,n,t){let o=J(e,fo,Sd);return Vc(e,Me(za,n),Z(dn(t),o,de,[]))}function Gc(e,n){return Ti(e,Z(n,za,de))}function zc(e,n,t){return yi(e,Z(n,J(e,Dt,Ga),de),t)}function Vc(e,n,t){let o=J(e,Od,kd),r=Hn(e,n,t);return r=Z(r,o,de,[]),ut(e,r)}function _c(e){return ue(ge(BigInt(bo(e))*Yn))}function Jc(e){return ue(ge(Do(e)))}function Gn(e){return e.timeZone=\"UTC\",[\"full\",\"long\"].includes(e.timeStyle)&&(e.timeStyle=\"medium\"),e}function Kc(e,n){return e.timeZone!==void 0&&S(\"Cannot specify TimeZone\"),e.timeZone=n,e}function zn(e,n,t){let o=e.resolvedOptions().calendar;!t&&n.calendar===se||ye(n.calendar)===o||T(\"Mismatching Calendars\")}function Mn(e,n,t,o,r){let i=new Set(e),a=new Set(n),s=new Set(t);return(c,u)=>{let d=((I,F,j,K)=>{let Q={dateStyle:void 0,timeStyle:void 0,me:{},pe:{},xe:{},oe:0,ue:0};for(let V of Object.keys(I)){let Pn=I[V];Pn===void 0||K.has(V)||(F.has(V)?V===\"dateStyle\"?Q.dateStyle=Pn:V===\"timeStyle\"?Q.timeStyle=Pn:Q.me[V]=Pn:V===\"era\"?Q.pe[V]=Pn:j.has(V)?V===\"dateStyle\"||V===\"timeStyle\"?Q.ue=1:Q.oe=1:Q.xe[V]=Pn)}return Q})(c,i,a,s),l=d.dateStyle!==void 0,m=d.timeStyle!==void 0,f=l||m,p=Object.keys(d.me).length>0,h=d.oe||d.ue,y=p||l||m,b=Object.keys(d.pe).length>0,v=p||b||d.oe;(!u&&h||u&&h&&!y||f&&v)&&S(\"Invalid formatting options\");let D={};return f||y||Object.assign(D,o),Object.assign(D,d.me,d.pe,d.xe),l&&(r?Object.assign(D,r[d.dateStyle]):D.dateStyle=d.dateStyle),m&&(D.timeStyle=d.timeStyle),D}}var Qc={year:\"numeric\",month:\"numeric\",day:\"numeric\"},Xc={hour:\"numeric\",minute:\"numeric\",second:\"numeric\"},Ai=Object.assign({},Qc,Xc),Yl=Object.assign({},Ai,{timeZoneName:\"short\"}),Bl={year:\"numeric\",month:\"numeric\"},Wl={month:\"numeric\",day:\"numeric\"},Ui=[\"weekday\",\"year\",\"month\",\"day\",\"dateStyle\"],Wt=[\"dayPeriod\",\"hour\",\"minute\",\"second\",\"fractionalSecondDigits\",\"timeStyle\"],Li=Ui.concat(Wt),Al=[\"weekday\",\"day\"].concat(Wt),Ul=[\"weekday\",\"year\"].concat(Wt),eu=Mn(Li,[],[],Ai),nu=Mn(Li,[],[],Yl),tu=Mn(Li,[],[\"timeZoneName\"],Ai),ou=Mn(Ui,Wt,[\"timeZoneName\"],Qc),ru=Mn(Wt,Ui,[\"timeZoneName\",\"era\"],Xc),iu=Mn([\"year\",\"month\",\"dateStyle\"],Al,[\"timeZoneName\"],Bl,{full:{year:\"numeric\",month:\"long\"},long:{year:\"numeric\",month:\"long\"},medium:{year:\"numeric\",month:\"short\"},short:{year:\"2-digit\",month:\"numeric\"}}),au=Mn([\"month\",\"day\",\"dateStyle\"],Ul,[\"timeZoneName\",\"era\"],Wl,{full:{month:\"long\",day:\"numeric\"},long:{month:\"long\",day:\"numeric\"},medium:{month:\"short\",day:\"numeric\"},short:{month:\"numeric\",day:\"numeric\"}});function su(e,n){let{timeZone:t}=e,o=W(e),{offsetNanoseconds:r}=o,i=n||ce,a;return a=n?qn(t,E(o,i),r,2):He(t,E(o,i)),De(a,t,e.calendar)}function Wo(e){let n=Ao(),t=e.C(n);return It(n+BigInt(t))}function Ao(){return BigInt(Date.now())*Yn}function Vn(){return new Ne().resolvedOptions().timeZone}var qi=\"PlainYearMonth\",ji=\"PlainMonthDay\",$i=\"PlainDate\",Hi=\"PlainDateTime\",Gi=\"PlainTime\",zi=\"ZonedDateTime\",Vi=\"Instant\",_i=\"Duration\";function Ae(e,n,t,...o){Object.defineProperties(n,Ra(e)),Object.defineProperties(n.prototype,lt(\"Temporal.\"+e));for(let r of o)Ll(n.prototype,t,r);return n}function Ll(e,n,t){Object.defineProperties(e,Ve(o=>({get(){return o(n(this))},configurable:1}),t))}var Ue=Tr.name===\"noop\"?e=>{Object.defineProperty(e,\"_str_\",{value:e.toJSON()})}:Tr;function Le(){S(Ea)}function qe(){S(ka)}var uu={era(e){return Mt(e.calendar,e).era},eraYear(e){return Mt(e.calendar,e).eraYear},year(e){return P(e.calendar,e).year},month(e){return P(e.calendar,e).month},monthCode(e){return go(e.calendar,e)}},Uo={era(e){return Mt(e.calendar,e).era},eraYear(e){return Mt(e.calendar,e).eraYear},year(e){return P(e.calendar,e).year},month(e){return P(e.calendar,e).month},monthCode(e){return go(e.calendar,e)},day(e){return P(e.calendar,e).day}},du={monthCode(e){return go(e.calendar,e)},day(e){return P(e.calendar,e).day}},Ji={daysInMonth(e){return xr(e.calendar,e)},daysInYear(e){return Zr(e.calendar,e)},monthsInYear(e){return Er(e.calendar,e)},inLeapYear(e){return kr(e.calendar,e)}},At={dayOfWeek(e){return To(e)},dayOfYear(e){return cs(e.calendar,e)},weekOfYear(e){return us(e.calendar,e)},yearOfWeek(e){return ds(e.calendar,e)},daysInWeek(){return 7},daysInMonth(e){return xr(e.calendar,e)},daysInYear(e){return Zr(e.calendar,e)},monthsInYear(e){return Er(e.calendar,e)},inLeapYear(e){return kr(e.calendar,e)}};function cu(e){return lo(Object.keys(e))}cu(Ji),cu(At);function on(e){let n=$(e).toLowerCase();return n===Ir?se:n===Wa?Ua:void T(Za(e,\"temporal-polyfill/full\"))}function qt(e=Ir){return on(e)}var mu=new WeakMap,fu=Ae(zi,class{constructor(e,n,t=void 0){let o=ge(Do(e)),r=ne(ac(n)),i=qt(t);hu(this,De(o,r,i))}static from(e,n=void 0){return te(_n(e,n))}static compare(e,n){return ci(_n(e),_n(n))}get calendarId(){return ye(M(this).calendar)}get timeZoneId(){return M(this).timeZone.id}get epochMilliseconds(){return Pt(M(this))}get epochNanoseconds(){return Nt(M(this))}get offset(){return Ct(W(M(this)).offsetNanoseconds)}get offsetNanoseconds(){return W(M(this)).offsetNanoseconds}get hoursInDay(){return Ss(M(this))}with(e,n=void 0){return te(Fc(M(this),et(e),n))}withCalendar(e){return te({...M(this),calendar:jo(e)})}withTimeZone(e){return te({...M(this),timeZone:ne(fe(e))})}withPlainTime(e=void 0){return te(su(M(this),ea(e)))}add(e,n=void 0){let t=M(this);return te(Et(t,q(e),n))}subtract(e,n=void 0){let t=M(this);return te(Et(t,H(q(e)),n))}until(e,n=void 0){let t=M(this),o=_n(e),r=We(t.calendar,o.calendar);return Y(B(Kr(0,r,t,o,n)))}since(e,n=void 0){let t=M(this),o=_n(e),r=We(t.calendar,o.calendar);return Y(B(Kr(1,r,t,o,n)))}round(e){let n=M(this),[t,o,r]=St(e);return te(Ms(n,t,o,r))}startOfDay(){return te(Ps(M(this)))}equals(e){return $s(M(this),_n(e))}toInstant(){return je(Lc(M(this)))}toPlainDateTime(){return Oe(Yi(M(this)))}toPlainDate(){return ke(Bi(M(this)))}toPlainTime(){return tn(Wi(M(this)))}toLocaleString(e=void 0,n={}){let t=M(this),o=new Ne(e,Kc(nu(n),Es(t)));return zn(o,t),o.format(Pt(t))}toString(e=void 0){return vi(M(this),e)}toJSON(){return vi(M(this))}getTimeZoneTransition(e){let n=M(this),t=Os(n,e);return t?te({...n,epochNanoseconds:t}):null}valueOf(){return qe()}},ql,Uo,At,Tt);function te(e){return hu(Object.create(fu.prototype),e)}function M(e){return Ee(e)||Le()}function ql(e){let n=M(e);return{...W(n),calendar:n.calendar}}function Ee(e){return mu.get(e)}function _n(e,n){if(ee(e)){let t=Ee(e);if(t)return Zn(n),t;let o=jt(e);return uc(fe,o,e,n)}return gc(e,on,n)}function hu(e,n){return mu.set(e,n),Ue(e),e}function fe(e){if(ee(e)){let n=Ee(e);return n||S(pr(e)),n.timeZone.id}return(n=>Bo(Pc($(n))))(e)}var pu=new WeakMap,yu=Ae(Vi,class{constructor(e){let n=ge(Do(e));gu(this,ue(n))}static from(e){return je(Jn(e))}static fromEpochMilliseconds(e){return je(_c(e))}static fromEpochNanoseconds(e){return je(Jc(e))}static compare(e,n){return si(Jn(e),Jn(n))}get epochMilliseconds(){return Pt(le(this))}get epochNanoseconds(){return Nt(le(this))}add(e){let n=le(this);return je(ue(_r(n.epochNanoseconds,q(e))))}subtract(e){let n=le(this);return je(ue(_r(n.epochNanoseconds,H(q(e)))))}until(e,n=void 0){return Y(Jr(0,le(this),Jn(e),n))}since(e,n=void 0){return Y(Jr(1,le(this),Jn(e),n))}round(e){let n=le(this),[t,o,r]=St(e,5,1);return je(ue(No(n.epochNanoseconds,Ot(t,o),r)))}equals(e){return js(le(this),Jn(e))}toZonedDateTimeISO(e){return te(Uc(le(this),ne(fe(e))))}toLocaleString(e=void 0,n={}){let t=le(this);return new Ne(e,eu(n)).format(Pt(t))}toString(e=void 0){return bi(fe,le(this),e)}toJSON(){return bi(fe,le(this))}valueOf(){return qe()}});function je(e){return gu(Object.create(yu.prototype),e)}function le(e){return Qi(e)||Le()}function Qi(e){return pu.get(e)}function Jn(e){if(ee(e)){let n=Qi(e);if(n)return n;let t=Ee(e);if(t)return ue(t.epochNanoseconds)}return yc(e)}var{toTemporalInstant:Tu}={toTemporalInstant(){let e=Date.prototype.valueOf.call(this);return je(ue(BigInt(Yr(e))*Yn))}};function gu(e,n){return pu.set(e,n),Ue(e),e}var Du=new WeakMap,bu=Ae(ji,class{constructor(e,n,t=void 0,o){let r=U(e),i=U(n),a=qt(t),s=U(o??ts),c=X(Be({year:s,month:r,day:i}));vu(this,N(c,a))}static from(e,n=void 0){return Ki(lu(e,n))}get calendarId(){return ye(en(this).calendar)}with(e,n=void 0){return Ki(Bc(en(this),et(e),n))}equals(e){return Vs(en(this),lu(e))}toPlainDate(e){let n=en(this);return ke(Hc(n.calendar,this,e))}toLocaleString(e=void 0,n={}){let t=en(this),o=new Ne(e,Gn(au(n)));return zn(o,t,1),o.format(vt(t))}toString(e=void 0){return Si(en(this),e)}toJSON(){return Si(en(this))}valueOf(){return qe()}},en,du);function Ki(e){return vu(Object.create(bu.prototype),e)}function en(e){return Lo(e)||Le()}function Lo(e){return Du.get(e)}function lu(e,n){if(ee(e)){let o=Lo(e);if(o)return w(n),o;let r=Ru(e);return fc(r===void 0?se:r,r===void 0,e,n)}let t=Ic(e,on);return w(n),t}function vu(e,n){return Du.set(e,n),Ue(e),e}var Iu=new WeakMap,wu=Ae(qi,class{constructor(e,n,t=void 0,o){let r=U(e),i=U(n),a=qt(t),s=U(o??1),c=Io(Be({year:r,month:i,day:s}));Mu(this,N(c,a))}static from(e,n=void 0){return Lt(Kn(e,n))}static compare(e,n){return wn(Kn(e),Kn(n))}get calendarId(){return ye(me(this).calendar)}with(e,n=void 0){return Lt(Yc(me(this),et(e),n))}add(e,n=void 0){let t=me(this);return Lt(N(Vr(0,t.calendar,t,q(e),n),t.calendar))}subtract(e,n=void 0){let t=me(this);return Lt(N(Vr(1,t.calendar,t,q(e),n),t.calendar))}until(e,n=void 0){let t=me(this),o=Kn(e),r=We(t.calendar,o.calendar);return Y(ei(0,r,t,o,n))}since(e,n=void 0){let t=me(this),o=Kn(e),r=We(t.calendar,o.calendar);return Y(ei(1,r,t,o,n))}equals(e){return zs(me(this),Kn(e))}toPlainDate(e){let n=me(this);return ke($c(n.calendar,this,e))}toLocaleString(e=void 0,n={}){let t=me(this),o=new Ne(e,Gn(iu(n)));return zn(o,t,1),o.format(vt(t))}toString(e=void 0){return Mi(me(this),e)}toJSON(){return Mi(me(this))}valueOf(){return qe()}},me,uu,Ji);function Lt(e){return Mu(Object.create(wu.prototype),e)}function me(e){return qo(e)||Le()}function qo(e){return Iu.get(e)}function Kn(e,n){if(ee(e)){let o=qo(e);if(o)return w(n),o;let r=jt(e);return mc(r,e,n)}let t=vc(e,on);return w(n),t}function Mu(e,n){return Iu.set(e,n),Ue(e),e}function jl(e){if(!ee(e))return;let n=Qi(e);return n?[Vi,n]:(n=Ee(e),n?[zi,n]:(n=Sn(e),n?[Hi,n]:(n=nt(e),n?[$i,n]:(n=Xi(e),n?[Gi,n]:(n=qo(e),n?[qi,n]:(n=Lo(e),n?[ji,n]:(n=na(e),n?[_i,n]:void 0)))))))}function et(e){return(jl(e)||e.calendar!==void 0||e.timeZone!==void 0)&&S(Na),e}var Su=new WeakMap,Pu=Ae(Gi,class{constructor(e=0,n=0,t=0,o=0,r=0,i=0){let a=bt(Ve(U,{hour:e,minute:n,second:t,millisecond:o,microsecond:r,nanosecond:i}));Nu(this,vn(a))}static from(e,n=void 0){return tn(nn(e,n))}static compare(e,n){return Fo(nn(e),nn(n))}with(e,n=void 0){return tn(Wc(be(this),et(e),n))}add(e){let n=be(this);return tn(Oo(n,q(e))[0])}subtract(e){let n=be(this);return tn(Oo(n,H(q(e)))[0])}until(e,n=void 0){return Y(ni(0,be(this),nn(e),n))}since(e,n=void 0){return Y(ni(1,be(this),nn(e),n))}round(e){let n=be(this),[t,o,r]=St(e,5);return tn(Mo(n,Ln(t,o),r)[0])}equals(e){return _s(be(this),nn(e))}toLocaleString(e=void 0,n={}){let t=be(this);return new Ne(e,Gn(ru(n))).format(Pr(t))}toString(e=void 0){return Pi(be(this),e)}toJSON(){return Pi(be(this))}valueOf(){return qe()}},be,Tt);function tn(e){return Nu(Object.create(Pu.prototype),e)}function be(e){return Xi(e)||Le()}function Xi(e){return Su.get(e)}function nn(e,n){if(ee(e)){let o=Xi(e);if(o)return w(n),o;let r=Sn(e);if(r)return w(n),vn(r);let i=Ee(e);return i?(w(n),Wi(i)):hc(e,n)}let t=wc(e);return w(n),t}function ea(e){return e===void 0?void 0:nn(e)}function Nu(e,n){return Su.set(e,n),Ue(e),e}var Ou=new WeakMap,ku=Ae(Hi,class{constructor(e,n,t,o=0,r=0,i=0,a=0,s=0,c=0,u=void 0){let d=bn(wt(Ve(U,{year:e,month:n,day:t,hour:o,minute:r,second:i,millisecond:a,microsecond:s,nanosecond:c}))),l=qt(u);Eu(this,Pe(d,l))}static from(e,n=void 0){return Oe(Qn(e,n))}static compare(e,n){let t=Qn(e),o=Qn(n);return ui(t,o)}get calendarId(){return ye(L(this).calendar)}with(e,n=void 0){return Oe(Rc(L(this),et(e),n))}withCalendar(e){let n=L(this);return Oe(Pe(n,jo(e)))}withPlainTime(e=void 0){let n=L(this);return Oe(Rt(n,ea(e),n.calendar))}add(e,n=void 0){let t=L(this);return Oe(Pe(xt(t.calendar,t,q(e),n),t.calendar))}subtract(e,n=void 0){let t=L(this);return Oe(Pe(xt(t.calendar,t,H(q(e)),n),t.calendar))}until(e,n=void 0){let t=L(this),o=Qn(e),r=We(t.calendar,o.calendar);return Y(Qr(0,r,t,o,n))}since(e,n=void 0){let t=L(this),o=Qn(e),r=We(t.calendar,o.calendar);return Y(Qr(1,r,t,o,n))}round(e){let n=L(this),[t,o,r]=St(e);return Oe(Pe(wo(n,Ln(t,o),r),n.calendar))}equals(e){return Hs(L(this),Qn(e))}toZonedDateTime(e,n=void 0){return te(qc(L(this),ne(fe(e)),n))}toPlainDate(){let e=L(this);return ke(N(e,e.calendar))}toPlainTime(){return tn(vn(L(this)))}toLocaleString(e=void 0,n={}){let t=L(this),o=new Ne(e,Gn(tu(n)));return zn(o,t),o.format(es(t))}toString(e=void 0){return Ii(L(this),e)}toJSON(){return Ii(L(this))}valueOf(){return qe()}},L,Uo,At,Tt);function Oe(e){return Eu(Object.create(ku.prototype),e)}function L(e){return Sn(e)||Le()}function Sn(e){return Ou.get(e)}function Qn(e,n){if(ee(e)){let o=Sn(e);if(o)return w(n),o;let r=nt(e);if(r)return w(n),Pe(E(r,ce),r.calendar);let i=Ee(e);if(i)return w(n),Yi(i);let a=jt(e);return dc(a,e,n)}let t=Dc(e,on);return w(n),t}function Eu(e,n){return Ou.set(e,n),Ue(e),e}var xu=new WeakMap,Zu=Ae($i,class{constructor(e,n,t,o=void 0){let r=X(Be(Ve(U,{year:e,month:n,day:t}))),i=qt(o);Fu(this,N(r,i))}static from(e,n=void 0){return ke(Xn(e,n))}static compare(e,n){return wn(Xn(e),Xn(n))}get calendarId(){return ye(G(this).calendar)}with(e,n=void 0){let t=G(this);return ke(Cc(t,et(e),n))}withCalendar(e){let n=G(this);return ke(N(n,jo(e)))}add(e,n=void 0){let t=G(this);return ke(N(jn(t.calendar,t,q(e),n),t.calendar))}subtract(e,n=void 0){let t=G(this);return ke(N(jn(t.calendar,t,H(q(e)),n),t.calendar))}until(e,n=void 0){let t=G(this),o=Xn(e),r=We(t.calendar,o.calendar);return Y(Xr(0,r,t,o,n))}since(e,n=void 0){let t=G(this),o=Xn(e),r=We(t.calendar,o.calendar);return Y(Xr(1,r,t,o,n))}equals(e){return Gs(G(this),Xn(e))}toZonedDateTime(e){let n=ee(e)?{timeZone:e.timeZone,plainTime:e.plainTime}:{timeZone:e};return te(jc(fe,nn,G(this),n))}toPlainDateTime(e=void 0){let n=G(this);return Oe(Rt(n,ea(e),n.calendar))}toPlainYearMonth(){let e=G(this);return Lt(zc(e.calendar,this))}toPlainMonthDay(){let e=G(this);return Ki(Gc(e.calendar,this))}toLocaleString(e=void 0,n={}){let t=G(this),o=new Ne(e,Gn(ou(n)));return zn(o,t),o.format(vt(t))}toString(e=void 0){return wi(G(this),e)}toJSON(){return wi(G(this))}valueOf(){return qe()}},G,Uo,At);function ke(e){return Fu(Object.create(Zu.prototype),e)}function G(e){return nt(e)||Le()}function nt(e){return xu.get(e)}function Xn(e,n){if(ee(e)){let o=nt(e);if(o)return w(n),o;let r=Sn(e);if(r)return w(n),N(r,r.calendar);let i=Ee(e);if(i)return w(n),Bi(i);let a=jt(e);return lc(a,e,n)}let t=bc(e,on);return w(n),t}function Fu(e,n){return xu.set(e,n),Ue(e),e}function jt(e){let n=Ru(e);return n===void 0?se:n}function Ru(e){let{calendar:n}=e;if(n!==void 0)return jo(n)}function jo(e){if(ee(e)){let n=nt(e)||Sn(e)||Ee(e)||Lo(e)||qo(e);return n||S(xa(e)),n.calendar}return(n=>on(Sc($(n))))(e)}var Cu=new WeakMap,Yu=Ae(_i,class{constructor(e=0,n=0,t=0,o=0,r=0,i=0,a=0,s=0,c=0,u=0){let d=Qe(Ve(bo,{years:e,months:n,weeks:t,days:o,hours:r,minutes:i,seconds:a,milliseconds:s,microseconds:c,nanoseconds:u}));Bu(this,B(d))}static from(e){return Y(q(e))}static compare(e,n,t=void 0){return qs(Ut,q(e),q(n),t)}get sign(){return re(this).sign}get blank(){return!re(this).sign}with(e){return Y(Ac(re(this),e))}negated(){return Y(ai(re(this)))}abs(){return Y(Ws(re(this)))}add(e,n=void 0){return Y(ii(Ut,0,re(this),q(e),n))}subtract(e,n=void 0){return Y(ii(Ut,1,re(this),q(e),n))}round(e){return Y(Bs(Ut,re(this),e))}total(e){return Is(Ut,re(this),e)}toLocaleString(e=void 0,n){let t=re(this);return Intl.DurationFormat?new Intl.DurationFormat(e,n).format(t):Yo(t,n)}toString(e=void 0){return Yo(re(this),e)}toJSON(){return Yo(re(this))}valueOf(){return qe()}},re,Fr);function Y(e){return Bu(Object.create(Yu.prototype),e)}function re(e){return na(e)||Le()}function na(e){return Cu.get(e)}function q(e){return ee(e)?na(e)||pc(e):Mc(e)}function Ut(e){if(e!==void 0){if(ee(e)){let n=Ee(e);if(n)return n;let t=nt(e);if(t)return t;let o=Sn(e);if(o)return N(o,o.calendar);let r=jt(e);return cc(fe,r,e)}return Tc(e,on)}}function Bu(e,n){return Cu.set(e,n),Ue(e),e}var $l=Object.defineProperties({},{...lt(\"Temporal.Now\"),...uo({timeZoneId(){return Vn()},instant(){return je(ue(Ao()))},zonedDateTimeISO(e=Vn()){let n=ne(fe(e));return te(De(Ao(),n))},plainDateTimeISO(e=Vn()){let n=Wo(ne(fe(e)));return Oe(Pe(n))},plainDateISO(e=Vn()){let n=Wo(ne(fe(e)));return ke(N(n))},plainTimeISO(e=Vn()){let n=Wo(ne(fe(e)));return tn(vn(n))}})}),Wu=Object.defineProperties({},{...lt(\"Temporal\"),...uo({PlainYearMonth:wu,PlainMonthDay:bu,PlainDate:Zu,PlainTime:Pu,PlainDateTime:ku,ZonedDateTime:fu,Instant:yu,Duration:Yu,Now:$l})});var Au=Vo||Wu;var of=Vo?Date.prototype.toTemporalInstant:Tu;var Uu;function Lu(e){Uu=e}function he(){let e=Uu??globalThis.Temporal;if(!e)throw new ReferenceError('temporals: no Temporal implementation found. Use a runtime with native Temporal (Node 22+), import \"temporal-polyfill/global\", or call configureTemporal(Temporal).');return e}function z(e){let n=e?.constructor?.name;switch(n){case\"PlainDate\":return\"date\";case\"PlainDateTime\":return\"datetime\";case\"ZonedDateTime\":return\"zoneddatetime\";case\"PlainYearMonth\":return\"yearmonth\";case\"PlainTime\":return\"time\";case\"Instant\":return\"instant\";default:throw new TypeError(`temporals: expected a Temporal point (PlainDate, PlainDateTime, ZonedDateTime, PlainYearMonth, PlainTime, Instant), got ${n??typeof e}`)}}function ta(e){return e===\"date\"||e===\"datetime\"||e===\"zoneddatetime\"}function Hl(e){return e===\"date\"||e===\"datetime\"||e===\"zoneddatetime\"||e===\"yearmonth\"}function g(e,n){return e.constructor.compare(e,n)}function $t(e,n,t){let o=e;return t&&Hl(z(e))?o.add(n,{overflow:t}):o.add(n)}var Gl=[\"years\",\"months\",\"weeks\",\"days\",\"hours\",\"minutes\",\"seconds\",\"milliseconds\",\"microseconds\",\"nanoseconds\"];function qu(e,n){if(n===1)return e;let t=e,o={},r=!1;for(let i of Gl){let a=t[i];a&&(o[i]=a*n,r=!0)}return r?o:e}function ju(e,n,t){return e.until(n,t)}function Ht(e){return e.toString()}function $u(e,n,t){let o=e.toZonedDateTime(n,{disambiguation:\"compatible\"});if(!o.toPlainDateTime().equals(e))return(t.dstGap??\"fire\")===\"skip\"?null:o;let r=e.toZonedDateTime(n,{disambiguation:\"earlier\"}),i=e.toZonedDateTime(n,{disambiguation:\"later\"});return r.equals(i)?o:(t.dstOverlap??\"first\")===\"second\"?i:r}var zl=[\"MO\",\"TU\",\"WE\",\"TH\",\"FR\",\"SA\",\"SU\"];function rn(e){let n=zl.indexOf(e);if(n<0)throw new RangeError(`temporals: invalid weekday \"${e}\"`);return n+1}function Hu(e){let n=z(e);if(n===\"date\")return e;if(n===\"datetime\"||n===\"zoneddatetime\")return e.toPlainDate();throw new TypeError(\"temporals: recurrence requires a date-bearing point (PlainDate, PlainDateTime, or ZonedDateTime)\")}function Gu(e,n){let t=z(e);if(t===\"date\")return n;if(t===\"datetime\"){let o=e.toPlainTime();return n.toPlainDateTime(o)}if(t===\"zoneddatetime\"){let o=e;return n.toZonedDateTime({timeZone:o.timeZoneId,plainTime:o.toPlainTime()})}throw new TypeError(\"temporals: cannot rebuild a non-date-bearing point onto a date\")}function $o(e,n,t){return e.with({year:n,month:t,day:1},{overflow:\"constrain\"}).daysInMonth}function oa(e,n,t,o){let r=e.with({year:n,month:t,day:1},{overflow:\"constrain\"}).dayOfWeek;return 1+(o-r+7)%7}var tt=class e{#e;constructor(n){this.#e=()=>{let t=n(),o=t;return typeof o[Symbol.iterator]==\"function\"?o[Symbol.iterator]():t}}[Symbol.iterator](){return this.#e()}static from(n){return typeof n==\"function\"?new e(n):new e(()=>n[Symbol.iterator]())}static of(...n){return new e(()=>n[Symbol.iterator]())}static empty(){return new e(function*(){})}map(n){let t=this;return new e(function*(){let o=0;for(let r of t)yield n(r,o++)})}filter(n){let t=this;return new e(function*(){let o=0;for(let r of t)n(r,o++)&&(yield r)})}flatMap(n){let t=this;return new e(function*(){let o=0;for(let r of t)yield*n(r,o++)})}take(n){let t=this;return new e(function*(){if(n<=0)return;let o=0;for(let r of t)if(yield r,++o>=n)return})}drop(n){let t=this;return new e(function*(){let o=0;for(let r of t)o++<n||(yield r)})}takeWhile(n){let t=this;return new e(function*(){let o=0;for(let r of t){if(!n(r,o++))return;yield r}})}dropWhile(n){let t=this;return new e(function*(){let o=0,r=!0;for(let i of t)r&&n(i,o++)||(r=!1,yield i)})}tap(n){let t=this;return new e(function*(){let o=0;for(let r of t)n(r,o++),yield r})}concat(...n){let t=this;return new e(function*(){yield*t;for(let o of n)yield*o})}pairwise(){let n=this;return new e(function*(){let t,o=!1;for(let r of n)o&&(yield[t,r]),t=r,o=!0})}toArray(){return[...this]}forEach(n){let t=0;for(let o of this)n(o,t++)}reduce(n,t){let o=t,r=0;for(let i of this)o=n(o,i,r++);return o}find(n){let t=0;for(let o of this)if(n(o,t++))return o}some(n){let t=0;for(let o of this)if(n(o,t++))return!0;return!1}every(n){let t=0;for(let o of this)if(!n(o,t++))return!1;return!0}first(){for(let n of this)return n}at(n){if(n<0)return;let t=0;for(let o of this)if(t++===n)return o}count(){let n=0;for(let t of this)n++;return n}};function Ho(e){let{start:n,end:t,count:o,step:r,inclusive:i=!1,overflow:a}=e;if(o!==void 0&&(o<0||!Number.isInteger(o)))throw new RangeError(\"temporals: range() count must be a non-negative integer\");return new tt(function*(){if(o===0)return;let s=$t(n,r,a),c=g(s,n);if(c===0&&o===void 0)throw new RangeError(\"temporals: range() step is zero with no count bound (would be infinite)\");let u=l=>{if(t===void 0)return!0;let m=g(l,t);return c>0?i?m<=0:m<0:c<0?i?m>=0:m>0:!0},d=0;for(;;){let l=d===0?n:$t(n,qu(r,d),a);if(!u(l)||(yield l,d++,o!==void 0&&d>=o))return}})}var xe=class e{start;end;constructor(n,t){if(z(n)!==z(t))throw new TypeError(\"temporals: Interval start and end must be the same Temporal type\");this.start=n,this.end=t}get isEmpty(){return g(this.start,this.end)>=0}contains(n){return g(this.start,n)<=0&&g(n,this.end)<0}overlaps(n){return g(this.start,n.end)<0&&g(n.start,this.end)<0}encloses(n){return g(this.start,n.start)<=0&&g(n.end,this.end)<=0}abuts(n){return g(this.end,n.start)===0||g(n.end,this.start)===0}relation(n){let t=this.start,o=this.end,r=n.start,i=n.end;if(g(o,r)<0)return\"before\";if(g(o,r)===0)return\"meets\";if(g(i,t)<0)return\"after\";if(g(i,t)===0)return\"metBy\";let a=g(t,r),s=g(o,i);return a===0&&s===0?\"equals\":a===0?s<0?\"starts\":\"startedBy\":s===0?a>0?\"finishes\":\"finishedBy\":a<0&&s>0?\"contains\":a>0&&s<0?\"during\":a<0?\"overlaps\":\"overlappedBy\"}intersection(n){let t=g(this.start,n.start)>=0?this.start:n.start,o=g(this.end,n.end)<=0?this.end:n.end;return g(t,o)>=0?null:new e(t,o)}toDuration(n){return ju(this.start,this.end,n)}points(n){return Ho({start:this.start,end:this.end,step:n})}toString(){return`${this.start.toString()}/${this.end.toString()}`}toJSON(){return this.toString()}static from(n){let t=0,o=-1;for(let c=0;c<n.length;c++){let u=n[c];if(u===\"[\")t++;else if(u===\"]\")t--;else if(u===\"/\"&&t===0){o=c;break}}if(o<0)throw new RangeError(`temporals: invalid ISO interval \"${n}\" (expected \"start/end\")`);let r=n.slice(0,o),i=n.slice(o+1),a=he(),s=c=>c.includes(\"[\")?a.ZonedDateTime.from(c):c.includes(\"T\")?a.PlainDateTime.from(c):a.PlainDate.from(c);return new e(s(r),s(i))}};var Gt=class e{intervals;constructor(n){this.intervals=n}static from(n){let t=[...n].filter(r=>!r.isEmpty);t.sort((r,i)=>g(r.start,i.start)||g(r.end,i.end));let o=[];for(let r of t){let i=o[o.length-1];i&&g(r.start,i.end)<=0?g(r.end,i.end)>0&&(o[o.length-1]=new xe(i.start,r.end)):o.push(r)}return new e(o)}static empty(){return new e([])}get isEmpty(){return this.intervals.length===0}[Symbol.iterator](){return this.intervals[Symbol.iterator]()}contains(n){return this.intervals.some(t=>t.contains(n))}union(n){let t=n instanceof e?n.intervals:[...n];return e.from([...this.intervals,...t])}intersection(n){let t=[];for(let o of this.intervals)for(let r of n.intervals){if(g(r.start,o.end)>=0)break;let i=o.intersection(r);i&&t.push(i)}return e.from(t)}difference(n){let t=[];for(let o of this.intervals){let r=[o];for(let i of n.intervals){if(g(i.end,o.start)<=0||g(i.start,o.end)>=0)continue;let a=[];for(let s of r){if(!s.overlaps(i)){a.push(s);continue}g(s.start,i.start)<0&&a.push(new xe(s.start,i.start)),g(i.end,s.end)<0&&a.push(new xe(i.end,s.end))}r=a}t.push(...r)}return e.from(t)}gaps(n){if(n)return e.from([n]).difference(this);let t=[];for(let o=1;o<this.intervals.length;o++){let r=this.intervals[o-1],i=this.intervals[o];g(r.end,i.start)<0&&t.push(new xe(r.end,i.start))}return new e(t)}totalDuration(){let n=he();if(this.intervals.length===0)return n.Duration.from({seconds:0});let t=z(this.intervals[0].start),o=t===\"date\"||t===\"yearmonth\"?\"day\":\"hour\",r=n.Duration.from({seconds:0});for(let i of this.intervals)r=r.add(i.toDuration({largestUnit:o}));return r}toString(){return this.intervals.map(n=>n.toString()).join(\", \")}};function Go(){return he().PlainDate}function ra(e,n){if(!n)return e;let t=n===\"uk\"?\"uk\":\"us\";return e.dayOfWeek===6?t===\"uk\"?e.add({days:2}):e.subtract({days:1}):e.dayOfWeek===7?e.add({days:1}):e}function sn(e,n,t={}){return o=>{let r=Go().from({year:o,month:e,day:n},{overflow:\"reject\"});return ra(r,t.observed??!1)}}function Jt(e=0,n={}){return t=>{let o=t%19,r=Math.floor(t/100),i=t%100,a=Math.floor(r/4),s=r%4,c=Math.floor((r+8)/25),u=Math.floor((r-c+1)/3),d=(19*o+r-a-u+15)%30,l=Math.floor(i/4),m=i%4,f=(32+2*s+2*l-d-m)%7,p=Math.floor((o+11*d+22*f)/451),h=Math.floor((d+f-7*p+114)/31),y=(d+f-7*p+114)%31+1,b=Go().from({year:t,month:h,day:y}).add({days:e});return ra(b,n.observed??!1)}}function an(e,n,t,o={}){let r=rn(n);return i=>{let a=Go().from({year:i,month:e,day:1}),s=a.daysInMonth,c=1+(r-a.dayOfWeek+7)%7,u;if(t>0){if(u=c+(t-1)*7,u>s)return null}else if(u=c+Math.floor((s-c)/7)*7+(t+1)*7,u<1)return null;return ra(a.with({day:u}),o.observed??!1)}}var zt=class e{rules;cache=new Map;constructor(n){this.rules=n}static of(...n){return new e(n)}yearSet(n){let t=this.cache.get(n);return t||(t=new Set(this.rules.map(o=>o(n)).filter(o=>o!==null).map(o=>o.toString())),this.cache.set(n,t)),t}has(n){let t=n.toString();return this.yearSet(n.year).has(t)||this.yearSet(n.year-1).has(t)||this.yearSet(n.year+1).has(t)}inYear(n){return[...this.yearSet(n)].map(t=>Go().from(t)).sort((t,o)=>g(t,o))}};function Vu(){return zt.of(sn(1,1,{observed:!0}),an(1,\"MO\",3),an(2,\"MO\",3),an(5,\"MO\",-1),sn(6,19,{observed:!0}),sn(7,4,{observed:!0}),an(9,\"MO\",1),an(10,\"MO\",2),sn(11,11,{observed:!0}),an(11,\"TH\",4),sn(12,25,{observed:!0}))}var zu=4e3,Vt=class{weekend;holidays;constructor(n={}){let t=n.weekend??[\"SA\",\"SU\"];this.weekend=new Set(t.map(rn)),this.holidays=n.holidays}toDate(n){let t=n;return t.toPlainDate?t.toPlainDate():n}isBusinessDay(n){let t=this.toDate(n);return this.weekend.has(t.dayOfWeek)?!1:!this.holidays?.has(t)}nextBusinessDay(n){let t=n.add({days:1});for(let o=0;o<zu;o++,t=t.add({days:1}))if(this.isBusinessDay(t))return t;throw new RangeError(\"temporals: no business day found (check weekend/holiday config)\")}previousBusinessDay(n){let t=n.subtract({days:1});for(let o=0;o<zu;o++,t=t.subtract({days:1}))if(this.isBusinessDay(t))return t;throw new RangeError(\"temporals: no business day found (check weekend/holiday config)\")}addBusinessDays(n,t){let o=n,r=t>=0?1:-1;for(let i=Math.abs(t);i>0;i--)o=r>0?this.nextBusinessDay(o):this.previousBusinessDay(o);return o}businessDaysBetween(n,t){let o=0;for(let r=n;g(r,t)<0;r=r.add({days:1}))this.isBusinessDay(r)&&o++;return o}businessDays(n){return Ho({start:n.start,end:n.end,step:{days:1}}).filter(t=>this.isBusinessDay(t))}nthBusinessDay(n,t,o){let r=he().PlainDate.from({year:n,month:t,day:1}),i=[];for(let s=1;s<=r.daysInMonth;s++){let c=r.with({day:s});this.isBusinessDay(c)&&i.push(c)}let a=o>0?o-1:i.length+o;return i[a]??null}},_t=class{windows;calendar;dst;constructor(n={}){this.dst=n.dst??\"compatible\",this.windows=(n.windows??[[\"09:00\",\"17:00\"]]).slice().sort((t,o)=>t[0].localeCompare(o[0])),this.calendar=n.calendar}dayWindows(n,t){if(this.calendar&&!this.calendar.isBusinessDay(n))return[];let o=he();return this.windows.map(([r,i])=>{let a=o.PlainTime.from(r),s=o.PlainTime.from(i),c=o.PlainTime.compare(s,a)<=0,u=this.dst,d=n.toPlainDateTime(a).toZonedDateTime(t,{disambiguation:u}),l=(c?n.add({days:1}):n).toPlainDateTime(s).toZonedDateTime(t,{disambiguation:u});return new xe(d,l)})}intervalsBetween(n,t){let o=n.timeZoneId,r=t.toPlainDate(),i=[];for(let a=n.toPlainDate().subtract({days:1});g(a,r)<=0;a=a.add({days:1}))i.push(...this.dayWindows(a,o));return Gt.from(i).intersection(Gt.from([new xe(n,t)]))}isOpen(n){let t=n.timeZoneId,o=n.toPlainDate();return[...this.dayWindows(o.subtract({days:1}),t),...this.dayWindows(o,t)].some(i=>i.contains(n))}nextOpen(n){return this.intervalsBetween(n,n.add({days:366})).intervals[0]?.start}};function _u(e,n,t){return t.intervalsBetween(e,n).totalDuration()}var Vl=[[\"years\",\"year\",\"y\"],[\"months\",\"month\",\"mo\"],[\"weeks\",\"week\",\"w\"],[\"days\",\"day\",\"d\"],[\"hours\",\"hour\",\"h\"],[\"minutes\",\"minute\",\"m\"],[\"seconds\",\"second\",\"s\"],[\"milliseconds\",\"millisecond\",\"ms\"],[\"microseconds\",\"microsecond\",\"\\xB5s\"],[\"nanoseconds\",\"nanosecond\",\"ns\"]],_l={second:7,millisecond:8,microsecond:9,nanosecond:10};function ia(e,n={}){let{short:t=!1,max:o=1/0,locale:r,precision:i=\"second\"}=n,a=Vl.slice(0,_l[i]),s=e,c=Intl.DurationFormat;if(r&&c){let d={},l=0;for(let[m]of a){let f=s[m]??0;if(f!==0&&(d[m]=f,++l>=o))break}return new c(r,{style:t?\"narrow\":\"long\"}).format(d)}let u=[];for(let[d,l,m]of a){let f=s[d]??0;if(f!==0&&(u.push(t?`${f}${m}`:`${f} ${l}${Math.abs(f)===1?\"\":\"s\"}`),u.length>=o))break}return u.length===0?t?\"0s\":\"0 seconds\":u.join(t?\" \":\", \")}var Jl=[[\"years\",\"year\"],[\"months\",\"month\"],[\"weeks\",\"week\"],[\"days\",\"day\"],[\"hours\",\"hour\"],[\"minutes\",\"minute\"],[\"seconds\",\"second\"]];function Ju(e,n,t={}){let o=z(e),r=o===\"time\"||o===\"instant\"?\"hour\":\"year\",i=e.until(n,{largestUnit:r}),a=new Intl.RelativeTimeFormat(t.locale,{numeric:t.numeric??\"auto\"}),s=i;for(let[c,u]of Jl){let d=s[c]??0;if(d!==0&&c===\"days\"&&(o===\"zoneddatetime\"||o===\"datetime\")&&(d=Kl(e,n)),d!==0)return a.format(d,u)}return a.format(0,\"second\")}function Kl(e,n){return(z(e)===\"zoneddatetime\"?e.withTimeZone(n.timeZoneId):e).toPlainDate().until(n.toPlainDate(),{largestUnit:\"day\"}).days}var Ql={y:\"years\",mo:\"months\",w:\"weeks\",d:\"days\",h:\"hours\",m:\"minutes\",s:\"seconds\",ms:\"milliseconds\"};function aa(e){let n={},t=/(-?\\d+(?:\\.\\d+)?)\\s*(mo|ms|[ywdhms])/gi,o,r=!1;for(;(o=t.exec(e))!==null;){r=!0;let i=Ql[o[2].toLowerCase()];if(!i)throw new RangeError(`temporals: unknown duration unit \"${o[2]}\"`);n[i]=(n[i]??0)+Number(o[1])}if(!r)throw new RangeError(`temporals: could not parse duration \"${e}\"`);return he().Duration.from(n)}var Ku=1e4;function Xu(e){return typeof e==\"string\"?{wd:rn(e)}:{wd:rn(e.weekday),nth:e.nth}}function Xl(e,n){let t=[];for(let o=e;o<=n;o++)t.push(o);return t}function ca(e,n){let t=e>0?e:n+e+1;return t>=1&&t<=n?t:null}function em(e,n,t,o,r){let i=$o(e,n,t),a=oa(e,n,t,o);if(r>0){let u=a+(r-1)*7;return u<=i?u:null}let c=a+Math.floor((i-a)/7)*7+(r+1)*7;return c>=1?c:null}function nm(e,n,t,o){let r=$o(e,n,t),i=[];for(let a=oa(e,n,t,o);a<=r;a+=7)i.push(a);return i}function tm(e,n){return e.with({year:n,month:1,day:1},{overflow:\"constrain\"}).daysInYear}function om(e,n,t){let o=tm(e,n),r=t>0?t:o+t+1;return r<1||r>o?null:e.with({year:n,month:1,day:1},{overflow:\"constrain\"}).add({days:r-1})}function rm(e,n){return e.with({year:n,month:12,day:28},{overflow:\"constrain\"}).weekOfYear??52}function Qu(e,n,t,o,r,i){let a=$o(e,n,t),s=o&&o.length>0,c=r&&r.length>0,u;if(s){u=[];for(let m of o){let f=ca(m,a);f!==null&&u.push(f)}}let d;if(c){let m=new Set;for(let{wd:f,nth:p}of r)if(p!==void 0){let h=em(e,n,t,f,p);h!==null&&m.add(h)}else for(let h of nm(e,n,t,f))m.add(h);d=[...m]}let l;if(u&&d){let m=new Set(d);l=u.filter(f=>m.has(f))}else u?l=u:d?l=d:i!==void 0?l=i<=a?[i]:[]:l=[];return[...new Set(l)].sort((m,f)=>m-f)}function im(e,n,t,o){let{byMonth:r,byMonthDay:i}=e,a=s=>!r||r.includes(s);switch(e.freq){case\"daily\":{let s=o.date;if(!a(s.month))return[];if(i&&i.length>0&&!i.some(u=>ca(u,s.daysInMonth)===s.day))return[];if(e.byYearDay&&e.byYearDay.length>0){let c=s.daysInYear;if(!e.byYearDay.some(d=>(d>0?d:c+d+1)===s.dayOfYear))return[]}return t&&t.length>0&&!t.some(c=>c.wd===s.dayOfWeek)?[]:[s]}case\"weekly\":{let s=rn(e.weekStart??\"MO\"),c=t&&t.length>0?t.map(m=>m.wd):[n.dayOfWeek],u=new Set(c),d=[],l=o.weekStartDate;for(let m=0;m<7;m++)u.has(l.dayOfWeek)&&a(l.month)&&d.push(l),l=l.add({days:1});return d}case\"monthly\":{let s=o.anchor,c=s.month;return a(c)?Qu(s,s.year,c,i,t,n.day).map(d=>s.with({day:d})):[]}case\"yearly\":{let s=o.anchor,c=s.year,u=i&&i.length>0,d=t&&t.length>0,l=e.byYearDay&&e.byYearDay.length>0;if(e.byWeekNo&&e.byWeekNo.length>0){let y=new Set(e.byWeekNo.map(F=>F>0?F:rm(n,c)+F+1)),b=new Set(d?t.map(F=>F.wd):[n.dayOfWeek]),v=[],D=n.with({year:c,month:1,day:1},{overflow:\"constrain\"}).subtract({days:7}),I=n.with({year:c,month:12,day:31},{overflow:\"constrain\"}).add({days:7});for(;g(D,I)<=0;D=D.add({days:1}))D.yearOfWeek===c&&y.has(D.weekOfYear??-1)&&b.has(D.dayOfWeek)&&a(D.month)&&v.push(D);return v}if(l&&!u){let y=d?new Set(t.map(D=>D.wd)):null,b=[];for(let D of e.byYearDay){let I=om(n,c,D);I&&a(I.month)&&(y&&!y.has(I.dayOfWeek)||b.push(I))}let v=new Set;return b.filter(D=>{let I=Ht(D);return v.has(I)?!1:(v.add(I),!0)}).sort((D,I)=>g(D,I))}let f=s.monthsInYear,p=r??(u||d?Xl(1,f):[n.month]),h=[];for(let y of p){if(y<1||y>f)continue;let b=s.with({month:y,day:1},{overflow:\"constrain\"}),v=Qu(b,c,y,i,t,n.day);for(let D of v)h.push(b.with({day:D}))}return h}default:throw new RangeError(`temporals: recurrence freq \"${e.freq}\" is not supported (yearly/monthly/weekly/daily only)`)}}function am(e,n){let t=(e.dayOfWeek-n+7)%7;return e.subtract({days:t})}function sm(e,n){switch(e.freq){case\"daily\":return{date:n};case\"weekly\":return{weekStartDate:am(n,rn(e.weekStart??\"MO\"))};case\"monthly\":return{anchor:n.with({day:1})};case\"yearly\":return{anchor:n.with({month:1,day:1},{overflow:\"constrain\"})};default:throw new RangeError(`temporals: unsupported freq \"${e.freq}\"`)}}function cm(e,n){let t=e.interval??1;switch(e.freq){case\"daily\":return{date:n.date.add({days:t})};case\"weekly\":return{weekStartDate:n.weekStartDate.add({weeks:t})};case\"monthly\":return{anchor:n.anchor.add({months:t})};case\"yearly\":return{anchor:n.anchor.add({years:t})};default:throw new RangeError(`temporals: unsupported freq \"${e.freq}\"`)}}function um(e,n,t){let o=z(e);if(o===\"zoneddatetime\"){let l=e,m=l.timeZoneId,f=l.toPlainTime(),p=t.byHour&&t.byHour.length?t.byHour:[f.hour],h=t.byMinute&&t.byMinute.length?t.byMinute:[f.minute],y=t.bySecond&&t.bySecond.length?t.bySecond:[f.second],b={dstGap:t.dstGap,dstOverlap:t.dstOverlap},v=[];for(let D of p)for(let I of h)for(let F of y){let j=n.toPlainDateTime(f.with({hour:D,minute:I,second:F})),K=$u(j,m,b);K&&v.push(K)}return v}let r=Gu(e,n);if(!(t.byHour&&t.byHour.length||t.byMinute&&t.byMinute.length||t.bySecond&&t.bySecond.length)||o===\"date\")return[r];let a=r,s=t.byHour&&t.byHour.length?t.byHour:[a.hour],c=t.byMinute&&t.byMinute.length?t.byMinute:[a.minute],u=t.bySecond&&t.bySecond.length?t.bySecond:[a.second],d=[];for(let l of s)for(let m of c)for(let f of u)d.push(a.with({hour:l,minute:m,second:f}));return d}function dm(e,n){if(!n||n.length===0)return e;let t=[];for(let o of n){let r=o>0?o-1:e.length+o;r>=0&&r<e.length&&t.push(e[r])}return t}var sa=new Set([\"hourly\",\"minutely\",\"secondly\"]);function lm(e){return e===\"datetime\"||e===\"zoneddatetime\"||e===\"time\"}function mm(e){let n=z(e.start);if(sa.has(e.freq)){if(!lm(n))throw new TypeError(\"temporals: sub-daily recurrence requires a time-bearing start (PlainDateTime, ZonedDateTime, or PlainTime)\")}else if(!ta(n))throw new TypeError(\"temporals: recur() requires a date-bearing start (PlainDate, PlainDateTime, or ZonedDateTime)\");if(e.byWeekNo&&e.freq!==\"yearly\")throw new RangeError(\"temporals: BYWEEKNO is only valid with FREQ=YEARLY\");if(e.bySetPos&&sa.has(e.freq))throw new RangeError(\"temporals: BYSETPOS with sub-daily frequencies is not supported\");if(e.interval!==void 0&&(!Number.isInteger(e.interval)||e.interval<1))throw new RangeError(\"temporals: recur() interval must be a positive integer\")}var fm=1e6;function hm(e,n,t){let o=z(e),r=e;if(ta(o)){if(n.byMonth&&!n.byMonth.includes(r.month)||n.byMonthDay&&!n.byMonthDay.some(i=>ca(i,r.daysInMonth)===r.day))return!1;if(n.byYearDay){let i=r.daysInYear;if(!n.byYearDay.some(a=>(a>0?a:i+a+1)===r.dayOfYear))return!1}if(t&&t.length>0&&!t.some(i=>i.wd===r.dayOfWeek))return!1}return!(n.byHour&&!n.byHour.includes(r.hour)||n.byMinute&&!n.byMinute.includes(r.minute)||n.bySecond&&!n.bySecond.includes(r.second))}function*pm(e){let n=e.start,t=e.interval??1,o=e.freq===\"hourly\"?{hours:t}:e.freq===\"minutely\"?{minutes:t}:{seconds:t},r=e.byWeekday?.map(Xu),i=n,a=0;for(;;){if(e.until!==void 0&&g(i,e.until)>0)return;if(hm(i,e,r))yield i,a=0;else if(++a>fm)throw new RangeError(\"temporals: sub-daily recurrence matched nothing for a very long span (likely an impossible rule)\");i=$t(i,o)}}function*ym(e){let n=e.start,t=Hu(n),o=e.byWeekday?.map(Xu),r=sm(e,t),i=0;for(;;){let a=im(e,t,o,r),s=[];for(let d of a)s.push(...um(n,d,e));s.sort((d,l)=>g(d,l));let c=new Set;s=s.filter(d=>{let l=Ht(d);return c.has(l)?!1:(c.add(l),!0)}),s=dm(s,e.bySetPos).sort((d,l)=>g(d,l));let u=!1;for(let d of s)g(d,n)<0||(yield d,u=!0);if(u)i=0;else if(++i>Ku)throw new RangeError(`temporals: recurrence produced no occurrences for ${Ku} consecutive periods (likely an impossible rule)`);r=cm(e,r)}}function*Tm(e,n){let t=n.start,o=new Set((n.exclude??[]).map(l=>Ht(l))),r=(n.include??[]).filter(l=>g(l,t)>=0).sort((l,m)=>g(l,m)),{until:i,count:a}=n,s=0,c=0,u,d=e.next();for(;;){let l=!d.done,m=s<r.length;if(!l&&!m)return;let f,p;if(l&&(!m||g(d.value,r[s])<=0)?(f=d.value,p=!0):(f=r[s],p=!1),i!==void 0&&g(f,i)>0)return;p?d=e.next():s++;let h=Ht(f);if(!(o.has(h)||h===u)&&(u=h,yield f,a!==void 0&&++c>=a))return}}function ed(e){mm(e);let n=sa.has(e.freq)?()=>pm(e):()=>ym(e);return new tt(()=>Tm(n(),e))}var gm={YEARLY:\"yearly\",MONTHLY:\"monthly\",WEEKLY:\"weekly\",DAILY:\"daily\",HOURLY:\"hourly\",MINUTELY:\"minutely\",SECONDLY:\"secondly\"};function Dm(e){let n=/^([+-]?\\d+)?(MO|TU|WE|TH|FR|SA|SU)$/.exec(e.trim());if(!n)throw new RangeError(`temporals: invalid BYDAY token \"${e}\"`);let t=n[2];return n[1]?{weekday:t,nth:Number(n[1])}:t}function cn(e){return e.split(\",\").map(n=>Number(n.trim()))}function bm(e,n){let t=e.replace(/^RRULE:/i,\"\"),o={start:n,freq:\"daily\"},r=!1;for(let i of t.split(\";\")){if(!i)continue;let a=i.indexOf(\"=\"),s=(a===-1?i:i.slice(0,a)).trim().toUpperCase(),c=a===-1?\"\":i.slice(a+1).trim();switch(s){case\"FREQ\":{let u=gm[c.toUpperCase()];if(!u)throw new RangeError(`temporals: unsupported FREQ \"${c}\"`);o.freq=u,r=!0;break}case\"INTERVAL\":o.interval=Number(c);break;case\"COUNT\":o.count=Number(c);break;case\"UNTIL\":{if(n==null)throw new RangeError(\"temporals: RRULE has UNTIL but no DTSTART was provided\");if(z(n)===\"zoneddatetime\"){let u=n,d=u.toInstant().constructor;o.until=d.from(c).toZonedDateTimeISO(u.timeZoneId)}else{let u=n.constructor;o.until=u.from(c)}break}case\"BYMONTH\":o.byMonth=cn(c);break;case\"BYWEEKNO\":o.byWeekNo=cn(c);break;case\"BYYEARDAY\":o.byYearDay=cn(c);break;case\"BYMONTHDAY\":o.byMonthDay=cn(c);break;case\"BYDAY\":o.byWeekday=c.split(\",\").map(Dm);break;case\"BYHOUR\":o.byHour=cn(c);break;case\"BYMINUTE\":o.byMinute=cn(c);break;case\"BYSECOND\":o.bySecond=cn(c);break;case\"BYSETPOS\":o.bySetPos=cn(c);break;case\"WKST\":o.weekStart=c.toUpperCase();break;default:throw new RangeError(`temporals: unsupported RRULE part \"${s}\"`)}}if(!r)throw new RangeError(\"temporals: RRULE is missing FREQ\");return o}function ua(e,n){return ed(bm(e,n))}ed.fromString=ua;var od=globalThis.Temporal;Lu(od??Au);var Kt=()=>he(),vm=od?\"native\":\"temporal-polyfill\",nd=[\"MO\",\"TU\",\"WE\",\"TH\",\"FR\",\"SA\",\"SU\"];function da(e){if(typeof e==\"number\"&&Number.isInteger(e)&&e>=1&&e<=7)return nd[e-1];let n=String(e??\"\").trim().slice(0,2).toUpperCase(),t=nd.find(o=>o===n);if(!t)throw new RangeError(`not a weekday: ${JSON.stringify(e)} (use MO-SU, or 1-7 with 1 for Monday)`);return t}var td={easter:()=>[Jt(0)],\"good-friday\":()=>[Jt(-2)],\"easter-monday\":()=>[Jt(1)]};function rd(e){if(typeof e==\"string\"){let n=e.trim().toLowerCase();if(n===\"us-federal\")return Im();if(td[n])return td[n]();let t=/^(\\d{4})-(\\d{2})-(\\d{2})$/.exec(n);if(t){let o=Kt().PlainDate.from(n);return[r=>r===o.year?o:null]}if(t=/^(\\d{1,2})-(\\d{1,2})$/.exec(n),t)return[sn(Number(t[1]),Number(t[2]))];throw new RangeError(`not a holiday: ${JSON.stringify(e)} (use us-federal, easter, good-friday, easter-monday, a date like 2026-12-24, a month and day like 12-25, or an object)`)}if(e&&typeof e==\"object\"){if(\"easter\"in e)return[Jt(Number(e.easter)||0)];if(\"weekday\"in e)return[an(Number(e.month),da(e.weekday),Number(e.nth))];if(\"day\"in e)return[sn(Number(e.month),Number(e.day),{observed:e.observed??!1})]}throw new RangeError(`not a holiday: ${JSON.stringify(e)}`)}function Im(){let e=Vu();return Array.from({length:11},(n,t)=>o=>e.inYear(o)[t]??null)}function id(e={}){let n=(e.weekend??[\"SA\",\"SU\"]).map(da),t=(e.holidays??[]).flatMap(rd);return new Vt({weekend:n,holidays:t.length?zt.of(...t):void 0})}function wm(e={}){let n=(Array.isArray(e.windows)&&e.windows.length?e.windows:[[\"09:00\",\"17:00\"]]).map(t=>{if(!Array.isArray(t)||t.length!==2)throw new RangeError(`a window is [open, close], like [\"09:00\", \"17:00\"]: ${JSON.stringify(t)}`);return[String(t[0]),String(t[1])]});return new _t({windows:n,calendar:id(e)})}function ad(e,n){let t=Kt(),o=String(n||\"UTC\");if(typeof e==\"number\")return t.Instant.fromEpochMilliseconds(e).toZonedDateTimeISO(o);let r=String(e??\"\").trim();if(!r)throw new RangeError(\"no time given\");return r.includes(\"[\")?t.ZonedDateTime.from(r).withTimeZone(o):/(?:Z|[+-]\\d{2}(?::?\\d{2})?)$/i.test(r)&&r.includes(\"T\")?t.Instant.from(r).toZonedDateTimeISO(o):t.PlainDateTime.from(r).toZonedDateTime(o)}function Mm(e,n=\"UTC\"){let t=String(e??\"\").trim();return/^\\d{4}-\\d{2}-\\d{2}$/.test(t)?Kt().PlainDate.from(t):ad(e,n).toPlainDate()}function la(e){let n=Kt();if(typeof e==\"number\"){if(!Number.isFinite(e))throw new RangeError(`not a duration: ${e}`);return n.Duration.from({milliseconds:Math.trunc(e)}).round({largestUnit:\"day\",smallestUnit:\"millisecond\"})}let t=String(e??\"\").trim();return/^-?\\d+(?:\\.\\d+)?$/.test(t)?la(Number(t)):/^-?P/i.test(t)?n.Duration.from(t.toUpperCase()):aa(t)}function Sm(e){if(e.years||e.months||e.weeks)throw new RangeError(`years, months and weeks have no fixed length: ${e.toString()}`);return e.total({unit:\"millisecond\"})}function Pm(e,n={}){let t=la(e);return!t.years&&!t.months&&!t.weeks&&(t=t.round({largestUnit:n.largestUnit||\"day\",smallestUnit:\"millisecond\"})),ia(t,n)}var Nm=e=>e.toString({smallestUnit:\"second\"});var Om=()=>Kt();return md(km);})();\nreturn temporals;\n}\n"
173
+ }
174
+ ]
175
+ },
176
+ "tests": [
177
+ {
178
+ "name": "open on a weekday afternoon, until five",
179
+ "inputs": {
180
+ "at": "2026-10-21T15:30:00Z",
181
+ "zone": "UTC",
182
+ "windows": [
183
+ [
184
+ "09:00",
185
+ "17:00"
186
+ ]
187
+ ],
188
+ "weekend": [
189
+ "SA",
190
+ "SU"
191
+ ],
192
+ "holidays": []
193
+ },
194
+ "expect": {
195
+ "result.open": true,
196
+ "result.closesAt": "2026-10-21T17:00:00+00:00[UTC]",
197
+ "result.wait": 0,
198
+ "result.summary": "open until Wed 2026-10-21 17:00 (1 hour, 30 minutes left)"
199
+ }
200
+ },
201
+ {
202
+ "name": "closed on Friday evening: opens Monday at nine",
203
+ "inputs": {
204
+ "at": "2026-10-23T18:00:00Z",
205
+ "zone": "UTC",
206
+ "windows": [
207
+ [
208
+ "09:00",
209
+ "17:00"
210
+ ]
211
+ ],
212
+ "weekend": [
213
+ "SA",
214
+ "SU"
215
+ ],
216
+ "holidays": []
217
+ },
218
+ "expect": {
219
+ "result.open": false,
220
+ "result.closesAt": null,
221
+ "result.nextOpen": "2026-10-26T09:00:00+00:00[UTC]",
222
+ "result.wait": 226800000,
223
+ "result.waitWords": "2 days, 15 hours"
224
+ }
225
+ },
226
+ {
227
+ "name": "Thanksgiving is a US federal holiday: closed until Friday, in New York time",
228
+ "inputs": {
229
+ "at": "2026-11-26T15:00:00Z",
230
+ "zone": "America/New_York",
231
+ "windows": [
232
+ [
233
+ "09:00",
234
+ "17:00"
235
+ ]
236
+ ],
237
+ "weekend": [
238
+ "SA",
239
+ "SU"
240
+ ],
241
+ "holidays": [
242
+ "us-federal"
243
+ ]
244
+ },
245
+ "expect": {
246
+ "result.open": false,
247
+ "result.nextOpen": "2026-11-27T09:00:00-05:00[America/New_York]",
248
+ "result.summary": "closed; opens Fri 2026-11-27 09:00 (in 23 hours)"
249
+ }
250
+ },
251
+ {
252
+ "name": "an overnight window crosses midnight",
253
+ "inputs": {
254
+ "at": "2026-10-21T02:00:00Z",
255
+ "zone": "UTC",
256
+ "windows": [
257
+ [
258
+ "22:00",
259
+ "06:00"
260
+ ]
261
+ ],
262
+ "weekend": [],
263
+ "holidays": []
264
+ },
265
+ "expect": {
266
+ "result.open": true,
267
+ "result.closesAt": "2026-10-21T06:00:00+00:00[UTC]"
268
+ }
269
+ }
270
+ ],
271
+ "hosts": []
272
+ },
273
+ {
274
+ "id": "business-time",
275
+ "title": "Business time between",
276
+ "description": "The working time between two moments under a schedule (windows, a weekend, holidays), in milliseconds, hours and words, and how many working days the stretch touches. Friday 15:00 to Monday 11:00 on a 09:00 to 17:00 week is 4 hours.",
277
+ "icon": "<svg viewBox=\"0 0 16 16\"><path d=\"M2 12.5h12M3.5 12.5V7M6.5 12.5V4.5M9.5 12.5V7M12.5 12.5V9\" stroke=\"currentColor\" fill=\"none\" stroke-width=\"1.2\"/></svg>",
278
+ "canvas": {
279
+ "format": "viaframe-canvas",
280
+ "version": 3,
281
+ "name": "business-time",
282
+ "panes": [
283
+ {
284
+ "id": "i_start",
285
+ "type": "input",
286
+ "name": "start",
287
+ "rect": {
288
+ "x": 0,
289
+ "y": 0,
290
+ "width": 260
291
+ },
292
+ "inputs": [],
293
+ "widget": {
294
+ "kind": "text",
295
+ "value": "2026-12-23T15:00:00-05:00"
296
+ },
297
+ "control": {
298
+ "group": "Between",
299
+ "help": "An ISO time with an offset or Z, one with a [zone], or a wall-clock time read in `zone`."
300
+ }
301
+ },
302
+ {
303
+ "id": "i_end",
304
+ "type": "input",
305
+ "name": "end",
306
+ "rect": {
307
+ "x": 0,
308
+ "y": 150,
309
+ "width": 260
310
+ },
311
+ "inputs": [],
312
+ "widget": {
313
+ "kind": "text",
314
+ "value": "2026-12-29T11:00:00-05:00"
315
+ },
316
+ "control": {
317
+ "group": "Between"
318
+ }
319
+ },
320
+ {
321
+ "id": "i_zone",
322
+ "type": "input",
323
+ "name": "zone",
324
+ "rect": {
325
+ "x": 0,
326
+ "y": 300,
327
+ "width": 260
328
+ },
329
+ "inputs": [],
330
+ "widget": {
331
+ "kind": "text",
332
+ "value": "America/New_York"
333
+ },
334
+ "control": {
335
+ "group": "Schedule",
336
+ "help": "The IANA time zone the working hours are read in."
337
+ }
338
+ },
339
+ {
340
+ "id": "i_windows",
341
+ "type": "input",
342
+ "name": "windows",
343
+ "rect": {
344
+ "x": 0,
345
+ "y": 450,
346
+ "width": 260
347
+ },
348
+ "inputs": [],
349
+ "widget": {
350
+ "kind": "json",
351
+ "value": "[[\"09:00\",\"17:00\"]]"
352
+ },
353
+ "valueType": "array",
354
+ "control": {
355
+ "group": "Schedule",
356
+ "help": "Working windows as [open, close] wall-clock times, read in `zone`. A window that ends before it starts crosses midnight ([\"22:00\", \"06:00\"])."
357
+ }
358
+ },
359
+ {
360
+ "id": "i_weekend",
361
+ "type": "input",
362
+ "name": "weekend",
363
+ "rect": {
364
+ "x": 0,
365
+ "y": 600,
366
+ "width": 260
367
+ },
368
+ "inputs": [],
369
+ "widget": {
370
+ "kind": "json",
371
+ "value": "[\"SA\",\"SU\"]"
372
+ },
373
+ "valueType": "array",
374
+ "control": {
375
+ "group": "Schedule",
376
+ "help": "The days that are never working days: MO TU WE TH FR SA SU (or 1-7, 1 is Monday).",
377
+ "advanced": true
378
+ }
379
+ },
380
+ {
381
+ "id": "i_holidays",
382
+ "type": "input",
383
+ "name": "holidays",
384
+ "rect": {
385
+ "x": 0,
386
+ "y": 750,
387
+ "width": 260
388
+ },
389
+ "inputs": [],
390
+ "widget": {
391
+ "kind": "json",
392
+ "value": "[\"us-federal\"]"
393
+ },
394
+ "valueType": "array",
395
+ "control": {
396
+ "group": "Schedule",
397
+ "help": "Days off: us-federal (the 11 US federal holidays, weekend-observed), easter, good-friday, easter-monday, a date (2026-12-24), a month and day every year (12-25), or { month, day, observed }, { month, weekday, nth } ({ month: 11, weekday: \"TH\", nth: 4 }), { easter: offset }."
398
+ }
399
+ },
400
+ {
401
+ "id": "result",
402
+ "type": "eval",
403
+ "name": "result",
404
+ "rect": {
405
+ "x": 340,
406
+ "y": 0,
407
+ "width": 380
408
+ },
409
+ "inputs": [
410
+ {
411
+ "name": "start",
412
+ "source": "i_start"
413
+ },
414
+ {
415
+ "name": "end",
416
+ "source": "i_end"
417
+ },
418
+ {
419
+ "name": "zone",
420
+ "source": "i_zone"
421
+ },
422
+ {
423
+ "name": "windows",
424
+ "source": "i_windows"
425
+ },
426
+ {
427
+ "name": "weekend",
428
+ "source": "i_weekend"
429
+ },
430
+ {
431
+ "name": "holidays",
432
+ "source": "i_holidays"
433
+ }
434
+ ],
435
+ "autorun": true,
436
+ "mode": "function",
437
+ "outputs": [
438
+ {
439
+ "name": "ms"
440
+ },
441
+ {
442
+ "name": "hours"
443
+ },
444
+ {
445
+ "name": "words"
446
+ },
447
+ {
448
+ "name": "businessDays"
449
+ },
450
+ {
451
+ "name": "summary"
452
+ }
453
+ ],
454
+ "code": "const T = temporalsLibrary();\nconst hours = T.workingHours({ windows, weekend, holidays });\nconst from = T.zoned(start, zone);\nconst to = T.zoned(end, zone);\nif (T.Temporal().ZonedDateTime.compare(from, to) > 0) throw new RangeError(\"start is after end\");\nconst ms = T.durationMs(T.businessDuration(from, to, hours));\nconst calendar = T.businessCalendar({ weekend, holidays });\n// Working days whose date is in [start's date, end's date].\nconst businessDays = calendar.businessDaysBetween(from.toPlainDate(), to.toPlainDate().add({ days: 1 }));\nconst words = T.words(ms, { largestUnit: \"hour\" });\nreturn { ms, hours: ms / 3600000, words, businessDays, summary: words + \" of working time over \" + businessDays + \" working day\" + (businessDays === 1 ? \"\" : \"s\") };\n\n// @johnhenry/temporals 0.3.0 and temporal-polyfill 1.0.1 (both MIT), bundled from viaframe/src/lib.ts by viaframe/scripts/build.mjs\n// in github.com/johnhenry/temporals. A pane package can't import a module or share code between\n// its panes, so each pane carries this copy; it uses the runtime's own Temporal when there is one.\nfunction temporalsLibrary() {\n\"use strict\";var temporals=(()=>{var zo=Object.defineProperty;var sd=Object.getOwnPropertyDescriptor;var cd=Object.getOwnPropertyNames;var ud=Object.prototype.hasOwnProperty;var dd=(e,n)=>{for(var t in n)zo(e,t,{get:n[t],enumerable:!0})},ld=(e,n,t,o)=>{if(n&&typeof n==\"object\"||typeof n==\"function\")for(let r of cd(n))!ud.call(e,r)&&r!==t&&zo(e,r,{get:()=>n[r],enumerable:!(o=sd(n,r))||o.enumerable});return e};var md=e=>ld(zo({},\"__esModule\",{value:!0}),e);var km={};dd(km,{BusinessCalendar:()=>Vt,Temporal:()=>Om,WorkingHours:()=>_t,businessCalendar:()=>id,businessDuration:()=>_u,duration:()=>la,durationMs:()=>Sm,formatRelative:()=>Ju,holidayRules:()=>rd,humanizeDuration:()=>ia,iso:()=>Nm,parseDuration:()=>aa,plainDate:()=>Mm,recurFromString:()=>ua,temporalSource:()=>vm,weekdayCode:()=>da,words:()=>Pm,workingHours:()=>wm,zoned:()=>ad});var Vo=globalThis.Temporal;var ma=(e,n)=>`Non-positive ${e}: ${n}`,fa=(e,n)=>`Non-finite ${e}: ${n}`,ha=e=>`Cannot convert bigint to ${e}`,pa=\"Invalid object\",ot=(e,n,t,o)=>un(e,n)+`; must be between ${t}-${o}`,un=(e,n)=>`Invalid ${e}: ${n}`;var _o=1e3,Jo=1e6,Ko=1e9,Qo=6e10,Xo=36e11;function ie(e){return e===void 0?Object.create(null):dn(e)}function Qt(e,n=\"number\"){if(typeof e==\"bigint\")throw new TypeError(ha(n));if(e=Number(e),!Number.isFinite(e))throw new RangeError(fa(n,e));return e}function U(e,n){return Math.trunc(Qt(e,n))||0}function Xt(e,n){return ya(U(e,n),n)}function ya(e,n=\"number\"){if(e<=0)throw new RangeError(ma(n,e));return e}function er(e,n,t){return Math.min(Math.max(e,n),t)}function Nn(e){return e!==null&&(typeof e==\"object\"||typeof e==\"function\")}function dn(e){if(!Nn(e))throw new TypeError(pa);return e}var so=un;var dt=e=>`Missing ${e}`,Pa=e=>\"No valid fields: \"+e.join(),Na=\"Invalid bag\",Oa=(e,n,t)=>un(e,n)+\"; must be \"+Object.keys(t).join(),ka=\"Cannot use valueOf\",Ea=\"Invalid calling context\",co=e=>\"Missing year\"+(e?\"/era/eraYear\":\"\"),mn=\"Invalid leap month\",xa=e=>un(\"Calendar\",e),Za=(e,n)=>`Unknown calendar ${e}; might need ${n}`,pr=e=>un(\"TimeZone\",e),$e=\"Out-of-bounds date\";var Fa=e=>`Cannot parse: ${e}`,Ze=e=>`Invalid substring: ${e}`;var yr=er,ee=Nn;function T(e){throw new RangeError(e)}function S(e){throw new TypeError(e)}function rr(e,n,t,o,r){return we(n,((i,a)=>{let s=i[a];return s===void 0&&S(dt(a)),s})(e,n),t,o,r)}function we(e,n,t,o,r,i){let a=yr(n,t,o);return r&&n!==a&&T(((s,c,u,d,l)=>l?ot(s,l[c],l[u],l[d]):ot(s,c,u,d))(e,n,t,o,i)),a}function En(e,n=Map){let t=new n;return(o,...r)=>{if(t.has(o))return t.get(o);let i=e(o,...r);return t.set(o,i),i}}var Ra=e=>uo({name:e},1),uo=(e,n)=>Ve(t=>({value:t,configurable:1,writable:!n}),e),lt=e=>({[Symbol.toStringTag]:{value:e,configurable:1}});function Ve(e,n){let t={};for(let o in n)t[o]=e(n[o],o);return t}function mt(e,n){let t={};for(let o of e)t[o]=n;return t}function lo(e){let n={};for(let t of e)n[t]=o=>o[t];return n}function Me(e,n,t=Object.create(null)){for(let o of e)t[o]=n[o];return t}function Ca(e,n,t){for(let o of e)if(n[o]!==t[o])return 0;return 1}function Td(e,n,t){let o={...t};for(let r=0;r<n;r++)o[e[r]]=0;return o}function C(e,...n){return(...t)=>e(...n,...t)}function Tr(){}function Ta(e){return e[0].toUpperCase()+e.substring(1)}function A(...e){return[].concat(...e).sort()}function Rn(e){return new RegExp(`^${e}$`,\"i\")}function gr(e){return parseInt(e.padEnd(9,\"0\"))}function Dr(e){return e&&e!==\"+\"?-1:1}function On(e){return e===void 0?0:parseInt(e)}function oo(e,n){return String(n).padStart(e,\"0\")}var pe=C(oo,2);function Fe(e,n){return Math.sign(e-n)}function x(e,n){return e<n?-1:e>n?1:0}function Ya(e,n){let t=e/n;return e%n<0n?t-1n:t}function br(e,n){let t=Ya(e,n);return[t,e-t*n]}function ve(e,n){return[Math.floor(e/n),mo(e,n)]}function mo(e,n){return(e%n+n)%n}function Cn(e,n){return Math.trunc(e/n)||0}function vr(e,n){return e%n||0}function Ba(e,n=1){return n*(.5+e/5)}function eo(e){return Math.abs(e%1)===.5}var Ir=\"iso8601\",Wa=\"gregory\",gd={bce:-1,ce:0};function Aa(e){let n=e.normalize(\"NFD\").toLowerCase().replace(/[^a-z0-9]/g,\"\");return n===\"bc\"||n===\"b\"?\"bce\":n===\"ad\"||n===\"a\"?\"ce\":n}var se=void 0,Ua=0;function ye(e){return e===se?\"iso8601\":e===0?\"gregory\":e.id}var Dd=/^M(\\d{2})(L?)$/;function La(e){let n=Dd.exec(e);return n||T((t=>`Invalid monthCode: ${t}`)(e)),[parseInt(n[1]),!!n[2]]}function qa(e,n){return\"M\"+pe(e)+(n?\"L\":\"\")}function ir(e,n,t){return e+(n||t&&e>=t?1:0)}var ar={nanosecond:0,microsecond:1,millisecond:2,second:3,minute:4,hour:5,day:6,week:7,month:8,year:9},wr=Object.keys(ar);var ft=_o,ht=Jo,_e=Ko,pt=Qo,yt=Xo,Ye=864e11,Te=[1,ft,ht,_e,pt,yt,Ye],bd=BigInt(ft),Yn=BigInt(ht),hn=BigInt(_e),vd=BigInt(pt),Id=BigInt(yt),O=BigInt(Ye);function ja(e,n){let t=Number(e/O),o=Number(e%O);return t*(Ye/n)+(Math.trunc(o/n)+o%n/n)}var _=wr.slice(0,6),Tt=lo(_),fo=[\"year\"],Tn=[\"day\"],Mr=[\"day\",\"month\",\"year\"],ho=[\"offset\"],Sr=[\"timeZone\"],Bn=[\"era\",\"eraYear\"],wd=[\"era\",\"eraYear\",\"year\"],$a=[\"month\",\"monthCode\"],Md=[\"day\",\"month\",\"monthCode\"],sr=A(_),Sd=A(Bn,fo),gt=A($a,fo),Ha=A(Bn,gt),Dt=A([\"monthCode\"],fo),Ga=A(Bn,Dt),za=A(Tn,[\"monthCode\"]),gn=A(Tn,gt),Dn=A(Tn,Bn,gt),Va=A(gn,_),_a=A(Dn,_),Pd=A(gn,_,ho),Nd=A(Dn,_,ho),Ja=A(gn,_,ho,Sr),Ka=A(Dn,_,ho,Sr),Od=A(Tn,Dt),kd=A(Tn,Bn,Dt),ce=mt(_,0);function bt(e){return po(e,1),e}var Ed={hour:23,minute:59,second:59};function po(e,n){let t={};for(let o of _)t[o]=we(o,e[o],0,Ed[o]||999,n);return t}function oe(e){return Nr(e)*_e+Qa(e)}function Pr(e){return 1e3*Nr(e)+e.millisecond}function Nr(e){return 3600*e.hour+60*e.minute+e.second}function Qa(e){return e.millisecond*ht+e.microsecond*ft+e.nanosecond}function Or(e){let[n,t]=ve(e,Ye);return[Xa(t),n]}function Xa(e){let[n,t]=ve(e,ht),[o,r]=ve(t,ft);return xd(n,o,r)}function xd(e,n=0,t=0){let[o,r]=ve(e,36e5),[i,a]=ve(r,6e4),[s,c]=ve(a,1e3);return{hour:o,minute:i,second:s,millisecond:c,microsecond:n,nanosecond:t}}function ga(e){let[n,t]=br(e,hn);return[Number(n),Number(t)]}function Ie(e){return fn(e)+BigInt(oe(e))}function es(e){return vt(e)+Pr(e)}function fn(e){return BigInt(Se(e))*O}function vt(e){return 864e5*Se(e)}function Se(e){return rt(e.year,e.month,e.day)}function rt(e,n=1,t=1){let o=n-1;return e+=Math.floor(o/12),n=mo(o,12),Date.UTC(e%400-400,n,0)/864e5+146097*(Cn(e,400)+1)+t}function It(e){let[n,t]=br(e,O);return{...ns(Number(n)),...Xa(Number(t))}}function ns(e){let n=new Date(864e5*mo(e,146097));return{year:n.getUTCFullYear()+400*Math.floor(e/146097),month:n.getUTCMonth()+1,day:n.getUTCDate()}}var ts=1972;function Zd(e){return[e,0]}function cr(e,n){if(!n)return{year:1972,month:e}}function Fd(e,n,t){return{year:e,month:n,day:t}}function os(e,n){switch(n){case 2:return yo(e)?29:28;case 4:case 6:case 9:case 11:return 30}return 31}function Rd(e){return yo(e)?366:365}function yo(e){return e%4==0&&(e%100!=0||e%400==0)}function rs(e,n,t){return e+=Cn(t,12),(n+=vr(t,12))<1?(e--,n+=12):n>12&&(e++,n-=12),{year:e,month:n}}function Cd(e,n,t,o){return 12*(t-e)+o-n}function To(e){return mo(rt(e.year,e.month,e.day)+4,7)||7}function is(e){return rt(e.year,e.month,e.day)-rt(e.year)+1}function as(e){let n=e.year,t=Math.floor((is(e)-To(e)+10)/7),o=nr(n);return t<1?t=o=nr(--n):t>o&&(t=1,o=nr(++n)),{weekOfYear:t,yearOfWeek:n,Ie:o}}function nr(e){let n=To({year:e,month:1,day:1});return n===4||n===3&&yo(e)?53:52}function Yd({year:e}){return e<1?{era:\"bce\",eraYear:1-e}:{era:\"ce\",eraYear:e}}function wt(e){return Be(e),bt(e)}function Be(e){return ss(e,1),e}function Da(e){return Ca(Mr,e,ss(e))}function ss(e,n){let{year:t}=e,o=rr(e,\"month\",1,12,n);return{year:t,month:o,day:rr(e,\"day\",1,os(t,o),n)}}function P(e,n){return e?e.ie(n):n}function pn(e,n,t){return e?e.O(n,t):Zd(t)}function Mt(e,n){return e===0?Yd(n):e?e.h(n):{}}function yn(e,n,t,o){return e?e.je(n,t,o):Fd(n,t,o)}function it(e,n){return e?e.k(n):12}function at(e,n,t){return e?e.p(n,t):os(n,t)}function go(e,n){let{year:t,month:o}=P(e,n),[r,i]=pn(e,t,o);return qa(r,i)}function kr(e,n){let{year:t}=P(e,n);return e?e.u(t):yo(t)}function Er(e,n){let{year:t}=P(e,n);return it(e,t)}function xr(e,n){let{year:t,month:o}=P(e,n);return at(e,t,o)}function Zr(e,n){let{year:t}=P(e,n);return e?e.j(t):Rd(t)}function cs(e,n){if(!e)return is(n);let{year:t}=P(e,n),o=yn(e,t,1,1);return Se(n)-Se(o)+1}function us(e,n){return e===se?as(n).weekOfYear:void 0}function ds(e,n){return e===se?as(n).yearOfWeek:void 0}var k=wr.map(e=>e+\"s\"),Fr=lo(k),ls=A(k),Bd=k.slice(0,6),ms=k.slice(6),Wd=ms.slice(1),Ad=k.reduce((e,n,t)=>(e[n]=t,e),{}),R=mt(k,0),Rr=mt(Bd,0),Cr=C(Td,k);function fs(e,n){return n==null&&T(dt(e)),n}var $=C(Ud,\"string\");function Ud(e,n,t=e){return typeof n!==e&&S(so(t,n)),n}function Yr(e,n=\"number\"){return Number.isInteger(e)||T(((t,o)=>`Non-integer ${t}: ${o}`)(n,e)),e||0}function Br(e){return typeof e==\"symbol\"&&S(\"Cannot convert Symbol to string\"),String(e)}function Wr(e,n){return Nn(e)?String(e):$(e,n)}function Do(e){return typeof e==\"boolean\"?BigInt(e?1:0):typeof e==\"string\"?BigInt(e):(typeof e!=\"bigint\"&&S(`Invalid bigint: ${e}`),e)}function bo(e,n){return Yr(Qt(e,n),n)}function vo(e,n){return typeof e==\"string\"?((t,o)=>{let r=Object.create(null);return r[t]=o,r})(n,e):dn(e)}var Re=\"smallestUnit\";var Ld={constrain:0,reject:1},qd={compatible:0,reject:1,earlier:2,later:3},jd={reject:0,use:1,prefer:2,ignore:3},$d={auto:0,never:1,critical:2,always:3},Hd={auto:0,never:1,critical:2},Gd={auto:0,never:1},zd={floor:0,halfFloor:1,ceil:2,halfCeil:3,trunc:4,halfTrunc:5,expand:6,halfExpand:7,halfEven:8},Vd=[Math.floor,e=>eo(e)?Math.floor(e):Math.round(e),Math.ceil,e=>eo(e)?Math.ceil(e):Math.round(e),Math.trunc,e=>eo(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=>eo(e)?(e=Math.trunc(e)||0)+e%2:Math.round(e)],_d={previous:-1,next:1};function Ar(e){let n=e.roundingIncrement;return n===void 0?1:U(n,\"roundingIncrement\")}function Ur(e){let n=e.fractionalSecondDigits;if(n!==void 0){if(typeof n!=\"number\"){if(Br(n)===\"auto\")return;T(so(\"fractionalSecondDigits\",n))}n=we(\"fractionalSecondDigits\",Math.floor(n),0,9,1)}return n}function Lr(e,n,t=0,o){let r=n[e];if(r===void 0)return o?t:void 0;if(r=Br(r),r===\"auto\")return o?t:null;let i=ar[r];return i===void 0&&(i=Ad[r]),i===void 0&&T(Oa(e,r,ar)),i}function Je(e,n,t,o=0){let r=t[e];if(r===void 0)return o;let i=Br(r),a=n[i];return a===void 0&&T(Oa(e,i,n)),a}var Wn=C(Lr,Re),hs=C(Lr,\"largestUnit\"),Jd=C(Lr,\"unit\"),ps=C(Je,\"overflow\",Ld),ys=C(Je,\"disambiguation\",qd),Kd=C(Je,\"offset\",jd),qr=C(Je,\"calendarName\",$d),Qd=C(Je,\"timeZoneName\",Hd),Xd=C(Je,\"offset\",Gd),An=C(Je,\"roundingMode\",zd),el=C(Je,\"direction\",_d);function jr(e,n,t,o){let r=o?Ye:Te[n+1];if(r){let i=Te[n];r%((e=we(\"roundingIncrement\",e,1,r/i-(o?0:1),1))*i)&&T(so(\"roundingIncrement\",e))}else e=we(\"roundingIncrement\",e,1,t?10**9:1,1);return e}function xn(e,n,t,o){return n!=null&&we(e,n,t,o,1,wr),n}function Ts(e,n){n>e&&T(\"smallestUnit > largestUnit\")}function Un(e,n,t,o=9,r=0,i=4){n=ie(n);let a=hs(n,r),s=Ar(n),c=An(n,i),u=Wn(n,r,1);return a=xn(\"largestUnit\",a,r,o),u=xn(Re,u,r,o),a==null?a=Math.max(t,u):Ts(a,u),s=jr(s,u,1),e&&(c=(d=>d<4?(d+2)%4:d)(c)),[a,u,s,c]}function St(e,n=6,t){let o=Ar(e=vo(e,Re)),r=An(e,7),i=Wn(e);return i=fs(Re,i),i=xn(Re,i,0,n),o=jr(o,i,void 0,t),[i,o,r]}function E(e,n){return Me(Mr,e,Me(_,n))}function w(e){return e===void 0?0:ps(dn(e))}function Zn(e,n=0){e=ie(e);let t=ys(e),o=Kd(e,n);return[ps(e),o,t]}var gs=BigInt(1e8)*O,$r=BigInt(-1e8)*O,Ds=$r-O,bs=-3261848;function Io(e){let n=12*e.year+e.month;return(n<bs||n>3309129)&&T($e),e}function X(e,n=1){return vs(fn(e),n),e}function bn(e){let n=fn(e);return vs(n),n!==Ds||oe(e)||T($e),e}function vs(e,n=1){(e<(n?Ds:$r)||e>gs)&&T($e)}function ge(e){return(e<$r||e>gs)&&T($e),e}function Hr(e,n){return ge(fn(e)+BigInt(oe(e)-n))}function ue(e){return{epochNanoseconds:e}}function De(e,n,t){return{calendar:t,timeZone:n,epochNanoseconds:e}}function Pe(e,n){return Me(_,e,N(e,n))}function N(e,n){return Me(Mr,e,{calendar:n})}function vn(e){return Me(_,e)}function B(e){return Me(k,e,{sign:xo(e)})}function Pt(e){return n=e.epochNanoseconds,Number(Ya(n,Yn));var n}function Nt(e){return e.epochNanoseconds}function Is(e,n,t){let o=ze(n),[r,i]=((u,d)=>{let l=d((u=vo(u,\"unit\")).relativeTo),m=Jd(u);return m=fs(\"unit\",m),[m,l]})(t,e);if(!i&&kn(Math.max(r,o),i))return ba(n,r);if(i||T(\"Missing relativeTo\"),!n.sign&&kn(r,i))return 0;let a=Eo(i),s=a.G(a.i,n);Cs(a,s);let c=a.re(a.i,s,r);return kn(r,i)?ba(c,r):nl(c,a.V(s),r,a)}function nl(e,n,t,o){let r=xo(e)||1,i=Gr(Cr(t,e),t,r,o,n),a=i.ae,s=i.de,c=Number(s-a),u=Number(n-a);return i.ye[k[t]]+u/c*r}function ba(e,n){return ja(Ce(e),Te[n])}function Gr(e,n,t,o,r){let i=k[n],a=e,s=0,c=va(a,i,t,o);return r&&!((u,d,l,m)=>m>0?x(d,u)<=0&&x(u,l)<=0:x(l,u)<=0&&x(u,d)<=0)(r,c.ae,c.de,Math.sign(t))&&(a={...e,[i]:e[i]+t},s=1,c=va(a,i,t,o)),{...c,ye:a,He:s}}function va(e,n,t,o){let r={...e,[n]:e[n]+t};return{ae:ct(o,e),de:ct(o,r),Ae:r}}function ws(e,n,t){let o=t-n,r=e-n;if(!r)return 0;let i=r<0n?-r:r,a=o<0n?-o:o,s=x(r,0n)===x(o,0n)?1:-1;return x(i,a)<=0?i===a?s:Ba(x(2n*i,a),s):Number(r)/Number(o)}function Ms(e,n,t,o){let{epochNanoseconds:r}=e,{timeZone:i,calendar:a}=e;if(n===0&&t===1)return{epochNanoseconds:r,timeZone:i,calendar:a};if(n===6){let s=E(W(e),ce),c=E(Ke(s,1),ce),u=He(i,s),d=He(i,c);r=zr(ws(r,u,d),o)?d:u}else{let s=W(e),c=s.offsetNanoseconds;r=qn(i,wo(s,Ln(n,t),o),c,2,0,1)}return{epochNanoseconds:r,timeZone:i,calendar:a}}function Ss(e){let{timeZone:n}=e,t=E(W(e),ce),o=E(Ke(t,1),ce),r=He(n,t);return ja(He(n,o)-r,yt)}function Ps(e){let{timeZone:n,calendar:t}=e;return De(He(n,E(W(e),ce)),n,t)}function wo(e,n,t){let[o,r]=Mo(e,n,t),i=E(Ke(e,r),o);return bn(i),i}function Mo(e,n,t){return Or(Fn(oe(e),n,t))}function ro(e){return Fn(e,pt,7)}function Ln(e,n){return Te[e]*n}function Ot(e,n){return BigInt(Te[e])*BigInt(n)}function tl(e,n,t){let o=Math.min(ze(e),6);return Ge(Po(Ce(e),BigInt(n),t),o)}function So(e,n,t,o,r,i,a){if(o===0&&r===1)return e;let s=xo(e)||1,c=kn(o,a.i)?Zt(a.i)&&o<6&&t>=6?rl:ol:il,[u,d,l]=c(s,e,n,t,o,r,i,a);return l&&o!==7&&(u=((m,f,p,h,y,b)=>{for(let v=h+1;v<=p;v++){if(v===7&&p!==7)continue;let D=Cr(v,m);D[k[v]]+=y;let I=x(f,ct(b,D));if(I&&I!==y)break;m=D}return m})(u,d,t,Math.max(6,o),s,a)),u}function Po(e,n,t){return Ns(e,n,t,e/n%2n)}function No(e,n,t){let[o,r]=br(e,O),i=o*O;return i+Ns(r,n,t,(i/n+r/n)%2n)}function Ns(e,n,t,o){let r=e/n,i=e%n,a=0;i&&(a=Ba(x(2n*(i<0n?-i:i),n),Math.sign(Number(i))));let s=zr(Number(o)+a,t);return(r-o+BigInt(s))*n}function Fn(e,n,t){return zr(e/n,t)*n}function zr(e,n){return Vd[n](e)}function ol(e,n,t,o,r,i,a){let s=Ce(n),c=Po(s,Ot(r,i),a),u=c-s,d=Math.sign(Number(c/O)-Number(s/O))===e,l=Ge(c,Math.min(o,6));return[{...n,...l},t+u,d]}function rl(e,n,t,o,r,i,a,s){let c=Number(In(n)),u=Ln(r,i),d=Fn(c,u,a),l=Gr({...n,...Rr},6,e,s,t),m=l.ae,f=l.de,p=d-Number(f-m),h=0;p&&Math.sign(p)!==e?t=m+BigInt(d):(h+=e,d=Fn(p,u,a),t=f+BigInt(d));let y=Zo(d);return[{...n,...y,days:n.days+h},t,!!h]}function il(e,n,t,o,r,i,a,s){let c=k[r],u=Cr(r,n);r===7&&(n={...n,weeks:n.weeks+Math.trunc(n.days/7)});let d=Cn(n[c],i)*i;u[c]=d;let l=Gr(u,r,i*e,s,t),m=l.ae,f=l.de,p=ws(t,m,f),h=l.ye[c],y=l.Ae[c],b=Fn(h+p*e*i,i,a),v=b===y;return u[c]=b,[u,v?f:m,l.He||v]}function Os(e,n){return e.timeZone.U(e.epochNanoseconds,(t=>{let o=vo(t,\"direction\"),r=el(o,0);return r||T(so(\"direction\",r)),r})(n))}var W=En(al,WeakMap);function al(e){let{epochNanoseconds:n,timeZone:t}=e,o=t.C(n);return{...It(n+BigInt(o)),offsetNanoseconds:o}}function qn(e,n,t,o=0,r=0,i,a){if(t!==void 0&&o===1&&(o===1||a))return Hr(n,t);o!==2&&o!==0||X(n,0);let s=e.R(n);if(t!==void 0&&o!==3){let c=((u,d,l,m)=>{let f=Ie(d);m&&(l=ro(l));for(let p of u){let h=Number(f-p);if(m&&(h=ro(h)),h===l)return p}})(s,n,t,i);if(c!==void 0)return c;o===0&&T(\"Invalid TimeZone offset\")}return a?Ie(n):kt(e,n,r,s)}function kt(e,n,t=0,o=e.R(n)){if(o.length===1)return o[0];if(t===1&&T(\"Ambiguous offset\"),o.length)return o[t===3?1:0];let r=Ie(n),i=((s,c)=>{let u=s.C(c-O);return(d=>(d>Ye&&T(\"Out-of-bounds TimeZone gap\"),d))(s.C(c+O)-u)})(e,r),a=It(r+BigInt(i*(t===2?-1:1)));return(o=e.R(a))[t===2?0:o.length-1]}function He(e,n){let t=e.R(n);if(t.length)return t[0];let o=Ie(n)-O;return e.U(o,1)}function Vr(e,n,t,o,r){let i=w(r);o.sign&&ze(o)<8&&T(\"Cannot use small units\");let a=X(st(n,t));return st(n,ks(n,a,e?H(o):o,i))}function _r(e,n){return ge(e+(Ls(t=n)&&T(\"Cannot use large units\"),In(t)));var t}function Et(e,n,t){let{calendar:o,epochNanoseconds:r,timeZone:i}=e,a=In(n),s=r;if(Ls(n)){let c=W(e);s=kt(i,E(jn(o,c,{...n,...Rr},t),c))+a}else s+=a,w(t);return{...e,epochNanoseconds:ge(s)}}function xt(e,n,t,o){let[r,i]=Oo(n,t),a=E(jn(e,n,{...t,...Rr,days:t.days+i},o),r);return bn(a),a}function jn(e,n,t,o){if(t.years||t.months||t.weeks)return ks(e,n,t,w(o));w(o);let r=t.days+Number(In(t)/O);return r?X(Ke(n,r)):n}function st(e,n){return Ke(n,1-P(e,n).day)}function Oo(e,n){let t=In(n),o=Number(t/O),r=Number(t%O),[i,a]=Or(oe(e)+r);return[i,o+a]}function Ke(e,n){return n?ns(Se(e)+n):e}function ks(e,n,t,o){let{years:r,months:i,weeks:a,days:s}=t,c;if(s+=Number(In(t)/O),r||i)c=ur(e,n,r,i,o);else{if(!a&&!s)return n;c=n}return(a||s)&&(c=Ke(c,7*a+s)),X(c)}function ur(e,n,t,o,r){let i=P(e,n),{year:a,month:s,day:c}=i;if(t){let[u,d]=pn(e,a,s);a+=t,s=dr(e,u,d,e?e.q(a):void 0,r),s=we(\"month\",s,1,it(e,a),r)}return o&&({year:a,month:s}=e?e.N(a,s,o):rs(a,s,o)),c=we(\"day\",c,1,at(e,a,s),r),yn(e,a,s,c)}function dr(e,n,t,o,r){if(t){let i=e?e.m:void 0;return o!==void 0&&(i<0||o===n+1)?o:(r===1&&T(mn),i<0?-i:n)}return ir(n,0,o)}function We(e,n){return ye(e)!==ye(n)&&T(\"Mismatching Calendars\"),e}function sl(e,n){return e.o!==n.o&&T(\"Mismatching TimeZones\"),e}function Es(e){return e.timeZone.id}function Jr(e,n,t,o){let[r,i,a,s]=Un(e,o,3,5),c=ko(n.epochNanoseconds,t.epochNanoseconds,r,i,a,s);return B(e?H(c):c)}function Kr(e,n,t,o,r){let[i,a,s,c]=Un(e,r,5),u=t.epochNanoseconds,d=o.epochNanoseconds,l;return x(d,u)?i<6?l=ko(u,d,i,a,s,c):(l=Zs(sl(t.timeZone,o.timeZone),n,t,o,i),l=So(l,d,i,a,s,c,oi(t,Nt,Et))):l=R,B(e?H(l):l)}function Qr(e,n,t,o,r){let[i,a,s,c]=Un(e,r,6),u=Ie(t),d=Ie(o),l=x(d,u),m;return l?i<=6?m=ko(u,d,i,a,s,c):(m=Fs(n,t,o,l,i),m=So(m,d,i,a,s,c,oi(t,Ie,C(xt,n)))):m=R,B(e?H(m):m)}function Xr(e,n,t,o,r){let[i,a,s,c]=Un(e,r,6,9,6);return xs(e,n,t,o,i,a,s,c)}function ei(e,n,t,o,r){let[i,a,s,c]=Un(e,r,9,9,8),u=st(n,t),d=st(n,o);return Rs(u,d)?xs(e,n,X(u),X(d),i,a,s,c,8):B(R)}function xs(e,n,t,o,r,i,a,s,c=6){let u=fn(t),d=fn(o),l;return x(d,u)?r===6?l=ko(u,d,r,i,a,s):(l=ti(n,t,o,r),i===c&&a===1||(l=So(l,d,r,i,a,s,oi(t,fn,C(jn,n))))):l=R,B(e?H(l):l)}function ni(e,n,t,o){let[r,i,a,s]=Un(e,o,5,5),c=Fn(oe(t)-oe(n),Ln(i,a),s),u={...R,...Zo(c,r)};return B(e?H(u):u)}function Zs(e,n,t,o,r){let i=x(o.epochNanoseconds,t.epochNanoseconds);if(!i)return R;if(r<6)return{...R,...Ge(o.epochNanoseconds-t.epochNanoseconds,r)};if(!Rs(W(t),W(o)))return{...R,...Ge(o.epochNanoseconds-t.epochNanoseconds,5)};let[a,s,c]=ul(e,t,o,i);return{...r===6?{...R,days:to(a,s)}:ti(n,a,s,r),...Zo(c)}}function cl(e,n,t,o){let r=Ie(n),i=Ie(t),a=x(i,r);return a?o<=6?{...R,...Ge(i-r,o)}:Fs(e,n,t,a,o):R}function Fs(e,n,t,o,r){let i=t,a=oe(t)-oe(n);return Math.sign(a)===-o&&(i=Ke(t,-o),a+=Ye*o),{...ti(e,n,i,r),...Zo(a)}}function ti(e,n,t,o){if(o<=7){let h=to(n,t);return o===7?{...R,weeks:Cn(h,7),days:vr(h,7)}:{...R,days:h}}let r=P(e,n),i=P(e,t);if(o===8){let{year:h,month:y,day:b}=r,{year:v,month:D,day:I}=i,F=Math.sign(Fe(v,h)||Fe(D,y)||to(n,t)),j=0,K=0;if(F){j=e?e.ne(h,y,v,D):Cd(h,y,v,D);let Q=ur(e,n,0,j,0);F*Fe(b,I)>0&&(j-=F,Q=ur(e,n,0,j,0)),K=to(Q,t)}return{...R,months:j,days:K}}let{year:a,month:s,day:c}=r,{year:u,month:d,day:l}=i,m=u-a,f=d-s,p=l-c;if(m||f){let h=Math.sign(m||f),y=at(e,u,d),b=0;if(Math.sign(l-c)===-h){let v=y;({year:u,month:d}=e?e.N(u,d,-h):rs(u,d,-h)),m=u-a,f=d-s,y=at(e,u,d),b=h<0?-v:y}if(p=l-Math.min(c,y)+b,m){let[v,D]=pn(e,a,s),[I,F]=pn(e,u,d),j=e?e.m:void 0;if(f=j!==void 0&&D&&!F&&(j<0?h>0&&I===-j:h<0&&I===v)?0:I-v||Number(F)-Number(D),Math.sign(f)===-h){let K=h<0&&-it(e,u);u-=h,m=u-a,f=d-dr(e,v,D,e?e.q(u):void 0,0)+(K||it(e,u))}else if(e){let K=dr(e,v,D,e.q(u),0);f=e.ne(u,K,u,d)}}}return{...R,years:m,months:f,days:p}}function Rs(e,n){return Fe(e.year,n.year)||Fe(e.month,n.month)||Fe(e.day,n.day)}function ul(e,n,t,o){let r=W(n),i=W(t),a=t.epochNanoseconds,s=0,c=oe(i)-oe(r);Math.sign(c)===-o&&s++;let u=s+(o>0?1:0);for(;s<=u;s++){let d=Ke(i,s*-o),l=kt(e,E(d,r));if(x(a,l)!==-o)return[r,d,Number(a-l)]}}function ko(e,n,t,o,r,i){return{...R,...Ge(Po(n-e,Ot(o,r),i),t)}}function to(e,n){return Se(n)-Se(e)}function oi(e,n,t){return{i:e,V:n,G:t}}function Eo(e){let{calendar:n}=e;if(Zt(e)){let{timeZone:t}=e;return{i:e,V:Nt,G:Et,re:C(Zs,t,n)}}return{i:Ys(e),V:Ie,G:C(xt,n),re:C(cl,n)}}function ct(e,n){return e.V(e.G(e.i,n))}function Zt(e){return\"timeZone\"in e}function Cs(e,n){Zt(e.i)||(Ia(e.i),Ia(n))}function Ys(e){return E(e,\"hour\"in e?e:ce)}function Ia(e){bn(Ys(e))}function kn(e,n){return e<=6-(n&&Zt(n)?1:0)}function ri(e,n,t){let o={};for(let r=n;r>=0;r--){let i=Te[r];o[t[r]]=Cn(e,i),e=vr(e,i)}return o}var dl=2**53;function ii(e,n,t,o,r){let i=e(ie(r).relativeTo),a=Math.max(ze(t),ze(o));if(kn(a,i))return ll(n,t,o,a);i||T(\"Missing relativeTo\"),n&&(o=H(o));let s=Eo(i),c=s.G(s.i,t),u=s.G(c,o);return B(s.re(s.i,u,a))}function ll(e,n,t,o){return B(Qe(((r,i,a,s)=>{let c=Ce(r)+Ce(i)*BigInt(s?-1:1);return Number.isFinite(Number(c/O))||T($e),{...R,...Ge(c,a)}})(n,t,o,e)))}function Bs(e,n,t){let o=ze(n),[r,i,a,s,c]=((f,p,h)=>{f=vo(f,Re);let y=hs(f),b=h(f.relativeTo),v=Ar(f),D=An(f,7),I=Wn(f);return y===void 0&&I===void 0&&T(\"Required smallestUnit or largestUnit\"),I==null&&(I=0),y==null&&(y=Math.max(I,p)),Ts(y,I),v=jr(v,I,1),v>1&&I>5&&y!==I&&T(\"For calendar units with roundingIncrement > 1, use largestUnit = smallestUnit\"),[y,I,v,D,b]})(t,o,e);if(!c&&Math.max(o,r)<=6)return B(Qe(((f,p,h,y,b)=>{let v=Po(Ce(f),Ot(h,y),b);return{...R,...Ge(v,p)}})(n,r,i,a,s)));let u=c&&Zt(c)&&r>=6&&i<6;if(!n.sign&&!u)return n;c||T(\"Missing relativeTo\");let d=Eo(c),l=d.G(d.i,n);Cs(d,l);let m=d.re(d.i,l,r);return m=So(m,d.V(l),r,i,a,s,d),B(m)}function Ws(e){return e.sign===-1?ai(e):e}function ai(e){return B(H(e))}function H(e){let n={};for(let t of k)n[t]=-1*e[t]||0;return n}function xo(e,n=k){let t=0;for(let o of n){let r=Math.sign(e[o]);r&&(t&&t!==r&&T(\"Cannot mix duration signs\"),t=r)}return t}function Qe(e){for(let t of Wd)we(t,e[t],-4294967295,4294967295,1);let n=Ce(e);return As(Number(n/hn)),e}function As(e){Number.isSafeInteger(e)||T(\"Out-of-bounds duration\")}function Ce(e){return BigInt(e.days)*O+In(e)}function In(e){return BigInt(e.hours)*Id+BigInt(e.minutes)*vd+Us(e)}function Us(e){return BigInt(e.seconds)*hn+BigInt(e.milliseconds)*Yn+BigInt(e.microseconds)*bd+BigInt(e.nanoseconds)}function Ge(e,n=6){let t=Number(e/O),o=Number(e%O),r=Te[n],i=n<=3?Number(e/BigInt(r)):t*(Ye/r)+Cn(o,r);Number.isFinite(i)||T($e),n<=3&&Math.abs(i)/(_e/Te[n])>=dl&&T($e);let a=ri(o,n,k);return a[k[n]]=i,a}function Zo(e,n=5){return ri(e,n,k)}function Ls(e){return!!xo(e,ms)}function ze(e){let n=9;for(;n>0&&!e[k[n]];n--);return n}function si(e,n){return x(e.epochNanoseconds,n.epochNanoseconds)}function ci(e,n){return x(e.epochNanoseconds,n.epochNanoseconds)}function qs(e,n,t,o){let r=e(ie(o).relativeTo),i=Math.max(ze(n),ze(t));if(Ca(k,n,t))return 0;if(kn(i,r))return x(Ce(n),Ce(t));r||T(\"Missing relativeTo\");let a=Eo(r);return x(ct(a,n),ct(a,t))}function ui(e,n){return wn(e,n)||Fo(e,n)}function wn(e,n){return Fe(Se(e),Se(n))}function Fo(e,n){return Fe(oe(e),oe(n))}function js(e,n){return!si(e,n)}function $s(e,n){return!ci(e,n)&&e.timeZone.o===n.timeZone.o&&e.calendar===n.calendar}function Hs(e,n){return!ui(e,n)&&e.calendar===n.calendar}function Gs(e,n){return!wn(e,n)&&e.calendar===n.calendar}function zs(e,n){return!wn(e,n)&&e.calendar===n.calendar}function Vs(e,n){return!wn(e,n)&&e.calendar===n.calendar}function _s(e,n){return!Fo(e,n)}function $n(e){return e===0?gd:e?e.l:void 0}function J(e,n,t=n){return $n(e)?t:n}function di(e,n){let t=e||void 0,o=$n(e),{era:r,eraYear:i,year:a}=n;if(a!==void 0&&(a=U(a,\"year\")),i!==void 0&&(i=U(i,\"eraYear\")),r!==void 0||i!==void 0){r!==void 0&&i!==void 0||S(\"Mismatching era/eraYear\"),o||T(\"Forbidden era/eraYear\");let s=Aa(r),c=o[s];c===void 0&&T((d=>`Invalid era: ${d}`)(r));let u=t?.te?t.te(i,s,c):ml(i,c);a!==void 0&&a!==u&&T(\"Mismatching year/eraYear\"),a=u}else a===void 0&&S(co(o));return a}function io(e,n,t,o,r){let{month:i,monthCode:a}=n;if(a!==void 0){let s=((c,u,d,l,m=La(u))=>{let f=c?c.q(d):void 0,[p,h]=m,y=ir(p,h,f);if(h){let b=c?c.m:void 0;b===void 0&&T(mn),b>0?(y>b&&T(mn),f!==y&&(l===1&&T(mn),y=ir(p,0,f))):(y!==-b&&T(mn),f===void 0&&l===1&&T(mn))}return y})(e,a,t,o,r);i!==void 0&&i!==s&&T(\"Mismatching month/monthCode\"),i=s,o=1}else i===void 0&&S(\"Missing month/monthCode\");return we(\"month\",i,1,it(e,t),o)}function lr(e,n,t,o,r){return rr(n,\"day\",1,at(e,o,t),r)}function ml(e,n){return(n+e)*(Math.sign(n)||1)||0}function Ft(e,n){return po(Me(_,{...ce,...e}),n)}var fl=Rn(\"([+-])(\\\\d{2})(?::?(\\\\d{2})(?::?(\\\\d{2})(?:[.,](\\\\d{1,9}))?)?)?\");function Ro(e){let n=li(e);return n===void 0&&T(Fa(e)),n}function li(e,n){let t=fl.exec(e);if(t&&(o=>(r=>{r[0]!==\"T\"&&r[0]!==\"t\"||(r=r.slice(1));let i=r.search(/[.,]/),a=i<0?r:r.slice(0,i),s=a.split(\":\");return s.length===1?/^(?:\\d{2}|\\d{4}|\\d{6})$/i.test(a):(s.length===2||s.length===3)&&s.every(c=>c.length===2&&/^\\d{2}$/i.test(c))})(o.slice(1)))(t[0]))return((o,r)=>{let i=o[4]||o[5];return r&&i&&T(Ze(i)),s=(On(o[2])*yt+On(o[3])*pt+On(o[4])*_e+gr(o[5]||\"\"))*Dr(o[1]),Math.abs(s)>=Ye&&T(\"Out-of-bounds offset\"),s;var s})(t,n)}var de={era:Wr,month:Xt,monthCode(e,n=\"monthCode\"){return((t,o)=>{if(typeof t==\"string\")return t;if(t&&typeof t==\"object\"){let r=t.toString;if(typeof r==\"function\")return $(r.call(t),o)}return $(t,o)})(e,n)},day:Xt},mi=mt(_,U),Js=mt(k,bo),hl={offset(e){return Ro(Wr(e))}},fi=Object.assign({},de,mi),hi=Object.assign({},fi,hl);function Z(e,n,t,o,r=!o){let i={},a=0;for(let s of n){let c=e[s];if(c!==void 0){a=1;let u=t[s];u&&(c=u(c,s)),i[s]=c}else o&&o.includes(s)&&S(dt(s))}return r&&!a&&S(Pa(n)),i}function Rt(e,n=ce,t){let o=E(e,n);return bn(o),Pe(o,t)}function ut(e,n,t){return Ks(e,n,Qs(e,n),w(t))}function Co(e,n,t){let o=Qs(e,n),r=t();return[Ks(e,n,o,r[0]),...r]}function Ks(e,n,t,o){let r=t[1],i=io(e,n,r,o,t[0]);return N(X(yn(e,r,i,lr(e,n,i,r,o))),e)}function pi(e){if(e.monthCode!==void 0)return La(e.monthCode)}function Qs(e,n){let t=$n(e);return n.year!==void 0||n.era!==void 0&&n.eraYear!==void 0||S(co(t)),n.monthCode===void 0&&n.month===void 0&&S(\"Missing month/monthCode\"),n.day===void 0&&S(dt(\"day\")),[pi(n),di(e,n)]}function yi(e,n,t){let o=$n(e);n.year!==void 0||n.era!==void 0&&n.eraYear!==void 0||S(co(o)),n.monthCode===void 0&&n.month===void 0&&S(\"Missing month/monthCode\");let r=pi(n),i=di(e,n);return N(Io(yn(e,i,io(e,n,i,w(t),r),1)),e)}function Ti(e,n,t){let o=e===se,r=$n(e);n.day===void 0&&S(dt(\"day\")),o||n.month===void 0||n.year!==void 0||n.era!==void 0&&n.eraYear!==void 0||S(co(r));let i=pi(n),a=n.eraYear!==void 0||n.year!==void 0?di(e,n):void 0,s=w(t),c,u,d;if(a===void 0&&o&&(a=1972),a!==void 0){o||X(yn(e,a,1,1));let p=io(e,n,a,s,i);c=lr(e,n,p,a,s),[u,d]=pn(e,a,p)}else{n.monthCode===void 0&&S(\"Missing month/monthCode\"),[u,d]=i;let p=e?e.ge:1972;if(p!==void 0)c=lr(e,n,io(e,n,p,s,i),p,s);else{let h=s===0&&e?e.ke?.(u,d,n.day):void 0;c=h!==void 0?h:n.day}}d&&((e&&e.Z?.[u])??1/0)<n.day&&(s===1&&T(mn),d=0,c=yr(n.day,1,(e&&e.X)??1/0));let l=e?e.v(u,!!d,c):cr(u,!!d);for(;!l&&s===0&&c>1;)c--,l=e?e.v(u,!!d,c):cr(u,!!d);l||T(\"Cannot guess year\");let{year:m,month:f}=l;return N(X(yn(e,m,f,c)),e)}var Ne=Intl.DateTimeFormat;function pl(e,n){n<-864e13&&T($e);let t=e.formatToParts(n),o={};for(let r of t)o[r.type]=r.value;return o}var yl={El_Aaiun:17,Tucuman:12,Tirane:11,Riga:10,Simferopol:9,Vienna:9,Tunis:8,Boa_Vista:6,Fortaleza:6,Maceio:6,Noronha:6,Recife:6,Gaza:6,Hebron:6,DeNoronha:6},tr=-388152e4;function Xs(e,n=4){let t=Ur(e),o=An(e,4),r=Wn(e);return[o,...Di(xn(Re,r,0,n),t)]}function gi(e){return qr(ie(e))}function ec(e,n){return Xs(ie(e),n)}function Di(e,n){return e!=null?[Te[e],e<4?9-3*e:-1]:[n===void 0?1:10**(9-n),n]}function bi(e,n,t){let[o,r,i,a]=(c=>{let u=Ur(c=ie(c)),d=An(c,4),l=Wn(c);return[c.timeZone,d,...Di(xn(Re,l,0,4),u)]})(t),s=o!==void 0;return((c,u,d,l,m,f)=>{d=No(d,BigInt(m),l);let p=u.C(d);return Ni(It(d+BigInt(p)),f)+(c?Ct(ro(p)):\"Z\")})(s,ne(s?e(o):\"UTC\"),n.epochNanoseconds,r,i,a)}function vi(e,n){let t=(o=>{o=ie(o);let r=qr(o),i=Ur(o),a=Xd(o),s=An(o,4),c=Wn(o);return[r,Qd(o),a,s,...Di(xn(Re,c,0,4),i)]})(n);return((o,r,i,a,s,c,u,d,l,m)=>{a=No(a,BigInt(l),d);let f=i.C(a);return Ni(It(a+BigInt(f)),m)+Ct(ro(f),u)+Dl(r,c)+Oi(o,s)})(e.calendar,e.timeZone.id,e.timeZone,e.epochNanoseconds,...t)}function Ii(e,n){let t=(o=>(o=ie(o),[qr(o),...Xs(o)]))(n);return((o,r,i,a,s,c)=>Ni(wo(r,s,a),c)+Oi(o,i))(e.calendar,e,...t)}function wi(e,n){return t=e.calendar,o=e,r=gi(n),ao(o)+Oi(t,r);var t,o,r}function Mi(e,n){return nc(e.calendar,tc,e,gi(n))}function Si(e,n){return nc(e.calendar,gl,e,gi(n))}function nc(e,n,t,o){let r=o>1||o===0&&e!==se;return o===1?e===se?n(t):ao(t):r?ao(t)+rc(ye(e),o===2):n(t)}function Pi(e,n){return((t,o,r,i)=>oc(Mo(t,r,o)[0],i))(e,...ec(n))}function Yo(e,n){let[t,o,r]=ec(n,3);return o>1&&Qe(e={...e,...tl(e,o,t)}),Tl(e,r)}function Tl(e,n){let{sign:t}=e,o=t===-1?H(e):e,{hours:r,minutes:i}=o,a=Us(o),s=Number(a/hn),c=Number(a%hn);As(s);let u=ki(c,n),d=n>=0||!t||u;return(t<0?\"-\":\"\")+\"P\"+wa({Y:ln(o.years),M:ln(o.months),W:ln(o.weeks),D:ln(o.days)})+(r||i||s||d?\"T\"+wa({H:ln(r),M:ln(i),S:ln(s,d)+u}):\"\")}function wa(e){let n=[];for(let t in e){let o=e[t];o&&n.push(o,t)}return n.join(\"\")}function ln(e,n){if(!e&&!n)return\"\";let t=Object.create(null);return t.useGrouping=0,e.toLocaleString(\"fullwide\",t)}function Ni(e,n){return ao(e)+\"T\"+oc(e,n)}function ao(e){return tc(e)+\"-\"+pe(e.day)}function tc(e){let{year:n}=e;return(n<0||n>9999?ic(n)+oo(6,Math.abs(n)):oo(4,n))+\"-\"+pe(e.month)}function gl(e){return pe(e.month)+\"-\"+pe(e.day)}function oc(e,n){let t=[pe(e.hour),pe(e.minute)];return n!==-1&&t.push(pe(e.second)+((o,r,i,a)=>ki(o*ht+r*ft+i,a))(e.millisecond,e.microsecond,e.nanosecond,n)),t.join(\":\")}function Ct(e,n=0){if(n===1)return\"\";let[t,o]=ve(Math.abs(e),yt),[r,i]=ve(o,pt),[a,s]=ve(i,_e);return ic(e)+pe(t)+\":\"+pe(r)+(a||s?\":\"+pe(a)+ki(s):\"\")}function Dl(e,n){return n!==1?\"[\"+(n===2?\"!\":\"\")+e+\"]\":\"\"}function Oi(e,n){return n>1||n===0&&e!==se?rc(ye(e),n===2):\"\"}function rc(e,n){return\"[\"+(n?\"!\":\"\")+\"u-ca=\"+e+\"]\"}var bl=/0+$/;function ki(e,n){let t=oo(9,e);return t=n===void 0?t.replace(bl,\"\"):t.slice(0,n),t?\".\"+t:\"\"}function ic(e){return e<0?\"-\":\"+\"}var vl=/^(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$/,Il=/[^\\w\\/:+-]+/;function ac(e){return Bo($(e))}function Bo(e){return sc(e).id}function sc(e){let n=e.toUpperCase(),t=(r=>{let i=li(r,1);if(i!==void 0)return{id:Ct(i),_:i,o:i}})(n);if(t)return{kind:\"fixed\",...t};let o=n===\"UTC\"?\"UTC\":(r=>(Il.test(r)&&T(pr(r)),vl.test(r)&&T(\"Forbidden ICU TimeZone\"),r.toLowerCase().split(\"/\").map((i,a)=>(i.length<=3||/\\d/.test(i))&&!/etc|yap/.test(i)?i.toUpperCase():i.replace(/baja|dumont|[a-z]+/g,(s,c)=>s.length<=2&&!a||s===\"in\"||s===\"chat\"?s.toUpperCase():s.length>2||!c?Ta(s).replace(/island|noronha|murdo|rivadavia|urville/,Ta):s)).join(\"/\")))(e);return wl(o)}var wl=En(e=>{if(e===\"UTC\")return{kind:\"utc\",id:e,o:e};let n=e.toUpperCase(),t=Ml(n);return{kind:\"named\",id:e,format:t,o:t.resolvedOptions().timeZone}}),Ml=En(e=>new Ne(\"en-u-hc-h23\",{calendar:\"iso8601\",timeZone:e,era:\"short\",year:\"numeric\",month:\"numeric\",day:\"numeric\",hour:\"numeric\",minute:\"numeric\",second:\"numeric\"}));function ne(e){let n=sc(e);return Sl(n.id,n)}var Sl=En((e,n)=>n.kind===\"named\"?new fr(e,n.o,n.format):new mr(e,n.o,n.kind===\"fixed\"?n._:0)),mr=class{constructor(n,t,o){this.id=n,this.o=t,this._=o}C(){return this._}R(n){return[Hr(n,this._)]}U(){}},fr=class{constructor(n,t,o){this.id=n,this.o=t,this.qe=((r,i)=>{let a=En(r),s=En(Pl),c=86400*i;function u(l){let[m,f]=Sa(l,c),p=no(m),h=no(f),y=a(p),b=a(h);return y===b?y:d(s(p,h),y,b,l)}function d(l,m,f,p){let h,y;for(;(p===void 0||(h=p<l[0]?m:p>=l[1]?f:void 0)===void 0)&&(y=l[1]-l[0]);){let b=l[0]+Math.floor(y/2);r(b)===f?l[1]=b:l[0]=b+1}return h}return{Ee(l){let m=u(l-86400),f=u(l+86400),p=l-m,h=l-f;if(m===f)return[p];let y=u(p);return y===u(h)?[l-y]:m>f?[p,h]:[]},De:u,U:function l(m,f){if(f>0&&m>=864e10)return;if(f<0){if(m<=tr)return;let I=Ma()+94867200;if(m>I)return l(I,-1)}let p=f>0?Math.max(m,tr):m,[h,y]=Sa(p,c),b=c*f,v=f>0?Math.max(m,Ma())+94867200:tr,D=()=>f<0?y>v:h<v;for(;D();){let I=no(h),F=no(y),j=a(I),K=a(F);if(j!==K){let Q=s(I,F);d(Q,j,K);let V=Q[0];if((Fe(V,m)||1)===f)return V}h+=b,y+=b}}}})((r=>i=>{let a=pl(r,1e3*i);return 86400*rt((s=>{let c=s.relatedYear;if(c!==void 0)return parseInt(c);let u=parseInt(s.year);return s.era!==void 0&&Aa(s.era)===\"bce\"?1-u:u})(a),parseInt(a.month),parseInt(a.day))+3600*parseInt(a.hour)+60*parseInt(a.minute)+parseInt(a.second)-i})(o),(r=>{let i=r.split(\"/\").pop();return yl[i]||60})(n))}C(n){return this.qe.De((t=>ga(t)[0])(n))*_e}R(n){let t=86400*Se(n)+Nr(n),o=Qa(n);return this.qe.Ee(t).map(r=>ge(BigInt(r)*hn+BigInt(o)))}U(n,t){let[o,r]=ga(n),i=this.qe.U(o+(t>0||r?1:0),t);if(i!==void 0)return BigInt(i)*hn}};function Ma(){return Math.floor(Date.now()/1e3)}function Pl(e,n){return[e,n]}function Sa(e,n){let t=Math.floor(e/n)*n;return[t,t+n]}function no(e){return yr(e,-1e10,864e10)}function cc(e,n,t){let o=Z(t,J(n,Ja,Ka),hi,[],0);if(o.timeZone!==void 0){let r=ut(n,o),i=Ft(o),a=ne(e(o.timeZone));return{epochNanoseconds:qn(a,E(r,i),o.offset),timeZone:a,calendar:n}}return ut(n,o)}function uc(e,n,t,o){let r=Z(t,J(n,Ja,Ka),hi,Sr,0),i=e(r.timeZone),[a,s,c,u]=Co(n,r,()=>Zn(o)),d=Ft(r,s),l=ne(i);return De(qn(l,E(a,d),r.offset,c,u),l,n)}function dc(e,n,t){let o=Z(n,J(e,Va,_a),fi,[],0),[r,i]=Co(e,o,()=>[w(t)]);return Rt(r,Ft(o,i),e)}function lc(e,n,t,o=[]){return ut(e,Z(n,J(e,gn,Dn),de,o),t)}function mc(e,n,t,o){return yi(e,Z(n,J(e,gt,Ha),de,o),t)}function fc(e,n,t,o){let r=Z(t,J(e,gn,Dn),de,Tn,0);return n&&r.month!==void 0&&r.monthCode===void 0&&r.year===void 0&&(r.year=1972),Ti(e,r,o)}function hc(e,n){return Ft(Z(e,sr,mi,[],1),w(n))}function pc(e){let n=Z(e,ls,Js);return B(Qe({...R,...n}))}function ae(e){T(Fa(e))}function yc(e){let n=Xe(e=Wr(e)),t;return n||ae(e),n.F?t=0:n.offset?t=Ro(n.offset):ae(e),n.timeZoneId&&li(n.timeZoneId,1),wt(n),ue(Hr(n,t))}function Tc(e,n){let t=Xe($(e));return t||ae(e),t.timeZoneId?Nc(t,n,void 0):(t.F&&ae(e),hr(t,n))}function gc(e,n,t){let o=Xe($(e));return o&&o.timeZoneId||ae(e),Nc(o,n,t)}function Dc(e,n){let t=Xe($(e));return t&&!t.F||ae(e),Oc(t,n)}function bc(e,n){let t=Zi(xi($(e)),void 0,n);return N(t,t.calendar)}function vc(e,n){let t=Ri($(e));if(t)return Ei(t),N(Io(Be(t)),n(t.calendarId));let o=Zi(xi(e),Nl,n),{calendar:r}=o;return N(st(r,o),r)}function Ei(e){e.calendarId!==\"iso8601\"&&T(Ze(e.calendarId))}function Ic(e,n){let t=Ci($(e));if(t)return Ei(t),N(Be(t),n(t.calendarId));let o=Zi(xi(e),Ol,n),{calendar:r}=o,{year:i,month:a,day:s}=P(r,o),[c,u]=pn(r,i,a),{year:d,month:l}=((m,f,p,h)=>{let y=m?m.v(f,p,h):cr(f,p);return y||T(\"Cannot guess year\"),y})(r,c,u,s);return N(X(yn(r,d,l,s)),r)}function wc(e){let n=(o=>{let r=Ec(o);return r?(Yt(r[13]),xc(r,1)):void 0})(e=$(e)),t;return n||(n=Xe(e),n?(n.fe||ae(e),n.F&&T(Ze(\"Z\")),Ei(n)):ae(e)),(t=Ri(e))&&Da(t)&&ae(e),(t=Ci(e))&&Da(t)&&ae(e),vn(bt(n))}function Mc(e){let n=(t=>{let o=Cl.exec(t);return o?(r=>{let i=0,a=0,s=0,c={years:u(r[2]),months:u(r[3]),weeks:u(r[4]),days:u(r[5]),hours:u(r[6],r[7],5),minutes:u(r[8],r[9],4),seconds:u(r[10],r[11],3),...ri(s,2,k)};return i||T(Pa(k)),Dr(r[1])<0&&(c=H(c)),c;function u(d,l,m){let f=0,p=0;return m&&([f,s]=ve(s,Te[m])),d!==void 0&&(a&&T(Ze(d)),p=(h=>{let y=parseInt(h);return Number.isFinite(y)||T(Ze(h)),y})(d),i=1,l&&(s=gr(l)*(Te[m]/_e),a=1)),f+p}})(o):void 0})($(e));return n||ae(e),B(Qe(n))}function Sc(e){let n=Xe(e)||Ri(e)||Ci(e);if(n)return n.calendarId;let t=Ec(e);return t?Yt(t[13]).calendarId:e}function Pc(e){let n=Xe(e);return n&&(n.timeZoneId||n.F&&\"UTC\"||n.offset)||e}function xi(e){let n=Xe(e);return n&&!n.F||ae(e),n}function Zi(e,n,t){return n&&e.calendarId===\"iso8601\"?(Be(e),e.fe&&bt(e),hr(n(e),t)):e.fe?Oc(e,t):hr(e,t)}function Nl(e){let n=12*e.year+e.month===bs?20:1;return{...e,day:n}}function Ol(e){return{...e,year:1972}}function Nc(e,n,t){let o=ne(Bo(e.timeZoneId)),r;if(wt(e),e.fe){let a=e.offset?Ro(e.offset):void 0,[,s,c]=Zn(t);r=qn(o,e,a,s,c,!(o._||e.offset===void 0||(i=e.offset,i.replace(/\\D/g,\"\").length>4)),e.F)}else Zn(t),r=He(o,e);var i;return ge(r),De(r,o,n(e.calendarId))}function Oc(e,n){return wt(e),bn(e),{...E(e,e),calendar:n(e.calendarId)}}function hr(e,n){return Be(e),X(e),{calendar:n(e.calendarId),year:e.year,month:e.month,day:e.day}}function Fi(e){return`(\\\\d{2})(?:(:?)(\\\\d{2})(?:\\\\${e}(\\\\d{2})(?:[.,](\\\\d{1,9}))?)?)?`}function kc(e){return\"([+-])\"+Fi(e)}var kl=\"(?:(?:([+-])(\\\\d{6}))|(\\\\d{4}))(-?)(\\\\d{2})\\\\4(\\\\d{2})(?:[T ]\"+Fi(8)+\"(Z|\"+kc(15)+\")?)?\",El=Rn(\"(?:(?:([+-])(\\\\d{6}))|(\\\\d{4}))-?(\\\\d{2})((?:\\\\[(!?)([^\\\\]]*)\\\\]){0,9})\"),xl=Rn(\"(?:--)?(\\\\d{2})-?(\\\\d{2})((?:\\\\[(!?)([^\\\\]]*)\\\\]){0,9})\"),Zl=Rn(kl+\"((?:\\\\[(!?)([^\\\\]]*)\\\\]){0,9})\"),Fl=Rn(\"T?\"+Fi(2)+`(${kc(9)})?((?:\\\\[(!?)([^\\\\]]*)\\\\]){0,9})`),Rl=new RegExp(\"\\\\[(!?)([^\\\\]]*)\\\\]\",\"g\"),Cl=Rn(\"([+-])?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)?)?\");function Xe(e){let n=Zl.exec(e);return n?(t=>{let o=t[12],r=(o||\"\").toUpperCase()===\"Z\";return{year:Zc(t),month:parseInt(t[5]),day:parseInt(t[6]),...xc(t,7),...Yt(t[19]),fe:!!t[7],F:r,offset:r?void 0:o}})(n):void 0}function Ri(e){let n=El.exec(e);if(n)return(t=>({year:Zc(t),month:parseInt(t[4]),day:1,...Yt(t[5])}))(n)}function Ci(e){let n=xl.exec(e);return n?(t=>({year:1972,month:parseInt(t[1]),day:parseInt(t[2]),...Yt(t[3])}))(n):void 0}function Ec(e){let n=Fl.exec(e);if(n)return n[6]&&Ro(n[6]),n}function xc(e,n){let t=On(e[n+3]);return{...Or(gr(e[n+4]||\"\"))[0],hour:On(e[n]),minute:On(e[n+2]),second:t===60?59:t}}function Zc(e){let n=Dr(e[1]),t=parseInt(e[2]||e[3]);return n<0&&!t&&T(Ze(-0)),n*t}function Yt(e){let n,t,o=[];return e.replace(Rl,(r,i,a)=>{let s=!!i,[c,u]=a.split(\"=\").reverse();return u?u===\"u-ca\"?(o.push(c.toLowerCase()),n||(n=s)):(s||/[A-Z]/.test(u))&&T(Ze(r)):(t&&T(Ze(r)),t=c),\"\"}),o.length>1&&n&&T(Ze(e)),{timeZoneId:t,calendarId:o[0]||\"iso8601\"}}function Hn(e,n,t){let o=Object.assign(Object.create(null),n);return or(o,t,$a),$n(e)&&(or(o,t,wd),e&&e.le&&or(o,t,Md,Bn)),o}function or(e,n,t,o){let r=0,i=[];for(let a of t)n[a]!==void 0?r=1:i.push(a);if(Object.assign(e,n),r)for(let a of o||i)delete e[a]}function Fc(e,n,t){let{calendar:o,timeZone:r}=e,i=J(o,Pd,Nd),a=W(e),{year:s,month:c,day:u}=P(o,a),d={year:s,monthCode:Bt(o,s,c),day:u,hour:a.hour,minute:a.minute,second:a.second,millisecond:a.millisecond,microsecond:a.microsecond,nanosecond:a.nanosecond,offset:a.offsetNanoseconds},l=Z(n,i,hi),m=Hn(o,d,l),f={...d,...l},[p,h,y,b]=Co(o,m,()=>Zn(t,2));return De(qn(r,E(p,po(f,h)),f.offset,y,b),r,o)}function Rc(e,n,t){let{calendar:o}=e,r=J(o,Va,_a),{year:i,month:a,day:s}=P(o,e),c={year:i,monthCode:Bt(o,i,a),day:s,hour:e.hour,minute:e.minute,second:e.second,millisecond:e.millisecond,microsecond:e.microsecond,nanosecond:e.nanosecond},u=Z(n,r,fi),d=Hn(o,c,u),l={...c,...u},[m,f]=Co(o,d,()=>[w(t)]);return Rt(m,po(l,f),o)}function Cc(e,n,t){let{calendar:o}=e,r=J(o,gn,Dn),{year:i,month:a,day:s}=P(o,e);return ut(o,Hn(o,{year:i,monthCode:Bt(o,i,a),day:s},Z(n,r,de)),t)}function Yc(e,n,t){let{calendar:o}=e,r=J(o,gt,Ha),{year:i,month:a}=P(o,e);return yi(o,Hn(o,{year:i,monthCode:Bt(o,i,a)},Z(n,r,de)),t)}function Bc(e,n,t){let{calendar:o}=e,r=J(o,gn,Dn),{year:i,month:a,day:s}=P(o,e);return Ti(o,Hn(o,{monthCode:Bt(o,i,a),day:s},Z(n,r,de)),t)}function Wc(e,n,t){return((o,r,i)=>Ft({...Me(sr,o),...Z(r,sr,mi)},w(i)))(e,n,t)}function Ac(e,n){return B((t=e,o=n,Qe({...t,...Z(o,ls,Js)})));var t,o}function Bt(e,n,t){let[o,r]=pn(e,n,t);return qa(o,r)}function Uc(e,n,t){return De(e.epochNanoseconds,n,t)}function Lc(e){return ue(e.epochNanoseconds)}function Yi(e){return Pe(W(e),e.calendar)}function Bi(e){return N(W(e),e.calendar)}function Wi(e){return vn(W(e))}function qc(e,n,t){let o=((r,i,a)=>{let s=(c=>ys(ie(c)))(a);return kt(r,i,s)})(n,e,t);return De(ge(o),n,e.calendar)}function jc(e,n,t,o){let r=e(o.timeZone),i=o.plainTime,a=i!==void 0?n(i):void 0,s=ne(r),c;return c=a?kt(s,E(t,a)):He(s,E(t,ce)),De(c,s,t.calendar)}function $c(e,n,t){return Vc(e,Me(J(e,Dt,Ga),n),Z(dn(t),Tn,de,[]))}function Hc(e,n,t){let o=J(e,fo,Sd);return Vc(e,Me(za,n),Z(dn(t),o,de,[]))}function Gc(e,n){return Ti(e,Z(n,za,de))}function zc(e,n,t){return yi(e,Z(n,J(e,Dt,Ga),de),t)}function Vc(e,n,t){let o=J(e,Od,kd),r=Hn(e,n,t);return r=Z(r,o,de,[]),ut(e,r)}function _c(e){return ue(ge(BigInt(bo(e))*Yn))}function Jc(e){return ue(ge(Do(e)))}function Gn(e){return e.timeZone=\"UTC\",[\"full\",\"long\"].includes(e.timeStyle)&&(e.timeStyle=\"medium\"),e}function Kc(e,n){return e.timeZone!==void 0&&S(\"Cannot specify TimeZone\"),e.timeZone=n,e}function zn(e,n,t){let o=e.resolvedOptions().calendar;!t&&n.calendar===se||ye(n.calendar)===o||T(\"Mismatching Calendars\")}function Mn(e,n,t,o,r){let i=new Set(e),a=new Set(n),s=new Set(t);return(c,u)=>{let d=((I,F,j,K)=>{let Q={dateStyle:void 0,timeStyle:void 0,me:{},pe:{},xe:{},oe:0,ue:0};for(let V of Object.keys(I)){let Pn=I[V];Pn===void 0||K.has(V)||(F.has(V)?V===\"dateStyle\"?Q.dateStyle=Pn:V===\"timeStyle\"?Q.timeStyle=Pn:Q.me[V]=Pn:V===\"era\"?Q.pe[V]=Pn:j.has(V)?V===\"dateStyle\"||V===\"timeStyle\"?Q.ue=1:Q.oe=1:Q.xe[V]=Pn)}return Q})(c,i,a,s),l=d.dateStyle!==void 0,m=d.timeStyle!==void 0,f=l||m,p=Object.keys(d.me).length>0,h=d.oe||d.ue,y=p||l||m,b=Object.keys(d.pe).length>0,v=p||b||d.oe;(!u&&h||u&&h&&!y||f&&v)&&S(\"Invalid formatting options\");let D={};return f||y||Object.assign(D,o),Object.assign(D,d.me,d.pe,d.xe),l&&(r?Object.assign(D,r[d.dateStyle]):D.dateStyle=d.dateStyle),m&&(D.timeStyle=d.timeStyle),D}}var Qc={year:\"numeric\",month:\"numeric\",day:\"numeric\"},Xc={hour:\"numeric\",minute:\"numeric\",second:\"numeric\"},Ai=Object.assign({},Qc,Xc),Yl=Object.assign({},Ai,{timeZoneName:\"short\"}),Bl={year:\"numeric\",month:\"numeric\"},Wl={month:\"numeric\",day:\"numeric\"},Ui=[\"weekday\",\"year\",\"month\",\"day\",\"dateStyle\"],Wt=[\"dayPeriod\",\"hour\",\"minute\",\"second\",\"fractionalSecondDigits\",\"timeStyle\"],Li=Ui.concat(Wt),Al=[\"weekday\",\"day\"].concat(Wt),Ul=[\"weekday\",\"year\"].concat(Wt),eu=Mn(Li,[],[],Ai),nu=Mn(Li,[],[],Yl),tu=Mn(Li,[],[\"timeZoneName\"],Ai),ou=Mn(Ui,Wt,[\"timeZoneName\"],Qc),ru=Mn(Wt,Ui,[\"timeZoneName\",\"era\"],Xc),iu=Mn([\"year\",\"month\",\"dateStyle\"],Al,[\"timeZoneName\"],Bl,{full:{year:\"numeric\",month:\"long\"},long:{year:\"numeric\",month:\"long\"},medium:{year:\"numeric\",month:\"short\"},short:{year:\"2-digit\",month:\"numeric\"}}),au=Mn([\"month\",\"day\",\"dateStyle\"],Ul,[\"timeZoneName\",\"era\"],Wl,{full:{month:\"long\",day:\"numeric\"},long:{month:\"long\",day:\"numeric\"},medium:{month:\"short\",day:\"numeric\"},short:{month:\"numeric\",day:\"numeric\"}});function su(e,n){let{timeZone:t}=e,o=W(e),{offsetNanoseconds:r}=o,i=n||ce,a;return a=n?qn(t,E(o,i),r,2):He(t,E(o,i)),De(a,t,e.calendar)}function Wo(e){let n=Ao(),t=e.C(n);return It(n+BigInt(t))}function Ao(){return BigInt(Date.now())*Yn}function Vn(){return new Ne().resolvedOptions().timeZone}var qi=\"PlainYearMonth\",ji=\"PlainMonthDay\",$i=\"PlainDate\",Hi=\"PlainDateTime\",Gi=\"PlainTime\",zi=\"ZonedDateTime\",Vi=\"Instant\",_i=\"Duration\";function Ae(e,n,t,...o){Object.defineProperties(n,Ra(e)),Object.defineProperties(n.prototype,lt(\"Temporal.\"+e));for(let r of o)Ll(n.prototype,t,r);return n}function Ll(e,n,t){Object.defineProperties(e,Ve(o=>({get(){return o(n(this))},configurable:1}),t))}var Ue=Tr.name===\"noop\"?e=>{Object.defineProperty(e,\"_str_\",{value:e.toJSON()})}:Tr;function Le(){S(Ea)}function qe(){S(ka)}var uu={era(e){return Mt(e.calendar,e).era},eraYear(e){return Mt(e.calendar,e).eraYear},year(e){return P(e.calendar,e).year},month(e){return P(e.calendar,e).month},monthCode(e){return go(e.calendar,e)}},Uo={era(e){return Mt(e.calendar,e).era},eraYear(e){return Mt(e.calendar,e).eraYear},year(e){return P(e.calendar,e).year},month(e){return P(e.calendar,e).month},monthCode(e){return go(e.calendar,e)},day(e){return P(e.calendar,e).day}},du={monthCode(e){return go(e.calendar,e)},day(e){return P(e.calendar,e).day}},Ji={daysInMonth(e){return xr(e.calendar,e)},daysInYear(e){return Zr(e.calendar,e)},monthsInYear(e){return Er(e.calendar,e)},inLeapYear(e){return kr(e.calendar,e)}},At={dayOfWeek(e){return To(e)},dayOfYear(e){return cs(e.calendar,e)},weekOfYear(e){return us(e.calendar,e)},yearOfWeek(e){return ds(e.calendar,e)},daysInWeek(){return 7},daysInMonth(e){return xr(e.calendar,e)},daysInYear(e){return Zr(e.calendar,e)},monthsInYear(e){return Er(e.calendar,e)},inLeapYear(e){return kr(e.calendar,e)}};function cu(e){return lo(Object.keys(e))}cu(Ji),cu(At);function on(e){let n=$(e).toLowerCase();return n===Ir?se:n===Wa?Ua:void T(Za(e,\"temporal-polyfill/full\"))}function qt(e=Ir){return on(e)}var mu=new WeakMap,fu=Ae(zi,class{constructor(e,n,t=void 0){let o=ge(Do(e)),r=ne(ac(n)),i=qt(t);hu(this,De(o,r,i))}static from(e,n=void 0){return te(_n(e,n))}static compare(e,n){return ci(_n(e),_n(n))}get calendarId(){return ye(M(this).calendar)}get timeZoneId(){return M(this).timeZone.id}get epochMilliseconds(){return Pt(M(this))}get epochNanoseconds(){return Nt(M(this))}get offset(){return Ct(W(M(this)).offsetNanoseconds)}get offsetNanoseconds(){return W(M(this)).offsetNanoseconds}get hoursInDay(){return Ss(M(this))}with(e,n=void 0){return te(Fc(M(this),et(e),n))}withCalendar(e){return te({...M(this),calendar:jo(e)})}withTimeZone(e){return te({...M(this),timeZone:ne(fe(e))})}withPlainTime(e=void 0){return te(su(M(this),ea(e)))}add(e,n=void 0){let t=M(this);return te(Et(t,q(e),n))}subtract(e,n=void 0){let t=M(this);return te(Et(t,H(q(e)),n))}until(e,n=void 0){let t=M(this),o=_n(e),r=We(t.calendar,o.calendar);return Y(B(Kr(0,r,t,o,n)))}since(e,n=void 0){let t=M(this),o=_n(e),r=We(t.calendar,o.calendar);return Y(B(Kr(1,r,t,o,n)))}round(e){let n=M(this),[t,o,r]=St(e);return te(Ms(n,t,o,r))}startOfDay(){return te(Ps(M(this)))}equals(e){return $s(M(this),_n(e))}toInstant(){return je(Lc(M(this)))}toPlainDateTime(){return Oe(Yi(M(this)))}toPlainDate(){return ke(Bi(M(this)))}toPlainTime(){return tn(Wi(M(this)))}toLocaleString(e=void 0,n={}){let t=M(this),o=new Ne(e,Kc(nu(n),Es(t)));return zn(o,t),o.format(Pt(t))}toString(e=void 0){return vi(M(this),e)}toJSON(){return vi(M(this))}getTimeZoneTransition(e){let n=M(this),t=Os(n,e);return t?te({...n,epochNanoseconds:t}):null}valueOf(){return qe()}},ql,Uo,At,Tt);function te(e){return hu(Object.create(fu.prototype),e)}function M(e){return Ee(e)||Le()}function ql(e){let n=M(e);return{...W(n),calendar:n.calendar}}function Ee(e){return mu.get(e)}function _n(e,n){if(ee(e)){let t=Ee(e);if(t)return Zn(n),t;let o=jt(e);return uc(fe,o,e,n)}return gc(e,on,n)}function hu(e,n){return mu.set(e,n),Ue(e),e}function fe(e){if(ee(e)){let n=Ee(e);return n||S(pr(e)),n.timeZone.id}return(n=>Bo(Pc($(n))))(e)}var pu=new WeakMap,yu=Ae(Vi,class{constructor(e){let n=ge(Do(e));gu(this,ue(n))}static from(e){return je(Jn(e))}static fromEpochMilliseconds(e){return je(_c(e))}static fromEpochNanoseconds(e){return je(Jc(e))}static compare(e,n){return si(Jn(e),Jn(n))}get epochMilliseconds(){return Pt(le(this))}get epochNanoseconds(){return Nt(le(this))}add(e){let n=le(this);return je(ue(_r(n.epochNanoseconds,q(e))))}subtract(e){let n=le(this);return je(ue(_r(n.epochNanoseconds,H(q(e)))))}until(e,n=void 0){return Y(Jr(0,le(this),Jn(e),n))}since(e,n=void 0){return Y(Jr(1,le(this),Jn(e),n))}round(e){let n=le(this),[t,o,r]=St(e,5,1);return je(ue(No(n.epochNanoseconds,Ot(t,o),r)))}equals(e){return js(le(this),Jn(e))}toZonedDateTimeISO(e){return te(Uc(le(this),ne(fe(e))))}toLocaleString(e=void 0,n={}){let t=le(this);return new Ne(e,eu(n)).format(Pt(t))}toString(e=void 0){return bi(fe,le(this),e)}toJSON(){return bi(fe,le(this))}valueOf(){return qe()}});function je(e){return gu(Object.create(yu.prototype),e)}function le(e){return Qi(e)||Le()}function Qi(e){return pu.get(e)}function Jn(e){if(ee(e)){let n=Qi(e);if(n)return n;let t=Ee(e);if(t)return ue(t.epochNanoseconds)}return yc(e)}var{toTemporalInstant:Tu}={toTemporalInstant(){let e=Date.prototype.valueOf.call(this);return je(ue(BigInt(Yr(e))*Yn))}};function gu(e,n){return pu.set(e,n),Ue(e),e}var Du=new WeakMap,bu=Ae(ji,class{constructor(e,n,t=void 0,o){let r=U(e),i=U(n),a=qt(t),s=U(o??ts),c=X(Be({year:s,month:r,day:i}));vu(this,N(c,a))}static from(e,n=void 0){return Ki(lu(e,n))}get calendarId(){return ye(en(this).calendar)}with(e,n=void 0){return Ki(Bc(en(this),et(e),n))}equals(e){return Vs(en(this),lu(e))}toPlainDate(e){let n=en(this);return ke(Hc(n.calendar,this,e))}toLocaleString(e=void 0,n={}){let t=en(this),o=new Ne(e,Gn(au(n)));return zn(o,t,1),o.format(vt(t))}toString(e=void 0){return Si(en(this),e)}toJSON(){return Si(en(this))}valueOf(){return qe()}},en,du);function Ki(e){return vu(Object.create(bu.prototype),e)}function en(e){return Lo(e)||Le()}function Lo(e){return Du.get(e)}function lu(e,n){if(ee(e)){let o=Lo(e);if(o)return w(n),o;let r=Ru(e);return fc(r===void 0?se:r,r===void 0,e,n)}let t=Ic(e,on);return w(n),t}function vu(e,n){return Du.set(e,n),Ue(e),e}var Iu=new WeakMap,wu=Ae(qi,class{constructor(e,n,t=void 0,o){let r=U(e),i=U(n),a=qt(t),s=U(o??1),c=Io(Be({year:r,month:i,day:s}));Mu(this,N(c,a))}static from(e,n=void 0){return Lt(Kn(e,n))}static compare(e,n){return wn(Kn(e),Kn(n))}get calendarId(){return ye(me(this).calendar)}with(e,n=void 0){return Lt(Yc(me(this),et(e),n))}add(e,n=void 0){let t=me(this);return Lt(N(Vr(0,t.calendar,t,q(e),n),t.calendar))}subtract(e,n=void 0){let t=me(this);return Lt(N(Vr(1,t.calendar,t,q(e),n),t.calendar))}until(e,n=void 0){let t=me(this),o=Kn(e),r=We(t.calendar,o.calendar);return Y(ei(0,r,t,o,n))}since(e,n=void 0){let t=me(this),o=Kn(e),r=We(t.calendar,o.calendar);return Y(ei(1,r,t,o,n))}equals(e){return zs(me(this),Kn(e))}toPlainDate(e){let n=me(this);return ke($c(n.calendar,this,e))}toLocaleString(e=void 0,n={}){let t=me(this),o=new Ne(e,Gn(iu(n)));return zn(o,t,1),o.format(vt(t))}toString(e=void 0){return Mi(me(this),e)}toJSON(){return Mi(me(this))}valueOf(){return qe()}},me,uu,Ji);function Lt(e){return Mu(Object.create(wu.prototype),e)}function me(e){return qo(e)||Le()}function qo(e){return Iu.get(e)}function Kn(e,n){if(ee(e)){let o=qo(e);if(o)return w(n),o;let r=jt(e);return mc(r,e,n)}let t=vc(e,on);return w(n),t}function Mu(e,n){return Iu.set(e,n),Ue(e),e}function jl(e){if(!ee(e))return;let n=Qi(e);return n?[Vi,n]:(n=Ee(e),n?[zi,n]:(n=Sn(e),n?[Hi,n]:(n=nt(e),n?[$i,n]:(n=Xi(e),n?[Gi,n]:(n=qo(e),n?[qi,n]:(n=Lo(e),n?[ji,n]:(n=na(e),n?[_i,n]:void 0)))))))}function et(e){return(jl(e)||e.calendar!==void 0||e.timeZone!==void 0)&&S(Na),e}var Su=new WeakMap,Pu=Ae(Gi,class{constructor(e=0,n=0,t=0,o=0,r=0,i=0){let a=bt(Ve(U,{hour:e,minute:n,second:t,millisecond:o,microsecond:r,nanosecond:i}));Nu(this,vn(a))}static from(e,n=void 0){return tn(nn(e,n))}static compare(e,n){return Fo(nn(e),nn(n))}with(e,n=void 0){return tn(Wc(be(this),et(e),n))}add(e){let n=be(this);return tn(Oo(n,q(e))[0])}subtract(e){let n=be(this);return tn(Oo(n,H(q(e)))[0])}until(e,n=void 0){return Y(ni(0,be(this),nn(e),n))}since(e,n=void 0){return Y(ni(1,be(this),nn(e),n))}round(e){let n=be(this),[t,o,r]=St(e,5);return tn(Mo(n,Ln(t,o),r)[0])}equals(e){return _s(be(this),nn(e))}toLocaleString(e=void 0,n={}){let t=be(this);return new Ne(e,Gn(ru(n))).format(Pr(t))}toString(e=void 0){return Pi(be(this),e)}toJSON(){return Pi(be(this))}valueOf(){return qe()}},be,Tt);function tn(e){return Nu(Object.create(Pu.prototype),e)}function be(e){return Xi(e)||Le()}function Xi(e){return Su.get(e)}function nn(e,n){if(ee(e)){let o=Xi(e);if(o)return w(n),o;let r=Sn(e);if(r)return w(n),vn(r);let i=Ee(e);return i?(w(n),Wi(i)):hc(e,n)}let t=wc(e);return w(n),t}function ea(e){return e===void 0?void 0:nn(e)}function Nu(e,n){return Su.set(e,n),Ue(e),e}var Ou=new WeakMap,ku=Ae(Hi,class{constructor(e,n,t,o=0,r=0,i=0,a=0,s=0,c=0,u=void 0){let d=bn(wt(Ve(U,{year:e,month:n,day:t,hour:o,minute:r,second:i,millisecond:a,microsecond:s,nanosecond:c}))),l=qt(u);Eu(this,Pe(d,l))}static from(e,n=void 0){return Oe(Qn(e,n))}static compare(e,n){let t=Qn(e),o=Qn(n);return ui(t,o)}get calendarId(){return ye(L(this).calendar)}with(e,n=void 0){return Oe(Rc(L(this),et(e),n))}withCalendar(e){let n=L(this);return Oe(Pe(n,jo(e)))}withPlainTime(e=void 0){let n=L(this);return Oe(Rt(n,ea(e),n.calendar))}add(e,n=void 0){let t=L(this);return Oe(Pe(xt(t.calendar,t,q(e),n),t.calendar))}subtract(e,n=void 0){let t=L(this);return Oe(Pe(xt(t.calendar,t,H(q(e)),n),t.calendar))}until(e,n=void 0){let t=L(this),o=Qn(e),r=We(t.calendar,o.calendar);return Y(Qr(0,r,t,o,n))}since(e,n=void 0){let t=L(this),o=Qn(e),r=We(t.calendar,o.calendar);return Y(Qr(1,r,t,o,n))}round(e){let n=L(this),[t,o,r]=St(e);return Oe(Pe(wo(n,Ln(t,o),r),n.calendar))}equals(e){return Hs(L(this),Qn(e))}toZonedDateTime(e,n=void 0){return te(qc(L(this),ne(fe(e)),n))}toPlainDate(){let e=L(this);return ke(N(e,e.calendar))}toPlainTime(){return tn(vn(L(this)))}toLocaleString(e=void 0,n={}){let t=L(this),o=new Ne(e,Gn(tu(n)));return zn(o,t),o.format(es(t))}toString(e=void 0){return Ii(L(this),e)}toJSON(){return Ii(L(this))}valueOf(){return qe()}},L,Uo,At,Tt);function Oe(e){return Eu(Object.create(ku.prototype),e)}function L(e){return Sn(e)||Le()}function Sn(e){return Ou.get(e)}function Qn(e,n){if(ee(e)){let o=Sn(e);if(o)return w(n),o;let r=nt(e);if(r)return w(n),Pe(E(r,ce),r.calendar);let i=Ee(e);if(i)return w(n),Yi(i);let a=jt(e);return dc(a,e,n)}let t=Dc(e,on);return w(n),t}function Eu(e,n){return Ou.set(e,n),Ue(e),e}var xu=new WeakMap,Zu=Ae($i,class{constructor(e,n,t,o=void 0){let r=X(Be(Ve(U,{year:e,month:n,day:t}))),i=qt(o);Fu(this,N(r,i))}static from(e,n=void 0){return ke(Xn(e,n))}static compare(e,n){return wn(Xn(e),Xn(n))}get calendarId(){return ye(G(this).calendar)}with(e,n=void 0){let t=G(this);return ke(Cc(t,et(e),n))}withCalendar(e){let n=G(this);return ke(N(n,jo(e)))}add(e,n=void 0){let t=G(this);return ke(N(jn(t.calendar,t,q(e),n),t.calendar))}subtract(e,n=void 0){let t=G(this);return ke(N(jn(t.calendar,t,H(q(e)),n),t.calendar))}until(e,n=void 0){let t=G(this),o=Xn(e),r=We(t.calendar,o.calendar);return Y(Xr(0,r,t,o,n))}since(e,n=void 0){let t=G(this),o=Xn(e),r=We(t.calendar,o.calendar);return Y(Xr(1,r,t,o,n))}equals(e){return Gs(G(this),Xn(e))}toZonedDateTime(e){let n=ee(e)?{timeZone:e.timeZone,plainTime:e.plainTime}:{timeZone:e};return te(jc(fe,nn,G(this),n))}toPlainDateTime(e=void 0){let n=G(this);return Oe(Rt(n,ea(e),n.calendar))}toPlainYearMonth(){let e=G(this);return Lt(zc(e.calendar,this))}toPlainMonthDay(){let e=G(this);return Ki(Gc(e.calendar,this))}toLocaleString(e=void 0,n={}){let t=G(this),o=new Ne(e,Gn(ou(n)));return zn(o,t),o.format(vt(t))}toString(e=void 0){return wi(G(this),e)}toJSON(){return wi(G(this))}valueOf(){return qe()}},G,Uo,At);function ke(e){return Fu(Object.create(Zu.prototype),e)}function G(e){return nt(e)||Le()}function nt(e){return xu.get(e)}function Xn(e,n){if(ee(e)){let o=nt(e);if(o)return w(n),o;let r=Sn(e);if(r)return w(n),N(r,r.calendar);let i=Ee(e);if(i)return w(n),Bi(i);let a=jt(e);return lc(a,e,n)}let t=bc(e,on);return w(n),t}function Fu(e,n){return xu.set(e,n),Ue(e),e}function jt(e){let n=Ru(e);return n===void 0?se:n}function Ru(e){let{calendar:n}=e;if(n!==void 0)return jo(n)}function jo(e){if(ee(e)){let n=nt(e)||Sn(e)||Ee(e)||Lo(e)||qo(e);return n||S(xa(e)),n.calendar}return(n=>on(Sc($(n))))(e)}var Cu=new WeakMap,Yu=Ae(_i,class{constructor(e=0,n=0,t=0,o=0,r=0,i=0,a=0,s=0,c=0,u=0){let d=Qe(Ve(bo,{years:e,months:n,weeks:t,days:o,hours:r,minutes:i,seconds:a,milliseconds:s,microseconds:c,nanoseconds:u}));Bu(this,B(d))}static from(e){return Y(q(e))}static compare(e,n,t=void 0){return qs(Ut,q(e),q(n),t)}get sign(){return re(this).sign}get blank(){return!re(this).sign}with(e){return Y(Ac(re(this),e))}negated(){return Y(ai(re(this)))}abs(){return Y(Ws(re(this)))}add(e,n=void 0){return Y(ii(Ut,0,re(this),q(e),n))}subtract(e,n=void 0){return Y(ii(Ut,1,re(this),q(e),n))}round(e){return Y(Bs(Ut,re(this),e))}total(e){return Is(Ut,re(this),e)}toLocaleString(e=void 0,n){let t=re(this);return Intl.DurationFormat?new Intl.DurationFormat(e,n).format(t):Yo(t,n)}toString(e=void 0){return Yo(re(this),e)}toJSON(){return Yo(re(this))}valueOf(){return qe()}},re,Fr);function Y(e){return Bu(Object.create(Yu.prototype),e)}function re(e){return na(e)||Le()}function na(e){return Cu.get(e)}function q(e){return ee(e)?na(e)||pc(e):Mc(e)}function Ut(e){if(e!==void 0){if(ee(e)){let n=Ee(e);if(n)return n;let t=nt(e);if(t)return t;let o=Sn(e);if(o)return N(o,o.calendar);let r=jt(e);return cc(fe,r,e)}return Tc(e,on)}}function Bu(e,n){return Cu.set(e,n),Ue(e),e}var $l=Object.defineProperties({},{...lt(\"Temporal.Now\"),...uo({timeZoneId(){return Vn()},instant(){return je(ue(Ao()))},zonedDateTimeISO(e=Vn()){let n=ne(fe(e));return te(De(Ao(),n))},plainDateTimeISO(e=Vn()){let n=Wo(ne(fe(e)));return Oe(Pe(n))},plainDateISO(e=Vn()){let n=Wo(ne(fe(e)));return ke(N(n))},plainTimeISO(e=Vn()){let n=Wo(ne(fe(e)));return tn(vn(n))}})}),Wu=Object.defineProperties({},{...lt(\"Temporal\"),...uo({PlainYearMonth:wu,PlainMonthDay:bu,PlainDate:Zu,PlainTime:Pu,PlainDateTime:ku,ZonedDateTime:fu,Instant:yu,Duration:Yu,Now:$l})});var Au=Vo||Wu;var of=Vo?Date.prototype.toTemporalInstant:Tu;var Uu;function Lu(e){Uu=e}function he(){let e=Uu??globalThis.Temporal;if(!e)throw new ReferenceError('temporals: no Temporal implementation found. Use a runtime with native Temporal (Node 22+), import \"temporal-polyfill/global\", or call configureTemporal(Temporal).');return e}function z(e){let n=e?.constructor?.name;switch(n){case\"PlainDate\":return\"date\";case\"PlainDateTime\":return\"datetime\";case\"ZonedDateTime\":return\"zoneddatetime\";case\"PlainYearMonth\":return\"yearmonth\";case\"PlainTime\":return\"time\";case\"Instant\":return\"instant\";default:throw new TypeError(`temporals: expected a Temporal point (PlainDate, PlainDateTime, ZonedDateTime, PlainYearMonth, PlainTime, Instant), got ${n??typeof e}`)}}function ta(e){return e===\"date\"||e===\"datetime\"||e===\"zoneddatetime\"}function Hl(e){return e===\"date\"||e===\"datetime\"||e===\"zoneddatetime\"||e===\"yearmonth\"}function g(e,n){return e.constructor.compare(e,n)}function $t(e,n,t){let o=e;return t&&Hl(z(e))?o.add(n,{overflow:t}):o.add(n)}var Gl=[\"years\",\"months\",\"weeks\",\"days\",\"hours\",\"minutes\",\"seconds\",\"milliseconds\",\"microseconds\",\"nanoseconds\"];function qu(e,n){if(n===1)return e;let t=e,o={},r=!1;for(let i of Gl){let a=t[i];a&&(o[i]=a*n,r=!0)}return r?o:e}function ju(e,n,t){return e.until(n,t)}function Ht(e){return e.toString()}function $u(e,n,t){let o=e.toZonedDateTime(n,{disambiguation:\"compatible\"});if(!o.toPlainDateTime().equals(e))return(t.dstGap??\"fire\")===\"skip\"?null:o;let r=e.toZonedDateTime(n,{disambiguation:\"earlier\"}),i=e.toZonedDateTime(n,{disambiguation:\"later\"});return r.equals(i)?o:(t.dstOverlap??\"first\")===\"second\"?i:r}var zl=[\"MO\",\"TU\",\"WE\",\"TH\",\"FR\",\"SA\",\"SU\"];function rn(e){let n=zl.indexOf(e);if(n<0)throw new RangeError(`temporals: invalid weekday \"${e}\"`);return n+1}function Hu(e){let n=z(e);if(n===\"date\")return e;if(n===\"datetime\"||n===\"zoneddatetime\")return e.toPlainDate();throw new TypeError(\"temporals: recurrence requires a date-bearing point (PlainDate, PlainDateTime, or ZonedDateTime)\")}function Gu(e,n){let t=z(e);if(t===\"date\")return n;if(t===\"datetime\"){let o=e.toPlainTime();return n.toPlainDateTime(o)}if(t===\"zoneddatetime\"){let o=e;return n.toZonedDateTime({timeZone:o.timeZoneId,plainTime:o.toPlainTime()})}throw new TypeError(\"temporals: cannot rebuild a non-date-bearing point onto a date\")}function $o(e,n,t){return e.with({year:n,month:t,day:1},{overflow:\"constrain\"}).daysInMonth}function oa(e,n,t,o){let r=e.with({year:n,month:t,day:1},{overflow:\"constrain\"}).dayOfWeek;return 1+(o-r+7)%7}var tt=class e{#e;constructor(n){this.#e=()=>{let t=n(),o=t;return typeof o[Symbol.iterator]==\"function\"?o[Symbol.iterator]():t}}[Symbol.iterator](){return this.#e()}static from(n){return typeof n==\"function\"?new e(n):new e(()=>n[Symbol.iterator]())}static of(...n){return new e(()=>n[Symbol.iterator]())}static empty(){return new e(function*(){})}map(n){let t=this;return new e(function*(){let o=0;for(let r of t)yield n(r,o++)})}filter(n){let t=this;return new e(function*(){let o=0;for(let r of t)n(r,o++)&&(yield r)})}flatMap(n){let t=this;return new e(function*(){let o=0;for(let r of t)yield*n(r,o++)})}take(n){let t=this;return new e(function*(){if(n<=0)return;let o=0;for(let r of t)if(yield r,++o>=n)return})}drop(n){let t=this;return new e(function*(){let o=0;for(let r of t)o++<n||(yield r)})}takeWhile(n){let t=this;return new e(function*(){let o=0;for(let r of t){if(!n(r,o++))return;yield r}})}dropWhile(n){let t=this;return new e(function*(){let o=0,r=!0;for(let i of t)r&&n(i,o++)||(r=!1,yield i)})}tap(n){let t=this;return new e(function*(){let o=0;for(let r of t)n(r,o++),yield r})}concat(...n){let t=this;return new e(function*(){yield*t;for(let o of n)yield*o})}pairwise(){let n=this;return new e(function*(){let t,o=!1;for(let r of n)o&&(yield[t,r]),t=r,o=!0})}toArray(){return[...this]}forEach(n){let t=0;for(let o of this)n(o,t++)}reduce(n,t){let o=t,r=0;for(let i of this)o=n(o,i,r++);return o}find(n){let t=0;for(let o of this)if(n(o,t++))return o}some(n){let t=0;for(let o of this)if(n(o,t++))return!0;return!1}every(n){let t=0;for(let o of this)if(!n(o,t++))return!1;return!0}first(){for(let n of this)return n}at(n){if(n<0)return;let t=0;for(let o of this)if(t++===n)return o}count(){let n=0;for(let t of this)n++;return n}};function Ho(e){let{start:n,end:t,count:o,step:r,inclusive:i=!1,overflow:a}=e;if(o!==void 0&&(o<0||!Number.isInteger(o)))throw new RangeError(\"temporals: range() count must be a non-negative integer\");return new tt(function*(){if(o===0)return;let s=$t(n,r,a),c=g(s,n);if(c===0&&o===void 0)throw new RangeError(\"temporals: range() step is zero with no count bound (would be infinite)\");let u=l=>{if(t===void 0)return!0;let m=g(l,t);return c>0?i?m<=0:m<0:c<0?i?m>=0:m>0:!0},d=0;for(;;){let l=d===0?n:$t(n,qu(r,d),a);if(!u(l)||(yield l,d++,o!==void 0&&d>=o))return}})}var xe=class e{start;end;constructor(n,t){if(z(n)!==z(t))throw new TypeError(\"temporals: Interval start and end must be the same Temporal type\");this.start=n,this.end=t}get isEmpty(){return g(this.start,this.end)>=0}contains(n){return g(this.start,n)<=0&&g(n,this.end)<0}overlaps(n){return g(this.start,n.end)<0&&g(n.start,this.end)<0}encloses(n){return g(this.start,n.start)<=0&&g(n.end,this.end)<=0}abuts(n){return g(this.end,n.start)===0||g(n.end,this.start)===0}relation(n){let t=this.start,o=this.end,r=n.start,i=n.end;if(g(o,r)<0)return\"before\";if(g(o,r)===0)return\"meets\";if(g(i,t)<0)return\"after\";if(g(i,t)===0)return\"metBy\";let a=g(t,r),s=g(o,i);return a===0&&s===0?\"equals\":a===0?s<0?\"starts\":\"startedBy\":s===0?a>0?\"finishes\":\"finishedBy\":a<0&&s>0?\"contains\":a>0&&s<0?\"during\":a<0?\"overlaps\":\"overlappedBy\"}intersection(n){let t=g(this.start,n.start)>=0?this.start:n.start,o=g(this.end,n.end)<=0?this.end:n.end;return g(t,o)>=0?null:new e(t,o)}toDuration(n){return ju(this.start,this.end,n)}points(n){return Ho({start:this.start,end:this.end,step:n})}toString(){return`${this.start.toString()}/${this.end.toString()}`}toJSON(){return this.toString()}static from(n){let t=0,o=-1;for(let c=0;c<n.length;c++){let u=n[c];if(u===\"[\")t++;else if(u===\"]\")t--;else if(u===\"/\"&&t===0){o=c;break}}if(o<0)throw new RangeError(`temporals: invalid ISO interval \"${n}\" (expected \"start/end\")`);let r=n.slice(0,o),i=n.slice(o+1),a=he(),s=c=>c.includes(\"[\")?a.ZonedDateTime.from(c):c.includes(\"T\")?a.PlainDateTime.from(c):a.PlainDate.from(c);return new e(s(r),s(i))}};var Gt=class e{intervals;constructor(n){this.intervals=n}static from(n){let t=[...n].filter(r=>!r.isEmpty);t.sort((r,i)=>g(r.start,i.start)||g(r.end,i.end));let o=[];for(let r of t){let i=o[o.length-1];i&&g(r.start,i.end)<=0?g(r.end,i.end)>0&&(o[o.length-1]=new xe(i.start,r.end)):o.push(r)}return new e(o)}static empty(){return new e([])}get isEmpty(){return this.intervals.length===0}[Symbol.iterator](){return this.intervals[Symbol.iterator]()}contains(n){return this.intervals.some(t=>t.contains(n))}union(n){let t=n instanceof e?n.intervals:[...n];return e.from([...this.intervals,...t])}intersection(n){let t=[];for(let o of this.intervals)for(let r of n.intervals){if(g(r.start,o.end)>=0)break;let i=o.intersection(r);i&&t.push(i)}return e.from(t)}difference(n){let t=[];for(let o of this.intervals){let r=[o];for(let i of n.intervals){if(g(i.end,o.start)<=0||g(i.start,o.end)>=0)continue;let a=[];for(let s of r){if(!s.overlaps(i)){a.push(s);continue}g(s.start,i.start)<0&&a.push(new xe(s.start,i.start)),g(i.end,s.end)<0&&a.push(new xe(i.end,s.end))}r=a}t.push(...r)}return e.from(t)}gaps(n){if(n)return e.from([n]).difference(this);let t=[];for(let o=1;o<this.intervals.length;o++){let r=this.intervals[o-1],i=this.intervals[o];g(r.end,i.start)<0&&t.push(new xe(r.end,i.start))}return new e(t)}totalDuration(){let n=he();if(this.intervals.length===0)return n.Duration.from({seconds:0});let t=z(this.intervals[0].start),o=t===\"date\"||t===\"yearmonth\"?\"day\":\"hour\",r=n.Duration.from({seconds:0});for(let i of this.intervals)r=r.add(i.toDuration({largestUnit:o}));return r}toString(){return this.intervals.map(n=>n.toString()).join(\", \")}};function Go(){return he().PlainDate}function ra(e,n){if(!n)return e;let t=n===\"uk\"?\"uk\":\"us\";return e.dayOfWeek===6?t===\"uk\"?e.add({days:2}):e.subtract({days:1}):e.dayOfWeek===7?e.add({days:1}):e}function sn(e,n,t={}){return o=>{let r=Go().from({year:o,month:e,day:n},{overflow:\"reject\"});return ra(r,t.observed??!1)}}function Jt(e=0,n={}){return t=>{let o=t%19,r=Math.floor(t/100),i=t%100,a=Math.floor(r/4),s=r%4,c=Math.floor((r+8)/25),u=Math.floor((r-c+1)/3),d=(19*o+r-a-u+15)%30,l=Math.floor(i/4),m=i%4,f=(32+2*s+2*l-d-m)%7,p=Math.floor((o+11*d+22*f)/451),h=Math.floor((d+f-7*p+114)/31),y=(d+f-7*p+114)%31+1,b=Go().from({year:t,month:h,day:y}).add({days:e});return ra(b,n.observed??!1)}}function an(e,n,t,o={}){let r=rn(n);return i=>{let a=Go().from({year:i,month:e,day:1}),s=a.daysInMonth,c=1+(r-a.dayOfWeek+7)%7,u;if(t>0){if(u=c+(t-1)*7,u>s)return null}else if(u=c+Math.floor((s-c)/7)*7+(t+1)*7,u<1)return null;return ra(a.with({day:u}),o.observed??!1)}}var zt=class e{rules;cache=new Map;constructor(n){this.rules=n}static of(...n){return new e(n)}yearSet(n){let t=this.cache.get(n);return t||(t=new Set(this.rules.map(o=>o(n)).filter(o=>o!==null).map(o=>o.toString())),this.cache.set(n,t)),t}has(n){let t=n.toString();return this.yearSet(n.year).has(t)||this.yearSet(n.year-1).has(t)||this.yearSet(n.year+1).has(t)}inYear(n){return[...this.yearSet(n)].map(t=>Go().from(t)).sort((t,o)=>g(t,o))}};function Vu(){return zt.of(sn(1,1,{observed:!0}),an(1,\"MO\",3),an(2,\"MO\",3),an(5,\"MO\",-1),sn(6,19,{observed:!0}),sn(7,4,{observed:!0}),an(9,\"MO\",1),an(10,\"MO\",2),sn(11,11,{observed:!0}),an(11,\"TH\",4),sn(12,25,{observed:!0}))}var zu=4e3,Vt=class{weekend;holidays;constructor(n={}){let t=n.weekend??[\"SA\",\"SU\"];this.weekend=new Set(t.map(rn)),this.holidays=n.holidays}toDate(n){let t=n;return t.toPlainDate?t.toPlainDate():n}isBusinessDay(n){let t=this.toDate(n);return this.weekend.has(t.dayOfWeek)?!1:!this.holidays?.has(t)}nextBusinessDay(n){let t=n.add({days:1});for(let o=0;o<zu;o++,t=t.add({days:1}))if(this.isBusinessDay(t))return t;throw new RangeError(\"temporals: no business day found (check weekend/holiday config)\")}previousBusinessDay(n){let t=n.subtract({days:1});for(let o=0;o<zu;o++,t=t.subtract({days:1}))if(this.isBusinessDay(t))return t;throw new RangeError(\"temporals: no business day found (check weekend/holiday config)\")}addBusinessDays(n,t){let o=n,r=t>=0?1:-1;for(let i=Math.abs(t);i>0;i--)o=r>0?this.nextBusinessDay(o):this.previousBusinessDay(o);return o}businessDaysBetween(n,t){let o=0;for(let r=n;g(r,t)<0;r=r.add({days:1}))this.isBusinessDay(r)&&o++;return o}businessDays(n){return Ho({start:n.start,end:n.end,step:{days:1}}).filter(t=>this.isBusinessDay(t))}nthBusinessDay(n,t,o){let r=he().PlainDate.from({year:n,month:t,day:1}),i=[];for(let s=1;s<=r.daysInMonth;s++){let c=r.with({day:s});this.isBusinessDay(c)&&i.push(c)}let a=o>0?o-1:i.length+o;return i[a]??null}},_t=class{windows;calendar;dst;constructor(n={}){this.dst=n.dst??\"compatible\",this.windows=(n.windows??[[\"09:00\",\"17:00\"]]).slice().sort((t,o)=>t[0].localeCompare(o[0])),this.calendar=n.calendar}dayWindows(n,t){if(this.calendar&&!this.calendar.isBusinessDay(n))return[];let o=he();return this.windows.map(([r,i])=>{let a=o.PlainTime.from(r),s=o.PlainTime.from(i),c=o.PlainTime.compare(s,a)<=0,u=this.dst,d=n.toPlainDateTime(a).toZonedDateTime(t,{disambiguation:u}),l=(c?n.add({days:1}):n).toPlainDateTime(s).toZonedDateTime(t,{disambiguation:u});return new xe(d,l)})}intervalsBetween(n,t){let o=n.timeZoneId,r=t.toPlainDate(),i=[];for(let a=n.toPlainDate().subtract({days:1});g(a,r)<=0;a=a.add({days:1}))i.push(...this.dayWindows(a,o));return Gt.from(i).intersection(Gt.from([new xe(n,t)]))}isOpen(n){let t=n.timeZoneId,o=n.toPlainDate();return[...this.dayWindows(o.subtract({days:1}),t),...this.dayWindows(o,t)].some(i=>i.contains(n))}nextOpen(n){return this.intervalsBetween(n,n.add({days:366})).intervals[0]?.start}};function _u(e,n,t){return t.intervalsBetween(e,n).totalDuration()}var Vl=[[\"years\",\"year\",\"y\"],[\"months\",\"month\",\"mo\"],[\"weeks\",\"week\",\"w\"],[\"days\",\"day\",\"d\"],[\"hours\",\"hour\",\"h\"],[\"minutes\",\"minute\",\"m\"],[\"seconds\",\"second\",\"s\"],[\"milliseconds\",\"millisecond\",\"ms\"],[\"microseconds\",\"microsecond\",\"\\xB5s\"],[\"nanoseconds\",\"nanosecond\",\"ns\"]],_l={second:7,millisecond:8,microsecond:9,nanosecond:10};function ia(e,n={}){let{short:t=!1,max:o=1/0,locale:r,precision:i=\"second\"}=n,a=Vl.slice(0,_l[i]),s=e,c=Intl.DurationFormat;if(r&&c){let d={},l=0;for(let[m]of a){let f=s[m]??0;if(f!==0&&(d[m]=f,++l>=o))break}return new c(r,{style:t?\"narrow\":\"long\"}).format(d)}let u=[];for(let[d,l,m]of a){let f=s[d]??0;if(f!==0&&(u.push(t?`${f}${m}`:`${f} ${l}${Math.abs(f)===1?\"\":\"s\"}`),u.length>=o))break}return u.length===0?t?\"0s\":\"0 seconds\":u.join(t?\" \":\", \")}var Jl=[[\"years\",\"year\"],[\"months\",\"month\"],[\"weeks\",\"week\"],[\"days\",\"day\"],[\"hours\",\"hour\"],[\"minutes\",\"minute\"],[\"seconds\",\"second\"]];function Ju(e,n,t={}){let o=z(e),r=o===\"time\"||o===\"instant\"?\"hour\":\"year\",i=e.until(n,{largestUnit:r}),a=new Intl.RelativeTimeFormat(t.locale,{numeric:t.numeric??\"auto\"}),s=i;for(let[c,u]of Jl){let d=s[c]??0;if(d!==0&&c===\"days\"&&(o===\"zoneddatetime\"||o===\"datetime\")&&(d=Kl(e,n)),d!==0)return a.format(d,u)}return a.format(0,\"second\")}function Kl(e,n){return(z(e)===\"zoneddatetime\"?e.withTimeZone(n.timeZoneId):e).toPlainDate().until(n.toPlainDate(),{largestUnit:\"day\"}).days}var Ql={y:\"years\",mo:\"months\",w:\"weeks\",d:\"days\",h:\"hours\",m:\"minutes\",s:\"seconds\",ms:\"milliseconds\"};function aa(e){let n={},t=/(-?\\d+(?:\\.\\d+)?)\\s*(mo|ms|[ywdhms])/gi,o,r=!1;for(;(o=t.exec(e))!==null;){r=!0;let i=Ql[o[2].toLowerCase()];if(!i)throw new RangeError(`temporals: unknown duration unit \"${o[2]}\"`);n[i]=(n[i]??0)+Number(o[1])}if(!r)throw new RangeError(`temporals: could not parse duration \"${e}\"`);return he().Duration.from(n)}var Ku=1e4;function Xu(e){return typeof e==\"string\"?{wd:rn(e)}:{wd:rn(e.weekday),nth:e.nth}}function Xl(e,n){let t=[];for(let o=e;o<=n;o++)t.push(o);return t}function ca(e,n){let t=e>0?e:n+e+1;return t>=1&&t<=n?t:null}function em(e,n,t,o,r){let i=$o(e,n,t),a=oa(e,n,t,o);if(r>0){let u=a+(r-1)*7;return u<=i?u:null}let c=a+Math.floor((i-a)/7)*7+(r+1)*7;return c>=1?c:null}function nm(e,n,t,o){let r=$o(e,n,t),i=[];for(let a=oa(e,n,t,o);a<=r;a+=7)i.push(a);return i}function tm(e,n){return e.with({year:n,month:1,day:1},{overflow:\"constrain\"}).daysInYear}function om(e,n,t){let o=tm(e,n),r=t>0?t:o+t+1;return r<1||r>o?null:e.with({year:n,month:1,day:1},{overflow:\"constrain\"}).add({days:r-1})}function rm(e,n){return e.with({year:n,month:12,day:28},{overflow:\"constrain\"}).weekOfYear??52}function Qu(e,n,t,o,r,i){let a=$o(e,n,t),s=o&&o.length>0,c=r&&r.length>0,u;if(s){u=[];for(let m of o){let f=ca(m,a);f!==null&&u.push(f)}}let d;if(c){let m=new Set;for(let{wd:f,nth:p}of r)if(p!==void 0){let h=em(e,n,t,f,p);h!==null&&m.add(h)}else for(let h of nm(e,n,t,f))m.add(h);d=[...m]}let l;if(u&&d){let m=new Set(d);l=u.filter(f=>m.has(f))}else u?l=u:d?l=d:i!==void 0?l=i<=a?[i]:[]:l=[];return[...new Set(l)].sort((m,f)=>m-f)}function im(e,n,t,o){let{byMonth:r,byMonthDay:i}=e,a=s=>!r||r.includes(s);switch(e.freq){case\"daily\":{let s=o.date;if(!a(s.month))return[];if(i&&i.length>0&&!i.some(u=>ca(u,s.daysInMonth)===s.day))return[];if(e.byYearDay&&e.byYearDay.length>0){let c=s.daysInYear;if(!e.byYearDay.some(d=>(d>0?d:c+d+1)===s.dayOfYear))return[]}return t&&t.length>0&&!t.some(c=>c.wd===s.dayOfWeek)?[]:[s]}case\"weekly\":{let s=rn(e.weekStart??\"MO\"),c=t&&t.length>0?t.map(m=>m.wd):[n.dayOfWeek],u=new Set(c),d=[],l=o.weekStartDate;for(let m=0;m<7;m++)u.has(l.dayOfWeek)&&a(l.month)&&d.push(l),l=l.add({days:1});return d}case\"monthly\":{let s=o.anchor,c=s.month;return a(c)?Qu(s,s.year,c,i,t,n.day).map(d=>s.with({day:d})):[]}case\"yearly\":{let s=o.anchor,c=s.year,u=i&&i.length>0,d=t&&t.length>0,l=e.byYearDay&&e.byYearDay.length>0;if(e.byWeekNo&&e.byWeekNo.length>0){let y=new Set(e.byWeekNo.map(F=>F>0?F:rm(n,c)+F+1)),b=new Set(d?t.map(F=>F.wd):[n.dayOfWeek]),v=[],D=n.with({year:c,month:1,day:1},{overflow:\"constrain\"}).subtract({days:7}),I=n.with({year:c,month:12,day:31},{overflow:\"constrain\"}).add({days:7});for(;g(D,I)<=0;D=D.add({days:1}))D.yearOfWeek===c&&y.has(D.weekOfYear??-1)&&b.has(D.dayOfWeek)&&a(D.month)&&v.push(D);return v}if(l&&!u){let y=d?new Set(t.map(D=>D.wd)):null,b=[];for(let D of e.byYearDay){let I=om(n,c,D);I&&a(I.month)&&(y&&!y.has(I.dayOfWeek)||b.push(I))}let v=new Set;return b.filter(D=>{let I=Ht(D);return v.has(I)?!1:(v.add(I),!0)}).sort((D,I)=>g(D,I))}let f=s.monthsInYear,p=r??(u||d?Xl(1,f):[n.month]),h=[];for(let y of p){if(y<1||y>f)continue;let b=s.with({month:y,day:1},{overflow:\"constrain\"}),v=Qu(b,c,y,i,t,n.day);for(let D of v)h.push(b.with({day:D}))}return h}default:throw new RangeError(`temporals: recurrence freq \"${e.freq}\" is not supported (yearly/monthly/weekly/daily only)`)}}function am(e,n){let t=(e.dayOfWeek-n+7)%7;return e.subtract({days:t})}function sm(e,n){switch(e.freq){case\"daily\":return{date:n};case\"weekly\":return{weekStartDate:am(n,rn(e.weekStart??\"MO\"))};case\"monthly\":return{anchor:n.with({day:1})};case\"yearly\":return{anchor:n.with({month:1,day:1},{overflow:\"constrain\"})};default:throw new RangeError(`temporals: unsupported freq \"${e.freq}\"`)}}function cm(e,n){let t=e.interval??1;switch(e.freq){case\"daily\":return{date:n.date.add({days:t})};case\"weekly\":return{weekStartDate:n.weekStartDate.add({weeks:t})};case\"monthly\":return{anchor:n.anchor.add({months:t})};case\"yearly\":return{anchor:n.anchor.add({years:t})};default:throw new RangeError(`temporals: unsupported freq \"${e.freq}\"`)}}function um(e,n,t){let o=z(e);if(o===\"zoneddatetime\"){let l=e,m=l.timeZoneId,f=l.toPlainTime(),p=t.byHour&&t.byHour.length?t.byHour:[f.hour],h=t.byMinute&&t.byMinute.length?t.byMinute:[f.minute],y=t.bySecond&&t.bySecond.length?t.bySecond:[f.second],b={dstGap:t.dstGap,dstOverlap:t.dstOverlap},v=[];for(let D of p)for(let I of h)for(let F of y){let j=n.toPlainDateTime(f.with({hour:D,minute:I,second:F})),K=$u(j,m,b);K&&v.push(K)}return v}let r=Gu(e,n);if(!(t.byHour&&t.byHour.length||t.byMinute&&t.byMinute.length||t.bySecond&&t.bySecond.length)||o===\"date\")return[r];let a=r,s=t.byHour&&t.byHour.length?t.byHour:[a.hour],c=t.byMinute&&t.byMinute.length?t.byMinute:[a.minute],u=t.bySecond&&t.bySecond.length?t.bySecond:[a.second],d=[];for(let l of s)for(let m of c)for(let f of u)d.push(a.with({hour:l,minute:m,second:f}));return d}function dm(e,n){if(!n||n.length===0)return e;let t=[];for(let o of n){let r=o>0?o-1:e.length+o;r>=0&&r<e.length&&t.push(e[r])}return t}var sa=new Set([\"hourly\",\"minutely\",\"secondly\"]);function lm(e){return e===\"datetime\"||e===\"zoneddatetime\"||e===\"time\"}function mm(e){let n=z(e.start);if(sa.has(e.freq)){if(!lm(n))throw new TypeError(\"temporals: sub-daily recurrence requires a time-bearing start (PlainDateTime, ZonedDateTime, or PlainTime)\")}else if(!ta(n))throw new TypeError(\"temporals: recur() requires a date-bearing start (PlainDate, PlainDateTime, or ZonedDateTime)\");if(e.byWeekNo&&e.freq!==\"yearly\")throw new RangeError(\"temporals: BYWEEKNO is only valid with FREQ=YEARLY\");if(e.bySetPos&&sa.has(e.freq))throw new RangeError(\"temporals: BYSETPOS with sub-daily frequencies is not supported\");if(e.interval!==void 0&&(!Number.isInteger(e.interval)||e.interval<1))throw new RangeError(\"temporals: recur() interval must be a positive integer\")}var fm=1e6;function hm(e,n,t){let o=z(e),r=e;if(ta(o)){if(n.byMonth&&!n.byMonth.includes(r.month)||n.byMonthDay&&!n.byMonthDay.some(i=>ca(i,r.daysInMonth)===r.day))return!1;if(n.byYearDay){let i=r.daysInYear;if(!n.byYearDay.some(a=>(a>0?a:i+a+1)===r.dayOfYear))return!1}if(t&&t.length>0&&!t.some(i=>i.wd===r.dayOfWeek))return!1}return!(n.byHour&&!n.byHour.includes(r.hour)||n.byMinute&&!n.byMinute.includes(r.minute)||n.bySecond&&!n.bySecond.includes(r.second))}function*pm(e){let n=e.start,t=e.interval??1,o=e.freq===\"hourly\"?{hours:t}:e.freq===\"minutely\"?{minutes:t}:{seconds:t},r=e.byWeekday?.map(Xu),i=n,a=0;for(;;){if(e.until!==void 0&&g(i,e.until)>0)return;if(hm(i,e,r))yield i,a=0;else if(++a>fm)throw new RangeError(\"temporals: sub-daily recurrence matched nothing for a very long span (likely an impossible rule)\");i=$t(i,o)}}function*ym(e){let n=e.start,t=Hu(n),o=e.byWeekday?.map(Xu),r=sm(e,t),i=0;for(;;){let a=im(e,t,o,r),s=[];for(let d of a)s.push(...um(n,d,e));s.sort((d,l)=>g(d,l));let c=new Set;s=s.filter(d=>{let l=Ht(d);return c.has(l)?!1:(c.add(l),!0)}),s=dm(s,e.bySetPos).sort((d,l)=>g(d,l));let u=!1;for(let d of s)g(d,n)<0||(yield d,u=!0);if(u)i=0;else if(++i>Ku)throw new RangeError(`temporals: recurrence produced no occurrences for ${Ku} consecutive periods (likely an impossible rule)`);r=cm(e,r)}}function*Tm(e,n){let t=n.start,o=new Set((n.exclude??[]).map(l=>Ht(l))),r=(n.include??[]).filter(l=>g(l,t)>=0).sort((l,m)=>g(l,m)),{until:i,count:a}=n,s=0,c=0,u,d=e.next();for(;;){let l=!d.done,m=s<r.length;if(!l&&!m)return;let f,p;if(l&&(!m||g(d.value,r[s])<=0)?(f=d.value,p=!0):(f=r[s],p=!1),i!==void 0&&g(f,i)>0)return;p?d=e.next():s++;let h=Ht(f);if(!(o.has(h)||h===u)&&(u=h,yield f,a!==void 0&&++c>=a))return}}function ed(e){mm(e);let n=sa.has(e.freq)?()=>pm(e):()=>ym(e);return new tt(()=>Tm(n(),e))}var gm={YEARLY:\"yearly\",MONTHLY:\"monthly\",WEEKLY:\"weekly\",DAILY:\"daily\",HOURLY:\"hourly\",MINUTELY:\"minutely\",SECONDLY:\"secondly\"};function Dm(e){let n=/^([+-]?\\d+)?(MO|TU|WE|TH|FR|SA|SU)$/.exec(e.trim());if(!n)throw new RangeError(`temporals: invalid BYDAY token \"${e}\"`);let t=n[2];return n[1]?{weekday:t,nth:Number(n[1])}:t}function cn(e){return e.split(\",\").map(n=>Number(n.trim()))}function bm(e,n){let t=e.replace(/^RRULE:/i,\"\"),o={start:n,freq:\"daily\"},r=!1;for(let i of t.split(\";\")){if(!i)continue;let a=i.indexOf(\"=\"),s=(a===-1?i:i.slice(0,a)).trim().toUpperCase(),c=a===-1?\"\":i.slice(a+1).trim();switch(s){case\"FREQ\":{let u=gm[c.toUpperCase()];if(!u)throw new RangeError(`temporals: unsupported FREQ \"${c}\"`);o.freq=u,r=!0;break}case\"INTERVAL\":o.interval=Number(c);break;case\"COUNT\":o.count=Number(c);break;case\"UNTIL\":{if(n==null)throw new RangeError(\"temporals: RRULE has UNTIL but no DTSTART was provided\");if(z(n)===\"zoneddatetime\"){let u=n,d=u.toInstant().constructor;o.until=d.from(c).toZonedDateTimeISO(u.timeZoneId)}else{let u=n.constructor;o.until=u.from(c)}break}case\"BYMONTH\":o.byMonth=cn(c);break;case\"BYWEEKNO\":o.byWeekNo=cn(c);break;case\"BYYEARDAY\":o.byYearDay=cn(c);break;case\"BYMONTHDAY\":o.byMonthDay=cn(c);break;case\"BYDAY\":o.byWeekday=c.split(\",\").map(Dm);break;case\"BYHOUR\":o.byHour=cn(c);break;case\"BYMINUTE\":o.byMinute=cn(c);break;case\"BYSECOND\":o.bySecond=cn(c);break;case\"BYSETPOS\":o.bySetPos=cn(c);break;case\"WKST\":o.weekStart=c.toUpperCase();break;default:throw new RangeError(`temporals: unsupported RRULE part \"${s}\"`)}}if(!r)throw new RangeError(\"temporals: RRULE is missing FREQ\");return o}function ua(e,n){return ed(bm(e,n))}ed.fromString=ua;var od=globalThis.Temporal;Lu(od??Au);var Kt=()=>he(),vm=od?\"native\":\"temporal-polyfill\",nd=[\"MO\",\"TU\",\"WE\",\"TH\",\"FR\",\"SA\",\"SU\"];function da(e){if(typeof e==\"number\"&&Number.isInteger(e)&&e>=1&&e<=7)return nd[e-1];let n=String(e??\"\").trim().slice(0,2).toUpperCase(),t=nd.find(o=>o===n);if(!t)throw new RangeError(`not a weekday: ${JSON.stringify(e)} (use MO-SU, or 1-7 with 1 for Monday)`);return t}var td={easter:()=>[Jt(0)],\"good-friday\":()=>[Jt(-2)],\"easter-monday\":()=>[Jt(1)]};function rd(e){if(typeof e==\"string\"){let n=e.trim().toLowerCase();if(n===\"us-federal\")return Im();if(td[n])return td[n]();let t=/^(\\d{4})-(\\d{2})-(\\d{2})$/.exec(n);if(t){let o=Kt().PlainDate.from(n);return[r=>r===o.year?o:null]}if(t=/^(\\d{1,2})-(\\d{1,2})$/.exec(n),t)return[sn(Number(t[1]),Number(t[2]))];throw new RangeError(`not a holiday: ${JSON.stringify(e)} (use us-federal, easter, good-friday, easter-monday, a date like 2026-12-24, a month and day like 12-25, or an object)`)}if(e&&typeof e==\"object\"){if(\"easter\"in e)return[Jt(Number(e.easter)||0)];if(\"weekday\"in e)return[an(Number(e.month),da(e.weekday),Number(e.nth))];if(\"day\"in e)return[sn(Number(e.month),Number(e.day),{observed:e.observed??!1})]}throw new RangeError(`not a holiday: ${JSON.stringify(e)}`)}function Im(){let e=Vu();return Array.from({length:11},(n,t)=>o=>e.inYear(o)[t]??null)}function id(e={}){let n=(e.weekend??[\"SA\",\"SU\"]).map(da),t=(e.holidays??[]).flatMap(rd);return new Vt({weekend:n,holidays:t.length?zt.of(...t):void 0})}function wm(e={}){let n=(Array.isArray(e.windows)&&e.windows.length?e.windows:[[\"09:00\",\"17:00\"]]).map(t=>{if(!Array.isArray(t)||t.length!==2)throw new RangeError(`a window is [open, close], like [\"09:00\", \"17:00\"]: ${JSON.stringify(t)}`);return[String(t[0]),String(t[1])]});return new _t({windows:n,calendar:id(e)})}function ad(e,n){let t=Kt(),o=String(n||\"UTC\");if(typeof e==\"number\")return t.Instant.fromEpochMilliseconds(e).toZonedDateTimeISO(o);let r=String(e??\"\").trim();if(!r)throw new RangeError(\"no time given\");return r.includes(\"[\")?t.ZonedDateTime.from(r).withTimeZone(o):/(?:Z|[+-]\\d{2}(?::?\\d{2})?)$/i.test(r)&&r.includes(\"T\")?t.Instant.from(r).toZonedDateTimeISO(o):t.PlainDateTime.from(r).toZonedDateTime(o)}function Mm(e,n=\"UTC\"){let t=String(e??\"\").trim();return/^\\d{4}-\\d{2}-\\d{2}$/.test(t)?Kt().PlainDate.from(t):ad(e,n).toPlainDate()}function la(e){let n=Kt();if(typeof e==\"number\"){if(!Number.isFinite(e))throw new RangeError(`not a duration: ${e}`);return n.Duration.from({milliseconds:Math.trunc(e)}).round({largestUnit:\"day\",smallestUnit:\"millisecond\"})}let t=String(e??\"\").trim();return/^-?\\d+(?:\\.\\d+)?$/.test(t)?la(Number(t)):/^-?P/i.test(t)?n.Duration.from(t.toUpperCase()):aa(t)}function Sm(e){if(e.years||e.months||e.weeks)throw new RangeError(`years, months and weeks have no fixed length: ${e.toString()}`);return e.total({unit:\"millisecond\"})}function Pm(e,n={}){let t=la(e);return!t.years&&!t.months&&!t.weeks&&(t=t.round({largestUnit:n.largestUnit||\"day\",smallestUnit:\"millisecond\"})),ia(t,n)}var Nm=e=>e.toString({smallestUnit:\"second\"});var Om=()=>Kt();return md(km);})();\nreturn temporals;\n}\n"
455
+ }
456
+ ]
457
+ },
458
+ "tests": [
459
+ {
460
+ "name": "Friday afternoon to Monday morning skips the weekend",
461
+ "inputs": {
462
+ "start": "2026-10-23T15:00:00Z",
463
+ "end": "2026-10-26T11:00:00Z",
464
+ "zone": "UTC",
465
+ "windows": [
466
+ [
467
+ "09:00",
468
+ "17:00"
469
+ ]
470
+ ],
471
+ "weekend": [
472
+ "SA",
473
+ "SU"
474
+ ],
475
+ "holidays": []
476
+ },
477
+ "expect": {
478
+ "result.ms": 14400000,
479
+ "result.hours": 4,
480
+ "result.words": "4 hours",
481
+ "result.businessDays": 2
482
+ }
483
+ },
484
+ {
485
+ "name": "Christmas Day is a holiday",
486
+ "inputs": {
487
+ "start": "2026-12-24T09:00:00Z",
488
+ "end": "2026-12-26T00:00:00Z",
489
+ "zone": "UTC",
490
+ "windows": [
491
+ [
492
+ "09:00",
493
+ "17:00"
494
+ ]
495
+ ],
496
+ "weekend": [
497
+ "SA",
498
+ "SU"
499
+ ],
500
+ "holidays": [
501
+ "12-25"
502
+ ]
503
+ },
504
+ "expect": {
505
+ "result.hours": 8,
506
+ "result.businessDays": 1,
507
+ "result.summary": "8 hours of working time over 1 working day"
508
+ }
509
+ },
510
+ {
511
+ "name": "two windows a day, with a lunch break",
512
+ "inputs": {
513
+ "start": "2026-10-21T08:00:00Z",
514
+ "end": "2026-10-21T18:00:00Z",
515
+ "zone": "UTC",
516
+ "windows": [
517
+ [
518
+ "09:00",
519
+ "12:00"
520
+ ],
521
+ [
522
+ "13:00",
523
+ "17:30"
524
+ ]
525
+ ],
526
+ "weekend": [
527
+ "SA",
528
+ "SU"
529
+ ],
530
+ "holidays": []
531
+ },
532
+ "expect": {
533
+ "result.words": "7 hours, 30 minutes"
534
+ }
535
+ }
536
+ ],
537
+ "hosts": []
538
+ },
539
+ {
540
+ "id": "add-business-days",
541
+ "title": "Add business days",
542
+ "description": "Move a date by a number of working days (negative goes back), skipping the weekend and holidays, and list the days off it skipped. Three working days from 23 December 2026 with the US federal holidays is Tuesday 29 December.",
543
+ "icon": "<svg viewBox=\"0 0 16 16\"><path d=\"M2.5 4h11v9.5h-11zM2.5 7h11M5.5 2.5v3M10.5 2.5v3M6 10.2h4M8.6 8.8l1.4 1.4-1.4 1.4\" stroke=\"currentColor\" fill=\"none\" stroke-width=\"1.2\"/></svg>",
544
+ "canvas": {
545
+ "format": "viaframe-canvas",
546
+ "version": 3,
547
+ "name": "add-business-days",
548
+ "panes": [
549
+ {
550
+ "id": "i_date",
551
+ "type": "input",
552
+ "name": "date",
553
+ "rect": {
554
+ "x": 0,
555
+ "y": 0,
556
+ "width": 260
557
+ },
558
+ "inputs": [],
559
+ "widget": {
560
+ "kind": "text",
561
+ "value": "2026-12-23"
562
+ },
563
+ "control": {
564
+ "group": "When",
565
+ "help": "A date (2026-12-23), or a time whose date in `zone` is meant."
566
+ }
567
+ },
568
+ {
569
+ "id": "i_days",
570
+ "type": "input",
571
+ "name": "days",
572
+ "rect": {
573
+ "x": 0,
574
+ "y": 150,
575
+ "width": 260
576
+ },
577
+ "inputs": [],
578
+ "widget": {
579
+ "kind": "number",
580
+ "value": 3
581
+ },
582
+ "control": {
583
+ "group": "When",
584
+ "help": "Working days to move: negative goes back."
585
+ }
586
+ },
587
+ {
588
+ "id": "i_zone",
589
+ "type": "input",
590
+ "name": "zone",
591
+ "rect": {
592
+ "x": 0,
593
+ "y": 240,
594
+ "width": 260
595
+ },
596
+ "inputs": [],
597
+ "widget": {
598
+ "kind": "text",
599
+ "value": "America/New_York"
600
+ },
601
+ "control": {
602
+ "group": "When",
603
+ "help": "Only for a time given as `date`: the zone its date is read in.",
604
+ "advanced": true
605
+ }
606
+ },
607
+ {
608
+ "id": "i_weekend",
609
+ "type": "input",
610
+ "name": "weekend",
611
+ "rect": {
612
+ "x": 0,
613
+ "y": 390,
614
+ "width": 260
615
+ },
616
+ "inputs": [],
617
+ "widget": {
618
+ "kind": "json",
619
+ "value": "[\"SA\",\"SU\"]"
620
+ },
621
+ "valueType": "array",
622
+ "control": {
623
+ "group": "Schedule",
624
+ "help": "The days that are never working days: MO TU WE TH FR SA SU (or 1-7, 1 is Monday)."
625
+ }
626
+ },
627
+ {
628
+ "id": "i_holidays",
629
+ "type": "input",
630
+ "name": "holidays",
631
+ "rect": {
632
+ "x": 0,
633
+ "y": 540,
634
+ "width": 260
635
+ },
636
+ "inputs": [],
637
+ "widget": {
638
+ "kind": "json",
639
+ "value": "[\"us-federal\"]"
640
+ },
641
+ "valueType": "array",
642
+ "control": {
643
+ "group": "Schedule",
644
+ "help": "Days off: us-federal (the 11 US federal holidays, weekend-observed), easter, good-friday, easter-monday, a date (2026-12-24), a month and day every year (12-25), or { month, day, observed }, { month, weekday, nth } ({ month: 11, weekday: \"TH\", nth: 4 }), { easter: offset }."
645
+ }
646
+ },
647
+ {
648
+ "id": "result",
649
+ "type": "eval",
650
+ "name": "result",
651
+ "rect": {
652
+ "x": 340,
653
+ "y": 0,
654
+ "width": 380
655
+ },
656
+ "inputs": [
657
+ {
658
+ "name": "date",
659
+ "source": "i_date"
660
+ },
661
+ {
662
+ "name": "days",
663
+ "source": "i_days"
664
+ },
665
+ {
666
+ "name": "zone",
667
+ "source": "i_zone"
668
+ },
669
+ {
670
+ "name": "weekend",
671
+ "source": "i_weekend"
672
+ },
673
+ {
674
+ "name": "holidays",
675
+ "source": "i_holidays"
676
+ }
677
+ ],
678
+ "autorun": true,
679
+ "mode": "function",
680
+ "outputs": [
681
+ {
682
+ "name": "date"
683
+ },
684
+ {
685
+ "name": "weekday"
686
+ },
687
+ {
688
+ "name": "daysOff"
689
+ },
690
+ {
691
+ "name": "summary"
692
+ }
693
+ ],
694
+ "code": "const T = temporalsLibrary();\nconst calendar = T.businessCalendar({ weekend, holidays });\nconst from = T.plainDate(date, zone);\nconst n = Math.trunc(Number(days) || 0);\nconst to = calendar.addBusinessDays(from, n);\n// The days in between that weren't working days (weekends and holidays), in order. (Not named\n// `skipped`: pane code has skip, skipped, firstOf, env and requireEnv in its own scope.)\nconst daysOff = [];\nconst step = n >= 0 ? 1 : -1;\nfor (let d = from.add({ days: step }); T.Temporal().PlainDate.compare(d, to) * step < 0; d = d.add({ days: step })) if (!calendar.isBusinessDay(d)) daysOff.push(d.toString());\nconst weekday = to.toLocaleString(\"en-US\", { weekday: \"long\" });\nreturn { date: to.toString(), weekday, daysOff, summary: n + \" working day\" + (Math.abs(n) === 1 ? \"\" : \"s\") + \" from \" + from.toString() + \" is \" + weekday + \" \" + to.toString() + (daysOff.length ? \" (skipping \" + daysOff.length + \" day\" + (daysOff.length === 1 ? \"\" : \"s\") + \" off)\" : \"\") };\n\n// @johnhenry/temporals 0.3.0 and temporal-polyfill 1.0.1 (both MIT), bundled from viaframe/src/lib.ts by viaframe/scripts/build.mjs\n// in github.com/johnhenry/temporals. A pane package can't import a module or share code between\n// its panes, so each pane carries this copy; it uses the runtime's own Temporal when there is one.\nfunction temporalsLibrary() {\n\"use strict\";var temporals=(()=>{var zo=Object.defineProperty;var sd=Object.getOwnPropertyDescriptor;var cd=Object.getOwnPropertyNames;var ud=Object.prototype.hasOwnProperty;var dd=(e,n)=>{for(var t in n)zo(e,t,{get:n[t],enumerable:!0})},ld=(e,n,t,o)=>{if(n&&typeof n==\"object\"||typeof n==\"function\")for(let r of cd(n))!ud.call(e,r)&&r!==t&&zo(e,r,{get:()=>n[r],enumerable:!(o=sd(n,r))||o.enumerable});return e};var md=e=>ld(zo({},\"__esModule\",{value:!0}),e);var km={};dd(km,{BusinessCalendar:()=>Vt,Temporal:()=>Om,WorkingHours:()=>_t,businessCalendar:()=>id,businessDuration:()=>_u,duration:()=>la,durationMs:()=>Sm,formatRelative:()=>Ju,holidayRules:()=>rd,humanizeDuration:()=>ia,iso:()=>Nm,parseDuration:()=>aa,plainDate:()=>Mm,recurFromString:()=>ua,temporalSource:()=>vm,weekdayCode:()=>da,words:()=>Pm,workingHours:()=>wm,zoned:()=>ad});var Vo=globalThis.Temporal;var ma=(e,n)=>`Non-positive ${e}: ${n}`,fa=(e,n)=>`Non-finite ${e}: ${n}`,ha=e=>`Cannot convert bigint to ${e}`,pa=\"Invalid object\",ot=(e,n,t,o)=>un(e,n)+`; must be between ${t}-${o}`,un=(e,n)=>`Invalid ${e}: ${n}`;var _o=1e3,Jo=1e6,Ko=1e9,Qo=6e10,Xo=36e11;function ie(e){return e===void 0?Object.create(null):dn(e)}function Qt(e,n=\"number\"){if(typeof e==\"bigint\")throw new TypeError(ha(n));if(e=Number(e),!Number.isFinite(e))throw new RangeError(fa(n,e));return e}function U(e,n){return Math.trunc(Qt(e,n))||0}function Xt(e,n){return ya(U(e,n),n)}function ya(e,n=\"number\"){if(e<=0)throw new RangeError(ma(n,e));return e}function er(e,n,t){return Math.min(Math.max(e,n),t)}function Nn(e){return e!==null&&(typeof e==\"object\"||typeof e==\"function\")}function dn(e){if(!Nn(e))throw new TypeError(pa);return e}var so=un;var dt=e=>`Missing ${e}`,Pa=e=>\"No valid fields: \"+e.join(),Na=\"Invalid bag\",Oa=(e,n,t)=>un(e,n)+\"; must be \"+Object.keys(t).join(),ka=\"Cannot use valueOf\",Ea=\"Invalid calling context\",co=e=>\"Missing year\"+(e?\"/era/eraYear\":\"\"),mn=\"Invalid leap month\",xa=e=>un(\"Calendar\",e),Za=(e,n)=>`Unknown calendar ${e}; might need ${n}`,pr=e=>un(\"TimeZone\",e),$e=\"Out-of-bounds date\";var Fa=e=>`Cannot parse: ${e}`,Ze=e=>`Invalid substring: ${e}`;var yr=er,ee=Nn;function T(e){throw new RangeError(e)}function S(e){throw new TypeError(e)}function rr(e,n,t,o,r){return we(n,((i,a)=>{let s=i[a];return s===void 0&&S(dt(a)),s})(e,n),t,o,r)}function we(e,n,t,o,r,i){let a=yr(n,t,o);return r&&n!==a&&T(((s,c,u,d,l)=>l?ot(s,l[c],l[u],l[d]):ot(s,c,u,d))(e,n,t,o,i)),a}function En(e,n=Map){let t=new n;return(o,...r)=>{if(t.has(o))return t.get(o);let i=e(o,...r);return t.set(o,i),i}}var Ra=e=>uo({name:e},1),uo=(e,n)=>Ve(t=>({value:t,configurable:1,writable:!n}),e),lt=e=>({[Symbol.toStringTag]:{value:e,configurable:1}});function Ve(e,n){let t={};for(let o in n)t[o]=e(n[o],o);return t}function mt(e,n){let t={};for(let o of e)t[o]=n;return t}function lo(e){let n={};for(let t of e)n[t]=o=>o[t];return n}function Me(e,n,t=Object.create(null)){for(let o of e)t[o]=n[o];return t}function Ca(e,n,t){for(let o of e)if(n[o]!==t[o])return 0;return 1}function Td(e,n,t){let o={...t};for(let r=0;r<n;r++)o[e[r]]=0;return o}function C(e,...n){return(...t)=>e(...n,...t)}function Tr(){}function Ta(e){return e[0].toUpperCase()+e.substring(1)}function A(...e){return[].concat(...e).sort()}function Rn(e){return new RegExp(`^${e}$`,\"i\")}function gr(e){return parseInt(e.padEnd(9,\"0\"))}function Dr(e){return e&&e!==\"+\"?-1:1}function On(e){return e===void 0?0:parseInt(e)}function oo(e,n){return String(n).padStart(e,\"0\")}var pe=C(oo,2);function Fe(e,n){return Math.sign(e-n)}function x(e,n){return e<n?-1:e>n?1:0}function Ya(e,n){let t=e/n;return e%n<0n?t-1n:t}function br(e,n){let t=Ya(e,n);return[t,e-t*n]}function ve(e,n){return[Math.floor(e/n),mo(e,n)]}function mo(e,n){return(e%n+n)%n}function Cn(e,n){return Math.trunc(e/n)||0}function vr(e,n){return e%n||0}function Ba(e,n=1){return n*(.5+e/5)}function eo(e){return Math.abs(e%1)===.5}var Ir=\"iso8601\",Wa=\"gregory\",gd={bce:-1,ce:0};function Aa(e){let n=e.normalize(\"NFD\").toLowerCase().replace(/[^a-z0-9]/g,\"\");return n===\"bc\"||n===\"b\"?\"bce\":n===\"ad\"||n===\"a\"?\"ce\":n}var se=void 0,Ua=0;function ye(e){return e===se?\"iso8601\":e===0?\"gregory\":e.id}var Dd=/^M(\\d{2})(L?)$/;function La(e){let n=Dd.exec(e);return n||T((t=>`Invalid monthCode: ${t}`)(e)),[parseInt(n[1]),!!n[2]]}function qa(e,n){return\"M\"+pe(e)+(n?\"L\":\"\")}function ir(e,n,t){return e+(n||t&&e>=t?1:0)}var ar={nanosecond:0,microsecond:1,millisecond:2,second:3,minute:4,hour:5,day:6,week:7,month:8,year:9},wr=Object.keys(ar);var ft=_o,ht=Jo,_e=Ko,pt=Qo,yt=Xo,Ye=864e11,Te=[1,ft,ht,_e,pt,yt,Ye],bd=BigInt(ft),Yn=BigInt(ht),hn=BigInt(_e),vd=BigInt(pt),Id=BigInt(yt),O=BigInt(Ye);function ja(e,n){let t=Number(e/O),o=Number(e%O);return t*(Ye/n)+(Math.trunc(o/n)+o%n/n)}var _=wr.slice(0,6),Tt=lo(_),fo=[\"year\"],Tn=[\"day\"],Mr=[\"day\",\"month\",\"year\"],ho=[\"offset\"],Sr=[\"timeZone\"],Bn=[\"era\",\"eraYear\"],wd=[\"era\",\"eraYear\",\"year\"],$a=[\"month\",\"monthCode\"],Md=[\"day\",\"month\",\"monthCode\"],sr=A(_),Sd=A(Bn,fo),gt=A($a,fo),Ha=A(Bn,gt),Dt=A([\"monthCode\"],fo),Ga=A(Bn,Dt),za=A(Tn,[\"monthCode\"]),gn=A(Tn,gt),Dn=A(Tn,Bn,gt),Va=A(gn,_),_a=A(Dn,_),Pd=A(gn,_,ho),Nd=A(Dn,_,ho),Ja=A(gn,_,ho,Sr),Ka=A(Dn,_,ho,Sr),Od=A(Tn,Dt),kd=A(Tn,Bn,Dt),ce=mt(_,0);function bt(e){return po(e,1),e}var Ed={hour:23,minute:59,second:59};function po(e,n){let t={};for(let o of _)t[o]=we(o,e[o],0,Ed[o]||999,n);return t}function oe(e){return Nr(e)*_e+Qa(e)}function Pr(e){return 1e3*Nr(e)+e.millisecond}function Nr(e){return 3600*e.hour+60*e.minute+e.second}function Qa(e){return e.millisecond*ht+e.microsecond*ft+e.nanosecond}function Or(e){let[n,t]=ve(e,Ye);return[Xa(t),n]}function Xa(e){let[n,t]=ve(e,ht),[o,r]=ve(t,ft);return xd(n,o,r)}function xd(e,n=0,t=0){let[o,r]=ve(e,36e5),[i,a]=ve(r,6e4),[s,c]=ve(a,1e3);return{hour:o,minute:i,second:s,millisecond:c,microsecond:n,nanosecond:t}}function ga(e){let[n,t]=br(e,hn);return[Number(n),Number(t)]}function Ie(e){return fn(e)+BigInt(oe(e))}function es(e){return vt(e)+Pr(e)}function fn(e){return BigInt(Se(e))*O}function vt(e){return 864e5*Se(e)}function Se(e){return rt(e.year,e.month,e.day)}function rt(e,n=1,t=1){let o=n-1;return e+=Math.floor(o/12),n=mo(o,12),Date.UTC(e%400-400,n,0)/864e5+146097*(Cn(e,400)+1)+t}function It(e){let[n,t]=br(e,O);return{...ns(Number(n)),...Xa(Number(t))}}function ns(e){let n=new Date(864e5*mo(e,146097));return{year:n.getUTCFullYear()+400*Math.floor(e/146097),month:n.getUTCMonth()+1,day:n.getUTCDate()}}var ts=1972;function Zd(e){return[e,0]}function cr(e,n){if(!n)return{year:1972,month:e}}function Fd(e,n,t){return{year:e,month:n,day:t}}function os(e,n){switch(n){case 2:return yo(e)?29:28;case 4:case 6:case 9:case 11:return 30}return 31}function Rd(e){return yo(e)?366:365}function yo(e){return e%4==0&&(e%100!=0||e%400==0)}function rs(e,n,t){return e+=Cn(t,12),(n+=vr(t,12))<1?(e--,n+=12):n>12&&(e++,n-=12),{year:e,month:n}}function Cd(e,n,t,o){return 12*(t-e)+o-n}function To(e){return mo(rt(e.year,e.month,e.day)+4,7)||7}function is(e){return rt(e.year,e.month,e.day)-rt(e.year)+1}function as(e){let n=e.year,t=Math.floor((is(e)-To(e)+10)/7),o=nr(n);return t<1?t=o=nr(--n):t>o&&(t=1,o=nr(++n)),{weekOfYear:t,yearOfWeek:n,Ie:o}}function nr(e){let n=To({year:e,month:1,day:1});return n===4||n===3&&yo(e)?53:52}function Yd({year:e}){return e<1?{era:\"bce\",eraYear:1-e}:{era:\"ce\",eraYear:e}}function wt(e){return Be(e),bt(e)}function Be(e){return ss(e,1),e}function Da(e){return Ca(Mr,e,ss(e))}function ss(e,n){let{year:t}=e,o=rr(e,\"month\",1,12,n);return{year:t,month:o,day:rr(e,\"day\",1,os(t,o),n)}}function P(e,n){return e?e.ie(n):n}function pn(e,n,t){return e?e.O(n,t):Zd(t)}function Mt(e,n){return e===0?Yd(n):e?e.h(n):{}}function yn(e,n,t,o){return e?e.je(n,t,o):Fd(n,t,o)}function it(e,n){return e?e.k(n):12}function at(e,n,t){return e?e.p(n,t):os(n,t)}function go(e,n){let{year:t,month:o}=P(e,n),[r,i]=pn(e,t,o);return qa(r,i)}function kr(e,n){let{year:t}=P(e,n);return e?e.u(t):yo(t)}function Er(e,n){let{year:t}=P(e,n);return it(e,t)}function xr(e,n){let{year:t,month:o}=P(e,n);return at(e,t,o)}function Zr(e,n){let{year:t}=P(e,n);return e?e.j(t):Rd(t)}function cs(e,n){if(!e)return is(n);let{year:t}=P(e,n),o=yn(e,t,1,1);return Se(n)-Se(o)+1}function us(e,n){return e===se?as(n).weekOfYear:void 0}function ds(e,n){return e===se?as(n).yearOfWeek:void 0}var k=wr.map(e=>e+\"s\"),Fr=lo(k),ls=A(k),Bd=k.slice(0,6),ms=k.slice(6),Wd=ms.slice(1),Ad=k.reduce((e,n,t)=>(e[n]=t,e),{}),R=mt(k,0),Rr=mt(Bd,0),Cr=C(Td,k);function fs(e,n){return n==null&&T(dt(e)),n}var $=C(Ud,\"string\");function Ud(e,n,t=e){return typeof n!==e&&S(so(t,n)),n}function Yr(e,n=\"number\"){return Number.isInteger(e)||T(((t,o)=>`Non-integer ${t}: ${o}`)(n,e)),e||0}function Br(e){return typeof e==\"symbol\"&&S(\"Cannot convert Symbol to string\"),String(e)}function Wr(e,n){return Nn(e)?String(e):$(e,n)}function Do(e){return typeof e==\"boolean\"?BigInt(e?1:0):typeof e==\"string\"?BigInt(e):(typeof e!=\"bigint\"&&S(`Invalid bigint: ${e}`),e)}function bo(e,n){return Yr(Qt(e,n),n)}function vo(e,n){return typeof e==\"string\"?((t,o)=>{let r=Object.create(null);return r[t]=o,r})(n,e):dn(e)}var Re=\"smallestUnit\";var Ld={constrain:0,reject:1},qd={compatible:0,reject:1,earlier:2,later:3},jd={reject:0,use:1,prefer:2,ignore:3},$d={auto:0,never:1,critical:2,always:3},Hd={auto:0,never:1,critical:2},Gd={auto:0,never:1},zd={floor:0,halfFloor:1,ceil:2,halfCeil:3,trunc:4,halfTrunc:5,expand:6,halfExpand:7,halfEven:8},Vd=[Math.floor,e=>eo(e)?Math.floor(e):Math.round(e),Math.ceil,e=>eo(e)?Math.ceil(e):Math.round(e),Math.trunc,e=>eo(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=>eo(e)?(e=Math.trunc(e)||0)+e%2:Math.round(e)],_d={previous:-1,next:1};function Ar(e){let n=e.roundingIncrement;return n===void 0?1:U(n,\"roundingIncrement\")}function Ur(e){let n=e.fractionalSecondDigits;if(n!==void 0){if(typeof n!=\"number\"){if(Br(n)===\"auto\")return;T(so(\"fractionalSecondDigits\",n))}n=we(\"fractionalSecondDigits\",Math.floor(n),0,9,1)}return n}function Lr(e,n,t=0,o){let r=n[e];if(r===void 0)return o?t:void 0;if(r=Br(r),r===\"auto\")return o?t:null;let i=ar[r];return i===void 0&&(i=Ad[r]),i===void 0&&T(Oa(e,r,ar)),i}function Je(e,n,t,o=0){let r=t[e];if(r===void 0)return o;let i=Br(r),a=n[i];return a===void 0&&T(Oa(e,i,n)),a}var Wn=C(Lr,Re),hs=C(Lr,\"largestUnit\"),Jd=C(Lr,\"unit\"),ps=C(Je,\"overflow\",Ld),ys=C(Je,\"disambiguation\",qd),Kd=C(Je,\"offset\",jd),qr=C(Je,\"calendarName\",$d),Qd=C(Je,\"timeZoneName\",Hd),Xd=C(Je,\"offset\",Gd),An=C(Je,\"roundingMode\",zd),el=C(Je,\"direction\",_d);function jr(e,n,t,o){let r=o?Ye:Te[n+1];if(r){let i=Te[n];r%((e=we(\"roundingIncrement\",e,1,r/i-(o?0:1),1))*i)&&T(so(\"roundingIncrement\",e))}else e=we(\"roundingIncrement\",e,1,t?10**9:1,1);return e}function xn(e,n,t,o){return n!=null&&we(e,n,t,o,1,wr),n}function Ts(e,n){n>e&&T(\"smallestUnit > largestUnit\")}function Un(e,n,t,o=9,r=0,i=4){n=ie(n);let a=hs(n,r),s=Ar(n),c=An(n,i),u=Wn(n,r,1);return a=xn(\"largestUnit\",a,r,o),u=xn(Re,u,r,o),a==null?a=Math.max(t,u):Ts(a,u),s=jr(s,u,1),e&&(c=(d=>d<4?(d+2)%4:d)(c)),[a,u,s,c]}function St(e,n=6,t){let o=Ar(e=vo(e,Re)),r=An(e,7),i=Wn(e);return i=fs(Re,i),i=xn(Re,i,0,n),o=jr(o,i,void 0,t),[i,o,r]}function E(e,n){return Me(Mr,e,Me(_,n))}function w(e){return e===void 0?0:ps(dn(e))}function Zn(e,n=0){e=ie(e);let t=ys(e),o=Kd(e,n);return[ps(e),o,t]}var gs=BigInt(1e8)*O,$r=BigInt(-1e8)*O,Ds=$r-O,bs=-3261848;function Io(e){let n=12*e.year+e.month;return(n<bs||n>3309129)&&T($e),e}function X(e,n=1){return vs(fn(e),n),e}function bn(e){let n=fn(e);return vs(n),n!==Ds||oe(e)||T($e),e}function vs(e,n=1){(e<(n?Ds:$r)||e>gs)&&T($e)}function ge(e){return(e<$r||e>gs)&&T($e),e}function Hr(e,n){return ge(fn(e)+BigInt(oe(e)-n))}function ue(e){return{epochNanoseconds:e}}function De(e,n,t){return{calendar:t,timeZone:n,epochNanoseconds:e}}function Pe(e,n){return Me(_,e,N(e,n))}function N(e,n){return Me(Mr,e,{calendar:n})}function vn(e){return Me(_,e)}function B(e){return Me(k,e,{sign:xo(e)})}function Pt(e){return n=e.epochNanoseconds,Number(Ya(n,Yn));var n}function Nt(e){return e.epochNanoseconds}function Is(e,n,t){let o=ze(n),[r,i]=((u,d)=>{let l=d((u=vo(u,\"unit\")).relativeTo),m=Jd(u);return m=fs(\"unit\",m),[m,l]})(t,e);if(!i&&kn(Math.max(r,o),i))return ba(n,r);if(i||T(\"Missing relativeTo\"),!n.sign&&kn(r,i))return 0;let a=Eo(i),s=a.G(a.i,n);Cs(a,s);let c=a.re(a.i,s,r);return kn(r,i)?ba(c,r):nl(c,a.V(s),r,a)}function nl(e,n,t,o){let r=xo(e)||1,i=Gr(Cr(t,e),t,r,o,n),a=i.ae,s=i.de,c=Number(s-a),u=Number(n-a);return i.ye[k[t]]+u/c*r}function ba(e,n){return ja(Ce(e),Te[n])}function Gr(e,n,t,o,r){let i=k[n],a=e,s=0,c=va(a,i,t,o);return r&&!((u,d,l,m)=>m>0?x(d,u)<=0&&x(u,l)<=0:x(l,u)<=0&&x(u,d)<=0)(r,c.ae,c.de,Math.sign(t))&&(a={...e,[i]:e[i]+t},s=1,c=va(a,i,t,o)),{...c,ye:a,He:s}}function va(e,n,t,o){let r={...e,[n]:e[n]+t};return{ae:ct(o,e),de:ct(o,r),Ae:r}}function ws(e,n,t){let o=t-n,r=e-n;if(!r)return 0;let i=r<0n?-r:r,a=o<0n?-o:o,s=x(r,0n)===x(o,0n)?1:-1;return x(i,a)<=0?i===a?s:Ba(x(2n*i,a),s):Number(r)/Number(o)}function Ms(e,n,t,o){let{epochNanoseconds:r}=e,{timeZone:i,calendar:a}=e;if(n===0&&t===1)return{epochNanoseconds:r,timeZone:i,calendar:a};if(n===6){let s=E(W(e),ce),c=E(Ke(s,1),ce),u=He(i,s),d=He(i,c);r=zr(ws(r,u,d),o)?d:u}else{let s=W(e),c=s.offsetNanoseconds;r=qn(i,wo(s,Ln(n,t),o),c,2,0,1)}return{epochNanoseconds:r,timeZone:i,calendar:a}}function Ss(e){let{timeZone:n}=e,t=E(W(e),ce),o=E(Ke(t,1),ce),r=He(n,t);return ja(He(n,o)-r,yt)}function Ps(e){let{timeZone:n,calendar:t}=e;return De(He(n,E(W(e),ce)),n,t)}function wo(e,n,t){let[o,r]=Mo(e,n,t),i=E(Ke(e,r),o);return bn(i),i}function Mo(e,n,t){return Or(Fn(oe(e),n,t))}function ro(e){return Fn(e,pt,7)}function Ln(e,n){return Te[e]*n}function Ot(e,n){return BigInt(Te[e])*BigInt(n)}function tl(e,n,t){let o=Math.min(ze(e),6);return Ge(Po(Ce(e),BigInt(n),t),o)}function So(e,n,t,o,r,i,a){if(o===0&&r===1)return e;let s=xo(e)||1,c=kn(o,a.i)?Zt(a.i)&&o<6&&t>=6?rl:ol:il,[u,d,l]=c(s,e,n,t,o,r,i,a);return l&&o!==7&&(u=((m,f,p,h,y,b)=>{for(let v=h+1;v<=p;v++){if(v===7&&p!==7)continue;let D=Cr(v,m);D[k[v]]+=y;let I=x(f,ct(b,D));if(I&&I!==y)break;m=D}return m})(u,d,t,Math.max(6,o),s,a)),u}function Po(e,n,t){return Ns(e,n,t,e/n%2n)}function No(e,n,t){let[o,r]=br(e,O),i=o*O;return i+Ns(r,n,t,(i/n+r/n)%2n)}function Ns(e,n,t,o){let r=e/n,i=e%n,a=0;i&&(a=Ba(x(2n*(i<0n?-i:i),n),Math.sign(Number(i))));let s=zr(Number(o)+a,t);return(r-o+BigInt(s))*n}function Fn(e,n,t){return zr(e/n,t)*n}function zr(e,n){return Vd[n](e)}function ol(e,n,t,o,r,i,a){let s=Ce(n),c=Po(s,Ot(r,i),a),u=c-s,d=Math.sign(Number(c/O)-Number(s/O))===e,l=Ge(c,Math.min(o,6));return[{...n,...l},t+u,d]}function rl(e,n,t,o,r,i,a,s){let c=Number(In(n)),u=Ln(r,i),d=Fn(c,u,a),l=Gr({...n,...Rr},6,e,s,t),m=l.ae,f=l.de,p=d-Number(f-m),h=0;p&&Math.sign(p)!==e?t=m+BigInt(d):(h+=e,d=Fn(p,u,a),t=f+BigInt(d));let y=Zo(d);return[{...n,...y,days:n.days+h},t,!!h]}function il(e,n,t,o,r,i,a,s){let c=k[r],u=Cr(r,n);r===7&&(n={...n,weeks:n.weeks+Math.trunc(n.days/7)});let d=Cn(n[c],i)*i;u[c]=d;let l=Gr(u,r,i*e,s,t),m=l.ae,f=l.de,p=ws(t,m,f),h=l.ye[c],y=l.Ae[c],b=Fn(h+p*e*i,i,a),v=b===y;return u[c]=b,[u,v?f:m,l.He||v]}function Os(e,n){return e.timeZone.U(e.epochNanoseconds,(t=>{let o=vo(t,\"direction\"),r=el(o,0);return r||T(so(\"direction\",r)),r})(n))}var W=En(al,WeakMap);function al(e){let{epochNanoseconds:n,timeZone:t}=e,o=t.C(n);return{...It(n+BigInt(o)),offsetNanoseconds:o}}function qn(e,n,t,o=0,r=0,i,a){if(t!==void 0&&o===1&&(o===1||a))return Hr(n,t);o!==2&&o!==0||X(n,0);let s=e.R(n);if(t!==void 0&&o!==3){let c=((u,d,l,m)=>{let f=Ie(d);m&&(l=ro(l));for(let p of u){let h=Number(f-p);if(m&&(h=ro(h)),h===l)return p}})(s,n,t,i);if(c!==void 0)return c;o===0&&T(\"Invalid TimeZone offset\")}return a?Ie(n):kt(e,n,r,s)}function kt(e,n,t=0,o=e.R(n)){if(o.length===1)return o[0];if(t===1&&T(\"Ambiguous offset\"),o.length)return o[t===3?1:0];let r=Ie(n),i=((s,c)=>{let u=s.C(c-O);return(d=>(d>Ye&&T(\"Out-of-bounds TimeZone gap\"),d))(s.C(c+O)-u)})(e,r),a=It(r+BigInt(i*(t===2?-1:1)));return(o=e.R(a))[t===2?0:o.length-1]}function He(e,n){let t=e.R(n);if(t.length)return t[0];let o=Ie(n)-O;return e.U(o,1)}function Vr(e,n,t,o,r){let i=w(r);o.sign&&ze(o)<8&&T(\"Cannot use small units\");let a=X(st(n,t));return st(n,ks(n,a,e?H(o):o,i))}function _r(e,n){return ge(e+(Ls(t=n)&&T(\"Cannot use large units\"),In(t)));var t}function Et(e,n,t){let{calendar:o,epochNanoseconds:r,timeZone:i}=e,a=In(n),s=r;if(Ls(n)){let c=W(e);s=kt(i,E(jn(o,c,{...n,...Rr},t),c))+a}else s+=a,w(t);return{...e,epochNanoseconds:ge(s)}}function xt(e,n,t,o){let[r,i]=Oo(n,t),a=E(jn(e,n,{...t,...Rr,days:t.days+i},o),r);return bn(a),a}function jn(e,n,t,o){if(t.years||t.months||t.weeks)return ks(e,n,t,w(o));w(o);let r=t.days+Number(In(t)/O);return r?X(Ke(n,r)):n}function st(e,n){return Ke(n,1-P(e,n).day)}function Oo(e,n){let t=In(n),o=Number(t/O),r=Number(t%O),[i,a]=Or(oe(e)+r);return[i,o+a]}function Ke(e,n){return n?ns(Se(e)+n):e}function ks(e,n,t,o){let{years:r,months:i,weeks:a,days:s}=t,c;if(s+=Number(In(t)/O),r||i)c=ur(e,n,r,i,o);else{if(!a&&!s)return n;c=n}return(a||s)&&(c=Ke(c,7*a+s)),X(c)}function ur(e,n,t,o,r){let i=P(e,n),{year:a,month:s,day:c}=i;if(t){let[u,d]=pn(e,a,s);a+=t,s=dr(e,u,d,e?e.q(a):void 0,r),s=we(\"month\",s,1,it(e,a),r)}return o&&({year:a,month:s}=e?e.N(a,s,o):rs(a,s,o)),c=we(\"day\",c,1,at(e,a,s),r),yn(e,a,s,c)}function dr(e,n,t,o,r){if(t){let i=e?e.m:void 0;return o!==void 0&&(i<0||o===n+1)?o:(r===1&&T(mn),i<0?-i:n)}return ir(n,0,o)}function We(e,n){return ye(e)!==ye(n)&&T(\"Mismatching Calendars\"),e}function sl(e,n){return e.o!==n.o&&T(\"Mismatching TimeZones\"),e}function Es(e){return e.timeZone.id}function Jr(e,n,t,o){let[r,i,a,s]=Un(e,o,3,5),c=ko(n.epochNanoseconds,t.epochNanoseconds,r,i,a,s);return B(e?H(c):c)}function Kr(e,n,t,o,r){let[i,a,s,c]=Un(e,r,5),u=t.epochNanoseconds,d=o.epochNanoseconds,l;return x(d,u)?i<6?l=ko(u,d,i,a,s,c):(l=Zs(sl(t.timeZone,o.timeZone),n,t,o,i),l=So(l,d,i,a,s,c,oi(t,Nt,Et))):l=R,B(e?H(l):l)}function Qr(e,n,t,o,r){let[i,a,s,c]=Un(e,r,6),u=Ie(t),d=Ie(o),l=x(d,u),m;return l?i<=6?m=ko(u,d,i,a,s,c):(m=Fs(n,t,o,l,i),m=So(m,d,i,a,s,c,oi(t,Ie,C(xt,n)))):m=R,B(e?H(m):m)}function Xr(e,n,t,o,r){let[i,a,s,c]=Un(e,r,6,9,6);return xs(e,n,t,o,i,a,s,c)}function ei(e,n,t,o,r){let[i,a,s,c]=Un(e,r,9,9,8),u=st(n,t),d=st(n,o);return Rs(u,d)?xs(e,n,X(u),X(d),i,a,s,c,8):B(R)}function xs(e,n,t,o,r,i,a,s,c=6){let u=fn(t),d=fn(o),l;return x(d,u)?r===6?l=ko(u,d,r,i,a,s):(l=ti(n,t,o,r),i===c&&a===1||(l=So(l,d,r,i,a,s,oi(t,fn,C(jn,n))))):l=R,B(e?H(l):l)}function ni(e,n,t,o){let[r,i,a,s]=Un(e,o,5,5),c=Fn(oe(t)-oe(n),Ln(i,a),s),u={...R,...Zo(c,r)};return B(e?H(u):u)}function Zs(e,n,t,o,r){let i=x(o.epochNanoseconds,t.epochNanoseconds);if(!i)return R;if(r<6)return{...R,...Ge(o.epochNanoseconds-t.epochNanoseconds,r)};if(!Rs(W(t),W(o)))return{...R,...Ge(o.epochNanoseconds-t.epochNanoseconds,5)};let[a,s,c]=ul(e,t,o,i);return{...r===6?{...R,days:to(a,s)}:ti(n,a,s,r),...Zo(c)}}function cl(e,n,t,o){let r=Ie(n),i=Ie(t),a=x(i,r);return a?o<=6?{...R,...Ge(i-r,o)}:Fs(e,n,t,a,o):R}function Fs(e,n,t,o,r){let i=t,a=oe(t)-oe(n);return Math.sign(a)===-o&&(i=Ke(t,-o),a+=Ye*o),{...ti(e,n,i,r),...Zo(a)}}function ti(e,n,t,o){if(o<=7){let h=to(n,t);return o===7?{...R,weeks:Cn(h,7),days:vr(h,7)}:{...R,days:h}}let r=P(e,n),i=P(e,t);if(o===8){let{year:h,month:y,day:b}=r,{year:v,month:D,day:I}=i,F=Math.sign(Fe(v,h)||Fe(D,y)||to(n,t)),j=0,K=0;if(F){j=e?e.ne(h,y,v,D):Cd(h,y,v,D);let Q=ur(e,n,0,j,0);F*Fe(b,I)>0&&(j-=F,Q=ur(e,n,0,j,0)),K=to(Q,t)}return{...R,months:j,days:K}}let{year:a,month:s,day:c}=r,{year:u,month:d,day:l}=i,m=u-a,f=d-s,p=l-c;if(m||f){let h=Math.sign(m||f),y=at(e,u,d),b=0;if(Math.sign(l-c)===-h){let v=y;({year:u,month:d}=e?e.N(u,d,-h):rs(u,d,-h)),m=u-a,f=d-s,y=at(e,u,d),b=h<0?-v:y}if(p=l-Math.min(c,y)+b,m){let[v,D]=pn(e,a,s),[I,F]=pn(e,u,d),j=e?e.m:void 0;if(f=j!==void 0&&D&&!F&&(j<0?h>0&&I===-j:h<0&&I===v)?0:I-v||Number(F)-Number(D),Math.sign(f)===-h){let K=h<0&&-it(e,u);u-=h,m=u-a,f=d-dr(e,v,D,e?e.q(u):void 0,0)+(K||it(e,u))}else if(e){let K=dr(e,v,D,e.q(u),0);f=e.ne(u,K,u,d)}}}return{...R,years:m,months:f,days:p}}function Rs(e,n){return Fe(e.year,n.year)||Fe(e.month,n.month)||Fe(e.day,n.day)}function ul(e,n,t,o){let r=W(n),i=W(t),a=t.epochNanoseconds,s=0,c=oe(i)-oe(r);Math.sign(c)===-o&&s++;let u=s+(o>0?1:0);for(;s<=u;s++){let d=Ke(i,s*-o),l=kt(e,E(d,r));if(x(a,l)!==-o)return[r,d,Number(a-l)]}}function ko(e,n,t,o,r,i){return{...R,...Ge(Po(n-e,Ot(o,r),i),t)}}function to(e,n){return Se(n)-Se(e)}function oi(e,n,t){return{i:e,V:n,G:t}}function Eo(e){let{calendar:n}=e;if(Zt(e)){let{timeZone:t}=e;return{i:e,V:Nt,G:Et,re:C(Zs,t,n)}}return{i:Ys(e),V:Ie,G:C(xt,n),re:C(cl,n)}}function ct(e,n){return e.V(e.G(e.i,n))}function Zt(e){return\"timeZone\"in e}function Cs(e,n){Zt(e.i)||(Ia(e.i),Ia(n))}function Ys(e){return E(e,\"hour\"in e?e:ce)}function Ia(e){bn(Ys(e))}function kn(e,n){return e<=6-(n&&Zt(n)?1:0)}function ri(e,n,t){let o={};for(let r=n;r>=0;r--){let i=Te[r];o[t[r]]=Cn(e,i),e=vr(e,i)}return o}var dl=2**53;function ii(e,n,t,o,r){let i=e(ie(r).relativeTo),a=Math.max(ze(t),ze(o));if(kn(a,i))return ll(n,t,o,a);i||T(\"Missing relativeTo\"),n&&(o=H(o));let s=Eo(i),c=s.G(s.i,t),u=s.G(c,o);return B(s.re(s.i,u,a))}function ll(e,n,t,o){return B(Qe(((r,i,a,s)=>{let c=Ce(r)+Ce(i)*BigInt(s?-1:1);return Number.isFinite(Number(c/O))||T($e),{...R,...Ge(c,a)}})(n,t,o,e)))}function Bs(e,n,t){let o=ze(n),[r,i,a,s,c]=((f,p,h)=>{f=vo(f,Re);let y=hs(f),b=h(f.relativeTo),v=Ar(f),D=An(f,7),I=Wn(f);return y===void 0&&I===void 0&&T(\"Required smallestUnit or largestUnit\"),I==null&&(I=0),y==null&&(y=Math.max(I,p)),Ts(y,I),v=jr(v,I,1),v>1&&I>5&&y!==I&&T(\"For calendar units with roundingIncrement > 1, use largestUnit = smallestUnit\"),[y,I,v,D,b]})(t,o,e);if(!c&&Math.max(o,r)<=6)return B(Qe(((f,p,h,y,b)=>{let v=Po(Ce(f),Ot(h,y),b);return{...R,...Ge(v,p)}})(n,r,i,a,s)));let u=c&&Zt(c)&&r>=6&&i<6;if(!n.sign&&!u)return n;c||T(\"Missing relativeTo\");let d=Eo(c),l=d.G(d.i,n);Cs(d,l);let m=d.re(d.i,l,r);return m=So(m,d.V(l),r,i,a,s,d),B(m)}function Ws(e){return e.sign===-1?ai(e):e}function ai(e){return B(H(e))}function H(e){let n={};for(let t of k)n[t]=-1*e[t]||0;return n}function xo(e,n=k){let t=0;for(let o of n){let r=Math.sign(e[o]);r&&(t&&t!==r&&T(\"Cannot mix duration signs\"),t=r)}return t}function Qe(e){for(let t of Wd)we(t,e[t],-4294967295,4294967295,1);let n=Ce(e);return As(Number(n/hn)),e}function As(e){Number.isSafeInteger(e)||T(\"Out-of-bounds duration\")}function Ce(e){return BigInt(e.days)*O+In(e)}function In(e){return BigInt(e.hours)*Id+BigInt(e.minutes)*vd+Us(e)}function Us(e){return BigInt(e.seconds)*hn+BigInt(e.milliseconds)*Yn+BigInt(e.microseconds)*bd+BigInt(e.nanoseconds)}function Ge(e,n=6){let t=Number(e/O),o=Number(e%O),r=Te[n],i=n<=3?Number(e/BigInt(r)):t*(Ye/r)+Cn(o,r);Number.isFinite(i)||T($e),n<=3&&Math.abs(i)/(_e/Te[n])>=dl&&T($e);let a=ri(o,n,k);return a[k[n]]=i,a}function Zo(e,n=5){return ri(e,n,k)}function Ls(e){return!!xo(e,ms)}function ze(e){let n=9;for(;n>0&&!e[k[n]];n--);return n}function si(e,n){return x(e.epochNanoseconds,n.epochNanoseconds)}function ci(e,n){return x(e.epochNanoseconds,n.epochNanoseconds)}function qs(e,n,t,o){let r=e(ie(o).relativeTo),i=Math.max(ze(n),ze(t));if(Ca(k,n,t))return 0;if(kn(i,r))return x(Ce(n),Ce(t));r||T(\"Missing relativeTo\");let a=Eo(r);return x(ct(a,n),ct(a,t))}function ui(e,n){return wn(e,n)||Fo(e,n)}function wn(e,n){return Fe(Se(e),Se(n))}function Fo(e,n){return Fe(oe(e),oe(n))}function js(e,n){return!si(e,n)}function $s(e,n){return!ci(e,n)&&e.timeZone.o===n.timeZone.o&&e.calendar===n.calendar}function Hs(e,n){return!ui(e,n)&&e.calendar===n.calendar}function Gs(e,n){return!wn(e,n)&&e.calendar===n.calendar}function zs(e,n){return!wn(e,n)&&e.calendar===n.calendar}function Vs(e,n){return!wn(e,n)&&e.calendar===n.calendar}function _s(e,n){return!Fo(e,n)}function $n(e){return e===0?gd:e?e.l:void 0}function J(e,n,t=n){return $n(e)?t:n}function di(e,n){let t=e||void 0,o=$n(e),{era:r,eraYear:i,year:a}=n;if(a!==void 0&&(a=U(a,\"year\")),i!==void 0&&(i=U(i,\"eraYear\")),r!==void 0||i!==void 0){r!==void 0&&i!==void 0||S(\"Mismatching era/eraYear\"),o||T(\"Forbidden era/eraYear\");let s=Aa(r),c=o[s];c===void 0&&T((d=>`Invalid era: ${d}`)(r));let u=t?.te?t.te(i,s,c):ml(i,c);a!==void 0&&a!==u&&T(\"Mismatching year/eraYear\"),a=u}else a===void 0&&S(co(o));return a}function io(e,n,t,o,r){let{month:i,monthCode:a}=n;if(a!==void 0){let s=((c,u,d,l,m=La(u))=>{let f=c?c.q(d):void 0,[p,h]=m,y=ir(p,h,f);if(h){let b=c?c.m:void 0;b===void 0&&T(mn),b>0?(y>b&&T(mn),f!==y&&(l===1&&T(mn),y=ir(p,0,f))):(y!==-b&&T(mn),f===void 0&&l===1&&T(mn))}return y})(e,a,t,o,r);i!==void 0&&i!==s&&T(\"Mismatching month/monthCode\"),i=s,o=1}else i===void 0&&S(\"Missing month/monthCode\");return we(\"month\",i,1,it(e,t),o)}function lr(e,n,t,o,r){return rr(n,\"day\",1,at(e,o,t),r)}function ml(e,n){return(n+e)*(Math.sign(n)||1)||0}function Ft(e,n){return po(Me(_,{...ce,...e}),n)}var fl=Rn(\"([+-])(\\\\d{2})(?::?(\\\\d{2})(?::?(\\\\d{2})(?:[.,](\\\\d{1,9}))?)?)?\");function Ro(e){let n=li(e);return n===void 0&&T(Fa(e)),n}function li(e,n){let t=fl.exec(e);if(t&&(o=>(r=>{r[0]!==\"T\"&&r[0]!==\"t\"||(r=r.slice(1));let i=r.search(/[.,]/),a=i<0?r:r.slice(0,i),s=a.split(\":\");return s.length===1?/^(?:\\d{2}|\\d{4}|\\d{6})$/i.test(a):(s.length===2||s.length===3)&&s.every(c=>c.length===2&&/^\\d{2}$/i.test(c))})(o.slice(1)))(t[0]))return((o,r)=>{let i=o[4]||o[5];return r&&i&&T(Ze(i)),s=(On(o[2])*yt+On(o[3])*pt+On(o[4])*_e+gr(o[5]||\"\"))*Dr(o[1]),Math.abs(s)>=Ye&&T(\"Out-of-bounds offset\"),s;var s})(t,n)}var de={era:Wr,month:Xt,monthCode(e,n=\"monthCode\"){return((t,o)=>{if(typeof t==\"string\")return t;if(t&&typeof t==\"object\"){let r=t.toString;if(typeof r==\"function\")return $(r.call(t),o)}return $(t,o)})(e,n)},day:Xt},mi=mt(_,U),Js=mt(k,bo),hl={offset(e){return Ro(Wr(e))}},fi=Object.assign({},de,mi),hi=Object.assign({},fi,hl);function Z(e,n,t,o,r=!o){let i={},a=0;for(let s of n){let c=e[s];if(c!==void 0){a=1;let u=t[s];u&&(c=u(c,s)),i[s]=c}else o&&o.includes(s)&&S(dt(s))}return r&&!a&&S(Pa(n)),i}function Rt(e,n=ce,t){let o=E(e,n);return bn(o),Pe(o,t)}function ut(e,n,t){return Ks(e,n,Qs(e,n),w(t))}function Co(e,n,t){let o=Qs(e,n),r=t();return[Ks(e,n,o,r[0]),...r]}function Ks(e,n,t,o){let r=t[1],i=io(e,n,r,o,t[0]);return N(X(yn(e,r,i,lr(e,n,i,r,o))),e)}function pi(e){if(e.monthCode!==void 0)return La(e.monthCode)}function Qs(e,n){let t=$n(e);return n.year!==void 0||n.era!==void 0&&n.eraYear!==void 0||S(co(t)),n.monthCode===void 0&&n.month===void 0&&S(\"Missing month/monthCode\"),n.day===void 0&&S(dt(\"day\")),[pi(n),di(e,n)]}function yi(e,n,t){let o=$n(e);n.year!==void 0||n.era!==void 0&&n.eraYear!==void 0||S(co(o)),n.monthCode===void 0&&n.month===void 0&&S(\"Missing month/monthCode\");let r=pi(n),i=di(e,n);return N(Io(yn(e,i,io(e,n,i,w(t),r),1)),e)}function Ti(e,n,t){let o=e===se,r=$n(e);n.day===void 0&&S(dt(\"day\")),o||n.month===void 0||n.year!==void 0||n.era!==void 0&&n.eraYear!==void 0||S(co(r));let i=pi(n),a=n.eraYear!==void 0||n.year!==void 0?di(e,n):void 0,s=w(t),c,u,d;if(a===void 0&&o&&(a=1972),a!==void 0){o||X(yn(e,a,1,1));let p=io(e,n,a,s,i);c=lr(e,n,p,a,s),[u,d]=pn(e,a,p)}else{n.monthCode===void 0&&S(\"Missing month/monthCode\"),[u,d]=i;let p=e?e.ge:1972;if(p!==void 0)c=lr(e,n,io(e,n,p,s,i),p,s);else{let h=s===0&&e?e.ke?.(u,d,n.day):void 0;c=h!==void 0?h:n.day}}d&&((e&&e.Z?.[u])??1/0)<n.day&&(s===1&&T(mn),d=0,c=yr(n.day,1,(e&&e.X)??1/0));let l=e?e.v(u,!!d,c):cr(u,!!d);for(;!l&&s===0&&c>1;)c--,l=e?e.v(u,!!d,c):cr(u,!!d);l||T(\"Cannot guess year\");let{year:m,month:f}=l;return N(X(yn(e,m,f,c)),e)}var Ne=Intl.DateTimeFormat;function pl(e,n){n<-864e13&&T($e);let t=e.formatToParts(n),o={};for(let r of t)o[r.type]=r.value;return o}var yl={El_Aaiun:17,Tucuman:12,Tirane:11,Riga:10,Simferopol:9,Vienna:9,Tunis:8,Boa_Vista:6,Fortaleza:6,Maceio:6,Noronha:6,Recife:6,Gaza:6,Hebron:6,DeNoronha:6},tr=-388152e4;function Xs(e,n=4){let t=Ur(e),o=An(e,4),r=Wn(e);return[o,...Di(xn(Re,r,0,n),t)]}function gi(e){return qr(ie(e))}function ec(e,n){return Xs(ie(e),n)}function Di(e,n){return e!=null?[Te[e],e<4?9-3*e:-1]:[n===void 0?1:10**(9-n),n]}function bi(e,n,t){let[o,r,i,a]=(c=>{let u=Ur(c=ie(c)),d=An(c,4),l=Wn(c);return[c.timeZone,d,...Di(xn(Re,l,0,4),u)]})(t),s=o!==void 0;return((c,u,d,l,m,f)=>{d=No(d,BigInt(m),l);let p=u.C(d);return Ni(It(d+BigInt(p)),f)+(c?Ct(ro(p)):\"Z\")})(s,ne(s?e(o):\"UTC\"),n.epochNanoseconds,r,i,a)}function vi(e,n){let t=(o=>{o=ie(o);let r=qr(o),i=Ur(o),a=Xd(o),s=An(o,4),c=Wn(o);return[r,Qd(o),a,s,...Di(xn(Re,c,0,4),i)]})(n);return((o,r,i,a,s,c,u,d,l,m)=>{a=No(a,BigInt(l),d);let f=i.C(a);return Ni(It(a+BigInt(f)),m)+Ct(ro(f),u)+Dl(r,c)+Oi(o,s)})(e.calendar,e.timeZone.id,e.timeZone,e.epochNanoseconds,...t)}function Ii(e,n){let t=(o=>(o=ie(o),[qr(o),...Xs(o)]))(n);return((o,r,i,a,s,c)=>Ni(wo(r,s,a),c)+Oi(o,i))(e.calendar,e,...t)}function wi(e,n){return t=e.calendar,o=e,r=gi(n),ao(o)+Oi(t,r);var t,o,r}function Mi(e,n){return nc(e.calendar,tc,e,gi(n))}function Si(e,n){return nc(e.calendar,gl,e,gi(n))}function nc(e,n,t,o){let r=o>1||o===0&&e!==se;return o===1?e===se?n(t):ao(t):r?ao(t)+rc(ye(e),o===2):n(t)}function Pi(e,n){return((t,o,r,i)=>oc(Mo(t,r,o)[0],i))(e,...ec(n))}function Yo(e,n){let[t,o,r]=ec(n,3);return o>1&&Qe(e={...e,...tl(e,o,t)}),Tl(e,r)}function Tl(e,n){let{sign:t}=e,o=t===-1?H(e):e,{hours:r,minutes:i}=o,a=Us(o),s=Number(a/hn),c=Number(a%hn);As(s);let u=ki(c,n),d=n>=0||!t||u;return(t<0?\"-\":\"\")+\"P\"+wa({Y:ln(o.years),M:ln(o.months),W:ln(o.weeks),D:ln(o.days)})+(r||i||s||d?\"T\"+wa({H:ln(r),M:ln(i),S:ln(s,d)+u}):\"\")}function wa(e){let n=[];for(let t in e){let o=e[t];o&&n.push(o,t)}return n.join(\"\")}function ln(e,n){if(!e&&!n)return\"\";let t=Object.create(null);return t.useGrouping=0,e.toLocaleString(\"fullwide\",t)}function Ni(e,n){return ao(e)+\"T\"+oc(e,n)}function ao(e){return tc(e)+\"-\"+pe(e.day)}function tc(e){let{year:n}=e;return(n<0||n>9999?ic(n)+oo(6,Math.abs(n)):oo(4,n))+\"-\"+pe(e.month)}function gl(e){return pe(e.month)+\"-\"+pe(e.day)}function oc(e,n){let t=[pe(e.hour),pe(e.minute)];return n!==-1&&t.push(pe(e.second)+((o,r,i,a)=>ki(o*ht+r*ft+i,a))(e.millisecond,e.microsecond,e.nanosecond,n)),t.join(\":\")}function Ct(e,n=0){if(n===1)return\"\";let[t,o]=ve(Math.abs(e),yt),[r,i]=ve(o,pt),[a,s]=ve(i,_e);return ic(e)+pe(t)+\":\"+pe(r)+(a||s?\":\"+pe(a)+ki(s):\"\")}function Dl(e,n){return n!==1?\"[\"+(n===2?\"!\":\"\")+e+\"]\":\"\"}function Oi(e,n){return n>1||n===0&&e!==se?rc(ye(e),n===2):\"\"}function rc(e,n){return\"[\"+(n?\"!\":\"\")+\"u-ca=\"+e+\"]\"}var bl=/0+$/;function ki(e,n){let t=oo(9,e);return t=n===void 0?t.replace(bl,\"\"):t.slice(0,n),t?\".\"+t:\"\"}function ic(e){return e<0?\"-\":\"+\"}var vl=/^(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$/,Il=/[^\\w\\/:+-]+/;function ac(e){return Bo($(e))}function Bo(e){return sc(e).id}function sc(e){let n=e.toUpperCase(),t=(r=>{let i=li(r,1);if(i!==void 0)return{id:Ct(i),_:i,o:i}})(n);if(t)return{kind:\"fixed\",...t};let o=n===\"UTC\"?\"UTC\":(r=>(Il.test(r)&&T(pr(r)),vl.test(r)&&T(\"Forbidden ICU TimeZone\"),r.toLowerCase().split(\"/\").map((i,a)=>(i.length<=3||/\\d/.test(i))&&!/etc|yap/.test(i)?i.toUpperCase():i.replace(/baja|dumont|[a-z]+/g,(s,c)=>s.length<=2&&!a||s===\"in\"||s===\"chat\"?s.toUpperCase():s.length>2||!c?Ta(s).replace(/island|noronha|murdo|rivadavia|urville/,Ta):s)).join(\"/\")))(e);return wl(o)}var wl=En(e=>{if(e===\"UTC\")return{kind:\"utc\",id:e,o:e};let n=e.toUpperCase(),t=Ml(n);return{kind:\"named\",id:e,format:t,o:t.resolvedOptions().timeZone}}),Ml=En(e=>new Ne(\"en-u-hc-h23\",{calendar:\"iso8601\",timeZone:e,era:\"short\",year:\"numeric\",month:\"numeric\",day:\"numeric\",hour:\"numeric\",minute:\"numeric\",second:\"numeric\"}));function ne(e){let n=sc(e);return Sl(n.id,n)}var Sl=En((e,n)=>n.kind===\"named\"?new fr(e,n.o,n.format):new mr(e,n.o,n.kind===\"fixed\"?n._:0)),mr=class{constructor(n,t,o){this.id=n,this.o=t,this._=o}C(){return this._}R(n){return[Hr(n,this._)]}U(){}},fr=class{constructor(n,t,o){this.id=n,this.o=t,this.qe=((r,i)=>{let a=En(r),s=En(Pl),c=86400*i;function u(l){let[m,f]=Sa(l,c),p=no(m),h=no(f),y=a(p),b=a(h);return y===b?y:d(s(p,h),y,b,l)}function d(l,m,f,p){let h,y;for(;(p===void 0||(h=p<l[0]?m:p>=l[1]?f:void 0)===void 0)&&(y=l[1]-l[0]);){let b=l[0]+Math.floor(y/2);r(b)===f?l[1]=b:l[0]=b+1}return h}return{Ee(l){let m=u(l-86400),f=u(l+86400),p=l-m,h=l-f;if(m===f)return[p];let y=u(p);return y===u(h)?[l-y]:m>f?[p,h]:[]},De:u,U:function l(m,f){if(f>0&&m>=864e10)return;if(f<0){if(m<=tr)return;let I=Ma()+94867200;if(m>I)return l(I,-1)}let p=f>0?Math.max(m,tr):m,[h,y]=Sa(p,c),b=c*f,v=f>0?Math.max(m,Ma())+94867200:tr,D=()=>f<0?y>v:h<v;for(;D();){let I=no(h),F=no(y),j=a(I),K=a(F);if(j!==K){let Q=s(I,F);d(Q,j,K);let V=Q[0];if((Fe(V,m)||1)===f)return V}h+=b,y+=b}}}})((r=>i=>{let a=pl(r,1e3*i);return 86400*rt((s=>{let c=s.relatedYear;if(c!==void 0)return parseInt(c);let u=parseInt(s.year);return s.era!==void 0&&Aa(s.era)===\"bce\"?1-u:u})(a),parseInt(a.month),parseInt(a.day))+3600*parseInt(a.hour)+60*parseInt(a.minute)+parseInt(a.second)-i})(o),(r=>{let i=r.split(\"/\").pop();return yl[i]||60})(n))}C(n){return this.qe.De((t=>ga(t)[0])(n))*_e}R(n){let t=86400*Se(n)+Nr(n),o=Qa(n);return this.qe.Ee(t).map(r=>ge(BigInt(r)*hn+BigInt(o)))}U(n,t){let[o,r]=ga(n),i=this.qe.U(o+(t>0||r?1:0),t);if(i!==void 0)return BigInt(i)*hn}};function Ma(){return Math.floor(Date.now()/1e3)}function Pl(e,n){return[e,n]}function Sa(e,n){let t=Math.floor(e/n)*n;return[t,t+n]}function no(e){return yr(e,-1e10,864e10)}function cc(e,n,t){let o=Z(t,J(n,Ja,Ka),hi,[],0);if(o.timeZone!==void 0){let r=ut(n,o),i=Ft(o),a=ne(e(o.timeZone));return{epochNanoseconds:qn(a,E(r,i),o.offset),timeZone:a,calendar:n}}return ut(n,o)}function uc(e,n,t,o){let r=Z(t,J(n,Ja,Ka),hi,Sr,0),i=e(r.timeZone),[a,s,c,u]=Co(n,r,()=>Zn(o)),d=Ft(r,s),l=ne(i);return De(qn(l,E(a,d),r.offset,c,u),l,n)}function dc(e,n,t){let o=Z(n,J(e,Va,_a),fi,[],0),[r,i]=Co(e,o,()=>[w(t)]);return Rt(r,Ft(o,i),e)}function lc(e,n,t,o=[]){return ut(e,Z(n,J(e,gn,Dn),de,o),t)}function mc(e,n,t,o){return yi(e,Z(n,J(e,gt,Ha),de,o),t)}function fc(e,n,t,o){let r=Z(t,J(e,gn,Dn),de,Tn,0);return n&&r.month!==void 0&&r.monthCode===void 0&&r.year===void 0&&(r.year=1972),Ti(e,r,o)}function hc(e,n){return Ft(Z(e,sr,mi,[],1),w(n))}function pc(e){let n=Z(e,ls,Js);return B(Qe({...R,...n}))}function ae(e){T(Fa(e))}function yc(e){let n=Xe(e=Wr(e)),t;return n||ae(e),n.F?t=0:n.offset?t=Ro(n.offset):ae(e),n.timeZoneId&&li(n.timeZoneId,1),wt(n),ue(Hr(n,t))}function Tc(e,n){let t=Xe($(e));return t||ae(e),t.timeZoneId?Nc(t,n,void 0):(t.F&&ae(e),hr(t,n))}function gc(e,n,t){let o=Xe($(e));return o&&o.timeZoneId||ae(e),Nc(o,n,t)}function Dc(e,n){let t=Xe($(e));return t&&!t.F||ae(e),Oc(t,n)}function bc(e,n){let t=Zi(xi($(e)),void 0,n);return N(t,t.calendar)}function vc(e,n){let t=Ri($(e));if(t)return Ei(t),N(Io(Be(t)),n(t.calendarId));let o=Zi(xi(e),Nl,n),{calendar:r}=o;return N(st(r,o),r)}function Ei(e){e.calendarId!==\"iso8601\"&&T(Ze(e.calendarId))}function Ic(e,n){let t=Ci($(e));if(t)return Ei(t),N(Be(t),n(t.calendarId));let o=Zi(xi(e),Ol,n),{calendar:r}=o,{year:i,month:a,day:s}=P(r,o),[c,u]=pn(r,i,a),{year:d,month:l}=((m,f,p,h)=>{let y=m?m.v(f,p,h):cr(f,p);return y||T(\"Cannot guess year\"),y})(r,c,u,s);return N(X(yn(r,d,l,s)),r)}function wc(e){let n=(o=>{let r=Ec(o);return r?(Yt(r[13]),xc(r,1)):void 0})(e=$(e)),t;return n||(n=Xe(e),n?(n.fe||ae(e),n.F&&T(Ze(\"Z\")),Ei(n)):ae(e)),(t=Ri(e))&&Da(t)&&ae(e),(t=Ci(e))&&Da(t)&&ae(e),vn(bt(n))}function Mc(e){let n=(t=>{let o=Cl.exec(t);return o?(r=>{let i=0,a=0,s=0,c={years:u(r[2]),months:u(r[3]),weeks:u(r[4]),days:u(r[5]),hours:u(r[6],r[7],5),minutes:u(r[8],r[9],4),seconds:u(r[10],r[11],3),...ri(s,2,k)};return i||T(Pa(k)),Dr(r[1])<0&&(c=H(c)),c;function u(d,l,m){let f=0,p=0;return m&&([f,s]=ve(s,Te[m])),d!==void 0&&(a&&T(Ze(d)),p=(h=>{let y=parseInt(h);return Number.isFinite(y)||T(Ze(h)),y})(d),i=1,l&&(s=gr(l)*(Te[m]/_e),a=1)),f+p}})(o):void 0})($(e));return n||ae(e),B(Qe(n))}function Sc(e){let n=Xe(e)||Ri(e)||Ci(e);if(n)return n.calendarId;let t=Ec(e);return t?Yt(t[13]).calendarId:e}function Pc(e){let n=Xe(e);return n&&(n.timeZoneId||n.F&&\"UTC\"||n.offset)||e}function xi(e){let n=Xe(e);return n&&!n.F||ae(e),n}function Zi(e,n,t){return n&&e.calendarId===\"iso8601\"?(Be(e),e.fe&&bt(e),hr(n(e),t)):e.fe?Oc(e,t):hr(e,t)}function Nl(e){let n=12*e.year+e.month===bs?20:1;return{...e,day:n}}function Ol(e){return{...e,year:1972}}function Nc(e,n,t){let o=ne(Bo(e.timeZoneId)),r;if(wt(e),e.fe){let a=e.offset?Ro(e.offset):void 0,[,s,c]=Zn(t);r=qn(o,e,a,s,c,!(o._||e.offset===void 0||(i=e.offset,i.replace(/\\D/g,\"\").length>4)),e.F)}else Zn(t),r=He(o,e);var i;return ge(r),De(r,o,n(e.calendarId))}function Oc(e,n){return wt(e),bn(e),{...E(e,e),calendar:n(e.calendarId)}}function hr(e,n){return Be(e),X(e),{calendar:n(e.calendarId),year:e.year,month:e.month,day:e.day}}function Fi(e){return`(\\\\d{2})(?:(:?)(\\\\d{2})(?:\\\\${e}(\\\\d{2})(?:[.,](\\\\d{1,9}))?)?)?`}function kc(e){return\"([+-])\"+Fi(e)}var kl=\"(?:(?:([+-])(\\\\d{6}))|(\\\\d{4}))(-?)(\\\\d{2})\\\\4(\\\\d{2})(?:[T ]\"+Fi(8)+\"(Z|\"+kc(15)+\")?)?\",El=Rn(\"(?:(?:([+-])(\\\\d{6}))|(\\\\d{4}))-?(\\\\d{2})((?:\\\\[(!?)([^\\\\]]*)\\\\]){0,9})\"),xl=Rn(\"(?:--)?(\\\\d{2})-?(\\\\d{2})((?:\\\\[(!?)([^\\\\]]*)\\\\]){0,9})\"),Zl=Rn(kl+\"((?:\\\\[(!?)([^\\\\]]*)\\\\]){0,9})\"),Fl=Rn(\"T?\"+Fi(2)+`(${kc(9)})?((?:\\\\[(!?)([^\\\\]]*)\\\\]){0,9})`),Rl=new RegExp(\"\\\\[(!?)([^\\\\]]*)\\\\]\",\"g\"),Cl=Rn(\"([+-])?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)?)?\");function Xe(e){let n=Zl.exec(e);return n?(t=>{let o=t[12],r=(o||\"\").toUpperCase()===\"Z\";return{year:Zc(t),month:parseInt(t[5]),day:parseInt(t[6]),...xc(t,7),...Yt(t[19]),fe:!!t[7],F:r,offset:r?void 0:o}})(n):void 0}function Ri(e){let n=El.exec(e);if(n)return(t=>({year:Zc(t),month:parseInt(t[4]),day:1,...Yt(t[5])}))(n)}function Ci(e){let n=xl.exec(e);return n?(t=>({year:1972,month:parseInt(t[1]),day:parseInt(t[2]),...Yt(t[3])}))(n):void 0}function Ec(e){let n=Fl.exec(e);if(n)return n[6]&&Ro(n[6]),n}function xc(e,n){let t=On(e[n+3]);return{...Or(gr(e[n+4]||\"\"))[0],hour:On(e[n]),minute:On(e[n+2]),second:t===60?59:t}}function Zc(e){let n=Dr(e[1]),t=parseInt(e[2]||e[3]);return n<0&&!t&&T(Ze(-0)),n*t}function Yt(e){let n,t,o=[];return e.replace(Rl,(r,i,a)=>{let s=!!i,[c,u]=a.split(\"=\").reverse();return u?u===\"u-ca\"?(o.push(c.toLowerCase()),n||(n=s)):(s||/[A-Z]/.test(u))&&T(Ze(r)):(t&&T(Ze(r)),t=c),\"\"}),o.length>1&&n&&T(Ze(e)),{timeZoneId:t,calendarId:o[0]||\"iso8601\"}}function Hn(e,n,t){let o=Object.assign(Object.create(null),n);return or(o,t,$a),$n(e)&&(or(o,t,wd),e&&e.le&&or(o,t,Md,Bn)),o}function or(e,n,t,o){let r=0,i=[];for(let a of t)n[a]!==void 0?r=1:i.push(a);if(Object.assign(e,n),r)for(let a of o||i)delete e[a]}function Fc(e,n,t){let{calendar:o,timeZone:r}=e,i=J(o,Pd,Nd),a=W(e),{year:s,month:c,day:u}=P(o,a),d={year:s,monthCode:Bt(o,s,c),day:u,hour:a.hour,minute:a.minute,second:a.second,millisecond:a.millisecond,microsecond:a.microsecond,nanosecond:a.nanosecond,offset:a.offsetNanoseconds},l=Z(n,i,hi),m=Hn(o,d,l),f={...d,...l},[p,h,y,b]=Co(o,m,()=>Zn(t,2));return De(qn(r,E(p,po(f,h)),f.offset,y,b),r,o)}function Rc(e,n,t){let{calendar:o}=e,r=J(o,Va,_a),{year:i,month:a,day:s}=P(o,e),c={year:i,monthCode:Bt(o,i,a),day:s,hour:e.hour,minute:e.minute,second:e.second,millisecond:e.millisecond,microsecond:e.microsecond,nanosecond:e.nanosecond},u=Z(n,r,fi),d=Hn(o,c,u),l={...c,...u},[m,f]=Co(o,d,()=>[w(t)]);return Rt(m,po(l,f),o)}function Cc(e,n,t){let{calendar:o}=e,r=J(o,gn,Dn),{year:i,month:a,day:s}=P(o,e);return ut(o,Hn(o,{year:i,monthCode:Bt(o,i,a),day:s},Z(n,r,de)),t)}function Yc(e,n,t){let{calendar:o}=e,r=J(o,gt,Ha),{year:i,month:a}=P(o,e);return yi(o,Hn(o,{year:i,monthCode:Bt(o,i,a)},Z(n,r,de)),t)}function Bc(e,n,t){let{calendar:o}=e,r=J(o,gn,Dn),{year:i,month:a,day:s}=P(o,e);return Ti(o,Hn(o,{monthCode:Bt(o,i,a),day:s},Z(n,r,de)),t)}function Wc(e,n,t){return((o,r,i)=>Ft({...Me(sr,o),...Z(r,sr,mi)},w(i)))(e,n,t)}function Ac(e,n){return B((t=e,o=n,Qe({...t,...Z(o,ls,Js)})));var t,o}function Bt(e,n,t){let[o,r]=pn(e,n,t);return qa(o,r)}function Uc(e,n,t){return De(e.epochNanoseconds,n,t)}function Lc(e){return ue(e.epochNanoseconds)}function Yi(e){return Pe(W(e),e.calendar)}function Bi(e){return N(W(e),e.calendar)}function Wi(e){return vn(W(e))}function qc(e,n,t){let o=((r,i,a)=>{let s=(c=>ys(ie(c)))(a);return kt(r,i,s)})(n,e,t);return De(ge(o),n,e.calendar)}function jc(e,n,t,o){let r=e(o.timeZone),i=o.plainTime,a=i!==void 0?n(i):void 0,s=ne(r),c;return c=a?kt(s,E(t,a)):He(s,E(t,ce)),De(c,s,t.calendar)}function $c(e,n,t){return Vc(e,Me(J(e,Dt,Ga),n),Z(dn(t),Tn,de,[]))}function Hc(e,n,t){let o=J(e,fo,Sd);return Vc(e,Me(za,n),Z(dn(t),o,de,[]))}function Gc(e,n){return Ti(e,Z(n,za,de))}function zc(e,n,t){return yi(e,Z(n,J(e,Dt,Ga),de),t)}function Vc(e,n,t){let o=J(e,Od,kd),r=Hn(e,n,t);return r=Z(r,o,de,[]),ut(e,r)}function _c(e){return ue(ge(BigInt(bo(e))*Yn))}function Jc(e){return ue(ge(Do(e)))}function Gn(e){return e.timeZone=\"UTC\",[\"full\",\"long\"].includes(e.timeStyle)&&(e.timeStyle=\"medium\"),e}function Kc(e,n){return e.timeZone!==void 0&&S(\"Cannot specify TimeZone\"),e.timeZone=n,e}function zn(e,n,t){let o=e.resolvedOptions().calendar;!t&&n.calendar===se||ye(n.calendar)===o||T(\"Mismatching Calendars\")}function Mn(e,n,t,o,r){let i=new Set(e),a=new Set(n),s=new Set(t);return(c,u)=>{let d=((I,F,j,K)=>{let Q={dateStyle:void 0,timeStyle:void 0,me:{},pe:{},xe:{},oe:0,ue:0};for(let V of Object.keys(I)){let Pn=I[V];Pn===void 0||K.has(V)||(F.has(V)?V===\"dateStyle\"?Q.dateStyle=Pn:V===\"timeStyle\"?Q.timeStyle=Pn:Q.me[V]=Pn:V===\"era\"?Q.pe[V]=Pn:j.has(V)?V===\"dateStyle\"||V===\"timeStyle\"?Q.ue=1:Q.oe=1:Q.xe[V]=Pn)}return Q})(c,i,a,s),l=d.dateStyle!==void 0,m=d.timeStyle!==void 0,f=l||m,p=Object.keys(d.me).length>0,h=d.oe||d.ue,y=p||l||m,b=Object.keys(d.pe).length>0,v=p||b||d.oe;(!u&&h||u&&h&&!y||f&&v)&&S(\"Invalid formatting options\");let D={};return f||y||Object.assign(D,o),Object.assign(D,d.me,d.pe,d.xe),l&&(r?Object.assign(D,r[d.dateStyle]):D.dateStyle=d.dateStyle),m&&(D.timeStyle=d.timeStyle),D}}var Qc={year:\"numeric\",month:\"numeric\",day:\"numeric\"},Xc={hour:\"numeric\",minute:\"numeric\",second:\"numeric\"},Ai=Object.assign({},Qc,Xc),Yl=Object.assign({},Ai,{timeZoneName:\"short\"}),Bl={year:\"numeric\",month:\"numeric\"},Wl={month:\"numeric\",day:\"numeric\"},Ui=[\"weekday\",\"year\",\"month\",\"day\",\"dateStyle\"],Wt=[\"dayPeriod\",\"hour\",\"minute\",\"second\",\"fractionalSecondDigits\",\"timeStyle\"],Li=Ui.concat(Wt),Al=[\"weekday\",\"day\"].concat(Wt),Ul=[\"weekday\",\"year\"].concat(Wt),eu=Mn(Li,[],[],Ai),nu=Mn(Li,[],[],Yl),tu=Mn(Li,[],[\"timeZoneName\"],Ai),ou=Mn(Ui,Wt,[\"timeZoneName\"],Qc),ru=Mn(Wt,Ui,[\"timeZoneName\",\"era\"],Xc),iu=Mn([\"year\",\"month\",\"dateStyle\"],Al,[\"timeZoneName\"],Bl,{full:{year:\"numeric\",month:\"long\"},long:{year:\"numeric\",month:\"long\"},medium:{year:\"numeric\",month:\"short\"},short:{year:\"2-digit\",month:\"numeric\"}}),au=Mn([\"month\",\"day\",\"dateStyle\"],Ul,[\"timeZoneName\",\"era\"],Wl,{full:{month:\"long\",day:\"numeric\"},long:{month:\"long\",day:\"numeric\"},medium:{month:\"short\",day:\"numeric\"},short:{month:\"numeric\",day:\"numeric\"}});function su(e,n){let{timeZone:t}=e,o=W(e),{offsetNanoseconds:r}=o,i=n||ce,a;return a=n?qn(t,E(o,i),r,2):He(t,E(o,i)),De(a,t,e.calendar)}function Wo(e){let n=Ao(),t=e.C(n);return It(n+BigInt(t))}function Ao(){return BigInt(Date.now())*Yn}function Vn(){return new Ne().resolvedOptions().timeZone}var qi=\"PlainYearMonth\",ji=\"PlainMonthDay\",$i=\"PlainDate\",Hi=\"PlainDateTime\",Gi=\"PlainTime\",zi=\"ZonedDateTime\",Vi=\"Instant\",_i=\"Duration\";function Ae(e,n,t,...o){Object.defineProperties(n,Ra(e)),Object.defineProperties(n.prototype,lt(\"Temporal.\"+e));for(let r of o)Ll(n.prototype,t,r);return n}function Ll(e,n,t){Object.defineProperties(e,Ve(o=>({get(){return o(n(this))},configurable:1}),t))}var Ue=Tr.name===\"noop\"?e=>{Object.defineProperty(e,\"_str_\",{value:e.toJSON()})}:Tr;function Le(){S(Ea)}function qe(){S(ka)}var uu={era(e){return Mt(e.calendar,e).era},eraYear(e){return Mt(e.calendar,e).eraYear},year(e){return P(e.calendar,e).year},month(e){return P(e.calendar,e).month},monthCode(e){return go(e.calendar,e)}},Uo={era(e){return Mt(e.calendar,e).era},eraYear(e){return Mt(e.calendar,e).eraYear},year(e){return P(e.calendar,e).year},month(e){return P(e.calendar,e).month},monthCode(e){return go(e.calendar,e)},day(e){return P(e.calendar,e).day}},du={monthCode(e){return go(e.calendar,e)},day(e){return P(e.calendar,e).day}},Ji={daysInMonth(e){return xr(e.calendar,e)},daysInYear(e){return Zr(e.calendar,e)},monthsInYear(e){return Er(e.calendar,e)},inLeapYear(e){return kr(e.calendar,e)}},At={dayOfWeek(e){return To(e)},dayOfYear(e){return cs(e.calendar,e)},weekOfYear(e){return us(e.calendar,e)},yearOfWeek(e){return ds(e.calendar,e)},daysInWeek(){return 7},daysInMonth(e){return xr(e.calendar,e)},daysInYear(e){return Zr(e.calendar,e)},monthsInYear(e){return Er(e.calendar,e)},inLeapYear(e){return kr(e.calendar,e)}};function cu(e){return lo(Object.keys(e))}cu(Ji),cu(At);function on(e){let n=$(e).toLowerCase();return n===Ir?se:n===Wa?Ua:void T(Za(e,\"temporal-polyfill/full\"))}function qt(e=Ir){return on(e)}var mu=new WeakMap,fu=Ae(zi,class{constructor(e,n,t=void 0){let o=ge(Do(e)),r=ne(ac(n)),i=qt(t);hu(this,De(o,r,i))}static from(e,n=void 0){return te(_n(e,n))}static compare(e,n){return ci(_n(e),_n(n))}get calendarId(){return ye(M(this).calendar)}get timeZoneId(){return M(this).timeZone.id}get epochMilliseconds(){return Pt(M(this))}get epochNanoseconds(){return Nt(M(this))}get offset(){return Ct(W(M(this)).offsetNanoseconds)}get offsetNanoseconds(){return W(M(this)).offsetNanoseconds}get hoursInDay(){return Ss(M(this))}with(e,n=void 0){return te(Fc(M(this),et(e),n))}withCalendar(e){return te({...M(this),calendar:jo(e)})}withTimeZone(e){return te({...M(this),timeZone:ne(fe(e))})}withPlainTime(e=void 0){return te(su(M(this),ea(e)))}add(e,n=void 0){let t=M(this);return te(Et(t,q(e),n))}subtract(e,n=void 0){let t=M(this);return te(Et(t,H(q(e)),n))}until(e,n=void 0){let t=M(this),o=_n(e),r=We(t.calendar,o.calendar);return Y(B(Kr(0,r,t,o,n)))}since(e,n=void 0){let t=M(this),o=_n(e),r=We(t.calendar,o.calendar);return Y(B(Kr(1,r,t,o,n)))}round(e){let n=M(this),[t,o,r]=St(e);return te(Ms(n,t,o,r))}startOfDay(){return te(Ps(M(this)))}equals(e){return $s(M(this),_n(e))}toInstant(){return je(Lc(M(this)))}toPlainDateTime(){return Oe(Yi(M(this)))}toPlainDate(){return ke(Bi(M(this)))}toPlainTime(){return tn(Wi(M(this)))}toLocaleString(e=void 0,n={}){let t=M(this),o=new Ne(e,Kc(nu(n),Es(t)));return zn(o,t),o.format(Pt(t))}toString(e=void 0){return vi(M(this),e)}toJSON(){return vi(M(this))}getTimeZoneTransition(e){let n=M(this),t=Os(n,e);return t?te({...n,epochNanoseconds:t}):null}valueOf(){return qe()}},ql,Uo,At,Tt);function te(e){return hu(Object.create(fu.prototype),e)}function M(e){return Ee(e)||Le()}function ql(e){let n=M(e);return{...W(n),calendar:n.calendar}}function Ee(e){return mu.get(e)}function _n(e,n){if(ee(e)){let t=Ee(e);if(t)return Zn(n),t;let o=jt(e);return uc(fe,o,e,n)}return gc(e,on,n)}function hu(e,n){return mu.set(e,n),Ue(e),e}function fe(e){if(ee(e)){let n=Ee(e);return n||S(pr(e)),n.timeZone.id}return(n=>Bo(Pc($(n))))(e)}var pu=new WeakMap,yu=Ae(Vi,class{constructor(e){let n=ge(Do(e));gu(this,ue(n))}static from(e){return je(Jn(e))}static fromEpochMilliseconds(e){return je(_c(e))}static fromEpochNanoseconds(e){return je(Jc(e))}static compare(e,n){return si(Jn(e),Jn(n))}get epochMilliseconds(){return Pt(le(this))}get epochNanoseconds(){return Nt(le(this))}add(e){let n=le(this);return je(ue(_r(n.epochNanoseconds,q(e))))}subtract(e){let n=le(this);return je(ue(_r(n.epochNanoseconds,H(q(e)))))}until(e,n=void 0){return Y(Jr(0,le(this),Jn(e),n))}since(e,n=void 0){return Y(Jr(1,le(this),Jn(e),n))}round(e){let n=le(this),[t,o,r]=St(e,5,1);return je(ue(No(n.epochNanoseconds,Ot(t,o),r)))}equals(e){return js(le(this),Jn(e))}toZonedDateTimeISO(e){return te(Uc(le(this),ne(fe(e))))}toLocaleString(e=void 0,n={}){let t=le(this);return new Ne(e,eu(n)).format(Pt(t))}toString(e=void 0){return bi(fe,le(this),e)}toJSON(){return bi(fe,le(this))}valueOf(){return qe()}});function je(e){return gu(Object.create(yu.prototype),e)}function le(e){return Qi(e)||Le()}function Qi(e){return pu.get(e)}function Jn(e){if(ee(e)){let n=Qi(e);if(n)return n;let t=Ee(e);if(t)return ue(t.epochNanoseconds)}return yc(e)}var{toTemporalInstant:Tu}={toTemporalInstant(){let e=Date.prototype.valueOf.call(this);return je(ue(BigInt(Yr(e))*Yn))}};function gu(e,n){return pu.set(e,n),Ue(e),e}var Du=new WeakMap,bu=Ae(ji,class{constructor(e,n,t=void 0,o){let r=U(e),i=U(n),a=qt(t),s=U(o??ts),c=X(Be({year:s,month:r,day:i}));vu(this,N(c,a))}static from(e,n=void 0){return Ki(lu(e,n))}get calendarId(){return ye(en(this).calendar)}with(e,n=void 0){return Ki(Bc(en(this),et(e),n))}equals(e){return Vs(en(this),lu(e))}toPlainDate(e){let n=en(this);return ke(Hc(n.calendar,this,e))}toLocaleString(e=void 0,n={}){let t=en(this),o=new Ne(e,Gn(au(n)));return zn(o,t,1),o.format(vt(t))}toString(e=void 0){return Si(en(this),e)}toJSON(){return Si(en(this))}valueOf(){return qe()}},en,du);function Ki(e){return vu(Object.create(bu.prototype),e)}function en(e){return Lo(e)||Le()}function Lo(e){return Du.get(e)}function lu(e,n){if(ee(e)){let o=Lo(e);if(o)return w(n),o;let r=Ru(e);return fc(r===void 0?se:r,r===void 0,e,n)}let t=Ic(e,on);return w(n),t}function vu(e,n){return Du.set(e,n),Ue(e),e}var Iu=new WeakMap,wu=Ae(qi,class{constructor(e,n,t=void 0,o){let r=U(e),i=U(n),a=qt(t),s=U(o??1),c=Io(Be({year:r,month:i,day:s}));Mu(this,N(c,a))}static from(e,n=void 0){return Lt(Kn(e,n))}static compare(e,n){return wn(Kn(e),Kn(n))}get calendarId(){return ye(me(this).calendar)}with(e,n=void 0){return Lt(Yc(me(this),et(e),n))}add(e,n=void 0){let t=me(this);return Lt(N(Vr(0,t.calendar,t,q(e),n),t.calendar))}subtract(e,n=void 0){let t=me(this);return Lt(N(Vr(1,t.calendar,t,q(e),n),t.calendar))}until(e,n=void 0){let t=me(this),o=Kn(e),r=We(t.calendar,o.calendar);return Y(ei(0,r,t,o,n))}since(e,n=void 0){let t=me(this),o=Kn(e),r=We(t.calendar,o.calendar);return Y(ei(1,r,t,o,n))}equals(e){return zs(me(this),Kn(e))}toPlainDate(e){let n=me(this);return ke($c(n.calendar,this,e))}toLocaleString(e=void 0,n={}){let t=me(this),o=new Ne(e,Gn(iu(n)));return zn(o,t,1),o.format(vt(t))}toString(e=void 0){return Mi(me(this),e)}toJSON(){return Mi(me(this))}valueOf(){return qe()}},me,uu,Ji);function Lt(e){return Mu(Object.create(wu.prototype),e)}function me(e){return qo(e)||Le()}function qo(e){return Iu.get(e)}function Kn(e,n){if(ee(e)){let o=qo(e);if(o)return w(n),o;let r=jt(e);return mc(r,e,n)}let t=vc(e,on);return w(n),t}function Mu(e,n){return Iu.set(e,n),Ue(e),e}function jl(e){if(!ee(e))return;let n=Qi(e);return n?[Vi,n]:(n=Ee(e),n?[zi,n]:(n=Sn(e),n?[Hi,n]:(n=nt(e),n?[$i,n]:(n=Xi(e),n?[Gi,n]:(n=qo(e),n?[qi,n]:(n=Lo(e),n?[ji,n]:(n=na(e),n?[_i,n]:void 0)))))))}function et(e){return(jl(e)||e.calendar!==void 0||e.timeZone!==void 0)&&S(Na),e}var Su=new WeakMap,Pu=Ae(Gi,class{constructor(e=0,n=0,t=0,o=0,r=0,i=0){let a=bt(Ve(U,{hour:e,minute:n,second:t,millisecond:o,microsecond:r,nanosecond:i}));Nu(this,vn(a))}static from(e,n=void 0){return tn(nn(e,n))}static compare(e,n){return Fo(nn(e),nn(n))}with(e,n=void 0){return tn(Wc(be(this),et(e),n))}add(e){let n=be(this);return tn(Oo(n,q(e))[0])}subtract(e){let n=be(this);return tn(Oo(n,H(q(e)))[0])}until(e,n=void 0){return Y(ni(0,be(this),nn(e),n))}since(e,n=void 0){return Y(ni(1,be(this),nn(e),n))}round(e){let n=be(this),[t,o,r]=St(e,5);return tn(Mo(n,Ln(t,o),r)[0])}equals(e){return _s(be(this),nn(e))}toLocaleString(e=void 0,n={}){let t=be(this);return new Ne(e,Gn(ru(n))).format(Pr(t))}toString(e=void 0){return Pi(be(this),e)}toJSON(){return Pi(be(this))}valueOf(){return qe()}},be,Tt);function tn(e){return Nu(Object.create(Pu.prototype),e)}function be(e){return Xi(e)||Le()}function Xi(e){return Su.get(e)}function nn(e,n){if(ee(e)){let o=Xi(e);if(o)return w(n),o;let r=Sn(e);if(r)return w(n),vn(r);let i=Ee(e);return i?(w(n),Wi(i)):hc(e,n)}let t=wc(e);return w(n),t}function ea(e){return e===void 0?void 0:nn(e)}function Nu(e,n){return Su.set(e,n),Ue(e),e}var Ou=new WeakMap,ku=Ae(Hi,class{constructor(e,n,t,o=0,r=0,i=0,a=0,s=0,c=0,u=void 0){let d=bn(wt(Ve(U,{year:e,month:n,day:t,hour:o,minute:r,second:i,millisecond:a,microsecond:s,nanosecond:c}))),l=qt(u);Eu(this,Pe(d,l))}static from(e,n=void 0){return Oe(Qn(e,n))}static compare(e,n){let t=Qn(e),o=Qn(n);return ui(t,o)}get calendarId(){return ye(L(this).calendar)}with(e,n=void 0){return Oe(Rc(L(this),et(e),n))}withCalendar(e){let n=L(this);return Oe(Pe(n,jo(e)))}withPlainTime(e=void 0){let n=L(this);return Oe(Rt(n,ea(e),n.calendar))}add(e,n=void 0){let t=L(this);return Oe(Pe(xt(t.calendar,t,q(e),n),t.calendar))}subtract(e,n=void 0){let t=L(this);return Oe(Pe(xt(t.calendar,t,H(q(e)),n),t.calendar))}until(e,n=void 0){let t=L(this),o=Qn(e),r=We(t.calendar,o.calendar);return Y(Qr(0,r,t,o,n))}since(e,n=void 0){let t=L(this),o=Qn(e),r=We(t.calendar,o.calendar);return Y(Qr(1,r,t,o,n))}round(e){let n=L(this),[t,o,r]=St(e);return Oe(Pe(wo(n,Ln(t,o),r),n.calendar))}equals(e){return Hs(L(this),Qn(e))}toZonedDateTime(e,n=void 0){return te(qc(L(this),ne(fe(e)),n))}toPlainDate(){let e=L(this);return ke(N(e,e.calendar))}toPlainTime(){return tn(vn(L(this)))}toLocaleString(e=void 0,n={}){let t=L(this),o=new Ne(e,Gn(tu(n)));return zn(o,t),o.format(es(t))}toString(e=void 0){return Ii(L(this),e)}toJSON(){return Ii(L(this))}valueOf(){return qe()}},L,Uo,At,Tt);function Oe(e){return Eu(Object.create(ku.prototype),e)}function L(e){return Sn(e)||Le()}function Sn(e){return Ou.get(e)}function Qn(e,n){if(ee(e)){let o=Sn(e);if(o)return w(n),o;let r=nt(e);if(r)return w(n),Pe(E(r,ce),r.calendar);let i=Ee(e);if(i)return w(n),Yi(i);let a=jt(e);return dc(a,e,n)}let t=Dc(e,on);return w(n),t}function Eu(e,n){return Ou.set(e,n),Ue(e),e}var xu=new WeakMap,Zu=Ae($i,class{constructor(e,n,t,o=void 0){let r=X(Be(Ve(U,{year:e,month:n,day:t}))),i=qt(o);Fu(this,N(r,i))}static from(e,n=void 0){return ke(Xn(e,n))}static compare(e,n){return wn(Xn(e),Xn(n))}get calendarId(){return ye(G(this).calendar)}with(e,n=void 0){let t=G(this);return ke(Cc(t,et(e),n))}withCalendar(e){let n=G(this);return ke(N(n,jo(e)))}add(e,n=void 0){let t=G(this);return ke(N(jn(t.calendar,t,q(e),n),t.calendar))}subtract(e,n=void 0){let t=G(this);return ke(N(jn(t.calendar,t,H(q(e)),n),t.calendar))}until(e,n=void 0){let t=G(this),o=Xn(e),r=We(t.calendar,o.calendar);return Y(Xr(0,r,t,o,n))}since(e,n=void 0){let t=G(this),o=Xn(e),r=We(t.calendar,o.calendar);return Y(Xr(1,r,t,o,n))}equals(e){return Gs(G(this),Xn(e))}toZonedDateTime(e){let n=ee(e)?{timeZone:e.timeZone,plainTime:e.plainTime}:{timeZone:e};return te(jc(fe,nn,G(this),n))}toPlainDateTime(e=void 0){let n=G(this);return Oe(Rt(n,ea(e),n.calendar))}toPlainYearMonth(){let e=G(this);return Lt(zc(e.calendar,this))}toPlainMonthDay(){let e=G(this);return Ki(Gc(e.calendar,this))}toLocaleString(e=void 0,n={}){let t=G(this),o=new Ne(e,Gn(ou(n)));return zn(o,t),o.format(vt(t))}toString(e=void 0){return wi(G(this),e)}toJSON(){return wi(G(this))}valueOf(){return qe()}},G,Uo,At);function ke(e){return Fu(Object.create(Zu.prototype),e)}function G(e){return nt(e)||Le()}function nt(e){return xu.get(e)}function Xn(e,n){if(ee(e)){let o=nt(e);if(o)return w(n),o;let r=Sn(e);if(r)return w(n),N(r,r.calendar);let i=Ee(e);if(i)return w(n),Bi(i);let a=jt(e);return lc(a,e,n)}let t=bc(e,on);return w(n),t}function Fu(e,n){return xu.set(e,n),Ue(e),e}function jt(e){let n=Ru(e);return n===void 0?se:n}function Ru(e){let{calendar:n}=e;if(n!==void 0)return jo(n)}function jo(e){if(ee(e)){let n=nt(e)||Sn(e)||Ee(e)||Lo(e)||qo(e);return n||S(xa(e)),n.calendar}return(n=>on(Sc($(n))))(e)}var Cu=new WeakMap,Yu=Ae(_i,class{constructor(e=0,n=0,t=0,o=0,r=0,i=0,a=0,s=0,c=0,u=0){let d=Qe(Ve(bo,{years:e,months:n,weeks:t,days:o,hours:r,minutes:i,seconds:a,milliseconds:s,microseconds:c,nanoseconds:u}));Bu(this,B(d))}static from(e){return Y(q(e))}static compare(e,n,t=void 0){return qs(Ut,q(e),q(n),t)}get sign(){return re(this).sign}get blank(){return!re(this).sign}with(e){return Y(Ac(re(this),e))}negated(){return Y(ai(re(this)))}abs(){return Y(Ws(re(this)))}add(e,n=void 0){return Y(ii(Ut,0,re(this),q(e),n))}subtract(e,n=void 0){return Y(ii(Ut,1,re(this),q(e),n))}round(e){return Y(Bs(Ut,re(this),e))}total(e){return Is(Ut,re(this),e)}toLocaleString(e=void 0,n){let t=re(this);return Intl.DurationFormat?new Intl.DurationFormat(e,n).format(t):Yo(t,n)}toString(e=void 0){return Yo(re(this),e)}toJSON(){return Yo(re(this))}valueOf(){return qe()}},re,Fr);function Y(e){return Bu(Object.create(Yu.prototype),e)}function re(e){return na(e)||Le()}function na(e){return Cu.get(e)}function q(e){return ee(e)?na(e)||pc(e):Mc(e)}function Ut(e){if(e!==void 0){if(ee(e)){let n=Ee(e);if(n)return n;let t=nt(e);if(t)return t;let o=Sn(e);if(o)return N(o,o.calendar);let r=jt(e);return cc(fe,r,e)}return Tc(e,on)}}function Bu(e,n){return Cu.set(e,n),Ue(e),e}var $l=Object.defineProperties({},{...lt(\"Temporal.Now\"),...uo({timeZoneId(){return Vn()},instant(){return je(ue(Ao()))},zonedDateTimeISO(e=Vn()){let n=ne(fe(e));return te(De(Ao(),n))},plainDateTimeISO(e=Vn()){let n=Wo(ne(fe(e)));return Oe(Pe(n))},plainDateISO(e=Vn()){let n=Wo(ne(fe(e)));return ke(N(n))},plainTimeISO(e=Vn()){let n=Wo(ne(fe(e)));return tn(vn(n))}})}),Wu=Object.defineProperties({},{...lt(\"Temporal\"),...uo({PlainYearMonth:wu,PlainMonthDay:bu,PlainDate:Zu,PlainTime:Pu,PlainDateTime:ku,ZonedDateTime:fu,Instant:yu,Duration:Yu,Now:$l})});var Au=Vo||Wu;var of=Vo?Date.prototype.toTemporalInstant:Tu;var Uu;function Lu(e){Uu=e}function he(){let e=Uu??globalThis.Temporal;if(!e)throw new ReferenceError('temporals: no Temporal implementation found. Use a runtime with native Temporal (Node 22+), import \"temporal-polyfill/global\", or call configureTemporal(Temporal).');return e}function z(e){let n=e?.constructor?.name;switch(n){case\"PlainDate\":return\"date\";case\"PlainDateTime\":return\"datetime\";case\"ZonedDateTime\":return\"zoneddatetime\";case\"PlainYearMonth\":return\"yearmonth\";case\"PlainTime\":return\"time\";case\"Instant\":return\"instant\";default:throw new TypeError(`temporals: expected a Temporal point (PlainDate, PlainDateTime, ZonedDateTime, PlainYearMonth, PlainTime, Instant), got ${n??typeof e}`)}}function ta(e){return e===\"date\"||e===\"datetime\"||e===\"zoneddatetime\"}function Hl(e){return e===\"date\"||e===\"datetime\"||e===\"zoneddatetime\"||e===\"yearmonth\"}function g(e,n){return e.constructor.compare(e,n)}function $t(e,n,t){let o=e;return t&&Hl(z(e))?o.add(n,{overflow:t}):o.add(n)}var Gl=[\"years\",\"months\",\"weeks\",\"days\",\"hours\",\"minutes\",\"seconds\",\"milliseconds\",\"microseconds\",\"nanoseconds\"];function qu(e,n){if(n===1)return e;let t=e,o={},r=!1;for(let i of Gl){let a=t[i];a&&(o[i]=a*n,r=!0)}return r?o:e}function ju(e,n,t){return e.until(n,t)}function Ht(e){return e.toString()}function $u(e,n,t){let o=e.toZonedDateTime(n,{disambiguation:\"compatible\"});if(!o.toPlainDateTime().equals(e))return(t.dstGap??\"fire\")===\"skip\"?null:o;let r=e.toZonedDateTime(n,{disambiguation:\"earlier\"}),i=e.toZonedDateTime(n,{disambiguation:\"later\"});return r.equals(i)?o:(t.dstOverlap??\"first\")===\"second\"?i:r}var zl=[\"MO\",\"TU\",\"WE\",\"TH\",\"FR\",\"SA\",\"SU\"];function rn(e){let n=zl.indexOf(e);if(n<0)throw new RangeError(`temporals: invalid weekday \"${e}\"`);return n+1}function Hu(e){let n=z(e);if(n===\"date\")return e;if(n===\"datetime\"||n===\"zoneddatetime\")return e.toPlainDate();throw new TypeError(\"temporals: recurrence requires a date-bearing point (PlainDate, PlainDateTime, or ZonedDateTime)\")}function Gu(e,n){let t=z(e);if(t===\"date\")return n;if(t===\"datetime\"){let o=e.toPlainTime();return n.toPlainDateTime(o)}if(t===\"zoneddatetime\"){let o=e;return n.toZonedDateTime({timeZone:o.timeZoneId,plainTime:o.toPlainTime()})}throw new TypeError(\"temporals: cannot rebuild a non-date-bearing point onto a date\")}function $o(e,n,t){return e.with({year:n,month:t,day:1},{overflow:\"constrain\"}).daysInMonth}function oa(e,n,t,o){let r=e.with({year:n,month:t,day:1},{overflow:\"constrain\"}).dayOfWeek;return 1+(o-r+7)%7}var tt=class e{#e;constructor(n){this.#e=()=>{let t=n(),o=t;return typeof o[Symbol.iterator]==\"function\"?o[Symbol.iterator]():t}}[Symbol.iterator](){return this.#e()}static from(n){return typeof n==\"function\"?new e(n):new e(()=>n[Symbol.iterator]())}static of(...n){return new e(()=>n[Symbol.iterator]())}static empty(){return new e(function*(){})}map(n){let t=this;return new e(function*(){let o=0;for(let r of t)yield n(r,o++)})}filter(n){let t=this;return new e(function*(){let o=0;for(let r of t)n(r,o++)&&(yield r)})}flatMap(n){let t=this;return new e(function*(){let o=0;for(let r of t)yield*n(r,o++)})}take(n){let t=this;return new e(function*(){if(n<=0)return;let o=0;for(let r of t)if(yield r,++o>=n)return})}drop(n){let t=this;return new e(function*(){let o=0;for(let r of t)o++<n||(yield r)})}takeWhile(n){let t=this;return new e(function*(){let o=0;for(let r of t){if(!n(r,o++))return;yield r}})}dropWhile(n){let t=this;return new e(function*(){let o=0,r=!0;for(let i of t)r&&n(i,o++)||(r=!1,yield i)})}tap(n){let t=this;return new e(function*(){let o=0;for(let r of t)n(r,o++),yield r})}concat(...n){let t=this;return new e(function*(){yield*t;for(let o of n)yield*o})}pairwise(){let n=this;return new e(function*(){let t,o=!1;for(let r of n)o&&(yield[t,r]),t=r,o=!0})}toArray(){return[...this]}forEach(n){let t=0;for(let o of this)n(o,t++)}reduce(n,t){let o=t,r=0;for(let i of this)o=n(o,i,r++);return o}find(n){let t=0;for(let o of this)if(n(o,t++))return o}some(n){let t=0;for(let o of this)if(n(o,t++))return!0;return!1}every(n){let t=0;for(let o of this)if(!n(o,t++))return!1;return!0}first(){for(let n of this)return n}at(n){if(n<0)return;let t=0;for(let o of this)if(t++===n)return o}count(){let n=0;for(let t of this)n++;return n}};function Ho(e){let{start:n,end:t,count:o,step:r,inclusive:i=!1,overflow:a}=e;if(o!==void 0&&(o<0||!Number.isInteger(o)))throw new RangeError(\"temporals: range() count must be a non-negative integer\");return new tt(function*(){if(o===0)return;let s=$t(n,r,a),c=g(s,n);if(c===0&&o===void 0)throw new RangeError(\"temporals: range() step is zero with no count bound (would be infinite)\");let u=l=>{if(t===void 0)return!0;let m=g(l,t);return c>0?i?m<=0:m<0:c<0?i?m>=0:m>0:!0},d=0;for(;;){let l=d===0?n:$t(n,qu(r,d),a);if(!u(l)||(yield l,d++,o!==void 0&&d>=o))return}})}var xe=class e{start;end;constructor(n,t){if(z(n)!==z(t))throw new TypeError(\"temporals: Interval start and end must be the same Temporal type\");this.start=n,this.end=t}get isEmpty(){return g(this.start,this.end)>=0}contains(n){return g(this.start,n)<=0&&g(n,this.end)<0}overlaps(n){return g(this.start,n.end)<0&&g(n.start,this.end)<0}encloses(n){return g(this.start,n.start)<=0&&g(n.end,this.end)<=0}abuts(n){return g(this.end,n.start)===0||g(n.end,this.start)===0}relation(n){let t=this.start,o=this.end,r=n.start,i=n.end;if(g(o,r)<0)return\"before\";if(g(o,r)===0)return\"meets\";if(g(i,t)<0)return\"after\";if(g(i,t)===0)return\"metBy\";let a=g(t,r),s=g(o,i);return a===0&&s===0?\"equals\":a===0?s<0?\"starts\":\"startedBy\":s===0?a>0?\"finishes\":\"finishedBy\":a<0&&s>0?\"contains\":a>0&&s<0?\"during\":a<0?\"overlaps\":\"overlappedBy\"}intersection(n){let t=g(this.start,n.start)>=0?this.start:n.start,o=g(this.end,n.end)<=0?this.end:n.end;return g(t,o)>=0?null:new e(t,o)}toDuration(n){return ju(this.start,this.end,n)}points(n){return Ho({start:this.start,end:this.end,step:n})}toString(){return`${this.start.toString()}/${this.end.toString()}`}toJSON(){return this.toString()}static from(n){let t=0,o=-1;for(let c=0;c<n.length;c++){let u=n[c];if(u===\"[\")t++;else if(u===\"]\")t--;else if(u===\"/\"&&t===0){o=c;break}}if(o<0)throw new RangeError(`temporals: invalid ISO interval \"${n}\" (expected \"start/end\")`);let r=n.slice(0,o),i=n.slice(o+1),a=he(),s=c=>c.includes(\"[\")?a.ZonedDateTime.from(c):c.includes(\"T\")?a.PlainDateTime.from(c):a.PlainDate.from(c);return new e(s(r),s(i))}};var Gt=class e{intervals;constructor(n){this.intervals=n}static from(n){let t=[...n].filter(r=>!r.isEmpty);t.sort((r,i)=>g(r.start,i.start)||g(r.end,i.end));let o=[];for(let r of t){let i=o[o.length-1];i&&g(r.start,i.end)<=0?g(r.end,i.end)>0&&(o[o.length-1]=new xe(i.start,r.end)):o.push(r)}return new e(o)}static empty(){return new e([])}get isEmpty(){return this.intervals.length===0}[Symbol.iterator](){return this.intervals[Symbol.iterator]()}contains(n){return this.intervals.some(t=>t.contains(n))}union(n){let t=n instanceof e?n.intervals:[...n];return e.from([...this.intervals,...t])}intersection(n){let t=[];for(let o of this.intervals)for(let r of n.intervals){if(g(r.start,o.end)>=0)break;let i=o.intersection(r);i&&t.push(i)}return e.from(t)}difference(n){let t=[];for(let o of this.intervals){let r=[o];for(let i of n.intervals){if(g(i.end,o.start)<=0||g(i.start,o.end)>=0)continue;let a=[];for(let s of r){if(!s.overlaps(i)){a.push(s);continue}g(s.start,i.start)<0&&a.push(new xe(s.start,i.start)),g(i.end,s.end)<0&&a.push(new xe(i.end,s.end))}r=a}t.push(...r)}return e.from(t)}gaps(n){if(n)return e.from([n]).difference(this);let t=[];for(let o=1;o<this.intervals.length;o++){let r=this.intervals[o-1],i=this.intervals[o];g(r.end,i.start)<0&&t.push(new xe(r.end,i.start))}return new e(t)}totalDuration(){let n=he();if(this.intervals.length===0)return n.Duration.from({seconds:0});let t=z(this.intervals[0].start),o=t===\"date\"||t===\"yearmonth\"?\"day\":\"hour\",r=n.Duration.from({seconds:0});for(let i of this.intervals)r=r.add(i.toDuration({largestUnit:o}));return r}toString(){return this.intervals.map(n=>n.toString()).join(\", \")}};function Go(){return he().PlainDate}function ra(e,n){if(!n)return e;let t=n===\"uk\"?\"uk\":\"us\";return e.dayOfWeek===6?t===\"uk\"?e.add({days:2}):e.subtract({days:1}):e.dayOfWeek===7?e.add({days:1}):e}function sn(e,n,t={}){return o=>{let r=Go().from({year:o,month:e,day:n},{overflow:\"reject\"});return ra(r,t.observed??!1)}}function Jt(e=0,n={}){return t=>{let o=t%19,r=Math.floor(t/100),i=t%100,a=Math.floor(r/4),s=r%4,c=Math.floor((r+8)/25),u=Math.floor((r-c+1)/3),d=(19*o+r-a-u+15)%30,l=Math.floor(i/4),m=i%4,f=(32+2*s+2*l-d-m)%7,p=Math.floor((o+11*d+22*f)/451),h=Math.floor((d+f-7*p+114)/31),y=(d+f-7*p+114)%31+1,b=Go().from({year:t,month:h,day:y}).add({days:e});return ra(b,n.observed??!1)}}function an(e,n,t,o={}){let r=rn(n);return i=>{let a=Go().from({year:i,month:e,day:1}),s=a.daysInMonth,c=1+(r-a.dayOfWeek+7)%7,u;if(t>0){if(u=c+(t-1)*7,u>s)return null}else if(u=c+Math.floor((s-c)/7)*7+(t+1)*7,u<1)return null;return ra(a.with({day:u}),o.observed??!1)}}var zt=class e{rules;cache=new Map;constructor(n){this.rules=n}static of(...n){return new e(n)}yearSet(n){let t=this.cache.get(n);return t||(t=new Set(this.rules.map(o=>o(n)).filter(o=>o!==null).map(o=>o.toString())),this.cache.set(n,t)),t}has(n){let t=n.toString();return this.yearSet(n.year).has(t)||this.yearSet(n.year-1).has(t)||this.yearSet(n.year+1).has(t)}inYear(n){return[...this.yearSet(n)].map(t=>Go().from(t)).sort((t,o)=>g(t,o))}};function Vu(){return zt.of(sn(1,1,{observed:!0}),an(1,\"MO\",3),an(2,\"MO\",3),an(5,\"MO\",-1),sn(6,19,{observed:!0}),sn(7,4,{observed:!0}),an(9,\"MO\",1),an(10,\"MO\",2),sn(11,11,{observed:!0}),an(11,\"TH\",4),sn(12,25,{observed:!0}))}var zu=4e3,Vt=class{weekend;holidays;constructor(n={}){let t=n.weekend??[\"SA\",\"SU\"];this.weekend=new Set(t.map(rn)),this.holidays=n.holidays}toDate(n){let t=n;return t.toPlainDate?t.toPlainDate():n}isBusinessDay(n){let t=this.toDate(n);return this.weekend.has(t.dayOfWeek)?!1:!this.holidays?.has(t)}nextBusinessDay(n){let t=n.add({days:1});for(let o=0;o<zu;o++,t=t.add({days:1}))if(this.isBusinessDay(t))return t;throw new RangeError(\"temporals: no business day found (check weekend/holiday config)\")}previousBusinessDay(n){let t=n.subtract({days:1});for(let o=0;o<zu;o++,t=t.subtract({days:1}))if(this.isBusinessDay(t))return t;throw new RangeError(\"temporals: no business day found (check weekend/holiday config)\")}addBusinessDays(n,t){let o=n,r=t>=0?1:-1;for(let i=Math.abs(t);i>0;i--)o=r>0?this.nextBusinessDay(o):this.previousBusinessDay(o);return o}businessDaysBetween(n,t){let o=0;for(let r=n;g(r,t)<0;r=r.add({days:1}))this.isBusinessDay(r)&&o++;return o}businessDays(n){return Ho({start:n.start,end:n.end,step:{days:1}}).filter(t=>this.isBusinessDay(t))}nthBusinessDay(n,t,o){let r=he().PlainDate.from({year:n,month:t,day:1}),i=[];for(let s=1;s<=r.daysInMonth;s++){let c=r.with({day:s});this.isBusinessDay(c)&&i.push(c)}let a=o>0?o-1:i.length+o;return i[a]??null}},_t=class{windows;calendar;dst;constructor(n={}){this.dst=n.dst??\"compatible\",this.windows=(n.windows??[[\"09:00\",\"17:00\"]]).slice().sort((t,o)=>t[0].localeCompare(o[0])),this.calendar=n.calendar}dayWindows(n,t){if(this.calendar&&!this.calendar.isBusinessDay(n))return[];let o=he();return this.windows.map(([r,i])=>{let a=o.PlainTime.from(r),s=o.PlainTime.from(i),c=o.PlainTime.compare(s,a)<=0,u=this.dst,d=n.toPlainDateTime(a).toZonedDateTime(t,{disambiguation:u}),l=(c?n.add({days:1}):n).toPlainDateTime(s).toZonedDateTime(t,{disambiguation:u});return new xe(d,l)})}intervalsBetween(n,t){let o=n.timeZoneId,r=t.toPlainDate(),i=[];for(let a=n.toPlainDate().subtract({days:1});g(a,r)<=0;a=a.add({days:1}))i.push(...this.dayWindows(a,o));return Gt.from(i).intersection(Gt.from([new xe(n,t)]))}isOpen(n){let t=n.timeZoneId,o=n.toPlainDate();return[...this.dayWindows(o.subtract({days:1}),t),...this.dayWindows(o,t)].some(i=>i.contains(n))}nextOpen(n){return this.intervalsBetween(n,n.add({days:366})).intervals[0]?.start}};function _u(e,n,t){return t.intervalsBetween(e,n).totalDuration()}var Vl=[[\"years\",\"year\",\"y\"],[\"months\",\"month\",\"mo\"],[\"weeks\",\"week\",\"w\"],[\"days\",\"day\",\"d\"],[\"hours\",\"hour\",\"h\"],[\"minutes\",\"minute\",\"m\"],[\"seconds\",\"second\",\"s\"],[\"milliseconds\",\"millisecond\",\"ms\"],[\"microseconds\",\"microsecond\",\"\\xB5s\"],[\"nanoseconds\",\"nanosecond\",\"ns\"]],_l={second:7,millisecond:8,microsecond:9,nanosecond:10};function ia(e,n={}){let{short:t=!1,max:o=1/0,locale:r,precision:i=\"second\"}=n,a=Vl.slice(0,_l[i]),s=e,c=Intl.DurationFormat;if(r&&c){let d={},l=0;for(let[m]of a){let f=s[m]??0;if(f!==0&&(d[m]=f,++l>=o))break}return new c(r,{style:t?\"narrow\":\"long\"}).format(d)}let u=[];for(let[d,l,m]of a){let f=s[d]??0;if(f!==0&&(u.push(t?`${f}${m}`:`${f} ${l}${Math.abs(f)===1?\"\":\"s\"}`),u.length>=o))break}return u.length===0?t?\"0s\":\"0 seconds\":u.join(t?\" \":\", \")}var Jl=[[\"years\",\"year\"],[\"months\",\"month\"],[\"weeks\",\"week\"],[\"days\",\"day\"],[\"hours\",\"hour\"],[\"minutes\",\"minute\"],[\"seconds\",\"second\"]];function Ju(e,n,t={}){let o=z(e),r=o===\"time\"||o===\"instant\"?\"hour\":\"year\",i=e.until(n,{largestUnit:r}),a=new Intl.RelativeTimeFormat(t.locale,{numeric:t.numeric??\"auto\"}),s=i;for(let[c,u]of Jl){let d=s[c]??0;if(d!==0&&c===\"days\"&&(o===\"zoneddatetime\"||o===\"datetime\")&&(d=Kl(e,n)),d!==0)return a.format(d,u)}return a.format(0,\"second\")}function Kl(e,n){return(z(e)===\"zoneddatetime\"?e.withTimeZone(n.timeZoneId):e).toPlainDate().until(n.toPlainDate(),{largestUnit:\"day\"}).days}var Ql={y:\"years\",mo:\"months\",w:\"weeks\",d:\"days\",h:\"hours\",m:\"minutes\",s:\"seconds\",ms:\"milliseconds\"};function aa(e){let n={},t=/(-?\\d+(?:\\.\\d+)?)\\s*(mo|ms|[ywdhms])/gi,o,r=!1;for(;(o=t.exec(e))!==null;){r=!0;let i=Ql[o[2].toLowerCase()];if(!i)throw new RangeError(`temporals: unknown duration unit \"${o[2]}\"`);n[i]=(n[i]??0)+Number(o[1])}if(!r)throw new RangeError(`temporals: could not parse duration \"${e}\"`);return he().Duration.from(n)}var Ku=1e4;function Xu(e){return typeof e==\"string\"?{wd:rn(e)}:{wd:rn(e.weekday),nth:e.nth}}function Xl(e,n){let t=[];for(let o=e;o<=n;o++)t.push(o);return t}function ca(e,n){let t=e>0?e:n+e+1;return t>=1&&t<=n?t:null}function em(e,n,t,o,r){let i=$o(e,n,t),a=oa(e,n,t,o);if(r>0){let u=a+(r-1)*7;return u<=i?u:null}let c=a+Math.floor((i-a)/7)*7+(r+1)*7;return c>=1?c:null}function nm(e,n,t,o){let r=$o(e,n,t),i=[];for(let a=oa(e,n,t,o);a<=r;a+=7)i.push(a);return i}function tm(e,n){return e.with({year:n,month:1,day:1},{overflow:\"constrain\"}).daysInYear}function om(e,n,t){let o=tm(e,n),r=t>0?t:o+t+1;return r<1||r>o?null:e.with({year:n,month:1,day:1},{overflow:\"constrain\"}).add({days:r-1})}function rm(e,n){return e.with({year:n,month:12,day:28},{overflow:\"constrain\"}).weekOfYear??52}function Qu(e,n,t,o,r,i){let a=$o(e,n,t),s=o&&o.length>0,c=r&&r.length>0,u;if(s){u=[];for(let m of o){let f=ca(m,a);f!==null&&u.push(f)}}let d;if(c){let m=new Set;for(let{wd:f,nth:p}of r)if(p!==void 0){let h=em(e,n,t,f,p);h!==null&&m.add(h)}else for(let h of nm(e,n,t,f))m.add(h);d=[...m]}let l;if(u&&d){let m=new Set(d);l=u.filter(f=>m.has(f))}else u?l=u:d?l=d:i!==void 0?l=i<=a?[i]:[]:l=[];return[...new Set(l)].sort((m,f)=>m-f)}function im(e,n,t,o){let{byMonth:r,byMonthDay:i}=e,a=s=>!r||r.includes(s);switch(e.freq){case\"daily\":{let s=o.date;if(!a(s.month))return[];if(i&&i.length>0&&!i.some(u=>ca(u,s.daysInMonth)===s.day))return[];if(e.byYearDay&&e.byYearDay.length>0){let c=s.daysInYear;if(!e.byYearDay.some(d=>(d>0?d:c+d+1)===s.dayOfYear))return[]}return t&&t.length>0&&!t.some(c=>c.wd===s.dayOfWeek)?[]:[s]}case\"weekly\":{let s=rn(e.weekStart??\"MO\"),c=t&&t.length>0?t.map(m=>m.wd):[n.dayOfWeek],u=new Set(c),d=[],l=o.weekStartDate;for(let m=0;m<7;m++)u.has(l.dayOfWeek)&&a(l.month)&&d.push(l),l=l.add({days:1});return d}case\"monthly\":{let s=o.anchor,c=s.month;return a(c)?Qu(s,s.year,c,i,t,n.day).map(d=>s.with({day:d})):[]}case\"yearly\":{let s=o.anchor,c=s.year,u=i&&i.length>0,d=t&&t.length>0,l=e.byYearDay&&e.byYearDay.length>0;if(e.byWeekNo&&e.byWeekNo.length>0){let y=new Set(e.byWeekNo.map(F=>F>0?F:rm(n,c)+F+1)),b=new Set(d?t.map(F=>F.wd):[n.dayOfWeek]),v=[],D=n.with({year:c,month:1,day:1},{overflow:\"constrain\"}).subtract({days:7}),I=n.with({year:c,month:12,day:31},{overflow:\"constrain\"}).add({days:7});for(;g(D,I)<=0;D=D.add({days:1}))D.yearOfWeek===c&&y.has(D.weekOfYear??-1)&&b.has(D.dayOfWeek)&&a(D.month)&&v.push(D);return v}if(l&&!u){let y=d?new Set(t.map(D=>D.wd)):null,b=[];for(let D of e.byYearDay){let I=om(n,c,D);I&&a(I.month)&&(y&&!y.has(I.dayOfWeek)||b.push(I))}let v=new Set;return b.filter(D=>{let I=Ht(D);return v.has(I)?!1:(v.add(I),!0)}).sort((D,I)=>g(D,I))}let f=s.monthsInYear,p=r??(u||d?Xl(1,f):[n.month]),h=[];for(let y of p){if(y<1||y>f)continue;let b=s.with({month:y,day:1},{overflow:\"constrain\"}),v=Qu(b,c,y,i,t,n.day);for(let D of v)h.push(b.with({day:D}))}return h}default:throw new RangeError(`temporals: recurrence freq \"${e.freq}\" is not supported (yearly/monthly/weekly/daily only)`)}}function am(e,n){let t=(e.dayOfWeek-n+7)%7;return e.subtract({days:t})}function sm(e,n){switch(e.freq){case\"daily\":return{date:n};case\"weekly\":return{weekStartDate:am(n,rn(e.weekStart??\"MO\"))};case\"monthly\":return{anchor:n.with({day:1})};case\"yearly\":return{anchor:n.with({month:1,day:1},{overflow:\"constrain\"})};default:throw new RangeError(`temporals: unsupported freq \"${e.freq}\"`)}}function cm(e,n){let t=e.interval??1;switch(e.freq){case\"daily\":return{date:n.date.add({days:t})};case\"weekly\":return{weekStartDate:n.weekStartDate.add({weeks:t})};case\"monthly\":return{anchor:n.anchor.add({months:t})};case\"yearly\":return{anchor:n.anchor.add({years:t})};default:throw new RangeError(`temporals: unsupported freq \"${e.freq}\"`)}}function um(e,n,t){let o=z(e);if(o===\"zoneddatetime\"){let l=e,m=l.timeZoneId,f=l.toPlainTime(),p=t.byHour&&t.byHour.length?t.byHour:[f.hour],h=t.byMinute&&t.byMinute.length?t.byMinute:[f.minute],y=t.bySecond&&t.bySecond.length?t.bySecond:[f.second],b={dstGap:t.dstGap,dstOverlap:t.dstOverlap},v=[];for(let D of p)for(let I of h)for(let F of y){let j=n.toPlainDateTime(f.with({hour:D,minute:I,second:F})),K=$u(j,m,b);K&&v.push(K)}return v}let r=Gu(e,n);if(!(t.byHour&&t.byHour.length||t.byMinute&&t.byMinute.length||t.bySecond&&t.bySecond.length)||o===\"date\")return[r];let a=r,s=t.byHour&&t.byHour.length?t.byHour:[a.hour],c=t.byMinute&&t.byMinute.length?t.byMinute:[a.minute],u=t.bySecond&&t.bySecond.length?t.bySecond:[a.second],d=[];for(let l of s)for(let m of c)for(let f of u)d.push(a.with({hour:l,minute:m,second:f}));return d}function dm(e,n){if(!n||n.length===0)return e;let t=[];for(let o of n){let r=o>0?o-1:e.length+o;r>=0&&r<e.length&&t.push(e[r])}return t}var sa=new Set([\"hourly\",\"minutely\",\"secondly\"]);function lm(e){return e===\"datetime\"||e===\"zoneddatetime\"||e===\"time\"}function mm(e){let n=z(e.start);if(sa.has(e.freq)){if(!lm(n))throw new TypeError(\"temporals: sub-daily recurrence requires a time-bearing start (PlainDateTime, ZonedDateTime, or PlainTime)\")}else if(!ta(n))throw new TypeError(\"temporals: recur() requires a date-bearing start (PlainDate, PlainDateTime, or ZonedDateTime)\");if(e.byWeekNo&&e.freq!==\"yearly\")throw new RangeError(\"temporals: BYWEEKNO is only valid with FREQ=YEARLY\");if(e.bySetPos&&sa.has(e.freq))throw new RangeError(\"temporals: BYSETPOS with sub-daily frequencies is not supported\");if(e.interval!==void 0&&(!Number.isInteger(e.interval)||e.interval<1))throw new RangeError(\"temporals: recur() interval must be a positive integer\")}var fm=1e6;function hm(e,n,t){let o=z(e),r=e;if(ta(o)){if(n.byMonth&&!n.byMonth.includes(r.month)||n.byMonthDay&&!n.byMonthDay.some(i=>ca(i,r.daysInMonth)===r.day))return!1;if(n.byYearDay){let i=r.daysInYear;if(!n.byYearDay.some(a=>(a>0?a:i+a+1)===r.dayOfYear))return!1}if(t&&t.length>0&&!t.some(i=>i.wd===r.dayOfWeek))return!1}return!(n.byHour&&!n.byHour.includes(r.hour)||n.byMinute&&!n.byMinute.includes(r.minute)||n.bySecond&&!n.bySecond.includes(r.second))}function*pm(e){let n=e.start,t=e.interval??1,o=e.freq===\"hourly\"?{hours:t}:e.freq===\"minutely\"?{minutes:t}:{seconds:t},r=e.byWeekday?.map(Xu),i=n,a=0;for(;;){if(e.until!==void 0&&g(i,e.until)>0)return;if(hm(i,e,r))yield i,a=0;else if(++a>fm)throw new RangeError(\"temporals: sub-daily recurrence matched nothing for a very long span (likely an impossible rule)\");i=$t(i,o)}}function*ym(e){let n=e.start,t=Hu(n),o=e.byWeekday?.map(Xu),r=sm(e,t),i=0;for(;;){let a=im(e,t,o,r),s=[];for(let d of a)s.push(...um(n,d,e));s.sort((d,l)=>g(d,l));let c=new Set;s=s.filter(d=>{let l=Ht(d);return c.has(l)?!1:(c.add(l),!0)}),s=dm(s,e.bySetPos).sort((d,l)=>g(d,l));let u=!1;for(let d of s)g(d,n)<0||(yield d,u=!0);if(u)i=0;else if(++i>Ku)throw new RangeError(`temporals: recurrence produced no occurrences for ${Ku} consecutive periods (likely an impossible rule)`);r=cm(e,r)}}function*Tm(e,n){let t=n.start,o=new Set((n.exclude??[]).map(l=>Ht(l))),r=(n.include??[]).filter(l=>g(l,t)>=0).sort((l,m)=>g(l,m)),{until:i,count:a}=n,s=0,c=0,u,d=e.next();for(;;){let l=!d.done,m=s<r.length;if(!l&&!m)return;let f,p;if(l&&(!m||g(d.value,r[s])<=0)?(f=d.value,p=!0):(f=r[s],p=!1),i!==void 0&&g(f,i)>0)return;p?d=e.next():s++;let h=Ht(f);if(!(o.has(h)||h===u)&&(u=h,yield f,a!==void 0&&++c>=a))return}}function ed(e){mm(e);let n=sa.has(e.freq)?()=>pm(e):()=>ym(e);return new tt(()=>Tm(n(),e))}var gm={YEARLY:\"yearly\",MONTHLY:\"monthly\",WEEKLY:\"weekly\",DAILY:\"daily\",HOURLY:\"hourly\",MINUTELY:\"minutely\",SECONDLY:\"secondly\"};function Dm(e){let n=/^([+-]?\\d+)?(MO|TU|WE|TH|FR|SA|SU)$/.exec(e.trim());if(!n)throw new RangeError(`temporals: invalid BYDAY token \"${e}\"`);let t=n[2];return n[1]?{weekday:t,nth:Number(n[1])}:t}function cn(e){return e.split(\",\").map(n=>Number(n.trim()))}function bm(e,n){let t=e.replace(/^RRULE:/i,\"\"),o={start:n,freq:\"daily\"},r=!1;for(let i of t.split(\";\")){if(!i)continue;let a=i.indexOf(\"=\"),s=(a===-1?i:i.slice(0,a)).trim().toUpperCase(),c=a===-1?\"\":i.slice(a+1).trim();switch(s){case\"FREQ\":{let u=gm[c.toUpperCase()];if(!u)throw new RangeError(`temporals: unsupported FREQ \"${c}\"`);o.freq=u,r=!0;break}case\"INTERVAL\":o.interval=Number(c);break;case\"COUNT\":o.count=Number(c);break;case\"UNTIL\":{if(n==null)throw new RangeError(\"temporals: RRULE has UNTIL but no DTSTART was provided\");if(z(n)===\"zoneddatetime\"){let u=n,d=u.toInstant().constructor;o.until=d.from(c).toZonedDateTimeISO(u.timeZoneId)}else{let u=n.constructor;o.until=u.from(c)}break}case\"BYMONTH\":o.byMonth=cn(c);break;case\"BYWEEKNO\":o.byWeekNo=cn(c);break;case\"BYYEARDAY\":o.byYearDay=cn(c);break;case\"BYMONTHDAY\":o.byMonthDay=cn(c);break;case\"BYDAY\":o.byWeekday=c.split(\",\").map(Dm);break;case\"BYHOUR\":o.byHour=cn(c);break;case\"BYMINUTE\":o.byMinute=cn(c);break;case\"BYSECOND\":o.bySecond=cn(c);break;case\"BYSETPOS\":o.bySetPos=cn(c);break;case\"WKST\":o.weekStart=c.toUpperCase();break;default:throw new RangeError(`temporals: unsupported RRULE part \"${s}\"`)}}if(!r)throw new RangeError(\"temporals: RRULE is missing FREQ\");return o}function ua(e,n){return ed(bm(e,n))}ed.fromString=ua;var od=globalThis.Temporal;Lu(od??Au);var Kt=()=>he(),vm=od?\"native\":\"temporal-polyfill\",nd=[\"MO\",\"TU\",\"WE\",\"TH\",\"FR\",\"SA\",\"SU\"];function da(e){if(typeof e==\"number\"&&Number.isInteger(e)&&e>=1&&e<=7)return nd[e-1];let n=String(e??\"\").trim().slice(0,2).toUpperCase(),t=nd.find(o=>o===n);if(!t)throw new RangeError(`not a weekday: ${JSON.stringify(e)} (use MO-SU, or 1-7 with 1 for Monday)`);return t}var td={easter:()=>[Jt(0)],\"good-friday\":()=>[Jt(-2)],\"easter-monday\":()=>[Jt(1)]};function rd(e){if(typeof e==\"string\"){let n=e.trim().toLowerCase();if(n===\"us-federal\")return Im();if(td[n])return td[n]();let t=/^(\\d{4})-(\\d{2})-(\\d{2})$/.exec(n);if(t){let o=Kt().PlainDate.from(n);return[r=>r===o.year?o:null]}if(t=/^(\\d{1,2})-(\\d{1,2})$/.exec(n),t)return[sn(Number(t[1]),Number(t[2]))];throw new RangeError(`not a holiday: ${JSON.stringify(e)} (use us-federal, easter, good-friday, easter-monday, a date like 2026-12-24, a month and day like 12-25, or an object)`)}if(e&&typeof e==\"object\"){if(\"easter\"in e)return[Jt(Number(e.easter)||0)];if(\"weekday\"in e)return[an(Number(e.month),da(e.weekday),Number(e.nth))];if(\"day\"in e)return[sn(Number(e.month),Number(e.day),{observed:e.observed??!1})]}throw new RangeError(`not a holiday: ${JSON.stringify(e)}`)}function Im(){let e=Vu();return Array.from({length:11},(n,t)=>o=>e.inYear(o)[t]??null)}function id(e={}){let n=(e.weekend??[\"SA\",\"SU\"]).map(da),t=(e.holidays??[]).flatMap(rd);return new Vt({weekend:n,holidays:t.length?zt.of(...t):void 0})}function wm(e={}){let n=(Array.isArray(e.windows)&&e.windows.length?e.windows:[[\"09:00\",\"17:00\"]]).map(t=>{if(!Array.isArray(t)||t.length!==2)throw new RangeError(`a window is [open, close], like [\"09:00\", \"17:00\"]: ${JSON.stringify(t)}`);return[String(t[0]),String(t[1])]});return new _t({windows:n,calendar:id(e)})}function ad(e,n){let t=Kt(),o=String(n||\"UTC\");if(typeof e==\"number\")return t.Instant.fromEpochMilliseconds(e).toZonedDateTimeISO(o);let r=String(e??\"\").trim();if(!r)throw new RangeError(\"no time given\");return r.includes(\"[\")?t.ZonedDateTime.from(r).withTimeZone(o):/(?:Z|[+-]\\d{2}(?::?\\d{2})?)$/i.test(r)&&r.includes(\"T\")?t.Instant.from(r).toZonedDateTimeISO(o):t.PlainDateTime.from(r).toZonedDateTime(o)}function Mm(e,n=\"UTC\"){let t=String(e??\"\").trim();return/^\\d{4}-\\d{2}-\\d{2}$/.test(t)?Kt().PlainDate.from(t):ad(e,n).toPlainDate()}function la(e){let n=Kt();if(typeof e==\"number\"){if(!Number.isFinite(e))throw new RangeError(`not a duration: ${e}`);return n.Duration.from({milliseconds:Math.trunc(e)}).round({largestUnit:\"day\",smallestUnit:\"millisecond\"})}let t=String(e??\"\").trim();return/^-?\\d+(?:\\.\\d+)?$/.test(t)?la(Number(t)):/^-?P/i.test(t)?n.Duration.from(t.toUpperCase()):aa(t)}function Sm(e){if(e.years||e.months||e.weeks)throw new RangeError(`years, months and weeks have no fixed length: ${e.toString()}`);return e.total({unit:\"millisecond\"})}function Pm(e,n={}){let t=la(e);return!t.years&&!t.months&&!t.weeks&&(t=t.round({largestUnit:n.largestUnit||\"day\",smallestUnit:\"millisecond\"})),ia(t,n)}var Nm=e=>e.toString({smallestUnit:\"second\"});var Om=()=>Kt();return md(km);})();\nreturn temporals;\n}\n"
695
+ }
696
+ ]
697
+ },
698
+ "tests": [
699
+ {
700
+ "name": "over Christmas with the US federal holidays",
701
+ "inputs": {
702
+ "date": "2026-12-23",
703
+ "days": 3,
704
+ "weekend": [
705
+ "SA",
706
+ "SU"
707
+ ],
708
+ "holidays": [
709
+ "us-federal"
710
+ ]
711
+ },
712
+ "expect": {
713
+ "result.date": "2026-12-29",
714
+ "result.weekday": "Tuesday",
715
+ "result.daysOff": [
716
+ "2026-12-25",
717
+ "2026-12-26",
718
+ "2026-12-27"
719
+ ]
720
+ }
721
+ },
722
+ {
723
+ "name": "backwards over a weekend",
724
+ "inputs": {
725
+ "date": "2026-10-26",
726
+ "days": -1,
727
+ "weekend": [
728
+ "SA",
729
+ "SU"
730
+ ],
731
+ "holidays": []
732
+ },
733
+ "expect": {
734
+ "result.date": "2026-10-23",
735
+ "result.daysOff": [
736
+ "2026-10-25",
737
+ "2026-10-24"
738
+ ]
739
+ }
740
+ },
741
+ {
742
+ "name": "a Friday-Saturday weekend",
743
+ "inputs": {
744
+ "date": "2026-10-22",
745
+ "days": 1,
746
+ "weekend": [
747
+ "FR",
748
+ "SA"
749
+ ],
750
+ "holidays": []
751
+ },
752
+ "expect": {
753
+ "result.date": "2026-10-25",
754
+ "result.weekday": "Sunday"
755
+ }
756
+ }
757
+ ],
758
+ "hosts": []
759
+ },
760
+ {
761
+ "id": "duration-words",
762
+ "title": "Duration in words",
763
+ "description": "A duration as words. Takes milliseconds, an ISO 8601 duration (PT1H30M, P2W3D) or shorthand (1h 30m), and gives \"1 day, 2 hours\" (or \"1d 2h\" with `short`), its ISO form, and its milliseconds when it has a fixed length. `maxUnits` keeps the largest units; `locale` localizes where Intl.DurationFormat exists.",
764
+ "icon": "<svg viewBox=\"0 0 16 16\"><path d=\"M4.5 2.5h7M4.5 13.5h7M5 2.5c0 3 6 3.5 6 5.5s-6 2.5-6 5.5M11 2.5c0 3-6 3.5-6 5.5s6 2.5 6 5.5\" stroke=\"currentColor\" fill=\"none\" stroke-width=\"1.2\"/></svg>",
765
+ "canvas": {
766
+ "format": "viaframe-canvas",
767
+ "version": 3,
768
+ "name": "duration-words",
769
+ "panes": [
770
+ {
771
+ "id": "i_duration",
772
+ "type": "input",
773
+ "name": "duration",
774
+ "rect": {
775
+ "x": 0,
776
+ "y": 0,
777
+ "width": 260
778
+ },
779
+ "inputs": [],
780
+ "widget": {
781
+ "kind": "text",
782
+ "value": "93784000"
783
+ },
784
+ "control": {
785
+ "group": "Duration",
786
+ "help": "Milliseconds (93784000), an ISO 8601 duration (PT1H30M, P2W) or shorthand (1h 30m, 2d 12h)."
787
+ }
788
+ },
789
+ {
790
+ "id": "i_maxUnits",
791
+ "type": "input",
792
+ "name": "maxUnits",
793
+ "rect": {
794
+ "x": 0,
795
+ "y": 150,
796
+ "width": 260
797
+ },
798
+ "inputs": [],
799
+ "widget": {
800
+ "kind": "number",
801
+ "value": 0
802
+ },
803
+ "control": {
804
+ "group": "Words",
805
+ "help": "Keep only this many of the largest units; 0 keeps every one."
806
+ }
807
+ },
808
+ {
809
+ "id": "i_short",
810
+ "type": "input",
811
+ "name": "short",
812
+ "rect": {
813
+ "x": 0,
814
+ "y": 240,
815
+ "width": 260
816
+ },
817
+ "inputs": [],
818
+ "widget": {
819
+ "kind": "checkbox",
820
+ "value": false
821
+ },
822
+ "control": {
823
+ "group": "Words",
824
+ "help": "1h 30m instead of 1 hour, 30 minutes."
825
+ }
826
+ },
827
+ {
828
+ "id": "i_precision",
829
+ "type": "input",
830
+ "name": "precision",
831
+ "rect": {
832
+ "x": 0,
833
+ "y": 330,
834
+ "width": 260
835
+ },
836
+ "inputs": [],
837
+ "widget": {
838
+ "kind": "select",
839
+ "value": "second",
840
+ "options": "second,millisecond"
841
+ },
842
+ "control": {
843
+ "group": "Words",
844
+ "help": "The smallest unit shown."
845
+ }
846
+ },
847
+ {
848
+ "id": "i_locale",
849
+ "type": "input",
850
+ "name": "locale",
851
+ "rect": {
852
+ "x": 0,
853
+ "y": 420,
854
+ "width": 260
855
+ },
856
+ "inputs": [],
857
+ "widget": {
858
+ "kind": "text",
859
+ "value": ""
860
+ },
861
+ "control": {
862
+ "group": "Words",
863
+ "help": "A locale (fr, de-CH) for localized words where the runtime has Intl.DurationFormat; empty is English.",
864
+ "advanced": true
865
+ }
866
+ },
867
+ {
868
+ "id": "result",
869
+ "type": "eval",
870
+ "name": "result",
871
+ "rect": {
872
+ "x": 340,
873
+ "y": 0,
874
+ "width": 380
875
+ },
876
+ "inputs": [
877
+ {
878
+ "name": "duration",
879
+ "source": "i_duration"
880
+ },
881
+ {
882
+ "name": "maxUnits",
883
+ "source": "i_maxUnits"
884
+ },
885
+ {
886
+ "name": "short",
887
+ "source": "i_short"
888
+ },
889
+ {
890
+ "name": "precision",
891
+ "source": "i_precision"
892
+ },
893
+ {
894
+ "name": "locale",
895
+ "source": "i_locale"
896
+ }
897
+ ],
898
+ "autorun": true,
899
+ "mode": "function",
900
+ "outputs": [
901
+ {
902
+ "name": "text"
903
+ },
904
+ {
905
+ "name": "iso"
906
+ },
907
+ {
908
+ "name": "ms"
909
+ }
910
+ ],
911
+ "code": "const T = temporalsLibrary();\nconst d = T.duration(duration);\nconst calendarUnits = Boolean(d.years || d.months || d.weeks);\nconst max = Number(maxUnits) > 0 ? Math.trunc(Number(maxUnits)) : undefined;\nconst text = T.words(duration, { max, short: Boolean(short), precision: precision || \"second\", locale: locale ? String(locale) : undefined });\n// Years, months and weeks have no fixed length, so a duration with them has no milliseconds.\nreturn { text, iso: d.toString(), ms: calendarUnits ? null : T.durationMs(d) };\n\n// @johnhenry/temporals 0.3.0 and temporal-polyfill 1.0.1 (both MIT), bundled from viaframe/src/lib.ts by viaframe/scripts/build.mjs\n// in github.com/johnhenry/temporals. A pane package can't import a module or share code between\n// its panes, so each pane carries this copy; it uses the runtime's own Temporal when there is one.\nfunction temporalsLibrary() {\n\"use strict\";var temporals=(()=>{var zo=Object.defineProperty;var sd=Object.getOwnPropertyDescriptor;var cd=Object.getOwnPropertyNames;var ud=Object.prototype.hasOwnProperty;var dd=(e,n)=>{for(var t in n)zo(e,t,{get:n[t],enumerable:!0})},ld=(e,n,t,o)=>{if(n&&typeof n==\"object\"||typeof n==\"function\")for(let r of cd(n))!ud.call(e,r)&&r!==t&&zo(e,r,{get:()=>n[r],enumerable:!(o=sd(n,r))||o.enumerable});return e};var md=e=>ld(zo({},\"__esModule\",{value:!0}),e);var km={};dd(km,{BusinessCalendar:()=>Vt,Temporal:()=>Om,WorkingHours:()=>_t,businessCalendar:()=>id,businessDuration:()=>_u,duration:()=>la,durationMs:()=>Sm,formatRelative:()=>Ju,holidayRules:()=>rd,humanizeDuration:()=>ia,iso:()=>Nm,parseDuration:()=>aa,plainDate:()=>Mm,recurFromString:()=>ua,temporalSource:()=>vm,weekdayCode:()=>da,words:()=>Pm,workingHours:()=>wm,zoned:()=>ad});var Vo=globalThis.Temporal;var ma=(e,n)=>`Non-positive ${e}: ${n}`,fa=(e,n)=>`Non-finite ${e}: ${n}`,ha=e=>`Cannot convert bigint to ${e}`,pa=\"Invalid object\",ot=(e,n,t,o)=>un(e,n)+`; must be between ${t}-${o}`,un=(e,n)=>`Invalid ${e}: ${n}`;var _o=1e3,Jo=1e6,Ko=1e9,Qo=6e10,Xo=36e11;function ie(e){return e===void 0?Object.create(null):dn(e)}function Qt(e,n=\"number\"){if(typeof e==\"bigint\")throw new TypeError(ha(n));if(e=Number(e),!Number.isFinite(e))throw new RangeError(fa(n,e));return e}function U(e,n){return Math.trunc(Qt(e,n))||0}function Xt(e,n){return ya(U(e,n),n)}function ya(e,n=\"number\"){if(e<=0)throw new RangeError(ma(n,e));return e}function er(e,n,t){return Math.min(Math.max(e,n),t)}function Nn(e){return e!==null&&(typeof e==\"object\"||typeof e==\"function\")}function dn(e){if(!Nn(e))throw new TypeError(pa);return e}var so=un;var dt=e=>`Missing ${e}`,Pa=e=>\"No valid fields: \"+e.join(),Na=\"Invalid bag\",Oa=(e,n,t)=>un(e,n)+\"; must be \"+Object.keys(t).join(),ka=\"Cannot use valueOf\",Ea=\"Invalid calling context\",co=e=>\"Missing year\"+(e?\"/era/eraYear\":\"\"),mn=\"Invalid leap month\",xa=e=>un(\"Calendar\",e),Za=(e,n)=>`Unknown calendar ${e}; might need ${n}`,pr=e=>un(\"TimeZone\",e),$e=\"Out-of-bounds date\";var Fa=e=>`Cannot parse: ${e}`,Ze=e=>`Invalid substring: ${e}`;var yr=er,ee=Nn;function T(e){throw new RangeError(e)}function S(e){throw new TypeError(e)}function rr(e,n,t,o,r){return we(n,((i,a)=>{let s=i[a];return s===void 0&&S(dt(a)),s})(e,n),t,o,r)}function we(e,n,t,o,r,i){let a=yr(n,t,o);return r&&n!==a&&T(((s,c,u,d,l)=>l?ot(s,l[c],l[u],l[d]):ot(s,c,u,d))(e,n,t,o,i)),a}function En(e,n=Map){let t=new n;return(o,...r)=>{if(t.has(o))return t.get(o);let i=e(o,...r);return t.set(o,i),i}}var Ra=e=>uo({name:e},1),uo=(e,n)=>Ve(t=>({value:t,configurable:1,writable:!n}),e),lt=e=>({[Symbol.toStringTag]:{value:e,configurable:1}});function Ve(e,n){let t={};for(let o in n)t[o]=e(n[o],o);return t}function mt(e,n){let t={};for(let o of e)t[o]=n;return t}function lo(e){let n={};for(let t of e)n[t]=o=>o[t];return n}function Me(e,n,t=Object.create(null)){for(let o of e)t[o]=n[o];return t}function Ca(e,n,t){for(let o of e)if(n[o]!==t[o])return 0;return 1}function Td(e,n,t){let o={...t};for(let r=0;r<n;r++)o[e[r]]=0;return o}function C(e,...n){return(...t)=>e(...n,...t)}function Tr(){}function Ta(e){return e[0].toUpperCase()+e.substring(1)}function A(...e){return[].concat(...e).sort()}function Rn(e){return new RegExp(`^${e}$`,\"i\")}function gr(e){return parseInt(e.padEnd(9,\"0\"))}function Dr(e){return e&&e!==\"+\"?-1:1}function On(e){return e===void 0?0:parseInt(e)}function oo(e,n){return String(n).padStart(e,\"0\")}var pe=C(oo,2);function Fe(e,n){return Math.sign(e-n)}function x(e,n){return e<n?-1:e>n?1:0}function Ya(e,n){let t=e/n;return e%n<0n?t-1n:t}function br(e,n){let t=Ya(e,n);return[t,e-t*n]}function ve(e,n){return[Math.floor(e/n),mo(e,n)]}function mo(e,n){return(e%n+n)%n}function Cn(e,n){return Math.trunc(e/n)||0}function vr(e,n){return e%n||0}function Ba(e,n=1){return n*(.5+e/5)}function eo(e){return Math.abs(e%1)===.5}var Ir=\"iso8601\",Wa=\"gregory\",gd={bce:-1,ce:0};function Aa(e){let n=e.normalize(\"NFD\").toLowerCase().replace(/[^a-z0-9]/g,\"\");return n===\"bc\"||n===\"b\"?\"bce\":n===\"ad\"||n===\"a\"?\"ce\":n}var se=void 0,Ua=0;function ye(e){return e===se?\"iso8601\":e===0?\"gregory\":e.id}var Dd=/^M(\\d{2})(L?)$/;function La(e){let n=Dd.exec(e);return n||T((t=>`Invalid monthCode: ${t}`)(e)),[parseInt(n[1]),!!n[2]]}function qa(e,n){return\"M\"+pe(e)+(n?\"L\":\"\")}function ir(e,n,t){return e+(n||t&&e>=t?1:0)}var ar={nanosecond:0,microsecond:1,millisecond:2,second:3,minute:4,hour:5,day:6,week:7,month:8,year:9},wr=Object.keys(ar);var ft=_o,ht=Jo,_e=Ko,pt=Qo,yt=Xo,Ye=864e11,Te=[1,ft,ht,_e,pt,yt,Ye],bd=BigInt(ft),Yn=BigInt(ht),hn=BigInt(_e),vd=BigInt(pt),Id=BigInt(yt),O=BigInt(Ye);function ja(e,n){let t=Number(e/O),o=Number(e%O);return t*(Ye/n)+(Math.trunc(o/n)+o%n/n)}var _=wr.slice(0,6),Tt=lo(_),fo=[\"year\"],Tn=[\"day\"],Mr=[\"day\",\"month\",\"year\"],ho=[\"offset\"],Sr=[\"timeZone\"],Bn=[\"era\",\"eraYear\"],wd=[\"era\",\"eraYear\",\"year\"],$a=[\"month\",\"monthCode\"],Md=[\"day\",\"month\",\"monthCode\"],sr=A(_),Sd=A(Bn,fo),gt=A($a,fo),Ha=A(Bn,gt),Dt=A([\"monthCode\"],fo),Ga=A(Bn,Dt),za=A(Tn,[\"monthCode\"]),gn=A(Tn,gt),Dn=A(Tn,Bn,gt),Va=A(gn,_),_a=A(Dn,_),Pd=A(gn,_,ho),Nd=A(Dn,_,ho),Ja=A(gn,_,ho,Sr),Ka=A(Dn,_,ho,Sr),Od=A(Tn,Dt),kd=A(Tn,Bn,Dt),ce=mt(_,0);function bt(e){return po(e,1),e}var Ed={hour:23,minute:59,second:59};function po(e,n){let t={};for(let o of _)t[o]=we(o,e[o],0,Ed[o]||999,n);return t}function oe(e){return Nr(e)*_e+Qa(e)}function Pr(e){return 1e3*Nr(e)+e.millisecond}function Nr(e){return 3600*e.hour+60*e.minute+e.second}function Qa(e){return e.millisecond*ht+e.microsecond*ft+e.nanosecond}function Or(e){let[n,t]=ve(e,Ye);return[Xa(t),n]}function Xa(e){let[n,t]=ve(e,ht),[o,r]=ve(t,ft);return xd(n,o,r)}function xd(e,n=0,t=0){let[o,r]=ve(e,36e5),[i,a]=ve(r,6e4),[s,c]=ve(a,1e3);return{hour:o,minute:i,second:s,millisecond:c,microsecond:n,nanosecond:t}}function ga(e){let[n,t]=br(e,hn);return[Number(n),Number(t)]}function Ie(e){return fn(e)+BigInt(oe(e))}function es(e){return vt(e)+Pr(e)}function fn(e){return BigInt(Se(e))*O}function vt(e){return 864e5*Se(e)}function Se(e){return rt(e.year,e.month,e.day)}function rt(e,n=1,t=1){let o=n-1;return e+=Math.floor(o/12),n=mo(o,12),Date.UTC(e%400-400,n,0)/864e5+146097*(Cn(e,400)+1)+t}function It(e){let[n,t]=br(e,O);return{...ns(Number(n)),...Xa(Number(t))}}function ns(e){let n=new Date(864e5*mo(e,146097));return{year:n.getUTCFullYear()+400*Math.floor(e/146097),month:n.getUTCMonth()+1,day:n.getUTCDate()}}var ts=1972;function Zd(e){return[e,0]}function cr(e,n){if(!n)return{year:1972,month:e}}function Fd(e,n,t){return{year:e,month:n,day:t}}function os(e,n){switch(n){case 2:return yo(e)?29:28;case 4:case 6:case 9:case 11:return 30}return 31}function Rd(e){return yo(e)?366:365}function yo(e){return e%4==0&&(e%100!=0||e%400==0)}function rs(e,n,t){return e+=Cn(t,12),(n+=vr(t,12))<1?(e--,n+=12):n>12&&(e++,n-=12),{year:e,month:n}}function Cd(e,n,t,o){return 12*(t-e)+o-n}function To(e){return mo(rt(e.year,e.month,e.day)+4,7)||7}function is(e){return rt(e.year,e.month,e.day)-rt(e.year)+1}function as(e){let n=e.year,t=Math.floor((is(e)-To(e)+10)/7),o=nr(n);return t<1?t=o=nr(--n):t>o&&(t=1,o=nr(++n)),{weekOfYear:t,yearOfWeek:n,Ie:o}}function nr(e){let n=To({year:e,month:1,day:1});return n===4||n===3&&yo(e)?53:52}function Yd({year:e}){return e<1?{era:\"bce\",eraYear:1-e}:{era:\"ce\",eraYear:e}}function wt(e){return Be(e),bt(e)}function Be(e){return ss(e,1),e}function Da(e){return Ca(Mr,e,ss(e))}function ss(e,n){let{year:t}=e,o=rr(e,\"month\",1,12,n);return{year:t,month:o,day:rr(e,\"day\",1,os(t,o),n)}}function P(e,n){return e?e.ie(n):n}function pn(e,n,t){return e?e.O(n,t):Zd(t)}function Mt(e,n){return e===0?Yd(n):e?e.h(n):{}}function yn(e,n,t,o){return e?e.je(n,t,o):Fd(n,t,o)}function it(e,n){return e?e.k(n):12}function at(e,n,t){return e?e.p(n,t):os(n,t)}function go(e,n){let{year:t,month:o}=P(e,n),[r,i]=pn(e,t,o);return qa(r,i)}function kr(e,n){let{year:t}=P(e,n);return e?e.u(t):yo(t)}function Er(e,n){let{year:t}=P(e,n);return it(e,t)}function xr(e,n){let{year:t,month:o}=P(e,n);return at(e,t,o)}function Zr(e,n){let{year:t}=P(e,n);return e?e.j(t):Rd(t)}function cs(e,n){if(!e)return is(n);let{year:t}=P(e,n),o=yn(e,t,1,1);return Se(n)-Se(o)+1}function us(e,n){return e===se?as(n).weekOfYear:void 0}function ds(e,n){return e===se?as(n).yearOfWeek:void 0}var k=wr.map(e=>e+\"s\"),Fr=lo(k),ls=A(k),Bd=k.slice(0,6),ms=k.slice(6),Wd=ms.slice(1),Ad=k.reduce((e,n,t)=>(e[n]=t,e),{}),R=mt(k,0),Rr=mt(Bd,0),Cr=C(Td,k);function fs(e,n){return n==null&&T(dt(e)),n}var $=C(Ud,\"string\");function Ud(e,n,t=e){return typeof n!==e&&S(so(t,n)),n}function Yr(e,n=\"number\"){return Number.isInteger(e)||T(((t,o)=>`Non-integer ${t}: ${o}`)(n,e)),e||0}function Br(e){return typeof e==\"symbol\"&&S(\"Cannot convert Symbol to string\"),String(e)}function Wr(e,n){return Nn(e)?String(e):$(e,n)}function Do(e){return typeof e==\"boolean\"?BigInt(e?1:0):typeof e==\"string\"?BigInt(e):(typeof e!=\"bigint\"&&S(`Invalid bigint: ${e}`),e)}function bo(e,n){return Yr(Qt(e,n),n)}function vo(e,n){return typeof e==\"string\"?((t,o)=>{let r=Object.create(null);return r[t]=o,r})(n,e):dn(e)}var Re=\"smallestUnit\";var Ld={constrain:0,reject:1},qd={compatible:0,reject:1,earlier:2,later:3},jd={reject:0,use:1,prefer:2,ignore:3},$d={auto:0,never:1,critical:2,always:3},Hd={auto:0,never:1,critical:2},Gd={auto:0,never:1},zd={floor:0,halfFloor:1,ceil:2,halfCeil:3,trunc:4,halfTrunc:5,expand:6,halfExpand:7,halfEven:8},Vd=[Math.floor,e=>eo(e)?Math.floor(e):Math.round(e),Math.ceil,e=>eo(e)?Math.ceil(e):Math.round(e),Math.trunc,e=>eo(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=>eo(e)?(e=Math.trunc(e)||0)+e%2:Math.round(e)],_d={previous:-1,next:1};function Ar(e){let n=e.roundingIncrement;return n===void 0?1:U(n,\"roundingIncrement\")}function Ur(e){let n=e.fractionalSecondDigits;if(n!==void 0){if(typeof n!=\"number\"){if(Br(n)===\"auto\")return;T(so(\"fractionalSecondDigits\",n))}n=we(\"fractionalSecondDigits\",Math.floor(n),0,9,1)}return n}function Lr(e,n,t=0,o){let r=n[e];if(r===void 0)return o?t:void 0;if(r=Br(r),r===\"auto\")return o?t:null;let i=ar[r];return i===void 0&&(i=Ad[r]),i===void 0&&T(Oa(e,r,ar)),i}function Je(e,n,t,o=0){let r=t[e];if(r===void 0)return o;let i=Br(r),a=n[i];return a===void 0&&T(Oa(e,i,n)),a}var Wn=C(Lr,Re),hs=C(Lr,\"largestUnit\"),Jd=C(Lr,\"unit\"),ps=C(Je,\"overflow\",Ld),ys=C(Je,\"disambiguation\",qd),Kd=C(Je,\"offset\",jd),qr=C(Je,\"calendarName\",$d),Qd=C(Je,\"timeZoneName\",Hd),Xd=C(Je,\"offset\",Gd),An=C(Je,\"roundingMode\",zd),el=C(Je,\"direction\",_d);function jr(e,n,t,o){let r=o?Ye:Te[n+1];if(r){let i=Te[n];r%((e=we(\"roundingIncrement\",e,1,r/i-(o?0:1),1))*i)&&T(so(\"roundingIncrement\",e))}else e=we(\"roundingIncrement\",e,1,t?10**9:1,1);return e}function xn(e,n,t,o){return n!=null&&we(e,n,t,o,1,wr),n}function Ts(e,n){n>e&&T(\"smallestUnit > largestUnit\")}function Un(e,n,t,o=9,r=0,i=4){n=ie(n);let a=hs(n,r),s=Ar(n),c=An(n,i),u=Wn(n,r,1);return a=xn(\"largestUnit\",a,r,o),u=xn(Re,u,r,o),a==null?a=Math.max(t,u):Ts(a,u),s=jr(s,u,1),e&&(c=(d=>d<4?(d+2)%4:d)(c)),[a,u,s,c]}function St(e,n=6,t){let o=Ar(e=vo(e,Re)),r=An(e,7),i=Wn(e);return i=fs(Re,i),i=xn(Re,i,0,n),o=jr(o,i,void 0,t),[i,o,r]}function E(e,n){return Me(Mr,e,Me(_,n))}function w(e){return e===void 0?0:ps(dn(e))}function Zn(e,n=0){e=ie(e);let t=ys(e),o=Kd(e,n);return[ps(e),o,t]}var gs=BigInt(1e8)*O,$r=BigInt(-1e8)*O,Ds=$r-O,bs=-3261848;function Io(e){let n=12*e.year+e.month;return(n<bs||n>3309129)&&T($e),e}function X(e,n=1){return vs(fn(e),n),e}function bn(e){let n=fn(e);return vs(n),n!==Ds||oe(e)||T($e),e}function vs(e,n=1){(e<(n?Ds:$r)||e>gs)&&T($e)}function ge(e){return(e<$r||e>gs)&&T($e),e}function Hr(e,n){return ge(fn(e)+BigInt(oe(e)-n))}function ue(e){return{epochNanoseconds:e}}function De(e,n,t){return{calendar:t,timeZone:n,epochNanoseconds:e}}function Pe(e,n){return Me(_,e,N(e,n))}function N(e,n){return Me(Mr,e,{calendar:n})}function vn(e){return Me(_,e)}function B(e){return Me(k,e,{sign:xo(e)})}function Pt(e){return n=e.epochNanoseconds,Number(Ya(n,Yn));var n}function Nt(e){return e.epochNanoseconds}function Is(e,n,t){let o=ze(n),[r,i]=((u,d)=>{let l=d((u=vo(u,\"unit\")).relativeTo),m=Jd(u);return m=fs(\"unit\",m),[m,l]})(t,e);if(!i&&kn(Math.max(r,o),i))return ba(n,r);if(i||T(\"Missing relativeTo\"),!n.sign&&kn(r,i))return 0;let a=Eo(i),s=a.G(a.i,n);Cs(a,s);let c=a.re(a.i,s,r);return kn(r,i)?ba(c,r):nl(c,a.V(s),r,a)}function nl(e,n,t,o){let r=xo(e)||1,i=Gr(Cr(t,e),t,r,o,n),a=i.ae,s=i.de,c=Number(s-a),u=Number(n-a);return i.ye[k[t]]+u/c*r}function ba(e,n){return ja(Ce(e),Te[n])}function Gr(e,n,t,o,r){let i=k[n],a=e,s=0,c=va(a,i,t,o);return r&&!((u,d,l,m)=>m>0?x(d,u)<=0&&x(u,l)<=0:x(l,u)<=0&&x(u,d)<=0)(r,c.ae,c.de,Math.sign(t))&&(a={...e,[i]:e[i]+t},s=1,c=va(a,i,t,o)),{...c,ye:a,He:s}}function va(e,n,t,o){let r={...e,[n]:e[n]+t};return{ae:ct(o,e),de:ct(o,r),Ae:r}}function ws(e,n,t){let o=t-n,r=e-n;if(!r)return 0;let i=r<0n?-r:r,a=o<0n?-o:o,s=x(r,0n)===x(o,0n)?1:-1;return x(i,a)<=0?i===a?s:Ba(x(2n*i,a),s):Number(r)/Number(o)}function Ms(e,n,t,o){let{epochNanoseconds:r}=e,{timeZone:i,calendar:a}=e;if(n===0&&t===1)return{epochNanoseconds:r,timeZone:i,calendar:a};if(n===6){let s=E(W(e),ce),c=E(Ke(s,1),ce),u=He(i,s),d=He(i,c);r=zr(ws(r,u,d),o)?d:u}else{let s=W(e),c=s.offsetNanoseconds;r=qn(i,wo(s,Ln(n,t),o),c,2,0,1)}return{epochNanoseconds:r,timeZone:i,calendar:a}}function Ss(e){let{timeZone:n}=e,t=E(W(e),ce),o=E(Ke(t,1),ce),r=He(n,t);return ja(He(n,o)-r,yt)}function Ps(e){let{timeZone:n,calendar:t}=e;return De(He(n,E(W(e),ce)),n,t)}function wo(e,n,t){let[o,r]=Mo(e,n,t),i=E(Ke(e,r),o);return bn(i),i}function Mo(e,n,t){return Or(Fn(oe(e),n,t))}function ro(e){return Fn(e,pt,7)}function Ln(e,n){return Te[e]*n}function Ot(e,n){return BigInt(Te[e])*BigInt(n)}function tl(e,n,t){let o=Math.min(ze(e),6);return Ge(Po(Ce(e),BigInt(n),t),o)}function So(e,n,t,o,r,i,a){if(o===0&&r===1)return e;let s=xo(e)||1,c=kn(o,a.i)?Zt(a.i)&&o<6&&t>=6?rl:ol:il,[u,d,l]=c(s,e,n,t,o,r,i,a);return l&&o!==7&&(u=((m,f,p,h,y,b)=>{for(let v=h+1;v<=p;v++){if(v===7&&p!==7)continue;let D=Cr(v,m);D[k[v]]+=y;let I=x(f,ct(b,D));if(I&&I!==y)break;m=D}return m})(u,d,t,Math.max(6,o),s,a)),u}function Po(e,n,t){return Ns(e,n,t,e/n%2n)}function No(e,n,t){let[o,r]=br(e,O),i=o*O;return i+Ns(r,n,t,(i/n+r/n)%2n)}function Ns(e,n,t,o){let r=e/n,i=e%n,a=0;i&&(a=Ba(x(2n*(i<0n?-i:i),n),Math.sign(Number(i))));let s=zr(Number(o)+a,t);return(r-o+BigInt(s))*n}function Fn(e,n,t){return zr(e/n,t)*n}function zr(e,n){return Vd[n](e)}function ol(e,n,t,o,r,i,a){let s=Ce(n),c=Po(s,Ot(r,i),a),u=c-s,d=Math.sign(Number(c/O)-Number(s/O))===e,l=Ge(c,Math.min(o,6));return[{...n,...l},t+u,d]}function rl(e,n,t,o,r,i,a,s){let c=Number(In(n)),u=Ln(r,i),d=Fn(c,u,a),l=Gr({...n,...Rr},6,e,s,t),m=l.ae,f=l.de,p=d-Number(f-m),h=0;p&&Math.sign(p)!==e?t=m+BigInt(d):(h+=e,d=Fn(p,u,a),t=f+BigInt(d));let y=Zo(d);return[{...n,...y,days:n.days+h},t,!!h]}function il(e,n,t,o,r,i,a,s){let c=k[r],u=Cr(r,n);r===7&&(n={...n,weeks:n.weeks+Math.trunc(n.days/7)});let d=Cn(n[c],i)*i;u[c]=d;let l=Gr(u,r,i*e,s,t),m=l.ae,f=l.de,p=ws(t,m,f),h=l.ye[c],y=l.Ae[c],b=Fn(h+p*e*i,i,a),v=b===y;return u[c]=b,[u,v?f:m,l.He||v]}function Os(e,n){return e.timeZone.U(e.epochNanoseconds,(t=>{let o=vo(t,\"direction\"),r=el(o,0);return r||T(so(\"direction\",r)),r})(n))}var W=En(al,WeakMap);function al(e){let{epochNanoseconds:n,timeZone:t}=e,o=t.C(n);return{...It(n+BigInt(o)),offsetNanoseconds:o}}function qn(e,n,t,o=0,r=0,i,a){if(t!==void 0&&o===1&&(o===1||a))return Hr(n,t);o!==2&&o!==0||X(n,0);let s=e.R(n);if(t!==void 0&&o!==3){let c=((u,d,l,m)=>{let f=Ie(d);m&&(l=ro(l));for(let p of u){let h=Number(f-p);if(m&&(h=ro(h)),h===l)return p}})(s,n,t,i);if(c!==void 0)return c;o===0&&T(\"Invalid TimeZone offset\")}return a?Ie(n):kt(e,n,r,s)}function kt(e,n,t=0,o=e.R(n)){if(o.length===1)return o[0];if(t===1&&T(\"Ambiguous offset\"),o.length)return o[t===3?1:0];let r=Ie(n),i=((s,c)=>{let u=s.C(c-O);return(d=>(d>Ye&&T(\"Out-of-bounds TimeZone gap\"),d))(s.C(c+O)-u)})(e,r),a=It(r+BigInt(i*(t===2?-1:1)));return(o=e.R(a))[t===2?0:o.length-1]}function He(e,n){let t=e.R(n);if(t.length)return t[0];let o=Ie(n)-O;return e.U(o,1)}function Vr(e,n,t,o,r){let i=w(r);o.sign&&ze(o)<8&&T(\"Cannot use small units\");let a=X(st(n,t));return st(n,ks(n,a,e?H(o):o,i))}function _r(e,n){return ge(e+(Ls(t=n)&&T(\"Cannot use large units\"),In(t)));var t}function Et(e,n,t){let{calendar:o,epochNanoseconds:r,timeZone:i}=e,a=In(n),s=r;if(Ls(n)){let c=W(e);s=kt(i,E(jn(o,c,{...n,...Rr},t),c))+a}else s+=a,w(t);return{...e,epochNanoseconds:ge(s)}}function xt(e,n,t,o){let[r,i]=Oo(n,t),a=E(jn(e,n,{...t,...Rr,days:t.days+i},o),r);return bn(a),a}function jn(e,n,t,o){if(t.years||t.months||t.weeks)return ks(e,n,t,w(o));w(o);let r=t.days+Number(In(t)/O);return r?X(Ke(n,r)):n}function st(e,n){return Ke(n,1-P(e,n).day)}function Oo(e,n){let t=In(n),o=Number(t/O),r=Number(t%O),[i,a]=Or(oe(e)+r);return[i,o+a]}function Ke(e,n){return n?ns(Se(e)+n):e}function ks(e,n,t,o){let{years:r,months:i,weeks:a,days:s}=t,c;if(s+=Number(In(t)/O),r||i)c=ur(e,n,r,i,o);else{if(!a&&!s)return n;c=n}return(a||s)&&(c=Ke(c,7*a+s)),X(c)}function ur(e,n,t,o,r){let i=P(e,n),{year:a,month:s,day:c}=i;if(t){let[u,d]=pn(e,a,s);a+=t,s=dr(e,u,d,e?e.q(a):void 0,r),s=we(\"month\",s,1,it(e,a),r)}return o&&({year:a,month:s}=e?e.N(a,s,o):rs(a,s,o)),c=we(\"day\",c,1,at(e,a,s),r),yn(e,a,s,c)}function dr(e,n,t,o,r){if(t){let i=e?e.m:void 0;return o!==void 0&&(i<0||o===n+1)?o:(r===1&&T(mn),i<0?-i:n)}return ir(n,0,o)}function We(e,n){return ye(e)!==ye(n)&&T(\"Mismatching Calendars\"),e}function sl(e,n){return e.o!==n.o&&T(\"Mismatching TimeZones\"),e}function Es(e){return e.timeZone.id}function Jr(e,n,t,o){let[r,i,a,s]=Un(e,o,3,5),c=ko(n.epochNanoseconds,t.epochNanoseconds,r,i,a,s);return B(e?H(c):c)}function Kr(e,n,t,o,r){let[i,a,s,c]=Un(e,r,5),u=t.epochNanoseconds,d=o.epochNanoseconds,l;return x(d,u)?i<6?l=ko(u,d,i,a,s,c):(l=Zs(sl(t.timeZone,o.timeZone),n,t,o,i),l=So(l,d,i,a,s,c,oi(t,Nt,Et))):l=R,B(e?H(l):l)}function Qr(e,n,t,o,r){let[i,a,s,c]=Un(e,r,6),u=Ie(t),d=Ie(o),l=x(d,u),m;return l?i<=6?m=ko(u,d,i,a,s,c):(m=Fs(n,t,o,l,i),m=So(m,d,i,a,s,c,oi(t,Ie,C(xt,n)))):m=R,B(e?H(m):m)}function Xr(e,n,t,o,r){let[i,a,s,c]=Un(e,r,6,9,6);return xs(e,n,t,o,i,a,s,c)}function ei(e,n,t,o,r){let[i,a,s,c]=Un(e,r,9,9,8),u=st(n,t),d=st(n,o);return Rs(u,d)?xs(e,n,X(u),X(d),i,a,s,c,8):B(R)}function xs(e,n,t,o,r,i,a,s,c=6){let u=fn(t),d=fn(o),l;return x(d,u)?r===6?l=ko(u,d,r,i,a,s):(l=ti(n,t,o,r),i===c&&a===1||(l=So(l,d,r,i,a,s,oi(t,fn,C(jn,n))))):l=R,B(e?H(l):l)}function ni(e,n,t,o){let[r,i,a,s]=Un(e,o,5,5),c=Fn(oe(t)-oe(n),Ln(i,a),s),u={...R,...Zo(c,r)};return B(e?H(u):u)}function Zs(e,n,t,o,r){let i=x(o.epochNanoseconds,t.epochNanoseconds);if(!i)return R;if(r<6)return{...R,...Ge(o.epochNanoseconds-t.epochNanoseconds,r)};if(!Rs(W(t),W(o)))return{...R,...Ge(o.epochNanoseconds-t.epochNanoseconds,5)};let[a,s,c]=ul(e,t,o,i);return{...r===6?{...R,days:to(a,s)}:ti(n,a,s,r),...Zo(c)}}function cl(e,n,t,o){let r=Ie(n),i=Ie(t),a=x(i,r);return a?o<=6?{...R,...Ge(i-r,o)}:Fs(e,n,t,a,o):R}function Fs(e,n,t,o,r){let i=t,a=oe(t)-oe(n);return Math.sign(a)===-o&&(i=Ke(t,-o),a+=Ye*o),{...ti(e,n,i,r),...Zo(a)}}function ti(e,n,t,o){if(o<=7){let h=to(n,t);return o===7?{...R,weeks:Cn(h,7),days:vr(h,7)}:{...R,days:h}}let r=P(e,n),i=P(e,t);if(o===8){let{year:h,month:y,day:b}=r,{year:v,month:D,day:I}=i,F=Math.sign(Fe(v,h)||Fe(D,y)||to(n,t)),j=0,K=0;if(F){j=e?e.ne(h,y,v,D):Cd(h,y,v,D);let Q=ur(e,n,0,j,0);F*Fe(b,I)>0&&(j-=F,Q=ur(e,n,0,j,0)),K=to(Q,t)}return{...R,months:j,days:K}}let{year:a,month:s,day:c}=r,{year:u,month:d,day:l}=i,m=u-a,f=d-s,p=l-c;if(m||f){let h=Math.sign(m||f),y=at(e,u,d),b=0;if(Math.sign(l-c)===-h){let v=y;({year:u,month:d}=e?e.N(u,d,-h):rs(u,d,-h)),m=u-a,f=d-s,y=at(e,u,d),b=h<0?-v:y}if(p=l-Math.min(c,y)+b,m){let[v,D]=pn(e,a,s),[I,F]=pn(e,u,d),j=e?e.m:void 0;if(f=j!==void 0&&D&&!F&&(j<0?h>0&&I===-j:h<0&&I===v)?0:I-v||Number(F)-Number(D),Math.sign(f)===-h){let K=h<0&&-it(e,u);u-=h,m=u-a,f=d-dr(e,v,D,e?e.q(u):void 0,0)+(K||it(e,u))}else if(e){let K=dr(e,v,D,e.q(u),0);f=e.ne(u,K,u,d)}}}return{...R,years:m,months:f,days:p}}function Rs(e,n){return Fe(e.year,n.year)||Fe(e.month,n.month)||Fe(e.day,n.day)}function ul(e,n,t,o){let r=W(n),i=W(t),a=t.epochNanoseconds,s=0,c=oe(i)-oe(r);Math.sign(c)===-o&&s++;let u=s+(o>0?1:0);for(;s<=u;s++){let d=Ke(i,s*-o),l=kt(e,E(d,r));if(x(a,l)!==-o)return[r,d,Number(a-l)]}}function ko(e,n,t,o,r,i){return{...R,...Ge(Po(n-e,Ot(o,r),i),t)}}function to(e,n){return Se(n)-Se(e)}function oi(e,n,t){return{i:e,V:n,G:t}}function Eo(e){let{calendar:n}=e;if(Zt(e)){let{timeZone:t}=e;return{i:e,V:Nt,G:Et,re:C(Zs,t,n)}}return{i:Ys(e),V:Ie,G:C(xt,n),re:C(cl,n)}}function ct(e,n){return e.V(e.G(e.i,n))}function Zt(e){return\"timeZone\"in e}function Cs(e,n){Zt(e.i)||(Ia(e.i),Ia(n))}function Ys(e){return E(e,\"hour\"in e?e:ce)}function Ia(e){bn(Ys(e))}function kn(e,n){return e<=6-(n&&Zt(n)?1:0)}function ri(e,n,t){let o={};for(let r=n;r>=0;r--){let i=Te[r];o[t[r]]=Cn(e,i),e=vr(e,i)}return o}var dl=2**53;function ii(e,n,t,o,r){let i=e(ie(r).relativeTo),a=Math.max(ze(t),ze(o));if(kn(a,i))return ll(n,t,o,a);i||T(\"Missing relativeTo\"),n&&(o=H(o));let s=Eo(i),c=s.G(s.i,t),u=s.G(c,o);return B(s.re(s.i,u,a))}function ll(e,n,t,o){return B(Qe(((r,i,a,s)=>{let c=Ce(r)+Ce(i)*BigInt(s?-1:1);return Number.isFinite(Number(c/O))||T($e),{...R,...Ge(c,a)}})(n,t,o,e)))}function Bs(e,n,t){let o=ze(n),[r,i,a,s,c]=((f,p,h)=>{f=vo(f,Re);let y=hs(f),b=h(f.relativeTo),v=Ar(f),D=An(f,7),I=Wn(f);return y===void 0&&I===void 0&&T(\"Required smallestUnit or largestUnit\"),I==null&&(I=0),y==null&&(y=Math.max(I,p)),Ts(y,I),v=jr(v,I,1),v>1&&I>5&&y!==I&&T(\"For calendar units with roundingIncrement > 1, use largestUnit = smallestUnit\"),[y,I,v,D,b]})(t,o,e);if(!c&&Math.max(o,r)<=6)return B(Qe(((f,p,h,y,b)=>{let v=Po(Ce(f),Ot(h,y),b);return{...R,...Ge(v,p)}})(n,r,i,a,s)));let u=c&&Zt(c)&&r>=6&&i<6;if(!n.sign&&!u)return n;c||T(\"Missing relativeTo\");let d=Eo(c),l=d.G(d.i,n);Cs(d,l);let m=d.re(d.i,l,r);return m=So(m,d.V(l),r,i,a,s,d),B(m)}function Ws(e){return e.sign===-1?ai(e):e}function ai(e){return B(H(e))}function H(e){let n={};for(let t of k)n[t]=-1*e[t]||0;return n}function xo(e,n=k){let t=0;for(let o of n){let r=Math.sign(e[o]);r&&(t&&t!==r&&T(\"Cannot mix duration signs\"),t=r)}return t}function Qe(e){for(let t of Wd)we(t,e[t],-4294967295,4294967295,1);let n=Ce(e);return As(Number(n/hn)),e}function As(e){Number.isSafeInteger(e)||T(\"Out-of-bounds duration\")}function Ce(e){return BigInt(e.days)*O+In(e)}function In(e){return BigInt(e.hours)*Id+BigInt(e.minutes)*vd+Us(e)}function Us(e){return BigInt(e.seconds)*hn+BigInt(e.milliseconds)*Yn+BigInt(e.microseconds)*bd+BigInt(e.nanoseconds)}function Ge(e,n=6){let t=Number(e/O),o=Number(e%O),r=Te[n],i=n<=3?Number(e/BigInt(r)):t*(Ye/r)+Cn(o,r);Number.isFinite(i)||T($e),n<=3&&Math.abs(i)/(_e/Te[n])>=dl&&T($e);let a=ri(o,n,k);return a[k[n]]=i,a}function Zo(e,n=5){return ri(e,n,k)}function Ls(e){return!!xo(e,ms)}function ze(e){let n=9;for(;n>0&&!e[k[n]];n--);return n}function si(e,n){return x(e.epochNanoseconds,n.epochNanoseconds)}function ci(e,n){return x(e.epochNanoseconds,n.epochNanoseconds)}function qs(e,n,t,o){let r=e(ie(o).relativeTo),i=Math.max(ze(n),ze(t));if(Ca(k,n,t))return 0;if(kn(i,r))return x(Ce(n),Ce(t));r||T(\"Missing relativeTo\");let a=Eo(r);return x(ct(a,n),ct(a,t))}function ui(e,n){return wn(e,n)||Fo(e,n)}function wn(e,n){return Fe(Se(e),Se(n))}function Fo(e,n){return Fe(oe(e),oe(n))}function js(e,n){return!si(e,n)}function $s(e,n){return!ci(e,n)&&e.timeZone.o===n.timeZone.o&&e.calendar===n.calendar}function Hs(e,n){return!ui(e,n)&&e.calendar===n.calendar}function Gs(e,n){return!wn(e,n)&&e.calendar===n.calendar}function zs(e,n){return!wn(e,n)&&e.calendar===n.calendar}function Vs(e,n){return!wn(e,n)&&e.calendar===n.calendar}function _s(e,n){return!Fo(e,n)}function $n(e){return e===0?gd:e?e.l:void 0}function J(e,n,t=n){return $n(e)?t:n}function di(e,n){let t=e||void 0,o=$n(e),{era:r,eraYear:i,year:a}=n;if(a!==void 0&&(a=U(a,\"year\")),i!==void 0&&(i=U(i,\"eraYear\")),r!==void 0||i!==void 0){r!==void 0&&i!==void 0||S(\"Mismatching era/eraYear\"),o||T(\"Forbidden era/eraYear\");let s=Aa(r),c=o[s];c===void 0&&T((d=>`Invalid era: ${d}`)(r));let u=t?.te?t.te(i,s,c):ml(i,c);a!==void 0&&a!==u&&T(\"Mismatching year/eraYear\"),a=u}else a===void 0&&S(co(o));return a}function io(e,n,t,o,r){let{month:i,monthCode:a}=n;if(a!==void 0){let s=((c,u,d,l,m=La(u))=>{let f=c?c.q(d):void 0,[p,h]=m,y=ir(p,h,f);if(h){let b=c?c.m:void 0;b===void 0&&T(mn),b>0?(y>b&&T(mn),f!==y&&(l===1&&T(mn),y=ir(p,0,f))):(y!==-b&&T(mn),f===void 0&&l===1&&T(mn))}return y})(e,a,t,o,r);i!==void 0&&i!==s&&T(\"Mismatching month/monthCode\"),i=s,o=1}else i===void 0&&S(\"Missing month/monthCode\");return we(\"month\",i,1,it(e,t),o)}function lr(e,n,t,o,r){return rr(n,\"day\",1,at(e,o,t),r)}function ml(e,n){return(n+e)*(Math.sign(n)||1)||0}function Ft(e,n){return po(Me(_,{...ce,...e}),n)}var fl=Rn(\"([+-])(\\\\d{2})(?::?(\\\\d{2})(?::?(\\\\d{2})(?:[.,](\\\\d{1,9}))?)?)?\");function Ro(e){let n=li(e);return n===void 0&&T(Fa(e)),n}function li(e,n){let t=fl.exec(e);if(t&&(o=>(r=>{r[0]!==\"T\"&&r[0]!==\"t\"||(r=r.slice(1));let i=r.search(/[.,]/),a=i<0?r:r.slice(0,i),s=a.split(\":\");return s.length===1?/^(?:\\d{2}|\\d{4}|\\d{6})$/i.test(a):(s.length===2||s.length===3)&&s.every(c=>c.length===2&&/^\\d{2}$/i.test(c))})(o.slice(1)))(t[0]))return((o,r)=>{let i=o[4]||o[5];return r&&i&&T(Ze(i)),s=(On(o[2])*yt+On(o[3])*pt+On(o[4])*_e+gr(o[5]||\"\"))*Dr(o[1]),Math.abs(s)>=Ye&&T(\"Out-of-bounds offset\"),s;var s})(t,n)}var de={era:Wr,month:Xt,monthCode(e,n=\"monthCode\"){return((t,o)=>{if(typeof t==\"string\")return t;if(t&&typeof t==\"object\"){let r=t.toString;if(typeof r==\"function\")return $(r.call(t),o)}return $(t,o)})(e,n)},day:Xt},mi=mt(_,U),Js=mt(k,bo),hl={offset(e){return Ro(Wr(e))}},fi=Object.assign({},de,mi),hi=Object.assign({},fi,hl);function Z(e,n,t,o,r=!o){let i={},a=0;for(let s of n){let c=e[s];if(c!==void 0){a=1;let u=t[s];u&&(c=u(c,s)),i[s]=c}else o&&o.includes(s)&&S(dt(s))}return r&&!a&&S(Pa(n)),i}function Rt(e,n=ce,t){let o=E(e,n);return bn(o),Pe(o,t)}function ut(e,n,t){return Ks(e,n,Qs(e,n),w(t))}function Co(e,n,t){let o=Qs(e,n),r=t();return[Ks(e,n,o,r[0]),...r]}function Ks(e,n,t,o){let r=t[1],i=io(e,n,r,o,t[0]);return N(X(yn(e,r,i,lr(e,n,i,r,o))),e)}function pi(e){if(e.monthCode!==void 0)return La(e.monthCode)}function Qs(e,n){let t=$n(e);return n.year!==void 0||n.era!==void 0&&n.eraYear!==void 0||S(co(t)),n.monthCode===void 0&&n.month===void 0&&S(\"Missing month/monthCode\"),n.day===void 0&&S(dt(\"day\")),[pi(n),di(e,n)]}function yi(e,n,t){let o=$n(e);n.year!==void 0||n.era!==void 0&&n.eraYear!==void 0||S(co(o)),n.monthCode===void 0&&n.month===void 0&&S(\"Missing month/monthCode\");let r=pi(n),i=di(e,n);return N(Io(yn(e,i,io(e,n,i,w(t),r),1)),e)}function Ti(e,n,t){let o=e===se,r=$n(e);n.day===void 0&&S(dt(\"day\")),o||n.month===void 0||n.year!==void 0||n.era!==void 0&&n.eraYear!==void 0||S(co(r));let i=pi(n),a=n.eraYear!==void 0||n.year!==void 0?di(e,n):void 0,s=w(t),c,u,d;if(a===void 0&&o&&(a=1972),a!==void 0){o||X(yn(e,a,1,1));let p=io(e,n,a,s,i);c=lr(e,n,p,a,s),[u,d]=pn(e,a,p)}else{n.monthCode===void 0&&S(\"Missing month/monthCode\"),[u,d]=i;let p=e?e.ge:1972;if(p!==void 0)c=lr(e,n,io(e,n,p,s,i),p,s);else{let h=s===0&&e?e.ke?.(u,d,n.day):void 0;c=h!==void 0?h:n.day}}d&&((e&&e.Z?.[u])??1/0)<n.day&&(s===1&&T(mn),d=0,c=yr(n.day,1,(e&&e.X)??1/0));let l=e?e.v(u,!!d,c):cr(u,!!d);for(;!l&&s===0&&c>1;)c--,l=e?e.v(u,!!d,c):cr(u,!!d);l||T(\"Cannot guess year\");let{year:m,month:f}=l;return N(X(yn(e,m,f,c)),e)}var Ne=Intl.DateTimeFormat;function pl(e,n){n<-864e13&&T($e);let t=e.formatToParts(n),o={};for(let r of t)o[r.type]=r.value;return o}var yl={El_Aaiun:17,Tucuman:12,Tirane:11,Riga:10,Simferopol:9,Vienna:9,Tunis:8,Boa_Vista:6,Fortaleza:6,Maceio:6,Noronha:6,Recife:6,Gaza:6,Hebron:6,DeNoronha:6},tr=-388152e4;function Xs(e,n=4){let t=Ur(e),o=An(e,4),r=Wn(e);return[o,...Di(xn(Re,r,0,n),t)]}function gi(e){return qr(ie(e))}function ec(e,n){return Xs(ie(e),n)}function Di(e,n){return e!=null?[Te[e],e<4?9-3*e:-1]:[n===void 0?1:10**(9-n),n]}function bi(e,n,t){let[o,r,i,a]=(c=>{let u=Ur(c=ie(c)),d=An(c,4),l=Wn(c);return[c.timeZone,d,...Di(xn(Re,l,0,4),u)]})(t),s=o!==void 0;return((c,u,d,l,m,f)=>{d=No(d,BigInt(m),l);let p=u.C(d);return Ni(It(d+BigInt(p)),f)+(c?Ct(ro(p)):\"Z\")})(s,ne(s?e(o):\"UTC\"),n.epochNanoseconds,r,i,a)}function vi(e,n){let t=(o=>{o=ie(o);let r=qr(o),i=Ur(o),a=Xd(o),s=An(o,4),c=Wn(o);return[r,Qd(o),a,s,...Di(xn(Re,c,0,4),i)]})(n);return((o,r,i,a,s,c,u,d,l,m)=>{a=No(a,BigInt(l),d);let f=i.C(a);return Ni(It(a+BigInt(f)),m)+Ct(ro(f),u)+Dl(r,c)+Oi(o,s)})(e.calendar,e.timeZone.id,e.timeZone,e.epochNanoseconds,...t)}function Ii(e,n){let t=(o=>(o=ie(o),[qr(o),...Xs(o)]))(n);return((o,r,i,a,s,c)=>Ni(wo(r,s,a),c)+Oi(o,i))(e.calendar,e,...t)}function wi(e,n){return t=e.calendar,o=e,r=gi(n),ao(o)+Oi(t,r);var t,o,r}function Mi(e,n){return nc(e.calendar,tc,e,gi(n))}function Si(e,n){return nc(e.calendar,gl,e,gi(n))}function nc(e,n,t,o){let r=o>1||o===0&&e!==se;return o===1?e===se?n(t):ao(t):r?ao(t)+rc(ye(e),o===2):n(t)}function Pi(e,n){return((t,o,r,i)=>oc(Mo(t,r,o)[0],i))(e,...ec(n))}function Yo(e,n){let[t,o,r]=ec(n,3);return o>1&&Qe(e={...e,...tl(e,o,t)}),Tl(e,r)}function Tl(e,n){let{sign:t}=e,o=t===-1?H(e):e,{hours:r,minutes:i}=o,a=Us(o),s=Number(a/hn),c=Number(a%hn);As(s);let u=ki(c,n),d=n>=0||!t||u;return(t<0?\"-\":\"\")+\"P\"+wa({Y:ln(o.years),M:ln(o.months),W:ln(o.weeks),D:ln(o.days)})+(r||i||s||d?\"T\"+wa({H:ln(r),M:ln(i),S:ln(s,d)+u}):\"\")}function wa(e){let n=[];for(let t in e){let o=e[t];o&&n.push(o,t)}return n.join(\"\")}function ln(e,n){if(!e&&!n)return\"\";let t=Object.create(null);return t.useGrouping=0,e.toLocaleString(\"fullwide\",t)}function Ni(e,n){return ao(e)+\"T\"+oc(e,n)}function ao(e){return tc(e)+\"-\"+pe(e.day)}function tc(e){let{year:n}=e;return(n<0||n>9999?ic(n)+oo(6,Math.abs(n)):oo(4,n))+\"-\"+pe(e.month)}function gl(e){return pe(e.month)+\"-\"+pe(e.day)}function oc(e,n){let t=[pe(e.hour),pe(e.minute)];return n!==-1&&t.push(pe(e.second)+((o,r,i,a)=>ki(o*ht+r*ft+i,a))(e.millisecond,e.microsecond,e.nanosecond,n)),t.join(\":\")}function Ct(e,n=0){if(n===1)return\"\";let[t,o]=ve(Math.abs(e),yt),[r,i]=ve(o,pt),[a,s]=ve(i,_e);return ic(e)+pe(t)+\":\"+pe(r)+(a||s?\":\"+pe(a)+ki(s):\"\")}function Dl(e,n){return n!==1?\"[\"+(n===2?\"!\":\"\")+e+\"]\":\"\"}function Oi(e,n){return n>1||n===0&&e!==se?rc(ye(e),n===2):\"\"}function rc(e,n){return\"[\"+(n?\"!\":\"\")+\"u-ca=\"+e+\"]\"}var bl=/0+$/;function ki(e,n){let t=oo(9,e);return t=n===void 0?t.replace(bl,\"\"):t.slice(0,n),t?\".\"+t:\"\"}function ic(e){return e<0?\"-\":\"+\"}var vl=/^(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$/,Il=/[^\\w\\/:+-]+/;function ac(e){return Bo($(e))}function Bo(e){return sc(e).id}function sc(e){let n=e.toUpperCase(),t=(r=>{let i=li(r,1);if(i!==void 0)return{id:Ct(i),_:i,o:i}})(n);if(t)return{kind:\"fixed\",...t};let o=n===\"UTC\"?\"UTC\":(r=>(Il.test(r)&&T(pr(r)),vl.test(r)&&T(\"Forbidden ICU TimeZone\"),r.toLowerCase().split(\"/\").map((i,a)=>(i.length<=3||/\\d/.test(i))&&!/etc|yap/.test(i)?i.toUpperCase():i.replace(/baja|dumont|[a-z]+/g,(s,c)=>s.length<=2&&!a||s===\"in\"||s===\"chat\"?s.toUpperCase():s.length>2||!c?Ta(s).replace(/island|noronha|murdo|rivadavia|urville/,Ta):s)).join(\"/\")))(e);return wl(o)}var wl=En(e=>{if(e===\"UTC\")return{kind:\"utc\",id:e,o:e};let n=e.toUpperCase(),t=Ml(n);return{kind:\"named\",id:e,format:t,o:t.resolvedOptions().timeZone}}),Ml=En(e=>new Ne(\"en-u-hc-h23\",{calendar:\"iso8601\",timeZone:e,era:\"short\",year:\"numeric\",month:\"numeric\",day:\"numeric\",hour:\"numeric\",minute:\"numeric\",second:\"numeric\"}));function ne(e){let n=sc(e);return Sl(n.id,n)}var Sl=En((e,n)=>n.kind===\"named\"?new fr(e,n.o,n.format):new mr(e,n.o,n.kind===\"fixed\"?n._:0)),mr=class{constructor(n,t,o){this.id=n,this.o=t,this._=o}C(){return this._}R(n){return[Hr(n,this._)]}U(){}},fr=class{constructor(n,t,o){this.id=n,this.o=t,this.qe=((r,i)=>{let a=En(r),s=En(Pl),c=86400*i;function u(l){let[m,f]=Sa(l,c),p=no(m),h=no(f),y=a(p),b=a(h);return y===b?y:d(s(p,h),y,b,l)}function d(l,m,f,p){let h,y;for(;(p===void 0||(h=p<l[0]?m:p>=l[1]?f:void 0)===void 0)&&(y=l[1]-l[0]);){let b=l[0]+Math.floor(y/2);r(b)===f?l[1]=b:l[0]=b+1}return h}return{Ee(l){let m=u(l-86400),f=u(l+86400),p=l-m,h=l-f;if(m===f)return[p];let y=u(p);return y===u(h)?[l-y]:m>f?[p,h]:[]},De:u,U:function l(m,f){if(f>0&&m>=864e10)return;if(f<0){if(m<=tr)return;let I=Ma()+94867200;if(m>I)return l(I,-1)}let p=f>0?Math.max(m,tr):m,[h,y]=Sa(p,c),b=c*f,v=f>0?Math.max(m,Ma())+94867200:tr,D=()=>f<0?y>v:h<v;for(;D();){let I=no(h),F=no(y),j=a(I),K=a(F);if(j!==K){let Q=s(I,F);d(Q,j,K);let V=Q[0];if((Fe(V,m)||1)===f)return V}h+=b,y+=b}}}})((r=>i=>{let a=pl(r,1e3*i);return 86400*rt((s=>{let c=s.relatedYear;if(c!==void 0)return parseInt(c);let u=parseInt(s.year);return s.era!==void 0&&Aa(s.era)===\"bce\"?1-u:u})(a),parseInt(a.month),parseInt(a.day))+3600*parseInt(a.hour)+60*parseInt(a.minute)+parseInt(a.second)-i})(o),(r=>{let i=r.split(\"/\").pop();return yl[i]||60})(n))}C(n){return this.qe.De((t=>ga(t)[0])(n))*_e}R(n){let t=86400*Se(n)+Nr(n),o=Qa(n);return this.qe.Ee(t).map(r=>ge(BigInt(r)*hn+BigInt(o)))}U(n,t){let[o,r]=ga(n),i=this.qe.U(o+(t>0||r?1:0),t);if(i!==void 0)return BigInt(i)*hn}};function Ma(){return Math.floor(Date.now()/1e3)}function Pl(e,n){return[e,n]}function Sa(e,n){let t=Math.floor(e/n)*n;return[t,t+n]}function no(e){return yr(e,-1e10,864e10)}function cc(e,n,t){let o=Z(t,J(n,Ja,Ka),hi,[],0);if(o.timeZone!==void 0){let r=ut(n,o),i=Ft(o),a=ne(e(o.timeZone));return{epochNanoseconds:qn(a,E(r,i),o.offset),timeZone:a,calendar:n}}return ut(n,o)}function uc(e,n,t,o){let r=Z(t,J(n,Ja,Ka),hi,Sr,0),i=e(r.timeZone),[a,s,c,u]=Co(n,r,()=>Zn(o)),d=Ft(r,s),l=ne(i);return De(qn(l,E(a,d),r.offset,c,u),l,n)}function dc(e,n,t){let o=Z(n,J(e,Va,_a),fi,[],0),[r,i]=Co(e,o,()=>[w(t)]);return Rt(r,Ft(o,i),e)}function lc(e,n,t,o=[]){return ut(e,Z(n,J(e,gn,Dn),de,o),t)}function mc(e,n,t,o){return yi(e,Z(n,J(e,gt,Ha),de,o),t)}function fc(e,n,t,o){let r=Z(t,J(e,gn,Dn),de,Tn,0);return n&&r.month!==void 0&&r.monthCode===void 0&&r.year===void 0&&(r.year=1972),Ti(e,r,o)}function hc(e,n){return Ft(Z(e,sr,mi,[],1),w(n))}function pc(e){let n=Z(e,ls,Js);return B(Qe({...R,...n}))}function ae(e){T(Fa(e))}function yc(e){let n=Xe(e=Wr(e)),t;return n||ae(e),n.F?t=0:n.offset?t=Ro(n.offset):ae(e),n.timeZoneId&&li(n.timeZoneId,1),wt(n),ue(Hr(n,t))}function Tc(e,n){let t=Xe($(e));return t||ae(e),t.timeZoneId?Nc(t,n,void 0):(t.F&&ae(e),hr(t,n))}function gc(e,n,t){let o=Xe($(e));return o&&o.timeZoneId||ae(e),Nc(o,n,t)}function Dc(e,n){let t=Xe($(e));return t&&!t.F||ae(e),Oc(t,n)}function bc(e,n){let t=Zi(xi($(e)),void 0,n);return N(t,t.calendar)}function vc(e,n){let t=Ri($(e));if(t)return Ei(t),N(Io(Be(t)),n(t.calendarId));let o=Zi(xi(e),Nl,n),{calendar:r}=o;return N(st(r,o),r)}function Ei(e){e.calendarId!==\"iso8601\"&&T(Ze(e.calendarId))}function Ic(e,n){let t=Ci($(e));if(t)return Ei(t),N(Be(t),n(t.calendarId));let o=Zi(xi(e),Ol,n),{calendar:r}=o,{year:i,month:a,day:s}=P(r,o),[c,u]=pn(r,i,a),{year:d,month:l}=((m,f,p,h)=>{let y=m?m.v(f,p,h):cr(f,p);return y||T(\"Cannot guess year\"),y})(r,c,u,s);return N(X(yn(r,d,l,s)),r)}function wc(e){let n=(o=>{let r=Ec(o);return r?(Yt(r[13]),xc(r,1)):void 0})(e=$(e)),t;return n||(n=Xe(e),n?(n.fe||ae(e),n.F&&T(Ze(\"Z\")),Ei(n)):ae(e)),(t=Ri(e))&&Da(t)&&ae(e),(t=Ci(e))&&Da(t)&&ae(e),vn(bt(n))}function Mc(e){let n=(t=>{let o=Cl.exec(t);return o?(r=>{let i=0,a=0,s=0,c={years:u(r[2]),months:u(r[3]),weeks:u(r[4]),days:u(r[5]),hours:u(r[6],r[7],5),minutes:u(r[8],r[9],4),seconds:u(r[10],r[11],3),...ri(s,2,k)};return i||T(Pa(k)),Dr(r[1])<0&&(c=H(c)),c;function u(d,l,m){let f=0,p=0;return m&&([f,s]=ve(s,Te[m])),d!==void 0&&(a&&T(Ze(d)),p=(h=>{let y=parseInt(h);return Number.isFinite(y)||T(Ze(h)),y})(d),i=1,l&&(s=gr(l)*(Te[m]/_e),a=1)),f+p}})(o):void 0})($(e));return n||ae(e),B(Qe(n))}function Sc(e){let n=Xe(e)||Ri(e)||Ci(e);if(n)return n.calendarId;let t=Ec(e);return t?Yt(t[13]).calendarId:e}function Pc(e){let n=Xe(e);return n&&(n.timeZoneId||n.F&&\"UTC\"||n.offset)||e}function xi(e){let n=Xe(e);return n&&!n.F||ae(e),n}function Zi(e,n,t){return n&&e.calendarId===\"iso8601\"?(Be(e),e.fe&&bt(e),hr(n(e),t)):e.fe?Oc(e,t):hr(e,t)}function Nl(e){let n=12*e.year+e.month===bs?20:1;return{...e,day:n}}function Ol(e){return{...e,year:1972}}function Nc(e,n,t){let o=ne(Bo(e.timeZoneId)),r;if(wt(e),e.fe){let a=e.offset?Ro(e.offset):void 0,[,s,c]=Zn(t);r=qn(o,e,a,s,c,!(o._||e.offset===void 0||(i=e.offset,i.replace(/\\D/g,\"\").length>4)),e.F)}else Zn(t),r=He(o,e);var i;return ge(r),De(r,o,n(e.calendarId))}function Oc(e,n){return wt(e),bn(e),{...E(e,e),calendar:n(e.calendarId)}}function hr(e,n){return Be(e),X(e),{calendar:n(e.calendarId),year:e.year,month:e.month,day:e.day}}function Fi(e){return`(\\\\d{2})(?:(:?)(\\\\d{2})(?:\\\\${e}(\\\\d{2})(?:[.,](\\\\d{1,9}))?)?)?`}function kc(e){return\"([+-])\"+Fi(e)}var kl=\"(?:(?:([+-])(\\\\d{6}))|(\\\\d{4}))(-?)(\\\\d{2})\\\\4(\\\\d{2})(?:[T ]\"+Fi(8)+\"(Z|\"+kc(15)+\")?)?\",El=Rn(\"(?:(?:([+-])(\\\\d{6}))|(\\\\d{4}))-?(\\\\d{2})((?:\\\\[(!?)([^\\\\]]*)\\\\]){0,9})\"),xl=Rn(\"(?:--)?(\\\\d{2})-?(\\\\d{2})((?:\\\\[(!?)([^\\\\]]*)\\\\]){0,9})\"),Zl=Rn(kl+\"((?:\\\\[(!?)([^\\\\]]*)\\\\]){0,9})\"),Fl=Rn(\"T?\"+Fi(2)+`(${kc(9)})?((?:\\\\[(!?)([^\\\\]]*)\\\\]){0,9})`),Rl=new RegExp(\"\\\\[(!?)([^\\\\]]*)\\\\]\",\"g\"),Cl=Rn(\"([+-])?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)?)?\");function Xe(e){let n=Zl.exec(e);return n?(t=>{let o=t[12],r=(o||\"\").toUpperCase()===\"Z\";return{year:Zc(t),month:parseInt(t[5]),day:parseInt(t[6]),...xc(t,7),...Yt(t[19]),fe:!!t[7],F:r,offset:r?void 0:o}})(n):void 0}function Ri(e){let n=El.exec(e);if(n)return(t=>({year:Zc(t),month:parseInt(t[4]),day:1,...Yt(t[5])}))(n)}function Ci(e){let n=xl.exec(e);return n?(t=>({year:1972,month:parseInt(t[1]),day:parseInt(t[2]),...Yt(t[3])}))(n):void 0}function Ec(e){let n=Fl.exec(e);if(n)return n[6]&&Ro(n[6]),n}function xc(e,n){let t=On(e[n+3]);return{...Or(gr(e[n+4]||\"\"))[0],hour:On(e[n]),minute:On(e[n+2]),second:t===60?59:t}}function Zc(e){let n=Dr(e[1]),t=parseInt(e[2]||e[3]);return n<0&&!t&&T(Ze(-0)),n*t}function Yt(e){let n,t,o=[];return e.replace(Rl,(r,i,a)=>{let s=!!i,[c,u]=a.split(\"=\").reverse();return u?u===\"u-ca\"?(o.push(c.toLowerCase()),n||(n=s)):(s||/[A-Z]/.test(u))&&T(Ze(r)):(t&&T(Ze(r)),t=c),\"\"}),o.length>1&&n&&T(Ze(e)),{timeZoneId:t,calendarId:o[0]||\"iso8601\"}}function Hn(e,n,t){let o=Object.assign(Object.create(null),n);return or(o,t,$a),$n(e)&&(or(o,t,wd),e&&e.le&&or(o,t,Md,Bn)),o}function or(e,n,t,o){let r=0,i=[];for(let a of t)n[a]!==void 0?r=1:i.push(a);if(Object.assign(e,n),r)for(let a of o||i)delete e[a]}function Fc(e,n,t){let{calendar:o,timeZone:r}=e,i=J(o,Pd,Nd),a=W(e),{year:s,month:c,day:u}=P(o,a),d={year:s,monthCode:Bt(o,s,c),day:u,hour:a.hour,minute:a.minute,second:a.second,millisecond:a.millisecond,microsecond:a.microsecond,nanosecond:a.nanosecond,offset:a.offsetNanoseconds},l=Z(n,i,hi),m=Hn(o,d,l),f={...d,...l},[p,h,y,b]=Co(o,m,()=>Zn(t,2));return De(qn(r,E(p,po(f,h)),f.offset,y,b),r,o)}function Rc(e,n,t){let{calendar:o}=e,r=J(o,Va,_a),{year:i,month:a,day:s}=P(o,e),c={year:i,monthCode:Bt(o,i,a),day:s,hour:e.hour,minute:e.minute,second:e.second,millisecond:e.millisecond,microsecond:e.microsecond,nanosecond:e.nanosecond},u=Z(n,r,fi),d=Hn(o,c,u),l={...c,...u},[m,f]=Co(o,d,()=>[w(t)]);return Rt(m,po(l,f),o)}function Cc(e,n,t){let{calendar:o}=e,r=J(o,gn,Dn),{year:i,month:a,day:s}=P(o,e);return ut(o,Hn(o,{year:i,monthCode:Bt(o,i,a),day:s},Z(n,r,de)),t)}function Yc(e,n,t){let{calendar:o}=e,r=J(o,gt,Ha),{year:i,month:a}=P(o,e);return yi(o,Hn(o,{year:i,monthCode:Bt(o,i,a)},Z(n,r,de)),t)}function Bc(e,n,t){let{calendar:o}=e,r=J(o,gn,Dn),{year:i,month:a,day:s}=P(o,e);return Ti(o,Hn(o,{monthCode:Bt(o,i,a),day:s},Z(n,r,de)),t)}function Wc(e,n,t){return((o,r,i)=>Ft({...Me(sr,o),...Z(r,sr,mi)},w(i)))(e,n,t)}function Ac(e,n){return B((t=e,o=n,Qe({...t,...Z(o,ls,Js)})));var t,o}function Bt(e,n,t){let[o,r]=pn(e,n,t);return qa(o,r)}function Uc(e,n,t){return De(e.epochNanoseconds,n,t)}function Lc(e){return ue(e.epochNanoseconds)}function Yi(e){return Pe(W(e),e.calendar)}function Bi(e){return N(W(e),e.calendar)}function Wi(e){return vn(W(e))}function qc(e,n,t){let o=((r,i,a)=>{let s=(c=>ys(ie(c)))(a);return kt(r,i,s)})(n,e,t);return De(ge(o),n,e.calendar)}function jc(e,n,t,o){let r=e(o.timeZone),i=o.plainTime,a=i!==void 0?n(i):void 0,s=ne(r),c;return c=a?kt(s,E(t,a)):He(s,E(t,ce)),De(c,s,t.calendar)}function $c(e,n,t){return Vc(e,Me(J(e,Dt,Ga),n),Z(dn(t),Tn,de,[]))}function Hc(e,n,t){let o=J(e,fo,Sd);return Vc(e,Me(za,n),Z(dn(t),o,de,[]))}function Gc(e,n){return Ti(e,Z(n,za,de))}function zc(e,n,t){return yi(e,Z(n,J(e,Dt,Ga),de),t)}function Vc(e,n,t){let o=J(e,Od,kd),r=Hn(e,n,t);return r=Z(r,o,de,[]),ut(e,r)}function _c(e){return ue(ge(BigInt(bo(e))*Yn))}function Jc(e){return ue(ge(Do(e)))}function Gn(e){return e.timeZone=\"UTC\",[\"full\",\"long\"].includes(e.timeStyle)&&(e.timeStyle=\"medium\"),e}function Kc(e,n){return e.timeZone!==void 0&&S(\"Cannot specify TimeZone\"),e.timeZone=n,e}function zn(e,n,t){let o=e.resolvedOptions().calendar;!t&&n.calendar===se||ye(n.calendar)===o||T(\"Mismatching Calendars\")}function Mn(e,n,t,o,r){let i=new Set(e),a=new Set(n),s=new Set(t);return(c,u)=>{let d=((I,F,j,K)=>{let Q={dateStyle:void 0,timeStyle:void 0,me:{},pe:{},xe:{},oe:0,ue:0};for(let V of Object.keys(I)){let Pn=I[V];Pn===void 0||K.has(V)||(F.has(V)?V===\"dateStyle\"?Q.dateStyle=Pn:V===\"timeStyle\"?Q.timeStyle=Pn:Q.me[V]=Pn:V===\"era\"?Q.pe[V]=Pn:j.has(V)?V===\"dateStyle\"||V===\"timeStyle\"?Q.ue=1:Q.oe=1:Q.xe[V]=Pn)}return Q})(c,i,a,s),l=d.dateStyle!==void 0,m=d.timeStyle!==void 0,f=l||m,p=Object.keys(d.me).length>0,h=d.oe||d.ue,y=p||l||m,b=Object.keys(d.pe).length>0,v=p||b||d.oe;(!u&&h||u&&h&&!y||f&&v)&&S(\"Invalid formatting options\");let D={};return f||y||Object.assign(D,o),Object.assign(D,d.me,d.pe,d.xe),l&&(r?Object.assign(D,r[d.dateStyle]):D.dateStyle=d.dateStyle),m&&(D.timeStyle=d.timeStyle),D}}var Qc={year:\"numeric\",month:\"numeric\",day:\"numeric\"},Xc={hour:\"numeric\",minute:\"numeric\",second:\"numeric\"},Ai=Object.assign({},Qc,Xc),Yl=Object.assign({},Ai,{timeZoneName:\"short\"}),Bl={year:\"numeric\",month:\"numeric\"},Wl={month:\"numeric\",day:\"numeric\"},Ui=[\"weekday\",\"year\",\"month\",\"day\",\"dateStyle\"],Wt=[\"dayPeriod\",\"hour\",\"minute\",\"second\",\"fractionalSecondDigits\",\"timeStyle\"],Li=Ui.concat(Wt),Al=[\"weekday\",\"day\"].concat(Wt),Ul=[\"weekday\",\"year\"].concat(Wt),eu=Mn(Li,[],[],Ai),nu=Mn(Li,[],[],Yl),tu=Mn(Li,[],[\"timeZoneName\"],Ai),ou=Mn(Ui,Wt,[\"timeZoneName\"],Qc),ru=Mn(Wt,Ui,[\"timeZoneName\",\"era\"],Xc),iu=Mn([\"year\",\"month\",\"dateStyle\"],Al,[\"timeZoneName\"],Bl,{full:{year:\"numeric\",month:\"long\"},long:{year:\"numeric\",month:\"long\"},medium:{year:\"numeric\",month:\"short\"},short:{year:\"2-digit\",month:\"numeric\"}}),au=Mn([\"month\",\"day\",\"dateStyle\"],Ul,[\"timeZoneName\",\"era\"],Wl,{full:{month:\"long\",day:\"numeric\"},long:{month:\"long\",day:\"numeric\"},medium:{month:\"short\",day:\"numeric\"},short:{month:\"numeric\",day:\"numeric\"}});function su(e,n){let{timeZone:t}=e,o=W(e),{offsetNanoseconds:r}=o,i=n||ce,a;return a=n?qn(t,E(o,i),r,2):He(t,E(o,i)),De(a,t,e.calendar)}function Wo(e){let n=Ao(),t=e.C(n);return It(n+BigInt(t))}function Ao(){return BigInt(Date.now())*Yn}function Vn(){return new Ne().resolvedOptions().timeZone}var qi=\"PlainYearMonth\",ji=\"PlainMonthDay\",$i=\"PlainDate\",Hi=\"PlainDateTime\",Gi=\"PlainTime\",zi=\"ZonedDateTime\",Vi=\"Instant\",_i=\"Duration\";function Ae(e,n,t,...o){Object.defineProperties(n,Ra(e)),Object.defineProperties(n.prototype,lt(\"Temporal.\"+e));for(let r of o)Ll(n.prototype,t,r);return n}function Ll(e,n,t){Object.defineProperties(e,Ve(o=>({get(){return o(n(this))},configurable:1}),t))}var Ue=Tr.name===\"noop\"?e=>{Object.defineProperty(e,\"_str_\",{value:e.toJSON()})}:Tr;function Le(){S(Ea)}function qe(){S(ka)}var uu={era(e){return Mt(e.calendar,e).era},eraYear(e){return Mt(e.calendar,e).eraYear},year(e){return P(e.calendar,e).year},month(e){return P(e.calendar,e).month},monthCode(e){return go(e.calendar,e)}},Uo={era(e){return Mt(e.calendar,e).era},eraYear(e){return Mt(e.calendar,e).eraYear},year(e){return P(e.calendar,e).year},month(e){return P(e.calendar,e).month},monthCode(e){return go(e.calendar,e)},day(e){return P(e.calendar,e).day}},du={monthCode(e){return go(e.calendar,e)},day(e){return P(e.calendar,e).day}},Ji={daysInMonth(e){return xr(e.calendar,e)},daysInYear(e){return Zr(e.calendar,e)},monthsInYear(e){return Er(e.calendar,e)},inLeapYear(e){return kr(e.calendar,e)}},At={dayOfWeek(e){return To(e)},dayOfYear(e){return cs(e.calendar,e)},weekOfYear(e){return us(e.calendar,e)},yearOfWeek(e){return ds(e.calendar,e)},daysInWeek(){return 7},daysInMonth(e){return xr(e.calendar,e)},daysInYear(e){return Zr(e.calendar,e)},monthsInYear(e){return Er(e.calendar,e)},inLeapYear(e){return kr(e.calendar,e)}};function cu(e){return lo(Object.keys(e))}cu(Ji),cu(At);function on(e){let n=$(e).toLowerCase();return n===Ir?se:n===Wa?Ua:void T(Za(e,\"temporal-polyfill/full\"))}function qt(e=Ir){return on(e)}var mu=new WeakMap,fu=Ae(zi,class{constructor(e,n,t=void 0){let o=ge(Do(e)),r=ne(ac(n)),i=qt(t);hu(this,De(o,r,i))}static from(e,n=void 0){return te(_n(e,n))}static compare(e,n){return ci(_n(e),_n(n))}get calendarId(){return ye(M(this).calendar)}get timeZoneId(){return M(this).timeZone.id}get epochMilliseconds(){return Pt(M(this))}get epochNanoseconds(){return Nt(M(this))}get offset(){return Ct(W(M(this)).offsetNanoseconds)}get offsetNanoseconds(){return W(M(this)).offsetNanoseconds}get hoursInDay(){return Ss(M(this))}with(e,n=void 0){return te(Fc(M(this),et(e),n))}withCalendar(e){return te({...M(this),calendar:jo(e)})}withTimeZone(e){return te({...M(this),timeZone:ne(fe(e))})}withPlainTime(e=void 0){return te(su(M(this),ea(e)))}add(e,n=void 0){let t=M(this);return te(Et(t,q(e),n))}subtract(e,n=void 0){let t=M(this);return te(Et(t,H(q(e)),n))}until(e,n=void 0){let t=M(this),o=_n(e),r=We(t.calendar,o.calendar);return Y(B(Kr(0,r,t,o,n)))}since(e,n=void 0){let t=M(this),o=_n(e),r=We(t.calendar,o.calendar);return Y(B(Kr(1,r,t,o,n)))}round(e){let n=M(this),[t,o,r]=St(e);return te(Ms(n,t,o,r))}startOfDay(){return te(Ps(M(this)))}equals(e){return $s(M(this),_n(e))}toInstant(){return je(Lc(M(this)))}toPlainDateTime(){return Oe(Yi(M(this)))}toPlainDate(){return ke(Bi(M(this)))}toPlainTime(){return tn(Wi(M(this)))}toLocaleString(e=void 0,n={}){let t=M(this),o=new Ne(e,Kc(nu(n),Es(t)));return zn(o,t),o.format(Pt(t))}toString(e=void 0){return vi(M(this),e)}toJSON(){return vi(M(this))}getTimeZoneTransition(e){let n=M(this),t=Os(n,e);return t?te({...n,epochNanoseconds:t}):null}valueOf(){return qe()}},ql,Uo,At,Tt);function te(e){return hu(Object.create(fu.prototype),e)}function M(e){return Ee(e)||Le()}function ql(e){let n=M(e);return{...W(n),calendar:n.calendar}}function Ee(e){return mu.get(e)}function _n(e,n){if(ee(e)){let t=Ee(e);if(t)return Zn(n),t;let o=jt(e);return uc(fe,o,e,n)}return gc(e,on,n)}function hu(e,n){return mu.set(e,n),Ue(e),e}function fe(e){if(ee(e)){let n=Ee(e);return n||S(pr(e)),n.timeZone.id}return(n=>Bo(Pc($(n))))(e)}var pu=new WeakMap,yu=Ae(Vi,class{constructor(e){let n=ge(Do(e));gu(this,ue(n))}static from(e){return je(Jn(e))}static fromEpochMilliseconds(e){return je(_c(e))}static fromEpochNanoseconds(e){return je(Jc(e))}static compare(e,n){return si(Jn(e),Jn(n))}get epochMilliseconds(){return Pt(le(this))}get epochNanoseconds(){return Nt(le(this))}add(e){let n=le(this);return je(ue(_r(n.epochNanoseconds,q(e))))}subtract(e){let n=le(this);return je(ue(_r(n.epochNanoseconds,H(q(e)))))}until(e,n=void 0){return Y(Jr(0,le(this),Jn(e),n))}since(e,n=void 0){return Y(Jr(1,le(this),Jn(e),n))}round(e){let n=le(this),[t,o,r]=St(e,5,1);return je(ue(No(n.epochNanoseconds,Ot(t,o),r)))}equals(e){return js(le(this),Jn(e))}toZonedDateTimeISO(e){return te(Uc(le(this),ne(fe(e))))}toLocaleString(e=void 0,n={}){let t=le(this);return new Ne(e,eu(n)).format(Pt(t))}toString(e=void 0){return bi(fe,le(this),e)}toJSON(){return bi(fe,le(this))}valueOf(){return qe()}});function je(e){return gu(Object.create(yu.prototype),e)}function le(e){return Qi(e)||Le()}function Qi(e){return pu.get(e)}function Jn(e){if(ee(e)){let n=Qi(e);if(n)return n;let t=Ee(e);if(t)return ue(t.epochNanoseconds)}return yc(e)}var{toTemporalInstant:Tu}={toTemporalInstant(){let e=Date.prototype.valueOf.call(this);return je(ue(BigInt(Yr(e))*Yn))}};function gu(e,n){return pu.set(e,n),Ue(e),e}var Du=new WeakMap,bu=Ae(ji,class{constructor(e,n,t=void 0,o){let r=U(e),i=U(n),a=qt(t),s=U(o??ts),c=X(Be({year:s,month:r,day:i}));vu(this,N(c,a))}static from(e,n=void 0){return Ki(lu(e,n))}get calendarId(){return ye(en(this).calendar)}with(e,n=void 0){return Ki(Bc(en(this),et(e),n))}equals(e){return Vs(en(this),lu(e))}toPlainDate(e){let n=en(this);return ke(Hc(n.calendar,this,e))}toLocaleString(e=void 0,n={}){let t=en(this),o=new Ne(e,Gn(au(n)));return zn(o,t,1),o.format(vt(t))}toString(e=void 0){return Si(en(this),e)}toJSON(){return Si(en(this))}valueOf(){return qe()}},en,du);function Ki(e){return vu(Object.create(bu.prototype),e)}function en(e){return Lo(e)||Le()}function Lo(e){return Du.get(e)}function lu(e,n){if(ee(e)){let o=Lo(e);if(o)return w(n),o;let r=Ru(e);return fc(r===void 0?se:r,r===void 0,e,n)}let t=Ic(e,on);return w(n),t}function vu(e,n){return Du.set(e,n),Ue(e),e}var Iu=new WeakMap,wu=Ae(qi,class{constructor(e,n,t=void 0,o){let r=U(e),i=U(n),a=qt(t),s=U(o??1),c=Io(Be({year:r,month:i,day:s}));Mu(this,N(c,a))}static from(e,n=void 0){return Lt(Kn(e,n))}static compare(e,n){return wn(Kn(e),Kn(n))}get calendarId(){return ye(me(this).calendar)}with(e,n=void 0){return Lt(Yc(me(this),et(e),n))}add(e,n=void 0){let t=me(this);return Lt(N(Vr(0,t.calendar,t,q(e),n),t.calendar))}subtract(e,n=void 0){let t=me(this);return Lt(N(Vr(1,t.calendar,t,q(e),n),t.calendar))}until(e,n=void 0){let t=me(this),o=Kn(e),r=We(t.calendar,o.calendar);return Y(ei(0,r,t,o,n))}since(e,n=void 0){let t=me(this),o=Kn(e),r=We(t.calendar,o.calendar);return Y(ei(1,r,t,o,n))}equals(e){return zs(me(this),Kn(e))}toPlainDate(e){let n=me(this);return ke($c(n.calendar,this,e))}toLocaleString(e=void 0,n={}){let t=me(this),o=new Ne(e,Gn(iu(n)));return zn(o,t,1),o.format(vt(t))}toString(e=void 0){return Mi(me(this),e)}toJSON(){return Mi(me(this))}valueOf(){return qe()}},me,uu,Ji);function Lt(e){return Mu(Object.create(wu.prototype),e)}function me(e){return qo(e)||Le()}function qo(e){return Iu.get(e)}function Kn(e,n){if(ee(e)){let o=qo(e);if(o)return w(n),o;let r=jt(e);return mc(r,e,n)}let t=vc(e,on);return w(n),t}function Mu(e,n){return Iu.set(e,n),Ue(e),e}function jl(e){if(!ee(e))return;let n=Qi(e);return n?[Vi,n]:(n=Ee(e),n?[zi,n]:(n=Sn(e),n?[Hi,n]:(n=nt(e),n?[$i,n]:(n=Xi(e),n?[Gi,n]:(n=qo(e),n?[qi,n]:(n=Lo(e),n?[ji,n]:(n=na(e),n?[_i,n]:void 0)))))))}function et(e){return(jl(e)||e.calendar!==void 0||e.timeZone!==void 0)&&S(Na),e}var Su=new WeakMap,Pu=Ae(Gi,class{constructor(e=0,n=0,t=0,o=0,r=0,i=0){let a=bt(Ve(U,{hour:e,minute:n,second:t,millisecond:o,microsecond:r,nanosecond:i}));Nu(this,vn(a))}static from(e,n=void 0){return tn(nn(e,n))}static compare(e,n){return Fo(nn(e),nn(n))}with(e,n=void 0){return tn(Wc(be(this),et(e),n))}add(e){let n=be(this);return tn(Oo(n,q(e))[0])}subtract(e){let n=be(this);return tn(Oo(n,H(q(e)))[0])}until(e,n=void 0){return Y(ni(0,be(this),nn(e),n))}since(e,n=void 0){return Y(ni(1,be(this),nn(e),n))}round(e){let n=be(this),[t,o,r]=St(e,5);return tn(Mo(n,Ln(t,o),r)[0])}equals(e){return _s(be(this),nn(e))}toLocaleString(e=void 0,n={}){let t=be(this);return new Ne(e,Gn(ru(n))).format(Pr(t))}toString(e=void 0){return Pi(be(this),e)}toJSON(){return Pi(be(this))}valueOf(){return qe()}},be,Tt);function tn(e){return Nu(Object.create(Pu.prototype),e)}function be(e){return Xi(e)||Le()}function Xi(e){return Su.get(e)}function nn(e,n){if(ee(e)){let o=Xi(e);if(o)return w(n),o;let r=Sn(e);if(r)return w(n),vn(r);let i=Ee(e);return i?(w(n),Wi(i)):hc(e,n)}let t=wc(e);return w(n),t}function ea(e){return e===void 0?void 0:nn(e)}function Nu(e,n){return Su.set(e,n),Ue(e),e}var Ou=new WeakMap,ku=Ae(Hi,class{constructor(e,n,t,o=0,r=0,i=0,a=0,s=0,c=0,u=void 0){let d=bn(wt(Ve(U,{year:e,month:n,day:t,hour:o,minute:r,second:i,millisecond:a,microsecond:s,nanosecond:c}))),l=qt(u);Eu(this,Pe(d,l))}static from(e,n=void 0){return Oe(Qn(e,n))}static compare(e,n){let t=Qn(e),o=Qn(n);return ui(t,o)}get calendarId(){return ye(L(this).calendar)}with(e,n=void 0){return Oe(Rc(L(this),et(e),n))}withCalendar(e){let n=L(this);return Oe(Pe(n,jo(e)))}withPlainTime(e=void 0){let n=L(this);return Oe(Rt(n,ea(e),n.calendar))}add(e,n=void 0){let t=L(this);return Oe(Pe(xt(t.calendar,t,q(e),n),t.calendar))}subtract(e,n=void 0){let t=L(this);return Oe(Pe(xt(t.calendar,t,H(q(e)),n),t.calendar))}until(e,n=void 0){let t=L(this),o=Qn(e),r=We(t.calendar,o.calendar);return Y(Qr(0,r,t,o,n))}since(e,n=void 0){let t=L(this),o=Qn(e),r=We(t.calendar,o.calendar);return Y(Qr(1,r,t,o,n))}round(e){let n=L(this),[t,o,r]=St(e);return Oe(Pe(wo(n,Ln(t,o),r),n.calendar))}equals(e){return Hs(L(this),Qn(e))}toZonedDateTime(e,n=void 0){return te(qc(L(this),ne(fe(e)),n))}toPlainDate(){let e=L(this);return ke(N(e,e.calendar))}toPlainTime(){return tn(vn(L(this)))}toLocaleString(e=void 0,n={}){let t=L(this),o=new Ne(e,Gn(tu(n)));return zn(o,t),o.format(es(t))}toString(e=void 0){return Ii(L(this),e)}toJSON(){return Ii(L(this))}valueOf(){return qe()}},L,Uo,At,Tt);function Oe(e){return Eu(Object.create(ku.prototype),e)}function L(e){return Sn(e)||Le()}function Sn(e){return Ou.get(e)}function Qn(e,n){if(ee(e)){let o=Sn(e);if(o)return w(n),o;let r=nt(e);if(r)return w(n),Pe(E(r,ce),r.calendar);let i=Ee(e);if(i)return w(n),Yi(i);let a=jt(e);return dc(a,e,n)}let t=Dc(e,on);return w(n),t}function Eu(e,n){return Ou.set(e,n),Ue(e),e}var xu=new WeakMap,Zu=Ae($i,class{constructor(e,n,t,o=void 0){let r=X(Be(Ve(U,{year:e,month:n,day:t}))),i=qt(o);Fu(this,N(r,i))}static from(e,n=void 0){return ke(Xn(e,n))}static compare(e,n){return wn(Xn(e),Xn(n))}get calendarId(){return ye(G(this).calendar)}with(e,n=void 0){let t=G(this);return ke(Cc(t,et(e),n))}withCalendar(e){let n=G(this);return ke(N(n,jo(e)))}add(e,n=void 0){let t=G(this);return ke(N(jn(t.calendar,t,q(e),n),t.calendar))}subtract(e,n=void 0){let t=G(this);return ke(N(jn(t.calendar,t,H(q(e)),n),t.calendar))}until(e,n=void 0){let t=G(this),o=Xn(e),r=We(t.calendar,o.calendar);return Y(Xr(0,r,t,o,n))}since(e,n=void 0){let t=G(this),o=Xn(e),r=We(t.calendar,o.calendar);return Y(Xr(1,r,t,o,n))}equals(e){return Gs(G(this),Xn(e))}toZonedDateTime(e){let n=ee(e)?{timeZone:e.timeZone,plainTime:e.plainTime}:{timeZone:e};return te(jc(fe,nn,G(this),n))}toPlainDateTime(e=void 0){let n=G(this);return Oe(Rt(n,ea(e),n.calendar))}toPlainYearMonth(){let e=G(this);return Lt(zc(e.calendar,this))}toPlainMonthDay(){let e=G(this);return Ki(Gc(e.calendar,this))}toLocaleString(e=void 0,n={}){let t=G(this),o=new Ne(e,Gn(ou(n)));return zn(o,t),o.format(vt(t))}toString(e=void 0){return wi(G(this),e)}toJSON(){return wi(G(this))}valueOf(){return qe()}},G,Uo,At);function ke(e){return Fu(Object.create(Zu.prototype),e)}function G(e){return nt(e)||Le()}function nt(e){return xu.get(e)}function Xn(e,n){if(ee(e)){let o=nt(e);if(o)return w(n),o;let r=Sn(e);if(r)return w(n),N(r,r.calendar);let i=Ee(e);if(i)return w(n),Bi(i);let a=jt(e);return lc(a,e,n)}let t=bc(e,on);return w(n),t}function Fu(e,n){return xu.set(e,n),Ue(e),e}function jt(e){let n=Ru(e);return n===void 0?se:n}function Ru(e){let{calendar:n}=e;if(n!==void 0)return jo(n)}function jo(e){if(ee(e)){let n=nt(e)||Sn(e)||Ee(e)||Lo(e)||qo(e);return n||S(xa(e)),n.calendar}return(n=>on(Sc($(n))))(e)}var Cu=new WeakMap,Yu=Ae(_i,class{constructor(e=0,n=0,t=0,o=0,r=0,i=0,a=0,s=0,c=0,u=0){let d=Qe(Ve(bo,{years:e,months:n,weeks:t,days:o,hours:r,minutes:i,seconds:a,milliseconds:s,microseconds:c,nanoseconds:u}));Bu(this,B(d))}static from(e){return Y(q(e))}static compare(e,n,t=void 0){return qs(Ut,q(e),q(n),t)}get sign(){return re(this).sign}get blank(){return!re(this).sign}with(e){return Y(Ac(re(this),e))}negated(){return Y(ai(re(this)))}abs(){return Y(Ws(re(this)))}add(e,n=void 0){return Y(ii(Ut,0,re(this),q(e),n))}subtract(e,n=void 0){return Y(ii(Ut,1,re(this),q(e),n))}round(e){return Y(Bs(Ut,re(this),e))}total(e){return Is(Ut,re(this),e)}toLocaleString(e=void 0,n){let t=re(this);return Intl.DurationFormat?new Intl.DurationFormat(e,n).format(t):Yo(t,n)}toString(e=void 0){return Yo(re(this),e)}toJSON(){return Yo(re(this))}valueOf(){return qe()}},re,Fr);function Y(e){return Bu(Object.create(Yu.prototype),e)}function re(e){return na(e)||Le()}function na(e){return Cu.get(e)}function q(e){return ee(e)?na(e)||pc(e):Mc(e)}function Ut(e){if(e!==void 0){if(ee(e)){let n=Ee(e);if(n)return n;let t=nt(e);if(t)return t;let o=Sn(e);if(o)return N(o,o.calendar);let r=jt(e);return cc(fe,r,e)}return Tc(e,on)}}function Bu(e,n){return Cu.set(e,n),Ue(e),e}var $l=Object.defineProperties({},{...lt(\"Temporal.Now\"),...uo({timeZoneId(){return Vn()},instant(){return je(ue(Ao()))},zonedDateTimeISO(e=Vn()){let n=ne(fe(e));return te(De(Ao(),n))},plainDateTimeISO(e=Vn()){let n=Wo(ne(fe(e)));return Oe(Pe(n))},plainDateISO(e=Vn()){let n=Wo(ne(fe(e)));return ke(N(n))},plainTimeISO(e=Vn()){let n=Wo(ne(fe(e)));return tn(vn(n))}})}),Wu=Object.defineProperties({},{...lt(\"Temporal\"),...uo({PlainYearMonth:wu,PlainMonthDay:bu,PlainDate:Zu,PlainTime:Pu,PlainDateTime:ku,ZonedDateTime:fu,Instant:yu,Duration:Yu,Now:$l})});var Au=Vo||Wu;var of=Vo?Date.prototype.toTemporalInstant:Tu;var Uu;function Lu(e){Uu=e}function he(){let e=Uu??globalThis.Temporal;if(!e)throw new ReferenceError('temporals: no Temporal implementation found. Use a runtime with native Temporal (Node 22+), import \"temporal-polyfill/global\", or call configureTemporal(Temporal).');return e}function z(e){let n=e?.constructor?.name;switch(n){case\"PlainDate\":return\"date\";case\"PlainDateTime\":return\"datetime\";case\"ZonedDateTime\":return\"zoneddatetime\";case\"PlainYearMonth\":return\"yearmonth\";case\"PlainTime\":return\"time\";case\"Instant\":return\"instant\";default:throw new TypeError(`temporals: expected a Temporal point (PlainDate, PlainDateTime, ZonedDateTime, PlainYearMonth, PlainTime, Instant), got ${n??typeof e}`)}}function ta(e){return e===\"date\"||e===\"datetime\"||e===\"zoneddatetime\"}function Hl(e){return e===\"date\"||e===\"datetime\"||e===\"zoneddatetime\"||e===\"yearmonth\"}function g(e,n){return e.constructor.compare(e,n)}function $t(e,n,t){let o=e;return t&&Hl(z(e))?o.add(n,{overflow:t}):o.add(n)}var Gl=[\"years\",\"months\",\"weeks\",\"days\",\"hours\",\"minutes\",\"seconds\",\"milliseconds\",\"microseconds\",\"nanoseconds\"];function qu(e,n){if(n===1)return e;let t=e,o={},r=!1;for(let i of Gl){let a=t[i];a&&(o[i]=a*n,r=!0)}return r?o:e}function ju(e,n,t){return e.until(n,t)}function Ht(e){return e.toString()}function $u(e,n,t){let o=e.toZonedDateTime(n,{disambiguation:\"compatible\"});if(!o.toPlainDateTime().equals(e))return(t.dstGap??\"fire\")===\"skip\"?null:o;let r=e.toZonedDateTime(n,{disambiguation:\"earlier\"}),i=e.toZonedDateTime(n,{disambiguation:\"later\"});return r.equals(i)?o:(t.dstOverlap??\"first\")===\"second\"?i:r}var zl=[\"MO\",\"TU\",\"WE\",\"TH\",\"FR\",\"SA\",\"SU\"];function rn(e){let n=zl.indexOf(e);if(n<0)throw new RangeError(`temporals: invalid weekday \"${e}\"`);return n+1}function Hu(e){let n=z(e);if(n===\"date\")return e;if(n===\"datetime\"||n===\"zoneddatetime\")return e.toPlainDate();throw new TypeError(\"temporals: recurrence requires a date-bearing point (PlainDate, PlainDateTime, or ZonedDateTime)\")}function Gu(e,n){let t=z(e);if(t===\"date\")return n;if(t===\"datetime\"){let o=e.toPlainTime();return n.toPlainDateTime(o)}if(t===\"zoneddatetime\"){let o=e;return n.toZonedDateTime({timeZone:o.timeZoneId,plainTime:o.toPlainTime()})}throw new TypeError(\"temporals: cannot rebuild a non-date-bearing point onto a date\")}function $o(e,n,t){return e.with({year:n,month:t,day:1},{overflow:\"constrain\"}).daysInMonth}function oa(e,n,t,o){let r=e.with({year:n,month:t,day:1},{overflow:\"constrain\"}).dayOfWeek;return 1+(o-r+7)%7}var tt=class e{#e;constructor(n){this.#e=()=>{let t=n(),o=t;return typeof o[Symbol.iterator]==\"function\"?o[Symbol.iterator]():t}}[Symbol.iterator](){return this.#e()}static from(n){return typeof n==\"function\"?new e(n):new e(()=>n[Symbol.iterator]())}static of(...n){return new e(()=>n[Symbol.iterator]())}static empty(){return new e(function*(){})}map(n){let t=this;return new e(function*(){let o=0;for(let r of t)yield n(r,o++)})}filter(n){let t=this;return new e(function*(){let o=0;for(let r of t)n(r,o++)&&(yield r)})}flatMap(n){let t=this;return new e(function*(){let o=0;for(let r of t)yield*n(r,o++)})}take(n){let t=this;return new e(function*(){if(n<=0)return;let o=0;for(let r of t)if(yield r,++o>=n)return})}drop(n){let t=this;return new e(function*(){let o=0;for(let r of t)o++<n||(yield r)})}takeWhile(n){let t=this;return new e(function*(){let o=0;for(let r of t){if(!n(r,o++))return;yield r}})}dropWhile(n){let t=this;return new e(function*(){let o=0,r=!0;for(let i of t)r&&n(i,o++)||(r=!1,yield i)})}tap(n){let t=this;return new e(function*(){let o=0;for(let r of t)n(r,o++),yield r})}concat(...n){let t=this;return new e(function*(){yield*t;for(let o of n)yield*o})}pairwise(){let n=this;return new e(function*(){let t,o=!1;for(let r of n)o&&(yield[t,r]),t=r,o=!0})}toArray(){return[...this]}forEach(n){let t=0;for(let o of this)n(o,t++)}reduce(n,t){let o=t,r=0;for(let i of this)o=n(o,i,r++);return o}find(n){let t=0;for(let o of this)if(n(o,t++))return o}some(n){let t=0;for(let o of this)if(n(o,t++))return!0;return!1}every(n){let t=0;for(let o of this)if(!n(o,t++))return!1;return!0}first(){for(let n of this)return n}at(n){if(n<0)return;let t=0;for(let o of this)if(t++===n)return o}count(){let n=0;for(let t of this)n++;return n}};function Ho(e){let{start:n,end:t,count:o,step:r,inclusive:i=!1,overflow:a}=e;if(o!==void 0&&(o<0||!Number.isInteger(o)))throw new RangeError(\"temporals: range() count must be a non-negative integer\");return new tt(function*(){if(o===0)return;let s=$t(n,r,a),c=g(s,n);if(c===0&&o===void 0)throw new RangeError(\"temporals: range() step is zero with no count bound (would be infinite)\");let u=l=>{if(t===void 0)return!0;let m=g(l,t);return c>0?i?m<=0:m<0:c<0?i?m>=0:m>0:!0},d=0;for(;;){let l=d===0?n:$t(n,qu(r,d),a);if(!u(l)||(yield l,d++,o!==void 0&&d>=o))return}})}var xe=class e{start;end;constructor(n,t){if(z(n)!==z(t))throw new TypeError(\"temporals: Interval start and end must be the same Temporal type\");this.start=n,this.end=t}get isEmpty(){return g(this.start,this.end)>=0}contains(n){return g(this.start,n)<=0&&g(n,this.end)<0}overlaps(n){return g(this.start,n.end)<0&&g(n.start,this.end)<0}encloses(n){return g(this.start,n.start)<=0&&g(n.end,this.end)<=0}abuts(n){return g(this.end,n.start)===0||g(n.end,this.start)===0}relation(n){let t=this.start,o=this.end,r=n.start,i=n.end;if(g(o,r)<0)return\"before\";if(g(o,r)===0)return\"meets\";if(g(i,t)<0)return\"after\";if(g(i,t)===0)return\"metBy\";let a=g(t,r),s=g(o,i);return a===0&&s===0?\"equals\":a===0?s<0?\"starts\":\"startedBy\":s===0?a>0?\"finishes\":\"finishedBy\":a<0&&s>0?\"contains\":a>0&&s<0?\"during\":a<0?\"overlaps\":\"overlappedBy\"}intersection(n){let t=g(this.start,n.start)>=0?this.start:n.start,o=g(this.end,n.end)<=0?this.end:n.end;return g(t,o)>=0?null:new e(t,o)}toDuration(n){return ju(this.start,this.end,n)}points(n){return Ho({start:this.start,end:this.end,step:n})}toString(){return`${this.start.toString()}/${this.end.toString()}`}toJSON(){return this.toString()}static from(n){let t=0,o=-1;for(let c=0;c<n.length;c++){let u=n[c];if(u===\"[\")t++;else if(u===\"]\")t--;else if(u===\"/\"&&t===0){o=c;break}}if(o<0)throw new RangeError(`temporals: invalid ISO interval \"${n}\" (expected \"start/end\")`);let r=n.slice(0,o),i=n.slice(o+1),a=he(),s=c=>c.includes(\"[\")?a.ZonedDateTime.from(c):c.includes(\"T\")?a.PlainDateTime.from(c):a.PlainDate.from(c);return new e(s(r),s(i))}};var Gt=class e{intervals;constructor(n){this.intervals=n}static from(n){let t=[...n].filter(r=>!r.isEmpty);t.sort((r,i)=>g(r.start,i.start)||g(r.end,i.end));let o=[];for(let r of t){let i=o[o.length-1];i&&g(r.start,i.end)<=0?g(r.end,i.end)>0&&(o[o.length-1]=new xe(i.start,r.end)):o.push(r)}return new e(o)}static empty(){return new e([])}get isEmpty(){return this.intervals.length===0}[Symbol.iterator](){return this.intervals[Symbol.iterator]()}contains(n){return this.intervals.some(t=>t.contains(n))}union(n){let t=n instanceof e?n.intervals:[...n];return e.from([...this.intervals,...t])}intersection(n){let t=[];for(let o of this.intervals)for(let r of n.intervals){if(g(r.start,o.end)>=0)break;let i=o.intersection(r);i&&t.push(i)}return e.from(t)}difference(n){let t=[];for(let o of this.intervals){let r=[o];for(let i of n.intervals){if(g(i.end,o.start)<=0||g(i.start,o.end)>=0)continue;let a=[];for(let s of r){if(!s.overlaps(i)){a.push(s);continue}g(s.start,i.start)<0&&a.push(new xe(s.start,i.start)),g(i.end,s.end)<0&&a.push(new xe(i.end,s.end))}r=a}t.push(...r)}return e.from(t)}gaps(n){if(n)return e.from([n]).difference(this);let t=[];for(let o=1;o<this.intervals.length;o++){let r=this.intervals[o-1],i=this.intervals[o];g(r.end,i.start)<0&&t.push(new xe(r.end,i.start))}return new e(t)}totalDuration(){let n=he();if(this.intervals.length===0)return n.Duration.from({seconds:0});let t=z(this.intervals[0].start),o=t===\"date\"||t===\"yearmonth\"?\"day\":\"hour\",r=n.Duration.from({seconds:0});for(let i of this.intervals)r=r.add(i.toDuration({largestUnit:o}));return r}toString(){return this.intervals.map(n=>n.toString()).join(\", \")}};function Go(){return he().PlainDate}function ra(e,n){if(!n)return e;let t=n===\"uk\"?\"uk\":\"us\";return e.dayOfWeek===6?t===\"uk\"?e.add({days:2}):e.subtract({days:1}):e.dayOfWeek===7?e.add({days:1}):e}function sn(e,n,t={}){return o=>{let r=Go().from({year:o,month:e,day:n},{overflow:\"reject\"});return ra(r,t.observed??!1)}}function Jt(e=0,n={}){return t=>{let o=t%19,r=Math.floor(t/100),i=t%100,a=Math.floor(r/4),s=r%4,c=Math.floor((r+8)/25),u=Math.floor((r-c+1)/3),d=(19*o+r-a-u+15)%30,l=Math.floor(i/4),m=i%4,f=(32+2*s+2*l-d-m)%7,p=Math.floor((o+11*d+22*f)/451),h=Math.floor((d+f-7*p+114)/31),y=(d+f-7*p+114)%31+1,b=Go().from({year:t,month:h,day:y}).add({days:e});return ra(b,n.observed??!1)}}function an(e,n,t,o={}){let r=rn(n);return i=>{let a=Go().from({year:i,month:e,day:1}),s=a.daysInMonth,c=1+(r-a.dayOfWeek+7)%7,u;if(t>0){if(u=c+(t-1)*7,u>s)return null}else if(u=c+Math.floor((s-c)/7)*7+(t+1)*7,u<1)return null;return ra(a.with({day:u}),o.observed??!1)}}var zt=class e{rules;cache=new Map;constructor(n){this.rules=n}static of(...n){return new e(n)}yearSet(n){let t=this.cache.get(n);return t||(t=new Set(this.rules.map(o=>o(n)).filter(o=>o!==null).map(o=>o.toString())),this.cache.set(n,t)),t}has(n){let t=n.toString();return this.yearSet(n.year).has(t)||this.yearSet(n.year-1).has(t)||this.yearSet(n.year+1).has(t)}inYear(n){return[...this.yearSet(n)].map(t=>Go().from(t)).sort((t,o)=>g(t,o))}};function Vu(){return zt.of(sn(1,1,{observed:!0}),an(1,\"MO\",3),an(2,\"MO\",3),an(5,\"MO\",-1),sn(6,19,{observed:!0}),sn(7,4,{observed:!0}),an(9,\"MO\",1),an(10,\"MO\",2),sn(11,11,{observed:!0}),an(11,\"TH\",4),sn(12,25,{observed:!0}))}var zu=4e3,Vt=class{weekend;holidays;constructor(n={}){let t=n.weekend??[\"SA\",\"SU\"];this.weekend=new Set(t.map(rn)),this.holidays=n.holidays}toDate(n){let t=n;return t.toPlainDate?t.toPlainDate():n}isBusinessDay(n){let t=this.toDate(n);return this.weekend.has(t.dayOfWeek)?!1:!this.holidays?.has(t)}nextBusinessDay(n){let t=n.add({days:1});for(let o=0;o<zu;o++,t=t.add({days:1}))if(this.isBusinessDay(t))return t;throw new RangeError(\"temporals: no business day found (check weekend/holiday config)\")}previousBusinessDay(n){let t=n.subtract({days:1});for(let o=0;o<zu;o++,t=t.subtract({days:1}))if(this.isBusinessDay(t))return t;throw new RangeError(\"temporals: no business day found (check weekend/holiday config)\")}addBusinessDays(n,t){let o=n,r=t>=0?1:-1;for(let i=Math.abs(t);i>0;i--)o=r>0?this.nextBusinessDay(o):this.previousBusinessDay(o);return o}businessDaysBetween(n,t){let o=0;for(let r=n;g(r,t)<0;r=r.add({days:1}))this.isBusinessDay(r)&&o++;return o}businessDays(n){return Ho({start:n.start,end:n.end,step:{days:1}}).filter(t=>this.isBusinessDay(t))}nthBusinessDay(n,t,o){let r=he().PlainDate.from({year:n,month:t,day:1}),i=[];for(let s=1;s<=r.daysInMonth;s++){let c=r.with({day:s});this.isBusinessDay(c)&&i.push(c)}let a=o>0?o-1:i.length+o;return i[a]??null}},_t=class{windows;calendar;dst;constructor(n={}){this.dst=n.dst??\"compatible\",this.windows=(n.windows??[[\"09:00\",\"17:00\"]]).slice().sort((t,o)=>t[0].localeCompare(o[0])),this.calendar=n.calendar}dayWindows(n,t){if(this.calendar&&!this.calendar.isBusinessDay(n))return[];let o=he();return this.windows.map(([r,i])=>{let a=o.PlainTime.from(r),s=o.PlainTime.from(i),c=o.PlainTime.compare(s,a)<=0,u=this.dst,d=n.toPlainDateTime(a).toZonedDateTime(t,{disambiguation:u}),l=(c?n.add({days:1}):n).toPlainDateTime(s).toZonedDateTime(t,{disambiguation:u});return new xe(d,l)})}intervalsBetween(n,t){let o=n.timeZoneId,r=t.toPlainDate(),i=[];for(let a=n.toPlainDate().subtract({days:1});g(a,r)<=0;a=a.add({days:1}))i.push(...this.dayWindows(a,o));return Gt.from(i).intersection(Gt.from([new xe(n,t)]))}isOpen(n){let t=n.timeZoneId,o=n.toPlainDate();return[...this.dayWindows(o.subtract({days:1}),t),...this.dayWindows(o,t)].some(i=>i.contains(n))}nextOpen(n){return this.intervalsBetween(n,n.add({days:366})).intervals[0]?.start}};function _u(e,n,t){return t.intervalsBetween(e,n).totalDuration()}var Vl=[[\"years\",\"year\",\"y\"],[\"months\",\"month\",\"mo\"],[\"weeks\",\"week\",\"w\"],[\"days\",\"day\",\"d\"],[\"hours\",\"hour\",\"h\"],[\"minutes\",\"minute\",\"m\"],[\"seconds\",\"second\",\"s\"],[\"milliseconds\",\"millisecond\",\"ms\"],[\"microseconds\",\"microsecond\",\"\\xB5s\"],[\"nanoseconds\",\"nanosecond\",\"ns\"]],_l={second:7,millisecond:8,microsecond:9,nanosecond:10};function ia(e,n={}){let{short:t=!1,max:o=1/0,locale:r,precision:i=\"second\"}=n,a=Vl.slice(0,_l[i]),s=e,c=Intl.DurationFormat;if(r&&c){let d={},l=0;for(let[m]of a){let f=s[m]??0;if(f!==0&&(d[m]=f,++l>=o))break}return new c(r,{style:t?\"narrow\":\"long\"}).format(d)}let u=[];for(let[d,l,m]of a){let f=s[d]??0;if(f!==0&&(u.push(t?`${f}${m}`:`${f} ${l}${Math.abs(f)===1?\"\":\"s\"}`),u.length>=o))break}return u.length===0?t?\"0s\":\"0 seconds\":u.join(t?\" \":\", \")}var Jl=[[\"years\",\"year\"],[\"months\",\"month\"],[\"weeks\",\"week\"],[\"days\",\"day\"],[\"hours\",\"hour\"],[\"minutes\",\"minute\"],[\"seconds\",\"second\"]];function Ju(e,n,t={}){let o=z(e),r=o===\"time\"||o===\"instant\"?\"hour\":\"year\",i=e.until(n,{largestUnit:r}),a=new Intl.RelativeTimeFormat(t.locale,{numeric:t.numeric??\"auto\"}),s=i;for(let[c,u]of Jl){let d=s[c]??0;if(d!==0&&c===\"days\"&&(o===\"zoneddatetime\"||o===\"datetime\")&&(d=Kl(e,n)),d!==0)return a.format(d,u)}return a.format(0,\"second\")}function Kl(e,n){return(z(e)===\"zoneddatetime\"?e.withTimeZone(n.timeZoneId):e).toPlainDate().until(n.toPlainDate(),{largestUnit:\"day\"}).days}var Ql={y:\"years\",mo:\"months\",w:\"weeks\",d:\"days\",h:\"hours\",m:\"minutes\",s:\"seconds\",ms:\"milliseconds\"};function aa(e){let n={},t=/(-?\\d+(?:\\.\\d+)?)\\s*(mo|ms|[ywdhms])/gi,o,r=!1;for(;(o=t.exec(e))!==null;){r=!0;let i=Ql[o[2].toLowerCase()];if(!i)throw new RangeError(`temporals: unknown duration unit \"${o[2]}\"`);n[i]=(n[i]??0)+Number(o[1])}if(!r)throw new RangeError(`temporals: could not parse duration \"${e}\"`);return he().Duration.from(n)}var Ku=1e4;function Xu(e){return typeof e==\"string\"?{wd:rn(e)}:{wd:rn(e.weekday),nth:e.nth}}function Xl(e,n){let t=[];for(let o=e;o<=n;o++)t.push(o);return t}function ca(e,n){let t=e>0?e:n+e+1;return t>=1&&t<=n?t:null}function em(e,n,t,o,r){let i=$o(e,n,t),a=oa(e,n,t,o);if(r>0){let u=a+(r-1)*7;return u<=i?u:null}let c=a+Math.floor((i-a)/7)*7+(r+1)*7;return c>=1?c:null}function nm(e,n,t,o){let r=$o(e,n,t),i=[];for(let a=oa(e,n,t,o);a<=r;a+=7)i.push(a);return i}function tm(e,n){return e.with({year:n,month:1,day:1},{overflow:\"constrain\"}).daysInYear}function om(e,n,t){let o=tm(e,n),r=t>0?t:o+t+1;return r<1||r>o?null:e.with({year:n,month:1,day:1},{overflow:\"constrain\"}).add({days:r-1})}function rm(e,n){return e.with({year:n,month:12,day:28},{overflow:\"constrain\"}).weekOfYear??52}function Qu(e,n,t,o,r,i){let a=$o(e,n,t),s=o&&o.length>0,c=r&&r.length>0,u;if(s){u=[];for(let m of o){let f=ca(m,a);f!==null&&u.push(f)}}let d;if(c){let m=new Set;for(let{wd:f,nth:p}of r)if(p!==void 0){let h=em(e,n,t,f,p);h!==null&&m.add(h)}else for(let h of nm(e,n,t,f))m.add(h);d=[...m]}let l;if(u&&d){let m=new Set(d);l=u.filter(f=>m.has(f))}else u?l=u:d?l=d:i!==void 0?l=i<=a?[i]:[]:l=[];return[...new Set(l)].sort((m,f)=>m-f)}function im(e,n,t,o){let{byMonth:r,byMonthDay:i}=e,a=s=>!r||r.includes(s);switch(e.freq){case\"daily\":{let s=o.date;if(!a(s.month))return[];if(i&&i.length>0&&!i.some(u=>ca(u,s.daysInMonth)===s.day))return[];if(e.byYearDay&&e.byYearDay.length>0){let c=s.daysInYear;if(!e.byYearDay.some(d=>(d>0?d:c+d+1)===s.dayOfYear))return[]}return t&&t.length>0&&!t.some(c=>c.wd===s.dayOfWeek)?[]:[s]}case\"weekly\":{let s=rn(e.weekStart??\"MO\"),c=t&&t.length>0?t.map(m=>m.wd):[n.dayOfWeek],u=new Set(c),d=[],l=o.weekStartDate;for(let m=0;m<7;m++)u.has(l.dayOfWeek)&&a(l.month)&&d.push(l),l=l.add({days:1});return d}case\"monthly\":{let s=o.anchor,c=s.month;return a(c)?Qu(s,s.year,c,i,t,n.day).map(d=>s.with({day:d})):[]}case\"yearly\":{let s=o.anchor,c=s.year,u=i&&i.length>0,d=t&&t.length>0,l=e.byYearDay&&e.byYearDay.length>0;if(e.byWeekNo&&e.byWeekNo.length>0){let y=new Set(e.byWeekNo.map(F=>F>0?F:rm(n,c)+F+1)),b=new Set(d?t.map(F=>F.wd):[n.dayOfWeek]),v=[],D=n.with({year:c,month:1,day:1},{overflow:\"constrain\"}).subtract({days:7}),I=n.with({year:c,month:12,day:31},{overflow:\"constrain\"}).add({days:7});for(;g(D,I)<=0;D=D.add({days:1}))D.yearOfWeek===c&&y.has(D.weekOfYear??-1)&&b.has(D.dayOfWeek)&&a(D.month)&&v.push(D);return v}if(l&&!u){let y=d?new Set(t.map(D=>D.wd)):null,b=[];for(let D of e.byYearDay){let I=om(n,c,D);I&&a(I.month)&&(y&&!y.has(I.dayOfWeek)||b.push(I))}let v=new Set;return b.filter(D=>{let I=Ht(D);return v.has(I)?!1:(v.add(I),!0)}).sort((D,I)=>g(D,I))}let f=s.monthsInYear,p=r??(u||d?Xl(1,f):[n.month]),h=[];for(let y of p){if(y<1||y>f)continue;let b=s.with({month:y,day:1},{overflow:\"constrain\"}),v=Qu(b,c,y,i,t,n.day);for(let D of v)h.push(b.with({day:D}))}return h}default:throw new RangeError(`temporals: recurrence freq \"${e.freq}\" is not supported (yearly/monthly/weekly/daily only)`)}}function am(e,n){let t=(e.dayOfWeek-n+7)%7;return e.subtract({days:t})}function sm(e,n){switch(e.freq){case\"daily\":return{date:n};case\"weekly\":return{weekStartDate:am(n,rn(e.weekStart??\"MO\"))};case\"monthly\":return{anchor:n.with({day:1})};case\"yearly\":return{anchor:n.with({month:1,day:1},{overflow:\"constrain\"})};default:throw new RangeError(`temporals: unsupported freq \"${e.freq}\"`)}}function cm(e,n){let t=e.interval??1;switch(e.freq){case\"daily\":return{date:n.date.add({days:t})};case\"weekly\":return{weekStartDate:n.weekStartDate.add({weeks:t})};case\"monthly\":return{anchor:n.anchor.add({months:t})};case\"yearly\":return{anchor:n.anchor.add({years:t})};default:throw new RangeError(`temporals: unsupported freq \"${e.freq}\"`)}}function um(e,n,t){let o=z(e);if(o===\"zoneddatetime\"){let l=e,m=l.timeZoneId,f=l.toPlainTime(),p=t.byHour&&t.byHour.length?t.byHour:[f.hour],h=t.byMinute&&t.byMinute.length?t.byMinute:[f.minute],y=t.bySecond&&t.bySecond.length?t.bySecond:[f.second],b={dstGap:t.dstGap,dstOverlap:t.dstOverlap},v=[];for(let D of p)for(let I of h)for(let F of y){let j=n.toPlainDateTime(f.with({hour:D,minute:I,second:F})),K=$u(j,m,b);K&&v.push(K)}return v}let r=Gu(e,n);if(!(t.byHour&&t.byHour.length||t.byMinute&&t.byMinute.length||t.bySecond&&t.bySecond.length)||o===\"date\")return[r];let a=r,s=t.byHour&&t.byHour.length?t.byHour:[a.hour],c=t.byMinute&&t.byMinute.length?t.byMinute:[a.minute],u=t.bySecond&&t.bySecond.length?t.bySecond:[a.second],d=[];for(let l of s)for(let m of c)for(let f of u)d.push(a.with({hour:l,minute:m,second:f}));return d}function dm(e,n){if(!n||n.length===0)return e;let t=[];for(let o of n){let r=o>0?o-1:e.length+o;r>=0&&r<e.length&&t.push(e[r])}return t}var sa=new Set([\"hourly\",\"minutely\",\"secondly\"]);function lm(e){return e===\"datetime\"||e===\"zoneddatetime\"||e===\"time\"}function mm(e){let n=z(e.start);if(sa.has(e.freq)){if(!lm(n))throw new TypeError(\"temporals: sub-daily recurrence requires a time-bearing start (PlainDateTime, ZonedDateTime, or PlainTime)\")}else if(!ta(n))throw new TypeError(\"temporals: recur() requires a date-bearing start (PlainDate, PlainDateTime, or ZonedDateTime)\");if(e.byWeekNo&&e.freq!==\"yearly\")throw new RangeError(\"temporals: BYWEEKNO is only valid with FREQ=YEARLY\");if(e.bySetPos&&sa.has(e.freq))throw new RangeError(\"temporals: BYSETPOS with sub-daily frequencies is not supported\");if(e.interval!==void 0&&(!Number.isInteger(e.interval)||e.interval<1))throw new RangeError(\"temporals: recur() interval must be a positive integer\")}var fm=1e6;function hm(e,n,t){let o=z(e),r=e;if(ta(o)){if(n.byMonth&&!n.byMonth.includes(r.month)||n.byMonthDay&&!n.byMonthDay.some(i=>ca(i,r.daysInMonth)===r.day))return!1;if(n.byYearDay){let i=r.daysInYear;if(!n.byYearDay.some(a=>(a>0?a:i+a+1)===r.dayOfYear))return!1}if(t&&t.length>0&&!t.some(i=>i.wd===r.dayOfWeek))return!1}return!(n.byHour&&!n.byHour.includes(r.hour)||n.byMinute&&!n.byMinute.includes(r.minute)||n.bySecond&&!n.bySecond.includes(r.second))}function*pm(e){let n=e.start,t=e.interval??1,o=e.freq===\"hourly\"?{hours:t}:e.freq===\"minutely\"?{minutes:t}:{seconds:t},r=e.byWeekday?.map(Xu),i=n,a=0;for(;;){if(e.until!==void 0&&g(i,e.until)>0)return;if(hm(i,e,r))yield i,a=0;else if(++a>fm)throw new RangeError(\"temporals: sub-daily recurrence matched nothing for a very long span (likely an impossible rule)\");i=$t(i,o)}}function*ym(e){let n=e.start,t=Hu(n),o=e.byWeekday?.map(Xu),r=sm(e,t),i=0;for(;;){let a=im(e,t,o,r),s=[];for(let d of a)s.push(...um(n,d,e));s.sort((d,l)=>g(d,l));let c=new Set;s=s.filter(d=>{let l=Ht(d);return c.has(l)?!1:(c.add(l),!0)}),s=dm(s,e.bySetPos).sort((d,l)=>g(d,l));let u=!1;for(let d of s)g(d,n)<0||(yield d,u=!0);if(u)i=0;else if(++i>Ku)throw new RangeError(`temporals: recurrence produced no occurrences for ${Ku} consecutive periods (likely an impossible rule)`);r=cm(e,r)}}function*Tm(e,n){let t=n.start,o=new Set((n.exclude??[]).map(l=>Ht(l))),r=(n.include??[]).filter(l=>g(l,t)>=0).sort((l,m)=>g(l,m)),{until:i,count:a}=n,s=0,c=0,u,d=e.next();for(;;){let l=!d.done,m=s<r.length;if(!l&&!m)return;let f,p;if(l&&(!m||g(d.value,r[s])<=0)?(f=d.value,p=!0):(f=r[s],p=!1),i!==void 0&&g(f,i)>0)return;p?d=e.next():s++;let h=Ht(f);if(!(o.has(h)||h===u)&&(u=h,yield f,a!==void 0&&++c>=a))return}}function ed(e){mm(e);let n=sa.has(e.freq)?()=>pm(e):()=>ym(e);return new tt(()=>Tm(n(),e))}var gm={YEARLY:\"yearly\",MONTHLY:\"monthly\",WEEKLY:\"weekly\",DAILY:\"daily\",HOURLY:\"hourly\",MINUTELY:\"minutely\",SECONDLY:\"secondly\"};function Dm(e){let n=/^([+-]?\\d+)?(MO|TU|WE|TH|FR|SA|SU)$/.exec(e.trim());if(!n)throw new RangeError(`temporals: invalid BYDAY token \"${e}\"`);let t=n[2];return n[1]?{weekday:t,nth:Number(n[1])}:t}function cn(e){return e.split(\",\").map(n=>Number(n.trim()))}function bm(e,n){let t=e.replace(/^RRULE:/i,\"\"),o={start:n,freq:\"daily\"},r=!1;for(let i of t.split(\";\")){if(!i)continue;let a=i.indexOf(\"=\"),s=(a===-1?i:i.slice(0,a)).trim().toUpperCase(),c=a===-1?\"\":i.slice(a+1).trim();switch(s){case\"FREQ\":{let u=gm[c.toUpperCase()];if(!u)throw new RangeError(`temporals: unsupported FREQ \"${c}\"`);o.freq=u,r=!0;break}case\"INTERVAL\":o.interval=Number(c);break;case\"COUNT\":o.count=Number(c);break;case\"UNTIL\":{if(n==null)throw new RangeError(\"temporals: RRULE has UNTIL but no DTSTART was provided\");if(z(n)===\"zoneddatetime\"){let u=n,d=u.toInstant().constructor;o.until=d.from(c).toZonedDateTimeISO(u.timeZoneId)}else{let u=n.constructor;o.until=u.from(c)}break}case\"BYMONTH\":o.byMonth=cn(c);break;case\"BYWEEKNO\":o.byWeekNo=cn(c);break;case\"BYYEARDAY\":o.byYearDay=cn(c);break;case\"BYMONTHDAY\":o.byMonthDay=cn(c);break;case\"BYDAY\":o.byWeekday=c.split(\",\").map(Dm);break;case\"BYHOUR\":o.byHour=cn(c);break;case\"BYMINUTE\":o.byMinute=cn(c);break;case\"BYSECOND\":o.bySecond=cn(c);break;case\"BYSETPOS\":o.bySetPos=cn(c);break;case\"WKST\":o.weekStart=c.toUpperCase();break;default:throw new RangeError(`temporals: unsupported RRULE part \"${s}\"`)}}if(!r)throw new RangeError(\"temporals: RRULE is missing FREQ\");return o}function ua(e,n){return ed(bm(e,n))}ed.fromString=ua;var od=globalThis.Temporal;Lu(od??Au);var Kt=()=>he(),vm=od?\"native\":\"temporal-polyfill\",nd=[\"MO\",\"TU\",\"WE\",\"TH\",\"FR\",\"SA\",\"SU\"];function da(e){if(typeof e==\"number\"&&Number.isInteger(e)&&e>=1&&e<=7)return nd[e-1];let n=String(e??\"\").trim().slice(0,2).toUpperCase(),t=nd.find(o=>o===n);if(!t)throw new RangeError(`not a weekday: ${JSON.stringify(e)} (use MO-SU, or 1-7 with 1 for Monday)`);return t}var td={easter:()=>[Jt(0)],\"good-friday\":()=>[Jt(-2)],\"easter-monday\":()=>[Jt(1)]};function rd(e){if(typeof e==\"string\"){let n=e.trim().toLowerCase();if(n===\"us-federal\")return Im();if(td[n])return td[n]();let t=/^(\\d{4})-(\\d{2})-(\\d{2})$/.exec(n);if(t){let o=Kt().PlainDate.from(n);return[r=>r===o.year?o:null]}if(t=/^(\\d{1,2})-(\\d{1,2})$/.exec(n),t)return[sn(Number(t[1]),Number(t[2]))];throw new RangeError(`not a holiday: ${JSON.stringify(e)} (use us-federal, easter, good-friday, easter-monday, a date like 2026-12-24, a month and day like 12-25, or an object)`)}if(e&&typeof e==\"object\"){if(\"easter\"in e)return[Jt(Number(e.easter)||0)];if(\"weekday\"in e)return[an(Number(e.month),da(e.weekday),Number(e.nth))];if(\"day\"in e)return[sn(Number(e.month),Number(e.day),{observed:e.observed??!1})]}throw new RangeError(`not a holiday: ${JSON.stringify(e)}`)}function Im(){let e=Vu();return Array.from({length:11},(n,t)=>o=>e.inYear(o)[t]??null)}function id(e={}){let n=(e.weekend??[\"SA\",\"SU\"]).map(da),t=(e.holidays??[]).flatMap(rd);return new Vt({weekend:n,holidays:t.length?zt.of(...t):void 0})}function wm(e={}){let n=(Array.isArray(e.windows)&&e.windows.length?e.windows:[[\"09:00\",\"17:00\"]]).map(t=>{if(!Array.isArray(t)||t.length!==2)throw new RangeError(`a window is [open, close], like [\"09:00\", \"17:00\"]: ${JSON.stringify(t)}`);return[String(t[0]),String(t[1])]});return new _t({windows:n,calendar:id(e)})}function ad(e,n){let t=Kt(),o=String(n||\"UTC\");if(typeof e==\"number\")return t.Instant.fromEpochMilliseconds(e).toZonedDateTimeISO(o);let r=String(e??\"\").trim();if(!r)throw new RangeError(\"no time given\");return r.includes(\"[\")?t.ZonedDateTime.from(r).withTimeZone(o):/(?:Z|[+-]\\d{2}(?::?\\d{2})?)$/i.test(r)&&r.includes(\"T\")?t.Instant.from(r).toZonedDateTimeISO(o):t.PlainDateTime.from(r).toZonedDateTime(o)}function Mm(e,n=\"UTC\"){let t=String(e??\"\").trim();return/^\\d{4}-\\d{2}-\\d{2}$/.test(t)?Kt().PlainDate.from(t):ad(e,n).toPlainDate()}function la(e){let n=Kt();if(typeof e==\"number\"){if(!Number.isFinite(e))throw new RangeError(`not a duration: ${e}`);return n.Duration.from({milliseconds:Math.trunc(e)}).round({largestUnit:\"day\",smallestUnit:\"millisecond\"})}let t=String(e??\"\").trim();return/^-?\\d+(?:\\.\\d+)?$/.test(t)?la(Number(t)):/^-?P/i.test(t)?n.Duration.from(t.toUpperCase()):aa(t)}function Sm(e){if(e.years||e.months||e.weeks)throw new RangeError(`years, months and weeks have no fixed length: ${e.toString()}`);return e.total({unit:\"millisecond\"})}function Pm(e,n={}){let t=la(e);return!t.years&&!t.months&&!t.weeks&&(t=t.round({largestUnit:n.largestUnit||\"day\",smallestUnit:\"millisecond\"})),ia(t,n)}var Nm=e=>e.toString({smallestUnit:\"second\"});var Om=()=>Kt();return md(km);})();\nreturn temporals;\n}\n"
912
+ }
913
+ ]
914
+ },
915
+ "tests": [
916
+ {
917
+ "name": "milliseconds as days down to seconds",
918
+ "inputs": {
919
+ "duration": "93784000"
920
+ },
921
+ "expect": {
922
+ "result.text": "1 day, 2 hours, 3 minutes, 4 seconds",
923
+ "result.iso": "P1DT2H3M4S",
924
+ "result.ms": 93784000
925
+ }
926
+ },
927
+ {
928
+ "name": "shorthand, the two largest units, short",
929
+ "inputs": {
930
+ "duration": "2d 12h 30m",
931
+ "maxUnits": 2,
932
+ "short": true
933
+ },
934
+ "expect": {
935
+ "result.text": "2d 12h",
936
+ "result.ms": 217800000
937
+ }
938
+ },
939
+ {
940
+ "name": "an ISO duration with weeks has no milliseconds",
941
+ "inputs": {
942
+ "duration": "P2W3D"
943
+ },
944
+ "expect": {
945
+ "result.text": "2 weeks, 3 days",
946
+ "result.ms": null
947
+ }
948
+ },
949
+ {
950
+ "name": "sub-second parts with millisecond precision",
951
+ "inputs": {
952
+ "duration": "1500",
953
+ "precision": "millisecond"
954
+ },
955
+ "expect": {
956
+ "result.text": "1 second, 500 milliseconds"
957
+ }
958
+ }
959
+ ],
960
+ "hosts": []
961
+ },
962
+ {
963
+ "id": "relative-time",
964
+ "title": "Relative time",
965
+ "description": "One time said relative to another, with Intl.RelativeTimeFormat (\"in 2 days\", \"tomorrow\", \"3 hours ago\") in a locale. Days are calendar days in `zone`, so the 26 hours from 23:00 on one day to 01:00 two days later are \"in 2 days\" (less than a day is said in hours). Also the time between, in words.",
966
+ "icon": "<svg viewBox=\"0 0 16 16\"><path d=\"M2 8h9M8 5l3 3-3 3M13.5 3.5v9\" stroke=\"currentColor\" fill=\"none\" stroke-width=\"1.2\"/></svg>",
967
+ "canvas": {
968
+ "format": "viaframe-canvas",
969
+ "version": 3,
970
+ "name": "relative-time",
971
+ "panes": [
972
+ {
973
+ "id": "i_from",
974
+ "type": "input",
975
+ "name": "from",
976
+ "rect": {
977
+ "x": 0,
978
+ "y": 0,
979
+ "width": 260
980
+ },
981
+ "inputs": [],
982
+ "widget": {
983
+ "kind": "text",
984
+ "value": "2026-10-23T09:00:00Z"
985
+ },
986
+ "control": {
987
+ "group": "Times",
988
+ "help": "The time it is said from: ISO with an offset or Z, with a [zone], a wall-clock time read in `zone`, or \"now\"."
989
+ }
990
+ },
991
+ {
992
+ "id": "i_to",
993
+ "type": "input",
994
+ "name": "to",
995
+ "rect": {
996
+ "x": 0,
997
+ "y": 150,
998
+ "width": 260
999
+ },
1000
+ "inputs": [],
1001
+ "widget": {
1002
+ "kind": "text",
1003
+ "value": "2026-10-25T15:00:00Z"
1004
+ },
1005
+ "control": {
1006
+ "group": "Times"
1007
+ }
1008
+ },
1009
+ {
1010
+ "id": "i_zone",
1011
+ "type": "input",
1012
+ "name": "zone",
1013
+ "rect": {
1014
+ "x": 0,
1015
+ "y": 300,
1016
+ "width": 260
1017
+ },
1018
+ "inputs": [],
1019
+ "widget": {
1020
+ "kind": "text",
1021
+ "value": "UTC"
1022
+ },
1023
+ "control": {
1024
+ "group": "Times",
1025
+ "help": "Calendar days (tomorrow, in 2 days) are counted in this zone."
1026
+ }
1027
+ },
1028
+ {
1029
+ "id": "i_locale",
1030
+ "type": "input",
1031
+ "name": "locale",
1032
+ "rect": {
1033
+ "x": 0,
1034
+ "y": 450,
1035
+ "width": 260
1036
+ },
1037
+ "inputs": [],
1038
+ "widget": {
1039
+ "kind": "text",
1040
+ "value": "en"
1041
+ },
1042
+ "control": {
1043
+ "group": "Words"
1044
+ }
1045
+ },
1046
+ {
1047
+ "id": "i_numeric",
1048
+ "type": "input",
1049
+ "name": "numeric",
1050
+ "rect": {
1051
+ "x": 0,
1052
+ "y": 600,
1053
+ "width": 260
1054
+ },
1055
+ "inputs": [],
1056
+ "widget": {
1057
+ "kind": "select",
1058
+ "value": "auto",
1059
+ "options": "auto,always"
1060
+ },
1061
+ "control": {
1062
+ "group": "Words",
1063
+ "help": "auto says tomorrow and yesterday; always says in 1 day."
1064
+ }
1065
+ },
1066
+ {
1067
+ "id": "result",
1068
+ "type": "eval",
1069
+ "name": "result",
1070
+ "rect": {
1071
+ "x": 340,
1072
+ "y": 0,
1073
+ "width": 380
1074
+ },
1075
+ "inputs": [
1076
+ {
1077
+ "name": "from",
1078
+ "source": "i_from"
1079
+ },
1080
+ {
1081
+ "name": "to",
1082
+ "source": "i_to"
1083
+ },
1084
+ {
1085
+ "name": "zone",
1086
+ "source": "i_zone"
1087
+ },
1088
+ {
1089
+ "name": "locale",
1090
+ "source": "i_locale"
1091
+ },
1092
+ {
1093
+ "name": "numeric",
1094
+ "source": "i_numeric"
1095
+ }
1096
+ ],
1097
+ "autorun": true,
1098
+ "mode": "function",
1099
+ "outputs": [
1100
+ {
1101
+ "name": "text"
1102
+ },
1103
+ {
1104
+ "name": "between"
1105
+ }
1106
+ ],
1107
+ "code": "const T = temporalsLibrary();\nconst read = (t) => String(t).trim().toLowerCase() === \"now\" ? T.Temporal().Now.zonedDateTimeISO(zone || \"UTC\") : T.zoned(t, zone);\nconst a = read(from);\nconst b = read(to);\nconst text = T.formatRelative(a, b, { locale: locale ? String(locale) : undefined, numeric: numeric === \"always\" ? \"always\" : \"auto\" });\nreturn { text, between: T.words(b.epochMilliseconds - a.epochMilliseconds, { max: 2 }) };\n\n// @johnhenry/temporals 0.3.0 and temporal-polyfill 1.0.1 (both MIT), bundled from viaframe/src/lib.ts by viaframe/scripts/build.mjs\n// in github.com/johnhenry/temporals. A pane package can't import a module or share code between\n// its panes, so each pane carries this copy; it uses the runtime's own Temporal when there is one.\nfunction temporalsLibrary() {\n\"use strict\";var temporals=(()=>{var zo=Object.defineProperty;var sd=Object.getOwnPropertyDescriptor;var cd=Object.getOwnPropertyNames;var ud=Object.prototype.hasOwnProperty;var dd=(e,n)=>{for(var t in n)zo(e,t,{get:n[t],enumerable:!0})},ld=(e,n,t,o)=>{if(n&&typeof n==\"object\"||typeof n==\"function\")for(let r of cd(n))!ud.call(e,r)&&r!==t&&zo(e,r,{get:()=>n[r],enumerable:!(o=sd(n,r))||o.enumerable});return e};var md=e=>ld(zo({},\"__esModule\",{value:!0}),e);var km={};dd(km,{BusinessCalendar:()=>Vt,Temporal:()=>Om,WorkingHours:()=>_t,businessCalendar:()=>id,businessDuration:()=>_u,duration:()=>la,durationMs:()=>Sm,formatRelative:()=>Ju,holidayRules:()=>rd,humanizeDuration:()=>ia,iso:()=>Nm,parseDuration:()=>aa,plainDate:()=>Mm,recurFromString:()=>ua,temporalSource:()=>vm,weekdayCode:()=>da,words:()=>Pm,workingHours:()=>wm,zoned:()=>ad});var Vo=globalThis.Temporal;var ma=(e,n)=>`Non-positive ${e}: ${n}`,fa=(e,n)=>`Non-finite ${e}: ${n}`,ha=e=>`Cannot convert bigint to ${e}`,pa=\"Invalid object\",ot=(e,n,t,o)=>un(e,n)+`; must be between ${t}-${o}`,un=(e,n)=>`Invalid ${e}: ${n}`;var _o=1e3,Jo=1e6,Ko=1e9,Qo=6e10,Xo=36e11;function ie(e){return e===void 0?Object.create(null):dn(e)}function Qt(e,n=\"number\"){if(typeof e==\"bigint\")throw new TypeError(ha(n));if(e=Number(e),!Number.isFinite(e))throw new RangeError(fa(n,e));return e}function U(e,n){return Math.trunc(Qt(e,n))||0}function Xt(e,n){return ya(U(e,n),n)}function ya(e,n=\"number\"){if(e<=0)throw new RangeError(ma(n,e));return e}function er(e,n,t){return Math.min(Math.max(e,n),t)}function Nn(e){return e!==null&&(typeof e==\"object\"||typeof e==\"function\")}function dn(e){if(!Nn(e))throw new TypeError(pa);return e}var so=un;var dt=e=>`Missing ${e}`,Pa=e=>\"No valid fields: \"+e.join(),Na=\"Invalid bag\",Oa=(e,n,t)=>un(e,n)+\"; must be \"+Object.keys(t).join(),ka=\"Cannot use valueOf\",Ea=\"Invalid calling context\",co=e=>\"Missing year\"+(e?\"/era/eraYear\":\"\"),mn=\"Invalid leap month\",xa=e=>un(\"Calendar\",e),Za=(e,n)=>`Unknown calendar ${e}; might need ${n}`,pr=e=>un(\"TimeZone\",e),$e=\"Out-of-bounds date\";var Fa=e=>`Cannot parse: ${e}`,Ze=e=>`Invalid substring: ${e}`;var yr=er,ee=Nn;function T(e){throw new RangeError(e)}function S(e){throw new TypeError(e)}function rr(e,n,t,o,r){return we(n,((i,a)=>{let s=i[a];return s===void 0&&S(dt(a)),s})(e,n),t,o,r)}function we(e,n,t,o,r,i){let a=yr(n,t,o);return r&&n!==a&&T(((s,c,u,d,l)=>l?ot(s,l[c],l[u],l[d]):ot(s,c,u,d))(e,n,t,o,i)),a}function En(e,n=Map){let t=new n;return(o,...r)=>{if(t.has(o))return t.get(o);let i=e(o,...r);return t.set(o,i),i}}var Ra=e=>uo({name:e},1),uo=(e,n)=>Ve(t=>({value:t,configurable:1,writable:!n}),e),lt=e=>({[Symbol.toStringTag]:{value:e,configurable:1}});function Ve(e,n){let t={};for(let o in n)t[o]=e(n[o],o);return t}function mt(e,n){let t={};for(let o of e)t[o]=n;return t}function lo(e){let n={};for(let t of e)n[t]=o=>o[t];return n}function Me(e,n,t=Object.create(null)){for(let o of e)t[o]=n[o];return t}function Ca(e,n,t){for(let o of e)if(n[o]!==t[o])return 0;return 1}function Td(e,n,t){let o={...t};for(let r=0;r<n;r++)o[e[r]]=0;return o}function C(e,...n){return(...t)=>e(...n,...t)}function Tr(){}function Ta(e){return e[0].toUpperCase()+e.substring(1)}function A(...e){return[].concat(...e).sort()}function Rn(e){return new RegExp(`^${e}$`,\"i\")}function gr(e){return parseInt(e.padEnd(9,\"0\"))}function Dr(e){return e&&e!==\"+\"?-1:1}function On(e){return e===void 0?0:parseInt(e)}function oo(e,n){return String(n).padStart(e,\"0\")}var pe=C(oo,2);function Fe(e,n){return Math.sign(e-n)}function x(e,n){return e<n?-1:e>n?1:0}function Ya(e,n){let t=e/n;return e%n<0n?t-1n:t}function br(e,n){let t=Ya(e,n);return[t,e-t*n]}function ve(e,n){return[Math.floor(e/n),mo(e,n)]}function mo(e,n){return(e%n+n)%n}function Cn(e,n){return Math.trunc(e/n)||0}function vr(e,n){return e%n||0}function Ba(e,n=1){return n*(.5+e/5)}function eo(e){return Math.abs(e%1)===.5}var Ir=\"iso8601\",Wa=\"gregory\",gd={bce:-1,ce:0};function Aa(e){let n=e.normalize(\"NFD\").toLowerCase().replace(/[^a-z0-9]/g,\"\");return n===\"bc\"||n===\"b\"?\"bce\":n===\"ad\"||n===\"a\"?\"ce\":n}var se=void 0,Ua=0;function ye(e){return e===se?\"iso8601\":e===0?\"gregory\":e.id}var Dd=/^M(\\d{2})(L?)$/;function La(e){let n=Dd.exec(e);return n||T((t=>`Invalid monthCode: ${t}`)(e)),[parseInt(n[1]),!!n[2]]}function qa(e,n){return\"M\"+pe(e)+(n?\"L\":\"\")}function ir(e,n,t){return e+(n||t&&e>=t?1:0)}var ar={nanosecond:0,microsecond:1,millisecond:2,second:3,minute:4,hour:5,day:6,week:7,month:8,year:9},wr=Object.keys(ar);var ft=_o,ht=Jo,_e=Ko,pt=Qo,yt=Xo,Ye=864e11,Te=[1,ft,ht,_e,pt,yt,Ye],bd=BigInt(ft),Yn=BigInt(ht),hn=BigInt(_e),vd=BigInt(pt),Id=BigInt(yt),O=BigInt(Ye);function ja(e,n){let t=Number(e/O),o=Number(e%O);return t*(Ye/n)+(Math.trunc(o/n)+o%n/n)}var _=wr.slice(0,6),Tt=lo(_),fo=[\"year\"],Tn=[\"day\"],Mr=[\"day\",\"month\",\"year\"],ho=[\"offset\"],Sr=[\"timeZone\"],Bn=[\"era\",\"eraYear\"],wd=[\"era\",\"eraYear\",\"year\"],$a=[\"month\",\"monthCode\"],Md=[\"day\",\"month\",\"monthCode\"],sr=A(_),Sd=A(Bn,fo),gt=A($a,fo),Ha=A(Bn,gt),Dt=A([\"monthCode\"],fo),Ga=A(Bn,Dt),za=A(Tn,[\"monthCode\"]),gn=A(Tn,gt),Dn=A(Tn,Bn,gt),Va=A(gn,_),_a=A(Dn,_),Pd=A(gn,_,ho),Nd=A(Dn,_,ho),Ja=A(gn,_,ho,Sr),Ka=A(Dn,_,ho,Sr),Od=A(Tn,Dt),kd=A(Tn,Bn,Dt),ce=mt(_,0);function bt(e){return po(e,1),e}var Ed={hour:23,minute:59,second:59};function po(e,n){let t={};for(let o of _)t[o]=we(o,e[o],0,Ed[o]||999,n);return t}function oe(e){return Nr(e)*_e+Qa(e)}function Pr(e){return 1e3*Nr(e)+e.millisecond}function Nr(e){return 3600*e.hour+60*e.minute+e.second}function Qa(e){return e.millisecond*ht+e.microsecond*ft+e.nanosecond}function Or(e){let[n,t]=ve(e,Ye);return[Xa(t),n]}function Xa(e){let[n,t]=ve(e,ht),[o,r]=ve(t,ft);return xd(n,o,r)}function xd(e,n=0,t=0){let[o,r]=ve(e,36e5),[i,a]=ve(r,6e4),[s,c]=ve(a,1e3);return{hour:o,minute:i,second:s,millisecond:c,microsecond:n,nanosecond:t}}function ga(e){let[n,t]=br(e,hn);return[Number(n),Number(t)]}function Ie(e){return fn(e)+BigInt(oe(e))}function es(e){return vt(e)+Pr(e)}function fn(e){return BigInt(Se(e))*O}function vt(e){return 864e5*Se(e)}function Se(e){return rt(e.year,e.month,e.day)}function rt(e,n=1,t=1){let o=n-1;return e+=Math.floor(o/12),n=mo(o,12),Date.UTC(e%400-400,n,0)/864e5+146097*(Cn(e,400)+1)+t}function It(e){let[n,t]=br(e,O);return{...ns(Number(n)),...Xa(Number(t))}}function ns(e){let n=new Date(864e5*mo(e,146097));return{year:n.getUTCFullYear()+400*Math.floor(e/146097),month:n.getUTCMonth()+1,day:n.getUTCDate()}}var ts=1972;function Zd(e){return[e,0]}function cr(e,n){if(!n)return{year:1972,month:e}}function Fd(e,n,t){return{year:e,month:n,day:t}}function os(e,n){switch(n){case 2:return yo(e)?29:28;case 4:case 6:case 9:case 11:return 30}return 31}function Rd(e){return yo(e)?366:365}function yo(e){return e%4==0&&(e%100!=0||e%400==0)}function rs(e,n,t){return e+=Cn(t,12),(n+=vr(t,12))<1?(e--,n+=12):n>12&&(e++,n-=12),{year:e,month:n}}function Cd(e,n,t,o){return 12*(t-e)+o-n}function To(e){return mo(rt(e.year,e.month,e.day)+4,7)||7}function is(e){return rt(e.year,e.month,e.day)-rt(e.year)+1}function as(e){let n=e.year,t=Math.floor((is(e)-To(e)+10)/7),o=nr(n);return t<1?t=o=nr(--n):t>o&&(t=1,o=nr(++n)),{weekOfYear:t,yearOfWeek:n,Ie:o}}function nr(e){let n=To({year:e,month:1,day:1});return n===4||n===3&&yo(e)?53:52}function Yd({year:e}){return e<1?{era:\"bce\",eraYear:1-e}:{era:\"ce\",eraYear:e}}function wt(e){return Be(e),bt(e)}function Be(e){return ss(e,1),e}function Da(e){return Ca(Mr,e,ss(e))}function ss(e,n){let{year:t}=e,o=rr(e,\"month\",1,12,n);return{year:t,month:o,day:rr(e,\"day\",1,os(t,o),n)}}function P(e,n){return e?e.ie(n):n}function pn(e,n,t){return e?e.O(n,t):Zd(t)}function Mt(e,n){return e===0?Yd(n):e?e.h(n):{}}function yn(e,n,t,o){return e?e.je(n,t,o):Fd(n,t,o)}function it(e,n){return e?e.k(n):12}function at(e,n,t){return e?e.p(n,t):os(n,t)}function go(e,n){let{year:t,month:o}=P(e,n),[r,i]=pn(e,t,o);return qa(r,i)}function kr(e,n){let{year:t}=P(e,n);return e?e.u(t):yo(t)}function Er(e,n){let{year:t}=P(e,n);return it(e,t)}function xr(e,n){let{year:t,month:o}=P(e,n);return at(e,t,o)}function Zr(e,n){let{year:t}=P(e,n);return e?e.j(t):Rd(t)}function cs(e,n){if(!e)return is(n);let{year:t}=P(e,n),o=yn(e,t,1,1);return Se(n)-Se(o)+1}function us(e,n){return e===se?as(n).weekOfYear:void 0}function ds(e,n){return e===se?as(n).yearOfWeek:void 0}var k=wr.map(e=>e+\"s\"),Fr=lo(k),ls=A(k),Bd=k.slice(0,6),ms=k.slice(6),Wd=ms.slice(1),Ad=k.reduce((e,n,t)=>(e[n]=t,e),{}),R=mt(k,0),Rr=mt(Bd,0),Cr=C(Td,k);function fs(e,n){return n==null&&T(dt(e)),n}var $=C(Ud,\"string\");function Ud(e,n,t=e){return typeof n!==e&&S(so(t,n)),n}function Yr(e,n=\"number\"){return Number.isInteger(e)||T(((t,o)=>`Non-integer ${t}: ${o}`)(n,e)),e||0}function Br(e){return typeof e==\"symbol\"&&S(\"Cannot convert Symbol to string\"),String(e)}function Wr(e,n){return Nn(e)?String(e):$(e,n)}function Do(e){return typeof e==\"boolean\"?BigInt(e?1:0):typeof e==\"string\"?BigInt(e):(typeof e!=\"bigint\"&&S(`Invalid bigint: ${e}`),e)}function bo(e,n){return Yr(Qt(e,n),n)}function vo(e,n){return typeof e==\"string\"?((t,o)=>{let r=Object.create(null);return r[t]=o,r})(n,e):dn(e)}var Re=\"smallestUnit\";var Ld={constrain:0,reject:1},qd={compatible:0,reject:1,earlier:2,later:3},jd={reject:0,use:1,prefer:2,ignore:3},$d={auto:0,never:1,critical:2,always:3},Hd={auto:0,never:1,critical:2},Gd={auto:0,never:1},zd={floor:0,halfFloor:1,ceil:2,halfCeil:3,trunc:4,halfTrunc:5,expand:6,halfExpand:7,halfEven:8},Vd=[Math.floor,e=>eo(e)?Math.floor(e):Math.round(e),Math.ceil,e=>eo(e)?Math.ceil(e):Math.round(e),Math.trunc,e=>eo(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=>eo(e)?(e=Math.trunc(e)||0)+e%2:Math.round(e)],_d={previous:-1,next:1};function Ar(e){let n=e.roundingIncrement;return n===void 0?1:U(n,\"roundingIncrement\")}function Ur(e){let n=e.fractionalSecondDigits;if(n!==void 0){if(typeof n!=\"number\"){if(Br(n)===\"auto\")return;T(so(\"fractionalSecondDigits\",n))}n=we(\"fractionalSecondDigits\",Math.floor(n),0,9,1)}return n}function Lr(e,n,t=0,o){let r=n[e];if(r===void 0)return o?t:void 0;if(r=Br(r),r===\"auto\")return o?t:null;let i=ar[r];return i===void 0&&(i=Ad[r]),i===void 0&&T(Oa(e,r,ar)),i}function Je(e,n,t,o=0){let r=t[e];if(r===void 0)return o;let i=Br(r),a=n[i];return a===void 0&&T(Oa(e,i,n)),a}var Wn=C(Lr,Re),hs=C(Lr,\"largestUnit\"),Jd=C(Lr,\"unit\"),ps=C(Je,\"overflow\",Ld),ys=C(Je,\"disambiguation\",qd),Kd=C(Je,\"offset\",jd),qr=C(Je,\"calendarName\",$d),Qd=C(Je,\"timeZoneName\",Hd),Xd=C(Je,\"offset\",Gd),An=C(Je,\"roundingMode\",zd),el=C(Je,\"direction\",_d);function jr(e,n,t,o){let r=o?Ye:Te[n+1];if(r){let i=Te[n];r%((e=we(\"roundingIncrement\",e,1,r/i-(o?0:1),1))*i)&&T(so(\"roundingIncrement\",e))}else e=we(\"roundingIncrement\",e,1,t?10**9:1,1);return e}function xn(e,n,t,o){return n!=null&&we(e,n,t,o,1,wr),n}function Ts(e,n){n>e&&T(\"smallestUnit > largestUnit\")}function Un(e,n,t,o=9,r=0,i=4){n=ie(n);let a=hs(n,r),s=Ar(n),c=An(n,i),u=Wn(n,r,1);return a=xn(\"largestUnit\",a,r,o),u=xn(Re,u,r,o),a==null?a=Math.max(t,u):Ts(a,u),s=jr(s,u,1),e&&(c=(d=>d<4?(d+2)%4:d)(c)),[a,u,s,c]}function St(e,n=6,t){let o=Ar(e=vo(e,Re)),r=An(e,7),i=Wn(e);return i=fs(Re,i),i=xn(Re,i,0,n),o=jr(o,i,void 0,t),[i,o,r]}function E(e,n){return Me(Mr,e,Me(_,n))}function w(e){return e===void 0?0:ps(dn(e))}function Zn(e,n=0){e=ie(e);let t=ys(e),o=Kd(e,n);return[ps(e),o,t]}var gs=BigInt(1e8)*O,$r=BigInt(-1e8)*O,Ds=$r-O,bs=-3261848;function Io(e){let n=12*e.year+e.month;return(n<bs||n>3309129)&&T($e),e}function X(e,n=1){return vs(fn(e),n),e}function bn(e){let n=fn(e);return vs(n),n!==Ds||oe(e)||T($e),e}function vs(e,n=1){(e<(n?Ds:$r)||e>gs)&&T($e)}function ge(e){return(e<$r||e>gs)&&T($e),e}function Hr(e,n){return ge(fn(e)+BigInt(oe(e)-n))}function ue(e){return{epochNanoseconds:e}}function De(e,n,t){return{calendar:t,timeZone:n,epochNanoseconds:e}}function Pe(e,n){return Me(_,e,N(e,n))}function N(e,n){return Me(Mr,e,{calendar:n})}function vn(e){return Me(_,e)}function B(e){return Me(k,e,{sign:xo(e)})}function Pt(e){return n=e.epochNanoseconds,Number(Ya(n,Yn));var n}function Nt(e){return e.epochNanoseconds}function Is(e,n,t){let o=ze(n),[r,i]=((u,d)=>{let l=d((u=vo(u,\"unit\")).relativeTo),m=Jd(u);return m=fs(\"unit\",m),[m,l]})(t,e);if(!i&&kn(Math.max(r,o),i))return ba(n,r);if(i||T(\"Missing relativeTo\"),!n.sign&&kn(r,i))return 0;let a=Eo(i),s=a.G(a.i,n);Cs(a,s);let c=a.re(a.i,s,r);return kn(r,i)?ba(c,r):nl(c,a.V(s),r,a)}function nl(e,n,t,o){let r=xo(e)||1,i=Gr(Cr(t,e),t,r,o,n),a=i.ae,s=i.de,c=Number(s-a),u=Number(n-a);return i.ye[k[t]]+u/c*r}function ba(e,n){return ja(Ce(e),Te[n])}function Gr(e,n,t,o,r){let i=k[n],a=e,s=0,c=va(a,i,t,o);return r&&!((u,d,l,m)=>m>0?x(d,u)<=0&&x(u,l)<=0:x(l,u)<=0&&x(u,d)<=0)(r,c.ae,c.de,Math.sign(t))&&(a={...e,[i]:e[i]+t},s=1,c=va(a,i,t,o)),{...c,ye:a,He:s}}function va(e,n,t,o){let r={...e,[n]:e[n]+t};return{ae:ct(o,e),de:ct(o,r),Ae:r}}function ws(e,n,t){let o=t-n,r=e-n;if(!r)return 0;let i=r<0n?-r:r,a=o<0n?-o:o,s=x(r,0n)===x(o,0n)?1:-1;return x(i,a)<=0?i===a?s:Ba(x(2n*i,a),s):Number(r)/Number(o)}function Ms(e,n,t,o){let{epochNanoseconds:r}=e,{timeZone:i,calendar:a}=e;if(n===0&&t===1)return{epochNanoseconds:r,timeZone:i,calendar:a};if(n===6){let s=E(W(e),ce),c=E(Ke(s,1),ce),u=He(i,s),d=He(i,c);r=zr(ws(r,u,d),o)?d:u}else{let s=W(e),c=s.offsetNanoseconds;r=qn(i,wo(s,Ln(n,t),o),c,2,0,1)}return{epochNanoseconds:r,timeZone:i,calendar:a}}function Ss(e){let{timeZone:n}=e,t=E(W(e),ce),o=E(Ke(t,1),ce),r=He(n,t);return ja(He(n,o)-r,yt)}function Ps(e){let{timeZone:n,calendar:t}=e;return De(He(n,E(W(e),ce)),n,t)}function wo(e,n,t){let[o,r]=Mo(e,n,t),i=E(Ke(e,r),o);return bn(i),i}function Mo(e,n,t){return Or(Fn(oe(e),n,t))}function ro(e){return Fn(e,pt,7)}function Ln(e,n){return Te[e]*n}function Ot(e,n){return BigInt(Te[e])*BigInt(n)}function tl(e,n,t){let o=Math.min(ze(e),6);return Ge(Po(Ce(e),BigInt(n),t),o)}function So(e,n,t,o,r,i,a){if(o===0&&r===1)return e;let s=xo(e)||1,c=kn(o,a.i)?Zt(a.i)&&o<6&&t>=6?rl:ol:il,[u,d,l]=c(s,e,n,t,o,r,i,a);return l&&o!==7&&(u=((m,f,p,h,y,b)=>{for(let v=h+1;v<=p;v++){if(v===7&&p!==7)continue;let D=Cr(v,m);D[k[v]]+=y;let I=x(f,ct(b,D));if(I&&I!==y)break;m=D}return m})(u,d,t,Math.max(6,o),s,a)),u}function Po(e,n,t){return Ns(e,n,t,e/n%2n)}function No(e,n,t){let[o,r]=br(e,O),i=o*O;return i+Ns(r,n,t,(i/n+r/n)%2n)}function Ns(e,n,t,o){let r=e/n,i=e%n,a=0;i&&(a=Ba(x(2n*(i<0n?-i:i),n),Math.sign(Number(i))));let s=zr(Number(o)+a,t);return(r-o+BigInt(s))*n}function Fn(e,n,t){return zr(e/n,t)*n}function zr(e,n){return Vd[n](e)}function ol(e,n,t,o,r,i,a){let s=Ce(n),c=Po(s,Ot(r,i),a),u=c-s,d=Math.sign(Number(c/O)-Number(s/O))===e,l=Ge(c,Math.min(o,6));return[{...n,...l},t+u,d]}function rl(e,n,t,o,r,i,a,s){let c=Number(In(n)),u=Ln(r,i),d=Fn(c,u,a),l=Gr({...n,...Rr},6,e,s,t),m=l.ae,f=l.de,p=d-Number(f-m),h=0;p&&Math.sign(p)!==e?t=m+BigInt(d):(h+=e,d=Fn(p,u,a),t=f+BigInt(d));let y=Zo(d);return[{...n,...y,days:n.days+h},t,!!h]}function il(e,n,t,o,r,i,a,s){let c=k[r],u=Cr(r,n);r===7&&(n={...n,weeks:n.weeks+Math.trunc(n.days/7)});let d=Cn(n[c],i)*i;u[c]=d;let l=Gr(u,r,i*e,s,t),m=l.ae,f=l.de,p=ws(t,m,f),h=l.ye[c],y=l.Ae[c],b=Fn(h+p*e*i,i,a),v=b===y;return u[c]=b,[u,v?f:m,l.He||v]}function Os(e,n){return e.timeZone.U(e.epochNanoseconds,(t=>{let o=vo(t,\"direction\"),r=el(o,0);return r||T(so(\"direction\",r)),r})(n))}var W=En(al,WeakMap);function al(e){let{epochNanoseconds:n,timeZone:t}=e,o=t.C(n);return{...It(n+BigInt(o)),offsetNanoseconds:o}}function qn(e,n,t,o=0,r=0,i,a){if(t!==void 0&&o===1&&(o===1||a))return Hr(n,t);o!==2&&o!==0||X(n,0);let s=e.R(n);if(t!==void 0&&o!==3){let c=((u,d,l,m)=>{let f=Ie(d);m&&(l=ro(l));for(let p of u){let h=Number(f-p);if(m&&(h=ro(h)),h===l)return p}})(s,n,t,i);if(c!==void 0)return c;o===0&&T(\"Invalid TimeZone offset\")}return a?Ie(n):kt(e,n,r,s)}function kt(e,n,t=0,o=e.R(n)){if(o.length===1)return o[0];if(t===1&&T(\"Ambiguous offset\"),o.length)return o[t===3?1:0];let r=Ie(n),i=((s,c)=>{let u=s.C(c-O);return(d=>(d>Ye&&T(\"Out-of-bounds TimeZone gap\"),d))(s.C(c+O)-u)})(e,r),a=It(r+BigInt(i*(t===2?-1:1)));return(o=e.R(a))[t===2?0:o.length-1]}function He(e,n){let t=e.R(n);if(t.length)return t[0];let o=Ie(n)-O;return e.U(o,1)}function Vr(e,n,t,o,r){let i=w(r);o.sign&&ze(o)<8&&T(\"Cannot use small units\");let a=X(st(n,t));return st(n,ks(n,a,e?H(o):o,i))}function _r(e,n){return ge(e+(Ls(t=n)&&T(\"Cannot use large units\"),In(t)));var t}function Et(e,n,t){let{calendar:o,epochNanoseconds:r,timeZone:i}=e,a=In(n),s=r;if(Ls(n)){let c=W(e);s=kt(i,E(jn(o,c,{...n,...Rr},t),c))+a}else s+=a,w(t);return{...e,epochNanoseconds:ge(s)}}function xt(e,n,t,o){let[r,i]=Oo(n,t),a=E(jn(e,n,{...t,...Rr,days:t.days+i},o),r);return bn(a),a}function jn(e,n,t,o){if(t.years||t.months||t.weeks)return ks(e,n,t,w(o));w(o);let r=t.days+Number(In(t)/O);return r?X(Ke(n,r)):n}function st(e,n){return Ke(n,1-P(e,n).day)}function Oo(e,n){let t=In(n),o=Number(t/O),r=Number(t%O),[i,a]=Or(oe(e)+r);return[i,o+a]}function Ke(e,n){return n?ns(Se(e)+n):e}function ks(e,n,t,o){let{years:r,months:i,weeks:a,days:s}=t,c;if(s+=Number(In(t)/O),r||i)c=ur(e,n,r,i,o);else{if(!a&&!s)return n;c=n}return(a||s)&&(c=Ke(c,7*a+s)),X(c)}function ur(e,n,t,o,r){let i=P(e,n),{year:a,month:s,day:c}=i;if(t){let[u,d]=pn(e,a,s);a+=t,s=dr(e,u,d,e?e.q(a):void 0,r),s=we(\"month\",s,1,it(e,a),r)}return o&&({year:a,month:s}=e?e.N(a,s,o):rs(a,s,o)),c=we(\"day\",c,1,at(e,a,s),r),yn(e,a,s,c)}function dr(e,n,t,o,r){if(t){let i=e?e.m:void 0;return o!==void 0&&(i<0||o===n+1)?o:(r===1&&T(mn),i<0?-i:n)}return ir(n,0,o)}function We(e,n){return ye(e)!==ye(n)&&T(\"Mismatching Calendars\"),e}function sl(e,n){return e.o!==n.o&&T(\"Mismatching TimeZones\"),e}function Es(e){return e.timeZone.id}function Jr(e,n,t,o){let[r,i,a,s]=Un(e,o,3,5),c=ko(n.epochNanoseconds,t.epochNanoseconds,r,i,a,s);return B(e?H(c):c)}function Kr(e,n,t,o,r){let[i,a,s,c]=Un(e,r,5),u=t.epochNanoseconds,d=o.epochNanoseconds,l;return x(d,u)?i<6?l=ko(u,d,i,a,s,c):(l=Zs(sl(t.timeZone,o.timeZone),n,t,o,i),l=So(l,d,i,a,s,c,oi(t,Nt,Et))):l=R,B(e?H(l):l)}function Qr(e,n,t,o,r){let[i,a,s,c]=Un(e,r,6),u=Ie(t),d=Ie(o),l=x(d,u),m;return l?i<=6?m=ko(u,d,i,a,s,c):(m=Fs(n,t,o,l,i),m=So(m,d,i,a,s,c,oi(t,Ie,C(xt,n)))):m=R,B(e?H(m):m)}function Xr(e,n,t,o,r){let[i,a,s,c]=Un(e,r,6,9,6);return xs(e,n,t,o,i,a,s,c)}function ei(e,n,t,o,r){let[i,a,s,c]=Un(e,r,9,9,8),u=st(n,t),d=st(n,o);return Rs(u,d)?xs(e,n,X(u),X(d),i,a,s,c,8):B(R)}function xs(e,n,t,o,r,i,a,s,c=6){let u=fn(t),d=fn(o),l;return x(d,u)?r===6?l=ko(u,d,r,i,a,s):(l=ti(n,t,o,r),i===c&&a===1||(l=So(l,d,r,i,a,s,oi(t,fn,C(jn,n))))):l=R,B(e?H(l):l)}function ni(e,n,t,o){let[r,i,a,s]=Un(e,o,5,5),c=Fn(oe(t)-oe(n),Ln(i,a),s),u={...R,...Zo(c,r)};return B(e?H(u):u)}function Zs(e,n,t,o,r){let i=x(o.epochNanoseconds,t.epochNanoseconds);if(!i)return R;if(r<6)return{...R,...Ge(o.epochNanoseconds-t.epochNanoseconds,r)};if(!Rs(W(t),W(o)))return{...R,...Ge(o.epochNanoseconds-t.epochNanoseconds,5)};let[a,s,c]=ul(e,t,o,i);return{...r===6?{...R,days:to(a,s)}:ti(n,a,s,r),...Zo(c)}}function cl(e,n,t,o){let r=Ie(n),i=Ie(t),a=x(i,r);return a?o<=6?{...R,...Ge(i-r,o)}:Fs(e,n,t,a,o):R}function Fs(e,n,t,o,r){let i=t,a=oe(t)-oe(n);return Math.sign(a)===-o&&(i=Ke(t,-o),a+=Ye*o),{...ti(e,n,i,r),...Zo(a)}}function ti(e,n,t,o){if(o<=7){let h=to(n,t);return o===7?{...R,weeks:Cn(h,7),days:vr(h,7)}:{...R,days:h}}let r=P(e,n),i=P(e,t);if(o===8){let{year:h,month:y,day:b}=r,{year:v,month:D,day:I}=i,F=Math.sign(Fe(v,h)||Fe(D,y)||to(n,t)),j=0,K=0;if(F){j=e?e.ne(h,y,v,D):Cd(h,y,v,D);let Q=ur(e,n,0,j,0);F*Fe(b,I)>0&&(j-=F,Q=ur(e,n,0,j,0)),K=to(Q,t)}return{...R,months:j,days:K}}let{year:a,month:s,day:c}=r,{year:u,month:d,day:l}=i,m=u-a,f=d-s,p=l-c;if(m||f){let h=Math.sign(m||f),y=at(e,u,d),b=0;if(Math.sign(l-c)===-h){let v=y;({year:u,month:d}=e?e.N(u,d,-h):rs(u,d,-h)),m=u-a,f=d-s,y=at(e,u,d),b=h<0?-v:y}if(p=l-Math.min(c,y)+b,m){let[v,D]=pn(e,a,s),[I,F]=pn(e,u,d),j=e?e.m:void 0;if(f=j!==void 0&&D&&!F&&(j<0?h>0&&I===-j:h<0&&I===v)?0:I-v||Number(F)-Number(D),Math.sign(f)===-h){let K=h<0&&-it(e,u);u-=h,m=u-a,f=d-dr(e,v,D,e?e.q(u):void 0,0)+(K||it(e,u))}else if(e){let K=dr(e,v,D,e.q(u),0);f=e.ne(u,K,u,d)}}}return{...R,years:m,months:f,days:p}}function Rs(e,n){return Fe(e.year,n.year)||Fe(e.month,n.month)||Fe(e.day,n.day)}function ul(e,n,t,o){let r=W(n),i=W(t),a=t.epochNanoseconds,s=0,c=oe(i)-oe(r);Math.sign(c)===-o&&s++;let u=s+(o>0?1:0);for(;s<=u;s++){let d=Ke(i,s*-o),l=kt(e,E(d,r));if(x(a,l)!==-o)return[r,d,Number(a-l)]}}function ko(e,n,t,o,r,i){return{...R,...Ge(Po(n-e,Ot(o,r),i),t)}}function to(e,n){return Se(n)-Se(e)}function oi(e,n,t){return{i:e,V:n,G:t}}function Eo(e){let{calendar:n}=e;if(Zt(e)){let{timeZone:t}=e;return{i:e,V:Nt,G:Et,re:C(Zs,t,n)}}return{i:Ys(e),V:Ie,G:C(xt,n),re:C(cl,n)}}function ct(e,n){return e.V(e.G(e.i,n))}function Zt(e){return\"timeZone\"in e}function Cs(e,n){Zt(e.i)||(Ia(e.i),Ia(n))}function Ys(e){return E(e,\"hour\"in e?e:ce)}function Ia(e){bn(Ys(e))}function kn(e,n){return e<=6-(n&&Zt(n)?1:0)}function ri(e,n,t){let o={};for(let r=n;r>=0;r--){let i=Te[r];o[t[r]]=Cn(e,i),e=vr(e,i)}return o}var dl=2**53;function ii(e,n,t,o,r){let i=e(ie(r).relativeTo),a=Math.max(ze(t),ze(o));if(kn(a,i))return ll(n,t,o,a);i||T(\"Missing relativeTo\"),n&&(o=H(o));let s=Eo(i),c=s.G(s.i,t),u=s.G(c,o);return B(s.re(s.i,u,a))}function ll(e,n,t,o){return B(Qe(((r,i,a,s)=>{let c=Ce(r)+Ce(i)*BigInt(s?-1:1);return Number.isFinite(Number(c/O))||T($e),{...R,...Ge(c,a)}})(n,t,o,e)))}function Bs(e,n,t){let o=ze(n),[r,i,a,s,c]=((f,p,h)=>{f=vo(f,Re);let y=hs(f),b=h(f.relativeTo),v=Ar(f),D=An(f,7),I=Wn(f);return y===void 0&&I===void 0&&T(\"Required smallestUnit or largestUnit\"),I==null&&(I=0),y==null&&(y=Math.max(I,p)),Ts(y,I),v=jr(v,I,1),v>1&&I>5&&y!==I&&T(\"For calendar units with roundingIncrement > 1, use largestUnit = smallestUnit\"),[y,I,v,D,b]})(t,o,e);if(!c&&Math.max(o,r)<=6)return B(Qe(((f,p,h,y,b)=>{let v=Po(Ce(f),Ot(h,y),b);return{...R,...Ge(v,p)}})(n,r,i,a,s)));let u=c&&Zt(c)&&r>=6&&i<6;if(!n.sign&&!u)return n;c||T(\"Missing relativeTo\");let d=Eo(c),l=d.G(d.i,n);Cs(d,l);let m=d.re(d.i,l,r);return m=So(m,d.V(l),r,i,a,s,d),B(m)}function Ws(e){return e.sign===-1?ai(e):e}function ai(e){return B(H(e))}function H(e){let n={};for(let t of k)n[t]=-1*e[t]||0;return n}function xo(e,n=k){let t=0;for(let o of n){let r=Math.sign(e[o]);r&&(t&&t!==r&&T(\"Cannot mix duration signs\"),t=r)}return t}function Qe(e){for(let t of Wd)we(t,e[t],-4294967295,4294967295,1);let n=Ce(e);return As(Number(n/hn)),e}function As(e){Number.isSafeInteger(e)||T(\"Out-of-bounds duration\")}function Ce(e){return BigInt(e.days)*O+In(e)}function In(e){return BigInt(e.hours)*Id+BigInt(e.minutes)*vd+Us(e)}function Us(e){return BigInt(e.seconds)*hn+BigInt(e.milliseconds)*Yn+BigInt(e.microseconds)*bd+BigInt(e.nanoseconds)}function Ge(e,n=6){let t=Number(e/O),o=Number(e%O),r=Te[n],i=n<=3?Number(e/BigInt(r)):t*(Ye/r)+Cn(o,r);Number.isFinite(i)||T($e),n<=3&&Math.abs(i)/(_e/Te[n])>=dl&&T($e);let a=ri(o,n,k);return a[k[n]]=i,a}function Zo(e,n=5){return ri(e,n,k)}function Ls(e){return!!xo(e,ms)}function ze(e){let n=9;for(;n>0&&!e[k[n]];n--);return n}function si(e,n){return x(e.epochNanoseconds,n.epochNanoseconds)}function ci(e,n){return x(e.epochNanoseconds,n.epochNanoseconds)}function qs(e,n,t,o){let r=e(ie(o).relativeTo),i=Math.max(ze(n),ze(t));if(Ca(k,n,t))return 0;if(kn(i,r))return x(Ce(n),Ce(t));r||T(\"Missing relativeTo\");let a=Eo(r);return x(ct(a,n),ct(a,t))}function ui(e,n){return wn(e,n)||Fo(e,n)}function wn(e,n){return Fe(Se(e),Se(n))}function Fo(e,n){return Fe(oe(e),oe(n))}function js(e,n){return!si(e,n)}function $s(e,n){return!ci(e,n)&&e.timeZone.o===n.timeZone.o&&e.calendar===n.calendar}function Hs(e,n){return!ui(e,n)&&e.calendar===n.calendar}function Gs(e,n){return!wn(e,n)&&e.calendar===n.calendar}function zs(e,n){return!wn(e,n)&&e.calendar===n.calendar}function Vs(e,n){return!wn(e,n)&&e.calendar===n.calendar}function _s(e,n){return!Fo(e,n)}function $n(e){return e===0?gd:e?e.l:void 0}function J(e,n,t=n){return $n(e)?t:n}function di(e,n){let t=e||void 0,o=$n(e),{era:r,eraYear:i,year:a}=n;if(a!==void 0&&(a=U(a,\"year\")),i!==void 0&&(i=U(i,\"eraYear\")),r!==void 0||i!==void 0){r!==void 0&&i!==void 0||S(\"Mismatching era/eraYear\"),o||T(\"Forbidden era/eraYear\");let s=Aa(r),c=o[s];c===void 0&&T((d=>`Invalid era: ${d}`)(r));let u=t?.te?t.te(i,s,c):ml(i,c);a!==void 0&&a!==u&&T(\"Mismatching year/eraYear\"),a=u}else a===void 0&&S(co(o));return a}function io(e,n,t,o,r){let{month:i,monthCode:a}=n;if(a!==void 0){let s=((c,u,d,l,m=La(u))=>{let f=c?c.q(d):void 0,[p,h]=m,y=ir(p,h,f);if(h){let b=c?c.m:void 0;b===void 0&&T(mn),b>0?(y>b&&T(mn),f!==y&&(l===1&&T(mn),y=ir(p,0,f))):(y!==-b&&T(mn),f===void 0&&l===1&&T(mn))}return y})(e,a,t,o,r);i!==void 0&&i!==s&&T(\"Mismatching month/monthCode\"),i=s,o=1}else i===void 0&&S(\"Missing month/monthCode\");return we(\"month\",i,1,it(e,t),o)}function lr(e,n,t,o,r){return rr(n,\"day\",1,at(e,o,t),r)}function ml(e,n){return(n+e)*(Math.sign(n)||1)||0}function Ft(e,n){return po(Me(_,{...ce,...e}),n)}var fl=Rn(\"([+-])(\\\\d{2})(?::?(\\\\d{2})(?::?(\\\\d{2})(?:[.,](\\\\d{1,9}))?)?)?\");function Ro(e){let n=li(e);return n===void 0&&T(Fa(e)),n}function li(e,n){let t=fl.exec(e);if(t&&(o=>(r=>{r[0]!==\"T\"&&r[0]!==\"t\"||(r=r.slice(1));let i=r.search(/[.,]/),a=i<0?r:r.slice(0,i),s=a.split(\":\");return s.length===1?/^(?:\\d{2}|\\d{4}|\\d{6})$/i.test(a):(s.length===2||s.length===3)&&s.every(c=>c.length===2&&/^\\d{2}$/i.test(c))})(o.slice(1)))(t[0]))return((o,r)=>{let i=o[4]||o[5];return r&&i&&T(Ze(i)),s=(On(o[2])*yt+On(o[3])*pt+On(o[4])*_e+gr(o[5]||\"\"))*Dr(o[1]),Math.abs(s)>=Ye&&T(\"Out-of-bounds offset\"),s;var s})(t,n)}var de={era:Wr,month:Xt,monthCode(e,n=\"monthCode\"){return((t,o)=>{if(typeof t==\"string\")return t;if(t&&typeof t==\"object\"){let r=t.toString;if(typeof r==\"function\")return $(r.call(t),o)}return $(t,o)})(e,n)},day:Xt},mi=mt(_,U),Js=mt(k,bo),hl={offset(e){return Ro(Wr(e))}},fi=Object.assign({},de,mi),hi=Object.assign({},fi,hl);function Z(e,n,t,o,r=!o){let i={},a=0;for(let s of n){let c=e[s];if(c!==void 0){a=1;let u=t[s];u&&(c=u(c,s)),i[s]=c}else o&&o.includes(s)&&S(dt(s))}return r&&!a&&S(Pa(n)),i}function Rt(e,n=ce,t){let o=E(e,n);return bn(o),Pe(o,t)}function ut(e,n,t){return Ks(e,n,Qs(e,n),w(t))}function Co(e,n,t){let o=Qs(e,n),r=t();return[Ks(e,n,o,r[0]),...r]}function Ks(e,n,t,o){let r=t[1],i=io(e,n,r,o,t[0]);return N(X(yn(e,r,i,lr(e,n,i,r,o))),e)}function pi(e){if(e.monthCode!==void 0)return La(e.monthCode)}function Qs(e,n){let t=$n(e);return n.year!==void 0||n.era!==void 0&&n.eraYear!==void 0||S(co(t)),n.monthCode===void 0&&n.month===void 0&&S(\"Missing month/monthCode\"),n.day===void 0&&S(dt(\"day\")),[pi(n),di(e,n)]}function yi(e,n,t){let o=$n(e);n.year!==void 0||n.era!==void 0&&n.eraYear!==void 0||S(co(o)),n.monthCode===void 0&&n.month===void 0&&S(\"Missing month/monthCode\");let r=pi(n),i=di(e,n);return N(Io(yn(e,i,io(e,n,i,w(t),r),1)),e)}function Ti(e,n,t){let o=e===se,r=$n(e);n.day===void 0&&S(dt(\"day\")),o||n.month===void 0||n.year!==void 0||n.era!==void 0&&n.eraYear!==void 0||S(co(r));let i=pi(n),a=n.eraYear!==void 0||n.year!==void 0?di(e,n):void 0,s=w(t),c,u,d;if(a===void 0&&o&&(a=1972),a!==void 0){o||X(yn(e,a,1,1));let p=io(e,n,a,s,i);c=lr(e,n,p,a,s),[u,d]=pn(e,a,p)}else{n.monthCode===void 0&&S(\"Missing month/monthCode\"),[u,d]=i;let p=e?e.ge:1972;if(p!==void 0)c=lr(e,n,io(e,n,p,s,i),p,s);else{let h=s===0&&e?e.ke?.(u,d,n.day):void 0;c=h!==void 0?h:n.day}}d&&((e&&e.Z?.[u])??1/0)<n.day&&(s===1&&T(mn),d=0,c=yr(n.day,1,(e&&e.X)??1/0));let l=e?e.v(u,!!d,c):cr(u,!!d);for(;!l&&s===0&&c>1;)c--,l=e?e.v(u,!!d,c):cr(u,!!d);l||T(\"Cannot guess year\");let{year:m,month:f}=l;return N(X(yn(e,m,f,c)),e)}var Ne=Intl.DateTimeFormat;function pl(e,n){n<-864e13&&T($e);let t=e.formatToParts(n),o={};for(let r of t)o[r.type]=r.value;return o}var yl={El_Aaiun:17,Tucuman:12,Tirane:11,Riga:10,Simferopol:9,Vienna:9,Tunis:8,Boa_Vista:6,Fortaleza:6,Maceio:6,Noronha:6,Recife:6,Gaza:6,Hebron:6,DeNoronha:6},tr=-388152e4;function Xs(e,n=4){let t=Ur(e),o=An(e,4),r=Wn(e);return[o,...Di(xn(Re,r,0,n),t)]}function gi(e){return qr(ie(e))}function ec(e,n){return Xs(ie(e),n)}function Di(e,n){return e!=null?[Te[e],e<4?9-3*e:-1]:[n===void 0?1:10**(9-n),n]}function bi(e,n,t){let[o,r,i,a]=(c=>{let u=Ur(c=ie(c)),d=An(c,4),l=Wn(c);return[c.timeZone,d,...Di(xn(Re,l,0,4),u)]})(t),s=o!==void 0;return((c,u,d,l,m,f)=>{d=No(d,BigInt(m),l);let p=u.C(d);return Ni(It(d+BigInt(p)),f)+(c?Ct(ro(p)):\"Z\")})(s,ne(s?e(o):\"UTC\"),n.epochNanoseconds,r,i,a)}function vi(e,n){let t=(o=>{o=ie(o);let r=qr(o),i=Ur(o),a=Xd(o),s=An(o,4),c=Wn(o);return[r,Qd(o),a,s,...Di(xn(Re,c,0,4),i)]})(n);return((o,r,i,a,s,c,u,d,l,m)=>{a=No(a,BigInt(l),d);let f=i.C(a);return Ni(It(a+BigInt(f)),m)+Ct(ro(f),u)+Dl(r,c)+Oi(o,s)})(e.calendar,e.timeZone.id,e.timeZone,e.epochNanoseconds,...t)}function Ii(e,n){let t=(o=>(o=ie(o),[qr(o),...Xs(o)]))(n);return((o,r,i,a,s,c)=>Ni(wo(r,s,a),c)+Oi(o,i))(e.calendar,e,...t)}function wi(e,n){return t=e.calendar,o=e,r=gi(n),ao(o)+Oi(t,r);var t,o,r}function Mi(e,n){return nc(e.calendar,tc,e,gi(n))}function Si(e,n){return nc(e.calendar,gl,e,gi(n))}function nc(e,n,t,o){let r=o>1||o===0&&e!==se;return o===1?e===se?n(t):ao(t):r?ao(t)+rc(ye(e),o===2):n(t)}function Pi(e,n){return((t,o,r,i)=>oc(Mo(t,r,o)[0],i))(e,...ec(n))}function Yo(e,n){let[t,o,r]=ec(n,3);return o>1&&Qe(e={...e,...tl(e,o,t)}),Tl(e,r)}function Tl(e,n){let{sign:t}=e,o=t===-1?H(e):e,{hours:r,minutes:i}=o,a=Us(o),s=Number(a/hn),c=Number(a%hn);As(s);let u=ki(c,n),d=n>=0||!t||u;return(t<0?\"-\":\"\")+\"P\"+wa({Y:ln(o.years),M:ln(o.months),W:ln(o.weeks),D:ln(o.days)})+(r||i||s||d?\"T\"+wa({H:ln(r),M:ln(i),S:ln(s,d)+u}):\"\")}function wa(e){let n=[];for(let t in e){let o=e[t];o&&n.push(o,t)}return n.join(\"\")}function ln(e,n){if(!e&&!n)return\"\";let t=Object.create(null);return t.useGrouping=0,e.toLocaleString(\"fullwide\",t)}function Ni(e,n){return ao(e)+\"T\"+oc(e,n)}function ao(e){return tc(e)+\"-\"+pe(e.day)}function tc(e){let{year:n}=e;return(n<0||n>9999?ic(n)+oo(6,Math.abs(n)):oo(4,n))+\"-\"+pe(e.month)}function gl(e){return pe(e.month)+\"-\"+pe(e.day)}function oc(e,n){let t=[pe(e.hour),pe(e.minute)];return n!==-1&&t.push(pe(e.second)+((o,r,i,a)=>ki(o*ht+r*ft+i,a))(e.millisecond,e.microsecond,e.nanosecond,n)),t.join(\":\")}function Ct(e,n=0){if(n===1)return\"\";let[t,o]=ve(Math.abs(e),yt),[r,i]=ve(o,pt),[a,s]=ve(i,_e);return ic(e)+pe(t)+\":\"+pe(r)+(a||s?\":\"+pe(a)+ki(s):\"\")}function Dl(e,n){return n!==1?\"[\"+(n===2?\"!\":\"\")+e+\"]\":\"\"}function Oi(e,n){return n>1||n===0&&e!==se?rc(ye(e),n===2):\"\"}function rc(e,n){return\"[\"+(n?\"!\":\"\")+\"u-ca=\"+e+\"]\"}var bl=/0+$/;function ki(e,n){let t=oo(9,e);return t=n===void 0?t.replace(bl,\"\"):t.slice(0,n),t?\".\"+t:\"\"}function ic(e){return e<0?\"-\":\"+\"}var vl=/^(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$/,Il=/[^\\w\\/:+-]+/;function ac(e){return Bo($(e))}function Bo(e){return sc(e).id}function sc(e){let n=e.toUpperCase(),t=(r=>{let i=li(r,1);if(i!==void 0)return{id:Ct(i),_:i,o:i}})(n);if(t)return{kind:\"fixed\",...t};let o=n===\"UTC\"?\"UTC\":(r=>(Il.test(r)&&T(pr(r)),vl.test(r)&&T(\"Forbidden ICU TimeZone\"),r.toLowerCase().split(\"/\").map((i,a)=>(i.length<=3||/\\d/.test(i))&&!/etc|yap/.test(i)?i.toUpperCase():i.replace(/baja|dumont|[a-z]+/g,(s,c)=>s.length<=2&&!a||s===\"in\"||s===\"chat\"?s.toUpperCase():s.length>2||!c?Ta(s).replace(/island|noronha|murdo|rivadavia|urville/,Ta):s)).join(\"/\")))(e);return wl(o)}var wl=En(e=>{if(e===\"UTC\")return{kind:\"utc\",id:e,o:e};let n=e.toUpperCase(),t=Ml(n);return{kind:\"named\",id:e,format:t,o:t.resolvedOptions().timeZone}}),Ml=En(e=>new Ne(\"en-u-hc-h23\",{calendar:\"iso8601\",timeZone:e,era:\"short\",year:\"numeric\",month:\"numeric\",day:\"numeric\",hour:\"numeric\",minute:\"numeric\",second:\"numeric\"}));function ne(e){let n=sc(e);return Sl(n.id,n)}var Sl=En((e,n)=>n.kind===\"named\"?new fr(e,n.o,n.format):new mr(e,n.o,n.kind===\"fixed\"?n._:0)),mr=class{constructor(n,t,o){this.id=n,this.o=t,this._=o}C(){return this._}R(n){return[Hr(n,this._)]}U(){}},fr=class{constructor(n,t,o){this.id=n,this.o=t,this.qe=((r,i)=>{let a=En(r),s=En(Pl),c=86400*i;function u(l){let[m,f]=Sa(l,c),p=no(m),h=no(f),y=a(p),b=a(h);return y===b?y:d(s(p,h),y,b,l)}function d(l,m,f,p){let h,y;for(;(p===void 0||(h=p<l[0]?m:p>=l[1]?f:void 0)===void 0)&&(y=l[1]-l[0]);){let b=l[0]+Math.floor(y/2);r(b)===f?l[1]=b:l[0]=b+1}return h}return{Ee(l){let m=u(l-86400),f=u(l+86400),p=l-m,h=l-f;if(m===f)return[p];let y=u(p);return y===u(h)?[l-y]:m>f?[p,h]:[]},De:u,U:function l(m,f){if(f>0&&m>=864e10)return;if(f<0){if(m<=tr)return;let I=Ma()+94867200;if(m>I)return l(I,-1)}let p=f>0?Math.max(m,tr):m,[h,y]=Sa(p,c),b=c*f,v=f>0?Math.max(m,Ma())+94867200:tr,D=()=>f<0?y>v:h<v;for(;D();){let I=no(h),F=no(y),j=a(I),K=a(F);if(j!==K){let Q=s(I,F);d(Q,j,K);let V=Q[0];if((Fe(V,m)||1)===f)return V}h+=b,y+=b}}}})((r=>i=>{let a=pl(r,1e3*i);return 86400*rt((s=>{let c=s.relatedYear;if(c!==void 0)return parseInt(c);let u=parseInt(s.year);return s.era!==void 0&&Aa(s.era)===\"bce\"?1-u:u})(a),parseInt(a.month),parseInt(a.day))+3600*parseInt(a.hour)+60*parseInt(a.minute)+parseInt(a.second)-i})(o),(r=>{let i=r.split(\"/\").pop();return yl[i]||60})(n))}C(n){return this.qe.De((t=>ga(t)[0])(n))*_e}R(n){let t=86400*Se(n)+Nr(n),o=Qa(n);return this.qe.Ee(t).map(r=>ge(BigInt(r)*hn+BigInt(o)))}U(n,t){let[o,r]=ga(n),i=this.qe.U(o+(t>0||r?1:0),t);if(i!==void 0)return BigInt(i)*hn}};function Ma(){return Math.floor(Date.now()/1e3)}function Pl(e,n){return[e,n]}function Sa(e,n){let t=Math.floor(e/n)*n;return[t,t+n]}function no(e){return yr(e,-1e10,864e10)}function cc(e,n,t){let o=Z(t,J(n,Ja,Ka),hi,[],0);if(o.timeZone!==void 0){let r=ut(n,o),i=Ft(o),a=ne(e(o.timeZone));return{epochNanoseconds:qn(a,E(r,i),o.offset),timeZone:a,calendar:n}}return ut(n,o)}function uc(e,n,t,o){let r=Z(t,J(n,Ja,Ka),hi,Sr,0),i=e(r.timeZone),[a,s,c,u]=Co(n,r,()=>Zn(o)),d=Ft(r,s),l=ne(i);return De(qn(l,E(a,d),r.offset,c,u),l,n)}function dc(e,n,t){let o=Z(n,J(e,Va,_a),fi,[],0),[r,i]=Co(e,o,()=>[w(t)]);return Rt(r,Ft(o,i),e)}function lc(e,n,t,o=[]){return ut(e,Z(n,J(e,gn,Dn),de,o),t)}function mc(e,n,t,o){return yi(e,Z(n,J(e,gt,Ha),de,o),t)}function fc(e,n,t,o){let r=Z(t,J(e,gn,Dn),de,Tn,0);return n&&r.month!==void 0&&r.monthCode===void 0&&r.year===void 0&&(r.year=1972),Ti(e,r,o)}function hc(e,n){return Ft(Z(e,sr,mi,[],1),w(n))}function pc(e){let n=Z(e,ls,Js);return B(Qe({...R,...n}))}function ae(e){T(Fa(e))}function yc(e){let n=Xe(e=Wr(e)),t;return n||ae(e),n.F?t=0:n.offset?t=Ro(n.offset):ae(e),n.timeZoneId&&li(n.timeZoneId,1),wt(n),ue(Hr(n,t))}function Tc(e,n){let t=Xe($(e));return t||ae(e),t.timeZoneId?Nc(t,n,void 0):(t.F&&ae(e),hr(t,n))}function gc(e,n,t){let o=Xe($(e));return o&&o.timeZoneId||ae(e),Nc(o,n,t)}function Dc(e,n){let t=Xe($(e));return t&&!t.F||ae(e),Oc(t,n)}function bc(e,n){let t=Zi(xi($(e)),void 0,n);return N(t,t.calendar)}function vc(e,n){let t=Ri($(e));if(t)return Ei(t),N(Io(Be(t)),n(t.calendarId));let o=Zi(xi(e),Nl,n),{calendar:r}=o;return N(st(r,o),r)}function Ei(e){e.calendarId!==\"iso8601\"&&T(Ze(e.calendarId))}function Ic(e,n){let t=Ci($(e));if(t)return Ei(t),N(Be(t),n(t.calendarId));let o=Zi(xi(e),Ol,n),{calendar:r}=o,{year:i,month:a,day:s}=P(r,o),[c,u]=pn(r,i,a),{year:d,month:l}=((m,f,p,h)=>{let y=m?m.v(f,p,h):cr(f,p);return y||T(\"Cannot guess year\"),y})(r,c,u,s);return N(X(yn(r,d,l,s)),r)}function wc(e){let n=(o=>{let r=Ec(o);return r?(Yt(r[13]),xc(r,1)):void 0})(e=$(e)),t;return n||(n=Xe(e),n?(n.fe||ae(e),n.F&&T(Ze(\"Z\")),Ei(n)):ae(e)),(t=Ri(e))&&Da(t)&&ae(e),(t=Ci(e))&&Da(t)&&ae(e),vn(bt(n))}function Mc(e){let n=(t=>{let o=Cl.exec(t);return o?(r=>{let i=0,a=0,s=0,c={years:u(r[2]),months:u(r[3]),weeks:u(r[4]),days:u(r[5]),hours:u(r[6],r[7],5),minutes:u(r[8],r[9],4),seconds:u(r[10],r[11],3),...ri(s,2,k)};return i||T(Pa(k)),Dr(r[1])<0&&(c=H(c)),c;function u(d,l,m){let f=0,p=0;return m&&([f,s]=ve(s,Te[m])),d!==void 0&&(a&&T(Ze(d)),p=(h=>{let y=parseInt(h);return Number.isFinite(y)||T(Ze(h)),y})(d),i=1,l&&(s=gr(l)*(Te[m]/_e),a=1)),f+p}})(o):void 0})($(e));return n||ae(e),B(Qe(n))}function Sc(e){let n=Xe(e)||Ri(e)||Ci(e);if(n)return n.calendarId;let t=Ec(e);return t?Yt(t[13]).calendarId:e}function Pc(e){let n=Xe(e);return n&&(n.timeZoneId||n.F&&\"UTC\"||n.offset)||e}function xi(e){let n=Xe(e);return n&&!n.F||ae(e),n}function Zi(e,n,t){return n&&e.calendarId===\"iso8601\"?(Be(e),e.fe&&bt(e),hr(n(e),t)):e.fe?Oc(e,t):hr(e,t)}function Nl(e){let n=12*e.year+e.month===bs?20:1;return{...e,day:n}}function Ol(e){return{...e,year:1972}}function Nc(e,n,t){let o=ne(Bo(e.timeZoneId)),r;if(wt(e),e.fe){let a=e.offset?Ro(e.offset):void 0,[,s,c]=Zn(t);r=qn(o,e,a,s,c,!(o._||e.offset===void 0||(i=e.offset,i.replace(/\\D/g,\"\").length>4)),e.F)}else Zn(t),r=He(o,e);var i;return ge(r),De(r,o,n(e.calendarId))}function Oc(e,n){return wt(e),bn(e),{...E(e,e),calendar:n(e.calendarId)}}function hr(e,n){return Be(e),X(e),{calendar:n(e.calendarId),year:e.year,month:e.month,day:e.day}}function Fi(e){return`(\\\\d{2})(?:(:?)(\\\\d{2})(?:\\\\${e}(\\\\d{2})(?:[.,](\\\\d{1,9}))?)?)?`}function kc(e){return\"([+-])\"+Fi(e)}var kl=\"(?:(?:([+-])(\\\\d{6}))|(\\\\d{4}))(-?)(\\\\d{2})\\\\4(\\\\d{2})(?:[T ]\"+Fi(8)+\"(Z|\"+kc(15)+\")?)?\",El=Rn(\"(?:(?:([+-])(\\\\d{6}))|(\\\\d{4}))-?(\\\\d{2})((?:\\\\[(!?)([^\\\\]]*)\\\\]){0,9})\"),xl=Rn(\"(?:--)?(\\\\d{2})-?(\\\\d{2})((?:\\\\[(!?)([^\\\\]]*)\\\\]){0,9})\"),Zl=Rn(kl+\"((?:\\\\[(!?)([^\\\\]]*)\\\\]){0,9})\"),Fl=Rn(\"T?\"+Fi(2)+`(${kc(9)})?((?:\\\\[(!?)([^\\\\]]*)\\\\]){0,9})`),Rl=new RegExp(\"\\\\[(!?)([^\\\\]]*)\\\\]\",\"g\"),Cl=Rn(\"([+-])?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)?)?\");function Xe(e){let n=Zl.exec(e);return n?(t=>{let o=t[12],r=(o||\"\").toUpperCase()===\"Z\";return{year:Zc(t),month:parseInt(t[5]),day:parseInt(t[6]),...xc(t,7),...Yt(t[19]),fe:!!t[7],F:r,offset:r?void 0:o}})(n):void 0}function Ri(e){let n=El.exec(e);if(n)return(t=>({year:Zc(t),month:parseInt(t[4]),day:1,...Yt(t[5])}))(n)}function Ci(e){let n=xl.exec(e);return n?(t=>({year:1972,month:parseInt(t[1]),day:parseInt(t[2]),...Yt(t[3])}))(n):void 0}function Ec(e){let n=Fl.exec(e);if(n)return n[6]&&Ro(n[6]),n}function xc(e,n){let t=On(e[n+3]);return{...Or(gr(e[n+4]||\"\"))[0],hour:On(e[n]),minute:On(e[n+2]),second:t===60?59:t}}function Zc(e){let n=Dr(e[1]),t=parseInt(e[2]||e[3]);return n<0&&!t&&T(Ze(-0)),n*t}function Yt(e){let n,t,o=[];return e.replace(Rl,(r,i,a)=>{let s=!!i,[c,u]=a.split(\"=\").reverse();return u?u===\"u-ca\"?(o.push(c.toLowerCase()),n||(n=s)):(s||/[A-Z]/.test(u))&&T(Ze(r)):(t&&T(Ze(r)),t=c),\"\"}),o.length>1&&n&&T(Ze(e)),{timeZoneId:t,calendarId:o[0]||\"iso8601\"}}function Hn(e,n,t){let o=Object.assign(Object.create(null),n);return or(o,t,$a),$n(e)&&(or(o,t,wd),e&&e.le&&or(o,t,Md,Bn)),o}function or(e,n,t,o){let r=0,i=[];for(let a of t)n[a]!==void 0?r=1:i.push(a);if(Object.assign(e,n),r)for(let a of o||i)delete e[a]}function Fc(e,n,t){let{calendar:o,timeZone:r}=e,i=J(o,Pd,Nd),a=W(e),{year:s,month:c,day:u}=P(o,a),d={year:s,monthCode:Bt(o,s,c),day:u,hour:a.hour,minute:a.minute,second:a.second,millisecond:a.millisecond,microsecond:a.microsecond,nanosecond:a.nanosecond,offset:a.offsetNanoseconds},l=Z(n,i,hi),m=Hn(o,d,l),f={...d,...l},[p,h,y,b]=Co(o,m,()=>Zn(t,2));return De(qn(r,E(p,po(f,h)),f.offset,y,b),r,o)}function Rc(e,n,t){let{calendar:o}=e,r=J(o,Va,_a),{year:i,month:a,day:s}=P(o,e),c={year:i,monthCode:Bt(o,i,a),day:s,hour:e.hour,minute:e.minute,second:e.second,millisecond:e.millisecond,microsecond:e.microsecond,nanosecond:e.nanosecond},u=Z(n,r,fi),d=Hn(o,c,u),l={...c,...u},[m,f]=Co(o,d,()=>[w(t)]);return Rt(m,po(l,f),o)}function Cc(e,n,t){let{calendar:o}=e,r=J(o,gn,Dn),{year:i,month:a,day:s}=P(o,e);return ut(o,Hn(o,{year:i,monthCode:Bt(o,i,a),day:s},Z(n,r,de)),t)}function Yc(e,n,t){let{calendar:o}=e,r=J(o,gt,Ha),{year:i,month:a}=P(o,e);return yi(o,Hn(o,{year:i,monthCode:Bt(o,i,a)},Z(n,r,de)),t)}function Bc(e,n,t){let{calendar:o}=e,r=J(o,gn,Dn),{year:i,month:a,day:s}=P(o,e);return Ti(o,Hn(o,{monthCode:Bt(o,i,a),day:s},Z(n,r,de)),t)}function Wc(e,n,t){return((o,r,i)=>Ft({...Me(sr,o),...Z(r,sr,mi)},w(i)))(e,n,t)}function Ac(e,n){return B((t=e,o=n,Qe({...t,...Z(o,ls,Js)})));var t,o}function Bt(e,n,t){let[o,r]=pn(e,n,t);return qa(o,r)}function Uc(e,n,t){return De(e.epochNanoseconds,n,t)}function Lc(e){return ue(e.epochNanoseconds)}function Yi(e){return Pe(W(e),e.calendar)}function Bi(e){return N(W(e),e.calendar)}function Wi(e){return vn(W(e))}function qc(e,n,t){let o=((r,i,a)=>{let s=(c=>ys(ie(c)))(a);return kt(r,i,s)})(n,e,t);return De(ge(o),n,e.calendar)}function jc(e,n,t,o){let r=e(o.timeZone),i=o.plainTime,a=i!==void 0?n(i):void 0,s=ne(r),c;return c=a?kt(s,E(t,a)):He(s,E(t,ce)),De(c,s,t.calendar)}function $c(e,n,t){return Vc(e,Me(J(e,Dt,Ga),n),Z(dn(t),Tn,de,[]))}function Hc(e,n,t){let o=J(e,fo,Sd);return Vc(e,Me(za,n),Z(dn(t),o,de,[]))}function Gc(e,n){return Ti(e,Z(n,za,de))}function zc(e,n,t){return yi(e,Z(n,J(e,Dt,Ga),de),t)}function Vc(e,n,t){let o=J(e,Od,kd),r=Hn(e,n,t);return r=Z(r,o,de,[]),ut(e,r)}function _c(e){return ue(ge(BigInt(bo(e))*Yn))}function Jc(e){return ue(ge(Do(e)))}function Gn(e){return e.timeZone=\"UTC\",[\"full\",\"long\"].includes(e.timeStyle)&&(e.timeStyle=\"medium\"),e}function Kc(e,n){return e.timeZone!==void 0&&S(\"Cannot specify TimeZone\"),e.timeZone=n,e}function zn(e,n,t){let o=e.resolvedOptions().calendar;!t&&n.calendar===se||ye(n.calendar)===o||T(\"Mismatching Calendars\")}function Mn(e,n,t,o,r){let i=new Set(e),a=new Set(n),s=new Set(t);return(c,u)=>{let d=((I,F,j,K)=>{let Q={dateStyle:void 0,timeStyle:void 0,me:{},pe:{},xe:{},oe:0,ue:0};for(let V of Object.keys(I)){let Pn=I[V];Pn===void 0||K.has(V)||(F.has(V)?V===\"dateStyle\"?Q.dateStyle=Pn:V===\"timeStyle\"?Q.timeStyle=Pn:Q.me[V]=Pn:V===\"era\"?Q.pe[V]=Pn:j.has(V)?V===\"dateStyle\"||V===\"timeStyle\"?Q.ue=1:Q.oe=1:Q.xe[V]=Pn)}return Q})(c,i,a,s),l=d.dateStyle!==void 0,m=d.timeStyle!==void 0,f=l||m,p=Object.keys(d.me).length>0,h=d.oe||d.ue,y=p||l||m,b=Object.keys(d.pe).length>0,v=p||b||d.oe;(!u&&h||u&&h&&!y||f&&v)&&S(\"Invalid formatting options\");let D={};return f||y||Object.assign(D,o),Object.assign(D,d.me,d.pe,d.xe),l&&(r?Object.assign(D,r[d.dateStyle]):D.dateStyle=d.dateStyle),m&&(D.timeStyle=d.timeStyle),D}}var Qc={year:\"numeric\",month:\"numeric\",day:\"numeric\"},Xc={hour:\"numeric\",minute:\"numeric\",second:\"numeric\"},Ai=Object.assign({},Qc,Xc),Yl=Object.assign({},Ai,{timeZoneName:\"short\"}),Bl={year:\"numeric\",month:\"numeric\"},Wl={month:\"numeric\",day:\"numeric\"},Ui=[\"weekday\",\"year\",\"month\",\"day\",\"dateStyle\"],Wt=[\"dayPeriod\",\"hour\",\"minute\",\"second\",\"fractionalSecondDigits\",\"timeStyle\"],Li=Ui.concat(Wt),Al=[\"weekday\",\"day\"].concat(Wt),Ul=[\"weekday\",\"year\"].concat(Wt),eu=Mn(Li,[],[],Ai),nu=Mn(Li,[],[],Yl),tu=Mn(Li,[],[\"timeZoneName\"],Ai),ou=Mn(Ui,Wt,[\"timeZoneName\"],Qc),ru=Mn(Wt,Ui,[\"timeZoneName\",\"era\"],Xc),iu=Mn([\"year\",\"month\",\"dateStyle\"],Al,[\"timeZoneName\"],Bl,{full:{year:\"numeric\",month:\"long\"},long:{year:\"numeric\",month:\"long\"},medium:{year:\"numeric\",month:\"short\"},short:{year:\"2-digit\",month:\"numeric\"}}),au=Mn([\"month\",\"day\",\"dateStyle\"],Ul,[\"timeZoneName\",\"era\"],Wl,{full:{month:\"long\",day:\"numeric\"},long:{month:\"long\",day:\"numeric\"},medium:{month:\"short\",day:\"numeric\"},short:{month:\"numeric\",day:\"numeric\"}});function su(e,n){let{timeZone:t}=e,o=W(e),{offsetNanoseconds:r}=o,i=n||ce,a;return a=n?qn(t,E(o,i),r,2):He(t,E(o,i)),De(a,t,e.calendar)}function Wo(e){let n=Ao(),t=e.C(n);return It(n+BigInt(t))}function Ao(){return BigInt(Date.now())*Yn}function Vn(){return new Ne().resolvedOptions().timeZone}var qi=\"PlainYearMonth\",ji=\"PlainMonthDay\",$i=\"PlainDate\",Hi=\"PlainDateTime\",Gi=\"PlainTime\",zi=\"ZonedDateTime\",Vi=\"Instant\",_i=\"Duration\";function Ae(e,n,t,...o){Object.defineProperties(n,Ra(e)),Object.defineProperties(n.prototype,lt(\"Temporal.\"+e));for(let r of o)Ll(n.prototype,t,r);return n}function Ll(e,n,t){Object.defineProperties(e,Ve(o=>({get(){return o(n(this))},configurable:1}),t))}var Ue=Tr.name===\"noop\"?e=>{Object.defineProperty(e,\"_str_\",{value:e.toJSON()})}:Tr;function Le(){S(Ea)}function qe(){S(ka)}var uu={era(e){return Mt(e.calendar,e).era},eraYear(e){return Mt(e.calendar,e).eraYear},year(e){return P(e.calendar,e).year},month(e){return P(e.calendar,e).month},monthCode(e){return go(e.calendar,e)}},Uo={era(e){return Mt(e.calendar,e).era},eraYear(e){return Mt(e.calendar,e).eraYear},year(e){return P(e.calendar,e).year},month(e){return P(e.calendar,e).month},monthCode(e){return go(e.calendar,e)},day(e){return P(e.calendar,e).day}},du={monthCode(e){return go(e.calendar,e)},day(e){return P(e.calendar,e).day}},Ji={daysInMonth(e){return xr(e.calendar,e)},daysInYear(e){return Zr(e.calendar,e)},monthsInYear(e){return Er(e.calendar,e)},inLeapYear(e){return kr(e.calendar,e)}},At={dayOfWeek(e){return To(e)},dayOfYear(e){return cs(e.calendar,e)},weekOfYear(e){return us(e.calendar,e)},yearOfWeek(e){return ds(e.calendar,e)},daysInWeek(){return 7},daysInMonth(e){return xr(e.calendar,e)},daysInYear(e){return Zr(e.calendar,e)},monthsInYear(e){return Er(e.calendar,e)},inLeapYear(e){return kr(e.calendar,e)}};function cu(e){return lo(Object.keys(e))}cu(Ji),cu(At);function on(e){let n=$(e).toLowerCase();return n===Ir?se:n===Wa?Ua:void T(Za(e,\"temporal-polyfill/full\"))}function qt(e=Ir){return on(e)}var mu=new WeakMap,fu=Ae(zi,class{constructor(e,n,t=void 0){let o=ge(Do(e)),r=ne(ac(n)),i=qt(t);hu(this,De(o,r,i))}static from(e,n=void 0){return te(_n(e,n))}static compare(e,n){return ci(_n(e),_n(n))}get calendarId(){return ye(M(this).calendar)}get timeZoneId(){return M(this).timeZone.id}get epochMilliseconds(){return Pt(M(this))}get epochNanoseconds(){return Nt(M(this))}get offset(){return Ct(W(M(this)).offsetNanoseconds)}get offsetNanoseconds(){return W(M(this)).offsetNanoseconds}get hoursInDay(){return Ss(M(this))}with(e,n=void 0){return te(Fc(M(this),et(e),n))}withCalendar(e){return te({...M(this),calendar:jo(e)})}withTimeZone(e){return te({...M(this),timeZone:ne(fe(e))})}withPlainTime(e=void 0){return te(su(M(this),ea(e)))}add(e,n=void 0){let t=M(this);return te(Et(t,q(e),n))}subtract(e,n=void 0){let t=M(this);return te(Et(t,H(q(e)),n))}until(e,n=void 0){let t=M(this),o=_n(e),r=We(t.calendar,o.calendar);return Y(B(Kr(0,r,t,o,n)))}since(e,n=void 0){let t=M(this),o=_n(e),r=We(t.calendar,o.calendar);return Y(B(Kr(1,r,t,o,n)))}round(e){let n=M(this),[t,o,r]=St(e);return te(Ms(n,t,o,r))}startOfDay(){return te(Ps(M(this)))}equals(e){return $s(M(this),_n(e))}toInstant(){return je(Lc(M(this)))}toPlainDateTime(){return Oe(Yi(M(this)))}toPlainDate(){return ke(Bi(M(this)))}toPlainTime(){return tn(Wi(M(this)))}toLocaleString(e=void 0,n={}){let t=M(this),o=new Ne(e,Kc(nu(n),Es(t)));return zn(o,t),o.format(Pt(t))}toString(e=void 0){return vi(M(this),e)}toJSON(){return vi(M(this))}getTimeZoneTransition(e){let n=M(this),t=Os(n,e);return t?te({...n,epochNanoseconds:t}):null}valueOf(){return qe()}},ql,Uo,At,Tt);function te(e){return hu(Object.create(fu.prototype),e)}function M(e){return Ee(e)||Le()}function ql(e){let n=M(e);return{...W(n),calendar:n.calendar}}function Ee(e){return mu.get(e)}function _n(e,n){if(ee(e)){let t=Ee(e);if(t)return Zn(n),t;let o=jt(e);return uc(fe,o,e,n)}return gc(e,on,n)}function hu(e,n){return mu.set(e,n),Ue(e),e}function fe(e){if(ee(e)){let n=Ee(e);return n||S(pr(e)),n.timeZone.id}return(n=>Bo(Pc($(n))))(e)}var pu=new WeakMap,yu=Ae(Vi,class{constructor(e){let n=ge(Do(e));gu(this,ue(n))}static from(e){return je(Jn(e))}static fromEpochMilliseconds(e){return je(_c(e))}static fromEpochNanoseconds(e){return je(Jc(e))}static compare(e,n){return si(Jn(e),Jn(n))}get epochMilliseconds(){return Pt(le(this))}get epochNanoseconds(){return Nt(le(this))}add(e){let n=le(this);return je(ue(_r(n.epochNanoseconds,q(e))))}subtract(e){let n=le(this);return je(ue(_r(n.epochNanoseconds,H(q(e)))))}until(e,n=void 0){return Y(Jr(0,le(this),Jn(e),n))}since(e,n=void 0){return Y(Jr(1,le(this),Jn(e),n))}round(e){let n=le(this),[t,o,r]=St(e,5,1);return je(ue(No(n.epochNanoseconds,Ot(t,o),r)))}equals(e){return js(le(this),Jn(e))}toZonedDateTimeISO(e){return te(Uc(le(this),ne(fe(e))))}toLocaleString(e=void 0,n={}){let t=le(this);return new Ne(e,eu(n)).format(Pt(t))}toString(e=void 0){return bi(fe,le(this),e)}toJSON(){return bi(fe,le(this))}valueOf(){return qe()}});function je(e){return gu(Object.create(yu.prototype),e)}function le(e){return Qi(e)||Le()}function Qi(e){return pu.get(e)}function Jn(e){if(ee(e)){let n=Qi(e);if(n)return n;let t=Ee(e);if(t)return ue(t.epochNanoseconds)}return yc(e)}var{toTemporalInstant:Tu}={toTemporalInstant(){let e=Date.prototype.valueOf.call(this);return je(ue(BigInt(Yr(e))*Yn))}};function gu(e,n){return pu.set(e,n),Ue(e),e}var Du=new WeakMap,bu=Ae(ji,class{constructor(e,n,t=void 0,o){let r=U(e),i=U(n),a=qt(t),s=U(o??ts),c=X(Be({year:s,month:r,day:i}));vu(this,N(c,a))}static from(e,n=void 0){return Ki(lu(e,n))}get calendarId(){return ye(en(this).calendar)}with(e,n=void 0){return Ki(Bc(en(this),et(e),n))}equals(e){return Vs(en(this),lu(e))}toPlainDate(e){let n=en(this);return ke(Hc(n.calendar,this,e))}toLocaleString(e=void 0,n={}){let t=en(this),o=new Ne(e,Gn(au(n)));return zn(o,t,1),o.format(vt(t))}toString(e=void 0){return Si(en(this),e)}toJSON(){return Si(en(this))}valueOf(){return qe()}},en,du);function Ki(e){return vu(Object.create(bu.prototype),e)}function en(e){return Lo(e)||Le()}function Lo(e){return Du.get(e)}function lu(e,n){if(ee(e)){let o=Lo(e);if(o)return w(n),o;let r=Ru(e);return fc(r===void 0?se:r,r===void 0,e,n)}let t=Ic(e,on);return w(n),t}function vu(e,n){return Du.set(e,n),Ue(e),e}var Iu=new WeakMap,wu=Ae(qi,class{constructor(e,n,t=void 0,o){let r=U(e),i=U(n),a=qt(t),s=U(o??1),c=Io(Be({year:r,month:i,day:s}));Mu(this,N(c,a))}static from(e,n=void 0){return Lt(Kn(e,n))}static compare(e,n){return wn(Kn(e),Kn(n))}get calendarId(){return ye(me(this).calendar)}with(e,n=void 0){return Lt(Yc(me(this),et(e),n))}add(e,n=void 0){let t=me(this);return Lt(N(Vr(0,t.calendar,t,q(e),n),t.calendar))}subtract(e,n=void 0){let t=me(this);return Lt(N(Vr(1,t.calendar,t,q(e),n),t.calendar))}until(e,n=void 0){let t=me(this),o=Kn(e),r=We(t.calendar,o.calendar);return Y(ei(0,r,t,o,n))}since(e,n=void 0){let t=me(this),o=Kn(e),r=We(t.calendar,o.calendar);return Y(ei(1,r,t,o,n))}equals(e){return zs(me(this),Kn(e))}toPlainDate(e){let n=me(this);return ke($c(n.calendar,this,e))}toLocaleString(e=void 0,n={}){let t=me(this),o=new Ne(e,Gn(iu(n)));return zn(o,t,1),o.format(vt(t))}toString(e=void 0){return Mi(me(this),e)}toJSON(){return Mi(me(this))}valueOf(){return qe()}},me,uu,Ji);function Lt(e){return Mu(Object.create(wu.prototype),e)}function me(e){return qo(e)||Le()}function qo(e){return Iu.get(e)}function Kn(e,n){if(ee(e)){let o=qo(e);if(o)return w(n),o;let r=jt(e);return mc(r,e,n)}let t=vc(e,on);return w(n),t}function Mu(e,n){return Iu.set(e,n),Ue(e),e}function jl(e){if(!ee(e))return;let n=Qi(e);return n?[Vi,n]:(n=Ee(e),n?[zi,n]:(n=Sn(e),n?[Hi,n]:(n=nt(e),n?[$i,n]:(n=Xi(e),n?[Gi,n]:(n=qo(e),n?[qi,n]:(n=Lo(e),n?[ji,n]:(n=na(e),n?[_i,n]:void 0)))))))}function et(e){return(jl(e)||e.calendar!==void 0||e.timeZone!==void 0)&&S(Na),e}var Su=new WeakMap,Pu=Ae(Gi,class{constructor(e=0,n=0,t=0,o=0,r=0,i=0){let a=bt(Ve(U,{hour:e,minute:n,second:t,millisecond:o,microsecond:r,nanosecond:i}));Nu(this,vn(a))}static from(e,n=void 0){return tn(nn(e,n))}static compare(e,n){return Fo(nn(e),nn(n))}with(e,n=void 0){return tn(Wc(be(this),et(e),n))}add(e){let n=be(this);return tn(Oo(n,q(e))[0])}subtract(e){let n=be(this);return tn(Oo(n,H(q(e)))[0])}until(e,n=void 0){return Y(ni(0,be(this),nn(e),n))}since(e,n=void 0){return Y(ni(1,be(this),nn(e),n))}round(e){let n=be(this),[t,o,r]=St(e,5);return tn(Mo(n,Ln(t,o),r)[0])}equals(e){return _s(be(this),nn(e))}toLocaleString(e=void 0,n={}){let t=be(this);return new Ne(e,Gn(ru(n))).format(Pr(t))}toString(e=void 0){return Pi(be(this),e)}toJSON(){return Pi(be(this))}valueOf(){return qe()}},be,Tt);function tn(e){return Nu(Object.create(Pu.prototype),e)}function be(e){return Xi(e)||Le()}function Xi(e){return Su.get(e)}function nn(e,n){if(ee(e)){let o=Xi(e);if(o)return w(n),o;let r=Sn(e);if(r)return w(n),vn(r);let i=Ee(e);return i?(w(n),Wi(i)):hc(e,n)}let t=wc(e);return w(n),t}function ea(e){return e===void 0?void 0:nn(e)}function Nu(e,n){return Su.set(e,n),Ue(e),e}var Ou=new WeakMap,ku=Ae(Hi,class{constructor(e,n,t,o=0,r=0,i=0,a=0,s=0,c=0,u=void 0){let d=bn(wt(Ve(U,{year:e,month:n,day:t,hour:o,minute:r,second:i,millisecond:a,microsecond:s,nanosecond:c}))),l=qt(u);Eu(this,Pe(d,l))}static from(e,n=void 0){return Oe(Qn(e,n))}static compare(e,n){let t=Qn(e),o=Qn(n);return ui(t,o)}get calendarId(){return ye(L(this).calendar)}with(e,n=void 0){return Oe(Rc(L(this),et(e),n))}withCalendar(e){let n=L(this);return Oe(Pe(n,jo(e)))}withPlainTime(e=void 0){let n=L(this);return Oe(Rt(n,ea(e),n.calendar))}add(e,n=void 0){let t=L(this);return Oe(Pe(xt(t.calendar,t,q(e),n),t.calendar))}subtract(e,n=void 0){let t=L(this);return Oe(Pe(xt(t.calendar,t,H(q(e)),n),t.calendar))}until(e,n=void 0){let t=L(this),o=Qn(e),r=We(t.calendar,o.calendar);return Y(Qr(0,r,t,o,n))}since(e,n=void 0){let t=L(this),o=Qn(e),r=We(t.calendar,o.calendar);return Y(Qr(1,r,t,o,n))}round(e){let n=L(this),[t,o,r]=St(e);return Oe(Pe(wo(n,Ln(t,o),r),n.calendar))}equals(e){return Hs(L(this),Qn(e))}toZonedDateTime(e,n=void 0){return te(qc(L(this),ne(fe(e)),n))}toPlainDate(){let e=L(this);return ke(N(e,e.calendar))}toPlainTime(){return tn(vn(L(this)))}toLocaleString(e=void 0,n={}){let t=L(this),o=new Ne(e,Gn(tu(n)));return zn(o,t),o.format(es(t))}toString(e=void 0){return Ii(L(this),e)}toJSON(){return Ii(L(this))}valueOf(){return qe()}},L,Uo,At,Tt);function Oe(e){return Eu(Object.create(ku.prototype),e)}function L(e){return Sn(e)||Le()}function Sn(e){return Ou.get(e)}function Qn(e,n){if(ee(e)){let o=Sn(e);if(o)return w(n),o;let r=nt(e);if(r)return w(n),Pe(E(r,ce),r.calendar);let i=Ee(e);if(i)return w(n),Yi(i);let a=jt(e);return dc(a,e,n)}let t=Dc(e,on);return w(n),t}function Eu(e,n){return Ou.set(e,n),Ue(e),e}var xu=new WeakMap,Zu=Ae($i,class{constructor(e,n,t,o=void 0){let r=X(Be(Ve(U,{year:e,month:n,day:t}))),i=qt(o);Fu(this,N(r,i))}static from(e,n=void 0){return ke(Xn(e,n))}static compare(e,n){return wn(Xn(e),Xn(n))}get calendarId(){return ye(G(this).calendar)}with(e,n=void 0){let t=G(this);return ke(Cc(t,et(e),n))}withCalendar(e){let n=G(this);return ke(N(n,jo(e)))}add(e,n=void 0){let t=G(this);return ke(N(jn(t.calendar,t,q(e),n),t.calendar))}subtract(e,n=void 0){let t=G(this);return ke(N(jn(t.calendar,t,H(q(e)),n),t.calendar))}until(e,n=void 0){let t=G(this),o=Xn(e),r=We(t.calendar,o.calendar);return Y(Xr(0,r,t,o,n))}since(e,n=void 0){let t=G(this),o=Xn(e),r=We(t.calendar,o.calendar);return Y(Xr(1,r,t,o,n))}equals(e){return Gs(G(this),Xn(e))}toZonedDateTime(e){let n=ee(e)?{timeZone:e.timeZone,plainTime:e.plainTime}:{timeZone:e};return te(jc(fe,nn,G(this),n))}toPlainDateTime(e=void 0){let n=G(this);return Oe(Rt(n,ea(e),n.calendar))}toPlainYearMonth(){let e=G(this);return Lt(zc(e.calendar,this))}toPlainMonthDay(){let e=G(this);return Ki(Gc(e.calendar,this))}toLocaleString(e=void 0,n={}){let t=G(this),o=new Ne(e,Gn(ou(n)));return zn(o,t),o.format(vt(t))}toString(e=void 0){return wi(G(this),e)}toJSON(){return wi(G(this))}valueOf(){return qe()}},G,Uo,At);function ke(e){return Fu(Object.create(Zu.prototype),e)}function G(e){return nt(e)||Le()}function nt(e){return xu.get(e)}function Xn(e,n){if(ee(e)){let o=nt(e);if(o)return w(n),o;let r=Sn(e);if(r)return w(n),N(r,r.calendar);let i=Ee(e);if(i)return w(n),Bi(i);let a=jt(e);return lc(a,e,n)}let t=bc(e,on);return w(n),t}function Fu(e,n){return xu.set(e,n),Ue(e),e}function jt(e){let n=Ru(e);return n===void 0?se:n}function Ru(e){let{calendar:n}=e;if(n!==void 0)return jo(n)}function jo(e){if(ee(e)){let n=nt(e)||Sn(e)||Ee(e)||Lo(e)||qo(e);return n||S(xa(e)),n.calendar}return(n=>on(Sc($(n))))(e)}var Cu=new WeakMap,Yu=Ae(_i,class{constructor(e=0,n=0,t=0,o=0,r=0,i=0,a=0,s=0,c=0,u=0){let d=Qe(Ve(bo,{years:e,months:n,weeks:t,days:o,hours:r,minutes:i,seconds:a,milliseconds:s,microseconds:c,nanoseconds:u}));Bu(this,B(d))}static from(e){return Y(q(e))}static compare(e,n,t=void 0){return qs(Ut,q(e),q(n),t)}get sign(){return re(this).sign}get blank(){return!re(this).sign}with(e){return Y(Ac(re(this),e))}negated(){return Y(ai(re(this)))}abs(){return Y(Ws(re(this)))}add(e,n=void 0){return Y(ii(Ut,0,re(this),q(e),n))}subtract(e,n=void 0){return Y(ii(Ut,1,re(this),q(e),n))}round(e){return Y(Bs(Ut,re(this),e))}total(e){return Is(Ut,re(this),e)}toLocaleString(e=void 0,n){let t=re(this);return Intl.DurationFormat?new Intl.DurationFormat(e,n).format(t):Yo(t,n)}toString(e=void 0){return Yo(re(this),e)}toJSON(){return Yo(re(this))}valueOf(){return qe()}},re,Fr);function Y(e){return Bu(Object.create(Yu.prototype),e)}function re(e){return na(e)||Le()}function na(e){return Cu.get(e)}function q(e){return ee(e)?na(e)||pc(e):Mc(e)}function Ut(e){if(e!==void 0){if(ee(e)){let n=Ee(e);if(n)return n;let t=nt(e);if(t)return t;let o=Sn(e);if(o)return N(o,o.calendar);let r=jt(e);return cc(fe,r,e)}return Tc(e,on)}}function Bu(e,n){return Cu.set(e,n),Ue(e),e}var $l=Object.defineProperties({},{...lt(\"Temporal.Now\"),...uo({timeZoneId(){return Vn()},instant(){return je(ue(Ao()))},zonedDateTimeISO(e=Vn()){let n=ne(fe(e));return te(De(Ao(),n))},plainDateTimeISO(e=Vn()){let n=Wo(ne(fe(e)));return Oe(Pe(n))},plainDateISO(e=Vn()){let n=Wo(ne(fe(e)));return ke(N(n))},plainTimeISO(e=Vn()){let n=Wo(ne(fe(e)));return tn(vn(n))}})}),Wu=Object.defineProperties({},{...lt(\"Temporal\"),...uo({PlainYearMonth:wu,PlainMonthDay:bu,PlainDate:Zu,PlainTime:Pu,PlainDateTime:ku,ZonedDateTime:fu,Instant:yu,Duration:Yu,Now:$l})});var Au=Vo||Wu;var of=Vo?Date.prototype.toTemporalInstant:Tu;var Uu;function Lu(e){Uu=e}function he(){let e=Uu??globalThis.Temporal;if(!e)throw new ReferenceError('temporals: no Temporal implementation found. Use a runtime with native Temporal (Node 22+), import \"temporal-polyfill/global\", or call configureTemporal(Temporal).');return e}function z(e){let n=e?.constructor?.name;switch(n){case\"PlainDate\":return\"date\";case\"PlainDateTime\":return\"datetime\";case\"ZonedDateTime\":return\"zoneddatetime\";case\"PlainYearMonth\":return\"yearmonth\";case\"PlainTime\":return\"time\";case\"Instant\":return\"instant\";default:throw new TypeError(`temporals: expected a Temporal point (PlainDate, PlainDateTime, ZonedDateTime, PlainYearMonth, PlainTime, Instant), got ${n??typeof e}`)}}function ta(e){return e===\"date\"||e===\"datetime\"||e===\"zoneddatetime\"}function Hl(e){return e===\"date\"||e===\"datetime\"||e===\"zoneddatetime\"||e===\"yearmonth\"}function g(e,n){return e.constructor.compare(e,n)}function $t(e,n,t){let o=e;return t&&Hl(z(e))?o.add(n,{overflow:t}):o.add(n)}var Gl=[\"years\",\"months\",\"weeks\",\"days\",\"hours\",\"minutes\",\"seconds\",\"milliseconds\",\"microseconds\",\"nanoseconds\"];function qu(e,n){if(n===1)return e;let t=e,o={},r=!1;for(let i of Gl){let a=t[i];a&&(o[i]=a*n,r=!0)}return r?o:e}function ju(e,n,t){return e.until(n,t)}function Ht(e){return e.toString()}function $u(e,n,t){let o=e.toZonedDateTime(n,{disambiguation:\"compatible\"});if(!o.toPlainDateTime().equals(e))return(t.dstGap??\"fire\")===\"skip\"?null:o;let r=e.toZonedDateTime(n,{disambiguation:\"earlier\"}),i=e.toZonedDateTime(n,{disambiguation:\"later\"});return r.equals(i)?o:(t.dstOverlap??\"first\")===\"second\"?i:r}var zl=[\"MO\",\"TU\",\"WE\",\"TH\",\"FR\",\"SA\",\"SU\"];function rn(e){let n=zl.indexOf(e);if(n<0)throw new RangeError(`temporals: invalid weekday \"${e}\"`);return n+1}function Hu(e){let n=z(e);if(n===\"date\")return e;if(n===\"datetime\"||n===\"zoneddatetime\")return e.toPlainDate();throw new TypeError(\"temporals: recurrence requires a date-bearing point (PlainDate, PlainDateTime, or ZonedDateTime)\")}function Gu(e,n){let t=z(e);if(t===\"date\")return n;if(t===\"datetime\"){let o=e.toPlainTime();return n.toPlainDateTime(o)}if(t===\"zoneddatetime\"){let o=e;return n.toZonedDateTime({timeZone:o.timeZoneId,plainTime:o.toPlainTime()})}throw new TypeError(\"temporals: cannot rebuild a non-date-bearing point onto a date\")}function $o(e,n,t){return e.with({year:n,month:t,day:1},{overflow:\"constrain\"}).daysInMonth}function oa(e,n,t,o){let r=e.with({year:n,month:t,day:1},{overflow:\"constrain\"}).dayOfWeek;return 1+(o-r+7)%7}var tt=class e{#e;constructor(n){this.#e=()=>{let t=n(),o=t;return typeof o[Symbol.iterator]==\"function\"?o[Symbol.iterator]():t}}[Symbol.iterator](){return this.#e()}static from(n){return typeof n==\"function\"?new e(n):new e(()=>n[Symbol.iterator]())}static of(...n){return new e(()=>n[Symbol.iterator]())}static empty(){return new e(function*(){})}map(n){let t=this;return new e(function*(){let o=0;for(let r of t)yield n(r,o++)})}filter(n){let t=this;return new e(function*(){let o=0;for(let r of t)n(r,o++)&&(yield r)})}flatMap(n){let t=this;return new e(function*(){let o=0;for(let r of t)yield*n(r,o++)})}take(n){let t=this;return new e(function*(){if(n<=0)return;let o=0;for(let r of t)if(yield r,++o>=n)return})}drop(n){let t=this;return new e(function*(){let o=0;for(let r of t)o++<n||(yield r)})}takeWhile(n){let t=this;return new e(function*(){let o=0;for(let r of t){if(!n(r,o++))return;yield r}})}dropWhile(n){let t=this;return new e(function*(){let o=0,r=!0;for(let i of t)r&&n(i,o++)||(r=!1,yield i)})}tap(n){let t=this;return new e(function*(){let o=0;for(let r of t)n(r,o++),yield r})}concat(...n){let t=this;return new e(function*(){yield*t;for(let o of n)yield*o})}pairwise(){let n=this;return new e(function*(){let t,o=!1;for(let r of n)o&&(yield[t,r]),t=r,o=!0})}toArray(){return[...this]}forEach(n){let t=0;for(let o of this)n(o,t++)}reduce(n,t){let o=t,r=0;for(let i of this)o=n(o,i,r++);return o}find(n){let t=0;for(let o of this)if(n(o,t++))return o}some(n){let t=0;for(let o of this)if(n(o,t++))return!0;return!1}every(n){let t=0;for(let o of this)if(!n(o,t++))return!1;return!0}first(){for(let n of this)return n}at(n){if(n<0)return;let t=0;for(let o of this)if(t++===n)return o}count(){let n=0;for(let t of this)n++;return n}};function Ho(e){let{start:n,end:t,count:o,step:r,inclusive:i=!1,overflow:a}=e;if(o!==void 0&&(o<0||!Number.isInteger(o)))throw new RangeError(\"temporals: range() count must be a non-negative integer\");return new tt(function*(){if(o===0)return;let s=$t(n,r,a),c=g(s,n);if(c===0&&o===void 0)throw new RangeError(\"temporals: range() step is zero with no count bound (would be infinite)\");let u=l=>{if(t===void 0)return!0;let m=g(l,t);return c>0?i?m<=0:m<0:c<0?i?m>=0:m>0:!0},d=0;for(;;){let l=d===0?n:$t(n,qu(r,d),a);if(!u(l)||(yield l,d++,o!==void 0&&d>=o))return}})}var xe=class e{start;end;constructor(n,t){if(z(n)!==z(t))throw new TypeError(\"temporals: Interval start and end must be the same Temporal type\");this.start=n,this.end=t}get isEmpty(){return g(this.start,this.end)>=0}contains(n){return g(this.start,n)<=0&&g(n,this.end)<0}overlaps(n){return g(this.start,n.end)<0&&g(n.start,this.end)<0}encloses(n){return g(this.start,n.start)<=0&&g(n.end,this.end)<=0}abuts(n){return g(this.end,n.start)===0||g(n.end,this.start)===0}relation(n){let t=this.start,o=this.end,r=n.start,i=n.end;if(g(o,r)<0)return\"before\";if(g(o,r)===0)return\"meets\";if(g(i,t)<0)return\"after\";if(g(i,t)===0)return\"metBy\";let a=g(t,r),s=g(o,i);return a===0&&s===0?\"equals\":a===0?s<0?\"starts\":\"startedBy\":s===0?a>0?\"finishes\":\"finishedBy\":a<0&&s>0?\"contains\":a>0&&s<0?\"during\":a<0?\"overlaps\":\"overlappedBy\"}intersection(n){let t=g(this.start,n.start)>=0?this.start:n.start,o=g(this.end,n.end)<=0?this.end:n.end;return g(t,o)>=0?null:new e(t,o)}toDuration(n){return ju(this.start,this.end,n)}points(n){return Ho({start:this.start,end:this.end,step:n})}toString(){return`${this.start.toString()}/${this.end.toString()}`}toJSON(){return this.toString()}static from(n){let t=0,o=-1;for(let c=0;c<n.length;c++){let u=n[c];if(u===\"[\")t++;else if(u===\"]\")t--;else if(u===\"/\"&&t===0){o=c;break}}if(o<0)throw new RangeError(`temporals: invalid ISO interval \"${n}\" (expected \"start/end\")`);let r=n.slice(0,o),i=n.slice(o+1),a=he(),s=c=>c.includes(\"[\")?a.ZonedDateTime.from(c):c.includes(\"T\")?a.PlainDateTime.from(c):a.PlainDate.from(c);return new e(s(r),s(i))}};var Gt=class e{intervals;constructor(n){this.intervals=n}static from(n){let t=[...n].filter(r=>!r.isEmpty);t.sort((r,i)=>g(r.start,i.start)||g(r.end,i.end));let o=[];for(let r of t){let i=o[o.length-1];i&&g(r.start,i.end)<=0?g(r.end,i.end)>0&&(o[o.length-1]=new xe(i.start,r.end)):o.push(r)}return new e(o)}static empty(){return new e([])}get isEmpty(){return this.intervals.length===0}[Symbol.iterator](){return this.intervals[Symbol.iterator]()}contains(n){return this.intervals.some(t=>t.contains(n))}union(n){let t=n instanceof e?n.intervals:[...n];return e.from([...this.intervals,...t])}intersection(n){let t=[];for(let o of this.intervals)for(let r of n.intervals){if(g(r.start,o.end)>=0)break;let i=o.intersection(r);i&&t.push(i)}return e.from(t)}difference(n){let t=[];for(let o of this.intervals){let r=[o];for(let i of n.intervals){if(g(i.end,o.start)<=0||g(i.start,o.end)>=0)continue;let a=[];for(let s of r){if(!s.overlaps(i)){a.push(s);continue}g(s.start,i.start)<0&&a.push(new xe(s.start,i.start)),g(i.end,s.end)<0&&a.push(new xe(i.end,s.end))}r=a}t.push(...r)}return e.from(t)}gaps(n){if(n)return e.from([n]).difference(this);let t=[];for(let o=1;o<this.intervals.length;o++){let r=this.intervals[o-1],i=this.intervals[o];g(r.end,i.start)<0&&t.push(new xe(r.end,i.start))}return new e(t)}totalDuration(){let n=he();if(this.intervals.length===0)return n.Duration.from({seconds:0});let t=z(this.intervals[0].start),o=t===\"date\"||t===\"yearmonth\"?\"day\":\"hour\",r=n.Duration.from({seconds:0});for(let i of this.intervals)r=r.add(i.toDuration({largestUnit:o}));return r}toString(){return this.intervals.map(n=>n.toString()).join(\", \")}};function Go(){return he().PlainDate}function ra(e,n){if(!n)return e;let t=n===\"uk\"?\"uk\":\"us\";return e.dayOfWeek===6?t===\"uk\"?e.add({days:2}):e.subtract({days:1}):e.dayOfWeek===7?e.add({days:1}):e}function sn(e,n,t={}){return o=>{let r=Go().from({year:o,month:e,day:n},{overflow:\"reject\"});return ra(r,t.observed??!1)}}function Jt(e=0,n={}){return t=>{let o=t%19,r=Math.floor(t/100),i=t%100,a=Math.floor(r/4),s=r%4,c=Math.floor((r+8)/25),u=Math.floor((r-c+1)/3),d=(19*o+r-a-u+15)%30,l=Math.floor(i/4),m=i%4,f=(32+2*s+2*l-d-m)%7,p=Math.floor((o+11*d+22*f)/451),h=Math.floor((d+f-7*p+114)/31),y=(d+f-7*p+114)%31+1,b=Go().from({year:t,month:h,day:y}).add({days:e});return ra(b,n.observed??!1)}}function an(e,n,t,o={}){let r=rn(n);return i=>{let a=Go().from({year:i,month:e,day:1}),s=a.daysInMonth,c=1+(r-a.dayOfWeek+7)%7,u;if(t>0){if(u=c+(t-1)*7,u>s)return null}else if(u=c+Math.floor((s-c)/7)*7+(t+1)*7,u<1)return null;return ra(a.with({day:u}),o.observed??!1)}}var zt=class e{rules;cache=new Map;constructor(n){this.rules=n}static of(...n){return new e(n)}yearSet(n){let t=this.cache.get(n);return t||(t=new Set(this.rules.map(o=>o(n)).filter(o=>o!==null).map(o=>o.toString())),this.cache.set(n,t)),t}has(n){let t=n.toString();return this.yearSet(n.year).has(t)||this.yearSet(n.year-1).has(t)||this.yearSet(n.year+1).has(t)}inYear(n){return[...this.yearSet(n)].map(t=>Go().from(t)).sort((t,o)=>g(t,o))}};function Vu(){return zt.of(sn(1,1,{observed:!0}),an(1,\"MO\",3),an(2,\"MO\",3),an(5,\"MO\",-1),sn(6,19,{observed:!0}),sn(7,4,{observed:!0}),an(9,\"MO\",1),an(10,\"MO\",2),sn(11,11,{observed:!0}),an(11,\"TH\",4),sn(12,25,{observed:!0}))}var zu=4e3,Vt=class{weekend;holidays;constructor(n={}){let t=n.weekend??[\"SA\",\"SU\"];this.weekend=new Set(t.map(rn)),this.holidays=n.holidays}toDate(n){let t=n;return t.toPlainDate?t.toPlainDate():n}isBusinessDay(n){let t=this.toDate(n);return this.weekend.has(t.dayOfWeek)?!1:!this.holidays?.has(t)}nextBusinessDay(n){let t=n.add({days:1});for(let o=0;o<zu;o++,t=t.add({days:1}))if(this.isBusinessDay(t))return t;throw new RangeError(\"temporals: no business day found (check weekend/holiday config)\")}previousBusinessDay(n){let t=n.subtract({days:1});for(let o=0;o<zu;o++,t=t.subtract({days:1}))if(this.isBusinessDay(t))return t;throw new RangeError(\"temporals: no business day found (check weekend/holiday config)\")}addBusinessDays(n,t){let o=n,r=t>=0?1:-1;for(let i=Math.abs(t);i>0;i--)o=r>0?this.nextBusinessDay(o):this.previousBusinessDay(o);return o}businessDaysBetween(n,t){let o=0;for(let r=n;g(r,t)<0;r=r.add({days:1}))this.isBusinessDay(r)&&o++;return o}businessDays(n){return Ho({start:n.start,end:n.end,step:{days:1}}).filter(t=>this.isBusinessDay(t))}nthBusinessDay(n,t,o){let r=he().PlainDate.from({year:n,month:t,day:1}),i=[];for(let s=1;s<=r.daysInMonth;s++){let c=r.with({day:s});this.isBusinessDay(c)&&i.push(c)}let a=o>0?o-1:i.length+o;return i[a]??null}},_t=class{windows;calendar;dst;constructor(n={}){this.dst=n.dst??\"compatible\",this.windows=(n.windows??[[\"09:00\",\"17:00\"]]).slice().sort((t,o)=>t[0].localeCompare(o[0])),this.calendar=n.calendar}dayWindows(n,t){if(this.calendar&&!this.calendar.isBusinessDay(n))return[];let o=he();return this.windows.map(([r,i])=>{let a=o.PlainTime.from(r),s=o.PlainTime.from(i),c=o.PlainTime.compare(s,a)<=0,u=this.dst,d=n.toPlainDateTime(a).toZonedDateTime(t,{disambiguation:u}),l=(c?n.add({days:1}):n).toPlainDateTime(s).toZonedDateTime(t,{disambiguation:u});return new xe(d,l)})}intervalsBetween(n,t){let o=n.timeZoneId,r=t.toPlainDate(),i=[];for(let a=n.toPlainDate().subtract({days:1});g(a,r)<=0;a=a.add({days:1}))i.push(...this.dayWindows(a,o));return Gt.from(i).intersection(Gt.from([new xe(n,t)]))}isOpen(n){let t=n.timeZoneId,o=n.toPlainDate();return[...this.dayWindows(o.subtract({days:1}),t),...this.dayWindows(o,t)].some(i=>i.contains(n))}nextOpen(n){return this.intervalsBetween(n,n.add({days:366})).intervals[0]?.start}};function _u(e,n,t){return t.intervalsBetween(e,n).totalDuration()}var Vl=[[\"years\",\"year\",\"y\"],[\"months\",\"month\",\"mo\"],[\"weeks\",\"week\",\"w\"],[\"days\",\"day\",\"d\"],[\"hours\",\"hour\",\"h\"],[\"minutes\",\"minute\",\"m\"],[\"seconds\",\"second\",\"s\"],[\"milliseconds\",\"millisecond\",\"ms\"],[\"microseconds\",\"microsecond\",\"\\xB5s\"],[\"nanoseconds\",\"nanosecond\",\"ns\"]],_l={second:7,millisecond:8,microsecond:9,nanosecond:10};function ia(e,n={}){let{short:t=!1,max:o=1/0,locale:r,precision:i=\"second\"}=n,a=Vl.slice(0,_l[i]),s=e,c=Intl.DurationFormat;if(r&&c){let d={},l=0;for(let[m]of a){let f=s[m]??0;if(f!==0&&(d[m]=f,++l>=o))break}return new c(r,{style:t?\"narrow\":\"long\"}).format(d)}let u=[];for(let[d,l,m]of a){let f=s[d]??0;if(f!==0&&(u.push(t?`${f}${m}`:`${f} ${l}${Math.abs(f)===1?\"\":\"s\"}`),u.length>=o))break}return u.length===0?t?\"0s\":\"0 seconds\":u.join(t?\" \":\", \")}var Jl=[[\"years\",\"year\"],[\"months\",\"month\"],[\"weeks\",\"week\"],[\"days\",\"day\"],[\"hours\",\"hour\"],[\"minutes\",\"minute\"],[\"seconds\",\"second\"]];function Ju(e,n,t={}){let o=z(e),r=o===\"time\"||o===\"instant\"?\"hour\":\"year\",i=e.until(n,{largestUnit:r}),a=new Intl.RelativeTimeFormat(t.locale,{numeric:t.numeric??\"auto\"}),s=i;for(let[c,u]of Jl){let d=s[c]??0;if(d!==0&&c===\"days\"&&(o===\"zoneddatetime\"||o===\"datetime\")&&(d=Kl(e,n)),d!==0)return a.format(d,u)}return a.format(0,\"second\")}function Kl(e,n){return(z(e)===\"zoneddatetime\"?e.withTimeZone(n.timeZoneId):e).toPlainDate().until(n.toPlainDate(),{largestUnit:\"day\"}).days}var Ql={y:\"years\",mo:\"months\",w:\"weeks\",d:\"days\",h:\"hours\",m:\"minutes\",s:\"seconds\",ms:\"milliseconds\"};function aa(e){let n={},t=/(-?\\d+(?:\\.\\d+)?)\\s*(mo|ms|[ywdhms])/gi,o,r=!1;for(;(o=t.exec(e))!==null;){r=!0;let i=Ql[o[2].toLowerCase()];if(!i)throw new RangeError(`temporals: unknown duration unit \"${o[2]}\"`);n[i]=(n[i]??0)+Number(o[1])}if(!r)throw new RangeError(`temporals: could not parse duration \"${e}\"`);return he().Duration.from(n)}var Ku=1e4;function Xu(e){return typeof e==\"string\"?{wd:rn(e)}:{wd:rn(e.weekday),nth:e.nth}}function Xl(e,n){let t=[];for(let o=e;o<=n;o++)t.push(o);return t}function ca(e,n){let t=e>0?e:n+e+1;return t>=1&&t<=n?t:null}function em(e,n,t,o,r){let i=$o(e,n,t),a=oa(e,n,t,o);if(r>0){let u=a+(r-1)*7;return u<=i?u:null}let c=a+Math.floor((i-a)/7)*7+(r+1)*7;return c>=1?c:null}function nm(e,n,t,o){let r=$o(e,n,t),i=[];for(let a=oa(e,n,t,o);a<=r;a+=7)i.push(a);return i}function tm(e,n){return e.with({year:n,month:1,day:1},{overflow:\"constrain\"}).daysInYear}function om(e,n,t){let o=tm(e,n),r=t>0?t:o+t+1;return r<1||r>o?null:e.with({year:n,month:1,day:1},{overflow:\"constrain\"}).add({days:r-1})}function rm(e,n){return e.with({year:n,month:12,day:28},{overflow:\"constrain\"}).weekOfYear??52}function Qu(e,n,t,o,r,i){let a=$o(e,n,t),s=o&&o.length>0,c=r&&r.length>0,u;if(s){u=[];for(let m of o){let f=ca(m,a);f!==null&&u.push(f)}}let d;if(c){let m=new Set;for(let{wd:f,nth:p}of r)if(p!==void 0){let h=em(e,n,t,f,p);h!==null&&m.add(h)}else for(let h of nm(e,n,t,f))m.add(h);d=[...m]}let l;if(u&&d){let m=new Set(d);l=u.filter(f=>m.has(f))}else u?l=u:d?l=d:i!==void 0?l=i<=a?[i]:[]:l=[];return[...new Set(l)].sort((m,f)=>m-f)}function im(e,n,t,o){let{byMonth:r,byMonthDay:i}=e,a=s=>!r||r.includes(s);switch(e.freq){case\"daily\":{let s=o.date;if(!a(s.month))return[];if(i&&i.length>0&&!i.some(u=>ca(u,s.daysInMonth)===s.day))return[];if(e.byYearDay&&e.byYearDay.length>0){let c=s.daysInYear;if(!e.byYearDay.some(d=>(d>0?d:c+d+1)===s.dayOfYear))return[]}return t&&t.length>0&&!t.some(c=>c.wd===s.dayOfWeek)?[]:[s]}case\"weekly\":{let s=rn(e.weekStart??\"MO\"),c=t&&t.length>0?t.map(m=>m.wd):[n.dayOfWeek],u=new Set(c),d=[],l=o.weekStartDate;for(let m=0;m<7;m++)u.has(l.dayOfWeek)&&a(l.month)&&d.push(l),l=l.add({days:1});return d}case\"monthly\":{let s=o.anchor,c=s.month;return a(c)?Qu(s,s.year,c,i,t,n.day).map(d=>s.with({day:d})):[]}case\"yearly\":{let s=o.anchor,c=s.year,u=i&&i.length>0,d=t&&t.length>0,l=e.byYearDay&&e.byYearDay.length>0;if(e.byWeekNo&&e.byWeekNo.length>0){let y=new Set(e.byWeekNo.map(F=>F>0?F:rm(n,c)+F+1)),b=new Set(d?t.map(F=>F.wd):[n.dayOfWeek]),v=[],D=n.with({year:c,month:1,day:1},{overflow:\"constrain\"}).subtract({days:7}),I=n.with({year:c,month:12,day:31},{overflow:\"constrain\"}).add({days:7});for(;g(D,I)<=0;D=D.add({days:1}))D.yearOfWeek===c&&y.has(D.weekOfYear??-1)&&b.has(D.dayOfWeek)&&a(D.month)&&v.push(D);return v}if(l&&!u){let y=d?new Set(t.map(D=>D.wd)):null,b=[];for(let D of e.byYearDay){let I=om(n,c,D);I&&a(I.month)&&(y&&!y.has(I.dayOfWeek)||b.push(I))}let v=new Set;return b.filter(D=>{let I=Ht(D);return v.has(I)?!1:(v.add(I),!0)}).sort((D,I)=>g(D,I))}let f=s.monthsInYear,p=r??(u||d?Xl(1,f):[n.month]),h=[];for(let y of p){if(y<1||y>f)continue;let b=s.with({month:y,day:1},{overflow:\"constrain\"}),v=Qu(b,c,y,i,t,n.day);for(let D of v)h.push(b.with({day:D}))}return h}default:throw new RangeError(`temporals: recurrence freq \"${e.freq}\" is not supported (yearly/monthly/weekly/daily only)`)}}function am(e,n){let t=(e.dayOfWeek-n+7)%7;return e.subtract({days:t})}function sm(e,n){switch(e.freq){case\"daily\":return{date:n};case\"weekly\":return{weekStartDate:am(n,rn(e.weekStart??\"MO\"))};case\"monthly\":return{anchor:n.with({day:1})};case\"yearly\":return{anchor:n.with({month:1,day:1},{overflow:\"constrain\"})};default:throw new RangeError(`temporals: unsupported freq \"${e.freq}\"`)}}function cm(e,n){let t=e.interval??1;switch(e.freq){case\"daily\":return{date:n.date.add({days:t})};case\"weekly\":return{weekStartDate:n.weekStartDate.add({weeks:t})};case\"monthly\":return{anchor:n.anchor.add({months:t})};case\"yearly\":return{anchor:n.anchor.add({years:t})};default:throw new RangeError(`temporals: unsupported freq \"${e.freq}\"`)}}function um(e,n,t){let o=z(e);if(o===\"zoneddatetime\"){let l=e,m=l.timeZoneId,f=l.toPlainTime(),p=t.byHour&&t.byHour.length?t.byHour:[f.hour],h=t.byMinute&&t.byMinute.length?t.byMinute:[f.minute],y=t.bySecond&&t.bySecond.length?t.bySecond:[f.second],b={dstGap:t.dstGap,dstOverlap:t.dstOverlap},v=[];for(let D of p)for(let I of h)for(let F of y){let j=n.toPlainDateTime(f.with({hour:D,minute:I,second:F})),K=$u(j,m,b);K&&v.push(K)}return v}let r=Gu(e,n);if(!(t.byHour&&t.byHour.length||t.byMinute&&t.byMinute.length||t.bySecond&&t.bySecond.length)||o===\"date\")return[r];let a=r,s=t.byHour&&t.byHour.length?t.byHour:[a.hour],c=t.byMinute&&t.byMinute.length?t.byMinute:[a.minute],u=t.bySecond&&t.bySecond.length?t.bySecond:[a.second],d=[];for(let l of s)for(let m of c)for(let f of u)d.push(a.with({hour:l,minute:m,second:f}));return d}function dm(e,n){if(!n||n.length===0)return e;let t=[];for(let o of n){let r=o>0?o-1:e.length+o;r>=0&&r<e.length&&t.push(e[r])}return t}var sa=new Set([\"hourly\",\"minutely\",\"secondly\"]);function lm(e){return e===\"datetime\"||e===\"zoneddatetime\"||e===\"time\"}function mm(e){let n=z(e.start);if(sa.has(e.freq)){if(!lm(n))throw new TypeError(\"temporals: sub-daily recurrence requires a time-bearing start (PlainDateTime, ZonedDateTime, or PlainTime)\")}else if(!ta(n))throw new TypeError(\"temporals: recur() requires a date-bearing start (PlainDate, PlainDateTime, or ZonedDateTime)\");if(e.byWeekNo&&e.freq!==\"yearly\")throw new RangeError(\"temporals: BYWEEKNO is only valid with FREQ=YEARLY\");if(e.bySetPos&&sa.has(e.freq))throw new RangeError(\"temporals: BYSETPOS with sub-daily frequencies is not supported\");if(e.interval!==void 0&&(!Number.isInteger(e.interval)||e.interval<1))throw new RangeError(\"temporals: recur() interval must be a positive integer\")}var fm=1e6;function hm(e,n,t){let o=z(e),r=e;if(ta(o)){if(n.byMonth&&!n.byMonth.includes(r.month)||n.byMonthDay&&!n.byMonthDay.some(i=>ca(i,r.daysInMonth)===r.day))return!1;if(n.byYearDay){let i=r.daysInYear;if(!n.byYearDay.some(a=>(a>0?a:i+a+1)===r.dayOfYear))return!1}if(t&&t.length>0&&!t.some(i=>i.wd===r.dayOfWeek))return!1}return!(n.byHour&&!n.byHour.includes(r.hour)||n.byMinute&&!n.byMinute.includes(r.minute)||n.bySecond&&!n.bySecond.includes(r.second))}function*pm(e){let n=e.start,t=e.interval??1,o=e.freq===\"hourly\"?{hours:t}:e.freq===\"minutely\"?{minutes:t}:{seconds:t},r=e.byWeekday?.map(Xu),i=n,a=0;for(;;){if(e.until!==void 0&&g(i,e.until)>0)return;if(hm(i,e,r))yield i,a=0;else if(++a>fm)throw new RangeError(\"temporals: sub-daily recurrence matched nothing for a very long span (likely an impossible rule)\");i=$t(i,o)}}function*ym(e){let n=e.start,t=Hu(n),o=e.byWeekday?.map(Xu),r=sm(e,t),i=0;for(;;){let a=im(e,t,o,r),s=[];for(let d of a)s.push(...um(n,d,e));s.sort((d,l)=>g(d,l));let c=new Set;s=s.filter(d=>{let l=Ht(d);return c.has(l)?!1:(c.add(l),!0)}),s=dm(s,e.bySetPos).sort((d,l)=>g(d,l));let u=!1;for(let d of s)g(d,n)<0||(yield d,u=!0);if(u)i=0;else if(++i>Ku)throw new RangeError(`temporals: recurrence produced no occurrences for ${Ku} consecutive periods (likely an impossible rule)`);r=cm(e,r)}}function*Tm(e,n){let t=n.start,o=new Set((n.exclude??[]).map(l=>Ht(l))),r=(n.include??[]).filter(l=>g(l,t)>=0).sort((l,m)=>g(l,m)),{until:i,count:a}=n,s=0,c=0,u,d=e.next();for(;;){let l=!d.done,m=s<r.length;if(!l&&!m)return;let f,p;if(l&&(!m||g(d.value,r[s])<=0)?(f=d.value,p=!0):(f=r[s],p=!1),i!==void 0&&g(f,i)>0)return;p?d=e.next():s++;let h=Ht(f);if(!(o.has(h)||h===u)&&(u=h,yield f,a!==void 0&&++c>=a))return}}function ed(e){mm(e);let n=sa.has(e.freq)?()=>pm(e):()=>ym(e);return new tt(()=>Tm(n(),e))}var gm={YEARLY:\"yearly\",MONTHLY:\"monthly\",WEEKLY:\"weekly\",DAILY:\"daily\",HOURLY:\"hourly\",MINUTELY:\"minutely\",SECONDLY:\"secondly\"};function Dm(e){let n=/^([+-]?\\d+)?(MO|TU|WE|TH|FR|SA|SU)$/.exec(e.trim());if(!n)throw new RangeError(`temporals: invalid BYDAY token \"${e}\"`);let t=n[2];return n[1]?{weekday:t,nth:Number(n[1])}:t}function cn(e){return e.split(\",\").map(n=>Number(n.trim()))}function bm(e,n){let t=e.replace(/^RRULE:/i,\"\"),o={start:n,freq:\"daily\"},r=!1;for(let i of t.split(\";\")){if(!i)continue;let a=i.indexOf(\"=\"),s=(a===-1?i:i.slice(0,a)).trim().toUpperCase(),c=a===-1?\"\":i.slice(a+1).trim();switch(s){case\"FREQ\":{let u=gm[c.toUpperCase()];if(!u)throw new RangeError(`temporals: unsupported FREQ \"${c}\"`);o.freq=u,r=!0;break}case\"INTERVAL\":o.interval=Number(c);break;case\"COUNT\":o.count=Number(c);break;case\"UNTIL\":{if(n==null)throw new RangeError(\"temporals: RRULE has UNTIL but no DTSTART was provided\");if(z(n)===\"zoneddatetime\"){let u=n,d=u.toInstant().constructor;o.until=d.from(c).toZonedDateTimeISO(u.timeZoneId)}else{let u=n.constructor;o.until=u.from(c)}break}case\"BYMONTH\":o.byMonth=cn(c);break;case\"BYWEEKNO\":o.byWeekNo=cn(c);break;case\"BYYEARDAY\":o.byYearDay=cn(c);break;case\"BYMONTHDAY\":o.byMonthDay=cn(c);break;case\"BYDAY\":o.byWeekday=c.split(\",\").map(Dm);break;case\"BYHOUR\":o.byHour=cn(c);break;case\"BYMINUTE\":o.byMinute=cn(c);break;case\"BYSECOND\":o.bySecond=cn(c);break;case\"BYSETPOS\":o.bySetPos=cn(c);break;case\"WKST\":o.weekStart=c.toUpperCase();break;default:throw new RangeError(`temporals: unsupported RRULE part \"${s}\"`)}}if(!r)throw new RangeError(\"temporals: RRULE is missing FREQ\");return o}function ua(e,n){return ed(bm(e,n))}ed.fromString=ua;var od=globalThis.Temporal;Lu(od??Au);var Kt=()=>he(),vm=od?\"native\":\"temporal-polyfill\",nd=[\"MO\",\"TU\",\"WE\",\"TH\",\"FR\",\"SA\",\"SU\"];function da(e){if(typeof e==\"number\"&&Number.isInteger(e)&&e>=1&&e<=7)return nd[e-1];let n=String(e??\"\").trim().slice(0,2).toUpperCase(),t=nd.find(o=>o===n);if(!t)throw new RangeError(`not a weekday: ${JSON.stringify(e)} (use MO-SU, or 1-7 with 1 for Monday)`);return t}var td={easter:()=>[Jt(0)],\"good-friday\":()=>[Jt(-2)],\"easter-monday\":()=>[Jt(1)]};function rd(e){if(typeof e==\"string\"){let n=e.trim().toLowerCase();if(n===\"us-federal\")return Im();if(td[n])return td[n]();let t=/^(\\d{4})-(\\d{2})-(\\d{2})$/.exec(n);if(t){let o=Kt().PlainDate.from(n);return[r=>r===o.year?o:null]}if(t=/^(\\d{1,2})-(\\d{1,2})$/.exec(n),t)return[sn(Number(t[1]),Number(t[2]))];throw new RangeError(`not a holiday: ${JSON.stringify(e)} (use us-federal, easter, good-friday, easter-monday, a date like 2026-12-24, a month and day like 12-25, or an object)`)}if(e&&typeof e==\"object\"){if(\"easter\"in e)return[Jt(Number(e.easter)||0)];if(\"weekday\"in e)return[an(Number(e.month),da(e.weekday),Number(e.nth))];if(\"day\"in e)return[sn(Number(e.month),Number(e.day),{observed:e.observed??!1})]}throw new RangeError(`not a holiday: ${JSON.stringify(e)}`)}function Im(){let e=Vu();return Array.from({length:11},(n,t)=>o=>e.inYear(o)[t]??null)}function id(e={}){let n=(e.weekend??[\"SA\",\"SU\"]).map(da),t=(e.holidays??[]).flatMap(rd);return new Vt({weekend:n,holidays:t.length?zt.of(...t):void 0})}function wm(e={}){let n=(Array.isArray(e.windows)&&e.windows.length?e.windows:[[\"09:00\",\"17:00\"]]).map(t=>{if(!Array.isArray(t)||t.length!==2)throw new RangeError(`a window is [open, close], like [\"09:00\", \"17:00\"]: ${JSON.stringify(t)}`);return[String(t[0]),String(t[1])]});return new _t({windows:n,calendar:id(e)})}function ad(e,n){let t=Kt(),o=String(n||\"UTC\");if(typeof e==\"number\")return t.Instant.fromEpochMilliseconds(e).toZonedDateTimeISO(o);let r=String(e??\"\").trim();if(!r)throw new RangeError(\"no time given\");return r.includes(\"[\")?t.ZonedDateTime.from(r).withTimeZone(o):/(?:Z|[+-]\\d{2}(?::?\\d{2})?)$/i.test(r)&&r.includes(\"T\")?t.Instant.from(r).toZonedDateTimeISO(o):t.PlainDateTime.from(r).toZonedDateTime(o)}function Mm(e,n=\"UTC\"){let t=String(e??\"\").trim();return/^\\d{4}-\\d{2}-\\d{2}$/.test(t)?Kt().PlainDate.from(t):ad(e,n).toPlainDate()}function la(e){let n=Kt();if(typeof e==\"number\"){if(!Number.isFinite(e))throw new RangeError(`not a duration: ${e}`);return n.Duration.from({milliseconds:Math.trunc(e)}).round({largestUnit:\"day\",smallestUnit:\"millisecond\"})}let t=String(e??\"\").trim();return/^-?\\d+(?:\\.\\d+)?$/.test(t)?la(Number(t)):/^-?P/i.test(t)?n.Duration.from(t.toUpperCase()):aa(t)}function Sm(e){if(e.years||e.months||e.weeks)throw new RangeError(`years, months and weeks have no fixed length: ${e.toString()}`);return e.total({unit:\"millisecond\"})}function Pm(e,n={}){let t=la(e);return!t.years&&!t.months&&!t.weeks&&(t=t.round({largestUnit:n.largestUnit||\"day\",smallestUnit:\"millisecond\"})),ia(t,n)}var Nm=e=>e.toString({smallestUnit:\"second\"});var Om=()=>Kt();return md(km);})();\nreturn temporals;\n}\n"
1108
+ }
1109
+ ]
1110
+ },
1111
+ "tests": [
1112
+ {
1113
+ "name": "two calendar days ahead",
1114
+ "inputs": {
1115
+ "from": "2026-10-23T09:00:00Z",
1116
+ "to": "2026-10-25T15:00:00Z",
1117
+ "zone": "UTC",
1118
+ "locale": "en"
1119
+ },
1120
+ "expect": {
1121
+ "result.text": "in 2 days",
1122
+ "result.between": "2 days, 6 hours"
1123
+ }
1124
+ },
1125
+ {
1126
+ "name": "less than a day on is said in hours, even past midnight",
1127
+ "inputs": {
1128
+ "from": "2026-10-23T22:00:00Z",
1129
+ "to": "2026-10-24T01:00:00Z",
1130
+ "zone": "UTC",
1131
+ "locale": "en"
1132
+ },
1133
+ "expect": {
1134
+ "result.text": "in 3 hours"
1135
+ }
1136
+ },
1137
+ {
1138
+ "name": "numeric always, in the past",
1139
+ "inputs": {
1140
+ "from": "2026-10-23T09:00:00Z",
1141
+ "to": "2026-10-22T09:00:00Z",
1142
+ "zone": "UTC",
1143
+ "locale": "en",
1144
+ "numeric": "always"
1145
+ },
1146
+ "expect": {
1147
+ "result.text": "1 day ago"
1148
+ }
1149
+ },
1150
+ {
1151
+ "name": "26 hours on is tomorrow in UTC",
1152
+ "inputs": {
1153
+ "from": "2026-10-23T06:00:00Z",
1154
+ "to": "2026-10-24T08:00:00Z",
1155
+ "zone": "UTC",
1156
+ "locale": "en"
1157
+ },
1158
+ "expect": {
1159
+ "result.text": "tomorrow",
1160
+ "result.between": "1 day, 2 hours"
1161
+ }
1162
+ },
1163
+ {
1164
+ "name": "the same 26 hours span two calendar days in Los Angeles",
1165
+ "inputs": {
1166
+ "from": "2026-10-23T06:00:00Z",
1167
+ "to": "2026-10-24T08:00:00Z",
1168
+ "zone": "America/Los_Angeles",
1169
+ "locale": "en"
1170
+ },
1171
+ "expect": {
1172
+ "result.text": "in 2 days"
1173
+ }
1174
+ }
1175
+ ],
1176
+ "hosts": []
1177
+ },
1178
+ {
1179
+ "id": "recurrence",
1180
+ "title": "Next occurrences (RRULE)",
1181
+ "description": "The times of an RFC 5545 recurrence rule (FREQ=WEEKLY;BYDAY=MO,WE, FREQ=MONTHLY;BYDAY=2TU, COUNT, UNTIL, INTERVAL, …) from a start time in a zone, keeping the wall clock across daylight saving changes. Gives each time with its zone and in UTC, optionally only those after a moment.",
1182
+ "icon": "<svg viewBox=\"0 0 16 16\"><path d=\"M3 8a5 5 0 0 1 9-3M12.5 2.5V5H10M13 8a5 5 0 0 1-9 3M3.5 13.5V11H6\" stroke=\"currentColor\" fill=\"none\" stroke-width=\"1.2\"/></svg>",
1183
+ "canvas": {
1184
+ "format": "viaframe-canvas",
1185
+ "version": 3,
1186
+ "name": "recurrence",
1187
+ "panes": [
1188
+ {
1189
+ "id": "i_rule",
1190
+ "type": "input",
1191
+ "name": "rule",
1192
+ "rect": {
1193
+ "x": 0,
1194
+ "y": 0,
1195
+ "width": 260
1196
+ },
1197
+ "inputs": [],
1198
+ "widget": {
1199
+ "kind": "text",
1200
+ "value": "FREQ=WEEKLY;BYDAY=MO,WE"
1201
+ },
1202
+ "control": {
1203
+ "group": "Rule",
1204
+ "help": "An RFC 5545 RRULE (FREQ=MONTHLY;BYDAY=2TU, FREQ=DAILY;INTERVAL=3, …), with or without RRULE:."
1205
+ }
1206
+ },
1207
+ {
1208
+ "id": "i_start",
1209
+ "type": "input",
1210
+ "name": "start",
1211
+ "rect": {
1212
+ "x": 0,
1213
+ "y": 150,
1214
+ "width": 260
1215
+ },
1216
+ "inputs": [],
1217
+ "widget": {
1218
+ "kind": "text",
1219
+ "value": "2026-10-19T09:00"
1220
+ },
1221
+ "control": {
1222
+ "group": "Rule",
1223
+ "help": "The first time (DTSTART): a wall-clock time read in `zone`, or an ISO time with an offset, Z or [zone]."
1224
+ }
1225
+ },
1226
+ {
1227
+ "id": "i_zone",
1228
+ "type": "input",
1229
+ "name": "zone",
1230
+ "rect": {
1231
+ "x": 0,
1232
+ "y": 300,
1233
+ "width": 260
1234
+ },
1235
+ "inputs": [],
1236
+ "widget": {
1237
+ "kind": "text",
1238
+ "value": "Europe/Paris"
1239
+ },
1240
+ "control": {
1241
+ "group": "Rule",
1242
+ "help": "The zone the rule repeats in: the wall-clock time stays put across daylight saving changes."
1243
+ }
1244
+ },
1245
+ {
1246
+ "id": "i_count",
1247
+ "type": "input",
1248
+ "name": "count",
1249
+ "rect": {
1250
+ "x": 0,
1251
+ "y": 450,
1252
+ "width": 260
1253
+ },
1254
+ "inputs": [],
1255
+ "widget": {
1256
+ "kind": "number",
1257
+ "value": 5
1258
+ },
1259
+ "control": {
1260
+ "group": "List",
1261
+ "help": "How many times to list (1 to 500)."
1262
+ }
1263
+ },
1264
+ {
1265
+ "id": "i_after",
1266
+ "type": "input",
1267
+ "name": "after",
1268
+ "rect": {
1269
+ "x": 0,
1270
+ "y": 540,
1271
+ "width": 260
1272
+ },
1273
+ "inputs": [],
1274
+ "widget": {
1275
+ "kind": "text",
1276
+ "value": ""
1277
+ },
1278
+ "control": {
1279
+ "group": "List",
1280
+ "help": "List only the times at or after this one; empty lists from the start.",
1281
+ "advanced": true
1282
+ }
1283
+ },
1284
+ {
1285
+ "id": "result",
1286
+ "type": "eval",
1287
+ "name": "result",
1288
+ "rect": {
1289
+ "x": 340,
1290
+ "y": 0,
1291
+ "width": 380
1292
+ },
1293
+ "inputs": [
1294
+ {
1295
+ "name": "rule",
1296
+ "source": "i_rule"
1297
+ },
1298
+ {
1299
+ "name": "start",
1300
+ "source": "i_start"
1301
+ },
1302
+ {
1303
+ "name": "zone",
1304
+ "source": "i_zone"
1305
+ },
1306
+ {
1307
+ "name": "count",
1308
+ "source": "i_count"
1309
+ },
1310
+ {
1311
+ "name": "after",
1312
+ "source": "i_after"
1313
+ }
1314
+ ],
1315
+ "autorun": true,
1316
+ "mode": "function",
1317
+ "outputs": [
1318
+ {
1319
+ "name": "times"
1320
+ },
1321
+ {
1322
+ "name": "utc"
1323
+ },
1324
+ {
1325
+ "name": "next"
1326
+ },
1327
+ {
1328
+ "name": "summary"
1329
+ }
1330
+ ],
1331
+ "code": "const T = temporalsLibrary();\nconst first = T.zoned(start, zone);\nconst n = Math.max(1, Math.min(500, Math.trunc(Number(count) || 1)));\nconst from = String(after ?? \"\").trim() ? T.zoned(after, zone) : null;\nlet seq = T.recurFromString(String(rule), first);\nif (from) seq = seq.filter((z) => T.Temporal().ZonedDateTime.compare(z, from) >= 0);\nconst list = seq.take(n).toArray();\nconst times = list.map(T.iso);\nconst utc = list.map((z) => z.toInstant().toString());\nreturn { times, utc, next: times[0] ?? null, summary: list.length ? list.length + \" time\" + (list.length === 1 ? \"\" : \"s\") + \" from \" + times[0] : \"no times\" };\n\n// @johnhenry/temporals 0.3.0 and temporal-polyfill 1.0.1 (both MIT), bundled from viaframe/src/lib.ts by viaframe/scripts/build.mjs\n// in github.com/johnhenry/temporals. A pane package can't import a module or share code between\n// its panes, so each pane carries this copy; it uses the runtime's own Temporal when there is one.\nfunction temporalsLibrary() {\n\"use strict\";var temporals=(()=>{var zo=Object.defineProperty;var sd=Object.getOwnPropertyDescriptor;var cd=Object.getOwnPropertyNames;var ud=Object.prototype.hasOwnProperty;var dd=(e,n)=>{for(var t in n)zo(e,t,{get:n[t],enumerable:!0})},ld=(e,n,t,o)=>{if(n&&typeof n==\"object\"||typeof n==\"function\")for(let r of cd(n))!ud.call(e,r)&&r!==t&&zo(e,r,{get:()=>n[r],enumerable:!(o=sd(n,r))||o.enumerable});return e};var md=e=>ld(zo({},\"__esModule\",{value:!0}),e);var km={};dd(km,{BusinessCalendar:()=>Vt,Temporal:()=>Om,WorkingHours:()=>_t,businessCalendar:()=>id,businessDuration:()=>_u,duration:()=>la,durationMs:()=>Sm,formatRelative:()=>Ju,holidayRules:()=>rd,humanizeDuration:()=>ia,iso:()=>Nm,parseDuration:()=>aa,plainDate:()=>Mm,recurFromString:()=>ua,temporalSource:()=>vm,weekdayCode:()=>da,words:()=>Pm,workingHours:()=>wm,zoned:()=>ad});var Vo=globalThis.Temporal;var ma=(e,n)=>`Non-positive ${e}: ${n}`,fa=(e,n)=>`Non-finite ${e}: ${n}`,ha=e=>`Cannot convert bigint to ${e}`,pa=\"Invalid object\",ot=(e,n,t,o)=>un(e,n)+`; must be between ${t}-${o}`,un=(e,n)=>`Invalid ${e}: ${n}`;var _o=1e3,Jo=1e6,Ko=1e9,Qo=6e10,Xo=36e11;function ie(e){return e===void 0?Object.create(null):dn(e)}function Qt(e,n=\"number\"){if(typeof e==\"bigint\")throw new TypeError(ha(n));if(e=Number(e),!Number.isFinite(e))throw new RangeError(fa(n,e));return e}function U(e,n){return Math.trunc(Qt(e,n))||0}function Xt(e,n){return ya(U(e,n),n)}function ya(e,n=\"number\"){if(e<=0)throw new RangeError(ma(n,e));return e}function er(e,n,t){return Math.min(Math.max(e,n),t)}function Nn(e){return e!==null&&(typeof e==\"object\"||typeof e==\"function\")}function dn(e){if(!Nn(e))throw new TypeError(pa);return e}var so=un;var dt=e=>`Missing ${e}`,Pa=e=>\"No valid fields: \"+e.join(),Na=\"Invalid bag\",Oa=(e,n,t)=>un(e,n)+\"; must be \"+Object.keys(t).join(),ka=\"Cannot use valueOf\",Ea=\"Invalid calling context\",co=e=>\"Missing year\"+(e?\"/era/eraYear\":\"\"),mn=\"Invalid leap month\",xa=e=>un(\"Calendar\",e),Za=(e,n)=>`Unknown calendar ${e}; might need ${n}`,pr=e=>un(\"TimeZone\",e),$e=\"Out-of-bounds date\";var Fa=e=>`Cannot parse: ${e}`,Ze=e=>`Invalid substring: ${e}`;var yr=er,ee=Nn;function T(e){throw new RangeError(e)}function S(e){throw new TypeError(e)}function rr(e,n,t,o,r){return we(n,((i,a)=>{let s=i[a];return s===void 0&&S(dt(a)),s})(e,n),t,o,r)}function we(e,n,t,o,r,i){let a=yr(n,t,o);return r&&n!==a&&T(((s,c,u,d,l)=>l?ot(s,l[c],l[u],l[d]):ot(s,c,u,d))(e,n,t,o,i)),a}function En(e,n=Map){let t=new n;return(o,...r)=>{if(t.has(o))return t.get(o);let i=e(o,...r);return t.set(o,i),i}}var Ra=e=>uo({name:e},1),uo=(e,n)=>Ve(t=>({value:t,configurable:1,writable:!n}),e),lt=e=>({[Symbol.toStringTag]:{value:e,configurable:1}});function Ve(e,n){let t={};for(let o in n)t[o]=e(n[o],o);return t}function mt(e,n){let t={};for(let o of e)t[o]=n;return t}function lo(e){let n={};for(let t of e)n[t]=o=>o[t];return n}function Me(e,n,t=Object.create(null)){for(let o of e)t[o]=n[o];return t}function Ca(e,n,t){for(let o of e)if(n[o]!==t[o])return 0;return 1}function Td(e,n,t){let o={...t};for(let r=0;r<n;r++)o[e[r]]=0;return o}function C(e,...n){return(...t)=>e(...n,...t)}function Tr(){}function Ta(e){return e[0].toUpperCase()+e.substring(1)}function A(...e){return[].concat(...e).sort()}function Rn(e){return new RegExp(`^${e}$`,\"i\")}function gr(e){return parseInt(e.padEnd(9,\"0\"))}function Dr(e){return e&&e!==\"+\"?-1:1}function On(e){return e===void 0?0:parseInt(e)}function oo(e,n){return String(n).padStart(e,\"0\")}var pe=C(oo,2);function Fe(e,n){return Math.sign(e-n)}function x(e,n){return e<n?-1:e>n?1:0}function Ya(e,n){let t=e/n;return e%n<0n?t-1n:t}function br(e,n){let t=Ya(e,n);return[t,e-t*n]}function ve(e,n){return[Math.floor(e/n),mo(e,n)]}function mo(e,n){return(e%n+n)%n}function Cn(e,n){return Math.trunc(e/n)||0}function vr(e,n){return e%n||0}function Ba(e,n=1){return n*(.5+e/5)}function eo(e){return Math.abs(e%1)===.5}var Ir=\"iso8601\",Wa=\"gregory\",gd={bce:-1,ce:0};function Aa(e){let n=e.normalize(\"NFD\").toLowerCase().replace(/[^a-z0-9]/g,\"\");return n===\"bc\"||n===\"b\"?\"bce\":n===\"ad\"||n===\"a\"?\"ce\":n}var se=void 0,Ua=0;function ye(e){return e===se?\"iso8601\":e===0?\"gregory\":e.id}var Dd=/^M(\\d{2})(L?)$/;function La(e){let n=Dd.exec(e);return n||T((t=>`Invalid monthCode: ${t}`)(e)),[parseInt(n[1]),!!n[2]]}function qa(e,n){return\"M\"+pe(e)+(n?\"L\":\"\")}function ir(e,n,t){return e+(n||t&&e>=t?1:0)}var ar={nanosecond:0,microsecond:1,millisecond:2,second:3,minute:4,hour:5,day:6,week:7,month:8,year:9},wr=Object.keys(ar);var ft=_o,ht=Jo,_e=Ko,pt=Qo,yt=Xo,Ye=864e11,Te=[1,ft,ht,_e,pt,yt,Ye],bd=BigInt(ft),Yn=BigInt(ht),hn=BigInt(_e),vd=BigInt(pt),Id=BigInt(yt),O=BigInt(Ye);function ja(e,n){let t=Number(e/O),o=Number(e%O);return t*(Ye/n)+(Math.trunc(o/n)+o%n/n)}var _=wr.slice(0,6),Tt=lo(_),fo=[\"year\"],Tn=[\"day\"],Mr=[\"day\",\"month\",\"year\"],ho=[\"offset\"],Sr=[\"timeZone\"],Bn=[\"era\",\"eraYear\"],wd=[\"era\",\"eraYear\",\"year\"],$a=[\"month\",\"monthCode\"],Md=[\"day\",\"month\",\"monthCode\"],sr=A(_),Sd=A(Bn,fo),gt=A($a,fo),Ha=A(Bn,gt),Dt=A([\"monthCode\"],fo),Ga=A(Bn,Dt),za=A(Tn,[\"monthCode\"]),gn=A(Tn,gt),Dn=A(Tn,Bn,gt),Va=A(gn,_),_a=A(Dn,_),Pd=A(gn,_,ho),Nd=A(Dn,_,ho),Ja=A(gn,_,ho,Sr),Ka=A(Dn,_,ho,Sr),Od=A(Tn,Dt),kd=A(Tn,Bn,Dt),ce=mt(_,0);function bt(e){return po(e,1),e}var Ed={hour:23,minute:59,second:59};function po(e,n){let t={};for(let o of _)t[o]=we(o,e[o],0,Ed[o]||999,n);return t}function oe(e){return Nr(e)*_e+Qa(e)}function Pr(e){return 1e3*Nr(e)+e.millisecond}function Nr(e){return 3600*e.hour+60*e.minute+e.second}function Qa(e){return e.millisecond*ht+e.microsecond*ft+e.nanosecond}function Or(e){let[n,t]=ve(e,Ye);return[Xa(t),n]}function Xa(e){let[n,t]=ve(e,ht),[o,r]=ve(t,ft);return xd(n,o,r)}function xd(e,n=0,t=0){let[o,r]=ve(e,36e5),[i,a]=ve(r,6e4),[s,c]=ve(a,1e3);return{hour:o,minute:i,second:s,millisecond:c,microsecond:n,nanosecond:t}}function ga(e){let[n,t]=br(e,hn);return[Number(n),Number(t)]}function Ie(e){return fn(e)+BigInt(oe(e))}function es(e){return vt(e)+Pr(e)}function fn(e){return BigInt(Se(e))*O}function vt(e){return 864e5*Se(e)}function Se(e){return rt(e.year,e.month,e.day)}function rt(e,n=1,t=1){let o=n-1;return e+=Math.floor(o/12),n=mo(o,12),Date.UTC(e%400-400,n,0)/864e5+146097*(Cn(e,400)+1)+t}function It(e){let[n,t]=br(e,O);return{...ns(Number(n)),...Xa(Number(t))}}function ns(e){let n=new Date(864e5*mo(e,146097));return{year:n.getUTCFullYear()+400*Math.floor(e/146097),month:n.getUTCMonth()+1,day:n.getUTCDate()}}var ts=1972;function Zd(e){return[e,0]}function cr(e,n){if(!n)return{year:1972,month:e}}function Fd(e,n,t){return{year:e,month:n,day:t}}function os(e,n){switch(n){case 2:return yo(e)?29:28;case 4:case 6:case 9:case 11:return 30}return 31}function Rd(e){return yo(e)?366:365}function yo(e){return e%4==0&&(e%100!=0||e%400==0)}function rs(e,n,t){return e+=Cn(t,12),(n+=vr(t,12))<1?(e--,n+=12):n>12&&(e++,n-=12),{year:e,month:n}}function Cd(e,n,t,o){return 12*(t-e)+o-n}function To(e){return mo(rt(e.year,e.month,e.day)+4,7)||7}function is(e){return rt(e.year,e.month,e.day)-rt(e.year)+1}function as(e){let n=e.year,t=Math.floor((is(e)-To(e)+10)/7),o=nr(n);return t<1?t=o=nr(--n):t>o&&(t=1,o=nr(++n)),{weekOfYear:t,yearOfWeek:n,Ie:o}}function nr(e){let n=To({year:e,month:1,day:1});return n===4||n===3&&yo(e)?53:52}function Yd({year:e}){return e<1?{era:\"bce\",eraYear:1-e}:{era:\"ce\",eraYear:e}}function wt(e){return Be(e),bt(e)}function Be(e){return ss(e,1),e}function Da(e){return Ca(Mr,e,ss(e))}function ss(e,n){let{year:t}=e,o=rr(e,\"month\",1,12,n);return{year:t,month:o,day:rr(e,\"day\",1,os(t,o),n)}}function P(e,n){return e?e.ie(n):n}function pn(e,n,t){return e?e.O(n,t):Zd(t)}function Mt(e,n){return e===0?Yd(n):e?e.h(n):{}}function yn(e,n,t,o){return e?e.je(n,t,o):Fd(n,t,o)}function it(e,n){return e?e.k(n):12}function at(e,n,t){return e?e.p(n,t):os(n,t)}function go(e,n){let{year:t,month:o}=P(e,n),[r,i]=pn(e,t,o);return qa(r,i)}function kr(e,n){let{year:t}=P(e,n);return e?e.u(t):yo(t)}function Er(e,n){let{year:t}=P(e,n);return it(e,t)}function xr(e,n){let{year:t,month:o}=P(e,n);return at(e,t,o)}function Zr(e,n){let{year:t}=P(e,n);return e?e.j(t):Rd(t)}function cs(e,n){if(!e)return is(n);let{year:t}=P(e,n),o=yn(e,t,1,1);return Se(n)-Se(o)+1}function us(e,n){return e===se?as(n).weekOfYear:void 0}function ds(e,n){return e===se?as(n).yearOfWeek:void 0}var k=wr.map(e=>e+\"s\"),Fr=lo(k),ls=A(k),Bd=k.slice(0,6),ms=k.slice(6),Wd=ms.slice(1),Ad=k.reduce((e,n,t)=>(e[n]=t,e),{}),R=mt(k,0),Rr=mt(Bd,0),Cr=C(Td,k);function fs(e,n){return n==null&&T(dt(e)),n}var $=C(Ud,\"string\");function Ud(e,n,t=e){return typeof n!==e&&S(so(t,n)),n}function Yr(e,n=\"number\"){return Number.isInteger(e)||T(((t,o)=>`Non-integer ${t}: ${o}`)(n,e)),e||0}function Br(e){return typeof e==\"symbol\"&&S(\"Cannot convert Symbol to string\"),String(e)}function Wr(e,n){return Nn(e)?String(e):$(e,n)}function Do(e){return typeof e==\"boolean\"?BigInt(e?1:0):typeof e==\"string\"?BigInt(e):(typeof e!=\"bigint\"&&S(`Invalid bigint: ${e}`),e)}function bo(e,n){return Yr(Qt(e,n),n)}function vo(e,n){return typeof e==\"string\"?((t,o)=>{let r=Object.create(null);return r[t]=o,r})(n,e):dn(e)}var Re=\"smallestUnit\";var Ld={constrain:0,reject:1},qd={compatible:0,reject:1,earlier:2,later:3},jd={reject:0,use:1,prefer:2,ignore:3},$d={auto:0,never:1,critical:2,always:3},Hd={auto:0,never:1,critical:2},Gd={auto:0,never:1},zd={floor:0,halfFloor:1,ceil:2,halfCeil:3,trunc:4,halfTrunc:5,expand:6,halfExpand:7,halfEven:8},Vd=[Math.floor,e=>eo(e)?Math.floor(e):Math.round(e),Math.ceil,e=>eo(e)?Math.ceil(e):Math.round(e),Math.trunc,e=>eo(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=>eo(e)?(e=Math.trunc(e)||0)+e%2:Math.round(e)],_d={previous:-1,next:1};function Ar(e){let n=e.roundingIncrement;return n===void 0?1:U(n,\"roundingIncrement\")}function Ur(e){let n=e.fractionalSecondDigits;if(n!==void 0){if(typeof n!=\"number\"){if(Br(n)===\"auto\")return;T(so(\"fractionalSecondDigits\",n))}n=we(\"fractionalSecondDigits\",Math.floor(n),0,9,1)}return n}function Lr(e,n,t=0,o){let r=n[e];if(r===void 0)return o?t:void 0;if(r=Br(r),r===\"auto\")return o?t:null;let i=ar[r];return i===void 0&&(i=Ad[r]),i===void 0&&T(Oa(e,r,ar)),i}function Je(e,n,t,o=0){let r=t[e];if(r===void 0)return o;let i=Br(r),a=n[i];return a===void 0&&T(Oa(e,i,n)),a}var Wn=C(Lr,Re),hs=C(Lr,\"largestUnit\"),Jd=C(Lr,\"unit\"),ps=C(Je,\"overflow\",Ld),ys=C(Je,\"disambiguation\",qd),Kd=C(Je,\"offset\",jd),qr=C(Je,\"calendarName\",$d),Qd=C(Je,\"timeZoneName\",Hd),Xd=C(Je,\"offset\",Gd),An=C(Je,\"roundingMode\",zd),el=C(Je,\"direction\",_d);function jr(e,n,t,o){let r=o?Ye:Te[n+1];if(r){let i=Te[n];r%((e=we(\"roundingIncrement\",e,1,r/i-(o?0:1),1))*i)&&T(so(\"roundingIncrement\",e))}else e=we(\"roundingIncrement\",e,1,t?10**9:1,1);return e}function xn(e,n,t,o){return n!=null&&we(e,n,t,o,1,wr),n}function Ts(e,n){n>e&&T(\"smallestUnit > largestUnit\")}function Un(e,n,t,o=9,r=0,i=4){n=ie(n);let a=hs(n,r),s=Ar(n),c=An(n,i),u=Wn(n,r,1);return a=xn(\"largestUnit\",a,r,o),u=xn(Re,u,r,o),a==null?a=Math.max(t,u):Ts(a,u),s=jr(s,u,1),e&&(c=(d=>d<4?(d+2)%4:d)(c)),[a,u,s,c]}function St(e,n=6,t){let o=Ar(e=vo(e,Re)),r=An(e,7),i=Wn(e);return i=fs(Re,i),i=xn(Re,i,0,n),o=jr(o,i,void 0,t),[i,o,r]}function E(e,n){return Me(Mr,e,Me(_,n))}function w(e){return e===void 0?0:ps(dn(e))}function Zn(e,n=0){e=ie(e);let t=ys(e),o=Kd(e,n);return[ps(e),o,t]}var gs=BigInt(1e8)*O,$r=BigInt(-1e8)*O,Ds=$r-O,bs=-3261848;function Io(e){let n=12*e.year+e.month;return(n<bs||n>3309129)&&T($e),e}function X(e,n=1){return vs(fn(e),n),e}function bn(e){let n=fn(e);return vs(n),n!==Ds||oe(e)||T($e),e}function vs(e,n=1){(e<(n?Ds:$r)||e>gs)&&T($e)}function ge(e){return(e<$r||e>gs)&&T($e),e}function Hr(e,n){return ge(fn(e)+BigInt(oe(e)-n))}function ue(e){return{epochNanoseconds:e}}function De(e,n,t){return{calendar:t,timeZone:n,epochNanoseconds:e}}function Pe(e,n){return Me(_,e,N(e,n))}function N(e,n){return Me(Mr,e,{calendar:n})}function vn(e){return Me(_,e)}function B(e){return Me(k,e,{sign:xo(e)})}function Pt(e){return n=e.epochNanoseconds,Number(Ya(n,Yn));var n}function Nt(e){return e.epochNanoseconds}function Is(e,n,t){let o=ze(n),[r,i]=((u,d)=>{let l=d((u=vo(u,\"unit\")).relativeTo),m=Jd(u);return m=fs(\"unit\",m),[m,l]})(t,e);if(!i&&kn(Math.max(r,o),i))return ba(n,r);if(i||T(\"Missing relativeTo\"),!n.sign&&kn(r,i))return 0;let a=Eo(i),s=a.G(a.i,n);Cs(a,s);let c=a.re(a.i,s,r);return kn(r,i)?ba(c,r):nl(c,a.V(s),r,a)}function nl(e,n,t,o){let r=xo(e)||1,i=Gr(Cr(t,e),t,r,o,n),a=i.ae,s=i.de,c=Number(s-a),u=Number(n-a);return i.ye[k[t]]+u/c*r}function ba(e,n){return ja(Ce(e),Te[n])}function Gr(e,n,t,o,r){let i=k[n],a=e,s=0,c=va(a,i,t,o);return r&&!((u,d,l,m)=>m>0?x(d,u)<=0&&x(u,l)<=0:x(l,u)<=0&&x(u,d)<=0)(r,c.ae,c.de,Math.sign(t))&&(a={...e,[i]:e[i]+t},s=1,c=va(a,i,t,o)),{...c,ye:a,He:s}}function va(e,n,t,o){let r={...e,[n]:e[n]+t};return{ae:ct(o,e),de:ct(o,r),Ae:r}}function ws(e,n,t){let o=t-n,r=e-n;if(!r)return 0;let i=r<0n?-r:r,a=o<0n?-o:o,s=x(r,0n)===x(o,0n)?1:-1;return x(i,a)<=0?i===a?s:Ba(x(2n*i,a),s):Number(r)/Number(o)}function Ms(e,n,t,o){let{epochNanoseconds:r}=e,{timeZone:i,calendar:a}=e;if(n===0&&t===1)return{epochNanoseconds:r,timeZone:i,calendar:a};if(n===6){let s=E(W(e),ce),c=E(Ke(s,1),ce),u=He(i,s),d=He(i,c);r=zr(ws(r,u,d),o)?d:u}else{let s=W(e),c=s.offsetNanoseconds;r=qn(i,wo(s,Ln(n,t),o),c,2,0,1)}return{epochNanoseconds:r,timeZone:i,calendar:a}}function Ss(e){let{timeZone:n}=e,t=E(W(e),ce),o=E(Ke(t,1),ce),r=He(n,t);return ja(He(n,o)-r,yt)}function Ps(e){let{timeZone:n,calendar:t}=e;return De(He(n,E(W(e),ce)),n,t)}function wo(e,n,t){let[o,r]=Mo(e,n,t),i=E(Ke(e,r),o);return bn(i),i}function Mo(e,n,t){return Or(Fn(oe(e),n,t))}function ro(e){return Fn(e,pt,7)}function Ln(e,n){return Te[e]*n}function Ot(e,n){return BigInt(Te[e])*BigInt(n)}function tl(e,n,t){let o=Math.min(ze(e),6);return Ge(Po(Ce(e),BigInt(n),t),o)}function So(e,n,t,o,r,i,a){if(o===0&&r===1)return e;let s=xo(e)||1,c=kn(o,a.i)?Zt(a.i)&&o<6&&t>=6?rl:ol:il,[u,d,l]=c(s,e,n,t,o,r,i,a);return l&&o!==7&&(u=((m,f,p,h,y,b)=>{for(let v=h+1;v<=p;v++){if(v===7&&p!==7)continue;let D=Cr(v,m);D[k[v]]+=y;let I=x(f,ct(b,D));if(I&&I!==y)break;m=D}return m})(u,d,t,Math.max(6,o),s,a)),u}function Po(e,n,t){return Ns(e,n,t,e/n%2n)}function No(e,n,t){let[o,r]=br(e,O),i=o*O;return i+Ns(r,n,t,(i/n+r/n)%2n)}function Ns(e,n,t,o){let r=e/n,i=e%n,a=0;i&&(a=Ba(x(2n*(i<0n?-i:i),n),Math.sign(Number(i))));let s=zr(Number(o)+a,t);return(r-o+BigInt(s))*n}function Fn(e,n,t){return zr(e/n,t)*n}function zr(e,n){return Vd[n](e)}function ol(e,n,t,o,r,i,a){let s=Ce(n),c=Po(s,Ot(r,i),a),u=c-s,d=Math.sign(Number(c/O)-Number(s/O))===e,l=Ge(c,Math.min(o,6));return[{...n,...l},t+u,d]}function rl(e,n,t,o,r,i,a,s){let c=Number(In(n)),u=Ln(r,i),d=Fn(c,u,a),l=Gr({...n,...Rr},6,e,s,t),m=l.ae,f=l.de,p=d-Number(f-m),h=0;p&&Math.sign(p)!==e?t=m+BigInt(d):(h+=e,d=Fn(p,u,a),t=f+BigInt(d));let y=Zo(d);return[{...n,...y,days:n.days+h},t,!!h]}function il(e,n,t,o,r,i,a,s){let c=k[r],u=Cr(r,n);r===7&&(n={...n,weeks:n.weeks+Math.trunc(n.days/7)});let d=Cn(n[c],i)*i;u[c]=d;let l=Gr(u,r,i*e,s,t),m=l.ae,f=l.de,p=ws(t,m,f),h=l.ye[c],y=l.Ae[c],b=Fn(h+p*e*i,i,a),v=b===y;return u[c]=b,[u,v?f:m,l.He||v]}function Os(e,n){return e.timeZone.U(e.epochNanoseconds,(t=>{let o=vo(t,\"direction\"),r=el(o,0);return r||T(so(\"direction\",r)),r})(n))}var W=En(al,WeakMap);function al(e){let{epochNanoseconds:n,timeZone:t}=e,o=t.C(n);return{...It(n+BigInt(o)),offsetNanoseconds:o}}function qn(e,n,t,o=0,r=0,i,a){if(t!==void 0&&o===1&&(o===1||a))return Hr(n,t);o!==2&&o!==0||X(n,0);let s=e.R(n);if(t!==void 0&&o!==3){let c=((u,d,l,m)=>{let f=Ie(d);m&&(l=ro(l));for(let p of u){let h=Number(f-p);if(m&&(h=ro(h)),h===l)return p}})(s,n,t,i);if(c!==void 0)return c;o===0&&T(\"Invalid TimeZone offset\")}return a?Ie(n):kt(e,n,r,s)}function kt(e,n,t=0,o=e.R(n)){if(o.length===1)return o[0];if(t===1&&T(\"Ambiguous offset\"),o.length)return o[t===3?1:0];let r=Ie(n),i=((s,c)=>{let u=s.C(c-O);return(d=>(d>Ye&&T(\"Out-of-bounds TimeZone gap\"),d))(s.C(c+O)-u)})(e,r),a=It(r+BigInt(i*(t===2?-1:1)));return(o=e.R(a))[t===2?0:o.length-1]}function He(e,n){let t=e.R(n);if(t.length)return t[0];let o=Ie(n)-O;return e.U(o,1)}function Vr(e,n,t,o,r){let i=w(r);o.sign&&ze(o)<8&&T(\"Cannot use small units\");let a=X(st(n,t));return st(n,ks(n,a,e?H(o):o,i))}function _r(e,n){return ge(e+(Ls(t=n)&&T(\"Cannot use large units\"),In(t)));var t}function Et(e,n,t){let{calendar:o,epochNanoseconds:r,timeZone:i}=e,a=In(n),s=r;if(Ls(n)){let c=W(e);s=kt(i,E(jn(o,c,{...n,...Rr},t),c))+a}else s+=a,w(t);return{...e,epochNanoseconds:ge(s)}}function xt(e,n,t,o){let[r,i]=Oo(n,t),a=E(jn(e,n,{...t,...Rr,days:t.days+i},o),r);return bn(a),a}function jn(e,n,t,o){if(t.years||t.months||t.weeks)return ks(e,n,t,w(o));w(o);let r=t.days+Number(In(t)/O);return r?X(Ke(n,r)):n}function st(e,n){return Ke(n,1-P(e,n).day)}function Oo(e,n){let t=In(n),o=Number(t/O),r=Number(t%O),[i,a]=Or(oe(e)+r);return[i,o+a]}function Ke(e,n){return n?ns(Se(e)+n):e}function ks(e,n,t,o){let{years:r,months:i,weeks:a,days:s}=t,c;if(s+=Number(In(t)/O),r||i)c=ur(e,n,r,i,o);else{if(!a&&!s)return n;c=n}return(a||s)&&(c=Ke(c,7*a+s)),X(c)}function ur(e,n,t,o,r){let i=P(e,n),{year:a,month:s,day:c}=i;if(t){let[u,d]=pn(e,a,s);a+=t,s=dr(e,u,d,e?e.q(a):void 0,r),s=we(\"month\",s,1,it(e,a),r)}return o&&({year:a,month:s}=e?e.N(a,s,o):rs(a,s,o)),c=we(\"day\",c,1,at(e,a,s),r),yn(e,a,s,c)}function dr(e,n,t,o,r){if(t){let i=e?e.m:void 0;return o!==void 0&&(i<0||o===n+1)?o:(r===1&&T(mn),i<0?-i:n)}return ir(n,0,o)}function We(e,n){return ye(e)!==ye(n)&&T(\"Mismatching Calendars\"),e}function sl(e,n){return e.o!==n.o&&T(\"Mismatching TimeZones\"),e}function Es(e){return e.timeZone.id}function Jr(e,n,t,o){let[r,i,a,s]=Un(e,o,3,5),c=ko(n.epochNanoseconds,t.epochNanoseconds,r,i,a,s);return B(e?H(c):c)}function Kr(e,n,t,o,r){let[i,a,s,c]=Un(e,r,5),u=t.epochNanoseconds,d=o.epochNanoseconds,l;return x(d,u)?i<6?l=ko(u,d,i,a,s,c):(l=Zs(sl(t.timeZone,o.timeZone),n,t,o,i),l=So(l,d,i,a,s,c,oi(t,Nt,Et))):l=R,B(e?H(l):l)}function Qr(e,n,t,o,r){let[i,a,s,c]=Un(e,r,6),u=Ie(t),d=Ie(o),l=x(d,u),m;return l?i<=6?m=ko(u,d,i,a,s,c):(m=Fs(n,t,o,l,i),m=So(m,d,i,a,s,c,oi(t,Ie,C(xt,n)))):m=R,B(e?H(m):m)}function Xr(e,n,t,o,r){let[i,a,s,c]=Un(e,r,6,9,6);return xs(e,n,t,o,i,a,s,c)}function ei(e,n,t,o,r){let[i,a,s,c]=Un(e,r,9,9,8),u=st(n,t),d=st(n,o);return Rs(u,d)?xs(e,n,X(u),X(d),i,a,s,c,8):B(R)}function xs(e,n,t,o,r,i,a,s,c=6){let u=fn(t),d=fn(o),l;return x(d,u)?r===6?l=ko(u,d,r,i,a,s):(l=ti(n,t,o,r),i===c&&a===1||(l=So(l,d,r,i,a,s,oi(t,fn,C(jn,n))))):l=R,B(e?H(l):l)}function ni(e,n,t,o){let[r,i,a,s]=Un(e,o,5,5),c=Fn(oe(t)-oe(n),Ln(i,a),s),u={...R,...Zo(c,r)};return B(e?H(u):u)}function Zs(e,n,t,o,r){let i=x(o.epochNanoseconds,t.epochNanoseconds);if(!i)return R;if(r<6)return{...R,...Ge(o.epochNanoseconds-t.epochNanoseconds,r)};if(!Rs(W(t),W(o)))return{...R,...Ge(o.epochNanoseconds-t.epochNanoseconds,5)};let[a,s,c]=ul(e,t,o,i);return{...r===6?{...R,days:to(a,s)}:ti(n,a,s,r),...Zo(c)}}function cl(e,n,t,o){let r=Ie(n),i=Ie(t),a=x(i,r);return a?o<=6?{...R,...Ge(i-r,o)}:Fs(e,n,t,a,o):R}function Fs(e,n,t,o,r){let i=t,a=oe(t)-oe(n);return Math.sign(a)===-o&&(i=Ke(t,-o),a+=Ye*o),{...ti(e,n,i,r),...Zo(a)}}function ti(e,n,t,o){if(o<=7){let h=to(n,t);return o===7?{...R,weeks:Cn(h,7),days:vr(h,7)}:{...R,days:h}}let r=P(e,n),i=P(e,t);if(o===8){let{year:h,month:y,day:b}=r,{year:v,month:D,day:I}=i,F=Math.sign(Fe(v,h)||Fe(D,y)||to(n,t)),j=0,K=0;if(F){j=e?e.ne(h,y,v,D):Cd(h,y,v,D);let Q=ur(e,n,0,j,0);F*Fe(b,I)>0&&(j-=F,Q=ur(e,n,0,j,0)),K=to(Q,t)}return{...R,months:j,days:K}}let{year:a,month:s,day:c}=r,{year:u,month:d,day:l}=i,m=u-a,f=d-s,p=l-c;if(m||f){let h=Math.sign(m||f),y=at(e,u,d),b=0;if(Math.sign(l-c)===-h){let v=y;({year:u,month:d}=e?e.N(u,d,-h):rs(u,d,-h)),m=u-a,f=d-s,y=at(e,u,d),b=h<0?-v:y}if(p=l-Math.min(c,y)+b,m){let[v,D]=pn(e,a,s),[I,F]=pn(e,u,d),j=e?e.m:void 0;if(f=j!==void 0&&D&&!F&&(j<0?h>0&&I===-j:h<0&&I===v)?0:I-v||Number(F)-Number(D),Math.sign(f)===-h){let K=h<0&&-it(e,u);u-=h,m=u-a,f=d-dr(e,v,D,e?e.q(u):void 0,0)+(K||it(e,u))}else if(e){let K=dr(e,v,D,e.q(u),0);f=e.ne(u,K,u,d)}}}return{...R,years:m,months:f,days:p}}function Rs(e,n){return Fe(e.year,n.year)||Fe(e.month,n.month)||Fe(e.day,n.day)}function ul(e,n,t,o){let r=W(n),i=W(t),a=t.epochNanoseconds,s=0,c=oe(i)-oe(r);Math.sign(c)===-o&&s++;let u=s+(o>0?1:0);for(;s<=u;s++){let d=Ke(i,s*-o),l=kt(e,E(d,r));if(x(a,l)!==-o)return[r,d,Number(a-l)]}}function ko(e,n,t,o,r,i){return{...R,...Ge(Po(n-e,Ot(o,r),i),t)}}function to(e,n){return Se(n)-Se(e)}function oi(e,n,t){return{i:e,V:n,G:t}}function Eo(e){let{calendar:n}=e;if(Zt(e)){let{timeZone:t}=e;return{i:e,V:Nt,G:Et,re:C(Zs,t,n)}}return{i:Ys(e),V:Ie,G:C(xt,n),re:C(cl,n)}}function ct(e,n){return e.V(e.G(e.i,n))}function Zt(e){return\"timeZone\"in e}function Cs(e,n){Zt(e.i)||(Ia(e.i),Ia(n))}function Ys(e){return E(e,\"hour\"in e?e:ce)}function Ia(e){bn(Ys(e))}function kn(e,n){return e<=6-(n&&Zt(n)?1:0)}function ri(e,n,t){let o={};for(let r=n;r>=0;r--){let i=Te[r];o[t[r]]=Cn(e,i),e=vr(e,i)}return o}var dl=2**53;function ii(e,n,t,o,r){let i=e(ie(r).relativeTo),a=Math.max(ze(t),ze(o));if(kn(a,i))return ll(n,t,o,a);i||T(\"Missing relativeTo\"),n&&(o=H(o));let s=Eo(i),c=s.G(s.i,t),u=s.G(c,o);return B(s.re(s.i,u,a))}function ll(e,n,t,o){return B(Qe(((r,i,a,s)=>{let c=Ce(r)+Ce(i)*BigInt(s?-1:1);return Number.isFinite(Number(c/O))||T($e),{...R,...Ge(c,a)}})(n,t,o,e)))}function Bs(e,n,t){let o=ze(n),[r,i,a,s,c]=((f,p,h)=>{f=vo(f,Re);let y=hs(f),b=h(f.relativeTo),v=Ar(f),D=An(f,7),I=Wn(f);return y===void 0&&I===void 0&&T(\"Required smallestUnit or largestUnit\"),I==null&&(I=0),y==null&&(y=Math.max(I,p)),Ts(y,I),v=jr(v,I,1),v>1&&I>5&&y!==I&&T(\"For calendar units with roundingIncrement > 1, use largestUnit = smallestUnit\"),[y,I,v,D,b]})(t,o,e);if(!c&&Math.max(o,r)<=6)return B(Qe(((f,p,h,y,b)=>{let v=Po(Ce(f),Ot(h,y),b);return{...R,...Ge(v,p)}})(n,r,i,a,s)));let u=c&&Zt(c)&&r>=6&&i<6;if(!n.sign&&!u)return n;c||T(\"Missing relativeTo\");let d=Eo(c),l=d.G(d.i,n);Cs(d,l);let m=d.re(d.i,l,r);return m=So(m,d.V(l),r,i,a,s,d),B(m)}function Ws(e){return e.sign===-1?ai(e):e}function ai(e){return B(H(e))}function H(e){let n={};for(let t of k)n[t]=-1*e[t]||0;return n}function xo(e,n=k){let t=0;for(let o of n){let r=Math.sign(e[o]);r&&(t&&t!==r&&T(\"Cannot mix duration signs\"),t=r)}return t}function Qe(e){for(let t of Wd)we(t,e[t],-4294967295,4294967295,1);let n=Ce(e);return As(Number(n/hn)),e}function As(e){Number.isSafeInteger(e)||T(\"Out-of-bounds duration\")}function Ce(e){return BigInt(e.days)*O+In(e)}function In(e){return BigInt(e.hours)*Id+BigInt(e.minutes)*vd+Us(e)}function Us(e){return BigInt(e.seconds)*hn+BigInt(e.milliseconds)*Yn+BigInt(e.microseconds)*bd+BigInt(e.nanoseconds)}function Ge(e,n=6){let t=Number(e/O),o=Number(e%O),r=Te[n],i=n<=3?Number(e/BigInt(r)):t*(Ye/r)+Cn(o,r);Number.isFinite(i)||T($e),n<=3&&Math.abs(i)/(_e/Te[n])>=dl&&T($e);let a=ri(o,n,k);return a[k[n]]=i,a}function Zo(e,n=5){return ri(e,n,k)}function Ls(e){return!!xo(e,ms)}function ze(e){let n=9;for(;n>0&&!e[k[n]];n--);return n}function si(e,n){return x(e.epochNanoseconds,n.epochNanoseconds)}function ci(e,n){return x(e.epochNanoseconds,n.epochNanoseconds)}function qs(e,n,t,o){let r=e(ie(o).relativeTo),i=Math.max(ze(n),ze(t));if(Ca(k,n,t))return 0;if(kn(i,r))return x(Ce(n),Ce(t));r||T(\"Missing relativeTo\");let a=Eo(r);return x(ct(a,n),ct(a,t))}function ui(e,n){return wn(e,n)||Fo(e,n)}function wn(e,n){return Fe(Se(e),Se(n))}function Fo(e,n){return Fe(oe(e),oe(n))}function js(e,n){return!si(e,n)}function $s(e,n){return!ci(e,n)&&e.timeZone.o===n.timeZone.o&&e.calendar===n.calendar}function Hs(e,n){return!ui(e,n)&&e.calendar===n.calendar}function Gs(e,n){return!wn(e,n)&&e.calendar===n.calendar}function zs(e,n){return!wn(e,n)&&e.calendar===n.calendar}function Vs(e,n){return!wn(e,n)&&e.calendar===n.calendar}function _s(e,n){return!Fo(e,n)}function $n(e){return e===0?gd:e?e.l:void 0}function J(e,n,t=n){return $n(e)?t:n}function di(e,n){let t=e||void 0,o=$n(e),{era:r,eraYear:i,year:a}=n;if(a!==void 0&&(a=U(a,\"year\")),i!==void 0&&(i=U(i,\"eraYear\")),r!==void 0||i!==void 0){r!==void 0&&i!==void 0||S(\"Mismatching era/eraYear\"),o||T(\"Forbidden era/eraYear\");let s=Aa(r),c=o[s];c===void 0&&T((d=>`Invalid era: ${d}`)(r));let u=t?.te?t.te(i,s,c):ml(i,c);a!==void 0&&a!==u&&T(\"Mismatching year/eraYear\"),a=u}else a===void 0&&S(co(o));return a}function io(e,n,t,o,r){let{month:i,monthCode:a}=n;if(a!==void 0){let s=((c,u,d,l,m=La(u))=>{let f=c?c.q(d):void 0,[p,h]=m,y=ir(p,h,f);if(h){let b=c?c.m:void 0;b===void 0&&T(mn),b>0?(y>b&&T(mn),f!==y&&(l===1&&T(mn),y=ir(p,0,f))):(y!==-b&&T(mn),f===void 0&&l===1&&T(mn))}return y})(e,a,t,o,r);i!==void 0&&i!==s&&T(\"Mismatching month/monthCode\"),i=s,o=1}else i===void 0&&S(\"Missing month/monthCode\");return we(\"month\",i,1,it(e,t),o)}function lr(e,n,t,o,r){return rr(n,\"day\",1,at(e,o,t),r)}function ml(e,n){return(n+e)*(Math.sign(n)||1)||0}function Ft(e,n){return po(Me(_,{...ce,...e}),n)}var fl=Rn(\"([+-])(\\\\d{2})(?::?(\\\\d{2})(?::?(\\\\d{2})(?:[.,](\\\\d{1,9}))?)?)?\");function Ro(e){let n=li(e);return n===void 0&&T(Fa(e)),n}function li(e,n){let t=fl.exec(e);if(t&&(o=>(r=>{r[0]!==\"T\"&&r[0]!==\"t\"||(r=r.slice(1));let i=r.search(/[.,]/),a=i<0?r:r.slice(0,i),s=a.split(\":\");return s.length===1?/^(?:\\d{2}|\\d{4}|\\d{6})$/i.test(a):(s.length===2||s.length===3)&&s.every(c=>c.length===2&&/^\\d{2}$/i.test(c))})(o.slice(1)))(t[0]))return((o,r)=>{let i=o[4]||o[5];return r&&i&&T(Ze(i)),s=(On(o[2])*yt+On(o[3])*pt+On(o[4])*_e+gr(o[5]||\"\"))*Dr(o[1]),Math.abs(s)>=Ye&&T(\"Out-of-bounds offset\"),s;var s})(t,n)}var de={era:Wr,month:Xt,monthCode(e,n=\"monthCode\"){return((t,o)=>{if(typeof t==\"string\")return t;if(t&&typeof t==\"object\"){let r=t.toString;if(typeof r==\"function\")return $(r.call(t),o)}return $(t,o)})(e,n)},day:Xt},mi=mt(_,U),Js=mt(k,bo),hl={offset(e){return Ro(Wr(e))}},fi=Object.assign({},de,mi),hi=Object.assign({},fi,hl);function Z(e,n,t,o,r=!o){let i={},a=0;for(let s of n){let c=e[s];if(c!==void 0){a=1;let u=t[s];u&&(c=u(c,s)),i[s]=c}else o&&o.includes(s)&&S(dt(s))}return r&&!a&&S(Pa(n)),i}function Rt(e,n=ce,t){let o=E(e,n);return bn(o),Pe(o,t)}function ut(e,n,t){return Ks(e,n,Qs(e,n),w(t))}function Co(e,n,t){let o=Qs(e,n),r=t();return[Ks(e,n,o,r[0]),...r]}function Ks(e,n,t,o){let r=t[1],i=io(e,n,r,o,t[0]);return N(X(yn(e,r,i,lr(e,n,i,r,o))),e)}function pi(e){if(e.monthCode!==void 0)return La(e.monthCode)}function Qs(e,n){let t=$n(e);return n.year!==void 0||n.era!==void 0&&n.eraYear!==void 0||S(co(t)),n.monthCode===void 0&&n.month===void 0&&S(\"Missing month/monthCode\"),n.day===void 0&&S(dt(\"day\")),[pi(n),di(e,n)]}function yi(e,n,t){let o=$n(e);n.year!==void 0||n.era!==void 0&&n.eraYear!==void 0||S(co(o)),n.monthCode===void 0&&n.month===void 0&&S(\"Missing month/monthCode\");let r=pi(n),i=di(e,n);return N(Io(yn(e,i,io(e,n,i,w(t),r),1)),e)}function Ti(e,n,t){let o=e===se,r=$n(e);n.day===void 0&&S(dt(\"day\")),o||n.month===void 0||n.year!==void 0||n.era!==void 0&&n.eraYear!==void 0||S(co(r));let i=pi(n),a=n.eraYear!==void 0||n.year!==void 0?di(e,n):void 0,s=w(t),c,u,d;if(a===void 0&&o&&(a=1972),a!==void 0){o||X(yn(e,a,1,1));let p=io(e,n,a,s,i);c=lr(e,n,p,a,s),[u,d]=pn(e,a,p)}else{n.monthCode===void 0&&S(\"Missing month/monthCode\"),[u,d]=i;let p=e?e.ge:1972;if(p!==void 0)c=lr(e,n,io(e,n,p,s,i),p,s);else{let h=s===0&&e?e.ke?.(u,d,n.day):void 0;c=h!==void 0?h:n.day}}d&&((e&&e.Z?.[u])??1/0)<n.day&&(s===1&&T(mn),d=0,c=yr(n.day,1,(e&&e.X)??1/0));let l=e?e.v(u,!!d,c):cr(u,!!d);for(;!l&&s===0&&c>1;)c--,l=e?e.v(u,!!d,c):cr(u,!!d);l||T(\"Cannot guess year\");let{year:m,month:f}=l;return N(X(yn(e,m,f,c)),e)}var Ne=Intl.DateTimeFormat;function pl(e,n){n<-864e13&&T($e);let t=e.formatToParts(n),o={};for(let r of t)o[r.type]=r.value;return o}var yl={El_Aaiun:17,Tucuman:12,Tirane:11,Riga:10,Simferopol:9,Vienna:9,Tunis:8,Boa_Vista:6,Fortaleza:6,Maceio:6,Noronha:6,Recife:6,Gaza:6,Hebron:6,DeNoronha:6},tr=-388152e4;function Xs(e,n=4){let t=Ur(e),o=An(e,4),r=Wn(e);return[o,...Di(xn(Re,r,0,n),t)]}function gi(e){return qr(ie(e))}function ec(e,n){return Xs(ie(e),n)}function Di(e,n){return e!=null?[Te[e],e<4?9-3*e:-1]:[n===void 0?1:10**(9-n),n]}function bi(e,n,t){let[o,r,i,a]=(c=>{let u=Ur(c=ie(c)),d=An(c,4),l=Wn(c);return[c.timeZone,d,...Di(xn(Re,l,0,4),u)]})(t),s=o!==void 0;return((c,u,d,l,m,f)=>{d=No(d,BigInt(m),l);let p=u.C(d);return Ni(It(d+BigInt(p)),f)+(c?Ct(ro(p)):\"Z\")})(s,ne(s?e(o):\"UTC\"),n.epochNanoseconds,r,i,a)}function vi(e,n){let t=(o=>{o=ie(o);let r=qr(o),i=Ur(o),a=Xd(o),s=An(o,4),c=Wn(o);return[r,Qd(o),a,s,...Di(xn(Re,c,0,4),i)]})(n);return((o,r,i,a,s,c,u,d,l,m)=>{a=No(a,BigInt(l),d);let f=i.C(a);return Ni(It(a+BigInt(f)),m)+Ct(ro(f),u)+Dl(r,c)+Oi(o,s)})(e.calendar,e.timeZone.id,e.timeZone,e.epochNanoseconds,...t)}function Ii(e,n){let t=(o=>(o=ie(o),[qr(o),...Xs(o)]))(n);return((o,r,i,a,s,c)=>Ni(wo(r,s,a),c)+Oi(o,i))(e.calendar,e,...t)}function wi(e,n){return t=e.calendar,o=e,r=gi(n),ao(o)+Oi(t,r);var t,o,r}function Mi(e,n){return nc(e.calendar,tc,e,gi(n))}function Si(e,n){return nc(e.calendar,gl,e,gi(n))}function nc(e,n,t,o){let r=o>1||o===0&&e!==se;return o===1?e===se?n(t):ao(t):r?ao(t)+rc(ye(e),o===2):n(t)}function Pi(e,n){return((t,o,r,i)=>oc(Mo(t,r,o)[0],i))(e,...ec(n))}function Yo(e,n){let[t,o,r]=ec(n,3);return o>1&&Qe(e={...e,...tl(e,o,t)}),Tl(e,r)}function Tl(e,n){let{sign:t}=e,o=t===-1?H(e):e,{hours:r,minutes:i}=o,a=Us(o),s=Number(a/hn),c=Number(a%hn);As(s);let u=ki(c,n),d=n>=0||!t||u;return(t<0?\"-\":\"\")+\"P\"+wa({Y:ln(o.years),M:ln(o.months),W:ln(o.weeks),D:ln(o.days)})+(r||i||s||d?\"T\"+wa({H:ln(r),M:ln(i),S:ln(s,d)+u}):\"\")}function wa(e){let n=[];for(let t in e){let o=e[t];o&&n.push(o,t)}return n.join(\"\")}function ln(e,n){if(!e&&!n)return\"\";let t=Object.create(null);return t.useGrouping=0,e.toLocaleString(\"fullwide\",t)}function Ni(e,n){return ao(e)+\"T\"+oc(e,n)}function ao(e){return tc(e)+\"-\"+pe(e.day)}function tc(e){let{year:n}=e;return(n<0||n>9999?ic(n)+oo(6,Math.abs(n)):oo(4,n))+\"-\"+pe(e.month)}function gl(e){return pe(e.month)+\"-\"+pe(e.day)}function oc(e,n){let t=[pe(e.hour),pe(e.minute)];return n!==-1&&t.push(pe(e.second)+((o,r,i,a)=>ki(o*ht+r*ft+i,a))(e.millisecond,e.microsecond,e.nanosecond,n)),t.join(\":\")}function Ct(e,n=0){if(n===1)return\"\";let[t,o]=ve(Math.abs(e),yt),[r,i]=ve(o,pt),[a,s]=ve(i,_e);return ic(e)+pe(t)+\":\"+pe(r)+(a||s?\":\"+pe(a)+ki(s):\"\")}function Dl(e,n){return n!==1?\"[\"+(n===2?\"!\":\"\")+e+\"]\":\"\"}function Oi(e,n){return n>1||n===0&&e!==se?rc(ye(e),n===2):\"\"}function rc(e,n){return\"[\"+(n?\"!\":\"\")+\"u-ca=\"+e+\"]\"}var bl=/0+$/;function ki(e,n){let t=oo(9,e);return t=n===void 0?t.replace(bl,\"\"):t.slice(0,n),t?\".\"+t:\"\"}function ic(e){return e<0?\"-\":\"+\"}var vl=/^(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$/,Il=/[^\\w\\/:+-]+/;function ac(e){return Bo($(e))}function Bo(e){return sc(e).id}function sc(e){let n=e.toUpperCase(),t=(r=>{let i=li(r,1);if(i!==void 0)return{id:Ct(i),_:i,o:i}})(n);if(t)return{kind:\"fixed\",...t};let o=n===\"UTC\"?\"UTC\":(r=>(Il.test(r)&&T(pr(r)),vl.test(r)&&T(\"Forbidden ICU TimeZone\"),r.toLowerCase().split(\"/\").map((i,a)=>(i.length<=3||/\\d/.test(i))&&!/etc|yap/.test(i)?i.toUpperCase():i.replace(/baja|dumont|[a-z]+/g,(s,c)=>s.length<=2&&!a||s===\"in\"||s===\"chat\"?s.toUpperCase():s.length>2||!c?Ta(s).replace(/island|noronha|murdo|rivadavia|urville/,Ta):s)).join(\"/\")))(e);return wl(o)}var wl=En(e=>{if(e===\"UTC\")return{kind:\"utc\",id:e,o:e};let n=e.toUpperCase(),t=Ml(n);return{kind:\"named\",id:e,format:t,o:t.resolvedOptions().timeZone}}),Ml=En(e=>new Ne(\"en-u-hc-h23\",{calendar:\"iso8601\",timeZone:e,era:\"short\",year:\"numeric\",month:\"numeric\",day:\"numeric\",hour:\"numeric\",minute:\"numeric\",second:\"numeric\"}));function ne(e){let n=sc(e);return Sl(n.id,n)}var Sl=En((e,n)=>n.kind===\"named\"?new fr(e,n.o,n.format):new mr(e,n.o,n.kind===\"fixed\"?n._:0)),mr=class{constructor(n,t,o){this.id=n,this.o=t,this._=o}C(){return this._}R(n){return[Hr(n,this._)]}U(){}},fr=class{constructor(n,t,o){this.id=n,this.o=t,this.qe=((r,i)=>{let a=En(r),s=En(Pl),c=86400*i;function u(l){let[m,f]=Sa(l,c),p=no(m),h=no(f),y=a(p),b=a(h);return y===b?y:d(s(p,h),y,b,l)}function d(l,m,f,p){let h,y;for(;(p===void 0||(h=p<l[0]?m:p>=l[1]?f:void 0)===void 0)&&(y=l[1]-l[0]);){let b=l[0]+Math.floor(y/2);r(b)===f?l[1]=b:l[0]=b+1}return h}return{Ee(l){let m=u(l-86400),f=u(l+86400),p=l-m,h=l-f;if(m===f)return[p];let y=u(p);return y===u(h)?[l-y]:m>f?[p,h]:[]},De:u,U:function l(m,f){if(f>0&&m>=864e10)return;if(f<0){if(m<=tr)return;let I=Ma()+94867200;if(m>I)return l(I,-1)}let p=f>0?Math.max(m,tr):m,[h,y]=Sa(p,c),b=c*f,v=f>0?Math.max(m,Ma())+94867200:tr,D=()=>f<0?y>v:h<v;for(;D();){let I=no(h),F=no(y),j=a(I),K=a(F);if(j!==K){let Q=s(I,F);d(Q,j,K);let V=Q[0];if((Fe(V,m)||1)===f)return V}h+=b,y+=b}}}})((r=>i=>{let a=pl(r,1e3*i);return 86400*rt((s=>{let c=s.relatedYear;if(c!==void 0)return parseInt(c);let u=parseInt(s.year);return s.era!==void 0&&Aa(s.era)===\"bce\"?1-u:u})(a),parseInt(a.month),parseInt(a.day))+3600*parseInt(a.hour)+60*parseInt(a.minute)+parseInt(a.second)-i})(o),(r=>{let i=r.split(\"/\").pop();return yl[i]||60})(n))}C(n){return this.qe.De((t=>ga(t)[0])(n))*_e}R(n){let t=86400*Se(n)+Nr(n),o=Qa(n);return this.qe.Ee(t).map(r=>ge(BigInt(r)*hn+BigInt(o)))}U(n,t){let[o,r]=ga(n),i=this.qe.U(o+(t>0||r?1:0),t);if(i!==void 0)return BigInt(i)*hn}};function Ma(){return Math.floor(Date.now()/1e3)}function Pl(e,n){return[e,n]}function Sa(e,n){let t=Math.floor(e/n)*n;return[t,t+n]}function no(e){return yr(e,-1e10,864e10)}function cc(e,n,t){let o=Z(t,J(n,Ja,Ka),hi,[],0);if(o.timeZone!==void 0){let r=ut(n,o),i=Ft(o),a=ne(e(o.timeZone));return{epochNanoseconds:qn(a,E(r,i),o.offset),timeZone:a,calendar:n}}return ut(n,o)}function uc(e,n,t,o){let r=Z(t,J(n,Ja,Ka),hi,Sr,0),i=e(r.timeZone),[a,s,c,u]=Co(n,r,()=>Zn(o)),d=Ft(r,s),l=ne(i);return De(qn(l,E(a,d),r.offset,c,u),l,n)}function dc(e,n,t){let o=Z(n,J(e,Va,_a),fi,[],0),[r,i]=Co(e,o,()=>[w(t)]);return Rt(r,Ft(o,i),e)}function lc(e,n,t,o=[]){return ut(e,Z(n,J(e,gn,Dn),de,o),t)}function mc(e,n,t,o){return yi(e,Z(n,J(e,gt,Ha),de,o),t)}function fc(e,n,t,o){let r=Z(t,J(e,gn,Dn),de,Tn,0);return n&&r.month!==void 0&&r.monthCode===void 0&&r.year===void 0&&(r.year=1972),Ti(e,r,o)}function hc(e,n){return Ft(Z(e,sr,mi,[],1),w(n))}function pc(e){let n=Z(e,ls,Js);return B(Qe({...R,...n}))}function ae(e){T(Fa(e))}function yc(e){let n=Xe(e=Wr(e)),t;return n||ae(e),n.F?t=0:n.offset?t=Ro(n.offset):ae(e),n.timeZoneId&&li(n.timeZoneId,1),wt(n),ue(Hr(n,t))}function Tc(e,n){let t=Xe($(e));return t||ae(e),t.timeZoneId?Nc(t,n,void 0):(t.F&&ae(e),hr(t,n))}function gc(e,n,t){let o=Xe($(e));return o&&o.timeZoneId||ae(e),Nc(o,n,t)}function Dc(e,n){let t=Xe($(e));return t&&!t.F||ae(e),Oc(t,n)}function bc(e,n){let t=Zi(xi($(e)),void 0,n);return N(t,t.calendar)}function vc(e,n){let t=Ri($(e));if(t)return Ei(t),N(Io(Be(t)),n(t.calendarId));let o=Zi(xi(e),Nl,n),{calendar:r}=o;return N(st(r,o),r)}function Ei(e){e.calendarId!==\"iso8601\"&&T(Ze(e.calendarId))}function Ic(e,n){let t=Ci($(e));if(t)return Ei(t),N(Be(t),n(t.calendarId));let o=Zi(xi(e),Ol,n),{calendar:r}=o,{year:i,month:a,day:s}=P(r,o),[c,u]=pn(r,i,a),{year:d,month:l}=((m,f,p,h)=>{let y=m?m.v(f,p,h):cr(f,p);return y||T(\"Cannot guess year\"),y})(r,c,u,s);return N(X(yn(r,d,l,s)),r)}function wc(e){let n=(o=>{let r=Ec(o);return r?(Yt(r[13]),xc(r,1)):void 0})(e=$(e)),t;return n||(n=Xe(e),n?(n.fe||ae(e),n.F&&T(Ze(\"Z\")),Ei(n)):ae(e)),(t=Ri(e))&&Da(t)&&ae(e),(t=Ci(e))&&Da(t)&&ae(e),vn(bt(n))}function Mc(e){let n=(t=>{let o=Cl.exec(t);return o?(r=>{let i=0,a=0,s=0,c={years:u(r[2]),months:u(r[3]),weeks:u(r[4]),days:u(r[5]),hours:u(r[6],r[7],5),minutes:u(r[8],r[9],4),seconds:u(r[10],r[11],3),...ri(s,2,k)};return i||T(Pa(k)),Dr(r[1])<0&&(c=H(c)),c;function u(d,l,m){let f=0,p=0;return m&&([f,s]=ve(s,Te[m])),d!==void 0&&(a&&T(Ze(d)),p=(h=>{let y=parseInt(h);return Number.isFinite(y)||T(Ze(h)),y})(d),i=1,l&&(s=gr(l)*(Te[m]/_e),a=1)),f+p}})(o):void 0})($(e));return n||ae(e),B(Qe(n))}function Sc(e){let n=Xe(e)||Ri(e)||Ci(e);if(n)return n.calendarId;let t=Ec(e);return t?Yt(t[13]).calendarId:e}function Pc(e){let n=Xe(e);return n&&(n.timeZoneId||n.F&&\"UTC\"||n.offset)||e}function xi(e){let n=Xe(e);return n&&!n.F||ae(e),n}function Zi(e,n,t){return n&&e.calendarId===\"iso8601\"?(Be(e),e.fe&&bt(e),hr(n(e),t)):e.fe?Oc(e,t):hr(e,t)}function Nl(e){let n=12*e.year+e.month===bs?20:1;return{...e,day:n}}function Ol(e){return{...e,year:1972}}function Nc(e,n,t){let o=ne(Bo(e.timeZoneId)),r;if(wt(e),e.fe){let a=e.offset?Ro(e.offset):void 0,[,s,c]=Zn(t);r=qn(o,e,a,s,c,!(o._||e.offset===void 0||(i=e.offset,i.replace(/\\D/g,\"\").length>4)),e.F)}else Zn(t),r=He(o,e);var i;return ge(r),De(r,o,n(e.calendarId))}function Oc(e,n){return wt(e),bn(e),{...E(e,e),calendar:n(e.calendarId)}}function hr(e,n){return Be(e),X(e),{calendar:n(e.calendarId),year:e.year,month:e.month,day:e.day}}function Fi(e){return`(\\\\d{2})(?:(:?)(\\\\d{2})(?:\\\\${e}(\\\\d{2})(?:[.,](\\\\d{1,9}))?)?)?`}function kc(e){return\"([+-])\"+Fi(e)}var kl=\"(?:(?:([+-])(\\\\d{6}))|(\\\\d{4}))(-?)(\\\\d{2})\\\\4(\\\\d{2})(?:[T ]\"+Fi(8)+\"(Z|\"+kc(15)+\")?)?\",El=Rn(\"(?:(?:([+-])(\\\\d{6}))|(\\\\d{4}))-?(\\\\d{2})((?:\\\\[(!?)([^\\\\]]*)\\\\]){0,9})\"),xl=Rn(\"(?:--)?(\\\\d{2})-?(\\\\d{2})((?:\\\\[(!?)([^\\\\]]*)\\\\]){0,9})\"),Zl=Rn(kl+\"((?:\\\\[(!?)([^\\\\]]*)\\\\]){0,9})\"),Fl=Rn(\"T?\"+Fi(2)+`(${kc(9)})?((?:\\\\[(!?)([^\\\\]]*)\\\\]){0,9})`),Rl=new RegExp(\"\\\\[(!?)([^\\\\]]*)\\\\]\",\"g\"),Cl=Rn(\"([+-])?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)?)?\");function Xe(e){let n=Zl.exec(e);return n?(t=>{let o=t[12],r=(o||\"\").toUpperCase()===\"Z\";return{year:Zc(t),month:parseInt(t[5]),day:parseInt(t[6]),...xc(t,7),...Yt(t[19]),fe:!!t[7],F:r,offset:r?void 0:o}})(n):void 0}function Ri(e){let n=El.exec(e);if(n)return(t=>({year:Zc(t),month:parseInt(t[4]),day:1,...Yt(t[5])}))(n)}function Ci(e){let n=xl.exec(e);return n?(t=>({year:1972,month:parseInt(t[1]),day:parseInt(t[2]),...Yt(t[3])}))(n):void 0}function Ec(e){let n=Fl.exec(e);if(n)return n[6]&&Ro(n[6]),n}function xc(e,n){let t=On(e[n+3]);return{...Or(gr(e[n+4]||\"\"))[0],hour:On(e[n]),minute:On(e[n+2]),second:t===60?59:t}}function Zc(e){let n=Dr(e[1]),t=parseInt(e[2]||e[3]);return n<0&&!t&&T(Ze(-0)),n*t}function Yt(e){let n,t,o=[];return e.replace(Rl,(r,i,a)=>{let s=!!i,[c,u]=a.split(\"=\").reverse();return u?u===\"u-ca\"?(o.push(c.toLowerCase()),n||(n=s)):(s||/[A-Z]/.test(u))&&T(Ze(r)):(t&&T(Ze(r)),t=c),\"\"}),o.length>1&&n&&T(Ze(e)),{timeZoneId:t,calendarId:o[0]||\"iso8601\"}}function Hn(e,n,t){let o=Object.assign(Object.create(null),n);return or(o,t,$a),$n(e)&&(or(o,t,wd),e&&e.le&&or(o,t,Md,Bn)),o}function or(e,n,t,o){let r=0,i=[];for(let a of t)n[a]!==void 0?r=1:i.push(a);if(Object.assign(e,n),r)for(let a of o||i)delete e[a]}function Fc(e,n,t){let{calendar:o,timeZone:r}=e,i=J(o,Pd,Nd),a=W(e),{year:s,month:c,day:u}=P(o,a),d={year:s,monthCode:Bt(o,s,c),day:u,hour:a.hour,minute:a.minute,second:a.second,millisecond:a.millisecond,microsecond:a.microsecond,nanosecond:a.nanosecond,offset:a.offsetNanoseconds},l=Z(n,i,hi),m=Hn(o,d,l),f={...d,...l},[p,h,y,b]=Co(o,m,()=>Zn(t,2));return De(qn(r,E(p,po(f,h)),f.offset,y,b),r,o)}function Rc(e,n,t){let{calendar:o}=e,r=J(o,Va,_a),{year:i,month:a,day:s}=P(o,e),c={year:i,monthCode:Bt(o,i,a),day:s,hour:e.hour,minute:e.minute,second:e.second,millisecond:e.millisecond,microsecond:e.microsecond,nanosecond:e.nanosecond},u=Z(n,r,fi),d=Hn(o,c,u),l={...c,...u},[m,f]=Co(o,d,()=>[w(t)]);return Rt(m,po(l,f),o)}function Cc(e,n,t){let{calendar:o}=e,r=J(o,gn,Dn),{year:i,month:a,day:s}=P(o,e);return ut(o,Hn(o,{year:i,monthCode:Bt(o,i,a),day:s},Z(n,r,de)),t)}function Yc(e,n,t){let{calendar:o}=e,r=J(o,gt,Ha),{year:i,month:a}=P(o,e);return yi(o,Hn(o,{year:i,monthCode:Bt(o,i,a)},Z(n,r,de)),t)}function Bc(e,n,t){let{calendar:o}=e,r=J(o,gn,Dn),{year:i,month:a,day:s}=P(o,e);return Ti(o,Hn(o,{monthCode:Bt(o,i,a),day:s},Z(n,r,de)),t)}function Wc(e,n,t){return((o,r,i)=>Ft({...Me(sr,o),...Z(r,sr,mi)},w(i)))(e,n,t)}function Ac(e,n){return B((t=e,o=n,Qe({...t,...Z(o,ls,Js)})));var t,o}function Bt(e,n,t){let[o,r]=pn(e,n,t);return qa(o,r)}function Uc(e,n,t){return De(e.epochNanoseconds,n,t)}function Lc(e){return ue(e.epochNanoseconds)}function Yi(e){return Pe(W(e),e.calendar)}function Bi(e){return N(W(e),e.calendar)}function Wi(e){return vn(W(e))}function qc(e,n,t){let o=((r,i,a)=>{let s=(c=>ys(ie(c)))(a);return kt(r,i,s)})(n,e,t);return De(ge(o),n,e.calendar)}function jc(e,n,t,o){let r=e(o.timeZone),i=o.plainTime,a=i!==void 0?n(i):void 0,s=ne(r),c;return c=a?kt(s,E(t,a)):He(s,E(t,ce)),De(c,s,t.calendar)}function $c(e,n,t){return Vc(e,Me(J(e,Dt,Ga),n),Z(dn(t),Tn,de,[]))}function Hc(e,n,t){let o=J(e,fo,Sd);return Vc(e,Me(za,n),Z(dn(t),o,de,[]))}function Gc(e,n){return Ti(e,Z(n,za,de))}function zc(e,n,t){return yi(e,Z(n,J(e,Dt,Ga),de),t)}function Vc(e,n,t){let o=J(e,Od,kd),r=Hn(e,n,t);return r=Z(r,o,de,[]),ut(e,r)}function _c(e){return ue(ge(BigInt(bo(e))*Yn))}function Jc(e){return ue(ge(Do(e)))}function Gn(e){return e.timeZone=\"UTC\",[\"full\",\"long\"].includes(e.timeStyle)&&(e.timeStyle=\"medium\"),e}function Kc(e,n){return e.timeZone!==void 0&&S(\"Cannot specify TimeZone\"),e.timeZone=n,e}function zn(e,n,t){let o=e.resolvedOptions().calendar;!t&&n.calendar===se||ye(n.calendar)===o||T(\"Mismatching Calendars\")}function Mn(e,n,t,o,r){let i=new Set(e),a=new Set(n),s=new Set(t);return(c,u)=>{let d=((I,F,j,K)=>{let Q={dateStyle:void 0,timeStyle:void 0,me:{},pe:{},xe:{},oe:0,ue:0};for(let V of Object.keys(I)){let Pn=I[V];Pn===void 0||K.has(V)||(F.has(V)?V===\"dateStyle\"?Q.dateStyle=Pn:V===\"timeStyle\"?Q.timeStyle=Pn:Q.me[V]=Pn:V===\"era\"?Q.pe[V]=Pn:j.has(V)?V===\"dateStyle\"||V===\"timeStyle\"?Q.ue=1:Q.oe=1:Q.xe[V]=Pn)}return Q})(c,i,a,s),l=d.dateStyle!==void 0,m=d.timeStyle!==void 0,f=l||m,p=Object.keys(d.me).length>0,h=d.oe||d.ue,y=p||l||m,b=Object.keys(d.pe).length>0,v=p||b||d.oe;(!u&&h||u&&h&&!y||f&&v)&&S(\"Invalid formatting options\");let D={};return f||y||Object.assign(D,o),Object.assign(D,d.me,d.pe,d.xe),l&&(r?Object.assign(D,r[d.dateStyle]):D.dateStyle=d.dateStyle),m&&(D.timeStyle=d.timeStyle),D}}var Qc={year:\"numeric\",month:\"numeric\",day:\"numeric\"},Xc={hour:\"numeric\",minute:\"numeric\",second:\"numeric\"},Ai=Object.assign({},Qc,Xc),Yl=Object.assign({},Ai,{timeZoneName:\"short\"}),Bl={year:\"numeric\",month:\"numeric\"},Wl={month:\"numeric\",day:\"numeric\"},Ui=[\"weekday\",\"year\",\"month\",\"day\",\"dateStyle\"],Wt=[\"dayPeriod\",\"hour\",\"minute\",\"second\",\"fractionalSecondDigits\",\"timeStyle\"],Li=Ui.concat(Wt),Al=[\"weekday\",\"day\"].concat(Wt),Ul=[\"weekday\",\"year\"].concat(Wt),eu=Mn(Li,[],[],Ai),nu=Mn(Li,[],[],Yl),tu=Mn(Li,[],[\"timeZoneName\"],Ai),ou=Mn(Ui,Wt,[\"timeZoneName\"],Qc),ru=Mn(Wt,Ui,[\"timeZoneName\",\"era\"],Xc),iu=Mn([\"year\",\"month\",\"dateStyle\"],Al,[\"timeZoneName\"],Bl,{full:{year:\"numeric\",month:\"long\"},long:{year:\"numeric\",month:\"long\"},medium:{year:\"numeric\",month:\"short\"},short:{year:\"2-digit\",month:\"numeric\"}}),au=Mn([\"month\",\"day\",\"dateStyle\"],Ul,[\"timeZoneName\",\"era\"],Wl,{full:{month:\"long\",day:\"numeric\"},long:{month:\"long\",day:\"numeric\"},medium:{month:\"short\",day:\"numeric\"},short:{month:\"numeric\",day:\"numeric\"}});function su(e,n){let{timeZone:t}=e,o=W(e),{offsetNanoseconds:r}=o,i=n||ce,a;return a=n?qn(t,E(o,i),r,2):He(t,E(o,i)),De(a,t,e.calendar)}function Wo(e){let n=Ao(),t=e.C(n);return It(n+BigInt(t))}function Ao(){return BigInt(Date.now())*Yn}function Vn(){return new Ne().resolvedOptions().timeZone}var qi=\"PlainYearMonth\",ji=\"PlainMonthDay\",$i=\"PlainDate\",Hi=\"PlainDateTime\",Gi=\"PlainTime\",zi=\"ZonedDateTime\",Vi=\"Instant\",_i=\"Duration\";function Ae(e,n,t,...o){Object.defineProperties(n,Ra(e)),Object.defineProperties(n.prototype,lt(\"Temporal.\"+e));for(let r of o)Ll(n.prototype,t,r);return n}function Ll(e,n,t){Object.defineProperties(e,Ve(o=>({get(){return o(n(this))},configurable:1}),t))}var Ue=Tr.name===\"noop\"?e=>{Object.defineProperty(e,\"_str_\",{value:e.toJSON()})}:Tr;function Le(){S(Ea)}function qe(){S(ka)}var uu={era(e){return Mt(e.calendar,e).era},eraYear(e){return Mt(e.calendar,e).eraYear},year(e){return P(e.calendar,e).year},month(e){return P(e.calendar,e).month},monthCode(e){return go(e.calendar,e)}},Uo={era(e){return Mt(e.calendar,e).era},eraYear(e){return Mt(e.calendar,e).eraYear},year(e){return P(e.calendar,e).year},month(e){return P(e.calendar,e).month},monthCode(e){return go(e.calendar,e)},day(e){return P(e.calendar,e).day}},du={monthCode(e){return go(e.calendar,e)},day(e){return P(e.calendar,e).day}},Ji={daysInMonth(e){return xr(e.calendar,e)},daysInYear(e){return Zr(e.calendar,e)},monthsInYear(e){return Er(e.calendar,e)},inLeapYear(e){return kr(e.calendar,e)}},At={dayOfWeek(e){return To(e)},dayOfYear(e){return cs(e.calendar,e)},weekOfYear(e){return us(e.calendar,e)},yearOfWeek(e){return ds(e.calendar,e)},daysInWeek(){return 7},daysInMonth(e){return xr(e.calendar,e)},daysInYear(e){return Zr(e.calendar,e)},monthsInYear(e){return Er(e.calendar,e)},inLeapYear(e){return kr(e.calendar,e)}};function cu(e){return lo(Object.keys(e))}cu(Ji),cu(At);function on(e){let n=$(e).toLowerCase();return n===Ir?se:n===Wa?Ua:void T(Za(e,\"temporal-polyfill/full\"))}function qt(e=Ir){return on(e)}var mu=new WeakMap,fu=Ae(zi,class{constructor(e,n,t=void 0){let o=ge(Do(e)),r=ne(ac(n)),i=qt(t);hu(this,De(o,r,i))}static from(e,n=void 0){return te(_n(e,n))}static compare(e,n){return ci(_n(e),_n(n))}get calendarId(){return ye(M(this).calendar)}get timeZoneId(){return M(this).timeZone.id}get epochMilliseconds(){return Pt(M(this))}get epochNanoseconds(){return Nt(M(this))}get offset(){return Ct(W(M(this)).offsetNanoseconds)}get offsetNanoseconds(){return W(M(this)).offsetNanoseconds}get hoursInDay(){return Ss(M(this))}with(e,n=void 0){return te(Fc(M(this),et(e),n))}withCalendar(e){return te({...M(this),calendar:jo(e)})}withTimeZone(e){return te({...M(this),timeZone:ne(fe(e))})}withPlainTime(e=void 0){return te(su(M(this),ea(e)))}add(e,n=void 0){let t=M(this);return te(Et(t,q(e),n))}subtract(e,n=void 0){let t=M(this);return te(Et(t,H(q(e)),n))}until(e,n=void 0){let t=M(this),o=_n(e),r=We(t.calendar,o.calendar);return Y(B(Kr(0,r,t,o,n)))}since(e,n=void 0){let t=M(this),o=_n(e),r=We(t.calendar,o.calendar);return Y(B(Kr(1,r,t,o,n)))}round(e){let n=M(this),[t,o,r]=St(e);return te(Ms(n,t,o,r))}startOfDay(){return te(Ps(M(this)))}equals(e){return $s(M(this),_n(e))}toInstant(){return je(Lc(M(this)))}toPlainDateTime(){return Oe(Yi(M(this)))}toPlainDate(){return ke(Bi(M(this)))}toPlainTime(){return tn(Wi(M(this)))}toLocaleString(e=void 0,n={}){let t=M(this),o=new Ne(e,Kc(nu(n),Es(t)));return zn(o,t),o.format(Pt(t))}toString(e=void 0){return vi(M(this),e)}toJSON(){return vi(M(this))}getTimeZoneTransition(e){let n=M(this),t=Os(n,e);return t?te({...n,epochNanoseconds:t}):null}valueOf(){return qe()}},ql,Uo,At,Tt);function te(e){return hu(Object.create(fu.prototype),e)}function M(e){return Ee(e)||Le()}function ql(e){let n=M(e);return{...W(n),calendar:n.calendar}}function Ee(e){return mu.get(e)}function _n(e,n){if(ee(e)){let t=Ee(e);if(t)return Zn(n),t;let o=jt(e);return uc(fe,o,e,n)}return gc(e,on,n)}function hu(e,n){return mu.set(e,n),Ue(e),e}function fe(e){if(ee(e)){let n=Ee(e);return n||S(pr(e)),n.timeZone.id}return(n=>Bo(Pc($(n))))(e)}var pu=new WeakMap,yu=Ae(Vi,class{constructor(e){let n=ge(Do(e));gu(this,ue(n))}static from(e){return je(Jn(e))}static fromEpochMilliseconds(e){return je(_c(e))}static fromEpochNanoseconds(e){return je(Jc(e))}static compare(e,n){return si(Jn(e),Jn(n))}get epochMilliseconds(){return Pt(le(this))}get epochNanoseconds(){return Nt(le(this))}add(e){let n=le(this);return je(ue(_r(n.epochNanoseconds,q(e))))}subtract(e){let n=le(this);return je(ue(_r(n.epochNanoseconds,H(q(e)))))}until(e,n=void 0){return Y(Jr(0,le(this),Jn(e),n))}since(e,n=void 0){return Y(Jr(1,le(this),Jn(e),n))}round(e){let n=le(this),[t,o,r]=St(e,5,1);return je(ue(No(n.epochNanoseconds,Ot(t,o),r)))}equals(e){return js(le(this),Jn(e))}toZonedDateTimeISO(e){return te(Uc(le(this),ne(fe(e))))}toLocaleString(e=void 0,n={}){let t=le(this);return new Ne(e,eu(n)).format(Pt(t))}toString(e=void 0){return bi(fe,le(this),e)}toJSON(){return bi(fe,le(this))}valueOf(){return qe()}});function je(e){return gu(Object.create(yu.prototype),e)}function le(e){return Qi(e)||Le()}function Qi(e){return pu.get(e)}function Jn(e){if(ee(e)){let n=Qi(e);if(n)return n;let t=Ee(e);if(t)return ue(t.epochNanoseconds)}return yc(e)}var{toTemporalInstant:Tu}={toTemporalInstant(){let e=Date.prototype.valueOf.call(this);return je(ue(BigInt(Yr(e))*Yn))}};function gu(e,n){return pu.set(e,n),Ue(e),e}var Du=new WeakMap,bu=Ae(ji,class{constructor(e,n,t=void 0,o){let r=U(e),i=U(n),a=qt(t),s=U(o??ts),c=X(Be({year:s,month:r,day:i}));vu(this,N(c,a))}static from(e,n=void 0){return Ki(lu(e,n))}get calendarId(){return ye(en(this).calendar)}with(e,n=void 0){return Ki(Bc(en(this),et(e),n))}equals(e){return Vs(en(this),lu(e))}toPlainDate(e){let n=en(this);return ke(Hc(n.calendar,this,e))}toLocaleString(e=void 0,n={}){let t=en(this),o=new Ne(e,Gn(au(n)));return zn(o,t,1),o.format(vt(t))}toString(e=void 0){return Si(en(this),e)}toJSON(){return Si(en(this))}valueOf(){return qe()}},en,du);function Ki(e){return vu(Object.create(bu.prototype),e)}function en(e){return Lo(e)||Le()}function Lo(e){return Du.get(e)}function lu(e,n){if(ee(e)){let o=Lo(e);if(o)return w(n),o;let r=Ru(e);return fc(r===void 0?se:r,r===void 0,e,n)}let t=Ic(e,on);return w(n),t}function vu(e,n){return Du.set(e,n),Ue(e),e}var Iu=new WeakMap,wu=Ae(qi,class{constructor(e,n,t=void 0,o){let r=U(e),i=U(n),a=qt(t),s=U(o??1),c=Io(Be({year:r,month:i,day:s}));Mu(this,N(c,a))}static from(e,n=void 0){return Lt(Kn(e,n))}static compare(e,n){return wn(Kn(e),Kn(n))}get calendarId(){return ye(me(this).calendar)}with(e,n=void 0){return Lt(Yc(me(this),et(e),n))}add(e,n=void 0){let t=me(this);return Lt(N(Vr(0,t.calendar,t,q(e),n),t.calendar))}subtract(e,n=void 0){let t=me(this);return Lt(N(Vr(1,t.calendar,t,q(e),n),t.calendar))}until(e,n=void 0){let t=me(this),o=Kn(e),r=We(t.calendar,o.calendar);return Y(ei(0,r,t,o,n))}since(e,n=void 0){let t=me(this),o=Kn(e),r=We(t.calendar,o.calendar);return Y(ei(1,r,t,o,n))}equals(e){return zs(me(this),Kn(e))}toPlainDate(e){let n=me(this);return ke($c(n.calendar,this,e))}toLocaleString(e=void 0,n={}){let t=me(this),o=new Ne(e,Gn(iu(n)));return zn(o,t,1),o.format(vt(t))}toString(e=void 0){return Mi(me(this),e)}toJSON(){return Mi(me(this))}valueOf(){return qe()}},me,uu,Ji);function Lt(e){return Mu(Object.create(wu.prototype),e)}function me(e){return qo(e)||Le()}function qo(e){return Iu.get(e)}function Kn(e,n){if(ee(e)){let o=qo(e);if(o)return w(n),o;let r=jt(e);return mc(r,e,n)}let t=vc(e,on);return w(n),t}function Mu(e,n){return Iu.set(e,n),Ue(e),e}function jl(e){if(!ee(e))return;let n=Qi(e);return n?[Vi,n]:(n=Ee(e),n?[zi,n]:(n=Sn(e),n?[Hi,n]:(n=nt(e),n?[$i,n]:(n=Xi(e),n?[Gi,n]:(n=qo(e),n?[qi,n]:(n=Lo(e),n?[ji,n]:(n=na(e),n?[_i,n]:void 0)))))))}function et(e){return(jl(e)||e.calendar!==void 0||e.timeZone!==void 0)&&S(Na),e}var Su=new WeakMap,Pu=Ae(Gi,class{constructor(e=0,n=0,t=0,o=0,r=0,i=0){let a=bt(Ve(U,{hour:e,minute:n,second:t,millisecond:o,microsecond:r,nanosecond:i}));Nu(this,vn(a))}static from(e,n=void 0){return tn(nn(e,n))}static compare(e,n){return Fo(nn(e),nn(n))}with(e,n=void 0){return tn(Wc(be(this),et(e),n))}add(e){let n=be(this);return tn(Oo(n,q(e))[0])}subtract(e){let n=be(this);return tn(Oo(n,H(q(e)))[0])}until(e,n=void 0){return Y(ni(0,be(this),nn(e),n))}since(e,n=void 0){return Y(ni(1,be(this),nn(e),n))}round(e){let n=be(this),[t,o,r]=St(e,5);return tn(Mo(n,Ln(t,o),r)[0])}equals(e){return _s(be(this),nn(e))}toLocaleString(e=void 0,n={}){let t=be(this);return new Ne(e,Gn(ru(n))).format(Pr(t))}toString(e=void 0){return Pi(be(this),e)}toJSON(){return Pi(be(this))}valueOf(){return qe()}},be,Tt);function tn(e){return Nu(Object.create(Pu.prototype),e)}function be(e){return Xi(e)||Le()}function Xi(e){return Su.get(e)}function nn(e,n){if(ee(e)){let o=Xi(e);if(o)return w(n),o;let r=Sn(e);if(r)return w(n),vn(r);let i=Ee(e);return i?(w(n),Wi(i)):hc(e,n)}let t=wc(e);return w(n),t}function ea(e){return e===void 0?void 0:nn(e)}function Nu(e,n){return Su.set(e,n),Ue(e),e}var Ou=new WeakMap,ku=Ae(Hi,class{constructor(e,n,t,o=0,r=0,i=0,a=0,s=0,c=0,u=void 0){let d=bn(wt(Ve(U,{year:e,month:n,day:t,hour:o,minute:r,second:i,millisecond:a,microsecond:s,nanosecond:c}))),l=qt(u);Eu(this,Pe(d,l))}static from(e,n=void 0){return Oe(Qn(e,n))}static compare(e,n){let t=Qn(e),o=Qn(n);return ui(t,o)}get calendarId(){return ye(L(this).calendar)}with(e,n=void 0){return Oe(Rc(L(this),et(e),n))}withCalendar(e){let n=L(this);return Oe(Pe(n,jo(e)))}withPlainTime(e=void 0){let n=L(this);return Oe(Rt(n,ea(e),n.calendar))}add(e,n=void 0){let t=L(this);return Oe(Pe(xt(t.calendar,t,q(e),n),t.calendar))}subtract(e,n=void 0){let t=L(this);return Oe(Pe(xt(t.calendar,t,H(q(e)),n),t.calendar))}until(e,n=void 0){let t=L(this),o=Qn(e),r=We(t.calendar,o.calendar);return Y(Qr(0,r,t,o,n))}since(e,n=void 0){let t=L(this),o=Qn(e),r=We(t.calendar,o.calendar);return Y(Qr(1,r,t,o,n))}round(e){let n=L(this),[t,o,r]=St(e);return Oe(Pe(wo(n,Ln(t,o),r),n.calendar))}equals(e){return Hs(L(this),Qn(e))}toZonedDateTime(e,n=void 0){return te(qc(L(this),ne(fe(e)),n))}toPlainDate(){let e=L(this);return ke(N(e,e.calendar))}toPlainTime(){return tn(vn(L(this)))}toLocaleString(e=void 0,n={}){let t=L(this),o=new Ne(e,Gn(tu(n)));return zn(o,t),o.format(es(t))}toString(e=void 0){return Ii(L(this),e)}toJSON(){return Ii(L(this))}valueOf(){return qe()}},L,Uo,At,Tt);function Oe(e){return Eu(Object.create(ku.prototype),e)}function L(e){return Sn(e)||Le()}function Sn(e){return Ou.get(e)}function Qn(e,n){if(ee(e)){let o=Sn(e);if(o)return w(n),o;let r=nt(e);if(r)return w(n),Pe(E(r,ce),r.calendar);let i=Ee(e);if(i)return w(n),Yi(i);let a=jt(e);return dc(a,e,n)}let t=Dc(e,on);return w(n),t}function Eu(e,n){return Ou.set(e,n),Ue(e),e}var xu=new WeakMap,Zu=Ae($i,class{constructor(e,n,t,o=void 0){let r=X(Be(Ve(U,{year:e,month:n,day:t}))),i=qt(o);Fu(this,N(r,i))}static from(e,n=void 0){return ke(Xn(e,n))}static compare(e,n){return wn(Xn(e),Xn(n))}get calendarId(){return ye(G(this).calendar)}with(e,n=void 0){let t=G(this);return ke(Cc(t,et(e),n))}withCalendar(e){let n=G(this);return ke(N(n,jo(e)))}add(e,n=void 0){let t=G(this);return ke(N(jn(t.calendar,t,q(e),n),t.calendar))}subtract(e,n=void 0){let t=G(this);return ke(N(jn(t.calendar,t,H(q(e)),n),t.calendar))}until(e,n=void 0){let t=G(this),o=Xn(e),r=We(t.calendar,o.calendar);return Y(Xr(0,r,t,o,n))}since(e,n=void 0){let t=G(this),o=Xn(e),r=We(t.calendar,o.calendar);return Y(Xr(1,r,t,o,n))}equals(e){return Gs(G(this),Xn(e))}toZonedDateTime(e){let n=ee(e)?{timeZone:e.timeZone,plainTime:e.plainTime}:{timeZone:e};return te(jc(fe,nn,G(this),n))}toPlainDateTime(e=void 0){let n=G(this);return Oe(Rt(n,ea(e),n.calendar))}toPlainYearMonth(){let e=G(this);return Lt(zc(e.calendar,this))}toPlainMonthDay(){let e=G(this);return Ki(Gc(e.calendar,this))}toLocaleString(e=void 0,n={}){let t=G(this),o=new Ne(e,Gn(ou(n)));return zn(o,t),o.format(vt(t))}toString(e=void 0){return wi(G(this),e)}toJSON(){return wi(G(this))}valueOf(){return qe()}},G,Uo,At);function ke(e){return Fu(Object.create(Zu.prototype),e)}function G(e){return nt(e)||Le()}function nt(e){return xu.get(e)}function Xn(e,n){if(ee(e)){let o=nt(e);if(o)return w(n),o;let r=Sn(e);if(r)return w(n),N(r,r.calendar);let i=Ee(e);if(i)return w(n),Bi(i);let a=jt(e);return lc(a,e,n)}let t=bc(e,on);return w(n),t}function Fu(e,n){return xu.set(e,n),Ue(e),e}function jt(e){let n=Ru(e);return n===void 0?se:n}function Ru(e){let{calendar:n}=e;if(n!==void 0)return jo(n)}function jo(e){if(ee(e)){let n=nt(e)||Sn(e)||Ee(e)||Lo(e)||qo(e);return n||S(xa(e)),n.calendar}return(n=>on(Sc($(n))))(e)}var Cu=new WeakMap,Yu=Ae(_i,class{constructor(e=0,n=0,t=0,o=0,r=0,i=0,a=0,s=0,c=0,u=0){let d=Qe(Ve(bo,{years:e,months:n,weeks:t,days:o,hours:r,minutes:i,seconds:a,milliseconds:s,microseconds:c,nanoseconds:u}));Bu(this,B(d))}static from(e){return Y(q(e))}static compare(e,n,t=void 0){return qs(Ut,q(e),q(n),t)}get sign(){return re(this).sign}get blank(){return!re(this).sign}with(e){return Y(Ac(re(this),e))}negated(){return Y(ai(re(this)))}abs(){return Y(Ws(re(this)))}add(e,n=void 0){return Y(ii(Ut,0,re(this),q(e),n))}subtract(e,n=void 0){return Y(ii(Ut,1,re(this),q(e),n))}round(e){return Y(Bs(Ut,re(this),e))}total(e){return Is(Ut,re(this),e)}toLocaleString(e=void 0,n){let t=re(this);return Intl.DurationFormat?new Intl.DurationFormat(e,n).format(t):Yo(t,n)}toString(e=void 0){return Yo(re(this),e)}toJSON(){return Yo(re(this))}valueOf(){return qe()}},re,Fr);function Y(e){return Bu(Object.create(Yu.prototype),e)}function re(e){return na(e)||Le()}function na(e){return Cu.get(e)}function q(e){return ee(e)?na(e)||pc(e):Mc(e)}function Ut(e){if(e!==void 0){if(ee(e)){let n=Ee(e);if(n)return n;let t=nt(e);if(t)return t;let o=Sn(e);if(o)return N(o,o.calendar);let r=jt(e);return cc(fe,r,e)}return Tc(e,on)}}function Bu(e,n){return Cu.set(e,n),Ue(e),e}var $l=Object.defineProperties({},{...lt(\"Temporal.Now\"),...uo({timeZoneId(){return Vn()},instant(){return je(ue(Ao()))},zonedDateTimeISO(e=Vn()){let n=ne(fe(e));return te(De(Ao(),n))},plainDateTimeISO(e=Vn()){let n=Wo(ne(fe(e)));return Oe(Pe(n))},plainDateISO(e=Vn()){let n=Wo(ne(fe(e)));return ke(N(n))},plainTimeISO(e=Vn()){let n=Wo(ne(fe(e)));return tn(vn(n))}})}),Wu=Object.defineProperties({},{...lt(\"Temporal\"),...uo({PlainYearMonth:wu,PlainMonthDay:bu,PlainDate:Zu,PlainTime:Pu,PlainDateTime:ku,ZonedDateTime:fu,Instant:yu,Duration:Yu,Now:$l})});var Au=Vo||Wu;var of=Vo?Date.prototype.toTemporalInstant:Tu;var Uu;function Lu(e){Uu=e}function he(){let e=Uu??globalThis.Temporal;if(!e)throw new ReferenceError('temporals: no Temporal implementation found. Use a runtime with native Temporal (Node 22+), import \"temporal-polyfill/global\", or call configureTemporal(Temporal).');return e}function z(e){let n=e?.constructor?.name;switch(n){case\"PlainDate\":return\"date\";case\"PlainDateTime\":return\"datetime\";case\"ZonedDateTime\":return\"zoneddatetime\";case\"PlainYearMonth\":return\"yearmonth\";case\"PlainTime\":return\"time\";case\"Instant\":return\"instant\";default:throw new TypeError(`temporals: expected a Temporal point (PlainDate, PlainDateTime, ZonedDateTime, PlainYearMonth, PlainTime, Instant), got ${n??typeof e}`)}}function ta(e){return e===\"date\"||e===\"datetime\"||e===\"zoneddatetime\"}function Hl(e){return e===\"date\"||e===\"datetime\"||e===\"zoneddatetime\"||e===\"yearmonth\"}function g(e,n){return e.constructor.compare(e,n)}function $t(e,n,t){let o=e;return t&&Hl(z(e))?o.add(n,{overflow:t}):o.add(n)}var Gl=[\"years\",\"months\",\"weeks\",\"days\",\"hours\",\"minutes\",\"seconds\",\"milliseconds\",\"microseconds\",\"nanoseconds\"];function qu(e,n){if(n===1)return e;let t=e,o={},r=!1;for(let i of Gl){let a=t[i];a&&(o[i]=a*n,r=!0)}return r?o:e}function ju(e,n,t){return e.until(n,t)}function Ht(e){return e.toString()}function $u(e,n,t){let o=e.toZonedDateTime(n,{disambiguation:\"compatible\"});if(!o.toPlainDateTime().equals(e))return(t.dstGap??\"fire\")===\"skip\"?null:o;let r=e.toZonedDateTime(n,{disambiguation:\"earlier\"}),i=e.toZonedDateTime(n,{disambiguation:\"later\"});return r.equals(i)?o:(t.dstOverlap??\"first\")===\"second\"?i:r}var zl=[\"MO\",\"TU\",\"WE\",\"TH\",\"FR\",\"SA\",\"SU\"];function rn(e){let n=zl.indexOf(e);if(n<0)throw new RangeError(`temporals: invalid weekday \"${e}\"`);return n+1}function Hu(e){let n=z(e);if(n===\"date\")return e;if(n===\"datetime\"||n===\"zoneddatetime\")return e.toPlainDate();throw new TypeError(\"temporals: recurrence requires a date-bearing point (PlainDate, PlainDateTime, or ZonedDateTime)\")}function Gu(e,n){let t=z(e);if(t===\"date\")return n;if(t===\"datetime\"){let o=e.toPlainTime();return n.toPlainDateTime(o)}if(t===\"zoneddatetime\"){let o=e;return n.toZonedDateTime({timeZone:o.timeZoneId,plainTime:o.toPlainTime()})}throw new TypeError(\"temporals: cannot rebuild a non-date-bearing point onto a date\")}function $o(e,n,t){return e.with({year:n,month:t,day:1},{overflow:\"constrain\"}).daysInMonth}function oa(e,n,t,o){let r=e.with({year:n,month:t,day:1},{overflow:\"constrain\"}).dayOfWeek;return 1+(o-r+7)%7}var tt=class e{#e;constructor(n){this.#e=()=>{let t=n(),o=t;return typeof o[Symbol.iterator]==\"function\"?o[Symbol.iterator]():t}}[Symbol.iterator](){return this.#e()}static from(n){return typeof n==\"function\"?new e(n):new e(()=>n[Symbol.iterator]())}static of(...n){return new e(()=>n[Symbol.iterator]())}static empty(){return new e(function*(){})}map(n){let t=this;return new e(function*(){let o=0;for(let r of t)yield n(r,o++)})}filter(n){let t=this;return new e(function*(){let o=0;for(let r of t)n(r,o++)&&(yield r)})}flatMap(n){let t=this;return new e(function*(){let o=0;for(let r of t)yield*n(r,o++)})}take(n){let t=this;return new e(function*(){if(n<=0)return;let o=0;for(let r of t)if(yield r,++o>=n)return})}drop(n){let t=this;return new e(function*(){let o=0;for(let r of t)o++<n||(yield r)})}takeWhile(n){let t=this;return new e(function*(){let o=0;for(let r of t){if(!n(r,o++))return;yield r}})}dropWhile(n){let t=this;return new e(function*(){let o=0,r=!0;for(let i of t)r&&n(i,o++)||(r=!1,yield i)})}tap(n){let t=this;return new e(function*(){let o=0;for(let r of t)n(r,o++),yield r})}concat(...n){let t=this;return new e(function*(){yield*t;for(let o of n)yield*o})}pairwise(){let n=this;return new e(function*(){let t,o=!1;for(let r of n)o&&(yield[t,r]),t=r,o=!0})}toArray(){return[...this]}forEach(n){let t=0;for(let o of this)n(o,t++)}reduce(n,t){let o=t,r=0;for(let i of this)o=n(o,i,r++);return o}find(n){let t=0;for(let o of this)if(n(o,t++))return o}some(n){let t=0;for(let o of this)if(n(o,t++))return!0;return!1}every(n){let t=0;for(let o of this)if(!n(o,t++))return!1;return!0}first(){for(let n of this)return n}at(n){if(n<0)return;let t=0;for(let o of this)if(t++===n)return o}count(){let n=0;for(let t of this)n++;return n}};function Ho(e){let{start:n,end:t,count:o,step:r,inclusive:i=!1,overflow:a}=e;if(o!==void 0&&(o<0||!Number.isInteger(o)))throw new RangeError(\"temporals: range() count must be a non-negative integer\");return new tt(function*(){if(o===0)return;let s=$t(n,r,a),c=g(s,n);if(c===0&&o===void 0)throw new RangeError(\"temporals: range() step is zero with no count bound (would be infinite)\");let u=l=>{if(t===void 0)return!0;let m=g(l,t);return c>0?i?m<=0:m<0:c<0?i?m>=0:m>0:!0},d=0;for(;;){let l=d===0?n:$t(n,qu(r,d),a);if(!u(l)||(yield l,d++,o!==void 0&&d>=o))return}})}var xe=class e{start;end;constructor(n,t){if(z(n)!==z(t))throw new TypeError(\"temporals: Interval start and end must be the same Temporal type\");this.start=n,this.end=t}get isEmpty(){return g(this.start,this.end)>=0}contains(n){return g(this.start,n)<=0&&g(n,this.end)<0}overlaps(n){return g(this.start,n.end)<0&&g(n.start,this.end)<0}encloses(n){return g(this.start,n.start)<=0&&g(n.end,this.end)<=0}abuts(n){return g(this.end,n.start)===0||g(n.end,this.start)===0}relation(n){let t=this.start,o=this.end,r=n.start,i=n.end;if(g(o,r)<0)return\"before\";if(g(o,r)===0)return\"meets\";if(g(i,t)<0)return\"after\";if(g(i,t)===0)return\"metBy\";let a=g(t,r),s=g(o,i);return a===0&&s===0?\"equals\":a===0?s<0?\"starts\":\"startedBy\":s===0?a>0?\"finishes\":\"finishedBy\":a<0&&s>0?\"contains\":a>0&&s<0?\"during\":a<0?\"overlaps\":\"overlappedBy\"}intersection(n){let t=g(this.start,n.start)>=0?this.start:n.start,o=g(this.end,n.end)<=0?this.end:n.end;return g(t,o)>=0?null:new e(t,o)}toDuration(n){return ju(this.start,this.end,n)}points(n){return Ho({start:this.start,end:this.end,step:n})}toString(){return`${this.start.toString()}/${this.end.toString()}`}toJSON(){return this.toString()}static from(n){let t=0,o=-1;for(let c=0;c<n.length;c++){let u=n[c];if(u===\"[\")t++;else if(u===\"]\")t--;else if(u===\"/\"&&t===0){o=c;break}}if(o<0)throw new RangeError(`temporals: invalid ISO interval \"${n}\" (expected \"start/end\")`);let r=n.slice(0,o),i=n.slice(o+1),a=he(),s=c=>c.includes(\"[\")?a.ZonedDateTime.from(c):c.includes(\"T\")?a.PlainDateTime.from(c):a.PlainDate.from(c);return new e(s(r),s(i))}};var Gt=class e{intervals;constructor(n){this.intervals=n}static from(n){let t=[...n].filter(r=>!r.isEmpty);t.sort((r,i)=>g(r.start,i.start)||g(r.end,i.end));let o=[];for(let r of t){let i=o[o.length-1];i&&g(r.start,i.end)<=0?g(r.end,i.end)>0&&(o[o.length-1]=new xe(i.start,r.end)):o.push(r)}return new e(o)}static empty(){return new e([])}get isEmpty(){return this.intervals.length===0}[Symbol.iterator](){return this.intervals[Symbol.iterator]()}contains(n){return this.intervals.some(t=>t.contains(n))}union(n){let t=n instanceof e?n.intervals:[...n];return e.from([...this.intervals,...t])}intersection(n){let t=[];for(let o of this.intervals)for(let r of n.intervals){if(g(r.start,o.end)>=0)break;let i=o.intersection(r);i&&t.push(i)}return e.from(t)}difference(n){let t=[];for(let o of this.intervals){let r=[o];for(let i of n.intervals){if(g(i.end,o.start)<=0||g(i.start,o.end)>=0)continue;let a=[];for(let s of r){if(!s.overlaps(i)){a.push(s);continue}g(s.start,i.start)<0&&a.push(new xe(s.start,i.start)),g(i.end,s.end)<0&&a.push(new xe(i.end,s.end))}r=a}t.push(...r)}return e.from(t)}gaps(n){if(n)return e.from([n]).difference(this);let t=[];for(let o=1;o<this.intervals.length;o++){let r=this.intervals[o-1],i=this.intervals[o];g(r.end,i.start)<0&&t.push(new xe(r.end,i.start))}return new e(t)}totalDuration(){let n=he();if(this.intervals.length===0)return n.Duration.from({seconds:0});let t=z(this.intervals[0].start),o=t===\"date\"||t===\"yearmonth\"?\"day\":\"hour\",r=n.Duration.from({seconds:0});for(let i of this.intervals)r=r.add(i.toDuration({largestUnit:o}));return r}toString(){return this.intervals.map(n=>n.toString()).join(\", \")}};function Go(){return he().PlainDate}function ra(e,n){if(!n)return e;let t=n===\"uk\"?\"uk\":\"us\";return e.dayOfWeek===6?t===\"uk\"?e.add({days:2}):e.subtract({days:1}):e.dayOfWeek===7?e.add({days:1}):e}function sn(e,n,t={}){return o=>{let r=Go().from({year:o,month:e,day:n},{overflow:\"reject\"});return ra(r,t.observed??!1)}}function Jt(e=0,n={}){return t=>{let o=t%19,r=Math.floor(t/100),i=t%100,a=Math.floor(r/4),s=r%4,c=Math.floor((r+8)/25),u=Math.floor((r-c+1)/3),d=(19*o+r-a-u+15)%30,l=Math.floor(i/4),m=i%4,f=(32+2*s+2*l-d-m)%7,p=Math.floor((o+11*d+22*f)/451),h=Math.floor((d+f-7*p+114)/31),y=(d+f-7*p+114)%31+1,b=Go().from({year:t,month:h,day:y}).add({days:e});return ra(b,n.observed??!1)}}function an(e,n,t,o={}){let r=rn(n);return i=>{let a=Go().from({year:i,month:e,day:1}),s=a.daysInMonth,c=1+(r-a.dayOfWeek+7)%7,u;if(t>0){if(u=c+(t-1)*7,u>s)return null}else if(u=c+Math.floor((s-c)/7)*7+(t+1)*7,u<1)return null;return ra(a.with({day:u}),o.observed??!1)}}var zt=class e{rules;cache=new Map;constructor(n){this.rules=n}static of(...n){return new e(n)}yearSet(n){let t=this.cache.get(n);return t||(t=new Set(this.rules.map(o=>o(n)).filter(o=>o!==null).map(o=>o.toString())),this.cache.set(n,t)),t}has(n){let t=n.toString();return this.yearSet(n.year).has(t)||this.yearSet(n.year-1).has(t)||this.yearSet(n.year+1).has(t)}inYear(n){return[...this.yearSet(n)].map(t=>Go().from(t)).sort((t,o)=>g(t,o))}};function Vu(){return zt.of(sn(1,1,{observed:!0}),an(1,\"MO\",3),an(2,\"MO\",3),an(5,\"MO\",-1),sn(6,19,{observed:!0}),sn(7,4,{observed:!0}),an(9,\"MO\",1),an(10,\"MO\",2),sn(11,11,{observed:!0}),an(11,\"TH\",4),sn(12,25,{observed:!0}))}var zu=4e3,Vt=class{weekend;holidays;constructor(n={}){let t=n.weekend??[\"SA\",\"SU\"];this.weekend=new Set(t.map(rn)),this.holidays=n.holidays}toDate(n){let t=n;return t.toPlainDate?t.toPlainDate():n}isBusinessDay(n){let t=this.toDate(n);return this.weekend.has(t.dayOfWeek)?!1:!this.holidays?.has(t)}nextBusinessDay(n){let t=n.add({days:1});for(let o=0;o<zu;o++,t=t.add({days:1}))if(this.isBusinessDay(t))return t;throw new RangeError(\"temporals: no business day found (check weekend/holiday config)\")}previousBusinessDay(n){let t=n.subtract({days:1});for(let o=0;o<zu;o++,t=t.subtract({days:1}))if(this.isBusinessDay(t))return t;throw new RangeError(\"temporals: no business day found (check weekend/holiday config)\")}addBusinessDays(n,t){let o=n,r=t>=0?1:-1;for(let i=Math.abs(t);i>0;i--)o=r>0?this.nextBusinessDay(o):this.previousBusinessDay(o);return o}businessDaysBetween(n,t){let o=0;for(let r=n;g(r,t)<0;r=r.add({days:1}))this.isBusinessDay(r)&&o++;return o}businessDays(n){return Ho({start:n.start,end:n.end,step:{days:1}}).filter(t=>this.isBusinessDay(t))}nthBusinessDay(n,t,o){let r=he().PlainDate.from({year:n,month:t,day:1}),i=[];for(let s=1;s<=r.daysInMonth;s++){let c=r.with({day:s});this.isBusinessDay(c)&&i.push(c)}let a=o>0?o-1:i.length+o;return i[a]??null}},_t=class{windows;calendar;dst;constructor(n={}){this.dst=n.dst??\"compatible\",this.windows=(n.windows??[[\"09:00\",\"17:00\"]]).slice().sort((t,o)=>t[0].localeCompare(o[0])),this.calendar=n.calendar}dayWindows(n,t){if(this.calendar&&!this.calendar.isBusinessDay(n))return[];let o=he();return this.windows.map(([r,i])=>{let a=o.PlainTime.from(r),s=o.PlainTime.from(i),c=o.PlainTime.compare(s,a)<=0,u=this.dst,d=n.toPlainDateTime(a).toZonedDateTime(t,{disambiguation:u}),l=(c?n.add({days:1}):n).toPlainDateTime(s).toZonedDateTime(t,{disambiguation:u});return new xe(d,l)})}intervalsBetween(n,t){let o=n.timeZoneId,r=t.toPlainDate(),i=[];for(let a=n.toPlainDate().subtract({days:1});g(a,r)<=0;a=a.add({days:1}))i.push(...this.dayWindows(a,o));return Gt.from(i).intersection(Gt.from([new xe(n,t)]))}isOpen(n){let t=n.timeZoneId,o=n.toPlainDate();return[...this.dayWindows(o.subtract({days:1}),t),...this.dayWindows(o,t)].some(i=>i.contains(n))}nextOpen(n){return this.intervalsBetween(n,n.add({days:366})).intervals[0]?.start}};function _u(e,n,t){return t.intervalsBetween(e,n).totalDuration()}var Vl=[[\"years\",\"year\",\"y\"],[\"months\",\"month\",\"mo\"],[\"weeks\",\"week\",\"w\"],[\"days\",\"day\",\"d\"],[\"hours\",\"hour\",\"h\"],[\"minutes\",\"minute\",\"m\"],[\"seconds\",\"second\",\"s\"],[\"milliseconds\",\"millisecond\",\"ms\"],[\"microseconds\",\"microsecond\",\"\\xB5s\"],[\"nanoseconds\",\"nanosecond\",\"ns\"]],_l={second:7,millisecond:8,microsecond:9,nanosecond:10};function ia(e,n={}){let{short:t=!1,max:o=1/0,locale:r,precision:i=\"second\"}=n,a=Vl.slice(0,_l[i]),s=e,c=Intl.DurationFormat;if(r&&c){let d={},l=0;for(let[m]of a){let f=s[m]??0;if(f!==0&&(d[m]=f,++l>=o))break}return new c(r,{style:t?\"narrow\":\"long\"}).format(d)}let u=[];for(let[d,l,m]of a){let f=s[d]??0;if(f!==0&&(u.push(t?`${f}${m}`:`${f} ${l}${Math.abs(f)===1?\"\":\"s\"}`),u.length>=o))break}return u.length===0?t?\"0s\":\"0 seconds\":u.join(t?\" \":\", \")}var Jl=[[\"years\",\"year\"],[\"months\",\"month\"],[\"weeks\",\"week\"],[\"days\",\"day\"],[\"hours\",\"hour\"],[\"minutes\",\"minute\"],[\"seconds\",\"second\"]];function Ju(e,n,t={}){let o=z(e),r=o===\"time\"||o===\"instant\"?\"hour\":\"year\",i=e.until(n,{largestUnit:r}),a=new Intl.RelativeTimeFormat(t.locale,{numeric:t.numeric??\"auto\"}),s=i;for(let[c,u]of Jl){let d=s[c]??0;if(d!==0&&c===\"days\"&&(o===\"zoneddatetime\"||o===\"datetime\")&&(d=Kl(e,n)),d!==0)return a.format(d,u)}return a.format(0,\"second\")}function Kl(e,n){return(z(e)===\"zoneddatetime\"?e.withTimeZone(n.timeZoneId):e).toPlainDate().until(n.toPlainDate(),{largestUnit:\"day\"}).days}var Ql={y:\"years\",mo:\"months\",w:\"weeks\",d:\"days\",h:\"hours\",m:\"minutes\",s:\"seconds\",ms:\"milliseconds\"};function aa(e){let n={},t=/(-?\\d+(?:\\.\\d+)?)\\s*(mo|ms|[ywdhms])/gi,o,r=!1;for(;(o=t.exec(e))!==null;){r=!0;let i=Ql[o[2].toLowerCase()];if(!i)throw new RangeError(`temporals: unknown duration unit \"${o[2]}\"`);n[i]=(n[i]??0)+Number(o[1])}if(!r)throw new RangeError(`temporals: could not parse duration \"${e}\"`);return he().Duration.from(n)}var Ku=1e4;function Xu(e){return typeof e==\"string\"?{wd:rn(e)}:{wd:rn(e.weekday),nth:e.nth}}function Xl(e,n){let t=[];for(let o=e;o<=n;o++)t.push(o);return t}function ca(e,n){let t=e>0?e:n+e+1;return t>=1&&t<=n?t:null}function em(e,n,t,o,r){let i=$o(e,n,t),a=oa(e,n,t,o);if(r>0){let u=a+(r-1)*7;return u<=i?u:null}let c=a+Math.floor((i-a)/7)*7+(r+1)*7;return c>=1?c:null}function nm(e,n,t,o){let r=$o(e,n,t),i=[];for(let a=oa(e,n,t,o);a<=r;a+=7)i.push(a);return i}function tm(e,n){return e.with({year:n,month:1,day:1},{overflow:\"constrain\"}).daysInYear}function om(e,n,t){let o=tm(e,n),r=t>0?t:o+t+1;return r<1||r>o?null:e.with({year:n,month:1,day:1},{overflow:\"constrain\"}).add({days:r-1})}function rm(e,n){return e.with({year:n,month:12,day:28},{overflow:\"constrain\"}).weekOfYear??52}function Qu(e,n,t,o,r,i){let a=$o(e,n,t),s=o&&o.length>0,c=r&&r.length>0,u;if(s){u=[];for(let m of o){let f=ca(m,a);f!==null&&u.push(f)}}let d;if(c){let m=new Set;for(let{wd:f,nth:p}of r)if(p!==void 0){let h=em(e,n,t,f,p);h!==null&&m.add(h)}else for(let h of nm(e,n,t,f))m.add(h);d=[...m]}let l;if(u&&d){let m=new Set(d);l=u.filter(f=>m.has(f))}else u?l=u:d?l=d:i!==void 0?l=i<=a?[i]:[]:l=[];return[...new Set(l)].sort((m,f)=>m-f)}function im(e,n,t,o){let{byMonth:r,byMonthDay:i}=e,a=s=>!r||r.includes(s);switch(e.freq){case\"daily\":{let s=o.date;if(!a(s.month))return[];if(i&&i.length>0&&!i.some(u=>ca(u,s.daysInMonth)===s.day))return[];if(e.byYearDay&&e.byYearDay.length>0){let c=s.daysInYear;if(!e.byYearDay.some(d=>(d>0?d:c+d+1)===s.dayOfYear))return[]}return t&&t.length>0&&!t.some(c=>c.wd===s.dayOfWeek)?[]:[s]}case\"weekly\":{let s=rn(e.weekStart??\"MO\"),c=t&&t.length>0?t.map(m=>m.wd):[n.dayOfWeek],u=new Set(c),d=[],l=o.weekStartDate;for(let m=0;m<7;m++)u.has(l.dayOfWeek)&&a(l.month)&&d.push(l),l=l.add({days:1});return d}case\"monthly\":{let s=o.anchor,c=s.month;return a(c)?Qu(s,s.year,c,i,t,n.day).map(d=>s.with({day:d})):[]}case\"yearly\":{let s=o.anchor,c=s.year,u=i&&i.length>0,d=t&&t.length>0,l=e.byYearDay&&e.byYearDay.length>0;if(e.byWeekNo&&e.byWeekNo.length>0){let y=new Set(e.byWeekNo.map(F=>F>0?F:rm(n,c)+F+1)),b=new Set(d?t.map(F=>F.wd):[n.dayOfWeek]),v=[],D=n.with({year:c,month:1,day:1},{overflow:\"constrain\"}).subtract({days:7}),I=n.with({year:c,month:12,day:31},{overflow:\"constrain\"}).add({days:7});for(;g(D,I)<=0;D=D.add({days:1}))D.yearOfWeek===c&&y.has(D.weekOfYear??-1)&&b.has(D.dayOfWeek)&&a(D.month)&&v.push(D);return v}if(l&&!u){let y=d?new Set(t.map(D=>D.wd)):null,b=[];for(let D of e.byYearDay){let I=om(n,c,D);I&&a(I.month)&&(y&&!y.has(I.dayOfWeek)||b.push(I))}let v=new Set;return b.filter(D=>{let I=Ht(D);return v.has(I)?!1:(v.add(I),!0)}).sort((D,I)=>g(D,I))}let f=s.monthsInYear,p=r??(u||d?Xl(1,f):[n.month]),h=[];for(let y of p){if(y<1||y>f)continue;let b=s.with({month:y,day:1},{overflow:\"constrain\"}),v=Qu(b,c,y,i,t,n.day);for(let D of v)h.push(b.with({day:D}))}return h}default:throw new RangeError(`temporals: recurrence freq \"${e.freq}\" is not supported (yearly/monthly/weekly/daily only)`)}}function am(e,n){let t=(e.dayOfWeek-n+7)%7;return e.subtract({days:t})}function sm(e,n){switch(e.freq){case\"daily\":return{date:n};case\"weekly\":return{weekStartDate:am(n,rn(e.weekStart??\"MO\"))};case\"monthly\":return{anchor:n.with({day:1})};case\"yearly\":return{anchor:n.with({month:1,day:1},{overflow:\"constrain\"})};default:throw new RangeError(`temporals: unsupported freq \"${e.freq}\"`)}}function cm(e,n){let t=e.interval??1;switch(e.freq){case\"daily\":return{date:n.date.add({days:t})};case\"weekly\":return{weekStartDate:n.weekStartDate.add({weeks:t})};case\"monthly\":return{anchor:n.anchor.add({months:t})};case\"yearly\":return{anchor:n.anchor.add({years:t})};default:throw new RangeError(`temporals: unsupported freq \"${e.freq}\"`)}}function um(e,n,t){let o=z(e);if(o===\"zoneddatetime\"){let l=e,m=l.timeZoneId,f=l.toPlainTime(),p=t.byHour&&t.byHour.length?t.byHour:[f.hour],h=t.byMinute&&t.byMinute.length?t.byMinute:[f.minute],y=t.bySecond&&t.bySecond.length?t.bySecond:[f.second],b={dstGap:t.dstGap,dstOverlap:t.dstOverlap},v=[];for(let D of p)for(let I of h)for(let F of y){let j=n.toPlainDateTime(f.with({hour:D,minute:I,second:F})),K=$u(j,m,b);K&&v.push(K)}return v}let r=Gu(e,n);if(!(t.byHour&&t.byHour.length||t.byMinute&&t.byMinute.length||t.bySecond&&t.bySecond.length)||o===\"date\")return[r];let a=r,s=t.byHour&&t.byHour.length?t.byHour:[a.hour],c=t.byMinute&&t.byMinute.length?t.byMinute:[a.minute],u=t.bySecond&&t.bySecond.length?t.bySecond:[a.second],d=[];for(let l of s)for(let m of c)for(let f of u)d.push(a.with({hour:l,minute:m,second:f}));return d}function dm(e,n){if(!n||n.length===0)return e;let t=[];for(let o of n){let r=o>0?o-1:e.length+o;r>=0&&r<e.length&&t.push(e[r])}return t}var sa=new Set([\"hourly\",\"minutely\",\"secondly\"]);function lm(e){return e===\"datetime\"||e===\"zoneddatetime\"||e===\"time\"}function mm(e){let n=z(e.start);if(sa.has(e.freq)){if(!lm(n))throw new TypeError(\"temporals: sub-daily recurrence requires a time-bearing start (PlainDateTime, ZonedDateTime, or PlainTime)\")}else if(!ta(n))throw new TypeError(\"temporals: recur() requires a date-bearing start (PlainDate, PlainDateTime, or ZonedDateTime)\");if(e.byWeekNo&&e.freq!==\"yearly\")throw new RangeError(\"temporals: BYWEEKNO is only valid with FREQ=YEARLY\");if(e.bySetPos&&sa.has(e.freq))throw new RangeError(\"temporals: BYSETPOS with sub-daily frequencies is not supported\");if(e.interval!==void 0&&(!Number.isInteger(e.interval)||e.interval<1))throw new RangeError(\"temporals: recur() interval must be a positive integer\")}var fm=1e6;function hm(e,n,t){let o=z(e),r=e;if(ta(o)){if(n.byMonth&&!n.byMonth.includes(r.month)||n.byMonthDay&&!n.byMonthDay.some(i=>ca(i,r.daysInMonth)===r.day))return!1;if(n.byYearDay){let i=r.daysInYear;if(!n.byYearDay.some(a=>(a>0?a:i+a+1)===r.dayOfYear))return!1}if(t&&t.length>0&&!t.some(i=>i.wd===r.dayOfWeek))return!1}return!(n.byHour&&!n.byHour.includes(r.hour)||n.byMinute&&!n.byMinute.includes(r.minute)||n.bySecond&&!n.bySecond.includes(r.second))}function*pm(e){let n=e.start,t=e.interval??1,o=e.freq===\"hourly\"?{hours:t}:e.freq===\"minutely\"?{minutes:t}:{seconds:t},r=e.byWeekday?.map(Xu),i=n,a=0;for(;;){if(e.until!==void 0&&g(i,e.until)>0)return;if(hm(i,e,r))yield i,a=0;else if(++a>fm)throw new RangeError(\"temporals: sub-daily recurrence matched nothing for a very long span (likely an impossible rule)\");i=$t(i,o)}}function*ym(e){let n=e.start,t=Hu(n),o=e.byWeekday?.map(Xu),r=sm(e,t),i=0;for(;;){let a=im(e,t,o,r),s=[];for(let d of a)s.push(...um(n,d,e));s.sort((d,l)=>g(d,l));let c=new Set;s=s.filter(d=>{let l=Ht(d);return c.has(l)?!1:(c.add(l),!0)}),s=dm(s,e.bySetPos).sort((d,l)=>g(d,l));let u=!1;for(let d of s)g(d,n)<0||(yield d,u=!0);if(u)i=0;else if(++i>Ku)throw new RangeError(`temporals: recurrence produced no occurrences for ${Ku} consecutive periods (likely an impossible rule)`);r=cm(e,r)}}function*Tm(e,n){let t=n.start,o=new Set((n.exclude??[]).map(l=>Ht(l))),r=(n.include??[]).filter(l=>g(l,t)>=0).sort((l,m)=>g(l,m)),{until:i,count:a}=n,s=0,c=0,u,d=e.next();for(;;){let l=!d.done,m=s<r.length;if(!l&&!m)return;let f,p;if(l&&(!m||g(d.value,r[s])<=0)?(f=d.value,p=!0):(f=r[s],p=!1),i!==void 0&&g(f,i)>0)return;p?d=e.next():s++;let h=Ht(f);if(!(o.has(h)||h===u)&&(u=h,yield f,a!==void 0&&++c>=a))return}}function ed(e){mm(e);let n=sa.has(e.freq)?()=>pm(e):()=>ym(e);return new tt(()=>Tm(n(),e))}var gm={YEARLY:\"yearly\",MONTHLY:\"monthly\",WEEKLY:\"weekly\",DAILY:\"daily\",HOURLY:\"hourly\",MINUTELY:\"minutely\",SECONDLY:\"secondly\"};function Dm(e){let n=/^([+-]?\\d+)?(MO|TU|WE|TH|FR|SA|SU)$/.exec(e.trim());if(!n)throw new RangeError(`temporals: invalid BYDAY token \"${e}\"`);let t=n[2];return n[1]?{weekday:t,nth:Number(n[1])}:t}function cn(e){return e.split(\",\").map(n=>Number(n.trim()))}function bm(e,n){let t=e.replace(/^RRULE:/i,\"\"),o={start:n,freq:\"daily\"},r=!1;for(let i of t.split(\";\")){if(!i)continue;let a=i.indexOf(\"=\"),s=(a===-1?i:i.slice(0,a)).trim().toUpperCase(),c=a===-1?\"\":i.slice(a+1).trim();switch(s){case\"FREQ\":{let u=gm[c.toUpperCase()];if(!u)throw new RangeError(`temporals: unsupported FREQ \"${c}\"`);o.freq=u,r=!0;break}case\"INTERVAL\":o.interval=Number(c);break;case\"COUNT\":o.count=Number(c);break;case\"UNTIL\":{if(n==null)throw new RangeError(\"temporals: RRULE has UNTIL but no DTSTART was provided\");if(z(n)===\"zoneddatetime\"){let u=n,d=u.toInstant().constructor;o.until=d.from(c).toZonedDateTimeISO(u.timeZoneId)}else{let u=n.constructor;o.until=u.from(c)}break}case\"BYMONTH\":o.byMonth=cn(c);break;case\"BYWEEKNO\":o.byWeekNo=cn(c);break;case\"BYYEARDAY\":o.byYearDay=cn(c);break;case\"BYMONTHDAY\":o.byMonthDay=cn(c);break;case\"BYDAY\":o.byWeekday=c.split(\",\").map(Dm);break;case\"BYHOUR\":o.byHour=cn(c);break;case\"BYMINUTE\":o.byMinute=cn(c);break;case\"BYSECOND\":o.bySecond=cn(c);break;case\"BYSETPOS\":o.bySetPos=cn(c);break;case\"WKST\":o.weekStart=c.toUpperCase();break;default:throw new RangeError(`temporals: unsupported RRULE part \"${s}\"`)}}if(!r)throw new RangeError(\"temporals: RRULE is missing FREQ\");return o}function ua(e,n){return ed(bm(e,n))}ed.fromString=ua;var od=globalThis.Temporal;Lu(od??Au);var Kt=()=>he(),vm=od?\"native\":\"temporal-polyfill\",nd=[\"MO\",\"TU\",\"WE\",\"TH\",\"FR\",\"SA\",\"SU\"];function da(e){if(typeof e==\"number\"&&Number.isInteger(e)&&e>=1&&e<=7)return nd[e-1];let n=String(e??\"\").trim().slice(0,2).toUpperCase(),t=nd.find(o=>o===n);if(!t)throw new RangeError(`not a weekday: ${JSON.stringify(e)} (use MO-SU, or 1-7 with 1 for Monday)`);return t}var td={easter:()=>[Jt(0)],\"good-friday\":()=>[Jt(-2)],\"easter-monday\":()=>[Jt(1)]};function rd(e){if(typeof e==\"string\"){let n=e.trim().toLowerCase();if(n===\"us-federal\")return Im();if(td[n])return td[n]();let t=/^(\\d{4})-(\\d{2})-(\\d{2})$/.exec(n);if(t){let o=Kt().PlainDate.from(n);return[r=>r===o.year?o:null]}if(t=/^(\\d{1,2})-(\\d{1,2})$/.exec(n),t)return[sn(Number(t[1]),Number(t[2]))];throw new RangeError(`not a holiday: ${JSON.stringify(e)} (use us-federal, easter, good-friday, easter-monday, a date like 2026-12-24, a month and day like 12-25, or an object)`)}if(e&&typeof e==\"object\"){if(\"easter\"in e)return[Jt(Number(e.easter)||0)];if(\"weekday\"in e)return[an(Number(e.month),da(e.weekday),Number(e.nth))];if(\"day\"in e)return[sn(Number(e.month),Number(e.day),{observed:e.observed??!1})]}throw new RangeError(`not a holiday: ${JSON.stringify(e)}`)}function Im(){let e=Vu();return Array.from({length:11},(n,t)=>o=>e.inYear(o)[t]??null)}function id(e={}){let n=(e.weekend??[\"SA\",\"SU\"]).map(da),t=(e.holidays??[]).flatMap(rd);return new Vt({weekend:n,holidays:t.length?zt.of(...t):void 0})}function wm(e={}){let n=(Array.isArray(e.windows)&&e.windows.length?e.windows:[[\"09:00\",\"17:00\"]]).map(t=>{if(!Array.isArray(t)||t.length!==2)throw new RangeError(`a window is [open, close], like [\"09:00\", \"17:00\"]: ${JSON.stringify(t)}`);return[String(t[0]),String(t[1])]});return new _t({windows:n,calendar:id(e)})}function ad(e,n){let t=Kt(),o=String(n||\"UTC\");if(typeof e==\"number\")return t.Instant.fromEpochMilliseconds(e).toZonedDateTimeISO(o);let r=String(e??\"\").trim();if(!r)throw new RangeError(\"no time given\");return r.includes(\"[\")?t.ZonedDateTime.from(r).withTimeZone(o):/(?:Z|[+-]\\d{2}(?::?\\d{2})?)$/i.test(r)&&r.includes(\"T\")?t.Instant.from(r).toZonedDateTimeISO(o):t.PlainDateTime.from(r).toZonedDateTime(o)}function Mm(e,n=\"UTC\"){let t=String(e??\"\").trim();return/^\\d{4}-\\d{2}-\\d{2}$/.test(t)?Kt().PlainDate.from(t):ad(e,n).toPlainDate()}function la(e){let n=Kt();if(typeof e==\"number\"){if(!Number.isFinite(e))throw new RangeError(`not a duration: ${e}`);return n.Duration.from({milliseconds:Math.trunc(e)}).round({largestUnit:\"day\",smallestUnit:\"millisecond\"})}let t=String(e??\"\").trim();return/^-?\\d+(?:\\.\\d+)?$/.test(t)?la(Number(t)):/^-?P/i.test(t)?n.Duration.from(t.toUpperCase()):aa(t)}function Sm(e){if(e.years||e.months||e.weeks)throw new RangeError(`years, months and weeks have no fixed length: ${e.toString()}`);return e.total({unit:\"millisecond\"})}function Pm(e,n={}){let t=la(e);return!t.years&&!t.months&&!t.weeks&&(t=t.round({largestUnit:n.largestUnit||\"day\",smallestUnit:\"millisecond\"})),ia(t,n)}var Nm=e=>e.toString({smallestUnit:\"second\"});var Om=()=>Kt();return md(km);})();\nreturn temporals;\n}\n"
1332
+ }
1333
+ ]
1334
+ },
1335
+ "tests": [
1336
+ {
1337
+ "name": "Monday and Wednesday at nine in Paris keep the wall clock across the change to winter time",
1338
+ "inputs": {
1339
+ "rule": "FREQ=WEEKLY;BYDAY=MO,WE",
1340
+ "start": "2026-10-19T09:00",
1341
+ "zone": "Europe/Paris",
1342
+ "count": 4
1343
+ },
1344
+ "expect": {
1345
+ "result.times": [
1346
+ "2026-10-19T09:00:00+02:00[Europe/Paris]",
1347
+ "2026-10-21T09:00:00+02:00[Europe/Paris]",
1348
+ "2026-10-26T09:00:00+01:00[Europe/Paris]",
1349
+ "2026-10-28T09:00:00+01:00[Europe/Paris]"
1350
+ ],
1351
+ "result.utc": [
1352
+ "2026-10-19T07:00:00Z",
1353
+ "2026-10-21T07:00:00Z",
1354
+ "2026-10-26T08:00:00Z",
1355
+ "2026-10-28T08:00:00Z"
1356
+ ]
1357
+ }
1358
+ },
1359
+ {
1360
+ "name": "the second Tuesday of each month",
1361
+ "inputs": {
1362
+ "rule": "RRULE:FREQ=MONTHLY;BYDAY=2TU",
1363
+ "start": "2026-01-13T10:00:00Z",
1364
+ "zone": "UTC",
1365
+ "count": 3
1366
+ },
1367
+ "expect": {
1368
+ "result.times": [
1369
+ "2026-01-13T10:00:00+00:00[UTC]",
1370
+ "2026-02-10T10:00:00+00:00[UTC]",
1371
+ "2026-03-10T10:00:00+00:00[UTC]"
1372
+ ]
1373
+ }
1374
+ },
1375
+ {
1376
+ "name": "only the times after a moment, and COUNT ends the rule",
1377
+ "inputs": {
1378
+ "rule": "FREQ=DAILY;COUNT=5",
1379
+ "start": "2026-10-19T12:00:00Z",
1380
+ "zone": "UTC",
1381
+ "count": 10,
1382
+ "after": "2026-10-21T00:00:00Z"
1383
+ },
1384
+ "expect": {
1385
+ "result.next": "2026-10-21T12:00:00+00:00[UTC]",
1386
+ "result.summary": "3 times from 2026-10-21T12:00:00+00:00[UTC]"
1387
+ }
1388
+ }
1389
+ ],
1390
+ "hosts": []
1391
+ }
1392
+ ]
1393
+ }