UNPKG

@farris/ui-vue

Version:

Farris Vue, a Farris Design based Vue3 component library.

1,931 lines (1,930 loc) 375 kB
var Vo = Object.defineProperty; var Bo = (n, t, e) => t in n ? Vo(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e; var R = (n, t, e) => Bo(n, typeof t != "symbol" ? t + "" : t, e); import { ref as S, computed as q, watch as Ee, defineComponent as rt, onBeforeUnmount as Wn, withDirectives as Ro, createVNode as M, resolveDirective as Ho, createTextVNode as Nt, mergeProps as Vt, Fragment as Ut, reactive as yt, createApp as Ln, onUnmounted as rn, onMounted as Lt, Transition as $n, nextTick as an, inject as Rt, provide as Wo, triggerRef as Lo, isVNode as $o, onBeforeMount as jo, Teleport as Ao, shallowRef as qo, render as sn, h as zo, cloneVNode as Go } from "vue"; import Yo, { FDynamicFormGroup as Uo, FDynamicFormInput as Xo } from "../dynamic-form/index.esm.js"; import { cloneDeep as Tt, isPlainObject as kn, isUndefined as ut, throttle as Qo } from "lodash-es"; import { resolveField as ot, FormSchemaEntityFieldTypeName as En, useGuid as Ko, useCommonUtils as Jo, useDateFormat as Zo, useNumberFormat as er, setFieldValue as dn, getCustomClass as ln, withInstall as tr } from "../common/index.esm.js"; import { createPropsResolver as nr } from "../dynamic-resolver/index.esm.js"; import "../designer-canvas/index.esm.js"; import "../property-panel/index.esm.js"; import or from "../accordion/index.esm.js"; import rr from "../avatar/index.esm.js"; import ar from "../../designer/button-edit/index.esm.js"; import ir from "../button-group/index.esm.js"; import sr from "../calendar/index.esm.js"; import lr from "../capsule/index.esm.js"; import Fn from "../../designer/checkbox/index.esm.js"; import Mn from "../../designer/checkbox-group/index.esm.js"; import fn from "../combo-list/index.esm.js"; import ur from "../combo-tree/index.esm.js"; import cr from "../component/index.esm.js"; import dr from "../color-picker/index.esm.js"; import fr from "../content-container/index.esm.js"; import mr from "../date-picker/index.esm.js"; import pr from "../../designer/data-grid/index.esm.js"; import hr from "../dropdown/index.esm.js"; import vr from "../events-editor/index.esm.js"; import gr from "../filter-bar/index.esm.js"; import yr from "../field-selector/index.esm.js"; import br from "../binding-selector/index.esm.js"; import wr from "../image-cropper/index.esm.js"; import Cr from "../../designer/input-group/index.esm.js"; import _r from "../layout/index.esm.js"; import xr from "../list-nav/index.esm.js"; import Sr from "../list-view/index.esm.js"; import Tr from "../lookup/index.esm.js"; import kr from "../mapping-editor/index.esm.js"; import Er from "../nav/index.esm.js"; import Fr from "../number-range/index.esm.js"; import Mr from "../number-spinner/index.esm.js"; import Or from "../order/index.esm.js"; import Ir from "../page-header/index.esm.js"; import Dr from "../page-footer/index.esm.js"; import Pr from "../pagination/index.esm.js"; import Nr from "../progress/index.esm.js"; import Vr from "../query-solution/index.esm.js"; import Br from "../../designer/radio-group/index.esm.js"; import Rr from "../rate/index.esm.js"; import Hr from "../response-toolbar/index.esm.js"; import Wr from "../response-layout/index.esm.js"; import Lr from "../response-layout-editor/index.esm.js"; import $r from "../search-box/index.esm.js"; import jr from "../section/index.esm.js"; import Ar from "../smoke-detector/index.esm.js"; import qr from "../splitter/index.esm.js"; import zr from "../step/index.esm.js"; import Gr from "../switch/index.esm.js"; import Yr from "../tabs/index.esm.js"; import Ur from "../tags/index.esm.js"; import Xr from "../text/index.esm.js"; import Qr from "../time-picker/index.esm.js"; import Kr from "../transfer/index.esm.js"; import Jr from "../tree-view/index.esm.js"; import Zr from "../uploader/index.esm.js"; import ea from "../verify-detail/index.esm.js"; import ta from "../video/index.esm.js"; import na from "../textarea/index.esm.js"; import oa from "../schema-selector/index.esm.js"; import ra from "../tree-grid/index.esm.js"; import aa from "../event-parameter/index.esm.js"; import ia from "../filter-condition-editor/index.esm.js"; import sa from "../fieldset/index.esm.js"; import la from "../sort-condition-editor/index.esm.js"; import ua from "../menu-lookup/index.esm.js"; import ca from "../drawer/index.esm.js"; import da from "../json-editor/index.esm.js"; import fa from "../property-editor/index.esm.js"; import ma from "../expression-editor/index.esm.js"; import pa from "../code-editor/index.esm.js"; import ha from "../html-template/index.esm.js"; import "../external-container/index.esm.js"; import { useResizeObserver as jn } from "@vueuse/core"; import { useIdentify as va, useGroupData as ga, useFilter as ya, useHierarchy as ba, useLoading as wa, useDataView as Ca, useSelection as _a, useSelectHierarchyItem as xa, useDataViewContainerStyle as Sa, useCommandColumn as Ta, useColumn as ka, useSort as Ea, useGroupColumn as Fa, useRow as Ma, useEdit as Oa, useVisualDataBound as Ia, useVisualDataCell as Da, useVisualDataRow as Pa, useVisualData as Na, useCellPosition as Va, useSidebar as Ba, useVirtualScroll as Ra, useFitColumn as Ha, useFilterHistory as Wa, useColumnFilter as La, useDragColumn as $a, getColumnHeader as ja, getSidebar as Aa, getDisableMask as qa, getHorizontalScrollbar as za, getVerticalScrollbar as Ga, getEmpty as Ya } from "../data-view/index.esm.js"; import "../modal/index.esm.js"; import "../condition/index.esm.js"; import { FCheckbox as Ua } from "../checkbox/index.esm.js"; import On from "../tooltip/index.esm.js"; import Xa from "../button/index.esm.js"; import "../notify/index.esm.js"; const An = { conditions: { type: Array, default: [] }, fields: { type: Array, default: [] }, key: { type: String, default: "" }, /** * 控间标签同行展示 */ isControlInline: { type: Boolean, default: !0 } }; class qn { constructor(t = { value: [] }) { R(this, "editorType", "check-box"); R(this, "value"); R(this, "valueType", "boolean"); const o = (Array.isArray(t.value) ? t.value : typeof t.value == "string" ? t.value.split(",") : []).map((r) => JSON.parse(r)); this.value = o; } clear() { this.value = []; } setValue(t) { this.value = t; } getValue() { return this.value; } getDisplayText() { return this.value.map((t) => t ? "是" : "否").join(","); } isEmpty() { return this.value.length === 0; } } class zn { constructor(t = { textValue: "", value: "", valueField: "" }) { R(this, "editorType", "combo-lookup"); R(this, "textValue"); R(this, "value"); R(this, "valueField"); R(this, "valueType", "text"); this.textValue = t.textValue, this.value = t.value, this.valueField = t.valueField; } clear() { this.value = "", this.valueField = "", this.textValue = ""; } getPropValue(t, e) { if (e.length > 1) { const o = e.shift(); return t[o] ? this.getPropValue(t[o], e) : null; } return t[e[0]]; } getTextValue(t) { const e = t.split("."), o = this.value.split(",").map((r) => this.getPropValue(r, Tt(e))); return o && o.length ? o.join(",") : ""; } getValue() { const t = this.valueField.split("."), e = this.value.split(",").map((o) => this.getPropValue(o, Tt(t))); return e && e.length ? e.join(",") : ""; } getDisplayText() { return this.getValue(); } setValue(t) { throw new Error("Method not implemented."); } isEmpty() { return !this.valueField; } } function Ye(n) { const t = Object.prototype.toString.call(n); return n instanceof Date || typeof n == "object" && t === "[object Date]" ? new n.constructor(+n) : typeof n == "number" || t === "[object Number]" || typeof n == "string" || t === "[object String]" ? new Date(n) : /* @__PURE__ */ new Date(NaN); } function Le(n, t) { return n instanceof Date ? new n.constructor(t) : new Date(t); } function Gn(n, t) { const e = Ye(n); return isNaN(t) ? Le(n, NaN) : (t && e.setDate(e.getDate() + t), e); } const Yn = 6048e5, Qa = 864e5, Ka = 6e4, Ja = 36e5, Za = 1e3; let ei = {}; function $t() { return ei; } function kt(n, t) { var s, l, u, c; const e = $t(), o = (t == null ? void 0 : t.weekStartsOn) ?? ((l = (s = t == null ? void 0 : t.locale) == null ? void 0 : s.options) == null ? void 0 : l.weekStartsOn) ?? e.weekStartsOn ?? ((c = (u = e.locale) == null ? void 0 : u.options) == null ? void 0 : c.weekStartsOn) ?? 0, r = Ye(n), a = r.getDay(), i = (a < o ? 7 : 0) + a - o; return r.setDate(r.getDate() - i), r.setHours(0, 0, 0, 0), r; } function Wt(n) { return kt(n, { weekStartsOn: 1 }); } function Un(n) { const t = Ye(n), e = t.getFullYear(), o = Le(n, 0); o.setFullYear(e + 1, 0, 4), o.setHours(0, 0, 0, 0); const r = Wt(o), a = Le(n, 0); a.setFullYear(e, 0, 4), a.setHours(0, 0, 0, 0); const i = Wt(a); return t.getTime() >= r.getTime() ? e + 1 : t.getTime() >= i.getTime() ? e : e - 1; } function In(n) { const t = Ye(n); return t.setHours(0, 0, 0, 0), t; } function Zt(n) { const t = Ye(n), e = new Date( Date.UTC( t.getFullYear(), t.getMonth(), t.getDate(), t.getHours(), t.getMinutes(), t.getSeconds(), t.getMilliseconds() ) ); return e.setUTCFullYear(t.getFullYear()), +n - +e; } function ti(n, t) { const e = In(n), o = In(t), r = +e - Zt(e), a = +o - Zt(o); return Math.round((r - a) / Qa); } function ni(n) { const t = Un(n), e = Le(n, 0); return e.setFullYear(t, 0, 4), e.setHours(0, 0, 0, 0), Wt(e); } function oi(n) { return n instanceof Date || typeof n == "object" && Object.prototype.toString.call(n) === "[object Date]"; } function ri(n) { if (!oi(n) && typeof n != "number") return !1; const t = Ye(n); return !isNaN(Number(t)); } function ai(n) { const t = Ye(n), e = Le(n, 0); return e.setFullYear(t.getFullYear(), 0, 1), e.setHours(0, 0, 0, 0), e; } const ii = { 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" } }, si = (n, t, e) => { let o; const r = ii[n]; return typeof r == "string" ? o = r : t === 1 ? o = r.one : o = r.other.replace("{{count}}", t.toString()), e != null && e.addSuffix ? e.comparison && e.comparison > 0 ? "in " + o : o + " ago" : o; }; function un(n) { return (t = {}) => { const e = t.width ? String(t.width) : n.defaultWidth; return n.formats[e] || n.formats[n.defaultWidth]; }; } const li = { full: "EEEE, MMMM do, y", long: "MMMM do, y", medium: "MMM d, y", short: "MM/dd/yyyy" }, ui = { full: "h:mm:ss a zzzz", long: "h:mm:ss a z", medium: "h:mm:ss a", short: "h:mm a" }, ci = { full: "{{date}} 'at' {{time}}", long: "{{date}} 'at' {{time}}", medium: "{{date}}, {{time}}", short: "{{date}}, {{time}}" }, di = { date: un({ formats: li, defaultWidth: "full" }), time: un({ formats: ui, defaultWidth: "full" }), dateTime: un({ formats: ci, defaultWidth: "full" }) }, fi = { lastWeek: "'last' eeee 'at' p", yesterday: "'yesterday at' p", today: "'today at' p", tomorrow: "'tomorrow at' p", nextWeek: "eeee 'at' p", other: "P" }, mi = (n, t, e, o) => fi[n]; function At(n) { return (t, e) => { const o = e != null && e.context ? String(e.context) : "standalone"; let r; if (o === "formatting" && n.formattingValues) { const i = n.defaultFormattingWidth || n.defaultWidth, s = e != null && e.width ? String(e.width) : i; r = n.formattingValues[s] || n.formattingValues[i]; } else { const i = n.defaultWidth, s = e != null && e.width ? String(e.width) : n.defaultWidth; r = n.values[s] || n.values[i]; } const a = n.argumentCallback ? n.argumentCallback(t) : t; return r[a]; }; } const pi = { narrow: ["B", "A"], abbreviated: ["BC", "AD"], wide: ["Before Christ", "Anno Domini"] }, hi = { narrow: ["1", "2", "3", "4"], abbreviated: ["Q1", "Q2", "Q3", "Q4"], wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"] }, vi = { 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" ] }, gi = { 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" ] }, yi = { 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" } }, bi = { 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" } }, wi = (n, t) => { const e = Number(n), o = e % 100; if (o > 20 || o < 10) switch (o % 10) { case 1: return e + "st"; case 2: return e + "nd"; case 3: return e + "rd"; } return e + "th"; }, Ci = { ordinalNumber: wi, era: At({ values: pi, defaultWidth: "wide" }), quarter: At({ values: hi, defaultWidth: "wide", argumentCallback: (n) => n - 1 }), month: At({ values: vi, defaultWidth: "wide" }), day: At({ values: gi, defaultWidth: "wide" }), dayPeriod: At({ values: yi, defaultWidth: "wide", formattingValues: bi, defaultFormattingWidth: "wide" }) }; function qt(n) { return (t, e = {}) => { const o = e.width, r = o && n.matchPatterns[o] || n.matchPatterns[n.defaultMatchWidth], a = t.match(r); if (!a) return null; const i = a[0], s = o && n.parsePatterns[o] || n.parsePatterns[n.defaultParseWidth], l = Array.isArray(s) ? xi(s, (d) => d.test(i)) : ( // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type _i(s, (d) => d.test(i)) ); let u; u = n.valueCallback ? n.valueCallback(l) : l, u = e.valueCallback ? ( // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type e.valueCallback(u) ) : u; const c = t.slice(i.length); return { value: u, rest: c }; }; } function _i(n, t) { for (const e in n) if (Object.prototype.hasOwnProperty.call(n, e) && t(n[e])) return e; } function xi(n, t) { for (let e = 0; e < n.length; e++) if (t(n[e])) return e; } function Si(n) { return (t, e = {}) => { const o = t.match(n.matchPattern); if (!o) return null; const r = o[0], a = t.match(n.parsePattern); if (!a) return null; let i = n.valueCallback ? n.valueCallback(a[0]) : a[0]; i = e.valueCallback ? e.valueCallback(i) : i; const s = t.slice(r.length); return { value: i, rest: s }; }; } const Ti = /^(\d+)(th|st|nd|rd)?/i, ki = /\d+/i, Ei = { 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 }, Fi = { any: [/^b/i, /^(a|c)/i] }, Mi = { narrow: /^[1234]/i, abbreviated: /^q[1234]/i, wide: /^[1234](th|st|nd|rd)? quarter/i }, Oi = { any: [/1/i, /2/i, /3/i, /4/i] }, Ii = { 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 }, Di = { 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 ] }, Pi = { 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 }, Ni = { 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] }, Vi = { 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 }, Bi = { 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 } }, Ri = { ordinalNumber: Si({ matchPattern: Ti, parsePattern: ki, valueCallback: (n) => parseInt(n, 10) }), era: qt({ matchPatterns: Ei, defaultMatchWidth: "wide", parsePatterns: Fi, defaultParseWidth: "any" }), quarter: qt({ matchPatterns: Mi, defaultMatchWidth: "wide", parsePatterns: Oi, defaultParseWidth: "any", valueCallback: (n) => n + 1 }), month: qt({ matchPatterns: Ii, defaultMatchWidth: "wide", parsePatterns: Di, defaultParseWidth: "any" }), day: qt({ matchPatterns: Pi, defaultMatchWidth: "wide", parsePatterns: Ni, defaultParseWidth: "any" }), dayPeriod: qt({ matchPatterns: Vi, defaultMatchWidth: "any", parsePatterns: Bi, defaultParseWidth: "any" }) }, Xn = { code: "en-US", formatDistance: si, formatLong: di, formatRelative: mi, localize: Ci, match: Ri, options: { weekStartsOn: 0, firstWeekContainsDate: 1 } }; function Hi(n) { const t = Ye(n); return ti(t, ai(t)) + 1; } function Qn(n) { const t = Ye(n), e = +Wt(t) - +ni(t); return Math.round(e / Yn) + 1; } function gn(n, t) { var c, d, m, p; const e = Ye(n), o = e.getFullYear(), r = $t(), a = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((d = (c = t == null ? void 0 : t.locale) == null ? void 0 : c.options) == null ? void 0 : d.firstWeekContainsDate) ?? r.firstWeekContainsDate ?? ((p = (m = r.locale) == null ? void 0 : m.options) == null ? void 0 : p.firstWeekContainsDate) ?? 1, i = Le(n, 0); i.setFullYear(o + 1, 0, a), i.setHours(0, 0, 0, 0); const s = kt(i, t), l = Le(n, 0); l.setFullYear(o, 0, a), l.setHours(0, 0, 0, 0); const u = kt(l, t); return e.getTime() >= s.getTime() ? o + 1 : e.getTime() >= u.getTime() ? o : o - 1; } function Wi(n, t) { var s, l, u, c; const e = $t(), o = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((l = (s = t == null ? void 0 : t.locale) == null ? void 0 : s.options) == null ? void 0 : l.firstWeekContainsDate) ?? e.firstWeekContainsDate ?? ((c = (u = e.locale) == null ? void 0 : u.options) == null ? void 0 : c.firstWeekContainsDate) ?? 1, r = gn(n, t), a = Le(n, 0); return a.setFullYear(r, 0, o), a.setHours(0, 0, 0, 0), kt(a, t); } function Kn(n, t) { const e = Ye(n), o = +kt(e, t) - +Wi(e, t); return Math.round(o / Yn) + 1; } function Oe(n, t) { const e = n < 0 ? "-" : "", o = Math.abs(n).toString().padStart(t, "0"); return e + o; } const _t = { // Year y(n, t) { const e = n.getFullYear(), o = e > 0 ? e : 1 - e; return Oe(t === "yy" ? o % 100 : o, t.length); }, // Month M(n, t) { const e = n.getMonth(); return t === "M" ? String(e + 1) : Oe(e + 1, 2); }, // Day of the month d(n, t) { return Oe(n.getDate(), t.length); }, // AM or PM a(n, t) { const e = n.getHours() / 12 >= 1 ? "pm" : "am"; switch (t) { case "a": case "aa": return e.toUpperCase(); case "aaa": return e; case "aaaaa": return e[0]; case "aaaa": default: return e === "am" ? "a.m." : "p.m."; } }, // Hour [1-12] h(n, t) { return Oe(n.getHours() % 12 || 12, t.length); }, // Hour [0-23] H(n, t) { return Oe(n.getHours(), t.length); }, // Minute m(n, t) { return Oe(n.getMinutes(), t.length); }, // Second s(n, t) { return Oe(n.getSeconds(), t.length); }, // Fraction of second S(n, t) { const e = t.length, o = n.getMilliseconds(), r = Math.trunc( o * Math.pow(10, e - 3) ); return Oe(r, t.length); } }, Bt = { am: "am", pm: "pm", midnight: "midnight", noon: "noon", morning: "morning", afternoon: "afternoon", evening: "evening", night: "night" }, Dn = { // Era G: function(n, t, e) { const o = n.getFullYear() > 0 ? 1 : 0; switch (t) { case "G": case "GG": case "GGG": return e.era(o, { width: "abbreviated" }); case "GGGGG": return e.era(o, { width: "narrow" }); case "GGGG": default: return e.era(o, { width: "wide" }); } }, // Year y: function(n, t, e) { if (t === "yo") { const o = n.getFullYear(), r = o > 0 ? o : 1 - o; return e.ordinalNumber(r, { unit: "year" }); } return _t.y(n, t); }, // Local week-numbering year Y: function(n, t, e, o) { const r = gn(n, o), a = r > 0 ? r : 1 - r; if (t === "YY") { const i = a % 100; return Oe(i, 2); } return t === "Yo" ? e.ordinalNumber(a, { unit: "year" }) : Oe(a, t.length); }, // ISO week-numbering year R: function(n, t) { const e = Un(n); return Oe(e, t.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(n, t) { const e = n.getFullYear(); return Oe(e, t.length); }, // Quarter Q: function(n, t, e) { const o = Math.ceil((n.getMonth() + 1) / 3); switch (t) { case "Q": return String(o); case "QQ": return Oe(o, 2); case "Qo": return e.ordinalNumber(o, { unit: "quarter" }); case "QQQ": return e.quarter(o, { width: "abbreviated", context: "formatting" }); case "QQQQQ": return e.quarter(o, { width: "narrow", context: "formatting" }); case "QQQQ": default: return e.quarter(o, { width: "wide", context: "formatting" }); } }, // Stand-alone quarter q: function(n, t, e) { const o = Math.ceil((n.getMonth() + 1) / 3); switch (t) { case "q": return String(o); case "qq": return Oe(o, 2); case "qo": return e.ordinalNumber(o, { unit: "quarter" }); case "qqq": return e.quarter(o, { width: "abbreviated", context: "standalone" }); case "qqqqq": return e.quarter(o, { width: "narrow", context: "standalone" }); case "qqqq": default: return e.quarter(o, { width: "wide", context: "standalone" }); } }, // Month M: function(n, t, e) { const o = n.getMonth(); switch (t) { case "M": case "MM": return _t.M(n, t); case "Mo": return e.ordinalNumber(o + 1, { unit: "month" }); case "MMM": return e.month(o, { width: "abbreviated", context: "formatting" }); case "MMMMM": return e.month(o, { width: "narrow", context: "formatting" }); case "MMMM": default: return e.month(o, { width: "wide", context: "formatting" }); } }, // Stand-alone month L: function(n, t, e) { const o = n.getMonth(); switch (t) { case "L": return String(o + 1); case "LL": return Oe(o + 1, 2); case "Lo": return e.ordinalNumber(o + 1, { unit: "month" }); case "LLL": return e.month(o, { width: "abbreviated", context: "standalone" }); case "LLLLL": return e.month(o, { width: "narrow", context: "standalone" }); case "LLLL": default: return e.month(o, { width: "wide", context: "standalone" }); } }, // Local week of year w: function(n, t, e, o) { const r = Kn(n, o); return t === "wo" ? e.ordinalNumber(r, { unit: "week" }) : Oe(r, t.length); }, // ISO week of year I: function(n, t, e) { const o = Qn(n); return t === "Io" ? e.ordinalNumber(o, { unit: "week" }) : Oe(o, t.length); }, // Day of the month d: function(n, t, e) { return t === "do" ? e.ordinalNumber(n.getDate(), { unit: "date" }) : _t.d(n, t); }, // Day of year D: function(n, t, e) { const o = Hi(n); return t === "Do" ? e.ordinalNumber(o, { unit: "dayOfYear" }) : Oe(o, t.length); }, // Day of week E: function(n, t, e) { const o = n.getDay(); switch (t) { case "E": case "EE": case "EEE": return e.day(o, { width: "abbreviated", context: "formatting" }); case "EEEEE": return e.day(o, { width: "narrow", context: "formatting" }); case "EEEEEE": return e.day(o, { width: "short", context: "formatting" }); case "EEEE": default: return e.day(o, { width: "wide", context: "formatting" }); } }, // Local day of week e: function(n, t, e, o) { const r = n.getDay(), a = (r - o.weekStartsOn + 8) % 7 || 7; switch (t) { case "e": return String(a); case "ee": return Oe(a, 2); case "eo": return e.ordinalNumber(a, { unit: "day" }); case "eee": return e.day(r, { width: "abbreviated", context: "formatting" }); case "eeeee": return e.day(r, { width: "narrow", context: "formatting" }); case "eeeeee": return e.day(r, { width: "short", context: "formatting" }); case "eeee": default: return e.day(r, { width: "wide", context: "formatting" }); } }, // Stand-alone local day of week c: function(n, t, e, o) { const r = n.getDay(), a = (r - o.weekStartsOn + 8) % 7 || 7; switch (t) { case "c": return String(a); case "cc": return Oe(a, t.length); case "co": return e.ordinalNumber(a, { unit: "day" }); case "ccc": return e.day(r, { width: "abbreviated", context: "standalone" }); case "ccccc": return e.day(r, { width: "narrow", context: "standalone" }); case "cccccc": return e.day(r, { width: "short", context: "standalone" }); case "cccc": default: return e.day(r, { width: "wide", context: "standalone" }); } }, // ISO day of week i: function(n, t, e) { const o = n.getDay(), r = o === 0 ? 7 : o; switch (t) { case "i": return String(r); case "ii": return Oe(r, t.length); case "io": return e.ordinalNumber(r, { unit: "day" }); case "iii": return e.day(o, { width: "abbreviated", context: "formatting" }); case "iiiii": return e.day(o, { width: "narrow", context: "formatting" }); case "iiiiii": return e.day(o, { width: "short", context: "formatting" }); case "iiii": default: return e.day(o, { width: "wide", context: "formatting" }); } }, // AM or PM a: function(n, t, e) { const r = n.getHours() / 12 >= 1 ? "pm" : "am"; switch (t) { case "a": case "aa": return e.dayPeriod(r, { width: "abbreviated", context: "formatting" }); case "aaa": return e.dayPeriod(r, { width: "abbreviated", context: "formatting" }).toLowerCase(); case "aaaaa": return e.dayPeriod(r, { width: "narrow", context: "formatting" }); case "aaaa": default: return e.dayPeriod(r, { width: "wide", context: "formatting" }); } }, // AM, PM, midnight, noon b: function(n, t, e) { const o = n.getHours(); let r; switch (o === 12 ? r = Bt.noon : o === 0 ? r = Bt.midnight : r = o / 12 >= 1 ? "pm" : "am", t) { case "b": case "bb": return e.dayPeriod(r, { width: "abbreviated", context: "formatting" }); case "bbb": return e.dayPeriod(r, { width: "abbreviated", context: "formatting" }).toLowerCase(); case "bbbbb": return e.dayPeriod(r, { width: "narrow", context: "formatting" }); case "bbbb": default: return e.dayPeriod(r, { width: "wide", context: "formatting" }); } }, // in the morning, in the afternoon, in the evening, at night B: function(n, t, e) { const o = n.getHours(); let r; switch (o >= 17 ? r = Bt.evening : o >= 12 ? r = Bt.afternoon : o >= 4 ? r = Bt.morning : r = Bt.night, t) { case "B": case "BB": case "BBB": return e.dayPeriod(r, { width: "abbreviated", context: "formatting" }); case "BBBBB": return e.dayPeriod(r, { width: "narrow", context: "formatting" }); case "BBBB": default: return e.dayPeriod(r, { width: "wide", context: "formatting" }); } }, // Hour [1-12] h: function(n, t, e) { if (t === "ho") { let o = n.getHours() % 12; return o === 0 && (o = 12), e.ordinalNumber(o, { unit: "hour" }); } return _t.h(n, t); }, // Hour [0-23] H: function(n, t, e) { return t === "Ho" ? e.ordinalNumber(n.getHours(), { unit: "hour" }) : _t.H(n, t); }, // Hour [0-11] K: function(n, t, e) { const o = n.getHours() % 12; return t === "Ko" ? e.ordinalNumber(o, { unit: "hour" }) : Oe(o, t.length); }, // Hour [1-24] k: function(n, t, e) { let o = n.getHours(); return o === 0 && (o = 24), t === "ko" ? e.ordinalNumber(o, { unit: "hour" }) : Oe(o, t.length); }, // Minute m: function(n, t, e) { return t === "mo" ? e.ordinalNumber(n.getMinutes(), { unit: "minute" }) : _t.m(n, t); }, // Second s: function(n, t, e) { return t === "so" ? e.ordinalNumber(n.getSeconds(), { unit: "second" }) : _t.s(n, t); }, // Fraction of second S: function(n, t) { return _t.S(n, t); }, // Timezone (ISO-8601. If offset is 0, output is always `'Z'`) X: function(n, t, e) { const o = n.getTimezoneOffset(); if (o === 0) return "Z"; switch (t) { case "X": return Nn(o); case "XXXX": case "XX": return Dt(o); case "XXXXX": case "XXX": default: return Dt(o, ":"); } }, // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent) x: function(n, t, e) { const o = n.getTimezoneOffset(); switch (t) { case "x": return Nn(o); case "xxxx": case "xx": return Dt(o); case "xxxxx": case "xxx": default: return Dt(o, ":"); } }, // Timezone (GMT) O: function(n, t, e) { const o = n.getTimezoneOffset(); switch (t) { case "O": case "OO": case "OOO": return "GMT" + Pn(o, ":"); case "OOOO": default: return "GMT" + Dt(o, ":"); } }, // Timezone (specific non-location) z: function(n, t, e) { const o = n.getTimezoneOffset(); switch (t) { case "z": case "zz": case "zzz": return "GMT" + Pn(o, ":"); case "zzzz": default: return "GMT" + Dt(o, ":"); } }, // Seconds timestamp t: function(n, t, e) { const o = Math.trunc(n.getTime() / 1e3); return Oe(o, t.length); }, // Milliseconds timestamp T: function(n, t, e) { const o = n.getTime(); return Oe(o, t.length); } }; function Pn(n, t = "") { const e = n > 0 ? "-" : "+", o = Math.abs(n), r = Math.trunc(o / 60), a = o % 60; return a === 0 ? e + String(r) : e + String(r) + t + Oe(a, 2); } function Nn(n, t) { return n % 60 === 0 ? (n > 0 ? "-" : "+") + Oe(Math.abs(n) / 60, 2) : Dt(n, t); } function Dt(n, t = "") { const e = n > 0 ? "-" : "+", o = Math.abs(n), r = Oe(Math.trunc(o / 60), 2), a = Oe(o % 60, 2); return e + r + t + a; } const Vn = (n, t) => { switch (n) { case "P": return t.date({ width: "short" }); case "PP": return t.date({ width: "medium" }); case "PPP": return t.date({ width: "long" }); case "PPPP": default: return t.date({ width: "full" }); } }, Jn = (n, t) => { switch (n) { case "p": return t.time({ width: "short" }); case "pp": return t.time({ width: "medium" }); case "ppp": return t.time({ width: "long" }); case "pppp": default: return t.time({ width: "full" }); } }, Li = (n, t) => { const e = n.match(/(P+)(p+)?/) || [], o = e[1], r = e[2]; if (!r) return Vn(n, t); let a; switch (o) { case "P": a = t.dateTime({ width: "short" }); break; case "PP": a = t.dateTime({ width: "medium" }); break; case "PPP": a = t.dateTime({ width: "long" }); break; case "PPPP": default: a = t.dateTime({ width: "full" }); break; } return a.replace("{{date}}", Vn(o, t)).replace("{{time}}", Jn(r, t)); }, mn = { p: Jn, P: Li }, $i = /^D+$/, ji = /^Y+$/, Ai = ["D", "DD", "YY", "YYYY"]; function Zn(n) { return $i.test(n); } function eo(n) { return ji.test(n); } function pn(n, t, e) { const o = qi(n, t, e); if (console.warn(o), Ai.includes(n)) throw new RangeError(o); } function qi(n, t, e) { const o = n[0] === "Y" ? "years" : "days of the month"; return `Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${t}\`) for formatting ${o} to the input \`${e}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`; } const zi = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Gi = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Yi = /^'([^]*?)'?$/, Ui = /''/g, Xi = /[a-zA-Z]/; function to(n, t, e) { var c, d, m, p; const o = $t(), r = o.locale ?? Xn, a = o.firstWeekContainsDate ?? ((d = (c = o.locale) == null ? void 0 : c.options) == null ? void 0 : d.firstWeekContainsDate) ?? 1, i = o.weekStartsOn ?? ((p = (m = o.locale) == null ? void 0 : m.options) == null ? void 0 : p.weekStartsOn) ?? 0, s = Ye(n); if (!ri(s)) throw new RangeError("Invalid time value"); let l = t.match(Gi).map((h) => { const O = h[0]; if (O === "p" || O === "P") { const x = mn[O]; return x(h, r.formatLong); } return h; }).join("").match(zi).map((h) => { if (h === "''") return { isToken: !1, value: "'" }; const O = h[0]; if (O === "'") return { isToken: !1, value: Qi(h) }; if (Dn[O]) return { isToken: !0, value: h }; if (O.match(Xi)) throw new RangeError( "Format string contains an unescaped latin alphabet character `" + O + "`" ); return { isToken: !1, value: h }; }); r.localize.preprocessor && (l = r.localize.preprocessor(s, l)); const u = { firstWeekContainsDate: a, weekStartsOn: i, locale: r }; return l.map((h) => { if (!h.isToken) return h.value; const O = h.value; (eo(O) || Zn(O)) && pn(O, t, String(n)); const x = Dn[O[0]]; return x(s, O, r.localize, u); }).join(""); } function Qi(n) { const t = n.match(Yi); return t ? t[1].replace(Ui, "'") : n; } function Ki() { return Object.assign({}, $t()); } function Ji(n) { let e = Ye(n).getDay(); return e === 0 && (e = 7), e; } function Zi(n, t) { const e = t instanceof Date ? Le(t, 0) : new t(0); return e.setFullYear( n.getFullYear(), n.getMonth(), n.getDate() ), e.setHours( n.getHours(), n.getMinutes(), n.getSeconds(), n.getMilliseconds() ), e; } const es = 10; class no { constructor() { R(this, "subPriority", 0); } validate(t, e) { return !0; } } class ts extends no { constructor(t, e, o, r, a) { super(), this.value = t, this.validateValue = e, this.setValue = o, this.priority = r, a && (this.subPriority = a); } validate(t, e) { return this.validateValue(t, this.value, e); } set(t, e, o) { return this.setValue(t, e, this.value, o); } } class ns extends no { constructor() { super(...arguments); R(this, "priority", es); R(this, "subPriority", -1); } set(e, o) { return o.timestampIsSet ? e : Le(e, Zi(e, Date)); } } class Fe { run(t, e, o, r) { const a = this.parse(t, e, o, r); return a ? { setter: new ts( a.value, this.validate, this.set, this.priority, this.subPriority ), rest: a.rest } : null; } validate(t, e, o) { return !0; } } class os extends Fe { constructor() { super(...arguments); R(this, "priority", 140); R(this, "incompatibleTokens", ["R", "u", "t", "T"]); } parse(e, o, r) { switch (o) { case "G": case "GG": case "GGG": return r.era(e, { width: "abbreviated" }) || r.era(e, { width: "narrow" }); case "GGGGG": return r.era(e, { width: "narrow" }); case "GGGG": default: return r.era(e, { width: "wide" }) || r.era(e, { width: "abbreviated" }) || r.era(e, { width: "narrow" }); } } set(e, o, r) { return o.era = r, e.setFullYear(r, 0, 1), e.setHours(0, 0, 0, 0), e; } } const je = { month: /^(1[0-2]|0?\d)/, // 0 to 12 date: /^(3[0-1]|[0-2]?\d)/, // 0 to 31 dayOfYear: /^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/, // 0 to 366 week: /^(5[0-3]|[0-4]?\d)/, // 0 to 53 hour23h: /^(2[0-3]|[0-1]?\d)/, // 0 to 23 hour24h: /^(2[0-4]|[0-1]?\d)/, // 0 to 24 hour11h: /^(1[0-1]|0?\d)/, // 0 to 11 hour12h: /^(1[0-2]|0?\d)/, // 0 to 12 minute: /^[0-5]?\d/, // 0 to 59 second: /^[0-5]?\d/, // 0 to 59 singleDigit: /^\d/, // 0 to 9 twoDigits: /^\d{1,2}/, // 0 to 99 threeDigits: /^\d{1,3}/, // 0 to 999 fourDigits: /^\d{1,4}/, // 0 to 9999 anyDigitsSigned: /^-?\d+/, singleDigitSigned: /^-?\d/, // 0 to 9, -0 to -9 twoDigitsSigned: /^-?\d{1,2}/, // 0 to 99, -0 to -99 threeDigitsSigned: /^-?\d{1,3}/, // 0 to 999, -0 to -999 fourDigitsSigned: /^-?\d{1,4}/ // 0 to 9999, -0 to -9999 }, ft = { basicOptionalMinutes: /^([+-])(\d{2})(\d{2})?|Z/, basic: /^([+-])(\d{2})(\d{2})|Z/, basicOptionalSeconds: /^([+-])(\d{2})(\d{2})((\d{2}))?|Z/, extended: /^([+-])(\d{2}):(\d{2})|Z/, extendedOptionalSeconds: /^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/ }; function Ae(n, t) { return n && { value: t(n.value), rest: n.rest }; } function We(n, t) { const e = t.match(n); return e ? { value: parseInt(e[0], 10), rest: t.slice(e[0].length) } : null; } function mt(n, t) { const e = t.match(n); if (!e) return null; if (e[0] === "Z") return { value: 0, rest: t.slice(1) }; const o = e[1] === "+" ? 1 : -1, r = e[2] ? parseInt(e[2], 10) : 0, a = e[3] ? parseInt(e[3], 10) : 0, i = e[5] ? parseInt(e[5], 10) : 0; return { value: o * (r * Ja + a * Ka + i * Za), rest: t.slice(e[0].length) }; } function oo(n) { return We(je.anyDigitsSigned, n); } function $e(n, t) { switch (n) { case 1: return We(je.singleDigit, t); case 2: return We(je.twoDigits, t); case 3: return We(je.threeDigits, t); case 4: return We(je.fourDigits, t); default: return We(new RegExp("^\\d{1," + n + "}"), t); } } function en(n, t) { switch (n) { case 1: return We(je.singleDigitSigned, t); case 2: return We(je.twoDigitsSigned, t); case 3: return We(je.threeDigitsSigned, t); case 4: return We(je.fourDigitsSigned, t); default: return We(new RegExp("^-?\\d{1," + n + "}"), t); } } function yn(n) { switch (n) { case "morning": return 4; case "evening": return 17; case "pm": case "noon": case "afternoon": return 12; case "am": case "midnight": case "night": default: return 0; } } function ro(n, t) { const e = t > 0, o = e ? t : 1 - t; let r; if (o <= 50) r = n || 100; else { const a = o + 50, i = Math.trunc(a / 100) * 100, s = n >= a % 100; r = n + i - (s ? 100 : 0); } return e ? r : 1 - r; } function ao(n) { return n % 400 === 0 || n % 4 === 0 && n % 100 !== 0; } class rs extends Fe { constructor() { super(...arguments); R(this, "priority", 130); R(this, "incompatibleTokens", ["Y", "R", "u", "w", "I", "i", "e", "c", "t", "T"]); } parse(e, o, r) { const a = (i) => ({ year: i, isTwoDigitYear: o === "yy" }); switch (o) { case "y": return Ae($e(4, e), a); case "yo": return Ae( r.ordinalNumber(e, { unit: "year" }), a ); default: return Ae($e(o.length, e), a); } } validate(e, o) { return o.isTwoDigitYear || o.year > 0; } set(e, o, r) { const a = e.getFullYear(); if (r.isTwoDigitYear) { const s = ro( r.year, a ); return e.setFullYear(s, 0, 1), e.setHours(0, 0, 0, 0), e; } const i = !("era" in o) || o.era === 1 ? r.year : 1 - r.year; return e.setFullYear(i, 0, 1), e.setHours(0, 0, 0, 0), e; } } class as extends Fe { constructor() { super(...arguments); R(this, "priority", 130); R(this, "incompatibleTokens", [ "y", "R", "u", "Q", "q", "M", "L", "I", "d", "D", "i", "t", "T" ]); } parse(e, o, r) { const a = (i) => ({ year: i, isTwoDigitYear: o === "YY" }); switch (o) { case "Y": return Ae($e(4, e), a); case "Yo": return Ae( r.ordinalNumber(e, { unit: "year" }), a ); default: return Ae($e(o.length, e), a); } } validate(e, o) { return o.isTwoDigitYear || o.year > 0; } set(e, o, r, a) { const i = gn(e, a); if (r.isTwoDigitYear) { const l = ro( r.year, i ); return e.setFullYear( l, 0, a.firstWeekContainsDate ), e.setHours(0, 0, 0, 0), kt(e, a); } const s = !("era" in o) || o.era === 1 ? r.year : 1 - r.year; return e.setFullYear(s, 0, a.firstWeekContainsDate), e.setHours(0, 0, 0, 0), kt(e, a); } } class is extends Fe { constructor() { super(...arguments); R(this, "priority", 130); R(this, "incompatibleTokens", [ "G", "y", "Y", "u", "Q", "q", "M", "L", "w", "d", "D", "e", "c", "t", "T" ]); } parse(e, o) { return en(o === "R" ? 4 : o.length, e); } set(e, o, r) { const a = Le(e, 0); return a.setFullYear(r, 0, 4), a.setHours(0, 0, 0, 0), Wt(a); } } class ss extends Fe { constructor() { super(...arguments); R(this, "priority", 130); R(this, "incompatibleTokens", ["G", "y", "Y", "R", "w", "I", "i", "e", "c", "t", "T"]); } parse(e, o) { return en(o === "u" ? 4 : o.length, e); } set(e, o, r) { return e.setFullYear(r, 0, 1), e.setHours(0, 0, 0, 0), e; } } class ls extends Fe { constructor() { super(...arguments); R(this, "priority", 120); R(this, "incompatibleTokens", [ "Y", "R", "q", "M", "L", "w", "I", "d", "D", "i", "e", "c", "t", "T" ]); } parse(e, o, r) { switch (o) { case "Q": case "QQ": return $e(o.length, e); case "Qo": return r.ordinalNumber(e, { unit: "quarter" }); case "QQQ": return r.quarter(e, { width: "abbreviated", context: "formatting" }) || r.quarter(e, { width: "narrow", context: "formatting" }); case "QQQQQ": return r.quarter(e, { width: "narrow", context: "formatting" }); case "QQQQ": default: return r.quarter(e, { width: "wide", context: "formatting" }) || r.quarter(e, { width: "abbreviated", context: "formatting" }) || r.quarter(e, { width: "narrow", context: "formatting" }); } } validate(e, o) { return o >= 1 && o <= 4; } set(e, o, r) { return e.setMonth((r - 1) * 3, 1), e.setHours(0, 0, 0, 0), e; } } class us extends Fe { constructor() { super(...arguments); R(this, "priority", 120); R(this, "incompatibleTokens", [ "Y", "R", "Q", "M", "L", "w", "I", "d", "D", "i", "e", "c", "t", "T" ]); } parse(e, o, r) { switch (o) { case "q": case "qq": return $e(o.length, e); case "qo": return r.ordinalNumber(e, { unit: "quarter" }); case "qqq": return r.quarter(e, { width: "abbreviated", context: "standalone" }) || r.quarter(e, { width: "narrow", context: "standalone" }); case "qqqqq": return r.quarter(e, { width: "narrow", context: "standalone" }); case "qqqq": default: return r.quarter(e, { width: "wide", context: "standalone" }) || r.quarter(e, { width: "abbreviated", context: "standalone" }) || r.quarter(e, { width: "narrow", context: "standalone" }); } } validate(e, o) { return o >= 1 && o <= 4; } set(e, o, r) { return e.setMonth((r - 1) * 3, 1), e.setHours(0, 0, 0, 0), e; } } class cs extends Fe { constructor() { super(...arguments); R(this, "incompatibleTokens", [ "Y", "R", "q", "Q", "L", "w", "I", "D", "i", "e", "c", "t", "T" ]); R(this, "priority", 110); } parse(e, o, r) { const a = (i) => i - 1; switch (o) { case "M": return Ae( We(je.month, e), a ); case "MM": return Ae($e(2, e), a); case "Mo": return Ae( r.ordinalNumber(e, { unit: "month" }), a ); case "MMM": return r.month(e, { width: "abbreviated", context: "formatting" }) || r.month(e, { width: "narrow", context: "formatting" }); case "MMMMM": return r.month(e, { width: "narrow", context: "formatting" }); case "MMMM": default: return r.month(e, { width: "wide", context: "formatting" }) || r.month(e, { width: "abbreviated", context: "formatting" }) || r.month(e, { width: "narrow", context: "formatting" }); } } validate(e, o) { return o >= 0 && o <= 11; } set(e, o, r) { return e.setMonth(r, 1), e.setHours(0, 0, 0, 0), e; } } class ds extends Fe { constructor() { super(...arguments); R(this, "priority", 110); R(this, "incompatibleTokens", [ "Y", "R", "q", "Q", "M", "w", "I", "D", "i",