UNPKG

dgz-ui-shared

Version:

Custom ui library using React.js, Shadcn/ui, TailwindCSS, Typescript, dgz-ui library

1,698 lines (1,697 loc) 112 kB
import { a as U } from "./index-DqTIeHVj-CYOpXZHK.js"; import p, { forwardRef as Nn, useState as $e, useEffect as tt, useMemo as Ee, useCallback as ne, useRef as Be, createContext as Wn, useLayoutEffect as Cn, useContext as Tn } from "react"; import { u as ut, g as lt } from "./check-DE-1lGDl-24KCJ29m.js"; import { m as be, c as En } from "./utils-D0f6bOsw-HrLsble-.js"; import { m as Yn, A as dt, U as ct, j as ft, $ as ht, I as mt } from "./select-BehdTDP2-BxIxRb2_.js"; import { o as $n, c as _n, n as Ln } from "./index-Br4MVOGV-CUrOsbmR.js"; import { k as Pn } from "./createLucideIcon-B950nf2d-WasJb88J.js"; function Fn(e, n) { for (var t = 0; t < n.length; t++) { const r = n[t]; if (typeof r != "string" && !Array.isArray(r)) { for (const a in r) if (a !== "default" && !(a in e)) { const o = Object.getOwnPropertyDescriptor(r, a); o && Object.defineProperty(e, a, o.get ? o : { enumerable: !0, get: () => r[a] }); } } } return Object.freeze(Object.defineProperty(e, Symbol.toStringTag, { value: "Module" })); } /** * @license lucide-react v0.511.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ const jn = [ ["path", { d: "M8 2v4", key: "1cmpym" }], ["path", { d: "M16 2v4", key: "4m81vk" }], ["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }], ["path", { d: "M3 10h18", key: "8toen8" }] ]; Pn("calendar", jn); const yt = {}, Te = {}; function Ye(e, n) { try { const t = (yt[e] || (yt[e] = new Intl.DateTimeFormat("en-GB", { timeZone: e, hour: "numeric", timeZoneName: "longOffset" }).format))(n).split("GMT")[1] || ""; return t in Te ? Te[t] : vt(t, t.split(":")); } catch { if (e in Te) return Te[e]; const t = e == null ? void 0 : e.match(In); return t ? vt(e, t.slice(1)) : NaN; } } const In = /([+-]\d\d):?(\d\d)?/; function vt(e, n) { const t = +n[0], r = +(n[1] || 0); return Te[e] = t > 0 ? t * 60 + r : t * 60 - r; } class de extends Date { //#region static constructor(...n) { super(), n.length > 1 && typeof n[n.length - 1] == "string" && (this.timeZone = n.pop()), this.internal = /* @__PURE__ */ new Date(), isNaN(Ye(this.timeZone, this)) ? this.setTime(NaN) : n.length ? typeof n[0] == "number" && (n.length === 1 || n.length === 2 && typeof n[1] != "number") ? this.setTime(n[0]) : typeof n[0] == "string" ? this.setTime(+new Date(n[0])) : n[0] instanceof Date ? this.setTime(+n[0]) : (this.setTime(+new Date(...n)), Ct(this), Je(this)) : this.setTime(Date.now()); } static tz(n, ...t) { return t.length ? new de(...t, n) : new de(Date.now(), n); } //#endregion //#region time zone withTimeZone(n) { return new de(+this, n); } getTimezoneOffset() { return -Ye(this.timeZone, this); } //#endregion //#region time setTime(n) { return Date.prototype.setTime.apply(this, arguments), Je(this), +this; } //#endregion //#region date-fns integration [Symbol.for("constructDateFrom")](n) { return new de(+new Date(n), this.timeZone); } //#endregion } const pt = /^(get|set)(?!UTC)/; Object.getOwnPropertyNames(Date.prototype).forEach((e) => { if (!pt.test(e)) return; const n = e.replace(pt, "$1UTC"); de.prototype[n] && (e.startsWith("get") ? de.prototype[e] = function() { return this.internal[n](); } : (de.prototype[e] = function() { return Date.prototype[n].apply(this.internal, arguments), Bn(this), +this; }, de.prototype[n] = function() { return Date.prototype[n].apply(this, arguments), Je(this), +this; })); }); function Je(e) { e.internal.setTime(+e), e.internal.setUTCMinutes(e.internal.getUTCMinutes() - e.getTimezoneOffset()); } function Bn(e) { Date.prototype.setFullYear.call(e, e.internal.getUTCFullYear(), e.internal.getUTCMonth(), e.internal.getUTCDate()), Date.prototype.setHours.call(e, e.internal.getUTCHours(), e.internal.getUTCMinutes(), e.internal.getUTCSeconds(), e.internal.getUTCMilliseconds()), Ct(e); } function Ct(e) { const n = Ye(e.timeZone, e), t = /* @__PURE__ */ new Date(+e); t.setUTCHours(t.getUTCHours() - 1); const r = -(/* @__PURE__ */ new Date(+e)).getTimezoneOffset(), a = -(/* @__PURE__ */ new Date(+t)).getTimezoneOffset(), o = r - a, s = Date.prototype.getHours.apply(e) !== e.internal.getUTCHours(); o && s && e.internal.setUTCMinutes(e.internal.getUTCMinutes() + o); const i = r - n; i && Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + i); const u = Ye(e.timeZone, e), l = -(/* @__PURE__ */ new Date(+e)).getTimezoneOffset() - u, c = u !== n, d = l - i; if (c && d) { Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + d); const f = Ye(e.timeZone, e), m = u - f; m && (e.internal.setUTCMinutes(e.internal.getUTCMinutes() + m), Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + m)); } } class J extends de { //#region static static tz(n, ...t) { return t.length ? new J(...t, n) : new J(Date.now(), n); } //#endregion //#region representation toISOString() { const [n, t, r] = this.tzComponents(), a = `${n}${t}:${r}`; return this.internal.toISOString().slice(0, -1) + a; } toString() { return `${this.toDateString()} ${this.toTimeString()}`; } toDateString() { const [n, t, r, a] = this.internal.toUTCString().split(" "); return `${n == null ? void 0 : n.slice(0, -1)} ${r} ${t} ${a}`; } toTimeString() { const n = this.internal.toUTCString().split(" ")[4], [t, r, a] = this.tzComponents(); return `${n} GMT${t}${r}${a} (${Hn(this.timeZone, this)})`; } toLocaleString(n, t) { return Date.prototype.toLocaleString.call(this, n, { ...t, timeZone: (t == null ? void 0 : t.timeZone) || this.timeZone }); } toLocaleDateString(n, t) { return Date.prototype.toLocaleDateString.call(this, n, { ...t, timeZone: (t == null ? void 0 : t.timeZone) || this.timeZone }); } toLocaleTimeString(n, t) { return Date.prototype.toLocaleTimeString.call(this, n, { ...t, timeZone: (t == null ? void 0 : t.timeZone) || this.timeZone }); } //#endregion //#region private tzComponents() { const n = this.getTimezoneOffset(), t = n > 0 ? "-" : "+", r = String(Math.floor(Math.abs(n) / 60)).padStart(2, "0"), a = String(Math.abs(n) % 60).padStart(2, "0"); return [t, r, a]; } //#endregion withTimeZone(n) { return new J(+this, n); } //#region date-fns integration [Symbol.for("constructDateFrom")](n) { return new J(+new Date(n), this.timeZone); } //#endregion } function Hn(e, n) { return new Intl.DateTimeFormat("en-GB", { timeZone: e, timeZoneName: "long" }).format(n).slice(12); } var k; (function(e) { e.Root = "root", e.Chevron = "chevron", e.Day = "day", e.DayButton = "day_button", e.CaptionLabel = "caption_label", e.Dropdowns = "dropdowns", e.Dropdown = "dropdown", e.DropdownRoot = "dropdown_root", e.Footer = "footer", e.MonthGrid = "month_grid", e.MonthCaption = "month_caption", e.MonthsDropdown = "months_dropdown", e.Month = "month", e.Months = "months", e.Nav = "nav", e.NextMonthButton = "button_next", e.PreviousMonthButton = "button_previous", e.Week = "week", e.Weeks = "weeks", e.Weekday = "weekday", e.Weekdays = "weekdays", e.WeekNumber = "week_number", e.WeekNumberHeader = "week_number_header", e.YearsDropdown = "years_dropdown"; })(k || (k = {})); var z; (function(e) { e.disabled = "disabled", e.hidden = "hidden", e.outside = "outside", e.focused = "focused", e.today = "today"; })(z || (z = {})); var oe; (function(e) { e.range_end = "range_end", e.range_middle = "range_middle", e.range_start = "range_start", e.selected = "selected"; })(oe || (oe = {})); var te; (function(e) { e.weeks_before_enter = "weeks_before_enter", e.weeks_before_exit = "weeks_before_exit", e.weeks_after_enter = "weeks_after_enter", e.weeks_after_exit = "weeks_after_exit", e.caption_after_enter = "caption_after_enter", e.caption_after_exit = "caption_after_exit", e.caption_before_enter = "caption_before_enter", e.caption_before_exit = "caption_before_exit"; })(te || (te = {})); const Tt = 6048e5, An = 864e5, gt = Symbol.for("constructDateFrom"); function R(e, n) { return typeof e == "function" ? e(n) : e && typeof e == "object" && gt in e ? e[gt](n) : e instanceof Date ? new e.constructor(n) : new Date(n); } function F(e, n) { return R(n || e, e); } function Et(e, n, t) { const r = F(e, void 0); return isNaN(n) ? R(e, NaN) : (n && r.setDate(r.getDate() + n), r); } function Yt(e, n, t) { const r = F(e, void 0); if (isNaN(n)) return R(e, NaN); if (!n) return r; const a = r.getDate(), o = R(e, r.getTime()); o.setMonth(r.getMonth() + n + 1, 0); const s = o.getDate(); return a >= s ? o : (r.setFullYear( o.getFullYear(), o.getMonth(), a ), r); } let qn = {}; function Pe() { return qn; } function Se(e, n) { var t, r, a, o; const s = Pe(), i = (n == null ? void 0 : n.weekStartsOn) ?? ((r = (t = n == null ? void 0 : n.locale) == null ? void 0 : t.options) == null ? void 0 : r.weekStartsOn) ?? s.weekStartsOn ?? ((o = (a = s.locale) == null ? void 0 : a.options) == null ? void 0 : o.weekStartsOn) ?? 0, u = F(e, n == null ? void 0 : n.in), l = u.getDay(), c = (l < i ? 7 : 0) + l - i; return u.setDate(u.getDate() - c), u.setHours(0, 0, 0, 0), u; } function _e(e, n) { return Se(e, { ...n, weekStartsOn: 1 }); } function $t(e, n) { const t = F(e, void 0), r = t.getFullYear(), a = R(t, 0); a.setFullYear(r + 1, 0, 4), a.setHours(0, 0, 0, 0); const o = _e(a), s = R(t, 0); s.setFullYear(r, 0, 4), s.setHours(0, 0, 0, 0); const i = _e(s); return t.getTime() >= o.getTime() ? r + 1 : t.getTime() >= i.getTime() ? r : r - 1; } function bt(e) { const n = F(e), t = new Date( Date.UTC( n.getFullYear(), n.getMonth(), n.getDate(), n.getHours(), n.getMinutes(), n.getSeconds(), n.getMilliseconds() ) ); return t.setUTCFullYear(n.getFullYear()), +e - +t; } function Ne(e, ...n) { const t = R.bind( null, n.find((r) => typeof r == "object") ); return n.map(t); } function Le(e, n) { const t = F(e, void 0); return t.setHours(0, 0, 0, 0), t; } function _t(e, n, t) { const [r, a] = Ne( void 0, e, n ), o = Le(r), s = Le(a), i = +o - bt(o), u = +s - bt(s); return Math.round((i - u) / An); } function Zn(e, n) { const t = $t(e), r = R(e, 0); return r.setFullYear(t, 0, 4), r.setHours(0, 0, 0, 0), _e(r); } function zn(e, n, t) { return Et(e, n * 7); } function Un(e, n, t) { return Yt(e, n * 12); } function Gn(e, n) { let t, r; return e.forEach((a) => { !r && typeof a == "object" && (r = R.bind(null, a)); const o = F(a, r); (!t || t < o || isNaN(+o)) && (t = o); }), R(r, t || NaN); } function Xn(e, n) { let t, r; return e.forEach((a) => { !r && typeof a == "object" && (r = R.bind(null, a)); const o = F(a, r); (!t || t > o || isNaN(+o)) && (t = o); }), R(r, t || NaN); } function Qn(e, n, t) { const [r, a] = Ne( void 0, e, n ); return +Le(r) == +Le(a); } function Lt(e) { return e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]"; } function Rn(e) { return !(!Lt(e) && typeof e != "number" || isNaN(+F(e))); } function Vn(e, n, t) { const [r, a] = Ne( void 0, e, n ), o = r.getFullYear() - a.getFullYear(), s = r.getMonth() - a.getMonth(); return o * 12 + s; } function Kn(e, n) { const t = F(e, void 0), r = t.getMonth(); return t.setFullYear(t.getFullYear(), r + 1, 0), t.setHours(23, 59, 59, 999), t; } function Jn(e, n) { const [t, r] = Ne(e, n.start, n.end); return { start: t, end: r }; } function er(e, n) { const { start: t, end: r } = Jn(void 0, e); let a = +t > +r; const o = a ? +t : +r, s = a ? r : t; s.setHours(0, 0, 0, 0), s.setDate(1); let i = 1; const u = []; for (; +s <= o; ) u.push(R(t, s)), s.setMonth(s.getMonth() + i); return a ? u.reverse() : u; } function tr(e, n) { const t = F(e, void 0); return t.setDate(1), t.setHours(0, 0, 0, 0), t; } function nr(e, n) { const t = F(e, void 0), r = t.getFullYear(); return t.setFullYear(r + 1, 0, 0), t.setHours(23, 59, 59, 999), t; } function Pt(e, n) { const t = F(e, void 0); return t.setFullYear(t.getFullYear(), 0, 1), t.setHours(0, 0, 0, 0), t; } function Ft(e, n) { var t, r, a, o; const s = Pe(), i = (n == null ? void 0 : n.weekStartsOn) ?? ((r = (t = n == null ? void 0 : n.locale) == null ? void 0 : t.options) == null ? void 0 : r.weekStartsOn) ?? s.weekStartsOn ?? ((o = (a = s.locale) == null ? void 0 : a.options) == null ? void 0 : o.weekStartsOn) ?? 0, u = F(e, n == null ? void 0 : n.in), l = u.getDay(), c = (l < i ? -7 : 0) + 6 - (l - i); return u.setDate(u.getDate() + c), u.setHours(23, 59, 59, 999), u; } function rr(e, n) { return Ft(e, { ...n, weekStartsOn: 1 }); } const ar = { lessThanXSeconds: { one: "less than a second", other: "less than {{count}} seconds" }, xSeconds: { one: "1 second", other: "{{count}} seconds" }, halfAMinute: "half a minute", lessThanXMinutes: { one: "less than a minute", other: "less than {{count}} minutes" }, xMinutes: { one: "1 minute", other: "{{count}} minutes" }, aboutXHours: { one: "about 1 hour", other: "about {{count}} hours" }, xHours: { one: "1 hour", other: "{{count}} hours" }, xDays: { one: "1 day", other: "{{count}} days" }, aboutXWeeks: { one: "about 1 week", other: "about {{count}} weeks" }, xWeeks: { one: "1 week", other: "{{count}} weeks" }, aboutXMonths: { one: "about 1 month", other: "about {{count}} months" }, xMonths: { one: "1 month", other: "{{count}} months" }, aboutXYears: { one: "about 1 year", other: "about {{count}} years" }, xYears: { one: "1 year", other: "{{count}} years" }, overXYears: { one: "over 1 year", other: "over {{count}} years" }, almostXYears: { one: "almost 1 year", other: "almost {{count}} years" } }, or = (e, n, t) => { let r; const a = ar[e]; return typeof a == "string" ? r = a : n === 1 ? r = a.one : r = a.other.replace("{{count}}", n.toString()), t != null && t.addSuffix ? t.comparison && t.comparison > 0 ? "in " + r : r + " ago" : r; }; function Xe(e) { return (n = {}) => { const t = n.width ? String(n.width) : e.defaultWidth; return e.formats[t] || e.formats[e.defaultWidth]; }; } const sr = { full: "EEEE, MMMM do, y", long: "MMMM do, y", medium: "MMM d, y", short: "MM/dd/yyyy" }, ir = { full: "h:mm:ss a zzzz", long: "h:mm:ss a z", medium: "h:mm:ss a", short: "h:mm a" }, ur = { full: "{{date}} 'at' {{time}}", long: "{{date}} 'at' {{time}}", medium: "{{date}}, {{time}}", short: "{{date}}, {{time}}" }, lr = { date: Xe({ formats: sr, defaultWidth: "full" }), time: Xe({ formats: ir, defaultWidth: "full" }), dateTime: Xe({ formats: ur, defaultWidth: "full" }) }, dr = { lastWeek: "'last' eeee 'at' p", yesterday: "'yesterday at' p", today: "'today at' p", tomorrow: "'tomorrow at' p", nextWeek: "eeee 'at' p", other: "P" }, cr = (e, n, t, r) => dr[e]; function We(e) { return (n, t) => { const r = t != null && t.context ? String(t.context) : "standalone"; let a; if (r === "formatting" && e.formattingValues) { const s = e.defaultFormattingWidth || e.defaultWidth, i = t != null && t.width ? String(t.width) : s; a = e.formattingValues[i] || e.formattingValues[s]; } else { const s = e.defaultWidth, i = t != null && t.width ? String(t.width) : e.defaultWidth; a = e.values[i] || e.values[s]; } const o = e.argumentCallback ? e.argumentCallback(n) : n; return a[o]; }; } const fr = { narrow: ["B", "A"], abbreviated: ["BC", "AD"], wide: ["Before Christ", "Anno Domini"] }, hr = { narrow: ["1", "2", "3", "4"], abbreviated: ["Q1", "Q2", "Q3", "Q4"], wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"] }, mr = { narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"], abbreviated: [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" ], wide: [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ] }, yr = { narrow: ["S", "M", "T", "W", "T", "F", "S"], short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], wide: [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ] }, vr = { narrow: { am: "a", pm: "p", midnight: "mi", noon: "n", morning: "morning", afternoon: "afternoon", evening: "evening", night: "night" }, abbreviated: { am: "AM", pm: "PM", midnight: "midnight", noon: "noon", morning: "morning", afternoon: "afternoon", evening: "evening", night: "night" }, wide: { am: "a.m.", pm: "p.m.", midnight: "midnight", noon: "noon", morning: "morning", afternoon: "afternoon", evening: "evening", night: "night" } }, pr = { narrow: { am: "a", pm: "p", midnight: "mi", noon: "n", morning: "in the morning", afternoon: "in the afternoon", evening: "in the evening", night: "at night" }, abbreviated: { am: "AM", pm: "PM", midnight: "midnight", noon: "noon", morning: "in the morning", afternoon: "in the afternoon", evening: "in the evening", night: "at night" }, wide: { am: "a.m.", pm: "p.m.", midnight: "midnight", noon: "noon", morning: "in the morning", afternoon: "in the afternoon", evening: "in the evening", night: "at night" } }, gr = (e, n) => { const t = Number(e), r = t % 100; if (r > 20 || r < 10) switch (r % 10) { case 1: return t + "st"; case 2: return t + "nd"; case 3: return t + "rd"; } return t + "th"; }, br = { ordinalNumber: gr, era: We({ values: fr, defaultWidth: "wide" }), quarter: We({ values: hr, defaultWidth: "wide", argumentCallback: (e) => e - 1 }), month: We({ values: mr, defaultWidth: "wide" }), day: We({ values: yr, defaultWidth: "wide" }), dayPeriod: We({ values: vr, defaultWidth: "wide", formattingValues: pr, defaultFormattingWidth: "wide" }) }; function Ce(e) { return (n, t = {}) => { const r = t.width, a = r && e.matchPatterns[r] || e.matchPatterns[e.defaultMatchWidth], o = n.match(a); if (!o) return null; const s = o[0], i = r && e.parsePatterns[r] || e.parsePatterns[e.defaultParseWidth], u = Array.isArray(i) ? Mr(i, (d) => d.test(s)) : ( // [TODO] -- I challenge you to fix the type wr(i, (d) => d.test(s)) ); let l; l = e.valueCallback ? e.valueCallback(u) : u, l = t.valueCallback ? ( // [TODO] -- I challenge you to fix the type t.valueCallback(l) ) : l; const c = n.slice(s.length); return { value: l, rest: c }; }; } function wr(e, n) { for (const t in e) if (Object.prototype.hasOwnProperty.call(e, t) && n(e[t])) return t; } function Mr(e, n) { for (let t = 0; t < e.length; t++) if (n(e[t])) return t; } function kr(e) { return (n, t = {}) => { const r = n.match(e.matchPattern); if (!r) return null; const a = r[0], o = n.match(e.parsePattern); if (!o) return null; let s = e.valueCallback ? e.valueCallback(o[0]) : o[0]; s = t.valueCallback ? t.valueCallback(s) : s; const i = n.slice(a.length); return { value: s, rest: i }; }; } const Dr = /^(\d+)(th|st|nd|rd)?/i, Or = /\d+/i, xr = { narrow: /^(b|a)/i, abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i, wide: /^(before christ|before common era|anno domini|common era)/i }, Sr = { any: [/^b/i, /^(a|c)/i] }, Nr = { narrow: /^[1234]/i, abbreviated: /^q[1234]/i, wide: /^[1234](th|st|nd|rd)? quarter/i }, Wr = { any: [/1/i, /2/i, /3/i, /4/i] }, Cr = { narrow: /^[jfmasond]/i, abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i, wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i }, Tr = { narrow: [ /^j/i, /^f/i, /^m/i, /^a/i, /^m/i, /^j/i, /^j/i, /^a/i, /^s/i, /^o/i, /^n/i, /^d/i ], any: [ /^ja/i, /^f/i, /^mar/i, /^ap/i, /^may/i, /^jun/i, /^jul/i, /^au/i, /^s/i, /^o/i, /^n/i, /^d/i ] }, Er = { narrow: /^[smtwf]/i, short: /^(su|mo|tu|we|th|fr|sa)/i, abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i, wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i }, Yr = { narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i], any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i] }, $r = { narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i, any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i }, _r = { any: { am: /^a/i, pm: /^p/i, midnight: /^mi/i, noon: /^no/i, morning: /morning/i, afternoon: /afternoon/i, evening: /evening/i, night: /night/i } }, Lr = { ordinalNumber: kr({ matchPattern: Dr, parsePattern: Or, valueCallback: (e) => parseInt(e, 10) }), era: Ce({ matchPatterns: xr, defaultMatchWidth: "wide", parsePatterns: Sr, defaultParseWidth: "any" }), quarter: Ce({ matchPatterns: Nr, defaultMatchWidth: "wide", parsePatterns: Wr, defaultParseWidth: "any", valueCallback: (e) => e + 1 }), month: Ce({ matchPatterns: Cr, defaultMatchWidth: "wide", parsePatterns: Tr, defaultParseWidth: "any" }), day: Ce({ matchPatterns: Er, defaultMatchWidth: "wide", parsePatterns: Yr, defaultParseWidth: "any" }), dayPeriod: Ce({ matchPatterns: $r, defaultMatchWidth: "any", parsePatterns: _r, defaultParseWidth: "any" }) }, nt = { code: "en-US", formatDistance: or, formatLong: lr, formatRelative: cr, localize: br, match: Lr, options: { weekStartsOn: 0, firstWeekContainsDate: 1 } }; function Pr(e, n) { const t = F(e, void 0); return _t(t, Pt(t)) + 1; } function jt(e, n) { const t = F(e, void 0), r = +_e(t) - +Zn(t); return Math.round(r / Tt) + 1; } function It(e, n) { var t, r, a, o; const s = F(e, n == null ? void 0 : n.in), i = s.getFullYear(), u = Pe(), l = (n == null ? void 0 : n.firstWeekContainsDate) ?? ((r = (t = n == null ? void 0 : n.locale) == null ? void 0 : t.options) == null ? void 0 : r.firstWeekContainsDate) ?? u.firstWeekContainsDate ?? ((o = (a = u.locale) == null ? void 0 : a.options) == null ? void 0 : o.firstWeekContainsDate) ?? 1, c = R((n == null ? void 0 : n.in) || e, 0); c.setFullYear(i + 1, 0, l), c.setHours(0, 0, 0, 0); const d = Se(c, n), f = R((n == null ? void 0 : n.in) || e, 0); f.setFullYear(i, 0, l), f.setHours(0, 0, 0, 0); const m = Se(f, n); return +s >= +d ? i + 1 : +s >= +m ? i : i - 1; } function Fr(e, n) { var t, r, a, o; const s = Pe(), i = (n == null ? void 0 : n.firstWeekContainsDate) ?? ((r = (t = n == null ? void 0 : n.locale) == null ? void 0 : t.options) == null ? void 0 : r.firstWeekContainsDate) ?? s.firstWeekContainsDate ?? ((o = (a = s.locale) == null ? void 0 : a.options) == null ? void 0 : o.firstWeekContainsDate) ?? 1, u = It(e, n), l = R((n == null ? void 0 : n.in) || e, 0); return l.setFullYear(u, 0, i), l.setHours(0, 0, 0, 0), Se(l, n); } function Bt(e, n) { const t = F(e, n == null ? void 0 : n.in), r = +Se(t, n) - +Fr(t, n); return Math.round(r / Tt) + 1; } function P(e, n) { const t = e < 0 ? "-" : "", r = Math.abs(e).toString().padStart(n, "0"); return t + r; } const pe = { // Year y(e, n) { const t = e.getFullYear(), r = t > 0 ? t : 1 - t; return P(n === "yy" ? r % 100 : r, n.length); }, // Month M(e, n) { const t = e.getMonth(); return n === "M" ? String(t + 1) : P(t + 1, 2); }, // Day of the month d(e, n) { return P(e.getDate(), n.length); }, // AM or PM a(e, n) { const t = e.getHours() / 12 >= 1 ? "pm" : "am"; switch (n) { case "a": case "aa": return t.toUpperCase(); case "aaa": return t; case "aaaaa": return t[0]; case "aaaa": default: return t === "am" ? "a.m." : "p.m."; } }, // Hour [1-12] h(e, n) { return P(e.getHours() % 12 || 12, n.length); }, // Hour [0-23] H(e, n) { return P(e.getHours(), n.length); }, // Minute m(e, n) { return P(e.getMinutes(), n.length); }, // Second s(e, n) { return P(e.getSeconds(), n.length); }, // Fraction of second S(e, n) { const t = n.length, r = e.getMilliseconds(), a = Math.trunc( r * Math.pow(10, t - 3) ); return P(a, n.length); } }, xe = { midnight: "midnight", noon: "noon", morning: "morning", afternoon: "afternoon", evening: "evening", night: "night" }, wt = { // Era G: function(e, n, t) { const r = e.getFullYear() > 0 ? 1 : 0; switch (n) { // AD, BC case "G": case "GG": case "GGG": return t.era(r, { width: "abbreviated" }); // A, B case "GGGGG": return t.era(r, { width: "narrow" }); // Anno Domini, Before Christ case "GGGG": default: return t.era(r, { width: "wide" }); } }, // Year y: function(e, n, t) { if (n === "yo") { const r = e.getFullYear(), a = r > 0 ? r : 1 - r; return t.ordinalNumber(a, { unit: "year" }); } return pe.y(e, n); }, // Local week-numbering year Y: function(e, n, t, r) { const a = It(e, r), o = a > 0 ? a : 1 - a; if (n === "YY") { const s = o % 100; return P(s, 2); } return n === "Yo" ? t.ordinalNumber(o, { unit: "year" }) : P(o, n.length); }, // ISO week-numbering year R: function(e, n) { const t = $t(e); return P(t, n.length); }, // Extended year. This is a single number designating the year of this calendar system. // The main difference between `y` and `u` localizers are B.C. years: // | Year | `y` | `u` | // |------|-----|-----| // | AC 1 | 1 | 1 | // | BC 1 | 1 | 0 | // | BC 2 | 2 | -1 | // Also `yy` always returns the last two digits of a year, // while `uu` pads single digit years to 2 characters and returns other years unchanged. u: function(e, n) { const t = e.getFullYear(); return P(t, n.length); }, // Quarter Q: function(e, n, t) { const r = Math.ceil((e.getMonth() + 1) / 3); switch (n) { // 1, 2, 3, 4 case "Q": return String(r); // 01, 02, 03, 04 case "QQ": return P(r, 2); // 1st, 2nd, 3rd, 4th case "Qo": return t.ordinalNumber(r, { unit: "quarter" }); // Q1, Q2, Q3, Q4 case "QQQ": return t.quarter(r, { width: "abbreviated", context: "formatting" }); // 1, 2, 3, 4 (narrow quarter; could be not numerical) case "QQQQQ": return t.quarter(r, { width: "narrow", context: "formatting" }); // 1st quarter, 2nd quarter, ... case "QQQQ": default: return t.quarter(r, { width: "wide", context: "formatting" }); } }, // Stand-alone quarter q: function(e, n, t) { const r = Math.ceil((e.getMonth() + 1) / 3); switch (n) { // 1, 2, 3, 4 case "q": return String(r); // 01, 02, 03, 04 case "qq": return P(r, 2); // 1st, 2nd, 3rd, 4th case "qo": return t.ordinalNumber(r, { unit: "quarter" }); // Q1, Q2, Q3, Q4 case "qqq": return t.quarter(r, { width: "abbreviated", context: "standalone" }); // 1, 2, 3, 4 (narrow quarter; could be not numerical) case "qqqqq": return t.quarter(r, { width: "narrow", context: "standalone" }); // 1st quarter, 2nd quarter, ... case "qqqq": default: return t.quarter(r, { width: "wide", context: "standalone" }); } }, // Month M: function(e, n, t) { const r = e.getMonth(); switch (n) { case "M": case "MM": return pe.M(e, n); // 1st, 2nd, ..., 12th case "Mo": return t.ordinalNumber(r + 1, { unit: "month" }); // Jan, Feb, ..., Dec case "MMM": return t.month(r, { width: "abbreviated", context: "formatting" }); // J, F, ..., D case "MMMMM": return t.month(r, { width: "narrow", context: "formatting" }); // January, February, ..., December case "MMMM": default: return t.month(r, { width: "wide", context: "formatting" }); } }, // Stand-alone month L: function(e, n, t) { const r = e.getMonth(); switch (n) { // 1, 2, ..., 12 case "L": return String(r + 1); // 01, 02, ..., 12 case "LL": return P(r + 1, 2); // 1st, 2nd, ..., 12th case "Lo": return t.ordinalNumber(r + 1, { unit: "month" }); // Jan, Feb, ..., Dec case "LLL": return t.month(r, { width: "abbreviated", context: "standalone" }); // J, F, ..., D case "LLLLL": return t.month(r, { width: "narrow", context: "standalone" }); // January, February, ..., December case "LLLL": default: return t.month(r, { width: "wide", context: "standalone" }); } }, // Local week of year w: function(e, n, t, r) { const a = Bt(e, r); return n === "wo" ? t.ordinalNumber(a, { unit: "week" }) : P(a, n.length); }, // ISO week of year I: function(e, n, t) { const r = jt(e); return n === "Io" ? t.ordinalNumber(r, { unit: "week" }) : P(r, n.length); }, // Day of the month d: function(e, n, t) { return n === "do" ? t.ordinalNumber(e.getDate(), { unit: "date" }) : pe.d(e, n); }, // Day of year D: function(e, n, t) { const r = Pr(e); return n === "Do" ? t.ordinalNumber(r, { unit: "dayOfYear" }) : P(r, n.length); }, // Day of week E: function(e, n, t) { const r = e.getDay(); switch (n) { // Tue case "E": case "EE": case "EEE": return t.day(r, { width: "abbreviated", context: "formatting" }); // T case "EEEEE": return t.day(r, { width: "narrow", context: "formatting" }); // Tu case "EEEEEE": return t.day(r, { width: "short", context: "formatting" }); // Tuesday case "EEEE": default: return t.day(r, { width: "wide", context: "formatting" }); } }, // Local day of week e: function(e, n, t, r) { const a = e.getDay(), o = (a - r.weekStartsOn + 8) % 7 || 7; switch (n) { // Numerical value (Nth day of week with current locale or weekStartsOn) case "e": return String(o); // Padded numerical value case "ee": return P(o, 2); // 1st, 2nd, ..., 7th case "eo": return t.ordinalNumber(o, { unit: "day" }); case "eee": return t.day(a, { width: "abbreviated", context: "formatting" }); // T case "eeeee": return t.day(a, { width: "narrow", context: "formatting" }); // Tu case "eeeeee": return t.day(a, { width: "short", context: "formatting" }); // Tuesday case "eeee": default: return t.day(a, { width: "wide", context: "formatting" }); } }, // Stand-alone local day of week c: function(e, n, t, r) { const a = e.getDay(), o = (a - r.weekStartsOn + 8) % 7 || 7; switch (n) { // Numerical value (same as in `e`) case "c": return String(o); // Padded numerical value case "cc": return P(o, n.length); // 1st, 2nd, ..., 7th case "co": return t.ordinalNumber(o, { unit: "day" }); case "ccc": return t.day(a, { width: "abbreviated", context: "standalone" }); // T case "ccccc": return t.day(a, { width: "narrow", context: "standalone" }); // Tu case "cccccc": return t.day(a, { width: "short", context: "standalone" }); // Tuesday case "cccc": default: return t.day(a, { width: "wide", context: "standalone" }); } }, // ISO day of week i: function(e, n, t) { const r = e.getDay(), a = r === 0 ? 7 : r; switch (n) { // 2 case "i": return String(a); // 02 case "ii": return P(a, n.length); // 2nd case "io": return t.ordinalNumber(a, { unit: "day" }); // Tue case "iii": return t.day(r, { width: "abbreviated", context: "formatting" }); // T case "iiiii": return t.day(r, { width: "narrow", context: "formatting" }); // Tu case "iiiiii": return t.day(r, { width: "short", context: "formatting" }); // Tuesday case "iiii": default: return t.day(r, { width: "wide", context: "formatting" }); } }, // AM or PM a: function(e, n, t) { const r = e.getHours() / 12 >= 1 ? "pm" : "am"; switch (n) { case "a": case "aa": return t.dayPeriod(r, { width: "abbreviated", context: "formatting" }); case "aaa": return t.dayPeriod(r, { width: "abbreviated", context: "formatting" }).toLowerCase(); case "aaaaa": return t.dayPeriod(r, { width: "narrow", context: "formatting" }); case "aaaa": default: return t.dayPeriod(r, { width: "wide", context: "formatting" }); } }, // AM, PM, midnight, noon b: function(e, n, t) { const r = e.getHours(); let a; switch (r === 12 ? a = xe.noon : r === 0 ? a = xe.midnight : a = r / 12 >= 1 ? "pm" : "am", n) { case "b": case "bb": return t.dayPeriod(a, { width: "abbreviated", context: "formatting" }); case "bbb": return t.dayPeriod(a, { width: "abbreviated", context: "formatting" }).toLowerCase(); case "bbbbb": return t.dayPeriod(a, { width: "narrow", context: "formatting" }); case "bbbb": default: return t.dayPeriod(a, { width: "wide", context: "formatting" }); } }, // in the morning, in the afternoon, in the evening, at night B: function(e, n, t) { const r = e.getHours(); let a; switch (r >= 17 ? a = xe.evening : r >= 12 ? a = xe.afternoon : r >= 4 ? a = xe.morning : a = xe.night, n) { case "B": case "BB": case "BBB": return t.dayPeriod(a, { width: "abbreviated", context: "formatting" }); case "BBBBB": return t.dayPeriod(a, { width: "narrow", context: "formatting" }); case "BBBB": default: return t.dayPeriod(a, { width: "wide", context: "formatting" }); } }, // Hour [1-12] h: function(e, n, t) { if (n === "ho") { let r = e.getHours() % 12; return r === 0 && (r = 12), t.ordinalNumber(r, { unit: "hour" }); } return pe.h(e, n); }, // Hour [0-23] H: function(e, n, t) { return n === "Ho" ? t.ordinalNumber(e.getHours(), { unit: "hour" }) : pe.H(e, n); }, // Hour [0-11] K: function(e, n, t) { const r = e.getHours() % 12; return n === "Ko" ? t.ordinalNumber(r, { unit: "hour" }) : P(r, n.length); }, // Hour [1-24] k: function(e, n, t) { let r = e.getHours(); return r === 0 && (r = 24), n === "ko" ? t.ordinalNumber(r, { unit: "hour" }) : P(r, n.length); }, // Minute m: function(e, n, t) { return n === "mo" ? t.ordinalNumber(e.getMinutes(), { unit: "minute" }) : pe.m(e, n); }, // Second s: function(e, n, t) { return n === "so" ? t.ordinalNumber(e.getSeconds(), { unit: "second" }) : pe.s(e, n); }, // Fraction of second S: function(e, n) { return pe.S(e, n); }, // Timezone (ISO-8601. If offset is 0, output is always `'Z'`) X: function(e, n, t) { const r = e.getTimezoneOffset(); if (r === 0) return "Z"; switch (n) { // Hours and optional minutes case "X": return kt(r); // Hours, minutes and optional seconds without `:` delimiter // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets // so this token always has the same output as `XX` case "XXXX": case "XX": return De(r); // Hours, minutes and optional seconds with `:` delimiter // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets // so this token always has the same output as `XXX` case "XXXXX": case "XXX": // Hours and minutes with `:` delimiter default: return De(r, ":"); } }, // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent) x: function(e, n, t) { const r = e.getTimezoneOffset(); switch (n) { // Hours and optional minutes case "x": return kt(r); // Hours, minutes and optional seconds without `:` delimiter // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets // so this token always has the same output as `xx` case "xxxx": case "xx": return De(r); // Hours, minutes and optional seconds with `:` delimiter // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets // so this token always has the same output as `xxx` case "xxxxx": case "xxx": // Hours and minutes with `:` delimiter default: return De(r, ":"); } }, // Timezone (GMT) O: function(e, n, t) { const r = e.getTimezoneOffset(); switch (n) { // Short case "O": case "OO": case "OOO": return "GMT" + Mt(r, ":"); // Long case "OOOO": default: return "GMT" + De(r, ":"); } }, // Timezone (specific non-location) z: function(e, n, t) { const r = e.getTimezoneOffset(); switch (n) { // Short case "z": case "zz": case "zzz": return "GMT" + Mt(r, ":"); // Long case "zzzz": default: return "GMT" + De(r, ":"); } }, // Seconds timestamp t: function(e, n, t) { const r = Math.trunc(+e / 1e3); return P(r, n.length); }, // Milliseconds timestamp T: function(e, n, t) { return P(+e, n.length); } }; function Mt(e, n = "") { const t = e > 0 ? "-" : "+", r = Math.abs(e), a = Math.trunc(r / 60), o = r % 60; return o === 0 ? t + String(a) : t + String(a) + n + P(o, 2); } function kt(e, n) { return e % 60 === 0 ? (e > 0 ? "-" : "+") + P(Math.abs(e) / 60, 2) : De(e, n); } function De(e, n = "") { const t = e > 0 ? "-" : "+", r = Math.abs(e), a = P(Math.trunc(r / 60), 2), o = P(r % 60, 2); return t + a + n + o; } const Dt = (e, n) => { switch (e) { case "P": return n.date({ width: "short" }); case "PP": return n.date({ width: "medium" }); case "PPP": return n.date({ width: "long" }); case "PPPP": default: return n.date({ width: "full" }); } }, Ht = (e, n) => { switch (e) { case "p": return n.time({ width: "short" }); case "pp": return n.time({ width: "medium" }); case "ppp": return n.time({ width: "long" }); case "pppp": default: return n.time({ width: "full" }); } }, jr = (e, n) => { const t = e.match(/(P+)(p+)?/) || [], r = t[1], a = t[2]; if (!a) return Dt(e, n); let o; switch (r) { case "P": o = n.dateTime({ width: "short" }); break; case "PP": o = n.dateTime({ width: "medium" }); break; case "PPP": o = n.dateTime({ width: "long" }); break; case "PPPP": default: o = n.dateTime({ width: "full" }); break; } return o.replace("{{date}}", Dt(r, n)).replace("{{time}}", Ht(a, n)); }, Ir = { p: Ht, P: jr }, Br = /^D+$/, Hr = /^Y+$/, Ar = ["D", "DD", "YY", "YYYY"]; function qr(e) { return Br.test(e); } function Zr(e) { return Hr.test(e); } function zr(e, n, t) { const r = Ur(e, n, t); if (console.warn(r), Ar.includes(e)) throw new RangeError(r); } function Ur(e, n, t) { const r = e[0] === "Y" ? "years" : "days of the month"; return `Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${n}\`) for formatting ${r} to the input \`${t}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`; } const Gr = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Xr = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Qr = /^'([^]*?)'?$/, Rr = /''/g, Vr = /[a-zA-Z]/; function Kr(e, n, t) { var r, a, o, s, i, u, l, c; const d = Pe(), f = (t == null ? void 0 : t.locale) ?? d.locale ?? nt, m = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((a = (r = t == null ? void 0 : t.locale) == null ? void 0 : r.options) == null ? void 0 : a.firstWeekContainsDate) ?? d.firstWeekContainsDate ?? ((s = (o = d.locale) == null ? void 0 : o.options) == null ? void 0 : s.firstWeekContainsDate) ?? 1, S = (t == null ? void 0 : t.weekStartsOn) ?? ((u = (i = t == null ? void 0 : t.locale) == null ? void 0 : i.options) == null ? void 0 : u.weekStartsOn) ?? d.weekStartsOn ?? ((c = (l = d.locale) == null ? void 0 : l.options) == null ? void 0 : c.weekStartsOn) ?? 0, b = F(e, t == null ? void 0 : t.in); if (!Rn(b)) throw new RangeError("Invalid time value"); let E = n.match(Xr).map((x) => { const w = x[0]; if (w === "p" || w === "P") { const T = Ir[w]; return T(x, f.formatLong); } return x; }).join("").match(Gr).map((x) => { if (x === "''") return { isToken: !1, value: "'" }; const w = x[0]; if (w === "'") return { isToken: !1, value: Jr(x) }; if (wt[w]) return { isToken: !0, value: x }; if (w.match(Vr)) throw new RangeError( "Format string contains an unescaped latin alphabet character `" + w + "`" ); return { isToken: !1, value: x }; }); f.localize.preprocessor && (E = f.localize.preprocessor(b, E)); const j = { firstWeekContainsDate: m, weekStartsOn: S, locale: f }; return E.map((x) => { if (!x.isToken) return x.value; const w = x.value; (!(t != null && t.useAdditionalWeekYearTokens) && Zr(w) || !(t != null && t.useAdditionalDayOfYearTokens) && qr(w)) && zr(w, n, String(e)); const T = wt[w[0]]; return T(b, w, f.localize, j); }).join(""); } function Jr(e) { const n = e.match(Qr); return n ? n[1].replace(Rr, "'") : e; } function ea(e, n) { const t = F(e, void 0), r = t.getFullYear(), a = t.getMonth(), o = R(t, 0); return o.setFullYear(r, a + 1, 0), o.setHours(0, 0, 0, 0), o.getDate(); } function ta(e, n) { return F(e, n == null ? void 0 : n.in).getMonth(); } function na(e, n) { return F(e, n == null ? void 0 : n.in).getFullYear(); } function ra(e, n) { return +F(e) > +F(n); } function aa(e, n) { return +F(e) < +F(n); } function oa(e, n, t) { const [r, a] = Ne( void 0, e, n ); return r.getFullYear() === a.getFullYear() && r.getMonth() === a.getMonth(); } function sa(e, n, t) { const [r, a] = Ne( void 0, e, n ); return r.getFullYear() === a.getFullYear(); } function ia(e, n, t) { const r = F(e, void 0), a = r.getFullYear(), o = r.getDate(), s = R(e, 0); s.setFullYear(a, n, 15), s.setHours(0, 0, 0, 0); const i = ea(s); return r.setMonth(n, Math.min(o, i)), r; } function ua(e, n, t) { const r = F(e, void 0); return isNaN(+r) ? R(e, NaN) : (r.setFullYear(n), r); } const Ot = 5, la = 4; function da(e, n) { const t = n.startOfMonth(e), r = t.getDay() > 0 ? t.getDay() : 7, a = n.addDays(e, -r + 1), o = n.addDays(a, Ot * 7 - 1); return n.getMonth(e) === n.getMonth(o) ? Ot : la; } function At(e, n) { const t = n.startOfMonth(e), r = t.getDay(); return r === 1 ? t : r === 0 ? n.addDays(t, -1 * 6) : n.addDays(t, -1 * (r - 1)); } function ca(e, n) { const t = At(e, n), r = da(e, n); return n.addDays(t, r * 7 - 1); } class ye { /** * Creates an instance of `DateLib`. * * @param options Configuration options for the date library. * @param overrides Custom overrides for the date library functions. */ constructor(n, t) { this.Date = Date, this.today = () => { var r; return (r = this.overrides) != null && r.today ? this.overrides.today() : this.options.timeZone ? J.tz(this.options.timeZone) : new this.Date(); }, this.newDate = (r, a, o) => { var s; return (s = this.overrides) != null && s.newDate ? this.overrides.newDate(r, a, o) : this.options.timeZone ? new J(r, a, o, this.options.timeZone) : new Date(r, a, o); }, this.addDays = (r, a) => { var o; return (o = this.overrides) != null && o.addDays ? this.overrides.addDays(r, a) : Et(r, a); }, this.addMonths = (r, a) => { var o; return (o = this.overrides) != null && o.addMonths ? this.overrides.addMonths(r, a) : Yt(r, a); }, this.addWeeks = (r, a) => { var o; return (o = this.overrides) != null && o.addWeeks ? this.overrides.addWeeks(r, a) : zn(r, a); }, this.addYears = (r, a) => { var o; return (o = this.overrides) != null && o.addYears ? this.overrides.addYears(r, a) : Un(r, a); }, this.differenceInCalendarDays = (r, a) => { var o; return (o = this.overrides) != null && o.differenceInCalendarDays ? this.overrides.differenceInCalendarDays(r, a) : _t(r, a); }, this.differenceInCalendarMonths = (r, a) => { var o; return (o = this.overrides) != null && o.differenceInCalendarMonths ? this.overrides.differenceInCalendarMonths(r, a) : Vn(r, a); }, this.eachMonthOfInterval = (r) => { var a; return (a = this.overrides) != null && a.eachMonthOfInterval ? this.overrides.eachMonthOfInterval(r) : er(r); }, this.endOfBroadcastWeek = (r) => { var a; return (a = this.overrides) != null && a.endOfBroadcastWeek ? this.overrides.endOfBroadcastWeek(r) : ca(r, this); }, this.endOfISOWeek = (r) => { var a; return (a = this.overrides) != null && a.endOfISOWeek ? this.overrides.endOfISOWeek(r) : rr(r); }, this.endOfMonth = (r) => { var a; return (a = this.overrides) != null && a.endOfMonth ? this.overrides.endOfMonth(r) : Kn(r); }, this.endOfWeek = (r, a) => { var o; return (o = this.overrides) != null && o.endOfWeek ? this.overrides.endOfWeek(r, a) : Ft(r, this.options); }, this.endOfYear = (r) => { var a; return (a = this.overrides) != null && a.endOfYear ? this.overrides.endOfYear(r) : nr(r); }, this.format = (r, a, o) => { var s; const i = (s = this.overrides) != null && s.format ? this.overrides.format(r, a, this.options) : Kr(r, a, this.options); return this.options.numerals && this.options.numerals !== "latn" ? this.replaceDigits(i) : i; }, this.getISOWeek = (r) => { var a; return (a = this.overrides) != null && a.getISOWeek ? this.overrides.getISOWeek(r) : jt(r); }, this.getMonth = (r, a) => { var o; return (o = this.overrides) != null && o.getMonth ? this.overrides.getMonth(r, this.options) : ta(r, this.options); }, this.getYear = (r, a) => { var o; return (o = this.overrides) != null && o.getYear ? this.overrides.getYear(r, this.options) : na(r, this.options); }, this.getWeek = (r, a) => { var o; return (o = this.overrides) != null && o.getWeek ? this.overrides.getWeek(r, this.options) : Bt(r, this.options); }, this.isAfter = (r, a) => { var o; return (o = this.overrides) != null && o.isAfter ? this.overrides.isAfter(r, a) : ra(r, a); }, this.isBefore = (r, a) => { var o; return (o = this.overrides) != null && o.isBefore ? this.overrides.isBefore(r, a) : aa(r, a); }, this.isDate = (r) => { var a; return (a = this.overrides) != null && a.isDate ? this.overrides.isDate(r) : Lt(r); }, this.isSameDay = (r, a) => { var o; return (o = this.overrides) != null && o.isSameDay ? this.overrides.isSameDay(r, a) : Qn(r, a); }, this.isSameMonth = (r, a) => { var o; return (o = this.overrides) != null && o.isSameMonth ? this.overrides.isSameMonth(r, a) : oa(r, a); }, this.isSameYear = (r, a) => { var o; return (o = this.overrides) != null && o.isSameYear ? this.overrides.isSameYear(r, a) : sa(r, a); }, this.max = (r) => { var a; return (a = this.overrides) != null && a.max ? this.overrides.max(r) : Gn(r);