temporal-fmt 0.9.1 → 0.9.2

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.
Files changed (78) hide show
  1. package/dist/chunk-2JHEV7ZF.js +7 -0
  2. package/dist/chunk-2JHEV7ZF.js.map +1 -0
  3. package/dist/{chunk-DXLBLPLQ.js → chunk-4JWGUR4O.js} +2 -2
  4. package/dist/{chunk-H52AMABK.js → chunk-5U5WJ465.js} +6 -6
  5. package/dist/chunk-5U5WJ465.js.map +1 -0
  6. package/dist/chunk-C5YESWFT.js +2 -0
  7. package/dist/chunk-C5YESWFT.js.map +1 -0
  8. package/dist/chunk-F4RGUDA3.js +2 -0
  9. package/dist/chunk-F4RGUDA3.js.map +1 -0
  10. package/dist/chunk-NBXF7V5B.js +2 -0
  11. package/dist/chunk-NBXF7V5B.js.map +1 -0
  12. package/dist/{chunk-M5WL5VGW.js → chunk-R52YOKI3.js} +2 -2
  13. package/dist/chunk-UJR6DHXY.js +2 -0
  14. package/dist/chunk-UJR6DHXY.js.map +1 -0
  15. package/dist/{chunk-6UNSCZPL.js → chunk-XH46JNPK.js} +2 -2
  16. package/dist/chunk-XH46JNPK.js.map +1 -0
  17. package/dist/chunk-YB6YAG7E.js +35 -0
  18. package/dist/chunk-YB6YAG7E.js.map +1 -0
  19. package/dist/chunk-ZGMTY52O.js +2 -0
  20. package/dist/chunk-ZGMTY52O.js.map +1 -0
  21. package/dist/duration.cjs +4 -10
  22. package/dist/duration.cjs.map +1 -1
  23. package/dist/duration.js +1 -1
  24. package/dist/format.cjs +6 -6
  25. package/dist/format.cjs.map +1 -1
  26. package/dist/format.js +1 -1
  27. package/dist/formatDuration.d.cts +6 -0
  28. package/dist/formatDuration.d.ts +6 -0
  29. package/dist/index.cjs +37 -43
  30. package/dist/index.cjs.map +1 -1
  31. package/dist/index.js +15 -15
  32. package/dist/index.js.map +1 -1
  33. package/dist/interval.cjs +6 -6
  34. package/dist/interval.cjs.map +1 -1
  35. package/dist/interval.js +1 -1
  36. package/dist/localeRegistry.cjs +4 -4
  37. package/dist/localeRegistry.cjs.map +1 -1
  38. package/dist/localeRegistry.js +1 -1
  39. package/dist/localeVocab.d.cts +3 -0
  40. package/dist/localeVocab.d.ts +3 -0
  41. package/dist/parse.cjs +9 -9
  42. package/dist/parse.cjs.map +1 -1
  43. package/dist/parse.js +1 -1
  44. package/dist/parsePattern.d.cts +1 -0
  45. package/dist/parsePattern.d.ts +1 -0
  46. package/dist/pattern.d.cts +1 -0
  47. package/dist/pattern.d.ts +1 -0
  48. package/dist/recurrence.cjs +4 -4
  49. package/dist/recurrence.cjs.map +1 -1
  50. package/dist/recurrence.js +1 -1
  51. package/dist/relativeTime.cjs +24 -1
  52. package/dist/relativeTime.cjs.map +1 -1
  53. package/dist/relativeTime.js +1 -1
  54. package/dist/rounding.d.cts +1 -0
  55. package/dist/rounding.d.ts +1 -0
  56. package/dist/serialization.d.cts +1 -1
  57. package/dist/serialization.d.ts +1 -1
  58. package/dist/typeGuards.d.cts +9 -9
  59. package/dist/typeGuards.d.ts +9 -9
  60. package/package.json +1 -1
  61. package/dist/chunk-6JAWE65A.js +0 -2
  62. package/dist/chunk-6JAWE65A.js.map +0 -1
  63. package/dist/chunk-6UNSCZPL.js.map +0 -1
  64. package/dist/chunk-CUTVOO4Y.js +0 -35
  65. package/dist/chunk-CUTVOO4Y.js.map +0 -1
  66. package/dist/chunk-H52AMABK.js.map +0 -1
  67. package/dist/chunk-ILXRFTAE.js +0 -13
  68. package/dist/chunk-ILXRFTAE.js.map +0 -1
  69. package/dist/chunk-LYWOLBMV.js +0 -2
  70. package/dist/chunk-LYWOLBMV.js.map +0 -1
  71. package/dist/chunk-QASXSTBN.js +0 -2
  72. package/dist/chunk-QASXSTBN.js.map +0 -1
  73. package/dist/chunk-YAVXHM4W.js +0 -2
  74. package/dist/chunk-YAVXHM4W.js.map +0 -1
  75. package/dist/chunk-ZYVMZRMR.js +0 -2
  76. package/dist/chunk-ZYVMZRMR.js.map +0 -1
  77. /package/dist/{chunk-DXLBLPLQ.js.map → chunk-4JWGUR4O.js.map} +0 -0
  78. /package/dist/{chunk-M5WL5VGW.js.map → chunk-R52YOKI3.js.map} +0 -0
package/dist/index.js CHANGED
@@ -1,11 +1,11 @@
1
- import{a as Kt,b as Qt}from"./chunk-ZYVMZRMR.js";import{a as Sr,b as vr,c as kr,d as Mr,e as Dr,f as Er,g as xr,h as Cr,i as Rr}from"./chunk-J2AQNXF2.js";import{a as kn,b as Mn,c as Dn,d as En,e as Ce,f as Ln,g as Hn,h as Un,i as jn,j as Gn,k as Zn,l as Wn,m as Yn,n as Bn,o as Xn}from"./chunk-ILXRFTAE.js";import{a as nr,b as tr,c as rr,d as or,e as ar,f as ir,g as sr,h as lr,i as mr,j as ur,k as dr,l as fr,m as cr,n as pr}from"./chunk-YAVXHM4W.js";import{a as N,b as et,c as nt,e as pe}from"./chunk-DXLBLPLQ.js";import{a as Jt,b as Vt,c as er}from"./chunk-6UNSCZPL.js";import{a as tt,b as Re,c as X,d as rt,e as ot,f as at,g as it}from"./chunk-CUTVOO4Y.js";import{a as B,b as qn,c as Kn,d as Qn,e as Jn,f as Vn}from"./chunk-M5WL5VGW.js";import{a as I,b as Y}from"./chunk-6JAWE65A.js";import{b as xn,c as H}from"./chunk-3MZLTVP3.js";import{a as Cn,b as S,c as Rn,d as Fn,e as ce,f as $n,g as On,h as An,i as Pn,j as zn,k as In,l as Nn,n as _n}from"./chunk-H52AMABK.js";import{a as yr,b as gr,c as hr,d as Tr,e as wr,f as br}from"./chunk-LYWOLBMV.js";import{A as Ot,a as w,b as st,c as lt,d as mt,e as ut,f as dt,g as ft,h as ct,i as pt,j as yt,k as gt,l as ht,m as Tt,n as wt,o as bt,p as St,q as vt,r as kt,s as Mt,t as Dt,u as Et,v as xt,w as Ct,x as Rt,y as Ft,z as $t}from"./chunk-VQXUMFB2.js";import{a as q,b as At,c as Pt,d as zt,e as It,f as Nt,g as _t,h as Lt,i as Ht,j as Ut,k as jt,l as Gt,m as Zt,n as Wt,o as Yt,p as Bt,q as Xt,r as qt}from"./chunk-QASXSTBN.js";import{a as mn,b as un,c as dn,d as fn,e as cn,f as pn,g as yn,h as gn,i as hn,j as Tn,k as wn,l as bn,m as Sn,n as vn}from"./chunk-EHLRZULM.js";import{a as fe,b as xe}from"./chunk-C6ZZ62ET.js";function Fe(e,n){if(e===null||typeof e!="object")throw new Error(`temporal-fmt: formatDistance expects Temporal values, got ${n} = ${String(e)}.`);let t=e,r=typeof t.year=="number",o=typeof t.month=="number",a=typeof t.day=="number";if(r!==o||o!==a)throw new Error(`temporal-fmt: formatDistance got a ${n} with a partial date (some of year/month/day missing). Pass a full Temporal.PlainDate / PlainDateTime / ZonedDateTime.`);return{year:r?t.year:void 0,month:o?t.month:void 0,day:a?t.day:void 0,hour:typeof t.hour=="number"?t.hour:void 0,minute:typeof t.minute=="number"?t.minute:void 0,second:typeof t.second=="number"?t.second:void 0,millisecond:typeof t.millisecond=="number"?t.millisecond:void 0}}var ye=2e3,K=1e3,Q=60*K,J=60*Q,R=24*J;function Fr(e,n,t){let r=0;if(e>=ye)for(let o=ye;o<e;o++)r+=fe(o)?366:365;else for(let o=e;o<ye;o++)r-=fe(o)?366:365;return r+=xe(e,n,t)-1,r}function $e(e){if(e.year===void 0||e.month===void 0||e.day===void 0)throw new Error("temporal-fmt: formatDistance needs a Temporal value with year/month/day fields (PlainDate, PlainDateTime, or ZonedDateTime). A PlainTime or other shape has no anchor date to diff against.");let n=Fr(e.year,e.month,e.day),t=e.hour??0,r=e.minute??0,o=e.second??0,a=e.millisecond??0;return n*R+t*J+r*Q+o*K+a}var $r={seconds:60,minutes:60,hours:24,days:30,months:365};function Or(e){let n={...$r,...e};for(let d of Object.keys(n)){let i=n[d];if(typeof i!="number"||!Number.isFinite(i)||i<=0)throw new Error(`temporal-fmt: formatDistance cutoff "${d}" must be a positive finite number (got ${String(i)}).`)}let t=n.seconds*K,r=n.minutes*Q,o=n.hours*J,a=n.days*R,s=n.months*R;if(!(t<=r&&r<=o&&o<=a&&a<=s))throw new Error(`temporal-fmt: formatDistance cutoffs must be monotonically non-decreasing in equivalent ms (seconds \u2264 minutes \u2264 hours \u2264 days \u2264 months). Got: seconds=${n.seconds}s, minutes=${n.minutes}min, hours=${n.hours}h, days=${n.days}d, months=${n.months}d \u2014 pick a sequence where each boundary is at least as large as the one before it.`);return[{maxMs:t,unit:"second"},{maxMs:r,unit:"minute"},{maxMs:o,unit:"hour"},{maxMs:a,unit:"day"},{maxMs:s,unit:"month"}]}var U=new Map,Ar=100;function Pr(e,n){let t=`${zr(e)}|${n}`,r=U.get(t);if(r)return r;if(U.size>=Ar){let o=U.keys().next().value;o!==void 0&&U.delete(o)}return r=new Intl.RelativeTimeFormat(e,{numeric:n}),U.set(t,r),r}function zr(e){try{return new Intl.Locale(e.replace(/_/g,"-")).toString().toLowerCase()}catch{return e}}function Oe(e,n,t={}){let r=Fe(e,"date1"),o=Fe(n,"date2"),a=$e(r)-$e(o),s=Math.abs(a),d=Or(t.cutoffs),i="year";for(let{maxMs:f,unit:g}of d)if(s<f){i=g;break}let m=Nr(i),l=Math.round(a/m),y=t.numeric??"auto",h=t.locale??I;return Pr(h,y).format(l,i)}function Ir(e,n={}){let t=new Date,r={year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hour:t.getHours(),minute:t.getMinutes(),second:t.getSeconds(),millisecond:t.getMilliseconds()};return Oe(e,r,n)}function Nr(e){switch(e){case"second":return K;case"minute":return Q;case"hour":return J;case"day":return R;case"week":return 7*R;case"month":return 30*R;case"quarter":return 91*R;case"year":return 365*R;default:throw new Error(`temporal-fmt: formatDistance hit unhandled unit "${String(e)}".`)}}function k(e){return e.toLowerCase().replace(/ä/g,"ae").replace(/ö/g,"oe").replace(/ü/g,"ue").replace(/ß/g,"ss").normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function _r(e,n){/* c8 ignore start @preserve -- unreachable through the only call
1
+ import{a as nr,b as tr}from"./chunk-NBXF7V5B.js";import{a as Er,b as xr,c as Cr,d as Rr,e as Fr,f as $r,g as Ir,h as Ar,i as Or}from"./chunk-J2AQNXF2.js";import{a as _n,b as Ln,c as Hn,d as Un,e as $e,f as Gn,g as Zn,h as Wn,i as Yn,j as Bn,k as Xn,l as qn,m as Kn,n as Jn,o as Qn}from"./chunk-2JHEV7ZF.js";import{a as ir,b as sr,c as lr,d as mr,e as ur,f as dr,g as cr,h as fr,i as pr,j as yr,k as gr,l as hr,m as Tr,n as wr}from"./chunk-F4RGUDA3.js";import{a as L,b as at,c as it,e as he}from"./chunk-4JWGUR4O.js";import{a as rr,b as or,c as ar}from"./chunk-XH46JNPK.js";import{a as st,b as Ae,c as K,d as lt,e as mt,f as ut,g as dt}from"./chunk-YB6YAG7E.js";import{a as q,b as et,c as nt,d as tt,e as rt,f as ot}from"./chunk-R52YOKI3.js";import{a as _,b as X}from"./chunk-C5YESWFT.js";import{b as Vn,c as A}from"./chunk-3MZLTVP3.js";import{a as Fn,b as w,c as pe,d as $n,e as ye,f as In,g as An,h as On,i as Pn,j as zn,k as ge,l as Nn,o as jn,p as Ie}from"./chunk-5U5WJ465.js";import{a as vr,b as br,c as Sr,d as kr,e as Mr,f as Dr}from"./chunk-ZGMTY52O.js";import{A as Nt,a as v,b as ct,c as ft,d as pt,e as yt,f as gt,g as ht,h as Tt,i as wt,j as vt,k as bt,l as St,m as kt,n as Mt,o as Dt,p as Et,q as xt,r as Ct,s as Rt,t as Ft,u as $t,v as It,w as At,x as Ot,y as Pt,z as zt}from"./chunk-VQXUMFB2.js";import{a as J,b as _t,c as Lt,d as Ht,e as Ut,f as jt,g as Gt,h as Zt,i as Wt,j as Yt,k as Bt,l as Xt,m as qt,n as Kt,o as Jt,p as Qt,q as Vt,r as er}from"./chunk-UJR6DHXY.js";import{a as gn,b as hn,c as Tn,d as wn,e as vn,f as bn,g as Sn,h as kn,i as Mn,j as Dn,k as En,l as xn,m as Cn,n as Rn}from"./chunk-EHLRZULM.js";import{a as fe,b as Fe}from"./chunk-C6ZZ62ET.js";function Oe(e,n){if(e===null||typeof e!="object")throw new Error(`temporal-fmt: formatDistance expects Temporal values, got ${n} = ${String(e)}.`);let t=e,r=typeof t.year=="number",a=typeof t.month=="number",o=typeof t.day=="number";if(r!==a||a!==o)throw new Error(`temporal-fmt: formatDistance got a ${n} with a partial date (some of year/month/day missing). Pass a full Temporal.PlainDate / PlainDateTime / ZonedDateTime.`);return{year:r?t.year:void 0,month:a?t.month:void 0,day:o?t.day:void 0,hour:typeof t.hour=="number"?t.hour:void 0,minute:typeof t.minute=="number"?t.minute:void 0,second:typeof t.second=="number"?t.second:void 0,millisecond:typeof t.millisecond=="number"?t.millisecond:void 0}}var Te=2e3,Q=1e3,V=60*Q,ee=60*V,F=24*ee;function Pr(e,n,t){let r=0;if(e>=Te)for(let a=Te;a<e;a++)r+=fe(a)?366:365;else for(let a=e;a<Te;a++)r-=fe(a)?366:365;return r+=Fe(e,n,t)-1,r}function Pe(e){if(e.year===void 0||e.month===void 0||e.day===void 0)throw new Error("temporal-fmt: formatDistance needs a Temporal value with year/month/day fields (PlainDate, PlainDateTime, or ZonedDateTime). A PlainTime or other shape has no anchor date to diff against.");let n=Pr(e.year,e.month,e.day),t=e.hour??0,r=e.minute??0,a=e.second??0,o=e.millisecond??0;return n*F+t*ee+r*V+a*Q+o}var zr={seconds:60,minutes:60,hours:24,days:30,months:365};function Nr(e){let n={...zr,...e};for(let d of Object.keys(n)){let i=n[d];if(typeof i!="number"||!Number.isFinite(i)||i<=0)throw new Error(`temporal-fmt: formatDistance cutoff "${d}" must be a positive finite number (got ${String(i)}).`)}let t=n.seconds*Q,r=n.minutes*V,a=n.hours*ee,o=n.days*F,s=n.months*F;if(!(t<=r&&r<=a&&a<=o&&o<=s))throw new Error(`temporal-fmt: formatDistance cutoffs must be monotonically non-decreasing in equivalent ms (seconds \u2264 minutes \u2264 hours \u2264 days \u2264 months). Got: seconds=${n.seconds}s, minutes=${n.minutes}min, hours=${n.hours}h, days=${n.days}d, months=${n.months}d \u2014 pick a sequence where each boundary is at least as large as the one before it.`);return[{maxMs:t,unit:"second"},{maxMs:r,unit:"minute"},{maxMs:a,unit:"hour"},{maxMs:o,unit:"day"},{maxMs:s,unit:"month"}]}var G=new Map,_r=100;function Lr(e,n){let t=`${Hr(e)}|${n}`,r=G.get(t);if(r)return r;if(G.size>=_r){let a=G.keys().next().value;a!==void 0&&G.delete(a)}try{r=new Intl.RelativeTimeFormat(Ie(e),{numeric:n})}catch(a){throw new ge({actual:e,reason:a.message})}return G.set(t,r),r}function Hr(e){try{return new Intl.Locale(e.replace(/_/g,"-")).toString().toLowerCase()}catch{return e}}function ze(e,n,t={}){let r=Oe(e,"date1"),a=Oe(n,"date2"),o=Pe(r)-Pe(a),s=Math.abs(o),d=Nr(t.cutoffs),i="year";for(let{maxMs:c,unit:g}of d)if(s<c){i=g;break}let m=jr(i),l=Math.round(o/m),T=t.numeric??"auto",y=t.locale??_;return Lr(y,T).format(l,i)}function Ur(e,n={}){let t=new Date,r={year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hour:t.getHours(),minute:t.getMinutes(),second:t.getSeconds(),millisecond:t.getMilliseconds()};return ze(e,r,n)}function jr(e){switch(e){case"second":return Q;case"minute":return V;case"hour":return ee;case"day":return F;case"week":return 7*F;case"month":return 30*F;case"quarter":return 91*F;case"year":return 365*F;default:throw new Error(`temporal-fmt: formatDistance hit unhandled unit "${String(e)}".`)}}var Ne=100,H=[];function Gr(e){if(typeof e.language!="string"||e.language.length===0)throw new Error("temporal-fmt: registerRelativeGrammar requires a non-empty language string.");if(!Array.isArray(e.matchers)||e.matchers.length===0)throw new Error("temporal-fmt: registerRelativeGrammar requires at least one matcher.");let n=H.findIndex(t=>t.language===e.language);if(n>=0)H[n]=e;else{if(H.length>=Ne)throw new RangeError(`temporal-fmt: registerRelativeGrammar reached the ${Ne}-grammar limit.`);H.push(e)}}function _e(e,n,t){for(let r of H)if(r.language===e)for(let a of r.matchers){let o=a(n);if(o===null)continue;let s=A();if(o.resolve){let d=o.resolve(t);return s.PlainDate.from(d,{overflow:"reject"})}return s.PlainDate.from({year:o.year??t.year,month:o.month??t.month,day:o.day??t.day},{overflow:"reject"})}return null}function Zr(){return H.map(e=>e.language)}function k(e){return e.toLowerCase().replace(/ä/g,"ae").replace(/ö/g,"oe").replace(/ü/g,"ue").replace(/ß/g,"ss").normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function Wr(e,n){/* c8 ignore start @preserve -- unreachable through the only call
2
2
  * site (fuzzyCorrectEnglish): `a` is always a word that already
3
3
  * failed the `vocabulary.includes(word)` exact-match check, so
4
4
  * a === b never holds against any `b` drawn from that same
5
5
  * vocabulary; and neither `a` (split from a non-empty normalized
6
6
  * string) nor `b` (a vocabulary entry) is ever empty. Kept as
7
7
  * general-purpose guards in case levenshtein() gets a second caller
8
- * later. */if(e===n)return 0;if(e.length===0)return n.length;if(n.length===0)return e.length;/* c8 ignore stop @preserve */let t=new Array(n.length+1),r=new Array(n.length+1);for(let o=0;o<=n.length;o++)t[o]=o;for(let o=1;o<=e.length;o++){r[0]=o;for(let a=1;a<=n.length;a++){let s=e[o-1]===n[a-1]?0:1;r[a]=Math.min(t[a]+1,r[a-1]+1,t[a-1]+s)}[t,r]=[r,t]}return t[n.length]}var Ae=2,ee=4096,Pe=32;function Lr(){return[...we,...be,...Se,"today","tomorrow","yesterday","next","last","this","in","ago","day","days","week","weeks","month","months","year","years"].map(k)}var ge;function Hr(){return ge||(ge=Object.freeze(Lr())),ge}function Ur(e){let n=Hr(),t=e.split(" ");if(e.length>ee||t.length>Pe)throw new RangeError(`temporal-fmt: parseRelative fuzzy input is too large (maximum ${ee} characters and ${Pe} words).`);let r=!1,o=t.map(a=>{if(/^\d+(?:st|nd|rd|th)?$/.test(a)||n.includes(a))return a;let s,d=Ae+1;for(let i of n){let m=_r(a,i);m<d&&(d=m,s=i)}return s!==void 0&&d<=Ae?(r=!0,s):a});return r?o.join(" "):void 0}function A(e){if(typeof e.year!="number")throw new Error("temporal-fmt: parseRelative reference date is missing year.");return e.year}function P(e){if(typeof e.month!="number")throw new Error("temporal-fmt: parseRelative reference date is missing month.");return e.month}function z(e){if(typeof e.day!="number")throw new Error("temporal-fmt: parseRelative reference date is missing day.");return e.day}function ne(e){let n=e.dayOfWeek;if(typeof n!="number")throw new Error("temporal-fmt: parseRelative needs a reference date exposing dayOfWeek (a Temporal.PlainDate / PlainDateTime / ZonedDateTime).");return n}function v(e){return[...e.map(k)].sort((r,o)=>o.length-r.length).map(r=>r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|")}function te(e,n,t,r){return e.PlainDate.from({year:n,month:t,day:r},{overflow:"reject"})}function b(e,n,t){return e.PlainDate.from({year:A(n),month:P(n),day:z(n)}).add({days:t})}function O(e,n,t,r){let o=e.PlainDate.from({year:A(n),month:P(n),day:z(n)}),a={};return r==="day"&&(a.days=t),r==="week"&&(a.weeks=t),r==="month"&&(a.months=t),r==="year"&&(a.years=t),o.add(a)}function re(e,n,t){if(e==="next"){let r=t-n;return r<=0&&(r+=7),r}if(e==="last"){let r=t-n;return r>=0&&(r-=7),r}return t-n}function oe(e,n,t,r){let o=A(n),a=e.PlainDate.from({year:o,month:P(n),day:z(n)});if(!e.PlainDate.compare)throw new Error("temporal-fmt: parseRelative needs Temporal.PlainDate.compare to resolve month-day phrases; the active implementation does not expose it.");try{let s=e.PlainDate.from({year:o,month:t,day:r},{overflow:"reject"});return e.PlainDate.compare(s,a)>=0?s:e.PlainDate.from({year:o+1,month:t,day:r},{overflow:"reject"})}catch(s){try{return e.PlainDate.from({year:o+1,month:t,day:r},{overflow:"reject"})}catch{throw new Error(`temporal-fmt: parseRelative can't resolve month ${t} day ${r} \u2014 it isn't a valid date in either ${o} or ${o+1}. Original error: ${s.message}`)}}}function ae(e,n){let t=k(e),r=n.findIndex(o=>k(o)===t);/* c8 ignore start @preserve -- unreachable: every caller passes a
8
+ * later. */if(e===n)return 0;if(e.length===0)return n.length;if(n.length===0)return e.length;/* c8 ignore stop @preserve */let t=new Array(n.length+1),r=new Array(n.length+1);for(let a=0;a<=n.length;a++)t[a]=a;for(let a=1;a<=e.length;a++){r[0]=a;for(let o=1;o<=n.length;o++){let s=e[a-1]===n[o-1]?0:1;r[o]=Math.min(t[o]+1,r[o-1]+1,t[o-1]+s)}[t,r]=[r,t]}return t[n.length]}var Le=2,te=4096,He=32;function Yr(){return[...Se,...ke,...Me,"today","tomorrow","yesterday","next","last","this","in","ago","day","days","week","weeks","month","months","year","years"].map(k)}var we;function Br(){return we||(we=Object.freeze(Yr())),we}function Xr(e){let n=Br(),t=e.split(" ");if(e.length>te||t.length>He)throw new RangeError(`temporal-fmt: parseRelative fuzzy input is too large (maximum ${te} characters and ${He} words).`);let r=!1,a=t.map(o=>{if(/^\d+(?:st|nd|rd|th)?$/.test(o)||n.includes(o))return o;let s,d=Le+1;for(let i of n){let m=Wr(o,i);m<d&&(d=m,s=i)}return s!==void 0&&d<=Le?(r=!0,s):o});return r?a.join(" "):void 0}function P(e){if(typeof e.year!="number")throw new Error("temporal-fmt: parseRelative reference date is missing year.");return e.year}function z(e){if(typeof e.month!="number")throw new Error("temporal-fmt: parseRelative reference date is missing month.");return e.month}function N(e){if(typeof e.day!="number")throw new Error("temporal-fmt: parseRelative reference date is missing day.");return e.day}function re(e){let n=e.dayOfWeek;if(typeof n!="number")throw new Error("temporal-fmt: parseRelative needs a reference date exposing dayOfWeek (a Temporal.PlainDate / PlainDateTime / ZonedDateTime).");return n}function S(e){return[...e.map(k)].sort((r,a)=>a.length-r.length).map(r=>r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|")}function oe(e,n,t,r){return e.PlainDate.from({year:n,month:t,day:r},{overflow:"reject"})}function b(e,n,t){return e.PlainDate.from({year:P(n),month:z(n),day:N(n)}).add({days:t})}function O(e,n,t,r){let a=e.PlainDate.from({year:P(n),month:z(n),day:N(n)}),o={};return r==="day"&&(o.days=t),r==="week"&&(o.weeks=t),r==="month"&&(o.months=t),r==="year"&&(o.years=t),a.add(o)}function ae(e,n,t){if(e==="next"){let r=t-n;return r<=0&&(r+=7),r}if(e==="last"){let r=t-n;return r>=0&&(r-=7),r}return t-n}function ie(e,n,t,r){let a=P(n),o=e.PlainDate.from({year:a,month:z(n),day:N(n)});if(!e.PlainDate.compare)throw new Error("temporal-fmt: parseRelative needs Temporal.PlainDate.compare to resolve month-day phrases; the active implementation does not expose it.");try{let s=e.PlainDate.from({year:a,month:t,day:r},{overflow:"reject"});return e.PlainDate.compare(s,o)>=0?s:e.PlainDate.from({year:a+1,month:t,day:r},{overflow:"reject"})}catch(s){try{return e.PlainDate.from({year:a+1,month:t,day:r},{overflow:"reject"})}catch{throw new Error(`temporal-fmt: parseRelative can't resolve month ${t} day ${r} \u2014 it isn't a valid date in either ${a} or ${a+1}. Original error: ${s.message}`)}}}function se(e,n){let t=k(e),r=n.findIndex(a=>k(a)===t);/* c8 ignore start @preserve -- unreachable: every caller passes a
9
9
  * name captured by nameAlternation(names), which builds its regex
10
10
  * alternation from this same list under the same normalizeForMatch
11
11
  * transform. The regex can't match anything findIndex() wouldn't
@@ -14,17 +14,17 @@ import{a as Kt,b as Qt}from"./chunk-ZYVMZRMR.js";import{a as Sr,b as vr,c as kr,
14
14
  * the `if` itself, not just the throw inside it — c8 tracks the
15
15
  * branch outcome (was the true side ever taken) separately from the
16
16
  * statements inside, so excluding only the inner throw still leaves
17
- * the branch itself flagged as uncovered. */if(r<0)throw new Error(`temporal-fmt: parseRelative internal error \u2014 weekday "${e}" not in names list.`);/* c8 ignore stop @preserve */return r+1}function ie(e,n,t=[]){let r=k(e),o=n.findIndex(s=>k(s)===r);if(o>=0)return o+1;let a=t.findIndex(s=>k(s)===r);if(a>=0)return a+1;/* c8 ignore start @preserve -- unreachable: every caller passes a name
17
+ * the branch itself flagged as uncovered. */if(r<0)throw new Error(`temporal-fmt: parseRelative internal error \u2014 weekday "${e}" not in names list.`);/* c8 ignore stop @preserve */return r+1}function le(e,n,t=[]){let r=k(e),a=n.findIndex(s=>k(s)===r);if(a>=0)return a+1;let o=t.findIndex(s=>k(s)===r);if(o>=0)return o+1;/* c8 ignore start @preserve -- unreachable: every caller passes a name
18
18
  * captured by nameAlternation([...longNames, ...shortNames]), so the
19
19
  * regex alternation and these two findIndex() scans are built from
20
20
  * the same lists under the same normalizeForMatch transform. Kept as
21
- * a tripwire for the type checker in case that invariant ever breaks. */throw new Error(`temporal-fmt: parseRelative internal error \u2014 month "${e}" not in names list.`);/* c8 ignore stop @preserve */}var we=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],be=["January","February","March","April","May","June","July","August","September","October","November","December"],Se=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],j={supportedHint:'Supported: weekday refs ("next Tuesday"), day offsets ("today"/"tomorrow"/"yesterday"), unit offsets ("in 3 days", "2 weeks ago"), and month-day ("March 5th").',matchers:[{pattern:/^today$/i,resolve:(e,n)=>te(n.temporal,A(n.reference),P(n.reference),z(n.reference))},{pattern:/^tomorrow$/i,resolve:(e,n)=>b(n.temporal,n.reference,1)},{pattern:/^yesterday$/i,resolve:(e,n)=>b(n.temporal,n.reference,-1)},{pattern:new RegExp(`^(next|last|this)\\s+(${v(we)})$`,"i"),resolve:(e,n)=>{let t=e[1].toLowerCase(),r=ae(e[2],we),o=ne(n.reference);return b(n.temporal,n.reference,re(t,o,r))}},{pattern:/^(in\s+)?(\d+)\s+(day|week|month|year)s?(?:\s+ago)?$/i,resolve:(e,n)=>{let t=e[1],r=e[2],o=e[3].toLowerCase(),a=!!t,s=/\bago\b/i.test(e[0]);if(!a&&!s)throw new Error(`temporal-fmt: parseRelative can't tell whether "${e[0]}" is past or future \u2014 use "in ${r} ${o}s" or "${r} ${o}s ago".`);let d=a?1:-1;return O(n.temporal,n.reference,d*Number(r),o)}},{pattern:new RegExp(`^(${v([...be,...Se])})\\s+(\\d{1,2})(?:st|nd|rd|th)?(?:,?\\s*(\\d{4}))?$`,"i"),resolve:(e,n)=>{let t=ie(e[1],be,Se),r=Number(e[2]);return oe(n.temporal,n.reference,t,r)}}]},V=["lunes","martes","mi\xE9rcoles","jueves","viernes","s\xE1bado","domingo"],ze=["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],Ie=["ene","feb","mar","abr","may","jun","jul","ago","sept","oct","nov","dic"],jr={supportedHint:'Frases soportadas: referencias de d\xEDa de la semana ("el pr\xF3ximo lunes", "el lunes pasado", "este martes"), offsets de d\xEDa ("hoy"/"ma\xF1ana"/"ayer"), offsets de unidad ("en 3 d\xEDas", "hace 2 semanas"), y mes-d\xEDa ("5 de marzo").',matchers:[{pattern:/^hoy$/i,resolve:(e,n)=>te(n.temporal,A(n.reference),P(n.reference),z(n.reference))},{pattern:/^ma[ñn]ana$/i,resolve:(e,n)=>b(n.temporal,n.reference,1)},{pattern:/^ayer$/i,resolve:(e,n)=>b(n.temporal,n.reference,-1)},{pattern:new RegExp(`^(?:el\\s+)?(?:(pr[o\xF3]ximo|pasado)\\s+(${v(V)})|(${v(V)})\\s+(pr[o\xF3]ximo|pasado)|este\\s+(${v(V)}))$`,"i"),resolve:(e,n)=>{let t,r;e[1]&&e[2]?(t=e[1],r=e[2]):e[3]&&e[4]?(r=e[3],t=e[4]):(t="este",r=e[5]);let o=k(t)==="proximo"?"next":t.toLowerCase()==="este"?"this":"last",a=ae(r,V),s=ne(n.reference);return b(n.temporal,n.reference,re(o,s,a))}},{pattern:new RegExp("^(?:(en|dentro\\s+de)\\s+(\\d+)\\s+(d[i\xED]a|semana|mes|a[\xF1n]o)s?|(\\d+)\\s+(d[i\xED]a|semana|mes|a[\xF1n]o)s?\\s+(hace))$","i"),resolve:(e,n)=>{let t,r,o;e[1]&&e[2]&&e[3]?(t=e[2],r=e[3],o=1):(t=e[4],r=e[5],o=-1);let a=_(r);return O(n.temporal,n.reference,o*Number(t),a)}},{pattern:new RegExp("^hace\\s+(\\d+)\\s+(d[i\xED]a|semana|mes|a[\xF1n]o)s?$","i"),resolve:(e,n)=>{let t=Number(e[1]),r=_(e[2]);return O(n.temporal,n.reference,-t,r)}},{pattern:new RegExp("^(\\d+)\\s+(d[i\xED]a|semana|mes|a[\xF1n]o)s?$","i"),resolve:(e,n)=>{throw new Error(`temporal-fmt: parseRelative no puede decidir si "${e[0]}" es pasado o futuro \u2014 usa "en ${e[1]} ${e[2]}s" o "hace ${e[1]} ${e[2]}s".`)}},{pattern:new RegExp(`^(\\d{1,2})\\.?\\s+de\\s+(${v([...ze,...Ie])})(?:\\s+de\\s+(\\d{4}))?$`,"i"),resolve:(e,n)=>{let t=Number(e[1]),r=ie(e[2],ze,Ie);return oe(n.temporal,n.reference,r,t)}}]},he=["lundi","mardi","mercredi","jeudi","vendredi","samedi","dimanche"],Ne=["janvier","f\xE9vrier","mars","avril","mai","juin","juillet","ao\xFBt","septembre","octobre","novembre","d\xE9cembre"],_e=["janv.","f\xE9vr.","mars","avr.","mai","juin","juil.","ao\xFBt","sept.","oct.","nov.","d\xE9c."],Gr={supportedHint:`Phrases prises en charge : r\xE9f\xE9rences de jour de la semaine ("lundi prochain", "mardi dernier", "ce mercredi"), d\xE9calages de jour ("aujourd'hui"/"demain"/"hier"), d\xE9calages d'unit\xE9 ("dans 3 jours", "il y a 2 semaines"), et mois-jour ("5 mars").`,matchers:[{pattern:/^aujourd'hui$/i,resolve:(e,n)=>te(n.temporal,A(n.reference),P(n.reference),z(n.reference))},{pattern:/^demain$/i,resolve:(e,n)=>b(n.temporal,n.reference,1)},{pattern:/^hier$/i,resolve:(e,n)=>b(n.temporal,n.reference,-1)},{pattern:new RegExp(`^(?:(${v(he)})\\s+(prochain|dernier)|ce\\s+(${v(he)}))$`,"i"),resolve:(e,n)=>{let t,r;e[1]&&e[2]?(r=e[1],t=e[2].toLowerCase()==="prochain"?"next":"last"):(t="this",r=e[3]);let o=ae(r,he),a=ne(n.reference);return b(n.temporal,n.reference,re(t,a,o))}},{pattern:new RegExp("^il\\s+y\\s+a\\s+(\\d+)\\s+(jour|semaine|mois|an|ann[e\xE9e]e)s?$","i"),resolve:(e,n)=>{let t=Number(e[1]),r=_(e[2]);return O(n.temporal,n.reference,-t,r)}},{pattern:new RegExp("^dans\\s+(\\d+)\\s+(jour|semaine|mois|an|ann[e\xE9e]e)s?$","i"),resolve:(e,n)=>{let t=Number(e[1]),r=_(e[2]);return O(n.temporal,n.reference,t,r)}},{pattern:new RegExp("^(\\d+)\\s+(jour|semaine|mois|an|ann[e\xE9e]e)s?$","i"),resolve:(e,n)=>{throw new Error(`temporal-fmt: parseRelative ne peut pas d\xE9terminer si "${e[0]}" est pass\xE9 ou futur \u2014 utilisez "dans ${e[1]} ${e[2]}s" ou "il y a ${e[1]} ${e[2]}s".`)}},{pattern:new RegExp(`^(\\d{1,2})\\s+(${v([...Ne,..._e])})(?:\\s+(\\d{4}))?$`,"i"),resolve:(e,n)=>{let t=Number(e[1]),r=ie(e[2],Ne,_e);return oe(n.temporal,n.reference,r,t)}}]},Le=["Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag","Sonntag"],He=["Januar","Februar","M\xE4rz","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],Ue=["Jan","Feb","M\xE4r","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],Zr={supportedHint:'Unterst\xFCtzte Phrasen: Wochentag-Bez\xFCge ("n\xE4chsten Dienstag", "letzten Freitag", "diesen Montag"), Tages-Offsets ("heute"/"morgen"/"gestern"), Einheiten-Offsets ("in 3 Tagen", "vor 2 Wochen"), und Monat-Tag ("5. M\xE4rz").',matchers:[{pattern:/^heute$/i,resolve:(e,n)=>te(n.temporal,A(n.reference),P(n.reference),z(n.reference))},{pattern:/^morgen$/i,resolve:(e,n)=>b(n.temporal,n.reference,1)},{pattern:/^gestern$/i,resolve:(e,n)=>b(n.temporal,n.reference,-1)},{pattern:new RegExp(`^(n(?:ae|a|\xE4)chsten|letzten|diesen)\\s+(${v(Le)})$`,"i"),resolve:(e,n)=>{let t=k(e[1]),r=t==="nachsten"||t==="naechsten"?"next":t==="diesen"?"this":"last",o=ae(e[2],Le),a=ne(n.reference);return b(n.temporal,n.reference,re(r,a,o))}},{pattern:new RegExp("^vor\\s+(\\d+)\\s+(Tag(?:e|n|en)?|Woche(?:n)?|Monat(?:e|n|en)?|Jahr(?:e|n|en)?)$","i"),resolve:(e,n)=>{let t=Number(e[1]),r=_(e[2]);return O(n.temporal,n.reference,-t,r)}},{pattern:new RegExp("^in\\s+(\\d+)\\s+(Tag(?:e|n|en)?|Woche(?:n)?|Monat(?:e|n|en)?|Jahr(?:e|n|en)?)$","i"),resolve:(e,n)=>{let t=Number(e[1]),r=_(e[2]);return O(n.temporal,n.reference,t,r)}},{pattern:new RegExp("^(\\d+)\\s+(Tag(?:e|n|en)?|Woche(?:n)?|Monat(?:e|n|en)?|Jahr(?:e|n|en)?)$","i"),resolve:(e,n)=>{throw new Error(`temporal-fmt: parseRelative kann nicht erkennen, ob "${e[0]}" Vergangenheit oder Zukunft ist \u2014 verwende "in ${e[1]} ${e[2]}" oder "vor ${e[1]} ${e[2]}".`)}},{pattern:new RegExp(`^(\\d{1,2})\\.?\\s+(${v([...He,...Ue,"Maerz","Maer"])})(?:\\s+(\\d{4}))?$`,"i"),resolve:(e,n)=>{let t=Number(e[1]),r=ie(e[2],He,Ue);return oe(n.temporal,n.reference,r,t)}}]},Wr={en:j,es:jr,fr:Gr,de:Zr};function Yr(e){if(!e)return j;try{let t=new Intl.Locale(e.replace(/_/g,"-")).language.toLowerCase();return Wr[t]??j}catch{return j}}function _(e){let n=k(e);if(n==="day"||n==="week"||n==="month"||n==="year")return n;if(n==="dia")return"day";if(n==="semana")return"week";if(n==="mes")return"month";if(n==="ano"||n==="a\xF1o")return"year";if(n==="jour")return"day";if(n==="semaine")return"week";if(n==="mois")return"month";if(n==="an"||n==="annee")return"year";if(n==="tag"||n==="tagen")return"day";if(n==="woche"||n==="wochen")return"week";if(n==="monat"||n==="monaten")return"month";if(n==="jahr"||n==="jahren")return"year";/* c8 ignore start @preserve -- unreachable: every caller passes a word
21
+ * a tripwire for the type checker in case that invariant ever breaks. */throw new Error(`temporal-fmt: parseRelative internal error \u2014 month "${e}" not in names list.`);/* c8 ignore stop @preserve */}var Se=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],ke=["January","February","March","April","May","June","July","August","September","October","November","December"],Me=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Z={supportedHint:'Supported: weekday refs ("next Tuesday"), day offsets ("today"/"tomorrow"/"yesterday"), unit offsets ("in 3 days", "2 weeks ago"), and month-day ("March 5th").',matchers:[{pattern:/^today$/i,resolve:(e,n)=>oe(n.temporal,P(n.reference),z(n.reference),N(n.reference))},{pattern:/^tomorrow$/i,resolve:(e,n)=>b(n.temporal,n.reference,1)},{pattern:/^yesterday$/i,resolve:(e,n)=>b(n.temporal,n.reference,-1)},{pattern:new RegExp(`^(next|last|this)\\s+(${S(Se)})$`,"i"),resolve:(e,n)=>{let t=e[1].toLowerCase(),r=se(e[2],Se),a=re(n.reference);return b(n.temporal,n.reference,ae(t,a,r))}},{pattern:/^(in\s+)?(\d+)\s+(day|week|month|year)s?(?:\s+ago)?$/i,resolve:(e,n)=>{let t=e[1],r=e[2],a=e[3].toLowerCase(),o=!!t,s=/\bago\b/i.test(e[0]);if(!o&&!s)throw new Error(`temporal-fmt: parseRelative can't tell whether "${e[0]}" is past or future \u2014 use "in ${r} ${a}s" or "${r} ${a}s ago".`);let d=o?1:-1;return O(n.temporal,n.reference,d*Number(r),a)}},{pattern:new RegExp(`^(${S([...ke,...Me])})\\s+(\\d{1,2})(?:st|nd|rd|th)?(?:,?\\s*(\\d{4}))?$`,"i"),resolve:(e,n)=>{let t=le(e[1],ke,Me),r=Number(e[2]);return ie(n.temporal,n.reference,t,r)}}]},ne=["lunes","martes","mi\xE9rcoles","jueves","viernes","s\xE1bado","domingo"],Ue=["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],je=["ene","feb","mar","abr","may","jun","jul","ago","sept","oct","nov","dic"],qr={supportedHint:'Frases soportadas: referencias de d\xEDa de la semana ("el pr\xF3ximo lunes", "el lunes pasado", "este martes"), offsets de d\xEDa ("hoy"/"ma\xF1ana"/"ayer"), offsets de unidad ("en 3 d\xEDas", "hace 2 semanas"), y mes-d\xEDa ("5 de marzo").',matchers:[{pattern:/^hoy$/i,resolve:(e,n)=>oe(n.temporal,P(n.reference),z(n.reference),N(n.reference))},{pattern:/^ma[ñn]ana$/i,resolve:(e,n)=>b(n.temporal,n.reference,1)},{pattern:/^ayer$/i,resolve:(e,n)=>b(n.temporal,n.reference,-1)},{pattern:new RegExp(`^(?:el\\s+)?(?:(pr[o\xF3]ximo|pasado)\\s+(${S(ne)})|(${S(ne)})\\s+(pr[o\xF3]ximo|pasado)|este\\s+(${S(ne)}))$`,"i"),resolve:(e,n)=>{let t,r;e[1]&&e[2]?(t=e[1],r=e[2]):e[3]&&e[4]?(r=e[3],t=e[4]):(t="este",r=e[5]);let a=k(t)==="proximo"?"next":t.toLowerCase()==="este"?"this":"last",o=se(r,ne),s=re(n.reference);return b(n.temporal,n.reference,ae(a,s,o))}},{pattern:new RegExp("^(?:(en|dentro\\s+de)\\s+(\\d+)\\s+(d[i\xED]a|semana|mes|a[\xF1n]o)s?|(\\d+)\\s+(d[i\xED]a|semana|mes|a[\xF1n]o)s?\\s+(hace))$","i"),resolve:(e,n)=>{let t,r,a;e[1]&&e[2]&&e[3]?(t=e[2],r=e[3],a=1):(t=e[4],r=e[5],a=-1);let o=U(r);return O(n.temporal,n.reference,a*Number(t),o)}},{pattern:new RegExp("^hace\\s+(\\d+)\\s+(d[i\xED]a|semana|mes|a[\xF1n]o)s?$","i"),resolve:(e,n)=>{let t=Number(e[1]),r=U(e[2]);return O(n.temporal,n.reference,-t,r)}},{pattern:new RegExp("^(\\d+)\\s+(d[i\xED]a|semana|mes|a[\xF1n]o)s?$","i"),resolve:(e,n)=>{throw new Error(`temporal-fmt: parseRelative no puede decidir si "${e[0]}" es pasado o futuro \u2014 usa "en ${e[1]} ${e[2]}s" o "hace ${e[1]} ${e[2]}s".`)}},{pattern:new RegExp(`^(\\d{1,2})\\.?\\s+de\\s+(${S([...Ue,...je])})(?:\\s+de\\s+(\\d{4}))?$`,"i"),resolve:(e,n)=>{let t=Number(e[1]),r=le(e[2],Ue,je);return ie(n.temporal,n.reference,r,t)}}]},ve=["lundi","mardi","mercredi","jeudi","vendredi","samedi","dimanche"],Ge=["janvier","f\xE9vrier","mars","avril","mai","juin","juillet","ao\xFBt","septembre","octobre","novembre","d\xE9cembre"],Ze=["janv.","f\xE9vr.","mars","avr.","mai","juin","juil.","ao\xFBt","sept.","oct.","nov.","d\xE9c."],Kr={supportedHint:`Phrases prises en charge : r\xE9f\xE9rences de jour de la semaine ("lundi prochain", "mardi dernier", "ce mercredi"), d\xE9calages de jour ("aujourd'hui"/"demain"/"hier"), d\xE9calages d'unit\xE9 ("dans 3 jours", "il y a 2 semaines"), et mois-jour ("5 mars").`,matchers:[{pattern:/^aujourd'hui$/i,resolve:(e,n)=>oe(n.temporal,P(n.reference),z(n.reference),N(n.reference))},{pattern:/^demain$/i,resolve:(e,n)=>b(n.temporal,n.reference,1)},{pattern:/^hier$/i,resolve:(e,n)=>b(n.temporal,n.reference,-1)},{pattern:new RegExp(`^(?:(${S(ve)})\\s+(prochain|dernier)|ce\\s+(${S(ve)}))$`,"i"),resolve:(e,n)=>{let t,r;e[1]&&e[2]?(r=e[1],t=e[2].toLowerCase()==="prochain"?"next":"last"):(t="this",r=e[3]);let a=se(r,ve),o=re(n.reference);return b(n.temporal,n.reference,ae(t,o,a))}},{pattern:new RegExp("^il\\s+y\\s+a\\s+(\\d+)\\s+(jour|semaine|mois|an|ann[e\xE9e]e)s?$","i"),resolve:(e,n)=>{let t=Number(e[1]),r=U(e[2]);return O(n.temporal,n.reference,-t,r)}},{pattern:new RegExp("^dans\\s+(\\d+)\\s+(jour|semaine|mois|an|ann[e\xE9e]e)s?$","i"),resolve:(e,n)=>{let t=Number(e[1]),r=U(e[2]);return O(n.temporal,n.reference,t,r)}},{pattern:new RegExp("^(\\d+)\\s+(jour|semaine|mois|an|ann[e\xE9e]e)s?$","i"),resolve:(e,n)=>{throw new Error(`temporal-fmt: parseRelative ne peut pas d\xE9terminer si "${e[0]}" est pass\xE9 ou futur \u2014 utilisez "dans ${e[1]} ${e[2]}s" ou "il y a ${e[1]} ${e[2]}s".`)}},{pattern:new RegExp(`^(\\d{1,2})\\s+(${S([...Ge,...Ze])})(?:\\s+(\\d{4}))?$`,"i"),resolve:(e,n)=>{let t=Number(e[1]),r=le(e[2],Ge,Ze);return ie(n.temporal,n.reference,r,t)}}]},We=["Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag","Sonntag"],Ye=["Januar","Februar","M\xE4rz","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],Be=["Jan","Feb","M\xE4r","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],Jr={supportedHint:'Unterst\xFCtzte Phrasen: Wochentag-Bez\xFCge ("n\xE4chsten Dienstag", "letzten Freitag", "diesen Montag"), Tages-Offsets ("heute"/"morgen"/"gestern"), Einheiten-Offsets ("in 3 Tagen", "vor 2 Wochen"), und Monat-Tag ("5. M\xE4rz").',matchers:[{pattern:/^heute$/i,resolve:(e,n)=>oe(n.temporal,P(n.reference),z(n.reference),N(n.reference))},{pattern:/^morgen$/i,resolve:(e,n)=>b(n.temporal,n.reference,1)},{pattern:/^gestern$/i,resolve:(e,n)=>b(n.temporal,n.reference,-1)},{pattern:new RegExp(`^(n(?:ae|a|\xE4)chsten|letzten|diesen)\\s+(${S(We)})$`,"i"),resolve:(e,n)=>{let t=k(e[1]),r=t==="nachsten"||t==="naechsten"?"next":t==="diesen"?"this":"last",a=se(e[2],We),o=re(n.reference);return b(n.temporal,n.reference,ae(r,o,a))}},{pattern:new RegExp("^vor\\s+(\\d+)\\s+(Tag(?:e|n|en)?|Woche(?:n)?|Monat(?:e|n|en)?|Jahr(?:e|n|en)?)$","i"),resolve:(e,n)=>{let t=Number(e[1]),r=U(e[2]);return O(n.temporal,n.reference,-t,r)}},{pattern:new RegExp("^in\\s+(\\d+)\\s+(Tag(?:e|n|en)?|Woche(?:n)?|Monat(?:e|n|en)?|Jahr(?:e|n|en)?)$","i"),resolve:(e,n)=>{let t=Number(e[1]),r=U(e[2]);return O(n.temporal,n.reference,t,r)}},{pattern:new RegExp("^(\\d+)\\s+(Tag(?:e|n|en)?|Woche(?:n)?|Monat(?:e|n|en)?|Jahr(?:e|n|en)?)$","i"),resolve:(e,n)=>{throw new Error(`temporal-fmt: parseRelative kann nicht erkennen, ob "${e[0]}" Vergangenheit oder Zukunft ist \u2014 verwende "in ${e[1]} ${e[2]}" oder "vor ${e[1]} ${e[2]}".`)}},{pattern:new RegExp(`^(\\d{1,2})\\.?\\s+(${S([...Ye,...Be,"Maerz","Maer"])})(?:\\s+(\\d{4}))?$`,"i"),resolve:(e,n)=>{let t=Number(e[1]),r=le(e[2],Ye,Be);return ie(n.temporal,n.reference,r,t)}}]},Qr={en:Z,es:qr,fr:Kr,de:Jr};function Vr(e){if(!e)return Z;try{let t=new Intl.Locale(e.replace(/_/g,"-")).language.toLowerCase();return Qr[t]??Z}catch{return Z}}function eo(e){if(!e)return"en";try{return new Intl.Locale(e.replace(/_/g,"-")).language.toLowerCase()}catch{return"en"}}function U(e){let n=k(e);if(n==="day"||n==="week"||n==="month"||n==="year")return n;if(n==="dia")return"day";if(n==="semana")return"week";if(n==="mes")return"month";if(n==="ano"||n==="a\xF1o")return"year";if(n==="jour")return"day";if(n==="semaine")return"week";if(n==="mois")return"month";if(n==="an"||n==="annee")return"year";if(n==="tag"||n==="tagen")return"day";if(n==="woche"||n==="wochen")return"week";if(n==="monat"||n==="monaten")return"month";if(n==="jahr"||n==="jahren")return"year";/* c8 ignore start @preserve -- unreachable: every caller passes a word
22
22
  * captured by a regex alternation built from exactly these unit-word
23
23
  * forms (day/week/month/year across en/es/fr/de), so the branches
24
24
  * above already cover every string that can reach this function.
25
25
  * Kept as a tripwire for the type checker in case a grammar adds a
26
- * unit word here without a matching regex update. */throw new Error(`temporal-fmt: parseRelative internal error \u2014 unrecognized unit word "${e}".`);/* c8 ignore stop @preserve */}function Br(e,n,t={}){let r=n,o=H(),a=(e??"").trim().replace(/\s+/g," ");if(a.length===0)throw new Error("temporal-fmt: parseRelative got an empty input string.");if(a.length>ee)throw new RangeError(`temporal-fmt: parseRelative input is too large (maximum ${ee} characters).`);let s=k(a),d=Yr(t.locale),i={temporal:o,reference:r},m=y=>{for(let h of d.matchers){let c=y.match(h.pattern);if(c)return h.resolve(c,i)}return Te},l=m(s);if(l!==Te)return l;if(t.fuzzy){if(d!==j)throw new Error("temporal-fmt: parseRelative's { fuzzy: true } option currently only supports English. Pass no locale (or locale: 'en'), or omit { fuzzy: true } for this locale.");let y=Ur(s);if(y!==void 0){let h=m(y);if(h!==Te)return h}}throw new Error(`temporal-fmt: parseRelative doesn't recognize "${a}". `+d.supportedHint)}var Te=Symbol("temporal-fmt: parseRelative no match");function M(e){return typeof e=="object"&&e!==null}function T(e,n){return typeof e[n]=="function"}function F(e,n){return M(e)?e[Symbol.toStringTag]===`Temporal.${n}`:!1}function je(e){if(F(e,"PlainDate"))return!0;if(!M(e))return!1;let n=e;return typeof n.year=="number"&&typeof n.month=="number"&&typeof n.day=="number"&&typeof n.hour>"u"&&T(n,"toPlainDateTime")&&T(n,"withCalendar")}function Ge(e){if(F(e,"PlainTime"))return!0;if(!M(e))return!1;let n=e;return typeof n.hour=="number"&&typeof n.year>"u"&&!T(n,"withCalendar")&&!T(n,"toPlainDate")&&!T(n,"toPlainDateTime")}function Ze(e){if(F(e,"PlainDateTime"))return!0;if(!M(e))return!1;let n=e;return typeof n.year=="number"&&typeof n.month=="number"&&typeof n.day=="number"&&typeof n.hour=="number"&&T(n,"withPlainTime")&&!T(n,"toInstant")}function We(e){if(F(e,"ZonedDateTime"))return!0;if(!M(e))return!1;let n=e;return typeof n.year=="number"&&typeof n.month=="number"&&typeof n.day=="number"&&typeof n.hour=="number"&&T(n,"withTimeZone")&&T(n,"toInstant")}function Ye(e){if(F(e,"Instant"))return!0;if(!M(e))return!1;let n=e;return T(n,"toZonedDateTimeISO")&&!T(n,"toInstant")&&typeof n.year>"u"}function Be(e){if(F(e,"PlainYearMonth"))return!0;if(!M(e))return!1;let n=e;return typeof n.year=="number"&&typeof n.month=="number"&&typeof n.day>"u"&&T(n,"toPlainDate")}function Xe(e){if(F(e,"PlainMonthDay"))return!0;if(!M(e))return!1;let n=e;return typeof n.year>"u"&&typeof n.month>"u"&&typeof n.day=="number"&&typeof n.monthCode=="string"&&T(n,"toPlainDate")}function qe(e){return F(e,"Duration")?!0:M(e)?T(e,"total"):!1}function Ke(e){if(!M(e))return!1;let n=e[Symbol.toStringTag];if(typeof n=="string"&&n.startsWith("Temporal."))return!0;let t=e;return T(t,"toInstant")||T(t,"toPlainDate")||T(t,"toPlainDateTime")||T(t,"toPlainTime")||T(t,"toPlainYearMonth")||T(t,"toPlainMonthDay")||T(t,"toZonedDateTime")||T(t,"toZonedDateTimeISO")||T(t,"withCalendar")||T(t,"withPlainTime")||T(t,"withTimeZone")||T(t,"total")}function Xr(e){if(e===null)return"null";if(Array.isArray(e))return"array";if(typeof e=="object"){let n=e.constructor;return n&&typeof n.name=="string"&&n.name!=="Object"?`instance of ${n.name}`:"plain object"}return typeof e}function x(e,n,t){if(!n(e))throw new Error(`temporal-fmt: expected a Temporal.${t}, got ${Xr(e)}.`)}function qr(e){x(e,Ke,"object (Instant, PlainDate, PlainTime, PlainDateTime, ZonedDateTime, Duration, PlainYearMonth, or PlainMonthDay)")}function Kr(e){x(e,Ye,"Instant")}function Qr(e){x(e,je,"PlainDate")}function Jr(e){x(e,Ge,"PlainTime")}function Vr(e){x(e,Ze,"PlainDateTime")}function eo(e){x(e,We,"ZonedDateTime")}function no(e){x(e,Be,"PlainYearMonth")}function to(e){x(e,Xe,"PlainMonthDay")}function ro(e){x(e,qe,"Duration")}var u={year:["PlainDate","PlainDateTime","ZonedDateTime","PlainYearMonth"],month:["PlainDate","PlainDateTime","ZonedDateTime","PlainYearMonth","PlainMonthDay"],day:["PlainDate","PlainDateTime","ZonedDateTime","PlainMonthDay"],hour:["PlainTime","PlainDateTime","ZonedDateTime","Instant"],minute:["PlainTime","PlainDateTime","ZonedDateTime","Instant"],second:["PlainTime","PlainDateTime","ZonedDateTime","Instant"],millisecond:["PlainTime","PlainDateTime","ZonedDateTime","Instant"],dayOfWeek:["PlainDate","PlainDateTime","ZonedDateTime"],timeZoneId:["ZonedDateTime"],offset:["ZonedDateTime"]},C={yyyy:{meaning:"Four-digit year (preserves sign for BCE; no truncation).",formatCapable:!0,parseCapable:!0,localeSensitive:!1,calendarSensitive:!0,timezoneSensitive:!1,supportedTypes:u.year,roundTripSafe:!0},yy:{meaning:"Two-digit year (year % 100). Throws on negative years.",formatCapable:!0,parseCapable:!0,localeSensitive:!1,calendarSensitive:!0,timezoneSensitive:!1,supportedTypes:u.year,roundTripSafe:!1},MMMM:{meaning:'Long month name (locale-aware, e.g. "January", "janvier").',formatCapable:!0,parseCapable:!0,localeSensitive:!0,calendarSensitive:!0,timezoneSensitive:!1,supportedTypes:u.month,roundTripSafe:!0},MMM:{meaning:'Short month name (locale-aware, e.g. "Jan", "janv.").',formatCapable:!0,parseCapable:!0,localeSensitive:!0,calendarSensitive:!0,timezoneSensitive:!1,supportedTypes:u.month,roundTripSafe:!0},MM:{meaning:"Two-digit month (01-12, zero-padded).",formatCapable:!0,parseCapable:!0,localeSensitive:!1,calendarSensitive:!0,timezoneSensitive:!1,supportedTypes:u.month,roundTripSafe:!0},M:{meaning:"One- or two-digit month (1-12, no padding).",formatCapable:!0,parseCapable:!0,localeSensitive:!1,calendarSensitive:!0,timezoneSensitive:!1,supportedTypes:u.month,roundTripSafe:!0},dd:{meaning:"Two-digit day-of-month (01-31, zero-padded).",formatCapable:!0,parseCapable:!0,localeSensitive:!1,calendarSensitive:!0,timezoneSensitive:!1,supportedTypes:u.day,roundTripSafe:!0},d:{meaning:"One- or two-digit day-of-month (1-31, no padding).",formatCapable:!0,parseCapable:!0,localeSensitive:!1,calendarSensitive:!0,timezoneSensitive:!1,supportedTypes:u.day,roundTripSafe:!0},EEEE:{meaning:'Long weekday name (locale-aware, e.g. "Monday", "lundi"). Parse cross-checks against the parsed date.',formatCapable:!0,parseCapable:!0,localeSensitive:!0,calendarSensitive:!0,timezoneSensitive:!1,supportedTypes:u.dayOfWeek,roundTripSafe:!0},EEE:{meaning:'Short weekday name (locale-aware, e.g. "Mon", "lun."). Parse cross-checks against the parsed date.',formatCapable:!0,parseCapable:!0,localeSensitive:!0,calendarSensitive:!0,timezoneSensitive:!1,supportedTypes:u.dayOfWeek,roundTripSafe:!0},HH:{meaning:"Two-digit hour, 24-hour clock (00-23, zero-padded).",formatCapable:!0,parseCapable:!0,localeSensitive:!1,calendarSensitive:!1,timezoneSensitive:!1,supportedTypes:u.hour,roundTripSafe:!0},H:{meaning:"One- or two-digit hour, 24-hour clock (0-23, no padding).",formatCapable:!0,parseCapable:!0,localeSensitive:!1,calendarSensitive:!1,timezoneSensitive:!1,supportedTypes:u.hour,roundTripSafe:!0},hh:{meaning:"Two-digit hour, 12-hour clock (01-12, zero-padded). Requires `a` token on parse.",formatCapable:!0,parseCapable:!0,localeSensitive:!1,calendarSensitive:!1,timezoneSensitive:!1,supportedTypes:u.hour,roundTripSafe:!0},h:{meaning:"One- or two-digit hour, 12-hour clock (1-12, no padding). Requires `a` token on parse.",formatCapable:!0,parseCapable:!0,localeSensitive:!1,calendarSensitive:!1,timezoneSensitive:!1,supportedTypes:u.hour,roundTripSafe:!0},mm:{meaning:"Two-digit minute (00-59, zero-padded).",formatCapable:!0,parseCapable:!0,localeSensitive:!1,calendarSensitive:!1,timezoneSensitive:!1,supportedTypes:u.minute,roundTripSafe:!0},m:{meaning:"One- or two-digit minute (0-59, no padding).",formatCapable:!0,parseCapable:!0,localeSensitive:!1,calendarSensitive:!1,timezoneSensitive:!1,supportedTypes:u.minute,roundTripSafe:!0},ss:{meaning:"Two-digit second (00-59, zero-padded).",formatCapable:!0,parseCapable:!0,localeSensitive:!1,calendarSensitive:!1,timezoneSensitive:!1,supportedTypes:u.second,roundTripSafe:!0},s:{meaning:"One- or two-digit second (0-59, no padding).",formatCapable:!0,parseCapable:!0,localeSensitive:!1,calendarSensitive:!1,timezoneSensitive:!1,supportedTypes:u.second,roundTripSafe:!0},S:{meaning:"Fractional second, 1 digit (tenths of a second).",formatCapable:!0,parseCapable:!0,localeSensitive:!1,calendarSensitive:!1,timezoneSensitive:!1,supportedTypes:u.millisecond,roundTripSafe:!0},SS:{meaning:"Fractional second, 2 digits (hundredths of a second).",formatCapable:!0,parseCapable:!0,localeSensitive:!1,calendarSensitive:!1,timezoneSensitive:!1,supportedTypes:u.millisecond,roundTripSafe:!0},SSS:{meaning:"Fractional second, 3 digits (milliseconds).",formatCapable:!0,parseCapable:!0,localeSensitive:!1,calendarSensitive:!1,timezoneSensitive:!1,supportedTypes:u.millisecond,roundTripSafe:!0},SSSS:{meaning:"Fractional second, 4 digits (tens of microseconds).",formatCapable:!0,parseCapable:!0,localeSensitive:!1,calendarSensitive:!1,timezoneSensitive:!1,supportedTypes:u.millisecond,roundTripSafe:!0},SSSSS:{meaning:"Fractional second, 5 digits (hundred-thousandths of a second).",formatCapable:!0,parseCapable:!0,localeSensitive:!1,calendarSensitive:!1,timezoneSensitive:!1,supportedTypes:u.millisecond,roundTripSafe:!0},SSSSSS:{meaning:"Fractional second, 6 digits (microseconds).",formatCapable:!0,parseCapable:!0,localeSensitive:!1,calendarSensitive:!1,timezoneSensitive:!1,supportedTypes:u.millisecond,roundTripSafe:!0},SSSSSSS:{meaning:"Fractional second, 7 digits (tens of nanoseconds).",formatCapable:!0,parseCapable:!0,localeSensitive:!1,calendarSensitive:!1,timezoneSensitive:!1,supportedTypes:u.millisecond,roundTripSafe:!0},SSSSSSSS:{meaning:"Fractional second, 8 digits (hundred-millionths of a second).",formatCapable:!0,parseCapable:!0,localeSensitive:!1,calendarSensitive:!1,timezoneSensitive:!1,supportedTypes:u.millisecond,roundTripSafe:!0},SSSSSSSSS:{meaning:"Fractional second, 9 digits (nanoseconds).",formatCapable:!0,parseCapable:!0,localeSensitive:!1,calendarSensitive:!1,timezoneSensitive:!1,supportedTypes:u.millisecond,roundTripSafe:!0},a:{meaning:'Day period (locale-aware: "AM"/"PM", "\u5348\u524D"/"\u5348\u5F8C", etc.). Required alongside 12-hour tokens on parse.',formatCapable:!0,parseCapable:!0,localeSensitive:!0,calendarSensitive:!1,timezoneSensitive:!1,supportedTypes:u.hour,roundTripSafe:!0},zzz:{meaning:'IANA time zone id (e.g. "America/New_York") or fixed offset ("+05:30"). Requires full date+time on parse.',formatCapable:!0,parseCapable:!0,localeSensitive:!1,calendarSensitive:!1,timezoneSensitive:!0,supportedTypes:u.timeZoneId,roundTripSafe:!0},X:{meaning:"Numeric UTC offset, short (Z for UTC, \xB1HH[MM] otherwise). Minutes omitted when zero.",formatCapable:!0,parseCapable:!0,localeSensitive:!1,calendarSensitive:!1,timezoneSensitive:!0,supportedTypes:u.offset,roundTripSafe:!0},XX:{meaning:"Numeric UTC offset, no colon (Z for UTC, \xB1HHMM otherwise).",formatCapable:!0,parseCapable:!0,localeSensitive:!1,calendarSensitive:!1,timezoneSensitive:!0,supportedTypes:u.offset,roundTripSafe:!0},XXX:{meaning:"Numeric UTC offset, with colon (Z for UTC, \xB1HH:MM otherwise).",formatCapable:!0,parseCapable:!0,localeSensitive:!1,calendarSensitive:!1,timezoneSensitive:!0,supportedTypes:u.offset,roundTripSafe:!0},x:{meaning:"Numeric UTC offset, short, never Z (always \xB1HH[MM]). Lowercase variant of X.",formatCapable:!0,parseCapable:!0,localeSensitive:!1,calendarSensitive:!1,timezoneSensitive:!0,supportedTypes:u.offset,roundTripSafe:!0},xx:{meaning:"Numeric UTC offset, no colon, never Z (always \xB1HHMM). Lowercase variant of XX.",formatCapable:!0,parseCapable:!0,localeSensitive:!1,calendarSensitive:!1,timezoneSensitive:!0,supportedTypes:u.offset,roundTripSafe:!0},xxx:{meaning:"Numeric UTC offset, with colon, never Z (always \xB1HH:MM). Lowercase variant of XXX.",formatCapable:!0,parseCapable:!0,localeSensitive:!1,calendarSensitive:!1,timezoneSensitive:!0,supportedTypes:u.offset,roundTripSafe:!0},do:{meaning:'Ordinal day-of-month with English suffix ("1st", "2nd", "3rd", "4th", ... 21st, 22nd, ...). Format-only \u2014 not parseable.',formatCapable:!0,parseCapable:!1,localeSensitive:!1,calendarSensitive:!0,timezoneSensitive:!1,supportedTypes:u.day,roundTripSafe:!1},Q:{meaning:"Quarter as a digit (1-4). Derived from month.",formatCapable:!0,parseCapable:!0,localeSensitive:!1,calendarSensitive:!0,timezoneSensitive:!1,supportedTypes:u.month,roundTripSafe:!0},QQQ:{meaning:'Quarter with "Q" prefix ("Q1".."Q4"). Derived from month.',formatCapable:!0,parseCapable:!0,localeSensitive:!1,calendarSensitive:!0,timezoneSensitive:!1,supportedTypes:u.month,roundTripSafe:!0},ww:{meaning:"ISO 8601 week number (01-53). Format-only \u2014 week alone can't reconstruct a date.",formatCapable:!0,parseCapable:!1,localeSensitive:!1,calendarSensitive:!0,timezoneSensitive:!1,supportedTypes:u.dayOfWeek,roundTripSafe:!1},RRRR:{meaning:"ISO 8601 week-numbering year (4-digit, may differ from calendar year at year boundaries). Format-only.",formatCapable:!0,parseCapable:!1,localeSensitive:!1,calendarSensitive:!0,timezoneSensitive:!1,supportedTypes:u.dayOfWeek,roundTripSafe:!1},D:{meaning:"Day of year, unpadded (1-366). Format-only \u2014 parsing requires resolving against a year.",formatCapable:!0,parseCapable:!1,localeSensitive:!1,calendarSensitive:!0,timezoneSensitive:!1,supportedTypes:u.day,roundTripSafe:!1},DD:{meaning:"Day of year, 2-digit minimum (01-366). Format-only.",formatCapable:!0,parseCapable:!1,localeSensitive:!1,calendarSensitive:!0,timezoneSensitive:!1,supportedTypes:u.day,roundTripSafe:!1},DDD:{meaning:"Day of year, 3-digit zero-padded (001-366). Format-only.",formatCapable:!0,parseCapable:!1,localeSensitive:!1,calendarSensitive:!0,timezoneSensitive:!1,supportedTypes:u.day,roundTripSafe:!1},LLLL:{meaning:"Stand-alone long month name (nominative case in Slavic locales). Identical to MMMM in most locales.",formatCapable:!0,parseCapable:!1,localeSensitive:!0,calendarSensitive:!0,timezoneSensitive:!1,supportedTypes:u.month,roundTripSafe:!0},LLL:{meaning:"Stand-alone short month name. Identical to MMM in most locales.",formatCapable:!0,parseCapable:!1,localeSensitive:!0,calendarSensitive:!0,timezoneSensitive:!1,supportedTypes:u.month,roundTripSafe:!0},cccc:{meaning:"Stand-alone long weekday name. Identical to EEEE in most locales.",formatCapable:!0,parseCapable:!1,localeSensitive:!0,calendarSensitive:!0,timezoneSensitive:!1,supportedTypes:u.dayOfWeek,roundTripSafe:!0},ccc:{meaning:"Stand-alone short weekday name. Identical to EEE in most locales.",formatCapable:!0,parseCapable:!1,localeSensitive:!0,calendarSensitive:!0,timezoneSensitive:!1,supportedTypes:u.dayOfWeek,roundTripSafe:!0},GGGG:{meaning:'Long era name (locale-aware, e.g. "Anno Domini"/"Before Christ"). Format-only.',formatCapable:!0,parseCapable:!1,localeSensitive:!0,calendarSensitive:!0,timezoneSensitive:!1,supportedTypes:u.year,roundTripSafe:!1},G:{meaning:'Short era name (locale-aware, e.g. "AD"/"BC"). Format-only.',formatCapable:!0,parseCapable:!1,localeSensitive:!0,calendarSensitive:!0,timezoneSensitive:!1,supportedTypes:u.year,roundTripSafe:!1},zzzz:{meaning:'Localized long timezone name (e.g. "Eastern Standard Time"). Format-only.',formatCapable:!0,parseCapable:!1,localeSensitive:!0,calendarSensitive:!1,timezoneSensitive:!0,supportedTypes:u.timeZoneId,roundTripSafe:!1},z:{meaning:'Localized short timezone name (e.g. "EST"). Format-only.',formatCapable:!0,parseCapable:!1,localeSensitive:!0,calendarSensitive:!1,timezoneSensitive:!0,supportedTypes:u.timeZoneId,roundTripSafe:!1}},se=Object.keys(C);function oo(e){return B(e)}function Qe(){return Y.map(([e])=>({name:e,metadata:C[e]}))}function ao(e){return C[e]}function G(e){if(e.length>1e3)throw new Error(`temporal-fmt: format string exceeds maximum length of ${1e3} characters (got ${e.length}).`);let n=B(e),t=[],r=new Set,o=new Set,a=!0,s=!1,d=!1,i=!1,m=!0,l=[],y=0,h=[],c=()=>{h.length>=2&&l.push({code:"AMBIGUOUS_NUMERIC_RUN",message:`Adjacent unpadded numeric tokens "${h.join("")}" with no separator can be ambiguous to parse. Add a separator or use the padded form (e.g. "MM" instead of "M").`}),h.length=0};for(let p of n){if(p.kind==="literal"){y+=p.value.length,c();continue}let E=C[p.value];if(!E){l.push({code:"UNKNOWN_TOKEN_NO_METADATA",message:`Token "${p.value}" is recognized by the tokenizer but has no metadata entry in tokenMetadata.ts \u2014 this is a bug in temporal-fmt.`}),y+=p.value.length;continue}t.push({name:p.value,position:y,metadata:E});let Ee=pe(p.value);if(Ee&&r.add(Ee.field),t.length===1)for(let Z of E.supportedTypes)o.add(Z);else{let Z=new Set;for(let W of o)E.supportedTypes.includes(W)&&Z.add(W);o.clear();for(let W of Z)o.add(W)}E.parseCapable||(a=!1,l.push({code:"FORMAT_ONLY_TOKEN",message:`Token "${p.value}" is format-only \u2014 it can't be parsed back into a value. Use a parse-capable variant (e.g. "d" instead of "do") if you need round-trip.`})),E.localeSensitive&&(s=!0),E.calendarSensitive&&(d=!0),E.timezoneSensitive&&(i=!0),E.roundTripSafe||(m=!1),Re.has(p.value)?h.push(p.value):c(),y+=p.value.length}c();let f=t.map(p=>p.name),g=f.some(p=>p==="hh"||p==="h"),D=f.some(p=>p==="HH"||p==="H"),sn=f.some(p=>p==="a");g&&!sn&&l.push({code:"TWELVE_HOUR_WITHOUT_A",message:`12-hour token ("hh"/"h") used without an "a" (AM/PM) token \u2014 parse() can't tell AM from PM and throws at runtime.`}),g&&D&&l.push({code:"MIXED_12_AND_24_HOUR",message:"Mixing 24-hour and 12-hour tokens \u2014 parse() refuses to guess which is authoritative and throws at runtime."});let De=f.some(p=>p==="X"||p==="XX"||p==="XXX"||p==="x"||p==="xx"||p==="xxx"),ln=f.some(p=>p==="zzz");return De&&ln&&l.push({code:"ZZZ_WITH_OFFSET_TOKEN",message:`Format string has both "zzz" and an offset token \u2014 parse() cross-checks them and throws if the parsed offset disagrees with the zone's actual offset.`}),De&&!r.has("year")&&l.push({code:"OFFSET_WITHOUT_FULL_DATE",message:"Offset token used without a full date \u2014 parse() needs a complete date and time to build a ZonedDateTime and throws at runtime otherwise."}),{tokens:t,requiredFields:[...r].sort(),compatibleTypes:[...o].sort(),parseable:a,localeSensitive:s,calendarSensitive:d,timezoneSensitive:i,ambiguous:l.some(p=>p.code==="AMBIGUOUS_NUMERIC_RUN"),roundTripSafe:m&&a,warnings:l}}function io(e){let n=G(e),t=[];t.push(`Format string: "${e}"`),t.push(`Tokens (${n.tokens.length}):`);for(let r of n.tokens)t.push(` ${r.name} @${r.position} \u2014 ${r.metadata.meaning}`);if(n.requiredFields.length>0&&t.push(`Required fields: ${n.requiredFields.join(", ")}`),n.compatibleTypes.length>0&&t.push(`Compatible Temporal types: ${n.compatibleTypes.join(", ")}`),t.push(`Parseable: ${n.parseable?"yes":"no"}`),t.push(`Locale-sensitive: ${n.localeSensitive?"yes":"no"}`),t.push(`Calendar-sensitive: ${n.calendarSensitive?"yes":"no"}`),t.push(`Timezone-sensitive: ${n.timezoneSensitive?"yes":"no"}`),t.push(`Ambiguous: ${n.ambiguous?"yes":"no"}`),t.push(`Round-trip safe: ${n.roundTripSafe?"yes":"no"}`),n.warnings.length>0){t.push("Warnings:");for(let r of n.warnings)t.push(` [${r.code}] ${r.message}`)}return t.join(`
27
- `)}function so(e){if(e.length>1e3)return!1;try{return B(e),!0}catch{return!1}}function lo(e){return G(e)}function mo(e){return pe(e)?.field}function ve(e){let n=H();try{if(/^\d{4}-\d{2}-\d{2}T/.test(e)||/T\d{2}:\d{2}/.test(e)){if(/[zZ]$/.test(e)||/[+-]\d{2}:?\d{2}$/.test(e)){let t=e;if(/[zZ]$/.test(t))t=t.slice(0,-1)+"+00:00[UTC]";else{let r=/([+-]\d{2}:?\d{2})$/.exec(t);r&&(t=`${t}[${r[1]}]`)}return n.ZonedDateTime.from(t,{overflow:"reject"})}return n.PlainDateTime.from(e,{overflow:"reject"})}if(/^\d{4}-\d{2}-\d{2}/.test(e))return n.PlainDate.from(e,{overflow:"reject"});if(/^\d{2}:\d{2}/.test(e))return n.PlainTime.from(e);throw new Error(`temporal-fmt: parseISO("${e}") doesn't look like an ISO 8601 string.`)}catch(t){throw new ce({input:e,reason:t.message})}}function Je(e){let n=e;if(typeof n?.toString!="function")throw new S({reason:`formatISO() expects a Temporal value with toString(), got ${typeof e}.`});return n.toString()}function uo(e){if(!/^(\d{4})-(\d{2})-(\d{2})[Tt](\d{2}):(\d{2}):(\d{2})(\.\d+)?([Zz]|[+-]\d{2}:\d{2})$/.exec(e))throw new S({input:e,reason:"does not match RFC 3339 date-time grammar"});let r=e.replace(/[tT]/,"T").replace(/[zZ]$/,"+00:00[UTC]");return ve(r)}function fo(e){let n=Je(e);if(!/^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]+)?(Z|[+-][0-9]{2}:[0-9]{2})$/.test(n))throw new S({input:n,reason:"value did not produce RFC 3339-compliant output"});return n}function co(e){let n=Date.parse(e);if(Number.isNaN(n))throw new S({input:e,reason:"not a valid RFC 2822 date"});return L().fromEpochMilliseconds(n)}function po(e){let n=e,t;if(typeof n?.toEpochMilliseconds=="function")t=n.toEpochMilliseconds();else if(typeof n?.epochMilliseconds=="number")t=n.epochMilliseconds;else if(typeof n?.toInstant=="function"){let r=n.toInstant();typeof r.epochMilliseconds=="number"&&(t=r.epochMilliseconds)}if(t===void 0)throw new S({reason:`formatRFC2822() expects a value with epochMilliseconds, toEpochMilliseconds(), or toInstant(), got ${typeof e}.`});return yo(t)}function yo(e){try{let t=new Intl.DateTimeFormat("en-US",{weekday:"short",day:"2-digit",month:"short",year:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZone:"UTC",timeZoneName:"shortOffset",hour12:!1}).formatToParts(new Date(e)),r=i=>t.find(m=>m.type===i)?.value??"",a=r("timeZoneName")?.match(/GMT([+-])(\d+)(?::(\d+))?/),s;if(a){let i=a[1],m=a[2].padStart(2,"0"),l=(a[3]??"0").padStart(2,"0");s=`${i}${m}${l}`;/* c8 ignore start @preserve -- timeZone is hardcoded to 'UTC' above,
26
+ * unit word here without a matching regex update. */throw new Error(`temporal-fmt: parseRelative internal error \u2014 unrecognized unit word "${e}".`);/* c8 ignore stop @preserve */}function no(e,n,t={}){let r=n,a=A(),o=(e??"").trim().replace(/\s+/g," ");if(o.length===0)throw new Error("temporal-fmt: parseRelative got an empty input string.");if(o.length>te)throw new RangeError(`temporal-fmt: parseRelative input is too large (maximum ${te} characters).`);let s=k(o),d=Vr(t.locale),i={temporal:a,reference:r},m=_e(eo(t.locale),o,{year:r.year,month:r.month,day:r.day,dayOfWeek:r.dayOfWeek});if(m!==null)return m;let l=y=>{for(let f of d.matchers){let c=y.match(f.pattern);if(c)return f.resolve(c,i)}return be},T=l(s);if(T!==be)return T;if(t.fuzzy){if(d!==Z)throw new Error("temporal-fmt: parseRelative's { fuzzy: true } option currently only supports English. Pass no locale (or locale: 'en'), or omit { fuzzy: true } for this locale.");let y=Xr(s);if(y!==void 0){let f=l(y);if(f!==be)return f}}throw new Error(`temporal-fmt: parseRelative doesn't recognize "${o}". `+d.supportedHint)}var be=Symbol("temporal-fmt: parseRelative no match");function M(e){return typeof e=="object"&&e!==null}function x(e){return n=>{try{return e(n)}catch{return!1}}}function h(e,n){return typeof e[n]=="function"}function $(e,n){return M(e)?e[Symbol.toStringTag]===`Temporal.${n}`:!1}var Xe=x(function(n){if($(n,"PlainDate"))return!0;if(!M(n))return!1;let t=n;return typeof t.year=="number"&&typeof t.month=="number"&&typeof t.day=="number"&&typeof t.hour>"u"&&h(t,"toPlainDateTime")&&h(t,"withCalendar")}),qe=x(function(n){if($(n,"PlainTime"))return!0;if(!M(n))return!1;let t=n;return typeof t.hour=="number"&&typeof t.year>"u"&&!h(t,"withCalendar")&&!h(t,"toPlainDate")&&!h(t,"toPlainDateTime")}),Ke=x(function(n){if($(n,"PlainDateTime"))return!0;if(!M(n))return!1;let t=n;return typeof t.year=="number"&&typeof t.month=="number"&&typeof t.day=="number"&&typeof t.hour=="number"&&h(t,"withPlainTime")&&!h(t,"toInstant")}),Je=x(function(n){if($(n,"ZonedDateTime"))return!0;if(!M(n))return!1;let t=n;return typeof t.year=="number"&&typeof t.month=="number"&&typeof t.day=="number"&&typeof t.hour=="number"&&h(t,"withTimeZone")&&h(t,"toInstant")}),Qe=x(function(n){if($(n,"Instant"))return!0;if(!M(n))return!1;let t=n;return h(t,"toZonedDateTimeISO")&&!h(t,"toInstant")&&typeof t.year>"u"}),Ve=x(function(n){if($(n,"PlainYearMonth"))return!0;if(!M(n))return!1;let t=n;return typeof t.year=="number"&&typeof t.month=="number"&&typeof t.day>"u"&&h(t,"toPlainDate")}),en=x(function(n){if($(n,"PlainMonthDay"))return!0;if(!M(n))return!1;let t=n;return typeof t.year>"u"&&typeof t.month>"u"&&typeof t.day=="number"&&typeof t.monthCode=="string"&&h(t,"toPlainDate")}),nn=x(function(n){return $(n,"Duration")?!0:M(n)?h(n,"total"):!1}),tn=x(function(n){if(!M(n))return!1;let t=n[Symbol.toStringTag];if(typeof t=="string"&&t.startsWith("Temporal."))return!0;let r=n;return h(r,"toInstant")||h(r,"toPlainDate")||h(r,"toPlainDateTime")||h(r,"toPlainTime")||h(r,"toPlainYearMonth")||h(r,"toPlainMonthDay")||h(r,"toZonedDateTime")||h(r,"toZonedDateTimeISO")||h(r,"withCalendar")||h(r,"withPlainTime")||h(r,"withTimeZone")||h(r,"total")});function to(e){if(e===null)return"null";if(Array.isArray(e))return"array";if(typeof e=="object"){let n=e.constructor;return n&&typeof n.name=="string"&&n.name!=="Object"?`instance of ${n.name}`:"plain object"}return typeof e}function C(e,n,t){if(!n(e))throw new Error(`temporal-fmt: expected a Temporal.${t}, got ${to(e)}.`)}function ro(e){C(e,tn,"object (Instant, PlainDate, PlainTime, PlainDateTime, ZonedDateTime, Duration, PlainYearMonth, or PlainMonthDay)")}function oo(e){C(e,Qe,"Instant")}function ao(e){C(e,Xe,"PlainDate")}function io(e){C(e,qe,"PlainTime")}function so(e){C(e,Ke,"PlainDateTime")}function lo(e){C(e,Je,"ZonedDateTime")}function mo(e){C(e,Ve,"PlainYearMonth")}function uo(e){C(e,en,"PlainMonthDay")}function co(e){C(e,nn,"Duration")}var u={year:["PlainDate","PlainDateTime","ZonedDateTime","PlainYearMonth"],month:["PlainDate","PlainDateTime","ZonedDateTime","PlainYearMonth","PlainMonthDay"],day:["PlainDate","PlainDateTime","ZonedDateTime","PlainMonthDay"],hour:["PlainTime","PlainDateTime","ZonedDateTime","Instant"],minute:["PlainTime","PlainDateTime","ZonedDateTime","Instant"],second:["PlainTime","PlainDateTime","ZonedDateTime","Instant"],millisecond:["PlainTime","PlainDateTime","ZonedDateTime","Instant"],dayOfWeek:["PlainDate","PlainDateTime","ZonedDateTime"],timeZoneId:["ZonedDateTime"],offset:["ZonedDateTime"]},R={yyyy:{meaning:"Four-digit year (preserves sign for BCE; no truncation).",formatCapable:!0,parseCapable:!0,localeSensitive:!1,calendarSensitive:!0,timezoneSensitive:!1,supportedTypes:u.year,roundTripSafe:!0},yy:{meaning:"Two-digit year (year % 100). Throws on negative years.",formatCapable:!0,parseCapable:!0,localeSensitive:!1,calendarSensitive:!0,timezoneSensitive:!1,supportedTypes:u.year,roundTripSafe:!1},MMMM:{meaning:'Long month name (locale-aware, e.g. "January", "janvier").',formatCapable:!0,parseCapable:!0,localeSensitive:!0,calendarSensitive:!0,timezoneSensitive:!1,supportedTypes:u.month,roundTripSafe:!0},MMM:{meaning:'Short month name (locale-aware, e.g. "Jan", "janv.").',formatCapable:!0,parseCapable:!0,localeSensitive:!0,calendarSensitive:!0,timezoneSensitive:!1,supportedTypes:u.month,roundTripSafe:!0},MM:{meaning:"Two-digit month (01-12, zero-padded).",formatCapable:!0,parseCapable:!0,localeSensitive:!1,calendarSensitive:!0,timezoneSensitive:!1,supportedTypes:u.month,roundTripSafe:!0},M:{meaning:"One- or two-digit month (1-12, no padding).",formatCapable:!0,parseCapable:!0,localeSensitive:!1,calendarSensitive:!0,timezoneSensitive:!1,supportedTypes:u.month,roundTripSafe:!0},dd:{meaning:"Two-digit day-of-month (01-31, zero-padded).",formatCapable:!0,parseCapable:!0,localeSensitive:!1,calendarSensitive:!0,timezoneSensitive:!1,supportedTypes:u.day,roundTripSafe:!0},d:{meaning:"One- or two-digit day-of-month (1-31, no padding).",formatCapable:!0,parseCapable:!0,localeSensitive:!1,calendarSensitive:!0,timezoneSensitive:!1,supportedTypes:u.day,roundTripSafe:!0},EEEE:{meaning:'Long weekday name (locale-aware, e.g. "Monday", "lundi"). Parse cross-checks against the parsed date.',formatCapable:!0,parseCapable:!0,localeSensitive:!0,calendarSensitive:!0,timezoneSensitive:!1,supportedTypes:u.dayOfWeek,roundTripSafe:!0},EEE:{meaning:'Short weekday name (locale-aware, e.g. "Mon", "lun."). Parse cross-checks against the parsed date.',formatCapable:!0,parseCapable:!0,localeSensitive:!0,calendarSensitive:!0,timezoneSensitive:!1,supportedTypes:u.dayOfWeek,roundTripSafe:!0},HH:{meaning:"Two-digit hour, 24-hour clock (00-23, zero-padded).",formatCapable:!0,parseCapable:!0,localeSensitive:!1,calendarSensitive:!1,timezoneSensitive:!1,supportedTypes:u.hour,roundTripSafe:!0},H:{meaning:"One- or two-digit hour, 24-hour clock (0-23, no padding).",formatCapable:!0,parseCapable:!0,localeSensitive:!1,calendarSensitive:!1,timezoneSensitive:!1,supportedTypes:u.hour,roundTripSafe:!0},hh:{meaning:"Two-digit hour, 12-hour clock (01-12, zero-padded). Requires `a` token on parse.",formatCapable:!0,parseCapable:!0,localeSensitive:!1,calendarSensitive:!1,timezoneSensitive:!1,supportedTypes:u.hour,roundTripSafe:!0},h:{meaning:"One- or two-digit hour, 12-hour clock (1-12, no padding). Requires `a` token on parse.",formatCapable:!0,parseCapable:!0,localeSensitive:!1,calendarSensitive:!1,timezoneSensitive:!1,supportedTypes:u.hour,roundTripSafe:!0},mm:{meaning:"Two-digit minute (00-59, zero-padded).",formatCapable:!0,parseCapable:!0,localeSensitive:!1,calendarSensitive:!1,timezoneSensitive:!1,supportedTypes:u.minute,roundTripSafe:!0},m:{meaning:"One- or two-digit minute (0-59, no padding).",formatCapable:!0,parseCapable:!0,localeSensitive:!1,calendarSensitive:!1,timezoneSensitive:!1,supportedTypes:u.minute,roundTripSafe:!0},ss:{meaning:"Two-digit second (00-59, zero-padded).",formatCapable:!0,parseCapable:!0,localeSensitive:!1,calendarSensitive:!1,timezoneSensitive:!1,supportedTypes:u.second,roundTripSafe:!0},s:{meaning:"One- or two-digit second (0-59, no padding).",formatCapable:!0,parseCapable:!0,localeSensitive:!1,calendarSensitive:!1,timezoneSensitive:!1,supportedTypes:u.second,roundTripSafe:!0},S:{meaning:"Fractional second, 1 digit (tenths of a second).",formatCapable:!0,parseCapable:!0,localeSensitive:!1,calendarSensitive:!1,timezoneSensitive:!1,supportedTypes:u.millisecond,roundTripSafe:!0},SS:{meaning:"Fractional second, 2 digits (hundredths of a second).",formatCapable:!0,parseCapable:!0,localeSensitive:!1,calendarSensitive:!1,timezoneSensitive:!1,supportedTypes:u.millisecond,roundTripSafe:!0},SSS:{meaning:"Fractional second, 3 digits (milliseconds).",formatCapable:!0,parseCapable:!0,localeSensitive:!1,calendarSensitive:!1,timezoneSensitive:!1,supportedTypes:u.millisecond,roundTripSafe:!0},SSSS:{meaning:"Fractional second, 4 digits (tens of microseconds).",formatCapable:!0,parseCapable:!0,localeSensitive:!1,calendarSensitive:!1,timezoneSensitive:!1,supportedTypes:u.millisecond,roundTripSafe:!0},SSSSS:{meaning:"Fractional second, 5 digits (hundred-thousandths of a second).",formatCapable:!0,parseCapable:!0,localeSensitive:!1,calendarSensitive:!1,timezoneSensitive:!1,supportedTypes:u.millisecond,roundTripSafe:!0},SSSSSS:{meaning:"Fractional second, 6 digits (microseconds).",formatCapable:!0,parseCapable:!0,localeSensitive:!1,calendarSensitive:!1,timezoneSensitive:!1,supportedTypes:u.millisecond,roundTripSafe:!0},SSSSSSS:{meaning:"Fractional second, 7 digits (tens of nanoseconds).",formatCapable:!0,parseCapable:!0,localeSensitive:!1,calendarSensitive:!1,timezoneSensitive:!1,supportedTypes:u.millisecond,roundTripSafe:!0},SSSSSSSS:{meaning:"Fractional second, 8 digits (hundred-millionths of a second).",formatCapable:!0,parseCapable:!0,localeSensitive:!1,calendarSensitive:!1,timezoneSensitive:!1,supportedTypes:u.millisecond,roundTripSafe:!0},SSSSSSSSS:{meaning:"Fractional second, 9 digits (nanoseconds).",formatCapable:!0,parseCapable:!0,localeSensitive:!1,calendarSensitive:!1,timezoneSensitive:!1,supportedTypes:u.millisecond,roundTripSafe:!0},a:{meaning:'Day period (locale-aware: "AM"/"PM", "\u5348\u524D"/"\u5348\u5F8C", etc.). Required alongside 12-hour tokens on parse.',formatCapable:!0,parseCapable:!0,localeSensitive:!0,calendarSensitive:!1,timezoneSensitive:!1,supportedTypes:u.hour,roundTripSafe:!0},zzz:{meaning:'IANA time zone id (e.g. "America/New_York") or fixed offset ("+05:30"). Requires full date+time on parse.',formatCapable:!0,parseCapable:!0,localeSensitive:!1,calendarSensitive:!1,timezoneSensitive:!0,supportedTypes:u.timeZoneId,roundTripSafe:!0},X:{meaning:"Numeric UTC offset, short (Z for UTC, \xB1HH[MM] otherwise). Minutes omitted when zero.",formatCapable:!0,parseCapable:!0,localeSensitive:!1,calendarSensitive:!1,timezoneSensitive:!0,supportedTypes:u.offset,roundTripSafe:!0},XX:{meaning:"Numeric UTC offset, no colon (Z for UTC, \xB1HHMM otherwise).",formatCapable:!0,parseCapable:!0,localeSensitive:!1,calendarSensitive:!1,timezoneSensitive:!0,supportedTypes:u.offset,roundTripSafe:!0},XXX:{meaning:"Numeric UTC offset, with colon (Z for UTC, \xB1HH:MM otherwise).",formatCapable:!0,parseCapable:!0,localeSensitive:!1,calendarSensitive:!1,timezoneSensitive:!0,supportedTypes:u.offset,roundTripSafe:!0},x:{meaning:"Numeric UTC offset, short, never Z (always \xB1HH[MM]). Lowercase variant of X.",formatCapable:!0,parseCapable:!0,localeSensitive:!1,calendarSensitive:!1,timezoneSensitive:!0,supportedTypes:u.offset,roundTripSafe:!0},xx:{meaning:"Numeric UTC offset, no colon, never Z (always \xB1HHMM). Lowercase variant of XX.",formatCapable:!0,parseCapable:!0,localeSensitive:!1,calendarSensitive:!1,timezoneSensitive:!0,supportedTypes:u.offset,roundTripSafe:!0},xxx:{meaning:"Numeric UTC offset, with colon, never Z (always \xB1HH:MM). Lowercase variant of XXX.",formatCapable:!0,parseCapable:!0,localeSensitive:!1,calendarSensitive:!1,timezoneSensitive:!0,supportedTypes:u.offset,roundTripSafe:!0},do:{meaning:'Ordinal day-of-month with English suffix ("1st", "2nd", "3rd", "4th", ... 21st, 22nd, ...). Format-only \u2014 not parseable.',formatCapable:!0,parseCapable:!1,localeSensitive:!1,calendarSensitive:!0,timezoneSensitive:!1,supportedTypes:u.day,roundTripSafe:!1},Q:{meaning:"Quarter as a digit (1-4). Derived from month.",formatCapable:!0,parseCapable:!0,localeSensitive:!1,calendarSensitive:!0,timezoneSensitive:!1,supportedTypes:u.month,roundTripSafe:!0},QQQ:{meaning:'Quarter with "Q" prefix ("Q1".."Q4"). Derived from month.',formatCapable:!0,parseCapable:!0,localeSensitive:!1,calendarSensitive:!0,timezoneSensitive:!1,supportedTypes:u.month,roundTripSafe:!0},ww:{meaning:"ISO 8601 week number (01-53). Format-only \u2014 week alone can't reconstruct a date.",formatCapable:!0,parseCapable:!1,localeSensitive:!1,calendarSensitive:!0,timezoneSensitive:!1,supportedTypes:u.dayOfWeek,roundTripSafe:!1},RRRR:{meaning:"ISO 8601 week-numbering year (4-digit, may differ from calendar year at year boundaries). Format-only.",formatCapable:!0,parseCapable:!1,localeSensitive:!1,calendarSensitive:!0,timezoneSensitive:!1,supportedTypes:u.dayOfWeek,roundTripSafe:!1},D:{meaning:"Day of year, unpadded (1-366). Format-only \u2014 parsing requires resolving against a year.",formatCapable:!0,parseCapable:!1,localeSensitive:!1,calendarSensitive:!0,timezoneSensitive:!1,supportedTypes:u.day,roundTripSafe:!1},DD:{meaning:"Day of year, 2-digit minimum (01-366). Format-only.",formatCapable:!0,parseCapable:!1,localeSensitive:!1,calendarSensitive:!0,timezoneSensitive:!1,supportedTypes:u.day,roundTripSafe:!1},DDD:{meaning:"Day of year, 3-digit zero-padded (001-366). Format-only.",formatCapable:!0,parseCapable:!1,localeSensitive:!1,calendarSensitive:!0,timezoneSensitive:!1,supportedTypes:u.day,roundTripSafe:!1},LLLL:{meaning:"Stand-alone long month name (nominative case in Slavic locales). Identical to MMMM in most locales.",formatCapable:!0,parseCapable:!1,localeSensitive:!0,calendarSensitive:!0,timezoneSensitive:!1,supportedTypes:u.month,roundTripSafe:!0},LLL:{meaning:"Stand-alone short month name. Identical to MMM in most locales.",formatCapable:!0,parseCapable:!1,localeSensitive:!0,calendarSensitive:!0,timezoneSensitive:!1,supportedTypes:u.month,roundTripSafe:!0},cccc:{meaning:"Stand-alone long weekday name. Identical to EEEE in most locales.",formatCapable:!0,parseCapable:!1,localeSensitive:!0,calendarSensitive:!0,timezoneSensitive:!1,supportedTypes:u.dayOfWeek,roundTripSafe:!0},ccc:{meaning:"Stand-alone short weekday name. Identical to EEE in most locales.",formatCapable:!0,parseCapable:!1,localeSensitive:!0,calendarSensitive:!0,timezoneSensitive:!1,supportedTypes:u.dayOfWeek,roundTripSafe:!0},GGGG:{meaning:'Long era name (locale-aware, e.g. "Anno Domini"/"Before Christ"). Format-only.',formatCapable:!0,parseCapable:!1,localeSensitive:!0,calendarSensitive:!0,timezoneSensitive:!1,supportedTypes:u.year,roundTripSafe:!1},G:{meaning:'Short era name (locale-aware, e.g. "AD"/"BC"). Format-only.',formatCapable:!0,parseCapable:!1,localeSensitive:!0,calendarSensitive:!0,timezoneSensitive:!1,supportedTypes:u.year,roundTripSafe:!1},zzzz:{meaning:'Localized long timezone name (e.g. "Eastern Standard Time"). Format-only.',formatCapable:!0,parseCapable:!1,localeSensitive:!0,calendarSensitive:!1,timezoneSensitive:!0,supportedTypes:u.timeZoneId,roundTripSafe:!1},z:{meaning:'Localized short timezone name (e.g. "EST"). Format-only.',formatCapable:!0,parseCapable:!1,localeSensitive:!0,calendarSensitive:!1,timezoneSensitive:!0,supportedTypes:u.timeZoneId,roundTripSafe:!1}},me=Object.keys(R);function fo(e){return q(e)}function rn(){return X.map(([e])=>({name:e,metadata:R[e]}))}function po(e){return R[e]}function W(e){if(e.length>1e3)throw new Error(`temporal-fmt: format string exceeds maximum length of ${1e3} characters (got ${e.length}).`);let n=q(e),t=[],r=new Set,a=new Set,o=!0,s=!1,d=!1,i=!1,m=!0,l=[],T=0,y=[],f=()=>{y.length>=2&&l.push({code:"AMBIGUOUS_NUMERIC_RUN",message:`Adjacent unpadded numeric tokens "${y.join("")}" with no separator can be ambiguous to parse. Add a separator or use the padded form (e.g. "MM" instead of "M").`}),y.length=0};for(let p of n){if(p.kind==="literal"){T+=p.value.length,f();continue}let E=R[p.value];if(!E){l.push({code:"UNKNOWN_TOKEN_NO_METADATA",message:`Token "${p.value}" is recognized by the tokenizer but has no metadata entry in tokenMetadata.ts \u2014 this is a bug in temporal-fmt.`}),T+=p.value.length;continue}t.push({name:p.value,position:T,metadata:E});let Re=he(p.value);if(Re&&r.add(Re.field),t.length===1)for(let Y of E.supportedTypes)a.add(Y);else{let Y=new Set;for(let B of a)E.supportedTypes.includes(B)&&Y.add(B);a.clear();for(let B of Y)a.add(B)}E.parseCapable||(o=!1,l.push({code:"FORMAT_ONLY_TOKEN",message:`Token "${p.value}" is format-only \u2014 it can't be parsed back into a value. Use a parse-capable variant (e.g. "d" instead of "do") if you need round-trip.`})),E.localeSensitive&&(s=!0),E.calendarSensitive&&(d=!0),E.timezoneSensitive&&(i=!0),E.roundTripSafe||(m=!1),Ae.has(p.value)?y.push(p.value):f(),T+=p.value.length}f();let c=t.map(p=>p.name),g=c.some(p=>p==="hh"||p==="h"),D=c.some(p=>p==="HH"||p==="H"),pn=c.some(p=>p==="a");g&&!pn&&l.push({code:"TWELVE_HOUR_WITHOUT_A",message:`12-hour token ("hh"/"h") used without an "a" (AM/PM) token \u2014 parse() can't tell AM from PM and throws at runtime.`}),g&&D&&l.push({code:"MIXED_12_AND_24_HOUR",message:"Mixing 24-hour and 12-hour tokens \u2014 parse() refuses to guess which is authoritative and throws at runtime."});let Ce=c.some(p=>p==="X"||p==="XX"||p==="XXX"||p==="x"||p==="xx"||p==="xxx"),yn=c.some(p=>p==="zzz");return Ce&&yn&&l.push({code:"ZZZ_WITH_OFFSET_TOKEN",message:`Format string has both "zzz" and an offset token \u2014 parse() cross-checks them and throws if the parsed offset disagrees with the zone's actual offset.`}),Ce&&!r.has("year")&&l.push({code:"OFFSET_WITHOUT_FULL_DATE",message:"Offset token used without a full date \u2014 parse() needs a complete date and time to build a ZonedDateTime and throws at runtime otherwise."}),{tokens:t,requiredFields:[...r].sort(),compatibleTypes:[...a].sort(),parseable:o,localeSensitive:s,calendarSensitive:d,timezoneSensitive:i,ambiguous:l.some(p=>p.code==="AMBIGUOUS_NUMERIC_RUN"),roundTripSafe:m&&o,warnings:l}}function yo(e){let n=W(e),t=[];t.push(`Format string: "${e}"`),t.push(`Tokens (${n.tokens.length}):`);for(let r of n.tokens)t.push(` ${r.name} @${r.position} \u2014 ${r.metadata.meaning}`);if(n.requiredFields.length>0&&t.push(`Required fields: ${n.requiredFields.join(", ")}`),n.compatibleTypes.length>0&&t.push(`Compatible Temporal types: ${n.compatibleTypes.join(", ")}`),t.push(`Parseable: ${n.parseable?"yes":"no"}`),t.push(`Locale-sensitive: ${n.localeSensitive?"yes":"no"}`),t.push(`Calendar-sensitive: ${n.calendarSensitive?"yes":"no"}`),t.push(`Timezone-sensitive: ${n.timezoneSensitive?"yes":"no"}`),t.push(`Ambiguous: ${n.ambiguous?"yes":"no"}`),t.push(`Round-trip safe: ${n.roundTripSafe?"yes":"no"}`),n.warnings.length>0){t.push("Warnings:");for(let r of n.warnings)t.push(` [${r.code}] ${r.message}`)}return t.join(`
27
+ `)}function go(e){if(e.length>1e3)return!1;try{return q(e),!0}catch{return!1}}function ho(e){return W(e)}function To(e){return he(e)?.field}function De(e){let n=A();try{if(/^\d{4}-\d{2}-\d{2}T/.test(e)||/T\d{2}:\d{2}/.test(e)){if(/[zZ]$/.test(e)||/[+-]\d{2}:?\d{2}$/.test(e)){let t=e;if(/[zZ]$/.test(t))t=t.slice(0,-1)+"+00:00[UTC]";else{let r=/([+-]\d{2}:?\d{2})$/.exec(t);r&&(t=`${t}[${r[1]}]`)}return n.ZonedDateTime.from(t,{overflow:"reject"})}return n.PlainDateTime.from(e,{overflow:"reject"})}if(/^\d{4}-\d{2}-\d{2}/.test(e))return n.PlainDate.from(e,{overflow:"reject"});if(/^\d{2}:\d{2}/.test(e))return n.PlainTime.from(e);throw new Error(`temporal-fmt: parseISO("${e}") doesn't look like an ISO 8601 string.`)}catch(t){throw new ye({input:e,reason:t.message})}}function on(e){let n=e;if(typeof n?.toString!="function")throw new w({reason:`formatISO() expects a Temporal value with toString(), got ${typeof e}.`});return n.toString()}function wo(e){if(!/^(\d{4})-(\d{2})-(\d{2})[Tt](\d{2}):(\d{2}):(\d{2})(\.\d+)?([Zz]|[+-]\d{2}:\d{2})$/.exec(e))throw new w({input:e,reason:"does not match RFC 3339 date-time grammar"});let r=e.replace(/[tT]/,"T").replace(/[zZ]$/,"+00:00[UTC]");return De(r)}function vo(e){let n=on(e);if(!/^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]+)?(Z|[+-][0-9]{2}:[0-9]{2})$/.test(n))throw new w({input:n,reason:"value did not produce RFC 3339-compliant output"});return n}function bo(e){if(!/^(?:(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s+)?\d{1,2}\s+(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s+\d{2,4}\s+\d{2}:\d{2}(?::\d{2})?\s+(?:[+-]\d{4}|[A-Za-z]{1,5})$/.test(e.trim()))throw new w({input:e,reason:"not a valid RFC 2822 date"});let t=Date.parse(e);if(Number.isNaN(t))throw new w({input:e,reason:"not a valid RFC 2822 date"});return j().fromEpochMilliseconds(t)}function So(e){let n=e,t;if(typeof n?.toEpochMilliseconds=="function")t=n.toEpochMilliseconds();else if(typeof n?.epochMilliseconds=="number")t=n.epochMilliseconds;else if(typeof n?.toInstant=="function"){let r=n.toInstant();typeof r.epochMilliseconds=="number"&&(t=r.epochMilliseconds)}if(t===void 0)throw new w({reason:`formatRFC2822() expects a value with epochMilliseconds, toEpochMilliseconds(), or toInstant(), got ${typeof e}.`});return ko(t)}function ko(e){try{let t=new Intl.DateTimeFormat("en-US",{weekday:"short",day:"2-digit",month:"short",year:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZone:"UTC",timeZoneName:"shortOffset",hour12:!1}).formatToParts(new Date(e)),r=i=>t.find(m=>m.type===i)?.value??"",o=r("timeZoneName")?.match(/GMT([+-])(\d+)(?::(\d+))?/),s;if(o){let i=o[1],m=o[2].padStart(2,"0"),l=(o[3]??"0").padStart(2,"0");s=`${i}${m}${l}`;/* c8 ignore start @preserve -- timeZone is hardcoded to 'UTC' above,
28
28
  which always resolves cleanly, so shortOffset always returns a
29
29
  parseable "GMT+0"-shaped string in this environment's ICU. This
30
30
  branch only guards against an ICU build whose shortOffset output
@@ -39,21 +39,21 @@ import{a as Kt,b as Qt}from"./chunk-ZYVMZRMR.js";import{a as Sr,b as vr,c as kr,
39
39
  user input reaches the constructor or formatToParts call, so this
40
40
  catch can't be triggered through the public API in a normal Intl
41
41
  environment (e.g. Node with full-icu). Kept as a genuine fallback
42
- for runtimes with a broken or absent Intl implementation. */}catch{let n=new Date(e),t=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],r=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],o=t[n.getUTCDay()],a=String(n.getUTCDate()).padStart(2,"0"),s=r[n.getUTCMonth()],d=n.getUTCFullYear(),i=String(n.getUTCHours()).padStart(2,"0"),m=String(n.getUTCMinutes()).padStart(2,"0"),l=String(n.getUTCSeconds()).padStart(2,"0");return`${o}, ${a} ${s} ${d} ${i}:${m}:${l} +0000`}/* c8 ignore stop @preserve */}function go(e){let n=e.trim(),t=Date.parse(n);if(Number.isNaN(t))throw new S({input:e,reason:"not a valid HTTP-date"});return L().fromEpochMilliseconds(t)}function ho(e){let n=e?.toInstant?.()??e,t=typeof n=="object"&&n!==null&&"epochMilliseconds"in n?n.epochMilliseconds:(()=>{throw new S({reason:`formatHTTPDate() expects an Instant or ZonedDateTime, got ${typeof e}.`})})(),r=new Date(t),o=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],a=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],s=o[r.getUTCDay()],d=String(r.getUTCDate()).padStart(2,"0"),i=a[r.getUTCMonth()],m=r.getUTCFullYear(),l=String(r.getUTCHours()).padStart(2,"0"),y=String(r.getUTCMinutes()).padStart(2,"0"),h=String(r.getUTCSeconds()).padStart(2,"0");return`${s}, ${d} ${i} ${m} ${l}:${y}:${h} GMT`}function le(e){let n=e;if(typeof n?.toInstant=="function"){let t=n.toInstant();return typeof t.epochNanoseconds=="bigint"?{epochMilliseconds:t.epochMilliseconds,epochNanoseconds:t.epochNanoseconds}:{epochMilliseconds:t.epochMilliseconds,epochNanoseconds:BigInt(t.epochMilliseconds)*1000000n}}if(typeof n?.epochNanoseconds=="bigint")return{epochMilliseconds:Number(n.epochNanoseconds/1000000n),epochNanoseconds:n.epochNanoseconds};if(typeof n?.epochMilliseconds=="number")return{epochMilliseconds:n.epochMilliseconds,epochNanoseconds:BigInt(n.epochMilliseconds)*1000000n};throw new S({reason:`expected an Instant or ZonedDateTime, got ${typeof e}.`})}function L(){let e=H().Instant;if(!e)throw new Error("temporal-fmt: Temporal.Instant is not available in this implementation.");return e}function To(e){return L().fromEpochMilliseconds(e*1e3)}function wo(e){return L().fromEpochMilliseconds(e)}function bo(e){return L().fromEpochNanoseconds(BigInt(e)*1000n)}function So(e){return L().fromEpochNanoseconds(e)}function vo(e){return le(e).epochMilliseconds/1e3}function ko(e){return le(e).epochMilliseconds}function Mo(e){let{epochNanoseconds:n}=le(e);return Number(n/1000n)}function Do(e){return le(e).epochNanoseconds}function Eo(e){let n=e.trim();if(/^\d{4}-\d{2}-\d{2}$/.test(n))return X("yyyy-MM-dd",n);if(/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/.test(n))return X("yyyy-MM-dd HH:mm:ss",n);if(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/.test(n))return ve(n);throw new S({input:e,reason:"not a recognized SQL date/time format"})}function xo(e){return typeof e?.hour=="number"?N(e,"yyyy-MM-dd HH:mm:ss"):N(e,"yyyy-MM-dd")}var Ve={locale:I,numberingSystem:"latn",firstDayOfWeek:1,roundingMode:"nearest",disambiguation:"compatible",overflow:"reject",parseLenient:!1,durationShowZeroValues:!1};function Co(e={}){let n={...Ve,...e};if(typeof n.locale!="string"||n.locale.length===0)throw new Error(`temporal-fmt: config.locale must be a non-empty string (got ${String(n.locale)}).`);if(n.firstDayOfWeek!==1&&n.firstDayOfWeek!==7)throw new Error(`temporal-fmt: config.firstDayOfWeek must be 1 (Monday) or 7 (Sunday) (got ${n.firstDayOfWeek}).`);if(!["nearest","floor","ceil","trunc"].includes(n.roundingMode))throw new Error(`temporal-fmt: config.roundingMode "${n.roundingMode}" is not recognized.`);if(!["compatible","earlier","later","reject"].includes(n.disambiguation))throw new Error(`temporal-fmt: config.disambiguation "${n.disambiguation}" is not recognized.`);if(!["constrain","reject"].includes(n.overflow))throw new Error(`temporal-fmt: config.overflow "${n.overflow}" is not recognized.`);return Object.freeze(n)}function Ro(e,n){if(!e)return n;let t={...n};return t.locale===void 0&&(t.locale=e.locale),t.calendar===void 0&&e.calendar!==void 0&&(t.calendar=e.calendar),t.timezone===void 0&&e.timezone!==void 0&&(t.timezone=e.timezone),t.numberingSystem===void 0&&(t.numberingSystem=e.numberingSystem),t.lenient===void 0&&e.parseLenient&&(t.lenient=!0),t}var me=[];function Fo(e){if(typeof e.language!="string"||e.language.length===0)throw new Error("temporal-fmt: registerRelativeGrammar requires a non-empty language string.");if(!Array.isArray(e.matchers)||e.matchers.length===0)throw new Error("temporal-fmt: registerRelativeGrammar requires at least one matcher.");let n=me.findIndex(t=>t.language===e.language);n>=0?me[n]=e:me.push(e)}function $o(){return me.map(e=>e.language)}function Oo(e={}){let n=new Set(e.weekend??[6,7]),t=e.workingHours??{};for(let r=1;r<=7;r++)t[r]===void 0&&(t[r]=n.has(r)?0:8);return{weekend:n,holidays:e.holidays,workingHours:t,halfDays:new Set(e.halfDays??[])}}function de(e,n){let t=n,r=t.dayOfWeek;if(typeof t.year=="number"&&typeof t.month=="number"&&typeof t.day=="number"){let a=new Date(Date.UTC(t.year,t.month-1,t.day)).getUTCDay();r=a===0?7:a}if(typeof r!="number")throw new Error("temporal-fmt: isBusinessDay() needs a value with dayOfWeek (or year/month/day to compute it).");return!(e.weekend.has(r)||e.holidays&&e.holidays.isHoliday(n))}function nn(e,n){let t=w(n,1,"days");for(let r=0;r<14;r++){if(de(e,t))return t;t=w(t,1,"days")}throw new Error("temporal-fmt: nextBusinessDay() gave up after 14 days \u2014 likely a misconfigured calendar (e.g. all days are weekends or holidays).")}function tn(e,n){let t=w(n,-1,"days");for(let r=0;r<14;r++){if(de(e,t))return t;t=w(t,-1,"days")}throw new Error("temporal-fmt: previousBusinessDay() gave up after 14 days \u2014 likely a misconfigured calendar.")}var ue=1e5;function rn(e){if(!Number.isSafeInteger(e))throw new RangeError(`temporal-fmt: business-day count must be a finite safe integer (got ${e}).`)}function en(e,n){let t=e,r=n,o=t.year*1e4+t.month*100+t.day,a=r.year*1e4+r.month*100+r.day;return o-a}function on(e,n,t){if(rn(t),t===0)return n;let r=t>0?1:-1,o=Math.abs(t);if(o>ue)throw new RangeError(`temporal-fmt: addBusinessDays() exceeded the ${ue}-day limit.`);let a=n;for(let s=0;s<o;s++)a=r>0?nn(e,a):tn(e,a);return a}function Ao(e,n,t){return rn(t),on(e,n,-t)}function Po(e,n,t){let r=en(t,n);if(r===0)return 0;let o=r>0?1:-1,a=n,s=0,d=0;for(;en(a,t)!==0;){if(a=w(a,o,"days"),d++,d>ue)throw new RangeError(`temporal-fmt: differenceInBusinessDays() exceeded the ${ue}-day traversal limit.`);de(e,a)&&(s+=o)}return s}function zo(e){let n=new Map;function t(r){let o=n.get(r);return o||(o=e.map(a=>{let s;return a.compute?s=a.compute(r):s={month:a.month,day:a.day},{...s,name:a.name}}),n.set(r,o),o)}return{isHoliday(r){let o=r;if(typeof o.year!="number"||typeof o.month!="number"||typeof o.day!="number")throw new Error("temporal-fmt: isHoliday() needs a value with year/month/day.");return t(o.year).some(s=>s.month===o.month&&s.day===o.day)},holidaysBetween(r,o){let a=r,s=o,d=[];for(let i=a.year;i<=s.year;i++){let m=t(i);for(let l of m){let y={year:i,month:l.month,day:l.day};q(y,a)>=0&&q(y,s)<=0&&d.push({year:i,month:l.month,day:l.day})}}return d}}}function Io(e,n){let t=w(n,1,"days");for(let r=0;r<365*5;r++){if(e.isHoliday(t))return t;t=w(t,1,"days")}}function No(e,n){let t=w(n,-1,"days");for(let r=0;r<365*5;r++){if(e.isHoliday(t))return t;t=w(t,-1,"days")}}function _o(e,n,t){return e.holidaysBetween(n,t)}function Lo(e={}){let n=[...Y],t=new Set;for(let i of e.tokens??[])t.add(i.name);for(let i of e.tokens??[]){let m=n.findIndex(([l])=>l===i.name);m>=0?n[m]=[i.name,i.handler,i.field]:n.push([i.name,i.handler,i.field])}n.sort((i,m)=>m[0].length-i[0].length);let r=new Map(n.map(([i,m,l])=>[i,{handler:m,field:l}])),o=n.map(([i])=>i);function a(i){let m=[],l=0;for(;l<i.length;){let y=i[l];if(y==="'"){if(i[l+1]==="'"){s(m,"'"),l+=2;continue}let c=l+1,f="",g=!1;for(;c<i.length;){if(i[c]==="'"){if(i[c+1]==="'"){f+="'",c+=2;continue}g=!0,c+=1;break}f+=i[c],c+=1}if(!g)throw new Error(`temporal-fmt: unterminated quote in format string "${i}"`);s(m,f),l=c;continue}let h=o.find(c=>i.startsWith(c,l));if(h){m.push({kind:"token",value:h}),l+=h.length;continue}s(m,y),l+=1}return m}function s(i,m){let l=i[i.length-1];l&&l.kind==="literal"?l.value+=m:i.push({kind:"literal",value:m})}let d=e.defaultLocale??I;return{format(i,m,l={}){if(m.length>1e3)throw new Error(`temporal-fmt: format string exceeds maximum length of ${1e3} characters (got ${m.length}).`);let y=l.locale??d,h=a(m),c="";for(let f of h){if(f.kind==="literal"){c+=f.value;continue}let g=r.get(f.value);/* c8 ignore start @preserve -- unreachable: customTokenize only ever produces a
42
+ for runtimes with a broken or absent Intl implementation. */}catch{let n=new Date(e),t=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],r=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],a=t[n.getUTCDay()],o=String(n.getUTCDate()).padStart(2,"0"),s=r[n.getUTCMonth()],d=n.getUTCFullYear(),i=String(n.getUTCHours()).padStart(2,"0"),m=String(n.getUTCMinutes()).padStart(2,"0"),l=String(n.getUTCSeconds()).padStart(2,"0");return`${a}, ${o} ${s} ${d} ${i}:${m}:${l} +0000`}/* c8 ignore stop @preserve */}function Mo(e){let n=e.trim(),t=Date.parse(n);if(Number.isNaN(t))throw new w({input:e,reason:"not a valid HTTP-date"});return j().fromEpochMilliseconds(t)}function Do(e){let n=e?.toInstant?.()??e,t=typeof n=="object"&&n!==null&&"epochMilliseconds"in n?n.epochMilliseconds:(()=>{throw new w({reason:`formatHTTPDate() expects an Instant or ZonedDateTime, got ${typeof e}.`})})(),r=new Date(t),a=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],o=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],s=a[r.getUTCDay()],d=String(r.getUTCDate()).padStart(2,"0"),i=o[r.getUTCMonth()],m=r.getUTCFullYear(),l=String(r.getUTCHours()).padStart(2,"0"),T=String(r.getUTCMinutes()).padStart(2,"0"),y=String(r.getUTCSeconds()).padStart(2,"0");return`${s}, ${d} ${i} ${m} ${l}:${T}:${y} GMT`}function ue(e){let n=e;if(typeof n?.toInstant=="function"){let t=n.toInstant();return typeof t.epochNanoseconds=="bigint"?{epochMilliseconds:t.epochMilliseconds,epochNanoseconds:t.epochNanoseconds}:{epochMilliseconds:t.epochMilliseconds,epochNanoseconds:BigInt(t.epochMilliseconds)*1000000n}}if(typeof n?.epochNanoseconds=="bigint")return{epochMilliseconds:Number(n.epochNanoseconds/1000000n),epochNanoseconds:n.epochNanoseconds};if(typeof n?.epochMilliseconds=="number")return{epochMilliseconds:n.epochMilliseconds,epochNanoseconds:BigInt(n.epochMilliseconds)*1000000n};throw new w({reason:`expected an Instant or ZonedDateTime, got ${typeof e}.`})}function j(){let e=A().Instant;if(!e)throw new Error("temporal-fmt: Temporal.Instant is not available in this implementation.");return e}function Eo(e){return ue(e).epochMilliseconds/1e3}function xo(e){return j().fromEpochMilliseconds(e*1e3)}function Co(e){return j().fromEpochMilliseconds(e)}function Ro(e){return j().fromEpochNanoseconds(BigInt(e)*1000n)}function Fo(e){return j().fromEpochNanoseconds(e)}function $o(e){return ue(e).epochMilliseconds}function Io(e){let{epochNanoseconds:n}=ue(e);return Number(n/1000n)}function Ao(e){return ue(e).epochNanoseconds}function Oo(e){let n=e.trim();if(/^\d{4}-\d{2}-\d{2}$/.test(n))return K("yyyy-MM-dd",n);if(/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/.test(n))return K("yyyy-MM-dd HH:mm:ss",n);if(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/.test(n))return De(n);throw new w({input:e,reason:"not a recognized SQL date/time format"})}function Po(e){return typeof e?.hour=="number"?L(e,"yyyy-MM-dd HH:mm:ss"):L(e,"yyyy-MM-dd")}var an={locale:_,numberingSystem:"latn",firstDayOfWeek:1,roundingMode:"nearest",disambiguation:"compatible",overflow:"reject",parseLenient:!1,durationShowZeroValues:!1};function zo(e={}){let n={...an,...e};if(typeof n.locale!="string"||n.locale.length===0)throw new Error(`temporal-fmt: config.locale must be a non-empty string (got ${String(n.locale)}).`);if(n.firstDayOfWeek!==1&&n.firstDayOfWeek!==7)throw new Error(`temporal-fmt: config.firstDayOfWeek must be 1 (Monday) or 7 (Sunday) (got ${n.firstDayOfWeek}).`);if(!["nearest","floor","ceil","trunc"].includes(n.roundingMode))throw new Error(`temporal-fmt: config.roundingMode "${n.roundingMode}" is not recognized.`);if(!["compatible","earlier","later","reject"].includes(n.disambiguation))throw new Error(`temporal-fmt: config.disambiguation "${n.disambiguation}" is not recognized.`);if(!["constrain","reject"].includes(n.overflow))throw new Error(`temporal-fmt: config.overflow "${n.overflow}" is not recognized.`);return Object.freeze(n)}function No(e,n){if(!e)return n;let t={...n};return t.locale===void 0&&(t.locale=e.locale),t.calendar===void 0&&e.calendar!==void 0&&(t.calendar=e.calendar),t.timezone===void 0&&e.timezone!==void 0&&(t.timezone=e.timezone),t.numberingSystem===void 0&&(t.numberingSystem=e.numberingSystem),t.lenient===void 0&&e.parseLenient&&(t.lenient=!0),t}function _o(e={}){let n=new Set(e.weekend??[6,7]),t={...e.workingHours??{}};for(let r=1;r<=7;r++)t[r]===void 0&&(t[r]=n.has(r)?0:8);return{weekend:n,holidays:e.holidays,workingHours:t,halfDays:new Set(e.halfDays??[])}}function ce(e,n){let t=n,r=t.dayOfWeek;if(typeof t.year=="number"&&typeof t.month=="number"&&typeof t.day=="number"){let o=new Date(Date.UTC(t.year,t.month-1,t.day)).getUTCDay();r=o===0?7:o}if(typeof r!="number")throw new Error("temporal-fmt: isBusinessDay() needs a value with dayOfWeek (or year/month/day to compute it).");return!(e.weekend.has(r)||e.holidays&&e.holidays.isHoliday(n))}function ln(e,n){let t=v(n,1,"days");for(let r=0;r<14;r++){if(ce(e,t))return t;t=v(t,1,"days")}throw new Error("temporal-fmt: nextBusinessDay() gave up after 14 days \u2014 likely a misconfigured calendar (e.g. all days are weekends or holidays).")}function mn(e,n){let t=v(n,-1,"days");for(let r=0;r<14;r++){if(ce(e,t))return t;t=v(t,-1,"days")}throw new Error("temporal-fmt: previousBusinessDay() gave up after 14 days \u2014 likely a misconfigured calendar.")}var de=1e5;function un(e){if(!Number.isSafeInteger(e))throw new RangeError(`temporal-fmt: business-day count must be a finite safe integer (got ${e}).`)}function sn(e,n){let t=e,r=n,a=t.year*1e4+t.month*100+t.day,o=r.year*1e4+r.month*100+r.day;return a-o}function dn(e,n,t){if(un(t),t===0)return n;let r=t>0?1:-1,a=Math.abs(t);if(a>de)throw new RangeError(`temporal-fmt: addBusinessDays() exceeded the ${de}-day limit.`);let o=n;for(let s=0;s<a;s++)o=r>0?ln(e,o):mn(e,o);return o}function Lo(e,n,t){return un(t),dn(e,n,-t)}function Ho(e,n,t){let r=sn(t,n);if(r===0)return 0;let a=r>0?1:-1,o=n,s=0,d=0;for(;sn(o,t)!==0;){if(o=v(o,a,"days"),d++,d>de)throw new RangeError(`temporal-fmt: differenceInBusinessDays() exceeded the ${de}-day traversal limit.`);ce(e,o)&&(s+=a)}return s}var cn=5e3;function Uo(e){let n=new Map;function t(r){let a=n.get(r);return a||(a=e.map(o=>{let s;return o.compute?s=o.compute(r):s={month:o.month,day:o.day},{...s,name:o.name}}),n.set(r,a),a)}return{isHoliday(r){let a=r;if(typeof a.year!="number"||typeof a.month!="number"||typeof a.day!="number")throw new Error("temporal-fmt: isHoliday() needs a value with year/month/day.");return t(a.year).some(s=>s.month===a.month&&s.day===a.day)},holidaysBetween(r,a){let o=r,s=a;if(typeof o?.year!="number"||typeof s?.year!="number")throw new Error("temporal-fmt: holidaysBetween() needs start/end values with year/month/day.");if(s.year-o.year>cn)throw new RangeError(`temporal-fmt: holidaysBetween() year range (${o.year}\u2013${s.year}) exceeds the ${cn}-year limit. Split the query into smaller ranges.`);let d=[];for(let i=o.year;i<=s.year;i++){let m=t(i);for(let l of m){let T={year:i,month:l.month,day:l.day};J(T,o)>=0&&J(T,s)<=0&&d.push({year:i,month:l.month,day:l.day})}}return d}}}function jo(e,n){let t=v(n,1,"days");for(let r=0;r<365*5;r++){if(e.isHoliday(t))return t;t=v(t,1,"days")}}function Go(e,n){let t=v(n,-1,"days");for(let r=0;r<365*5;r++){if(e.isHoliday(t))return t;t=v(t,-1,"days")}}function Zo(e,n,t){return e.holidaysBetween(n,t)}function Wo(e={}){let n=[...X],t=new Set;for(let i of e.tokens??[])t.add(i.name);for(let i of e.tokens??[]){let m=n.findIndex(([l])=>l===i.name);m>=0?n[m]=[i.name,i.handler,i.field]:n.push([i.name,i.handler,i.field])}n.sort((i,m)=>m[0].length-i[0].length);let r=new Map(n.map(([i,m,l])=>[i,{handler:m,field:l}])),a=n.map(([i])=>i);function o(i){let m=[],l=0;for(;l<i.length;){let T=i[l];if(T==="'"){if(i[l+1]==="'"){s(m,"'"),l+=2;continue}let f=l+1,c="",g=!1;for(;f<i.length;){if(i[f]==="'"){if(i[f+1]==="'"){c+="'",f+=2;continue}g=!0,f+=1;break}c+=i[f],f+=1}if(!g)throw new Error(`temporal-fmt: unterminated quote in format string "${i}"`);s(m,c),l=f;continue}let y=a.find(f=>i.startsWith(f,l));if(y){let f=y[y.length-1];if(i[l+y.length]===f){let c=l+y.length;for(;i[c]===f;)c+=1;throw new pe({token:i.slice(l,c),format:i,message:`temporal-fmt: "${i.slice(l,c)}" in format string "${i}" isn't a recognized token \u2014 did you mean "${y}"?`})}m.push({kind:"token",value:y}),l+=y.length;continue}s(m,T),l+=1}return m}function s(i,m){let l=i[i.length-1];l&&l.kind==="literal"?l.value+=m:i.push({kind:"literal",value:m})}let d=e.defaultLocale??_;return{format(i,m,l={}){if(m.length>1e3)throw new Error(`temporal-fmt: format string exceeds maximum length of ${1e3} characters (got ${m.length}).`);let T=l.locale??d,y=o(m),f="";for(let c of y){if(c.kind==="literal"){f+=c.value;continue}let g=r.get(c.value);/* c8 ignore start @preserve -- unreachable: customTokenize only ever produces a
43
43
  `kind: 'token'` piece via sortedTokenStrings.find(...), and
44
44
  handlerByToken is built from that same mergedTokens array, so
45
45
  every token piece is guaranteed a handler entry. Guards against a
46
- future customTokenize change that decouples the two lookups. */if(!g)throw new Error(`temporal-fmt: unknown token "${f.value}"`);/* c8 ignore stop @preserve */if(i[g.field]===void 0)throw new Error(`temporal-fmt: token "${f.value}" requires "${String(g.field)}", which this Temporal object doesn't have.`);c+=g.handler(i,y)}return c},formatToParts(i,m,l={}){if(m.length>1e3)throw new Error(`temporal-fmt: format string exceeds maximum length of ${1e3} characters (got ${m.length}).`);let y=l.locale??d,h=a(m),c=[];for(let f of h){if(f.kind==="literal"){let D=c[c.length-1];/* c8 ignore start @preserve -- unreachable: customTokenize's own
46
+ future customTokenize change that decouples the two lookups. */if(!g)throw new Error(`temporal-fmt: unknown token "${c.value}"`);/* c8 ignore stop @preserve */if(i[g.field]===void 0)throw new Error(`temporal-fmt: token "${c.value}" requires "${String(g.field)}", which this Temporal object doesn't have.`);f+=g.handler(i,T)}return f},formatToParts(i,m,l={}){if(m.length>1e3)throw new Error(`temporal-fmt: format string exceeds maximum length of ${1e3} characters (got ${m.length}).`);let T=l.locale??d,y=o(m),f=[];for(let c of y){if(c.kind==="literal"){let D=f[f.length-1];/* c8 ignore start @preserve -- unreachable: customTokenize's own
47
47
  appendLiteral() already merges adjacent literal chars/quoted
48
48
  spans into a single piece before this loop ever sees them, so
49
49
  two literal pieces are never adjacent here. Kept as a guard
50
- against a future customTokenize change that stops merging. */D&&D.type==="literal"?D.value+=f.value:c.push({type:"literal",value:f.value});continue}let g=r.get(f.value);/* c8 ignore start @preserve -- unreachable: customTokenize only emits
50
+ against a future customTokenize change that stops merging. */D&&D.type==="literal"?D.value+=c.value:f.push({type:"literal",value:c.value});continue}let g=r.get(c.value);/* c8 ignore start @preserve -- unreachable: customTokenize only emits
51
51
  kind:'token' pieces found in sortedTokenStrings, the same array
52
52
  handlerByToken is built from, so every token piece is guaranteed
53
- a handler entry. Guards against future decoupling of the two. */if(!g)throw new Error(`temporal-fmt: unknown token "${f.value}"`);/* c8 ignore stop @preserve */if(i[g.field]===void 0)throw new Error(`temporal-fmt: token "${f.value}" requires "${String(g.field)}".`);c.push({type:"token",value:g.handler(i,y),token:f.value})}return c},compileFormat(i){if(i.length>1e3)throw new Error(`temporal-fmt: format string exceeds maximum length of ${1e3} characters (got ${i.length}).`);let m=a(i);return{formatStr:i,pieces:m.map(l=>l),format(l,y={}){let h=y.locale??d,c="";for(let f of m){if(f.kind==="literal"){c+=f.value;continue}let g=r.get(f.value);/* c8 ignore start @preserve -- unreachable, see the same guard's comment
54
- above in the un-compiled format(). */if(!g)throw new Error(`temporal-fmt: unknown token "${f.value}"`);/* c8 ignore stop @preserve */if(l[g.field]===void 0)throw new Error(`temporal-fmt: token "${f.value}" requires "${String(g.field)}".`);c+=g.handler(l,h)}return c},formatToParts(l,y={}){let h=y.locale??d,c=[];for(let f of m){if(f.kind==="literal"){let D=c[c.length-1];/* c8 ignore start @preserve -- unreachable, see the same guard's
55
- comment above in the un-compiled formatToParts. */D&&D.type==="literal"?D.value+=f.value:c.push({type:"literal",value:f.value});continue}let g=r.get(f.value);/* c8 ignore start @preserve -- unreachable, see the same guard's
56
- comment above in the un-compiled formatToParts. */if(!g)throw new Error(`temporal-fmt: unknown token "${f.value}"`);/* c8 ignore stop @preserve */if(l[g.field]===void 0)throw new Error(`temporal-fmt: token "${f.value}" requires "${String(g.field)}".`);c.push({type:"token",value:g.handler(l,h),token:f.value})}return c}}}}}function Ho(e){return/^y+$/.test(e)?"Year":/^[ML]+$/.test(e)?"Month":/^[decD]+$/.test(e)?"Day":/^[Ec]+$/.test(e)?"Weekday":/^[Qq]+$/.test(e)?"Quarter":/^[Gg]+$/.test(e)?"Era":/^[Hh]+$/.test(e)?"Hour":/^m+$/.test(e)?"Minute":/^s+$/.test(e)?"Second":/^S+$/.test(e)?"Fractional Second":e==="a"?"Day Period":e==="zzz"?"Time Zone":/^[Xx]+$/.test(e)?"UTC Offset":e==="do"?"Ordinal Day":e==="ww"||e==="RRRR"?"ISO Week":"Other"}function Uo(){return se.map(e=>{let n=C[e];return{label:e,detail:n.meaning,documentation:[n.meaning,"",`Format-capable: ${n.formatCapable}`,`Parse-capable: ${n.parseCapable}`,`Locale-sensitive: ${n.localeSensitive}`,`Calendar-sensitive: ${n.calendarSensitive}`,`Timezone-sensitive: ${n.timezoneSensitive}`,`Round-trip safe: ${n.roundTripSafe}`,`Supported types: ${n.supportedTypes.join(", ")}`].join(`
57
- `),family:Ho(e)}})}function jo(){let e={};for(let n of se){let t=C[n];e[n]={signature:n,summary:t.meaning,details:[`Format-capable: ${t.formatCapable?"yes":"no"}`,`Parse-capable: ${t.parseCapable?"yes":"no"}`,`Locale-sensitive: ${t.localeSensitive?"yes":"no"}`,`Calendar-sensitive: ${t.calendarSensitive?"yes":"no"}`,`Timezone-sensitive: ${t.timezoneSensitive?"yes":"no"}`,`Round-trip safe: ${t.roundTripSafe?"yes":"no"}`,`Supported types: ${t.supportedTypes.join(", ")}`].join(`
58
- `)}}return e}function Go(e){let n=G(e),t=[];for(let r of n.warnings){let o=r.message,a;r.code==="TWELVE_HOUR_WITHOUT_A"?a='Add an "a" token (e.g. "h:mm a") or use "H:mm" for 24-hour.':r.code==="MIXED_12_AND_24_HOUR"?a='Pick one form: "HH:mm" for 24-hour or "h:mm a" for 12-hour.':r.code==="AMBIGUOUS_NUMERIC_RUN"?a='Add a separator or use padded forms (e.g. "MM" instead of "M").':r.code==="FORMAT_ONLY_TOKEN"&&(a='Use a parse-capable variant (e.g. "d" instead of "do").'),t.push({startColumn:0,endColumn:e.length,severity:"warning",message:o,code:r.code,suggestion:a})}return t}var ke=[{from:"YYYY",to:"yyyy"},{from:"YY",to:"yy"},{from:"MMMM",to:"MMMM"},{from:"MMM",to:"MMM"},{from:"MM",to:"MM"},{from:"M",to:"M"},{from:"DD",to:"dd"},{from:"D",to:"d"},{from:"Do",to:null,notes:`Ordinal day (AdvancedFormat) \u2014 use temporal-fmt's own "do" token instead.`},{from:"dddd",to:"EEEE"},{from:"ddd",to:"EEE"},{from:"dd",to:null,notes:'Min-name weekday (e.g. "Tu") \u2014 temporal-fmt has no equivalent width.'},{from:"d",to:null,notes:'Numeric weekday (0-6) \u2014 no temporal-fmt equivalent; not the same as "d" here, which is day-of-month.'},{from:"HH",to:"HH"},{from:"H",to:"H"},{from:"hh",to:"hh"},{from:"h",to:"h"},{from:"kk",to:null,notes:"Hour 1-24 (AdvancedFormat) \u2014 no temporal-fmt equivalent."},{from:"k",to:null,notes:"Hour 1-24 (AdvancedFormat) \u2014 no temporal-fmt equivalent."},{from:"mm",to:"mm"},{from:"m",to:"m"},{from:"ss",to:"ss"},{from:"s",to:"s"},{from:"SSS",to:"SSS"},{from:"A",to:"a",notes:"Uppercase AM/PM in Day.js \u2014 temporal-fmt is always lowercase."},{from:"a",to:"a"},{from:"ZZ",to:"XX",notes:"Numeric UTC offset, no colon."},{from:"Z",to:"XXX",notes:"Numeric UTC offset with colon."},{from:"X",to:null,notes:"Unix timestamp (seconds) \u2014 use fromUnixSeconds() instead."},{from:"x",to:null,notes:"Unix timestamp (ms) \u2014 use fromUnixMilliseconds() instead."},{from:"Qo",to:null,notes:"Ordinal quarter (AdvancedFormat) \u2014 no temporal-fmt equivalent."},{from:"Q",to:"Q"},{from:"Mo",to:null,notes:"Ordinal month (AdvancedFormat) \u2014 no temporal-fmt equivalent."},{from:"ww",to:"ww"},{from:"wo",to:null,notes:"Ordinal ISO week (AdvancedFormat) \u2014 no temporal-fmt equivalent."},{from:"w",to:null,notes:`Unpadded ISO week \u2014 temporal-fmt's "ww" is always 2-digit.`},{from:"gggg",to:"RRRR",notes:"Week-numbering year, not the calendar year \u2014 same caveat as temporal-fmt's RRRR."},{from:"L",to:null,notes:"Localized date format (AdvancedFormat) \u2014 write the format string out explicitly."},{from:"LL",to:null,notes:"Localized date format (AdvancedFormat) \u2014 write the format string out explicitly."},{from:"LLL",to:null,notes:"Localized date format (AdvancedFormat) \u2014 write the format string out explicitly."},{from:"LLLL",to:null,notes:"Localized date format (AdvancedFormat) \u2014 write the format string out explicitly."},{from:"LT",to:null,notes:"Localized time format (AdvancedFormat) \u2014 write the format string out explicitly."},{from:"LTS",to:null,notes:"Localized time format (AdvancedFormat) \u2014 write the format string out explicitly."}],Me=[{from:"yyyy",to:"yyyy"},{from:"yy",to:"yy"},{from:"y",to:null,notes:'Unpadded calendar year, opt-in via useAdditionalWeekYearTokens \u2014 temporal-fmt has no unpadded-year token; use "yyyy".'},{from:"MMMM",to:"MMMM"},{from:"MMM",to:"MMM"},{from:"MM",to:"MM"},{from:"M",to:"M"},{from:"LLLL",to:"LLLL"},{from:"LLL",to:"LLL"},{from:"dd",to:"dd"},{from:"d",to:"d"},{from:"do",to:"do"},{from:"DDD",to:"DDD"},{from:"DD",to:"DD"},{from:"D",to:"D",notes:`Day-of-year, opt-in via useAdditionalDayOfYearTokens \u2014 matches temporal-fmt's own "D" already.`},{from:"EEEE",to:"EEEE"},{from:"EEE",to:"EEE"},{from:"eeee",to:null,notes:"Locale-aware numeric weekday \u2014 no temporal-fmt equivalent."},{from:"cccc",to:"cccc"},{from:"ccc",to:"ccc"},{from:"HH",to:"HH"},{from:"H",to:"H"},{from:"hh",to:"hh"},{from:"h",to:"h"},{from:"mm",to:"mm"},{from:"m",to:"m"},{from:"ss",to:"ss"},{from:"s",to:"s"},{from:"SSS",to:"SSS"},{from:"a",to:"a"},{from:"aaa",to:"a"},{from:"XXX",to:"XXX"},{from:"XX",to:"XX"},{from:"X",to:"X",notes:`Opt-in via useAdditionalDayOfYearTokens-adjacent rules in date-fns v3+; matches temporal-fmt's own "X" already.`},{from:"xxx",to:"xxx"},{from:"xx",to:"xx"},{from:"x",to:"x"},{from:"zzzz",to:"zzzz"},{from:"zzz",to:"zzz"},{from:"z",to:"z"},{from:"QQQ",to:"QQQ"},{from:"Q",to:"Q"},{from:"GGGG",to:"GGGG"},{from:"GGG",to:null,notes:'Abbreviated era \u2014 temporal-fmt only has "G" (short) and "GGGG" (long).'},{from:"GG",to:null,notes:'Abbreviated era \u2014 temporal-fmt only has "G" (short) and "GGGG" (long).'},{from:"G",to:"G"},{from:"ww",to:"ww"},{from:"w",to:null,notes:`Unpadded local week number \u2014 temporal-fmt's "ww" is ISO-week and always 2-digit.`},{from:"RRRR",to:"RRRR"},{from:"R",to:null,notes:`Unpadded ISO week-numbering year \u2014 temporal-fmt's "RRRR" is always 4-digit.`},{from:"Y",to:null,notes:'Week-numbering year (locale week rules), opt-in \u2014 no temporal-fmt equivalent; "RRRR" is ISO week-numbering, a different rule set.'},{from:"PPPP",to:null,notes:"Localized composite format \u2014 write the format string out explicitly."},{from:"PPP",to:null,notes:"Localized composite format \u2014 write the format string out explicitly."},{from:"PP",to:null,notes:"Localized composite format \u2014 write the format string out explicitly."},{from:"P",to:null,notes:"Localized composite format \u2014 write the format string out explicitly."},{from:"pppp",to:null,notes:"Localized composite format \u2014 write the format string out explicitly."},{from:"ppp",to:null,notes:"Localized composite format \u2014 write the format string out explicitly."},{from:"pp",to:null,notes:"Localized composite format \u2014 write the format string out explicitly."},{from:"p",to:null,notes:"Localized composite format \u2014 write the format string out explicitly."}];function Zo(e,n){return N(n??{year:2026,month:8,day:4,hour:15,minute:45,second:30,millisecond:123,dayOfWeek:2,timeZoneId:"UTC",offset:"+00:00",calendarId:"iso8601"},e,{locale:"en-US"})}function Wo(e){return"README.md#token-reference"}function Yo(e){let n=[],t=0;for(;t<e.length;)if(e[t]==="["){let r=e.indexOf("]",t+1);if(r===-1){n.push({kind:"token",value:e.slice(t)});break}n.push({kind:"literal",value:e.slice(t+1,r)}),t=r+1}else{let r=t;for(;r<e.length&&e[r]!=="[";)r+=1;n.push({kind:"token",value:e.slice(t,r)}),t=r}return n}function Bo(e,n){let t=[],r=0;for(;r<e.length;){let o=n.find(s=>e.startsWith(s,r));if(o){t.push({kind:"token",value:o}),r+=o.length;continue}let a=t[t.length-1];a&&a.kind==="literal"?a.value+=e[r]:t.push({kind:"literal",value:e[r]}),r+=1}return t}function an(e,n,t){let r=new Map(n.map(d=>[d.from,d.to])),o=[...r.keys()].sort((d,i)=>i.length-d.length),a=Yo(e),s="";for(let d of a){if(d.kind==="literal"){s+=`'${d.value.replace(/'/g,"''")}'`;continue}for(let i of Bo(d.value,o))if(i.kind==="token"){let m=r.get(i.value);if(m==null)throw new Error(`temporal-fmt: "${i.value}" has no ${t} -> temporal-fmt mapping (in format string "${e}"). Write the equivalent temporal-fmt token in by hand, or wrap it in brackets if it was meant as literal text.`);s+=m}else/[a-zA-Z]/.test(i.value)?s+=`'${i.value.replace(/'/g,"''")}'`:s+=i.value}return s}function Xo(e){return an(e,ke,"Day.js")}function qo(e){return an(e,Me,"date-fns")}export{se as ALL_TOKEN_NAMES,zn as AmbiguousInputError,Me as DATE_FNS_TO_TEMPORAL_FMT,ke as DAYJS_TO_TEMPORAL_FMT,Ve as DEFAULT_CONFIG,tt as FORMAT_ONLY_TOKENS,S as FormatSyntaxError,Pn as InvalidCalendarError,ce as InvalidDateError,Nn as InvalidDurationError,In as InvalidLocaleError,On as InvalidOffsetError,$n as InvalidTimeError,An as InvalidTimeZoneError,Fn as ParseMismatchError,qn as SUPPORTED_NUMBERING_SYSTEMS,C as TOKEN_METADATA,Cn as TemporalFmtError,Rn as UnknownTokenError,w as add,on as addBusinessDays,dt as addDays,Bn as addDuration,ft as addHours,yt as addMilliseconds,ct as addMinutes,mt as addMonths,pt as addSeconds,ut as addWeeks,lt as addYears,G as analyzeFormat,Jn as applyNumbering,Vn as applyParseNumbering,vn as asDateFieldView,ro as assertDuration,Kr as assertInstant,Qr as assertPlainDate,Vr as assertPlainDateTime,to as assertPlainMonthDay,Jr as assertPlainTime,no as assertPlainYearMonth,qr as assertTemporal,eo as assertZonedDateTime,Zn as balanceDuration,Tr as between,Dn as ceil,_t as clamp,q as compare,Yn as compareDuration,nt as compileFormat,it as compileParser,Kn as convertDigits,Qn as convertDigitsToAscii,Oo as createBusinessCalendar,Co as createConfig,Lo as createFormatter,zo as createHolidayCalendar,pn as dayOfYear,mn as daysInMonth,un as daysInYear,Mt as difference,Po as differenceInBusinessDays,Ct as differenceInDays,Rt as differenceInHours,Ot as differenceInMilliseconds,Ft as differenceInMinutes,Et as differenceInMonths,$t as differenceInSeconds,xt as differenceInWeeks,Dt as differenceInYears,Sn as endOf,io as explainFormat,mo as fieldForToken,Mn as floor,N as format,Oe as formatDistance,Ir as formatDistanceToNow,Ln as formatDuration,Hn as formatDurationToParts,ho as formatHTTPDate,Je as formatISO,jn as formatISODuration,po as formatRFC2822,fo as formatRFC3339,br as formatRRule,cr as formatRange,pr as formatRangeToParts,Kt as formatRelative,Qt as formatRelativeToNow,xo as formatSQL,et as formatToParts,bo as fromUnixMicroseconds,wo as fromUnixMilliseconds,So as fromUnixNanoseconds,To as fromUnixSeconds,Uo as getAutocompleteData,Wo as getDocUrl,jo as getHoverDocs,Go as getInlineDiagnostics,Vt as getLocale,Tn as getMonth,Er as getNextTransition,kr as getOffset,Mr as getOffsetNanoseconds,xr as getPreviousTransition,hn as getQuarter,vr as getTimeZone,Cr as getTransitions,wn as getWeekday,er as hasLocale,_o as holidaysBetween,sr as intersection,or as intersects,nr as interval,tr as intervalContains,mr as intervalDifference,ir as intervalIsAfter,ar as intervalIsBefore,ur as intervalSubtract,zt as isAfter,Pt as isBefore,Lt as isBetween,de as isBusinessDay,Dr as isDST,qe as isDuration,At as isEqual,Ye as isInstant,cn as isLeapMonth,fn as isLeapYear,je as isPlainDate,Ze as isPlainDateTime,Xe as isPlainMonthDay,Ge as isPlainTime,Be as isPlainYearMonth,Ht as isSameDay,Wt as isSameMonth,Yt as isSameQuarter,Zt as isSameWeek,Bt as isSameYear,Ke as isTemporal,Ut as isToday,jt as isTomorrow,so as isValidFormat,qt as isWeekday,Xt as isWeekend,Gt as isYesterday,We as isZonedDateTime,$o as listRegisteredGrammars,Qe as listTokens,Nt as max,dr as mergeIntervals,Ro as mergeWithConfig,It as min,dn as monthsInYear,nn as nextBusinessDay,Io as nextHoliday,rr as overlaps,X as parse,Gn as parseDuration,go as parseHTTPDate,ve as parseISO,Un as parseISODuration,co as parseRFC2822,uo as parseRFC3339,wr as parseRRule,Br as parseRelative,Eo as parseSQL,at as parseToParts,Rr as possibleInstantsFor,Zo as previewFormat,tn as previousBusinessDay,No as previousHoliday,yr as recurrence,Jt as registerLocale,_n as registerLocaleVocab,Fo as registerRelativeGrammar,Sr as resolveZoned,kn as round,Ce as roundDuration,Ce as roundDurationAlias,rt as safeParse,xn as setTemporal,hr as skip,fr as splitInterval,bn as startOf,st as subtract,Ao as subtractBusinessDays,wt as subtractDays,Xn as subtractDuration,bt as subtractHours,kt as subtractMilliseconds,St as subtractMinutes,ht as subtractMonths,vt as subtractSeconds,Tt as subtractWeeks,gt as subtractYears,gr as take,Mo as toUnixMicroseconds,ko as toUnixMilliseconds,Do as toUnixNanoseconds,vo as toUnixSeconds,ao as tokenInfo,oo as tokenizeFormat,Wn as totalDuration,qo as translateDateFnsFormatString,Xo as translateDayjsFormatString,En as truncate,ot as tryParse,lr as union,lo as validateFormat,yn as weekOfYear,gn as weekYear};
53
+ a handler entry. Guards against future decoupling of the two. */if(!g)throw new Error(`temporal-fmt: unknown token "${c.value}"`);/* c8 ignore stop @preserve */if(i[g.field]===void 0)throw new Error(`temporal-fmt: token "${c.value}" requires "${String(g.field)}".`);f.push({type:"token",value:g.handler(i,T),token:c.value})}return f},compileFormat(i){if(i.length>1e3)throw new Error(`temporal-fmt: format string exceeds maximum length of ${1e3} characters (got ${i.length}).`);let m=o(i);return{formatStr:i,pieces:m.map(l=>l),format(l,T={}){let y=T.locale??d,f="";for(let c of m){if(c.kind==="literal"){f+=c.value;continue}let g=r.get(c.value);/* c8 ignore start @preserve -- unreachable, see the same guard's comment
54
+ above in the un-compiled format(). */if(!g)throw new Error(`temporal-fmt: unknown token "${c.value}"`);/* c8 ignore stop @preserve */if(l[g.field]===void 0)throw new Error(`temporal-fmt: token "${c.value}" requires "${String(g.field)}".`);f+=g.handler(l,y)}return f},formatToParts(l,T={}){let y=T.locale??d,f=[];for(let c of m){if(c.kind==="literal"){let D=f[f.length-1];/* c8 ignore start @preserve -- unreachable, see the same guard's
55
+ comment above in the un-compiled formatToParts. */D&&D.type==="literal"?D.value+=c.value:f.push({type:"literal",value:c.value});continue}let g=r.get(c.value);/* c8 ignore start @preserve -- unreachable, see the same guard's
56
+ comment above in the un-compiled formatToParts. */if(!g)throw new Error(`temporal-fmt: unknown token "${c.value}"`);/* c8 ignore stop @preserve */if(l[g.field]===void 0)throw new Error(`temporal-fmt: token "${c.value}" requires "${String(g.field)}".`);f.push({type:"token",value:g.handler(l,y),token:c.value})}return f}}}}}function Yo(e){return/^y+$/.test(e)?"Year":/^[ML]+$/.test(e)?"Month":/^[decD]+$/.test(e)?"Day":/^[Ec]+$/.test(e)?"Weekday":/^[Qq]+$/.test(e)?"Quarter":/^[Gg]+$/.test(e)?"Era":/^[Hh]+$/.test(e)?"Hour":/^m+$/.test(e)?"Minute":/^s+$/.test(e)?"Second":/^S+$/.test(e)?"Fractional Second":e==="a"?"Day Period":e==="zzz"?"Time Zone":/^[Xx]+$/.test(e)?"UTC Offset":e==="do"?"Ordinal Day":e==="ww"||e==="RRRR"?"ISO Week":"Other"}function Bo(){return me.map(e=>{let n=R[e];return{label:e,detail:n.meaning,documentation:[n.meaning,"",`Format-capable: ${n.formatCapable}`,`Parse-capable: ${n.parseCapable}`,`Locale-sensitive: ${n.localeSensitive}`,`Calendar-sensitive: ${n.calendarSensitive}`,`Timezone-sensitive: ${n.timezoneSensitive}`,`Round-trip safe: ${n.roundTripSafe}`,`Supported types: ${n.supportedTypes.join(", ")}`].join(`
57
+ `),family:Yo(e)}})}function Xo(){let e={};for(let n of me){let t=R[n];e[n]={signature:n,summary:t.meaning,details:[`Format-capable: ${t.formatCapable?"yes":"no"}`,`Parse-capable: ${t.parseCapable?"yes":"no"}`,`Locale-sensitive: ${t.localeSensitive?"yes":"no"}`,`Calendar-sensitive: ${t.calendarSensitive?"yes":"no"}`,`Timezone-sensitive: ${t.timezoneSensitive?"yes":"no"}`,`Round-trip safe: ${t.roundTripSafe?"yes":"no"}`,`Supported types: ${t.supportedTypes.join(", ")}`].join(`
58
+ `)}}return e}function qo(e){let n=W(e),t=[];for(let r of n.warnings){let a=r.message,o;r.code==="TWELVE_HOUR_WITHOUT_A"?o='Add an "a" token (e.g. "h:mm a") or use "H:mm" for 24-hour.':r.code==="MIXED_12_AND_24_HOUR"?o='Pick one form: "HH:mm" for 24-hour or "h:mm a" for 12-hour.':r.code==="AMBIGUOUS_NUMERIC_RUN"?o='Add a separator or use padded forms (e.g. "MM" instead of "M").':r.code==="FORMAT_ONLY_TOKEN"&&(o='Use a parse-capable variant (e.g. "d" instead of "do").'),t.push({startColumn:0,endColumn:e.length,severity:"warning",message:a,code:r.code,suggestion:o})}return t}var Ee=[{from:"YYYY",to:"yyyy"},{from:"YY",to:"yy"},{from:"MMMM",to:"MMMM"},{from:"MMM",to:"MMM"},{from:"MM",to:"MM"},{from:"M",to:"M"},{from:"DD",to:"dd"},{from:"D",to:"d"},{from:"Do",to:null,notes:`Ordinal day (AdvancedFormat) \u2014 use temporal-fmt's own "do" token instead.`},{from:"dddd",to:"EEEE"},{from:"ddd",to:"EEE"},{from:"dd",to:null,notes:'Min-name weekday (e.g. "Tu") \u2014 temporal-fmt has no equivalent width.'},{from:"d",to:null,notes:'Numeric weekday (0-6) \u2014 no temporal-fmt equivalent; not the same as "d" here, which is day-of-month.'},{from:"HH",to:"HH"},{from:"H",to:"H"},{from:"hh",to:"hh"},{from:"h",to:"h"},{from:"kk",to:null,notes:"Hour 1-24 (AdvancedFormat) \u2014 no temporal-fmt equivalent."},{from:"k",to:null,notes:"Hour 1-24 (AdvancedFormat) \u2014 no temporal-fmt equivalent."},{from:"mm",to:"mm"},{from:"m",to:"m"},{from:"ss",to:"ss"},{from:"s",to:"s"},{from:"SSS",to:"SSS"},{from:"A",to:"a",notes:"Uppercase AM/PM in Day.js \u2014 temporal-fmt is always lowercase."},{from:"a",to:"a"},{from:"ZZ",to:"XX",notes:"Numeric UTC offset, no colon."},{from:"Z",to:"XXX",notes:"Numeric UTC offset with colon."},{from:"X",to:null,notes:"Unix timestamp (seconds) \u2014 use fromUnixSeconds() instead."},{from:"x",to:null,notes:"Unix timestamp (ms) \u2014 use fromUnixMilliseconds() instead."},{from:"Qo",to:null,notes:"Ordinal quarter (AdvancedFormat) \u2014 no temporal-fmt equivalent."},{from:"Q",to:"Q"},{from:"Mo",to:null,notes:"Ordinal month (AdvancedFormat) \u2014 no temporal-fmt equivalent."},{from:"ww",to:"ww"},{from:"wo",to:null,notes:"Ordinal ISO week (AdvancedFormat) \u2014 no temporal-fmt equivalent."},{from:"w",to:null,notes:`Unpadded ISO week \u2014 temporal-fmt's "ww" is always 2-digit.`},{from:"gggg",to:"RRRR",notes:"Week-numbering year, not the calendar year \u2014 same caveat as temporal-fmt's RRRR."},{from:"L",to:null,notes:"Localized date format (AdvancedFormat) \u2014 write the format string out explicitly."},{from:"LL",to:null,notes:"Localized date format (AdvancedFormat) \u2014 write the format string out explicitly."},{from:"LLL",to:null,notes:"Localized date format (AdvancedFormat) \u2014 write the format string out explicitly."},{from:"LLLL",to:null,notes:"Localized date format (AdvancedFormat) \u2014 write the format string out explicitly."},{from:"LT",to:null,notes:"Localized time format (AdvancedFormat) \u2014 write the format string out explicitly."},{from:"LTS",to:null,notes:"Localized time format (AdvancedFormat) \u2014 write the format string out explicitly."}],xe=[{from:"yyyy",to:"yyyy"},{from:"yy",to:"yy"},{from:"y",to:null,notes:'Unpadded calendar year, opt-in via useAdditionalWeekYearTokens \u2014 temporal-fmt has no unpadded-year token; use "yyyy".'},{from:"MMMM",to:"MMMM"},{from:"MMM",to:"MMM"},{from:"MM",to:"MM"},{from:"M",to:"M"},{from:"LLLL",to:"LLLL"},{from:"LLL",to:"LLL"},{from:"dd",to:"dd"},{from:"d",to:"d"},{from:"do",to:"do"},{from:"DDD",to:"DDD"},{from:"DD",to:"DD"},{from:"D",to:"D",notes:`Day-of-year, opt-in via useAdditionalDayOfYearTokens \u2014 matches temporal-fmt's own "D" already.`},{from:"EEEE",to:"EEEE"},{from:"EEE",to:"EEE"},{from:"eeee",to:null,notes:"Locale-aware numeric weekday \u2014 no temporal-fmt equivalent."},{from:"cccc",to:"cccc"},{from:"ccc",to:"ccc"},{from:"HH",to:"HH"},{from:"H",to:"H"},{from:"hh",to:"hh"},{from:"h",to:"h"},{from:"mm",to:"mm"},{from:"m",to:"m"},{from:"ss",to:"ss"},{from:"s",to:"s"},{from:"SSS",to:"SSS"},{from:"a",to:"a"},{from:"aaa",to:"a"},{from:"XXX",to:"XXX"},{from:"XX",to:"XX"},{from:"X",to:"X",notes:`Opt-in via useAdditionalDayOfYearTokens-adjacent rules in date-fns v3+; matches temporal-fmt's own "X" already.`},{from:"xxx",to:"xxx"},{from:"xx",to:"xx"},{from:"x",to:"x"},{from:"zzzz",to:"zzzz"},{from:"zzz",to:"zzz"},{from:"z",to:"z"},{from:"QQQ",to:"QQQ"},{from:"Q",to:"Q"},{from:"GGGG",to:"GGGG"},{from:"GGG",to:null,notes:'Abbreviated era \u2014 temporal-fmt only has "G" (short) and "GGGG" (long).'},{from:"GG",to:null,notes:'Abbreviated era \u2014 temporal-fmt only has "G" (short) and "GGGG" (long).'},{from:"G",to:"G"},{from:"ww",to:"ww"},{from:"w",to:null,notes:`Unpadded local week number \u2014 temporal-fmt's "ww" is ISO-week and always 2-digit.`},{from:"RRRR",to:"RRRR"},{from:"R",to:null,notes:`Unpadded ISO week-numbering year \u2014 temporal-fmt's "RRRR" is always 4-digit.`},{from:"Y",to:null,notes:'Week-numbering year (locale week rules), opt-in \u2014 no temporal-fmt equivalent; "RRRR" is ISO week-numbering, a different rule set.'},{from:"PPPP",to:null,notes:"Localized composite format \u2014 write the format string out explicitly."},{from:"PPP",to:null,notes:"Localized composite format \u2014 write the format string out explicitly."},{from:"PP",to:null,notes:"Localized composite format \u2014 write the format string out explicitly."},{from:"P",to:null,notes:"Localized composite format \u2014 write the format string out explicitly."},{from:"pppp",to:null,notes:"Localized composite format \u2014 write the format string out explicitly."},{from:"ppp",to:null,notes:"Localized composite format \u2014 write the format string out explicitly."},{from:"pp",to:null,notes:"Localized composite format \u2014 write the format string out explicitly."},{from:"p",to:null,notes:"Localized composite format \u2014 write the format string out explicitly."}];function Ko(e,n){return L(n??{year:2026,month:8,day:4,hour:15,minute:45,second:30,millisecond:123,dayOfWeek:2,timeZoneId:"UTC",offset:"+00:00",calendarId:"iso8601"},e,{locale:"en-US"})}function Jo(e){return"README.md#token-reference"}function Qo(e){let n=[],t=0;for(;t<e.length;)if(e[t]==="["){let r=e.indexOf("]",t+1);if(r===-1){n.push({kind:"token",value:e.slice(t)});break}n.push({kind:"literal",value:e.slice(t+1,r)}),t=r+1}else{let r=t;for(;r<e.length&&e[r]!=="[";)r+=1;n.push({kind:"token",value:e.slice(t,r)}),t=r}return n}function Vo(e,n){let t=[],r=0;for(;r<e.length;){let a=n.find(s=>e.startsWith(s,r));if(a){t.push({kind:"token",value:a}),r+=a.length;continue}let o=t[t.length-1];o&&o.kind==="literal"?o.value+=e[r]:t.push({kind:"literal",value:e[r]}),r+=1}return t}function fn(e,n,t){let r=new Map(n.map(d=>[d.from,d.to])),a=[...r.keys()].sort((d,i)=>i.length-d.length),o=Qo(e),s="";for(let d of o){if(d.kind==="literal"){s+=`'${d.value.replace(/'/g,"''")}'`;continue}for(let i of Vo(d.value,a))if(i.kind==="token"){let m=r.get(i.value);if(m==null)throw new Error(`temporal-fmt: "${i.value}" has no ${t} -> temporal-fmt mapping (in format string "${e}"). Write the equivalent temporal-fmt token in by hand, or wrap it in brackets if it was meant as literal text.`);s+=m}else/[a-zA-Z]/.test(i.value)?s+=`'${i.value.replace(/'/g,"''")}'`:s+=i.value}return s}function ea(e){return fn(e,Ee,"Day.js")}function na(e){return fn(e,xe,"date-fns")}export{me as ALL_TOKEN_NAMES,zn as AmbiguousInputError,xe as DATE_FNS_TO_TEMPORAL_FMT,Ee as DAYJS_TO_TEMPORAL_FMT,an as DEFAULT_CONFIG,st as FORMAT_ONLY_TOKENS,w as FormatSyntaxError,Pn as InvalidCalendarError,ye as InvalidDateError,Nn as InvalidDurationError,ge as InvalidLocaleError,An as InvalidOffsetError,In as InvalidTimeError,On as InvalidTimeZoneError,$n as ParseMismatchError,et as SUPPORTED_NUMBERING_SYSTEMS,R as TOKEN_METADATA,Fn as TemporalFmtError,pe as UnknownTokenError,v as add,dn as addBusinessDays,gt as addDays,Jn as addDuration,ht as addHours,vt as addMilliseconds,Tt as addMinutes,pt as addMonths,wt as addSeconds,yt as addWeeks,ft as addYears,W as analyzeFormat,rt as applyNumbering,ot as applyParseNumbering,Rn as asDateFieldView,co as assertDuration,oo as assertInstant,ao as assertPlainDate,so as assertPlainDateTime,uo as assertPlainMonthDay,io as assertPlainTime,mo as assertPlainYearMonth,ro as assertTemporal,lo as assertZonedDateTime,Xn as balanceDuration,kr as between,Hn as ceil,Gt as clamp,J as compare,Kn as compareDuration,it as compileFormat,dt as compileParser,nt as convertDigits,tt as convertDigitsToAscii,_o as createBusinessCalendar,zo as createConfig,Wo as createFormatter,Uo as createHolidayCalendar,bn as dayOfYear,gn as daysInMonth,hn as daysInYear,Rt as difference,Ho as differenceInBusinessDays,At as differenceInDays,Ot as differenceInHours,Nt as differenceInMilliseconds,Pt as differenceInMinutes,$t as differenceInMonths,zt as differenceInSeconds,It as differenceInWeeks,Ft as differenceInYears,Cn as endOf,yo as explainFormat,To as fieldForToken,Ln as floor,L as format,ze as formatDistance,Ur as formatDistanceToNow,Gn as formatDuration,Zn as formatDurationToParts,Do as formatHTTPDate,on as formatISO,Yn as formatISODuration,So as formatRFC2822,vo as formatRFC3339,Dr as formatRRule,Tr as formatRange,wr as formatRangeToParts,nr as formatRelative,tr as formatRelativeToNow,Po as formatSQL,at as formatToParts,Ro as fromUnixMicroseconds,Co as fromUnixMilliseconds,Fo as fromUnixNanoseconds,xo as fromUnixSeconds,Bo as getAutocompleteData,Jo as getDocUrl,Xo as getHoverDocs,qo as getInlineDiagnostics,or as getLocale,Dn as getMonth,$r as getNextTransition,Cr as getOffset,Rr as getOffsetNanoseconds,Ir as getPreviousTransition,Mn as getQuarter,xr as getTimeZone,Ar as getTransitions,En as getWeekday,ar as hasLocale,Zo as holidaysBetween,cr as intersection,mr as intersects,ir as interval,sr as intervalContains,pr as intervalDifference,dr as intervalIsAfter,ur as intervalIsBefore,yr as intervalSubtract,Ht as isAfter,Lt as isBefore,Zt as isBetween,ce as isBusinessDay,Fr as isDST,nn as isDuration,_t as isEqual,Qe as isInstant,vn as isLeapMonth,wn as isLeapYear,Xe as isPlainDate,Ke as isPlainDateTime,en as isPlainMonthDay,qe as isPlainTime,Ve as isPlainYearMonth,Wt as isSameDay,Kt as isSameMonth,Jt as isSameQuarter,qt as isSameWeek,Qt as isSameYear,tn as isTemporal,Yt as isToday,Bt as isTomorrow,go as isValidFormat,er as isWeekday,Vt as isWeekend,Xt as isYesterday,Je as isZonedDateTime,Zr as listRegisteredGrammars,rn as listTokens,jt as max,gr as mergeIntervals,No as mergeWithConfig,Ut as min,Tn as monthsInYear,ln as nextBusinessDay,jo as nextHoliday,lr as overlaps,K as parse,Bn as parseDuration,Mo as parseHTTPDate,De as parseISO,Wn as parseISODuration,bo as parseRFC2822,wo as parseRFC3339,Mr as parseRRule,no as parseRelative,Oo as parseSQL,ut as parseToParts,Or as possibleInstantsFor,Ko as previewFormat,mn as previousBusinessDay,Go as previousHoliday,vr as recurrence,rr as registerLocale,jn as registerLocaleVocab,Gr as registerRelativeGrammar,Er as resolveZoned,_n as round,$e as roundDuration,$e as roundDurationAlias,lt as safeParse,Vn as setTemporal,Sr as skip,hr as splitInterval,xn as startOf,ct as subtract,Lo as subtractBusinessDays,Mt as subtractDays,Qn as subtractDuration,Dt as subtractHours,Ct as subtractMilliseconds,Et as subtractMinutes,St as subtractMonths,xt as subtractSeconds,kt as subtractWeeks,bt as subtractYears,br as take,Io as toUnixMicroseconds,$o as toUnixMilliseconds,Ao as toUnixNanoseconds,Eo as toUnixSeconds,po as tokenInfo,fo as tokenizeFormat,qn as totalDuration,na as translateDateFnsFormatString,ea as translateDayjsFormatString,Un as truncate,mt as tryParse,fr as union,ho as validateFormat,Sn as weekOfYear,kn as weekYear};
59
59
  //# sourceMappingURL=index.js.map