UNPKG

dgz-ui-shared

Version:

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

1,691 lines 136 kB
import { j as ce } from "./jsx-runtime-DS1N_tNq.js"; import Y, { forwardRef as Wn, useState as me, useCallback as ne, useMemo as We, useEffect as Je, useRef as Xe, createContext as Cn, useLayoutEffect as Yn, useContext as Tn } from "react"; import { a as Z } from "./index-BL59b1Bz-C9bJE_xn.js"; import { u as pe, g as mt } from "./button-CdZDBhmr-BT_j3ig5.js"; import { c as _n, m as be } from "./utils-B6fNqzRf-B1_jG1K7.js"; import { J as _t, o as Lt, c as Et, z as vt, n as Ln } from "./react-select-DVPHHTAP-D2u3DqGr.js"; import { k as En } from "./createLucideIcon-B950nf2d-9wLYOF5y.js"; import { g as Pn } from "./_commonjsHelpers-DaMA6jEr.js"; import { _ as jn, w as Fn, u as Hn } from "./popover-OZcfKDD9-C2PVWPLS.js"; import { u as In } from "./useTranslation-dH-uwymc.js"; import { c as zn } from "./createLucideIcon-B950nf2d.js"; /** * @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 Bn = [ ["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" }] ]; En("calendar", Bn); const yt = {}, Ie = {}; function ze(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 Ie ? Ie[t] : gt(t, t.split(":")); } catch { if (e in Ie) return Ie[e]; const t = e == null ? void 0 : e.match(An); return t ? gt(e, t.slice(1)) : NaN; } } const An = /([+-]\d\d):?(\d\d)?/; function gt(e, n) { const t = +n[0], r = +(n[1] || 0); return Ie[e] = t > 0 ? t * 60 + r : t * 60 - r; } class we 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(ze(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)), Pt(this), it(this)) : this.setTime(Date.now()); } static tz(n, ...t) { return t.length ? new we(...t, n) : new we(Date.now(), n); } //#endregion //#region time zone withTimeZone(n) { return new we(+this, n); } getTimezoneOffset() { return -ze(this.timeZone, this); } //#endregion //#region time setTime(n) { return Date.prototype.setTime.apply(this, arguments), it(this), +this; } //#endregion //#region date-fns integration [Symbol.for("constructDateFrom")](n) { return new we(+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"); we.prototype[n] && (e.startsWith("get") ? we.prototype[e] = function() { return this.internal[n](); } : (we.prototype[e] = function() { return Date.prototype[n].apply(this.internal, arguments), Zn(this), +this; }, we.prototype[n] = function() { return Date.prototype[n].apply(this, arguments), it(this), +this; })); }); function it(e) { e.internal.setTime(+e), e.internal.setUTCMinutes(e.internal.getUTCMinutes() - e.getTimezoneOffset()); } function Zn(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()), Pt(e); } function Pt(e) { const n = ze(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 = ze(e.timeZone, e), h = -(/* @__PURE__ */ new Date(+e)).getTimezoneOffset() - u, v = u !== n, l = h - i; if (v && l) { Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + l); const M = ze(e.timeZone, e), O = u - M; O && (e.internal.setUTCMinutes(e.internal.getUTCMinutes() + O), Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + O)); } } class ie extends we { //#region static static tz(n, ...t) { return t.length ? new ie(...t, n) : new ie(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} (${qn(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 ie(+this, n); } //#region date-fns integration [Symbol.for("constructDateFrom")](n) { return new ie(+new Date(n), this.timeZone); } //#endregion } function qn(e, n) { return new Intl.DateTimeFormat("en-GB", { timeZone: e, timeZoneName: "long" }).format(n).slice(12); } var _; (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"; })(_ || (_ = {})); var K; (function(e) { e.disabled = "disabled", e.hidden = "hidden", e.outside = "outside", e.focused = "focused", e.today = "today"; })(K || (K = {})); var ve; (function(e) { e.range_end = "range_end", e.range_middle = "range_middle", e.range_start = "range_start", e.selected = "selected"; })(ve || (ve = {})); var fe; (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"; })(fe || (fe = {})); const jt = 6048e5, Un = 864e5, bt = Symbol.for("constructDateFrom"); function re(e, n) { return typeof e == "function" ? e(n) : e && typeof e == "object" && bt in e ? e[bt](n) : e instanceof Date ? new e.constructor(n) : new Date(n); } function X(e, n) { return re(n || e, e); } function Ft(e, n, t) { const r = X(e, void 0); return isNaN(n) ? re(e, NaN) : (n && r.setDate(r.getDate() + n), r); } function Ht(e, n, t) { const r = X(e, void 0); if (isNaN(n)) return re(e, NaN); if (!n) return r; const a = r.getDate(), o = re(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 Gn = {}; function Ze() { return Gn; } function Te(e, n) { var t, r, a, o; const s = Ze(), 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 = X(e, n == null ? void 0 : n.in), h = u.getDay(), v = (h < i ? 7 : 0) + h - i; return u.setDate(u.getDate() - v), u.setHours(0, 0, 0, 0), u; } function Be(e, n) { return Te(e, { ...n, weekStartsOn: 1 }); } function It(e, n) { const t = X(e, void 0), r = t.getFullYear(), a = re(t, 0); a.setFullYear(r + 1, 0, 4), a.setHours(0, 0, 0, 0); const o = Be(a), s = re(t, 0); s.setFullYear(r, 0, 4), s.setHours(0, 0, 0, 0); const i = Be(s); return t.getTime() >= o.getTime() ? r + 1 : t.getTime() >= i.getTime() ? r : r - 1; } function wt(e) { const n = X(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 _e(e, ...n) { const t = re.bind( null, n.find((r) => typeof r == "object") ); return n.map(t); } function Ae(e, n) { const t = X(e, void 0); return t.setHours(0, 0, 0, 0), t; } function zt(e, n, t) { const [r, a] = _e( void 0, e, n ), o = Ae(r), s = Ae(a), i = +o - wt(o), u = +s - wt(s); return Math.round((i - u) / Un); } function Qn(e, n) { const t = It(e), r = re(e, 0); return r.setFullYear(t, 0, 4), r.setHours(0, 0, 0, 0), Be(r); } function Xn(e, n, t) { return Ft(e, n * 7); } function Rn(e, n, t) { return Ht(e, n * 12); } function Jn(e, n) { let t, r; return e.forEach((a) => { !r && typeof a == "object" && (r = re.bind(null, a)); const o = X(a, r); (!t || t < o || isNaN(+o)) && (t = o); }), re(r, t || NaN); } function Kn(e, n) { let t, r; return e.forEach((a) => { !r && typeof a == "object" && (r = re.bind(null, a)); const o = X(a, r); (!t || t > o || isNaN(+o)) && (t = o); }), re(r, t || NaN); } function Vn(e, n, t) { const [r, a] = _e( void 0, e, n ); return +Ae(r) == +Ae(a); } function Bt(e) { return e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]"; } function er(e) { return !(!Bt(e) && typeof e != "number" || isNaN(+X(e))); } function tr(e, n, t) { const [r, a] = _e( void 0, e, n ), o = r.getFullYear() - a.getFullYear(), s = r.getMonth() - a.getMonth(); return o * 12 + s; } function nr(e, n) { const t = X(e, void 0), r = t.getMonth(); return t.setFullYear(t.getFullYear(), r + 1, 0), t.setHours(23, 59, 59, 999), t; } function rr(e, n) { const [t, r] = _e(e, n.start, n.end); return { start: t, end: r }; } function ar(e, n) { const { start: t, end: r } = rr(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(re(t, s)), s.setMonth(s.getMonth() + i); return a ? u.reverse() : u; } function or(e, n) { const t = X(e, void 0); return t.setDate(1), t.setHours(0, 0, 0, 0), t; } function sr(e, n) { const t = X(e, void 0), r = t.getFullYear(); return t.setFullYear(r + 1, 0, 0), t.setHours(23, 59, 59, 999), t; } function At(e, n) { const t = X(e, void 0); return t.setFullYear(t.getFullYear(), 0, 1), t.setHours(0, 0, 0, 0), t; } function Zt(e, n) { var t, r, a, o; const s = Ze(), 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 = X(e, n == null ? void 0 : n.in), h = u.getDay(), v = (h < i ? -7 : 0) + 6 - (h - i); return u.setDate(u.getDate() + v), u.setHours(23, 59, 59, 999), u; } function ir(e, n) { return Zt(e, { ...n, weekStartsOn: 1 }); } const ur = { 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" } }, lr = (e, n, t) => { let r; const a = ur[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 rt(e) { return (n = {}) => { const t = n.width ? String(n.width) : e.defaultWidth; return e.formats[t] || e.formats[e.defaultWidth]; }; } const dr = { full: "EEEE, MMMM do, y", long: "MMMM do, y", medium: "MMM d, y", short: "MM/dd/yyyy" }, cr = { full: "h:mm:ss a zzzz", long: "h:mm:ss a z", medium: "h:mm:ss a", short: "h:mm a" }, fr = { full: "{{date}} 'at' {{time}}", long: "{{date}} 'at' {{time}}", medium: "{{date}}, {{time}}", short: "{{date}}, {{time}}" }, hr = { date: rt({ formats: dr, defaultWidth: "full" }), time: rt({ formats: cr, defaultWidth: "full" }), dateTime: rt({ formats: fr, defaultWidth: "full" }) }, mr = { lastWeek: "'last' eeee 'at' p", yesterday: "'yesterday at' p", today: "'today at' p", tomorrow: "'tomorrow at' p", nextWeek: "eeee 'at' p", other: "P" }, vr = (e, n, t, r) => mr[e]; function Fe(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 yr = { narrow: ["B", "A"], abbreviated: ["BC", "AD"], wide: ["Before Christ", "Anno Domini"] }, gr = { narrow: ["1", "2", "3", "4"], abbreviated: ["Q1", "Q2", "Q3", "Q4"], wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"] }, pr = { 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" ] }, br = { 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" ] }, wr = { 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" } }, Mr = { 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" } }, Dr = (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"; }, kr = { ordinalNumber: Dr, era: Fe({ values: yr, defaultWidth: "wide" }), quarter: Fe({ values: gr, defaultWidth: "wide", argumentCallback: (e) => e - 1 }), month: Fe({ values: pr, defaultWidth: "wide" }), day: Fe({ values: br, defaultWidth: "wide" }), dayPeriod: Fe({ values: wr, defaultWidth: "wide", formattingValues: Mr, defaultFormattingWidth: "wide" }) }; function He(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) ? Or(i, (l) => l.test(s)) : ( // [TODO] -- I challenge you to fix the type xr(i, (l) => l.test(s)) ); let h; h = e.valueCallback ? e.valueCallback(u) : u, h = t.valueCallback ? ( // [TODO] -- I challenge you to fix the type t.valueCallback(h) ) : h; const v = n.slice(s.length); return { value: h, rest: v }; }; } function xr(e, n) { for (const t in e) if (Object.prototype.hasOwnProperty.call(e, t) && n(e[t])) return t; } function Or(e, n) { for (let t = 0; t < e.length; t++) if (n(e[t])) return t; } function Sr(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 $r = /^(\d+)(th|st|nd|rd)?/i, Nr = /\d+/i, Wr = { 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 }, Cr = { any: [/^b/i, /^(a|c)/i] }, Yr = { narrow: /^[1234]/i, abbreviated: /^q[1234]/i, wide: /^[1234](th|st|nd|rd)? quarter/i }, Tr = { any: [/1/i, /2/i, /3/i, /4/i] }, _r = { 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 }, Lr = { 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 }, Pr = { 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] }, jr = { 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 }, Fr = { 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 } }, Hr = { ordinalNumber: Sr({ matchPattern: $r, parsePattern: Nr, valueCallback: (e) => parseInt(e, 10) }), era: He({ matchPatterns: Wr, defaultMatchWidth: "wide", parsePatterns: Cr, defaultParseWidth: "any" }), quarter: He({ matchPatterns: Yr, defaultMatchWidth: "wide", parsePatterns: Tr, defaultParseWidth: "any", valueCallback: (e) => e + 1 }), month: He({ matchPatterns: _r, defaultMatchWidth: "wide", parsePatterns: Lr, defaultParseWidth: "any" }), day: He({ matchPatterns: Er, defaultMatchWidth: "wide", parsePatterns: Pr, defaultParseWidth: "any" }), dayPeriod: He({ matchPatterns: jr, defaultMatchWidth: "any", parsePatterns: Fr, defaultParseWidth: "any" }) }, dt = { code: "en-US", formatDistance: lr, formatLong: hr, formatRelative: vr, localize: kr, match: Hr, options: { weekStartsOn: 0, firstWeekContainsDate: 1 } }; function Ir(e, n) { const t = X(e, void 0); return zt(t, At(t)) + 1; } function qt(e, n) { const t = X(e, void 0), r = +Be(t) - +Qn(t); return Math.round(r / jt) + 1; } function Ut(e, n) { var t, r, a, o; const s = X(e, n == null ? void 0 : n.in), i = s.getFullYear(), u = Ze(), h = (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, v = re((n == null ? void 0 : n.in) || e, 0); v.setFullYear(i + 1, 0, h), v.setHours(0, 0, 0, 0); const l = Te(v, n), M = re((n == null ? void 0 : n.in) || e, 0); M.setFullYear(i, 0, h), M.setHours(0, 0, 0, 0); const O = Te(M, n); return +s >= +l ? i + 1 : +s >= +O ? i : i - 1; } function zr(e, n) { var t, r, a, o; const s = Ze(), 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 = Ut(e, n), h = re((n == null ? void 0 : n.in) || e, 0); return h.setFullYear(u, 0, i), h.setHours(0, 0, 0, 0), Te(h, n); } function Gt(e, n) { const t = X(e, n == null ? void 0 : n.in), r = +Te(t, n) - +zr(t, n); return Math.round(r / jt) + 1; } function G(e, n) { const t = e < 0 ? "-" : "", r = Math.abs(e).toString().padStart(n, "0"); return t + r; } const Se = { // Year y(e, n) { const t = e.getFullYear(), r = t > 0 ? t : 1 - t; return G(n === "yy" ? r % 100 : r, n.length); }, // Month M(e, n) { const t = e.getMonth(); return n === "M" ? String(t + 1) : G(t + 1, 2); }, // Day of the month d(e, n) { return G(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 G(e.getHours() % 12 || 12, n.length); }, // Hour [0-23] H(e, n) { return G(e.getHours(), n.length); }, // Minute m(e, n) { return G(e.getMinutes(), n.length); }, // Second s(e, n) { return G(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 G(a, n.length); } }, Ye = { midnight: "midnight", noon: "noon", morning: "morning", afternoon: "afternoon", evening: "evening", night: "night" }, Mt = { // 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 Se.y(e, n); }, // Local week-numbering year Y: function(e, n, t, r) { const a = Ut(e, r), o = a > 0 ? a : 1 - a; if (n === "YY") { const s = o % 100; return G(s, 2); } return n === "Yo" ? t.ordinalNumber(o, { unit: "year" }) : G(o, n.length); }, // ISO week-numbering year R: function(e, n) { const t = It(e); return G(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 G(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 G(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 G(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 Se.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 G(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 = Gt(e, r); return n === "wo" ? t.ordinalNumber(a, { unit: "week" }) : G(a, n.length); }, // ISO week of year I: function(e, n, t) { const r = qt(e); return n === "Io" ? t.ordinalNumber(r, { unit: "week" }) : G(r, n.length); }, // Day of the month d: function(e, n, t) { return n === "do" ? t.ordinalNumber(e.getDate(), { unit: "date" }) : Se.d(e, n); }, // Day of year D: function(e, n, t) { const r = Ir(e); return n === "Do" ? t.ordinalNumber(r, { unit: "dayOfYear" }) : G(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 G(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 G(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 G(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 = Ye.noon : r === 0 ? a = Ye.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 = Ye.evening : r >= 12 ? a = Ye.afternoon : r >= 4 ? a = Ye.morning : a = Ye.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 Se.h(e, n); }, // Hour [0-23] H: function(e, n, t) { return n === "Ho" ? t.ordinalNumber(e.getHours(), { unit: "hour" }) : Se.H(e, n); }, // Hour [0-11] K: function(e, n, t) { const r = e.getHours() % 12; return n === "Ko" ? t.ordinalNumber(r, { unit: "hour" }) : G(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" }) : G(r, n.length); }, // Minute m: function(e, n, t) { return n === "mo" ? t.ordinalNumber(e.getMinutes(), { unit: "minute" }) : Se.m(e, n); }, // Second s: function(e, n, t) { return n === "so" ? t.ordinalNumber(e.getSeconds(), { unit: "second" }) : Se.s(e, n); }, // Fraction of second S: function(e, n) { return Se.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 Ne(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 Ne(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 Ne(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 Ne(r, ":"); } }, // Timezone (GMT) O: function(e, n, t) { const r = e.getTimezoneOffset(); switch (n) { // Short case "O": case "OO": case "OOO": return "GMT" + Dt(r, ":"); // Long case "OOOO": default: return "GMT" + Ne(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" + Dt(r, ":"); // Long case "zzzz": default: return "GMT" + Ne(r, ":"); } }, // Seconds timestamp t: function(e, n, t) { const r = Math.trunc(+e / 1e3); return G(r, n.length); }, // Milliseconds timestamp T: function(e, n, t) { return G(+e, n.length); } }; function Dt(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 + G(o, 2); } function kt(e, n) { return e % 60 === 0 ? (e > 0 ? "-" : "+") + G(Math.abs(e) / 60, 2) : Ne(e, n); } function Ne(e, n = "") { const t = e > 0 ? "-" : "+", r = Math.abs(e), a = G(Math.trunc(r / 60), 2), o = G(r % 60, 2); return t + a + n + o; } const xt = (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" }); } }, Qt = (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" }); } }, Br = (e, n) => { const t = e.match(/(P+)(p+)?/) || [], r = t[1], a = t[2]; if (!a) return xt(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}}", xt(r, n)).replace("{{time}}", Qt(a, n)); }, Ar = { p: Qt, P: Br }, Zr = /^D+$/, qr = /^Y+$/, Ur = ["D", "DD", "YY", "YYYY"]; function Gr(e) { return Zr.test(e); } function Qr(e) { return qr.test(e); } function Xr(e, n, t) { const r = Rr(e, n, t); if (console.warn(r), Ur.includes(e)) throw new RangeError(r); } function Rr(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 Jr = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Kr = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Vr = /^'([^]*?)'?$/, ea = /''/g, ta = /[a-zA-Z]/; function na(e, n, t) { var r, a, o, s, i, u, h, v; const l = Ze(), M = (t == null ? void 0 : t.locale) ?? l.locale ?? dt, O = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((a = (r = t == null ? void 0 : t.locale) == null ? void 0 : r.options) == null ? void 0 : a.firstWeekContainsDate) ?? l.firstWeekContainsDate ?? ((s = (o = l.locale) == null ? void 0 : o.options) == null ? void 0 : s.firstWeekContainsDate) ?? 1, W = (t == null ? void 0 : t.weekStartsOn) ?? ((u = (i = t == null ? void 0 : t.locale) == null ? void 0 : i.options) == null ? void 0 : u.weekStartsOn) ?? l.weekStartsOn ?? ((v = (h = l.locale) == null ? void 0 : h.options) == null ? void 0 : v.weekStartsOn) ?? 0, w = X(e, t == null ? void 0 : t.in); if (!er(w)) throw new RangeError("Invalid time value"); let b = n.match(Kr).map(($) => { const k = $[0]; if (k === "p" || k === "P") { const L = Ar[k]; return L($, M.formatLong); } return $; }).join("").match(Jr).map(($) => { if ($ === "''") return { isToken: !1, value: "'" }; const k = $[0]; if (k === "'") return { isToken: !1, value: ra($) }; if (Mt[k]) return { isToken: !0, value: $ }; if (k.match(ta)) throw new RangeError( "Format string contains an unescaped latin alphabet character `" + k + "`" ); return { isToken: !1, value: $ }; }); M.localize.preprocessor && (b = M.localize.preprocessor(w, b)); const x = { firstWeekContainsDate: O, weekStartsOn: W, locale: M }; return b.map(($) => { if (!$.isToken) return $.value; const k = $.value; (!(t != null && t.useAdditionalWeekYearTokens) && Qr(k) || !(t != null && t.useAdditionalDayOfYearTokens) && Gr(k)) && Xr(k, n, String(e)); const L = Mt[k[0]]; return L(w, k, M.localize, x); }).join(""); } function ra(e) { const n = e.match(Vr); return n ? n[1].replace(ea, "'") : e; } function aa(e, n) { const t = X(e, void 0), r = t.getFullYear(), a = t.getMonth(), o = re(t, 0); return o.setFullYear(r, a + 1, 0), o.setHours(0, 0, 0, 0), o.getDate(); } function oa(e, n) { return X(e, n == null ? void 0 : n.in).getMonth(); } function sa(e, n) { return X(e, n == null ? void 0 : n.in).getFullYear(); } function ia(e, n) { return +X(e) > +X(n); } function ua(e, n) { return +X(e) < +X(n); } function la(e, n, t) { const [r, a] = _e( void 0, e, n ); return r.getFullYear() === a.getFullYear() && r.getMonth() === a.getMonth(); } function da(e, n, t) { const [r, a] = _e( void 0, e, n ); return r.getFullYear() === a.getFullYear(); } function ca(e, n, t) { const r = X(e, void 0), a = r.getFullYear(), o = r.getDate(), s = re(e, 0); s.setFullYear(a, n, 15), s.setHours(0, 0, 0, 0); const i = aa(s); return r.setMonth(n, Math.min(o, i)), r; } function fa(e, n, t) { const r = X(e, void 0); return isNaN(+r) ? re(e, NaN) : (r.setFullYear(n), r); } const Ot = 5, ha = 4; function ma(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 : ha; } function Xt(e, n) { const t = n.startOfMonth(e), r = t.getDay(); return r === 1 ? t : r === 0 ? n.addDays(t, -6) : n.addDays(t, -1 * (r - 1)); } function va(e, n) { const t = Xt(e, n), r = ma(e, n); return n.addDays(t, r * 7 - 1); } class xe { /** * 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 ? ie.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 ie(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) : Ft(r, a); }, this.addMonths = (r, a) => { var o; return (o = this.overrides) != null && o.addMonths ? this.overrides.addMonths(r, a) : Ht(r, a); }, this.addWeeks = (r, a) => { var o; return (o = this.overrides) != null && o.addWeeks ? this.overrides.addWeeks(r, a) : Xn(r, a); }, this.addYears = (r, a) => { var o; return (o = this.overrides) != null && o.addYears ? this.overrides.addYears(r, a) : Rn(r, a); }, this.differenceInCalendarDays = (r, a) => { var o; return (o = this.overrides) != null && o.differenceInCalendarDays ? this.overrides.differenceInCalendarDays(r, a) : zt(r, a); }, this.differenceInCalendarMonths = (r, a) => { var o; return (o = this.overrides) != null && o.differenceInCalendarMonths ? this.overrides.differenceInCalendarMonths(r, a) : tr(r, a); }, this.eachMonthOfInterval = (r) => { var a; return (a = this.overrides) != null && a.eachMonthOfInterval ? this.overrides.eachMonthOfInterval(r) : ar(r); }, this.endOfBroadcastWeek = (r) => { var a; return (a = this.overrides) != null && a.endOfBroadcastWeek ? this.overrides.endOfBroadcastWeek(r) : va(r, this); }, this.endOfISOWeek = (r) => { var a; return (a = this.overrides) != null && a.endOfISOWeek ? this.overrides.endOfISOWeek(r) : ir(r); }, this.endOfMonth = (r) => { var a; return (a = this.overrides) != null && a.endOfMonth ? this.overrides.endOfMonth(r) : nr(r); }, this.endOfWeek = (r, a) => { var o; return (o = this.overrides) != null && o.endOfWeek ? this.overrides.endOfWeek(r, a) : Zt(r, this.options); }, this.endOfYear = (r) => { var a; return (a = this.overrides) != null && a.endOfYear ? this.overrides.endOfYear(r) : sr(r); }, this.format = (r, a, o) => { var s; const i = (s = this.overrides) != null && s.format ? this.overrides.format(r, a, this.options) : na(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) : qt(r); }, this.getMonth = (r, a) => { var o; return (o = this.overrides) != null && o.getMonth ? this.overrides.getMonth(r, this.options) : oa(r, this.options); }, this.getYear = (r, a) => { var o; return (o = this.overrides) != null && o.getYear ? this.overrides.getYear(r, this.options) : sa(r, this.options); }, this.getWeek = (r, a) => { var o; return (o = this.overrides) != null && o.getWeek ? this.overrides.getWeek(r, this.options) : Gt(r, this.options); }, this.isAfter = (r, a) => { var o; return (o = this.overrides) != null && o.isAfter ? this.overrides.isAfter(r, a) : ia(r, a); }, this.isBefore = (r, a) => { var o; return (o = this.overrides) != null && o.isBefore ? this.overrides.isBefore(r, a) : ua(r, a); }, this.isDate = (r) => { var a; return (a = this.overrides) != null && a.isDate ? this.overrides.isDate(r) : Bt(r); }, this.isSameDay = (r, a) => { var o; return (o = this.overrides) != null && o.isSameDay ? this.overrides.isSameDay(r, a) : Vn(r, a); }, this.isSameMonth = (r, a) => { var o; return (o = this.overrides) != null && o.isSameMonth ? this.overrides.isSameMonth(r, a) : la(r, a); }, this.isSameYear = (r, a) => { var o; return (o = this.overrides) != null && o.isSameYear ? this.overrides.isSameYear(r, a) : da(r, a); }, this.max = (r) => { var a; return (a = this.overrides) != null && a.max ? this.overrides.max(r) : Jn(r); }, this.min = (r) => { var a; return (a = this.overrides) != null && a.min ? this.overrides.min(r) : Kn(r); }, this.setMonth = (r, a) => { var o; return (o = this.overrides) != null && o.setMonth ? this.overrides.setMonth(r