@learncard/learn-card-plugin 1.0.4 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  var __defProp = Object.defineProperty;
3
2
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -25,7 +24,7 @@ __export(src_exports, {
25
24
  });
26
25
  module.exports = __toCommonJS(src_exports);
27
26
 
28
- // ../../../node_modules/.pnpm/zod@3.20.6/node_modules/zod/lib/index.mjs
27
+ // ../../../node_modules/.pnpm/zod@3.20.2/node_modules/zod/lib/index.mjs
29
28
  var util;
30
29
  (function(util2) {
31
30
  util2.assertEqual = (val) => val;
@@ -46,16 +45,16 @@ var util;
46
45
  return obj;
47
46
  };
48
47
  util2.getValidEnumValues = (obj) => {
49
- const validKeys = util2.objectKeys(obj).filter((k2) => typeof obj[obj[k2]] !== "number");
48
+ const validKeys = util2.objectKeys(obj).filter((k) => typeof obj[obj[k]] !== "number");
50
49
  const filtered = {};
51
- for (const k2 of validKeys) {
52
- filtered[k2] = obj[k2];
50
+ for (const k of validKeys) {
51
+ filtered[k] = obj[k];
53
52
  }
54
53
  return util2.objectValues(filtered);
55
54
  };
56
55
  util2.objectValues = (obj) => {
57
- return util2.objectKeys(obj).map(function(e2) {
58
- return obj[e2];
56
+ return util2.objectKeys(obj).map(function(e) {
57
+ return obj[e];
59
58
  });
60
59
  };
61
60
  util2.objectKeys = typeof Object.keys === "function" ? (obj) => Object.keys(obj) : (object) => {
@@ -110,8 +109,8 @@ var ZodParsedType = util.arrayToEnum([
110
109
  "set"
111
110
  ]);
112
111
  var getParsedType = /* @__PURE__ */ __name((data) => {
113
- const t2 = typeof data;
114
- switch (t2) {
112
+ const t = typeof data;
113
+ switch (t) {
115
114
  case "undefined":
116
115
  return ZodParsedType.undefined;
117
116
  case "string":
@@ -211,10 +210,10 @@ var ZodError = class extends Error {
211
210
  fieldErrors._errors.push(mapper(issue));
212
211
  } else {
213
212
  let curr = fieldErrors;
214
- let i2 = 0;
215
- while (i2 < issue.path.length) {
216
- const el = issue.path[i2];
217
- const terminal = i2 === issue.path.length - 1;
213
+ let i = 0;
214
+ while (i < issue.path.length) {
215
+ const el = issue.path[i];
216
+ const terminal = i === issue.path.length - 1;
218
217
  if (!terminal) {
219
218
  curr[el] = curr[el] || { _errors: [] };
220
219
  } else {
@@ -222,7 +221,7 @@ var ZodError = class extends Error {
222
221
  curr[el]._errors.push(mapper(issue));
223
222
  }
224
223
  curr = curr[el];
225
- i2++;
224
+ i++;
226
225
  }
227
226
  }
228
227
  }
@@ -369,7 +368,7 @@ var makeIssue = /* @__PURE__ */ __name((params) => {
369
368
  path: fullPath
370
369
  };
371
370
  let errorMessage = "";
372
- const maps = errorMaps.filter((m3) => !!m3).slice().reverse();
371
+ const maps = errorMaps.filter((m) => !!m).slice().reverse();
373
372
  for (const map of maps) {
374
373
  errorMessage = map(fullIssue, { data, defaultError: errorMessage }).message;
375
374
  }
@@ -390,7 +389,7 @@ function addIssueToContext(ctx, issueData) {
390
389
  ctx.schemaErrorMap,
391
390
  getErrorMap(),
392
391
  errorMap
393
- ].filter((x2) => !!x2)
392
+ ].filter((x) => !!x)
394
393
  });
395
394
  ctx.common.issues.push(issue);
396
395
  }
@@ -409,12 +408,12 @@ var ParseStatus = class {
409
408
  }
410
409
  static mergeArray(status, results) {
411
410
  const arrayValue = [];
412
- for (const s3 of results) {
413
- if (s3.status === "aborted")
411
+ for (const s of results) {
412
+ if (s.status === "aborted")
414
413
  return INVALID;
415
- if (s3.status === "dirty")
414
+ if (s.status === "dirty")
416
415
  status.dirty();
417
- arrayValue.push(s3.value);
416
+ arrayValue.push(s.value);
418
417
  }
419
418
  return { status: status.value, value: arrayValue };
420
419
  }
@@ -453,10 +452,10 @@ var INVALID = Object.freeze({
453
452
  });
454
453
  var DIRTY = /* @__PURE__ */ __name((value) => ({ status: "dirty", value }), "DIRTY");
455
454
  var OK = /* @__PURE__ */ __name((value) => ({ status: "valid", value }), "OK");
456
- var isAborted = /* @__PURE__ */ __name((x2) => x2.status === "aborted", "isAborted");
457
- var isDirty = /* @__PURE__ */ __name((x2) => x2.status === "dirty", "isDirty");
458
- var isValid = /* @__PURE__ */ __name((x2) => x2.status === "valid", "isValid");
459
- var isAsync = /* @__PURE__ */ __name((x2) => typeof Promise !== "undefined" && x2 instanceof Promise, "isAsync");
455
+ var isAborted = /* @__PURE__ */ __name((x) => x.status === "aborted", "isAborted");
456
+ var isDirty = /* @__PURE__ */ __name((x) => x.status === "dirty", "isDirty");
457
+ var isValid = /* @__PURE__ */ __name((x) => x.status === "valid", "isValid");
458
+ var isAsync = /* @__PURE__ */ __name((x) => typeof Promise !== void 0 && x instanceof Promise, "isAsync");
460
459
  var errorUtil;
461
460
  (function(errorUtil2) {
462
461
  errorUtil2.errToObj = (message) => typeof message === "string" ? { message } : message || {};
@@ -674,29 +673,28 @@ var ZodType = class {
674
673
  return this._refinement(refinement);
675
674
  }
676
675
  optional() {
677
- return ZodOptional.create(this, this._def);
676
+ return ZodOptional.create(this);
678
677
  }
679
678
  nullable() {
680
- return ZodNullable.create(this, this._def);
679
+ return ZodNullable.create(this);
681
680
  }
682
681
  nullish() {
683
- return this.nullable().optional();
682
+ return this.optional().nullable();
684
683
  }
685
684
  array() {
686
- return ZodArray.create(this, this._def);
685
+ return ZodArray.create(this);
687
686
  }
688
687
  promise() {
689
- return ZodPromise.create(this, this._def);
688
+ return ZodPromise.create(this);
690
689
  }
691
690
  or(option) {
692
- return ZodUnion.create([this, option], this._def);
691
+ return ZodUnion.create([this, option]);
693
692
  }
694
693
  and(incoming) {
695
- return ZodIntersection.create(this, incoming, this._def);
694
+ return ZodIntersection.create(this, incoming);
696
695
  }
697
696
  transform(transform) {
698
697
  return new ZodEffects({
699
- ...processCreateParams(this._def),
700
698
  schema: this,
701
699
  typeName: ZodFirstPartyTypeKind.ZodEffects,
702
700
  effect: { type: "transform", transform }
@@ -705,7 +703,6 @@ var ZodType = class {
705
703
  default(def) {
706
704
  const defaultValueFunc = typeof def === "function" ? def : () => def;
707
705
  return new ZodDefault({
708
- ...processCreateParams(this._def),
709
706
  innerType: this,
710
707
  defaultValue: defaultValueFunc,
711
708
  typeName: ZodFirstPartyTypeKind.ZodDefault
@@ -715,15 +712,14 @@ var ZodType = class {
715
712
  return new ZodBranded({
716
713
  typeName: ZodFirstPartyTypeKind.ZodBranded,
717
714
  type: this,
718
- ...processCreateParams(this._def)
715
+ ...processCreateParams(void 0)
719
716
  });
720
717
  }
721
718
  catch(def) {
722
- const catchValueFunc = typeof def === "function" ? def : () => def;
719
+ const defaultValueFunc = typeof def === "function" ? def : () => def;
723
720
  return new ZodCatch({
724
- ...processCreateParams(this._def),
725
721
  innerType: this,
726
- catchValue: catchValueFunc,
722
+ defaultValue: defaultValueFunc,
727
723
  typeName: ZodFirstPartyTypeKind.ZodCatch
728
724
  });
729
725
  }
@@ -746,25 +742,24 @@ var ZodType = class {
746
742
  };
747
743
  __name(ZodType, "ZodType");
748
744
  var cuidRegex = /^c[^\s-]{8,}$/i;
749
- var cuid2Regex = /^[a-z][a-z0-9]*$/;
750
745
  var uuidRegex = /^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i;
751
- var emailRegex = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|([^-]([a-zA-Z0-9-]*\.)+[a-zA-Z]{2,}))$/;
746
+ var emailRegex = /^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i;
752
747
  var datetimeRegex = /* @__PURE__ */ __name((args) => {
753
748
  if (args.precision) {
754
749
  if (args.offset) {
755
- return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${args.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`);
750
+ return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${args.precision}}(([+-]\\d{2}:\\d{2})|Z)$`);
756
751
  } else {
757
752
  return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${args.precision}}Z$`);
758
753
  }
759
754
  } else if (args.precision === 0) {
760
755
  if (args.offset) {
761
- return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$`);
756
+ return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}:\\d{2})|Z)$`);
762
757
  } else {
763
758
  return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$`);
764
759
  }
765
760
  } else {
766
761
  if (args.offset) {
767
- return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$`);
762
+ return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}:\\d{2})|Z)$`);
768
763
  } else {
769
764
  return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$`);
770
765
  }
@@ -791,14 +786,11 @@ var ZodString = class extends ZodType {
791
786
  const parsedType = this._getType(input);
792
787
  if (parsedType !== ZodParsedType.string) {
793
788
  const ctx2 = this._getOrReturnCtx(input);
794
- addIssueToContext(
795
- ctx2,
796
- {
797
- code: ZodIssueCode.invalid_type,
798
- expected: ZodParsedType.string,
799
- received: ctx2.parsedType
800
- }
801
- );
789
+ addIssueToContext(ctx2, {
790
+ code: ZodIssueCode.invalid_type,
791
+ expected: ZodParsedType.string,
792
+ received: ctx2.parsedType
793
+ });
802
794
  return INVALID;
803
795
  }
804
796
  const status = new ParseStatus();
@@ -886,16 +878,6 @@ var ZodString = class extends ZodType {
886
878
  });
887
879
  status.dirty();
888
880
  }
889
- } else if (check.kind === "cuid2") {
890
- if (!cuid2Regex.test(input.data)) {
891
- ctx = this._getOrReturnCtx(input, ctx);
892
- addIssueToContext(ctx, {
893
- validation: "cuid2",
894
- code: ZodIssueCode.invalid_string,
895
- message: check.message
896
- });
897
- status.dirty();
898
- }
899
881
  } else if (check.kind === "url") {
900
882
  try {
901
883
  new URL(input.data);
@@ -977,9 +959,6 @@ var ZodString = class extends ZodType {
977
959
  cuid(message) {
978
960
  return this._addCheck({ kind: "cuid", ...errorUtil.errToObj(message) });
979
961
  }
980
- cuid2(message) {
981
- return this._addCheck({ kind: "cuid2", ...errorUtil.errToObj(message) });
982
- }
983
962
  datetime(options) {
984
963
  var _a;
985
964
  if (typeof options === "string") {
@@ -1054,9 +1033,6 @@ var ZodString = class extends ZodType {
1054
1033
  get isCUID() {
1055
1034
  return !!this._def.checks.find((ch) => ch.kind === "cuid");
1056
1035
  }
1057
- get isCUID2() {
1058
- return !!this._def.checks.find((ch) => ch.kind === "cuid2");
1059
- }
1060
1036
  get minLength() {
1061
1037
  let min = null;
1062
1038
  for (const ch of this._def.checks) {
@@ -1289,22 +1265,7 @@ var ZodNumber = class extends ZodType {
1289
1265
  return max;
1290
1266
  }
1291
1267
  get isInt() {
1292
- return !!this._def.checks.find((ch) => ch.kind === "int" || ch.kind === "multipleOf" && util.isInteger(ch.value));
1293
- }
1294
- get isFinite() {
1295
- let max = null, min = null;
1296
- for (const ch of this._def.checks) {
1297
- if (ch.kind === "finite" || ch.kind === "int" || ch.kind === "multipleOf") {
1298
- return true;
1299
- } else if (ch.kind === "min") {
1300
- if (min === null || ch.value > min)
1301
- min = ch.value;
1302
- } else if (ch.kind === "max") {
1303
- if (max === null || ch.value < max)
1304
- max = ch.value;
1305
- }
1306
- }
1307
- return Number.isFinite(min) && Number.isFinite(max);
1268
+ return !!this._def.checks.find((ch) => ch.kind === "int");
1308
1269
  }
1309
1270
  };
1310
1271
  __name(ZodNumber, "ZodNumber");
@@ -1672,14 +1633,14 @@ var ZodArray = class extends ZodType {
1672
1633
  }
1673
1634
  }
1674
1635
  if (ctx.common.async) {
1675
- return Promise.all([...ctx.data].map((item, i2) => {
1676
- return def.type._parseAsync(new ParseInputLazyPath(ctx, item, ctx.path, i2));
1636
+ return Promise.all(ctx.data.map((item, i) => {
1637
+ return def.type._parseAsync(new ParseInputLazyPath(ctx, item, ctx.path, i));
1677
1638
  })).then((result2) => {
1678
1639
  return ParseStatus.mergeArray(status, result2);
1679
1640
  });
1680
1641
  }
1681
- const result = [...ctx.data].map((item, i2) => {
1682
- return def.type._parseSync(new ParseInputLazyPath(ctx, item, ctx.path, i2));
1642
+ const result = ctx.data.map((item, i) => {
1643
+ return def.type._parseSync(new ParseInputLazyPath(ctx, item, ctx.path, i));
1683
1644
  });
1684
1645
  return ParseStatus.mergeArray(status, result);
1685
1646
  }
@@ -1728,6 +1689,15 @@ var objectUtil;
1728
1689
  };
1729
1690
  };
1730
1691
  })(objectUtil || (objectUtil = {}));
1692
+ var AugmentFactory = /* @__PURE__ */ __name((def) => (augmentation) => {
1693
+ return new ZodObject({
1694
+ ...def,
1695
+ shape: () => ({
1696
+ ...def.shape(),
1697
+ ...augmentation
1698
+ })
1699
+ });
1700
+ }, "AugmentFactory");
1731
1701
  function deepPartialify(schema) {
1732
1702
  if (schema instanceof ZodObject) {
1733
1703
  const newShape = {};
@@ -1757,7 +1727,8 @@ var ZodObject = class extends ZodType {
1757
1727
  super(...arguments);
1758
1728
  this._cached = null;
1759
1729
  this.nonstrict = this.passthrough;
1760
- this.augment = this.extend;
1730
+ this.augment = AugmentFactory(this._def);
1731
+ this.extend = AugmentFactory(this._def);
1761
1732
  }
1762
1733
  _getCached() {
1763
1734
  if (this._cached !== null)
@@ -1825,9 +1796,7 @@ var ZodObject = class extends ZodType {
1825
1796
  const value = ctx.data[key];
1826
1797
  pairs.push({
1827
1798
  key: { status: "valid", value: key },
1828
- value: catchall._parse(
1829
- new ParseInputLazyPath(ctx, value, ctx.path, key)
1830
- ),
1799
+ value: catchall._parse(new ParseInputLazyPath(ctx, value, ctx.path, key)),
1831
1800
  alwaysSet: key in ctx.data
1832
1801
  });
1833
1802
  }
@@ -1886,14 +1855,8 @@ var ZodObject = class extends ZodType {
1886
1855
  unknownKeys: "passthrough"
1887
1856
  });
1888
1857
  }
1889
- extend(augmentation) {
1890
- return new ZodObject({
1891
- ...this._def,
1892
- shape: () => ({
1893
- ...this._def.shape(),
1894
- ...augmentation
1895
- })
1896
- });
1858
+ setKey(key, schema) {
1859
+ return this.augment({ [key]: schema });
1897
1860
  }
1898
1861
  merge(merging) {
1899
1862
  const merged = new ZodObject({
@@ -1904,9 +1867,6 @@ var ZodObject = class extends ZodType {
1904
1867
  });
1905
1868
  return merged;
1906
1869
  }
1907
- setKey(key, schema) {
1908
- return this.augment({ [key]: schema });
1909
- }
1910
1870
  catchall(index) {
1911
1871
  return new ZodObject({
1912
1872
  ...this._def,
@@ -1915,10 +1875,9 @@ var ZodObject = class extends ZodType {
1915
1875
  }
1916
1876
  pick(mask) {
1917
1877
  const shape = {};
1918
- util.objectKeys(mask).forEach((key) => {
1919
- if (mask[key] && this.shape[key]) {
1878
+ util.objectKeys(mask).map((key) => {
1879
+ if (this.shape[key])
1920
1880
  shape[key] = this.shape[key];
1921
- }
1922
1881
  });
1923
1882
  return new ZodObject({
1924
1883
  ...this._def,
@@ -1927,8 +1886,8 @@ var ZodObject = class extends ZodType {
1927
1886
  }
1928
1887
  omit(mask) {
1929
1888
  const shape = {};
1930
- util.objectKeys(this.shape).forEach((key) => {
1931
- if (!mask[key]) {
1889
+ util.objectKeys(this.shape).map((key) => {
1890
+ if (util.objectKeys(mask).indexOf(key) === -1) {
1932
1891
  shape[key] = this.shape[key];
1933
1892
  }
1934
1893
  });
@@ -1942,14 +1901,24 @@ var ZodObject = class extends ZodType {
1942
1901
  }
1943
1902
  partial(mask) {
1944
1903
  const newShape = {};
1945
- util.objectKeys(this.shape).forEach((key) => {
1946
- const fieldSchema = this.shape[key];
1947
- if (mask && !mask[key]) {
1948
- newShape[key] = fieldSchema;
1949
- } else {
1904
+ if (mask) {
1905
+ util.objectKeys(this.shape).map((key) => {
1906
+ if (util.objectKeys(mask).indexOf(key) === -1) {
1907
+ newShape[key] = this.shape[key];
1908
+ } else {
1909
+ newShape[key] = this.shape[key].optional();
1910
+ }
1911
+ });
1912
+ return new ZodObject({
1913
+ ...this._def,
1914
+ shape: () => newShape
1915
+ });
1916
+ } else {
1917
+ for (const key in this.shape) {
1918
+ const fieldSchema = this.shape[key];
1950
1919
  newShape[key] = fieldSchema.optional();
1951
1920
  }
1952
- });
1921
+ }
1953
1922
  return new ZodObject({
1954
1923
  ...this._def,
1955
1924
  shape: () => newShape
@@ -1957,10 +1926,21 @@ var ZodObject = class extends ZodType {
1957
1926
  }
1958
1927
  required(mask) {
1959
1928
  const newShape = {};
1960
- util.objectKeys(this.shape).forEach((key) => {
1961
- if (mask && !mask[key]) {
1962
- newShape[key] = this.shape[key];
1963
- } else {
1929
+ if (mask) {
1930
+ util.objectKeys(this.shape).map((key) => {
1931
+ if (util.objectKeys(mask).indexOf(key) === -1) {
1932
+ newShape[key] = this.shape[key];
1933
+ } else {
1934
+ const fieldSchema = this.shape[key];
1935
+ let newField = fieldSchema;
1936
+ while (newField instanceof ZodOptional) {
1937
+ newField = newField._def.innerType;
1938
+ }
1939
+ newShape[key] = newField;
1940
+ }
1941
+ });
1942
+ } else {
1943
+ for (const key in this.shape) {
1964
1944
  const fieldSchema = this.shape[key];
1965
1945
  let newField = fieldSchema;
1966
1946
  while (newField instanceof ZodOptional) {
@@ -1968,7 +1948,7 @@ var ZodObject = class extends ZodType {
1968
1948
  }
1969
1949
  newShape[key] = newField;
1970
1950
  }
1971
- });
1951
+ }
1972
1952
  return new ZodObject({
1973
1953
  ...this._def,
1974
1954
  shape: () => newShape
@@ -2189,17 +2169,17 @@ var ZodDiscriminatedUnion = class extends ZodType {
2189
2169
  }
2190
2170
  };
2191
2171
  __name(ZodDiscriminatedUnion, "ZodDiscriminatedUnion");
2192
- function mergeValues(a3, b2) {
2193
- const aType = getParsedType(a3);
2194
- const bType = getParsedType(b2);
2195
- if (a3 === b2) {
2196
- return { valid: true, data: a3 };
2172
+ function mergeValues(a, b) {
2173
+ const aType = getParsedType(a);
2174
+ const bType = getParsedType(b);
2175
+ if (a === b) {
2176
+ return { valid: true, data: a };
2197
2177
  } else if (aType === ZodParsedType.object && bType === ZodParsedType.object) {
2198
- const bKeys = util.objectKeys(b2);
2199
- const sharedKeys = util.objectKeys(a3).filter((key) => bKeys.indexOf(key) !== -1);
2200
- const newObj = { ...a3, ...b2 };
2178
+ const bKeys = util.objectKeys(b);
2179
+ const sharedKeys = util.objectKeys(a).filter((key) => bKeys.indexOf(key) !== -1);
2180
+ const newObj = { ...a, ...b };
2201
2181
  for (const key of sharedKeys) {
2202
- const sharedValue = mergeValues(a3[key], b2[key]);
2182
+ const sharedValue = mergeValues(a[key], b[key]);
2203
2183
  if (!sharedValue.valid) {
2204
2184
  return { valid: false };
2205
2185
  }
@@ -2207,13 +2187,13 @@ function mergeValues(a3, b2) {
2207
2187
  }
2208
2188
  return { valid: true, data: newObj };
2209
2189
  } else if (aType === ZodParsedType.array && bType === ZodParsedType.array) {
2210
- if (a3.length !== b2.length) {
2190
+ if (a.length !== b.length) {
2211
2191
  return { valid: false };
2212
2192
  }
2213
2193
  const newArray = [];
2214
- for (let index = 0; index < a3.length; index++) {
2215
- const itemA = a3[index];
2216
- const itemB = b2[index];
2194
+ for (let index = 0; index < a.length; index++) {
2195
+ const itemA = a[index];
2196
+ const itemB = b[index];
2217
2197
  const sharedValue = mergeValues(itemA, itemB);
2218
2198
  if (!sharedValue.valid) {
2219
2199
  return { valid: false };
@@ -2221,8 +2201,8 @@ function mergeValues(a3, b2) {
2221
2201
  newArray.push(sharedValue.data);
2222
2202
  }
2223
2203
  return { valid: true, data: newArray };
2224
- } else if (aType === ZodParsedType.date && bType === ZodParsedType.date && +a3 === +b2) {
2225
- return { valid: true, data: a3 };
2204
+ } else if (aType === ZodParsedType.date && bType === ZodParsedType.date && +a === +b) {
2205
+ return { valid: true, data: a };
2226
2206
  } else {
2227
2207
  return { valid: false };
2228
2208
  }
@@ -2314,12 +2294,12 @@ var ZodTuple = class extends ZodType {
2314
2294
  });
2315
2295
  status.dirty();
2316
2296
  }
2317
- const items = [...ctx.data].map((item, itemIndex) => {
2297
+ const items = ctx.data.map((item, itemIndex) => {
2318
2298
  const schema = this._def.items[itemIndex] || this._def.rest;
2319
2299
  if (!schema)
2320
2300
  return null;
2321
2301
  return schema._parse(new ParseInputLazyPath(ctx, item, ctx.path, itemIndex));
2322
- }).filter((x2) => !!x2);
2302
+ }).filter((x) => !!x);
2323
2303
  if (ctx.common.async) {
2324
2304
  return Promise.all(items).then((results) => {
2325
2305
  return ParseStatus.mergeArray(status, results);
@@ -2515,7 +2495,7 @@ var ZodSet = class extends ZodType {
2515
2495
  return { status: status.value, value: parsedSet };
2516
2496
  }
2517
2497
  __name(finalizeSet, "finalizeSet");
2518
- const elements = [...ctx.data.values()].map((item, i2) => valueType._parse(new ParseInputLazyPath(ctx, item, ctx.path, i2)));
2498
+ const elements = [...ctx.data.values()].map((item, i) => valueType._parse(new ParseInputLazyPath(ctx, item, ctx.path, i)));
2519
2499
  if (ctx.common.async) {
2520
2500
  return Promise.all(elements).then((elements2) => finalizeSet(elements2));
2521
2501
  } else {
@@ -2575,7 +2555,7 @@ var ZodFunction = class extends ZodType {
2575
2555
  ctx.schemaErrorMap,
2576
2556
  getErrorMap(),
2577
2557
  errorMap
2578
- ].filter((x2) => !!x2),
2558
+ ].filter((x) => !!x),
2579
2559
  issueData: {
2580
2560
  code: ZodIssueCode.invalid_arguments,
2581
2561
  argumentsError: error
@@ -2592,7 +2572,7 @@ var ZodFunction = class extends ZodType {
2592
2572
  ctx.schemaErrorMap,
2593
2573
  getErrorMap(),
2594
2574
  errorMap
2595
- ].filter((x2) => !!x2),
2575
+ ].filter((x) => !!x),
2596
2576
  issueData: {
2597
2577
  code: ZodIssueCode.invalid_return_type,
2598
2578
  returnTypeError: error
@@ -2605,13 +2585,13 @@ var ZodFunction = class extends ZodType {
2605
2585
  if (this._def.returns instanceof ZodPromise) {
2606
2586
  return OK(async (...args) => {
2607
2587
  const error = new ZodError([]);
2608
- const parsedArgs = await this._def.args.parseAsync(args, params).catch((e2) => {
2609
- error.addIssue(makeArgsIssue(args, e2));
2588
+ const parsedArgs = await this._def.args.parseAsync(args, params).catch((e) => {
2589
+ error.addIssue(makeArgsIssue(args, e));
2610
2590
  throw error;
2611
2591
  });
2612
2592
  const result = await fn(...parsedArgs);
2613
- const parsedReturns = await this._def.returns._def.type.parseAsync(result, params).catch((e2) => {
2614
- error.addIssue(makeReturnsIssue(result, e2));
2593
+ const parsedReturns = await this._def.returns._def.type.parseAsync(result, params).catch((e) => {
2594
+ error.addIssue(makeReturnsIssue(result, e));
2615
2595
  throw error;
2616
2596
  });
2617
2597
  return parsedReturns;
@@ -2690,7 +2670,6 @@ var ZodLiteral = class extends ZodType {
2690
2670
  if (input.data !== this._def.value) {
2691
2671
  const ctx = this._getOrReturnCtx(input);
2692
2672
  addIssueToContext(ctx, {
2693
- received: ctx.data,
2694
2673
  code: ZodIssueCode.invalid_literal,
2695
2674
  expected: this._def.value
2696
2675
  });
@@ -2766,12 +2745,6 @@ var ZodEnum = class extends ZodType {
2766
2745
  }
2767
2746
  return enumValues;
2768
2747
  }
2769
- extract(values) {
2770
- return ZodEnum.create(values);
2771
- }
2772
- exclude(values) {
2773
- return ZodEnum.create(this.options.filter((opt) => !values.includes(opt)));
2774
- }
2775
2748
  };
2776
2749
  __name(ZodEnum, "ZodEnum");
2777
2750
  ZodEnum.create = createZodEnum;
@@ -2812,9 +2785,6 @@ ZodNativeEnum.create = (values, params) => {
2812
2785
  });
2813
2786
  };
2814
2787
  var ZodPromise = class extends ZodType {
2815
- unwrap() {
2816
- return this._def.type;
2817
- }
2818
2788
  _parse(input) {
2819
2789
  const { ctx } = this._processInputParams(input);
2820
2790
  if (ctx.parsedType !== ZodParsedType.promise && ctx.common.async === false) {
@@ -3033,29 +3003,23 @@ var ZodCatch = class extends ZodType {
3033
3003
  const result = this._def.innerType._parse({
3034
3004
  data: ctx.data,
3035
3005
  path: ctx.path,
3036
- parent: {
3037
- ...ctx,
3038
- common: {
3039
- ...ctx.common,
3040
- issues: []
3041
- }
3042
- }
3006
+ parent: ctx
3043
3007
  });
3044
3008
  if (isAsync(result)) {
3045
3009
  return result.then((result2) => {
3046
3010
  return {
3047
3011
  status: "valid",
3048
- value: result2.status === "valid" ? result2.value : this._def.catchValue()
3012
+ value: result2.status === "valid" ? result2.value : this._def.defaultValue()
3049
3013
  };
3050
3014
  });
3051
3015
  } else {
3052
3016
  return {
3053
3017
  status: "valid",
3054
- value: result.status === "valid" ? result.value : this._def.catchValue()
3018
+ value: result.status === "valid" ? result.value : this._def.defaultValue()
3055
3019
  };
3056
3020
  }
3057
3021
  }
3058
- removeCatch() {
3022
+ removeDefault() {
3059
3023
  return this._def.innerType;
3060
3024
  }
3061
3025
  };
@@ -3064,7 +3028,7 @@ ZodCatch.create = (type, params) => {
3064
3028
  return new ZodCatch({
3065
3029
  innerType: type,
3066
3030
  typeName: ZodFirstPartyTypeKind.ZodCatch,
3067
- catchValue: typeof params.catch === "function" ? params.catch : () => params.catch,
3031
+ defaultValue: typeof params.default === "function" ? params.default : () => params.default,
3068
3032
  ...processCreateParams(params)
3069
3033
  });
3070
3034
  };
@@ -3153,10 +3117,10 @@ var ZodPipeline = class extends ZodType {
3153
3117
  }
3154
3118
  }
3155
3119
  }
3156
- static create(a3, b2) {
3120
+ static create(a, b) {
3157
3121
  return new ZodPipeline({
3158
- in: a3,
3159
- out: b2,
3122
+ in: a,
3123
+ out: b,
3160
3124
  typeName: ZodFirstPartyTypeKind.ZodPipeline
3161
3125
  });
3162
3126
  }
@@ -3257,10 +3221,7 @@ var oboolean = /* @__PURE__ */ __name(() => booleanType().optional(), "oboolean"
3257
3221
  var coerce = {
3258
3222
  string: (arg) => ZodString.create({ ...arg, coerce: true }),
3259
3223
  number: (arg) => ZodNumber.create({ ...arg, coerce: true }),
3260
- boolean: (arg) => ZodBoolean.create({
3261
- ...arg,
3262
- coerce: true
3263
- }),
3224
+ boolean: (arg) => ZodBoolean.create({ ...arg, coerce: true }),
3264
3225
  bigint: (arg) => ZodBigInt.create({ ...arg, coerce: true }),
3265
3226
  date: (arg) => ZodDate.create({ ...arg, coerce: true })
3266
3227
  };
@@ -3386,13 +3347,11 @@ var AchievementCriteriaValidator = mod.object({
3386
3347
  type: mod.string().optional(),
3387
3348
  narrative: mod.string().optional()
3388
3349
  });
3389
- var ImageValidator = mod.string().or(
3390
- mod.object({
3391
- id: mod.string(),
3392
- type: mod.string(),
3393
- caption: mod.string().optional()
3394
- })
3395
- );
3350
+ var ImageValidator = mod.string().or(mod.object({
3351
+ id: mod.string(),
3352
+ type: mod.string(),
3353
+ caption: mod.string().optional()
3354
+ }));
3396
3355
  var GeoCoordinatesValidator = mod.object({
3397
3356
  type: mod.string().min(1).or(mod.string().array().nonempty()),
3398
3357
  latitude: mod.number(),
@@ -3434,31 +3393,29 @@ var IdentifierEntryValidator = mod.object({
3434
3393
  identifier: mod.string(),
3435
3394
  identifierType: IdentifierTypeValidator
3436
3395
  });
3437
- var ProfileValidator = mod.string().or(
3438
- mod.object({
3439
- id: mod.string().optional(),
3440
- type: mod.string().or(mod.string().array().nonempty().optional()),
3441
- name: mod.string().optional(),
3442
- url: mod.string().optional(),
3443
- phone: mod.string().optional(),
3444
- description: mod.string().optional(),
3445
- endorsement: mod.any().array().optional(),
3446
- image: ImageValidator.optional(),
3447
- email: mod.string().email().optional(),
3448
- address: AddressValidator.optional(),
3449
- otherIdentifier: IdentifierEntryValidator.array().optional(),
3450
- official: mod.string().optional(),
3451
- parentOrg: mod.any().optional(),
3452
- familyName: mod.string().optional(),
3453
- givenName: mod.string().optional(),
3454
- additionalName: mod.string().optional(),
3455
- patronymicName: mod.string().optional(),
3456
- honorificPrefix: mod.string().optional(),
3457
- honorificSuffix: mod.string().optional(),
3458
- familyNamePrefix: mod.string().optional(),
3459
- dateOfBirth: mod.string().optional()
3460
- }).catchall(mod.any())
3461
- );
3396
+ var ProfileValidator = mod.string().or(mod.object({
3397
+ id: mod.string().optional(),
3398
+ type: mod.string().or(mod.string().array().nonempty().optional()),
3399
+ name: mod.string().optional(),
3400
+ url: mod.string().optional(),
3401
+ phone: mod.string().optional(),
3402
+ description: mod.string().optional(),
3403
+ endorsement: mod.any().array().optional(),
3404
+ image: ImageValidator.optional(),
3405
+ email: mod.string().email().optional(),
3406
+ address: AddressValidator.optional(),
3407
+ otherIdentifier: IdentifierEntryValidator.array().optional(),
3408
+ official: mod.string().optional(),
3409
+ parentOrg: mod.any().optional(),
3410
+ familyName: mod.string().optional(),
3411
+ givenName: mod.string().optional(),
3412
+ additionalName: mod.string().optional(),
3413
+ patronymicName: mod.string().optional(),
3414
+ honorificPrefix: mod.string().optional(),
3415
+ honorificSuffix: mod.string().optional(),
3416
+ familyNamePrefix: mod.string().optional(),
3417
+ dateOfBirth: mod.string().optional()
3418
+ }).catchall(mod.any()));
3462
3419
  var CredentialSubjectValidator = mod.object({ id: mod.string().optional() }).catchall(mod.any());
3463
3420
  var CredentialStatusValidator = mod.object({ type: mod.string(), id: mod.string() });
3464
3421
  var CredentialSchemaValidator = mod.object({ id: mod.string(), type: mod.string() });
@@ -3740,11 +3697,13 @@ var JWEValidator = mod.object({
3740
3697
  aad: mod.string().optional(),
3741
3698
  recipients: JWERecipientValidator.array().optional()
3742
3699
  });
3743
- var EncryptedCredentialRecordValidator = mod.object({
3744
- encryptedRecord: JWEValidator,
3745
- fields: mod.string().array(),
3700
+ var EncryptedRecordValidator = mod.object({ encryptedRecord: JWEValidator, fields: mod.string().array() }).catchall(mod.any());
3701
+ var PaginatedEncryptedRecordsValidator = PaginationResponseValidator.extend({
3702
+ records: EncryptedRecordValidator.array()
3703
+ });
3704
+ var EncryptedCredentialRecordValidator = EncryptedRecordValidator.extend({
3746
3705
  id: mod.string()
3747
- }).catchall(mod.any());
3706
+ });
3748
3707
  var PaginatedEncryptedCredentialRecordsValidator = PaginationResponseValidator.extend({
3749
3708
  records: EncryptedCredentialRecordValidator.array()
3750
3709
  });
@@ -3831,7 +3790,7 @@ var LCNSigningAuthorityForUserValidator = mod.object({
3831
3790
  })
3832
3791
  });
3833
3792
 
3834
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/toInteger/index.js
3793
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/toInteger/index.js
3835
3794
  function toInteger(dirtyNumber) {
3836
3795
  if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) {
3837
3796
  return NaN;
@@ -3844,7 +3803,7 @@ function toInteger(dirtyNumber) {
3844
3803
  }
3845
3804
  __name(toInteger, "toInteger");
3846
3805
 
3847
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/requiredArgs/index.js
3806
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/requiredArgs/index.js
3848
3807
  function requiredArgs(required, args) {
3849
3808
  if (args.length < required) {
3850
3809
  throw new TypeError(required + " argument" + (required > 1 ? "s" : "") + " required, but only " + args.length + " present");
@@ -3852,31 +3811,17 @@ function requiredArgs(required, args) {
3852
3811
  }
3853
3812
  __name(requiredArgs, "requiredArgs");
3854
3813
 
3855
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/toDate/index.js
3856
- function _typeof(obj) {
3857
- "@babel/helpers - typeof";
3858
- if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
3859
- _typeof = /* @__PURE__ */ __name(function _typeof3(obj2) {
3860
- return typeof obj2;
3861
- }, "_typeof");
3862
- } else {
3863
- _typeof = /* @__PURE__ */ __name(function _typeof3(obj2) {
3864
- return obj2 && typeof Symbol === "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
3865
- }, "_typeof");
3866
- }
3867
- return _typeof(obj);
3868
- }
3869
- __name(_typeof, "_typeof");
3814
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/toDate/index.js
3870
3815
  function toDate(argument) {
3871
3816
  requiredArgs(1, arguments);
3872
3817
  var argStr = Object.prototype.toString.call(argument);
3873
- if (argument instanceof Date || _typeof(argument) === "object" && argStr === "[object Date]") {
3818
+ if (argument instanceof Date || typeof argument === "object" && argStr === "[object Date]") {
3874
3819
  return new Date(argument.getTime());
3875
3820
  } else if (typeof argument === "number" || argStr === "[object Number]") {
3876
3821
  return new Date(argument);
3877
3822
  } else {
3878
3823
  if ((typeof argument === "string" || argStr === "[object String]") && typeof console !== "undefined") {
3879
- console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments");
3824
+ console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule");
3880
3825
  console.warn(new Error().stack);
3881
3826
  }
3882
3827
  return new Date(NaN);
@@ -3884,7 +3829,7 @@ function toDate(argument) {
3884
3829
  }
3885
3830
  __name(toDate, "toDate");
3886
3831
 
3887
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/addMilliseconds/index.js
3832
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/addMilliseconds/index.js
3888
3833
  function addMilliseconds(dirtyDate, dirtyAmount) {
3889
3834
  requiredArgs(2, arguments);
3890
3835
  var timestamp = toDate(dirtyDate).getTime();
@@ -3893,14 +3838,7 @@ function addMilliseconds(dirtyDate, dirtyAmount) {
3893
3838
  }
3894
3839
  __name(addMilliseconds, "addMilliseconds");
3895
3840
 
3896
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/defaultOptions/index.js
3897
- var defaultOptions = {};
3898
- function getDefaultOptions() {
3899
- return defaultOptions;
3900
- }
3901
- __name(getDefaultOptions, "getDefaultOptions");
3902
-
3903
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/getTimezoneOffsetInMilliseconds/index.js
3841
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/getTimezoneOffsetInMilliseconds/index.js
3904
3842
  function getTimezoneOffsetInMilliseconds(date) {
3905
3843
  var utcDate = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()));
3906
3844
  utcDate.setUTCFullYear(date.getFullYear());
@@ -3908,28 +3846,14 @@ function getTimezoneOffsetInMilliseconds(date) {
3908
3846
  }
3909
3847
  __name(getTimezoneOffsetInMilliseconds, "getTimezoneOffsetInMilliseconds");
3910
3848
 
3911
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/isDate/index.js
3912
- function _typeof2(obj) {
3913
- "@babel/helpers - typeof";
3914
- if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
3915
- _typeof2 = /* @__PURE__ */ __name(function _typeof3(obj2) {
3916
- return typeof obj2;
3917
- }, "_typeof");
3918
- } else {
3919
- _typeof2 = /* @__PURE__ */ __name(function _typeof3(obj2) {
3920
- return obj2 && typeof Symbol === "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
3921
- }, "_typeof");
3922
- }
3923
- return _typeof2(obj);
3924
- }
3925
- __name(_typeof2, "_typeof");
3849
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/isDate/index.js
3926
3850
  function isDate(value) {
3927
3851
  requiredArgs(1, arguments);
3928
- return value instanceof Date || _typeof2(value) === "object" && Object.prototype.toString.call(value) === "[object Date]";
3852
+ return value instanceof Date || typeof value === "object" && Object.prototype.toString.call(value) === "[object Date]";
3929
3853
  }
3930
3854
  __name(isDate, "isDate");
3931
3855
 
3932
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/isValid/index.js
3856
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/isValid/index.js
3933
3857
  function isValid2(dirtyDate) {
3934
3858
  requiredArgs(1, arguments);
3935
3859
  if (!isDate(dirtyDate) && typeof dirtyDate !== "number") {
@@ -3940,1425 +3864,1435 @@ function isValid2(dirtyDate) {
3940
3864
  }
3941
3865
  __name(isValid2, "isValid");
3942
3866
 
3943
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/subMilliseconds/index.js
3944
- function subMilliseconds(dirtyDate, dirtyAmount) {
3945
- requiredArgs(2, arguments);
3946
- var amount = toInteger(dirtyAmount);
3947
- return addMilliseconds(dirtyDate, -amount);
3948
- }
3949
- __name(subMilliseconds, "subMilliseconds");
3950
-
3951
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/getUTCDayOfYear/index.js
3952
- var MILLISECONDS_IN_DAY = 864e5;
3953
- function getUTCDayOfYear(dirtyDate) {
3954
- requiredArgs(1, arguments);
3955
- var date = toDate(dirtyDate);
3956
- var timestamp = date.getTime();
3957
- date.setUTCMonth(0, 1);
3958
- date.setUTCHours(0, 0, 0, 0);
3959
- var startOfYearTimestamp = date.getTime();
3960
- var difference = timestamp - startOfYearTimestamp;
3961
- return Math.floor(difference / MILLISECONDS_IN_DAY) + 1;
3962
- }
3963
- __name(getUTCDayOfYear, "getUTCDayOfYear");
3964
-
3965
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/startOfUTCISOWeek/index.js
3966
- function startOfUTCISOWeek(dirtyDate) {
3967
- requiredArgs(1, arguments);
3968
- var weekStartsOn = 1;
3969
- var date = toDate(dirtyDate);
3970
- var day = date.getUTCDay();
3971
- var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
3972
- date.setUTCDate(date.getUTCDate() - diff);
3973
- date.setUTCHours(0, 0, 0, 0);
3974
- return date;
3975
- }
3976
- __name(startOfUTCISOWeek, "startOfUTCISOWeek");
3977
-
3978
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/getUTCISOWeekYear/index.js
3979
- function getUTCISOWeekYear(dirtyDate) {
3980
- requiredArgs(1, arguments);
3981
- var date = toDate(dirtyDate);
3982
- var year = date.getUTCFullYear();
3983
- var fourthOfJanuaryOfNextYear = new Date(0);
3984
- fourthOfJanuaryOfNextYear.setUTCFullYear(year + 1, 0, 4);
3985
- fourthOfJanuaryOfNextYear.setUTCHours(0, 0, 0, 0);
3986
- var startOfNextYear = startOfUTCISOWeek(fourthOfJanuaryOfNextYear);
3987
- var fourthOfJanuaryOfThisYear = new Date(0);
3988
- fourthOfJanuaryOfThisYear.setUTCFullYear(year, 0, 4);
3989
- fourthOfJanuaryOfThisYear.setUTCHours(0, 0, 0, 0);
3990
- var startOfThisYear = startOfUTCISOWeek(fourthOfJanuaryOfThisYear);
3991
- if (date.getTime() >= startOfNextYear.getTime()) {
3992
- return year + 1;
3993
- } else if (date.getTime() >= startOfThisYear.getTime()) {
3994
- return year;
3867
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/locale/en-US/_lib/formatDistance/index.js
3868
+ var formatDistanceLocale = {
3869
+ lessThanXSeconds: {
3870
+ one: "less than a second",
3871
+ other: "less than {{count}} seconds"
3872
+ },
3873
+ xSeconds: {
3874
+ one: "1 second",
3875
+ other: "{{count}} seconds"
3876
+ },
3877
+ halfAMinute: "half a minute",
3878
+ lessThanXMinutes: {
3879
+ one: "less than a minute",
3880
+ other: "less than {{count}} minutes"
3881
+ },
3882
+ xMinutes: {
3883
+ one: "1 minute",
3884
+ other: "{{count}} minutes"
3885
+ },
3886
+ aboutXHours: {
3887
+ one: "about 1 hour",
3888
+ other: "about {{count}} hours"
3889
+ },
3890
+ xHours: {
3891
+ one: "1 hour",
3892
+ other: "{{count}} hours"
3893
+ },
3894
+ xDays: {
3895
+ one: "1 day",
3896
+ other: "{{count}} days"
3897
+ },
3898
+ aboutXWeeks: {
3899
+ one: "about 1 week",
3900
+ other: "about {{count}} weeks"
3901
+ },
3902
+ xWeeks: {
3903
+ one: "1 week",
3904
+ other: "{{count}} weeks"
3905
+ },
3906
+ aboutXMonths: {
3907
+ one: "about 1 month",
3908
+ other: "about {{count}} months"
3909
+ },
3910
+ xMonths: {
3911
+ one: "1 month",
3912
+ other: "{{count}} months"
3913
+ },
3914
+ aboutXYears: {
3915
+ one: "about 1 year",
3916
+ other: "about {{count}} years"
3917
+ },
3918
+ xYears: {
3919
+ one: "1 year",
3920
+ other: "{{count}} years"
3921
+ },
3922
+ overXYears: {
3923
+ one: "over 1 year",
3924
+ other: "over {{count}} years"
3925
+ },
3926
+ almostXYears: {
3927
+ one: "almost 1 year",
3928
+ other: "almost {{count}} years"
3929
+ }
3930
+ };
3931
+ var formatDistance = /* @__PURE__ */ __name(function(token, count, options) {
3932
+ var result;
3933
+ var tokenValue = formatDistanceLocale[token];
3934
+ if (typeof tokenValue === "string") {
3935
+ result = tokenValue;
3936
+ } else if (count === 1) {
3937
+ result = tokenValue.one;
3995
3938
  } else {
3996
- return year - 1;
3939
+ result = tokenValue.other.replace("{{count}}", count.toString());
3997
3940
  }
3998
- }
3999
- __name(getUTCISOWeekYear, "getUTCISOWeekYear");
4000
-
4001
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/startOfUTCISOWeekYear/index.js
4002
- function startOfUTCISOWeekYear(dirtyDate) {
4003
- requiredArgs(1, arguments);
4004
- var year = getUTCISOWeekYear(dirtyDate);
4005
- var fourthOfJanuary = new Date(0);
4006
- fourthOfJanuary.setUTCFullYear(year, 0, 4);
4007
- fourthOfJanuary.setUTCHours(0, 0, 0, 0);
4008
- var date = startOfUTCISOWeek(fourthOfJanuary);
4009
- return date;
4010
- }
4011
- __name(startOfUTCISOWeekYear, "startOfUTCISOWeekYear");
4012
-
4013
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/getUTCISOWeek/index.js
4014
- var MILLISECONDS_IN_WEEK = 6048e5;
4015
- function getUTCISOWeek(dirtyDate) {
4016
- requiredArgs(1, arguments);
4017
- var date = toDate(dirtyDate);
4018
- var diff = startOfUTCISOWeek(date).getTime() - startOfUTCISOWeekYear(date).getTime();
4019
- return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;
4020
- }
4021
- __name(getUTCISOWeek, "getUTCISOWeek");
4022
-
4023
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/startOfUTCWeek/index.js
4024
- function startOfUTCWeek(dirtyDate, options) {
4025
- var _ref, _ref2, _ref3, _options$weekStartsOn, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
4026
- requiredArgs(1, arguments);
4027
- var defaultOptions2 = getDefaultOptions();
4028
- var weekStartsOn = toInteger((_ref = (_ref2 = (_ref3 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.weekStartsOn) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions2.weekStartsOn) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions2.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.weekStartsOn) !== null && _ref !== void 0 ? _ref : 0);
4029
- if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {
4030
- throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
3941
+ if (options !== null && options !== void 0 && options.addSuffix) {
3942
+ if (options.comparison && options.comparison > 0) {
3943
+ return "in " + result;
3944
+ } else {
3945
+ return result + " ago";
3946
+ }
4031
3947
  }
4032
- var date = toDate(dirtyDate);
4033
- var day = date.getUTCDay();
4034
- var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
4035
- date.setUTCDate(date.getUTCDate() - diff);
4036
- date.setUTCHours(0, 0, 0, 0);
4037
- return date;
3948
+ return result;
3949
+ }, "formatDistance");
3950
+ var formatDistance_default = formatDistance;
3951
+
3952
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/locale/_lib/buildFormatLongFn/index.js
3953
+ function buildFormatLongFn(args) {
3954
+ return function() {
3955
+ var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
3956
+ var width = options.width ? String(options.width) : args.defaultWidth;
3957
+ var format2 = args.formats[width] || args.formats[args.defaultWidth];
3958
+ return format2;
3959
+ };
4038
3960
  }
4039
- __name(startOfUTCWeek, "startOfUTCWeek");
3961
+ __name(buildFormatLongFn, "buildFormatLongFn");
4040
3962
 
4041
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/getUTCWeekYear/index.js
4042
- function getUTCWeekYear(dirtyDate, options) {
4043
- var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
4044
- requiredArgs(1, arguments);
4045
- var date = toDate(dirtyDate);
4046
- var year = date.getUTCFullYear();
4047
- var defaultOptions2 = getDefaultOptions();
4048
- var firstWeekContainsDate = toInteger((_ref = (_ref2 = (_ref3 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions2.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions2.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref !== void 0 ? _ref : 1);
4049
- if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {
4050
- throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");
4051
- }
4052
- var firstWeekOfNextYear = new Date(0);
4053
- firstWeekOfNextYear.setUTCFullYear(year + 1, 0, firstWeekContainsDate);
4054
- firstWeekOfNextYear.setUTCHours(0, 0, 0, 0);
4055
- var startOfNextYear = startOfUTCWeek(firstWeekOfNextYear, options);
4056
- var firstWeekOfThisYear = new Date(0);
4057
- firstWeekOfThisYear.setUTCFullYear(year, 0, firstWeekContainsDate);
4058
- firstWeekOfThisYear.setUTCHours(0, 0, 0, 0);
4059
- var startOfThisYear = startOfUTCWeek(firstWeekOfThisYear, options);
4060
- if (date.getTime() >= startOfNextYear.getTime()) {
4061
- return year + 1;
4062
- } else if (date.getTime() >= startOfThisYear.getTime()) {
4063
- return year;
4064
- } else {
4065
- return year - 1;
4066
- }
4067
- }
4068
- __name(getUTCWeekYear, "getUTCWeekYear");
3963
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/locale/en-US/_lib/formatLong/index.js
3964
+ var dateFormats = {
3965
+ full: "EEEE, MMMM do, y",
3966
+ long: "MMMM do, y",
3967
+ medium: "MMM d, y",
3968
+ short: "MM/dd/yyyy"
3969
+ };
3970
+ var timeFormats = {
3971
+ full: "h:mm:ss a zzzz",
3972
+ long: "h:mm:ss a z",
3973
+ medium: "h:mm:ss a",
3974
+ short: "h:mm a"
3975
+ };
3976
+ var dateTimeFormats = {
3977
+ full: "{{date}} 'at' {{time}}",
3978
+ long: "{{date}} 'at' {{time}}",
3979
+ medium: "{{date}}, {{time}}",
3980
+ short: "{{date}}, {{time}}"
3981
+ };
3982
+ var formatLong = {
3983
+ date: buildFormatLongFn({
3984
+ formats: dateFormats,
3985
+ defaultWidth: "full"
3986
+ }),
3987
+ time: buildFormatLongFn({
3988
+ formats: timeFormats,
3989
+ defaultWidth: "full"
3990
+ }),
3991
+ dateTime: buildFormatLongFn({
3992
+ formats: dateTimeFormats,
3993
+ defaultWidth: "full"
3994
+ })
3995
+ };
3996
+ var formatLong_default = formatLong;
4069
3997
 
4070
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/startOfUTCWeekYear/index.js
4071
- function startOfUTCWeekYear(dirtyDate, options) {
4072
- var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
4073
- requiredArgs(1, arguments);
4074
- var defaultOptions2 = getDefaultOptions();
4075
- var firstWeekContainsDate = toInteger((_ref = (_ref2 = (_ref3 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions2.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions2.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref !== void 0 ? _ref : 1);
4076
- var year = getUTCWeekYear(dirtyDate, options);
4077
- var firstWeek = new Date(0);
4078
- firstWeek.setUTCFullYear(year, 0, firstWeekContainsDate);
4079
- firstWeek.setUTCHours(0, 0, 0, 0);
4080
- var date = startOfUTCWeek(firstWeek, options);
4081
- return date;
4082
- }
4083
- __name(startOfUTCWeekYear, "startOfUTCWeekYear");
3998
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/locale/en-US/_lib/formatRelative/index.js
3999
+ var formatRelativeLocale = {
4000
+ lastWeek: "'last' eeee 'at' p",
4001
+ yesterday: "'yesterday at' p",
4002
+ today: "'today at' p",
4003
+ tomorrow: "'tomorrow at' p",
4004
+ nextWeek: "eeee 'at' p",
4005
+ other: "P"
4006
+ };
4007
+ var formatRelative = /* @__PURE__ */ __name(function(token, _date, _baseDate, _options) {
4008
+ return formatRelativeLocale[token];
4009
+ }, "formatRelative");
4010
+ var formatRelative_default = formatRelative;
4084
4011
 
4085
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/getUTCWeek/index.js
4086
- var MILLISECONDS_IN_WEEK2 = 6048e5;
4087
- function getUTCWeek(dirtyDate, options) {
4088
- requiredArgs(1, arguments);
4089
- var date = toDate(dirtyDate);
4090
- var diff = startOfUTCWeek(date, options).getTime() - startOfUTCWeekYear(date, options).getTime();
4091
- return Math.round(diff / MILLISECONDS_IN_WEEK2) + 1;
4012
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/locale/_lib/buildLocalizeFn/index.js
4013
+ function buildLocalizeFn(args) {
4014
+ return function(dirtyIndex, dirtyOptions) {
4015
+ var options = dirtyOptions || {};
4016
+ var context = options.context ? String(options.context) : "standalone";
4017
+ var valuesArray;
4018
+ if (context === "formatting" && args.formattingValues) {
4019
+ var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
4020
+ var width = options.width ? String(options.width) : defaultWidth;
4021
+ valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
4022
+ } else {
4023
+ var _defaultWidth = args.defaultWidth;
4024
+ var _width = options.width ? String(options.width) : args.defaultWidth;
4025
+ valuesArray = args.values[_width] || args.values[_defaultWidth];
4026
+ }
4027
+ var index = args.argumentCallback ? args.argumentCallback(dirtyIndex) : dirtyIndex;
4028
+ return valuesArray[index];
4029
+ };
4092
4030
  }
4093
- __name(getUTCWeek, "getUTCWeek");
4031
+ __name(buildLocalizeFn, "buildLocalizeFn");
4094
4032
 
4095
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/addLeadingZeros/index.js
4096
- function addLeadingZeros(number, targetLength) {
4097
- var sign = number < 0 ? "-" : "";
4098
- var output = Math.abs(number).toString();
4099
- while (output.length < targetLength) {
4100
- output = "0" + output;
4033
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/locale/en-US/_lib/localize/index.js
4034
+ var eraValues = {
4035
+ narrow: ["B", "A"],
4036
+ abbreviated: ["BC", "AD"],
4037
+ wide: ["Before Christ", "Anno Domini"]
4038
+ };
4039
+ var quarterValues = {
4040
+ narrow: ["1", "2", "3", "4"],
4041
+ abbreviated: ["Q1", "Q2", "Q3", "Q4"],
4042
+ wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
4043
+ };
4044
+ var monthValues = {
4045
+ narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
4046
+ abbreviated: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
4047
+ wide: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]
4048
+ };
4049
+ var dayValues = {
4050
+ narrow: ["S", "M", "T", "W", "T", "F", "S"],
4051
+ short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
4052
+ abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
4053
+ wide: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
4054
+ };
4055
+ var dayPeriodValues = {
4056
+ narrow: {
4057
+ am: "a",
4058
+ pm: "p",
4059
+ midnight: "mi",
4060
+ noon: "n",
4061
+ morning: "morning",
4062
+ afternoon: "afternoon",
4063
+ evening: "evening",
4064
+ night: "night"
4065
+ },
4066
+ abbreviated: {
4067
+ am: "AM",
4068
+ pm: "PM",
4069
+ midnight: "midnight",
4070
+ noon: "noon",
4071
+ morning: "morning",
4072
+ afternoon: "afternoon",
4073
+ evening: "evening",
4074
+ night: "night"
4075
+ },
4076
+ wide: {
4077
+ am: "a.m.",
4078
+ pm: "p.m.",
4079
+ midnight: "midnight",
4080
+ noon: "noon",
4081
+ morning: "morning",
4082
+ afternoon: "afternoon",
4083
+ evening: "evening",
4084
+ night: "night"
4101
4085
  }
4102
- return sign + output;
4103
- }
4104
- __name(addLeadingZeros, "addLeadingZeros");
4105
-
4106
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/format/lightFormatters/index.js
4107
- var formatters = {
4108
- y: /* @__PURE__ */ __name(function y(date, token) {
4109
- var signedYear = date.getUTCFullYear();
4110
- var year = signedYear > 0 ? signedYear : 1 - signedYear;
4111
- return addLeadingZeros(token === "yy" ? year % 100 : year, token.length);
4112
- }, "y"),
4113
- M: /* @__PURE__ */ __name(function M(date, token) {
4114
- var month = date.getUTCMonth();
4115
- return token === "M" ? String(month + 1) : addLeadingZeros(month + 1, 2);
4116
- }, "M"),
4117
- d: /* @__PURE__ */ __name(function d(date, token) {
4118
- return addLeadingZeros(date.getUTCDate(), token.length);
4119
- }, "d"),
4120
- a: /* @__PURE__ */ __name(function a(date, token) {
4121
- var dayPeriodEnumValue = date.getUTCHours() / 12 >= 1 ? "pm" : "am";
4122
- switch (token) {
4123
- case "a":
4124
- case "aa":
4125
- return dayPeriodEnumValue.toUpperCase();
4126
- case "aaa":
4127
- return dayPeriodEnumValue;
4128
- case "aaaaa":
4129
- return dayPeriodEnumValue[0];
4130
- case "aaaa":
4131
- default:
4132
- return dayPeriodEnumValue === "am" ? "a.m." : "p.m.";
4133
- }
4134
- }, "a"),
4135
- h: /* @__PURE__ */ __name(function h(date, token) {
4136
- return addLeadingZeros(date.getUTCHours() % 12 || 12, token.length);
4137
- }, "h"),
4138
- H: /* @__PURE__ */ __name(function H(date, token) {
4139
- return addLeadingZeros(date.getUTCHours(), token.length);
4140
- }, "H"),
4141
- m: /* @__PURE__ */ __name(function m(date, token) {
4142
- return addLeadingZeros(date.getUTCMinutes(), token.length);
4143
- }, "m"),
4144
- s: /* @__PURE__ */ __name(function s(date, token) {
4145
- return addLeadingZeros(date.getUTCSeconds(), token.length);
4146
- }, "s"),
4147
- S: /* @__PURE__ */ __name(function S(date, token) {
4148
- var numberOfDigits = token.length;
4149
- var milliseconds = date.getUTCMilliseconds();
4150
- var fractionalSeconds = Math.floor(milliseconds * Math.pow(10, numberOfDigits - 3));
4151
- return addLeadingZeros(fractionalSeconds, token.length);
4152
- }, "S")
4153
4086
  };
4154
- var lightFormatters_default = formatters;
4155
-
4156
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/format/formatters/index.js
4157
- var dayPeriodEnum = {
4158
- am: "am",
4159
- pm: "pm",
4160
- midnight: "midnight",
4161
- noon: "noon",
4162
- morning: "morning",
4163
- afternoon: "afternoon",
4164
- evening: "evening",
4165
- night: "night"
4087
+ var formattingDayPeriodValues = {
4088
+ narrow: {
4089
+ am: "a",
4090
+ pm: "p",
4091
+ midnight: "mi",
4092
+ noon: "n",
4093
+ morning: "in the morning",
4094
+ afternoon: "in the afternoon",
4095
+ evening: "in the evening",
4096
+ night: "at night"
4097
+ },
4098
+ abbreviated: {
4099
+ am: "AM",
4100
+ pm: "PM",
4101
+ midnight: "midnight",
4102
+ noon: "noon",
4103
+ morning: "in the morning",
4104
+ afternoon: "in the afternoon",
4105
+ evening: "in the evening",
4106
+ night: "at night"
4107
+ },
4108
+ wide: {
4109
+ am: "a.m.",
4110
+ pm: "p.m.",
4111
+ midnight: "midnight",
4112
+ noon: "noon",
4113
+ morning: "in the morning",
4114
+ afternoon: "in the afternoon",
4115
+ evening: "in the evening",
4116
+ night: "at night"
4117
+ }
4166
4118
  };
4167
- var formatters2 = {
4168
- G: /* @__PURE__ */ __name(function G(date, token, localize2) {
4169
- var era = date.getUTCFullYear() > 0 ? 1 : 0;
4170
- switch (token) {
4171
- case "G":
4172
- case "GG":
4173
- case "GGG":
4174
- return localize2.era(era, {
4175
- width: "abbreviated"
4176
- });
4177
- case "GGGGG":
4178
- return localize2.era(era, {
4179
- width: "narrow"
4180
- });
4181
- case "GGGG":
4182
- default:
4183
- return localize2.era(era, {
4184
- width: "wide"
4185
- });
4186
- }
4187
- }, "G"),
4188
- y: /* @__PURE__ */ __name(function y2(date, token, localize2) {
4189
- if (token === "yo") {
4190
- var signedYear = date.getUTCFullYear();
4191
- var year = signedYear > 0 ? signedYear : 1 - signedYear;
4192
- return localize2.ordinalNumber(year, {
4193
- unit: "year"
4194
- });
4119
+ var ordinalNumber = /* @__PURE__ */ __name(function(dirtyNumber, _options) {
4120
+ var number = Number(dirtyNumber);
4121
+ var rem100 = number % 100;
4122
+ if (rem100 > 20 || rem100 < 10) {
4123
+ switch (rem100 % 10) {
4124
+ case 1:
4125
+ return number + "st";
4126
+ case 2:
4127
+ return number + "nd";
4128
+ case 3:
4129
+ return number + "rd";
4195
4130
  }
4196
- return lightFormatters_default.y(date, token);
4197
- }, "y"),
4198
- Y: /* @__PURE__ */ __name(function Y(date, token, localize2, options) {
4199
- var signedWeekYear = getUTCWeekYear(date, options);
4200
- var weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;
4201
- if (token === "YY") {
4202
- var twoDigitYear = weekYear % 100;
4203
- return addLeadingZeros(twoDigitYear, 2);
4204
- }
4205
- if (token === "Yo") {
4206
- return localize2.ordinalNumber(weekYear, {
4207
- unit: "year"
4208
- });
4209
- }
4210
- return addLeadingZeros(weekYear, token.length);
4211
- }, "Y"),
4212
- R: /* @__PURE__ */ __name(function R(date, token) {
4213
- var isoWeekYear = getUTCISOWeekYear(date);
4214
- return addLeadingZeros(isoWeekYear, token.length);
4215
- }, "R"),
4216
- u: /* @__PURE__ */ __name(function u(date, token) {
4217
- var year = date.getUTCFullYear();
4218
- return addLeadingZeros(year, token.length);
4219
- }, "u"),
4220
- Q: /* @__PURE__ */ __name(function Q(date, token, localize2) {
4221
- var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);
4222
- switch (token) {
4223
- case "Q":
4224
- return String(quarter);
4225
- case "QQ":
4226
- return addLeadingZeros(quarter, 2);
4227
- case "Qo":
4228
- return localize2.ordinalNumber(quarter, {
4229
- unit: "quarter"
4230
- });
4231
- case "QQQ":
4232
- return localize2.quarter(quarter, {
4233
- width: "abbreviated",
4234
- context: "formatting"
4235
- });
4236
- case "QQQQQ":
4237
- return localize2.quarter(quarter, {
4238
- width: "narrow",
4239
- context: "formatting"
4240
- });
4241
- case "QQQQ":
4242
- default:
4243
- return localize2.quarter(quarter, {
4244
- width: "wide",
4245
- context: "formatting"
4246
- });
4247
- }
4248
- }, "Q"),
4249
- q: /* @__PURE__ */ __name(function q(date, token, localize2) {
4250
- var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);
4251
- switch (token) {
4252
- case "q":
4253
- return String(quarter);
4254
- case "qq":
4255
- return addLeadingZeros(quarter, 2);
4256
- case "qo":
4257
- return localize2.ordinalNumber(quarter, {
4258
- unit: "quarter"
4259
- });
4260
- case "qqq":
4261
- return localize2.quarter(quarter, {
4262
- width: "abbreviated",
4263
- context: "standalone"
4264
- });
4265
- case "qqqqq":
4266
- return localize2.quarter(quarter, {
4267
- width: "narrow",
4268
- context: "standalone"
4269
- });
4270
- case "qqqq":
4271
- default:
4272
- return localize2.quarter(quarter, {
4273
- width: "wide",
4274
- context: "standalone"
4275
- });
4276
- }
4277
- }, "q"),
4278
- M: /* @__PURE__ */ __name(function M2(date, token, localize2) {
4279
- var month = date.getUTCMonth();
4280
- switch (token) {
4281
- case "M":
4282
- case "MM":
4283
- return lightFormatters_default.M(date, token);
4284
- case "Mo":
4285
- return localize2.ordinalNumber(month + 1, {
4286
- unit: "month"
4287
- });
4288
- case "MMM":
4289
- return localize2.month(month, {
4290
- width: "abbreviated",
4291
- context: "formatting"
4292
- });
4293
- case "MMMMM":
4294
- return localize2.month(month, {
4295
- width: "narrow",
4296
- context: "formatting"
4297
- });
4298
- case "MMMM":
4299
- default:
4300
- return localize2.month(month, {
4301
- width: "wide",
4302
- context: "formatting"
4303
- });
4304
- }
4305
- }, "M"),
4306
- L: /* @__PURE__ */ __name(function L(date, token, localize2) {
4307
- var month = date.getUTCMonth();
4308
- switch (token) {
4309
- case "L":
4310
- return String(month + 1);
4311
- case "LL":
4312
- return addLeadingZeros(month + 1, 2);
4313
- case "Lo":
4314
- return localize2.ordinalNumber(month + 1, {
4315
- unit: "month"
4316
- });
4317
- case "LLL":
4318
- return localize2.month(month, {
4319
- width: "abbreviated",
4320
- context: "standalone"
4321
- });
4322
- case "LLLLL":
4323
- return localize2.month(month, {
4324
- width: "narrow",
4325
- context: "standalone"
4326
- });
4327
- case "LLLL":
4328
- default:
4329
- return localize2.month(month, {
4330
- width: "wide",
4331
- context: "standalone"
4332
- });
4333
- }
4334
- }, "L"),
4335
- w: /* @__PURE__ */ __name(function w(date, token, localize2, options) {
4336
- var week = getUTCWeek(date, options);
4337
- if (token === "wo") {
4338
- return localize2.ordinalNumber(week, {
4339
- unit: "week"
4340
- });
4341
- }
4342
- return addLeadingZeros(week, token.length);
4343
- }, "w"),
4344
- I: /* @__PURE__ */ __name(function I(date, token, localize2) {
4345
- var isoWeek = getUTCISOWeek(date);
4346
- if (token === "Io") {
4347
- return localize2.ordinalNumber(isoWeek, {
4348
- unit: "week"
4349
- });
4350
- }
4351
- return addLeadingZeros(isoWeek, token.length);
4352
- }, "I"),
4353
- d: /* @__PURE__ */ __name(function d2(date, token, localize2) {
4354
- if (token === "do") {
4355
- return localize2.ordinalNumber(date.getUTCDate(), {
4356
- unit: "date"
4357
- });
4358
- }
4359
- return lightFormatters_default.d(date, token);
4360
- }, "d"),
4361
- D: /* @__PURE__ */ __name(function D(date, token, localize2) {
4362
- var dayOfYear = getUTCDayOfYear(date);
4363
- if (token === "Do") {
4364
- return localize2.ordinalNumber(dayOfYear, {
4365
- unit: "dayOfYear"
4366
- });
4367
- }
4368
- return addLeadingZeros(dayOfYear, token.length);
4369
- }, "D"),
4370
- E: /* @__PURE__ */ __name(function E(date, token, localize2) {
4371
- var dayOfWeek = date.getUTCDay();
4372
- switch (token) {
4373
- case "E":
4374
- case "EE":
4375
- case "EEE":
4376
- return localize2.day(dayOfWeek, {
4377
- width: "abbreviated",
4378
- context: "formatting"
4379
- });
4380
- case "EEEEE":
4381
- return localize2.day(dayOfWeek, {
4382
- width: "narrow",
4383
- context: "formatting"
4384
- });
4385
- case "EEEEEE":
4386
- return localize2.day(dayOfWeek, {
4387
- width: "short",
4388
- context: "formatting"
4389
- });
4390
- case "EEEE":
4391
- default:
4392
- return localize2.day(dayOfWeek, {
4393
- width: "wide",
4394
- context: "formatting"
4395
- });
4396
- }
4397
- }, "E"),
4398
- e: /* @__PURE__ */ __name(function e(date, token, localize2, options) {
4399
- var dayOfWeek = date.getUTCDay();
4400
- var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
4401
- switch (token) {
4402
- case "e":
4403
- return String(localDayOfWeek);
4404
- case "ee":
4405
- return addLeadingZeros(localDayOfWeek, 2);
4406
- case "eo":
4407
- return localize2.ordinalNumber(localDayOfWeek, {
4408
- unit: "day"
4409
- });
4410
- case "eee":
4411
- return localize2.day(dayOfWeek, {
4412
- width: "abbreviated",
4413
- context: "formatting"
4414
- });
4415
- case "eeeee":
4416
- return localize2.day(dayOfWeek, {
4417
- width: "narrow",
4418
- context: "formatting"
4419
- });
4420
- case "eeeeee":
4421
- return localize2.day(dayOfWeek, {
4422
- width: "short",
4423
- context: "formatting"
4424
- });
4425
- case "eeee":
4426
- default:
4427
- return localize2.day(dayOfWeek, {
4428
- width: "wide",
4429
- context: "formatting"
4430
- });
4431
- }
4432
- }, "e"),
4433
- c: /* @__PURE__ */ __name(function c(date, token, localize2, options) {
4434
- var dayOfWeek = date.getUTCDay();
4435
- var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
4436
- switch (token) {
4437
- case "c":
4438
- return String(localDayOfWeek);
4439
- case "cc":
4440
- return addLeadingZeros(localDayOfWeek, token.length);
4441
- case "co":
4442
- return localize2.ordinalNumber(localDayOfWeek, {
4443
- unit: "day"
4444
- });
4445
- case "ccc":
4446
- return localize2.day(dayOfWeek, {
4447
- width: "abbreviated",
4448
- context: "standalone"
4449
- });
4450
- case "ccccc":
4451
- return localize2.day(dayOfWeek, {
4452
- width: "narrow",
4453
- context: "standalone"
4454
- });
4455
- case "cccccc":
4456
- return localize2.day(dayOfWeek, {
4457
- width: "short",
4458
- context: "standalone"
4459
- });
4460
- case "cccc":
4461
- default:
4462
- return localize2.day(dayOfWeek, {
4463
- width: "wide",
4464
- context: "standalone"
4465
- });
4466
- }
4467
- }, "c"),
4468
- i: /* @__PURE__ */ __name(function i(date, token, localize2) {
4469
- var dayOfWeek = date.getUTCDay();
4470
- var isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;
4471
- switch (token) {
4472
- case "i":
4473
- return String(isoDayOfWeek);
4474
- case "ii":
4475
- return addLeadingZeros(isoDayOfWeek, token.length);
4476
- case "io":
4477
- return localize2.ordinalNumber(isoDayOfWeek, {
4478
- unit: "day"
4479
- });
4480
- case "iii":
4481
- return localize2.day(dayOfWeek, {
4482
- width: "abbreviated",
4483
- context: "formatting"
4484
- });
4485
- case "iiiii":
4486
- return localize2.day(dayOfWeek, {
4487
- width: "narrow",
4488
- context: "formatting"
4489
- });
4490
- case "iiiiii":
4491
- return localize2.day(dayOfWeek, {
4492
- width: "short",
4493
- context: "formatting"
4494
- });
4495
- case "iiii":
4496
- default:
4497
- return localize2.day(dayOfWeek, {
4498
- width: "wide",
4499
- context: "formatting"
4500
- });
4501
- }
4502
- }, "i"),
4503
- a: /* @__PURE__ */ __name(function a2(date, token, localize2) {
4504
- var hours = date.getUTCHours();
4505
- var dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am";
4506
- switch (token) {
4507
- case "a":
4508
- case "aa":
4509
- return localize2.dayPeriod(dayPeriodEnumValue, {
4510
- width: "abbreviated",
4511
- context: "formatting"
4512
- });
4513
- case "aaa":
4514
- return localize2.dayPeriod(dayPeriodEnumValue, {
4515
- width: "abbreviated",
4516
- context: "formatting"
4517
- }).toLowerCase();
4518
- case "aaaaa":
4519
- return localize2.dayPeriod(dayPeriodEnumValue, {
4520
- width: "narrow",
4521
- context: "formatting"
4522
- });
4523
- case "aaaa":
4524
- default:
4525
- return localize2.dayPeriod(dayPeriodEnumValue, {
4526
- width: "wide",
4527
- context: "formatting"
4528
- });
4529
- }
4530
- }, "a"),
4531
- b: /* @__PURE__ */ __name(function b(date, token, localize2) {
4532
- var hours = date.getUTCHours();
4533
- var dayPeriodEnumValue;
4534
- if (hours === 12) {
4535
- dayPeriodEnumValue = dayPeriodEnum.noon;
4536
- } else if (hours === 0) {
4537
- dayPeriodEnumValue = dayPeriodEnum.midnight;
4538
- } else {
4539
- dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am";
4540
- }
4541
- switch (token) {
4542
- case "b":
4543
- case "bb":
4544
- return localize2.dayPeriod(dayPeriodEnumValue, {
4545
- width: "abbreviated",
4546
- context: "formatting"
4547
- });
4548
- case "bbb":
4549
- return localize2.dayPeriod(dayPeriodEnumValue, {
4550
- width: "abbreviated",
4551
- context: "formatting"
4552
- }).toLowerCase();
4553
- case "bbbbb":
4554
- return localize2.dayPeriod(dayPeriodEnumValue, {
4555
- width: "narrow",
4556
- context: "formatting"
4557
- });
4558
- case "bbbb":
4559
- default:
4560
- return localize2.dayPeriod(dayPeriodEnumValue, {
4561
- width: "wide",
4562
- context: "formatting"
4563
- });
4564
- }
4565
- }, "b"),
4566
- B: /* @__PURE__ */ __name(function B(date, token, localize2) {
4567
- var hours = date.getUTCHours();
4568
- var dayPeriodEnumValue;
4569
- if (hours >= 17) {
4570
- dayPeriodEnumValue = dayPeriodEnum.evening;
4571
- } else if (hours >= 12) {
4572
- dayPeriodEnumValue = dayPeriodEnum.afternoon;
4573
- } else if (hours >= 4) {
4574
- dayPeriodEnumValue = dayPeriodEnum.morning;
4575
- } else {
4576
- dayPeriodEnumValue = dayPeriodEnum.night;
4577
- }
4578
- switch (token) {
4579
- case "B":
4580
- case "BB":
4581
- case "BBB":
4582
- return localize2.dayPeriod(dayPeriodEnumValue, {
4583
- width: "abbreviated",
4584
- context: "formatting"
4585
- });
4586
- case "BBBBB":
4587
- return localize2.dayPeriod(dayPeriodEnumValue, {
4588
- width: "narrow",
4589
- context: "formatting"
4590
- });
4591
- case "BBBB":
4592
- default:
4593
- return localize2.dayPeriod(dayPeriodEnumValue, {
4594
- width: "wide",
4595
- context: "formatting"
4596
- });
4597
- }
4598
- }, "B"),
4599
- h: /* @__PURE__ */ __name(function h2(date, token, localize2) {
4600
- if (token === "ho") {
4601
- var hours = date.getUTCHours() % 12;
4602
- if (hours === 0)
4603
- hours = 12;
4604
- return localize2.ordinalNumber(hours, {
4605
- unit: "hour"
4606
- });
4607
- }
4608
- return lightFormatters_default.h(date, token);
4609
- }, "h"),
4610
- H: /* @__PURE__ */ __name(function H2(date, token, localize2) {
4611
- if (token === "Ho") {
4612
- return localize2.ordinalNumber(date.getUTCHours(), {
4613
- unit: "hour"
4614
- });
4615
- }
4616
- return lightFormatters_default.H(date, token);
4617
- }, "H"),
4618
- K: /* @__PURE__ */ __name(function K(date, token, localize2) {
4619
- var hours = date.getUTCHours() % 12;
4620
- if (token === "Ko") {
4621
- return localize2.ordinalNumber(hours, {
4622
- unit: "hour"
4623
- });
4624
- }
4625
- return addLeadingZeros(hours, token.length);
4626
- }, "K"),
4627
- k: /* @__PURE__ */ __name(function k(date, token, localize2) {
4628
- var hours = date.getUTCHours();
4629
- if (hours === 0)
4630
- hours = 24;
4631
- if (token === "ko") {
4632
- return localize2.ordinalNumber(hours, {
4633
- unit: "hour"
4634
- });
4635
- }
4636
- return addLeadingZeros(hours, token.length);
4637
- }, "k"),
4638
- m: /* @__PURE__ */ __name(function m2(date, token, localize2) {
4639
- if (token === "mo") {
4640
- return localize2.ordinalNumber(date.getUTCMinutes(), {
4641
- unit: "minute"
4642
- });
4643
- }
4644
- return lightFormatters_default.m(date, token);
4645
- }, "m"),
4646
- s: /* @__PURE__ */ __name(function s2(date, token, localize2) {
4647
- if (token === "so") {
4648
- return localize2.ordinalNumber(date.getUTCSeconds(), {
4649
- unit: "second"
4650
- });
4131
+ }
4132
+ return number + "th";
4133
+ }, "ordinalNumber");
4134
+ var localize = {
4135
+ ordinalNumber,
4136
+ era: buildLocalizeFn({
4137
+ values: eraValues,
4138
+ defaultWidth: "wide"
4139
+ }),
4140
+ quarter: buildLocalizeFn({
4141
+ values: quarterValues,
4142
+ defaultWidth: "wide",
4143
+ argumentCallback: function(quarter) {
4144
+ return quarter - 1;
4651
4145
  }
4652
- return lightFormatters_default.s(date, token);
4653
- }, "s"),
4654
- S: /* @__PURE__ */ __name(function S2(date, token) {
4655
- return lightFormatters_default.S(date, token);
4656
- }, "S"),
4657
- X: /* @__PURE__ */ __name(function X(date, token, _localize, options) {
4658
- var originalDate = options._originalDate || date;
4659
- var timezoneOffset = originalDate.getTimezoneOffset();
4660
- if (timezoneOffset === 0) {
4661
- return "Z";
4146
+ }),
4147
+ month: buildLocalizeFn({
4148
+ values: monthValues,
4149
+ defaultWidth: "wide"
4150
+ }),
4151
+ day: buildLocalizeFn({
4152
+ values: dayValues,
4153
+ defaultWidth: "wide"
4154
+ }),
4155
+ dayPeriod: buildLocalizeFn({
4156
+ values: dayPeriodValues,
4157
+ defaultWidth: "wide",
4158
+ formattingValues: formattingDayPeriodValues,
4159
+ defaultFormattingWidth: "wide"
4160
+ })
4161
+ };
4162
+ var localize_default = localize;
4163
+
4164
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/locale/_lib/buildMatchFn/index.js
4165
+ function buildMatchFn(args) {
4166
+ return function(string) {
4167
+ var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
4168
+ var width = options.width;
4169
+ var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
4170
+ var matchResult = string.match(matchPattern);
4171
+ if (!matchResult) {
4172
+ return null;
4662
4173
  }
4663
- switch (token) {
4664
- case "X":
4665
- return formatTimezoneWithOptionalMinutes(timezoneOffset);
4666
- case "XXXX":
4667
- case "XX":
4668
- return formatTimezone(timezoneOffset);
4669
- case "XXXXX":
4670
- case "XXX":
4671
- default:
4672
- return formatTimezone(timezoneOffset, ":");
4174
+ var matchedString = matchResult[0];
4175
+ var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
4176
+ var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function(pattern) {
4177
+ return pattern.test(matchedString);
4178
+ }) : findKey(parsePatterns, function(pattern) {
4179
+ return pattern.test(matchedString);
4180
+ });
4181
+ var value;
4182
+ value = args.valueCallback ? args.valueCallback(key) : key;
4183
+ value = options.valueCallback ? options.valueCallback(value) : value;
4184
+ var rest = string.slice(matchedString.length);
4185
+ return {
4186
+ value,
4187
+ rest
4188
+ };
4189
+ };
4190
+ }
4191
+ __name(buildMatchFn, "buildMatchFn");
4192
+ function findKey(object, predicate) {
4193
+ for (var key in object) {
4194
+ if (object.hasOwnProperty(key) && predicate(object[key])) {
4195
+ return key;
4673
4196
  }
4674
- }, "X"),
4675
- x: /* @__PURE__ */ __name(function x(date, token, _localize, options) {
4676
- var originalDate = options._originalDate || date;
4677
- var timezoneOffset = originalDate.getTimezoneOffset();
4678
- switch (token) {
4679
- case "x":
4680
- return formatTimezoneWithOptionalMinutes(timezoneOffset);
4681
- case "xxxx":
4682
- case "xx":
4683
- return formatTimezone(timezoneOffset);
4684
- case "xxxxx":
4685
- case "xxx":
4686
- default:
4687
- return formatTimezone(timezoneOffset, ":");
4197
+ }
4198
+ return void 0;
4199
+ }
4200
+ __name(findKey, "findKey");
4201
+ function findIndex(array, predicate) {
4202
+ for (var key = 0; key < array.length; key++) {
4203
+ if (predicate(array[key])) {
4204
+ return key;
4688
4205
  }
4689
- }, "x"),
4690
- O: /* @__PURE__ */ __name(function O(date, token, _localize, options) {
4691
- var originalDate = options._originalDate || date;
4692
- var timezoneOffset = originalDate.getTimezoneOffset();
4693
- switch (token) {
4694
- case "O":
4695
- case "OO":
4696
- case "OOO":
4697
- return "GMT" + formatTimezoneShort(timezoneOffset, ":");
4698
- case "OOOO":
4699
- default:
4700
- return "GMT" + formatTimezone(timezoneOffset, ":");
4206
+ }
4207
+ return void 0;
4208
+ }
4209
+ __name(findIndex, "findIndex");
4210
+
4211
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/locale/_lib/buildMatchPatternFn/index.js
4212
+ function buildMatchPatternFn(args) {
4213
+ return function(string) {
4214
+ var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
4215
+ var matchResult = string.match(args.matchPattern);
4216
+ if (!matchResult)
4217
+ return null;
4218
+ var matchedString = matchResult[0];
4219
+ var parseResult = string.match(args.parsePattern);
4220
+ if (!parseResult)
4221
+ return null;
4222
+ var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
4223
+ value = options.valueCallback ? options.valueCallback(value) : value;
4224
+ var rest = string.slice(matchedString.length);
4225
+ return {
4226
+ value,
4227
+ rest
4228
+ };
4229
+ };
4230
+ }
4231
+ __name(buildMatchPatternFn, "buildMatchPatternFn");
4232
+
4233
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/locale/en-US/_lib/match/index.js
4234
+ var matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
4235
+ var parseOrdinalNumberPattern = /\d+/i;
4236
+ var matchEraPatterns = {
4237
+ narrow: /^(b|a)/i,
4238
+ abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
4239
+ wide: /^(before christ|before common era|anno domini|common era)/i
4240
+ };
4241
+ var parseEraPatterns = {
4242
+ any: [/^b/i, /^(a|c)/i]
4243
+ };
4244
+ var matchQuarterPatterns = {
4245
+ narrow: /^[1234]/i,
4246
+ abbreviated: /^q[1234]/i,
4247
+ wide: /^[1234](th|st|nd|rd)? quarter/i
4248
+ };
4249
+ var parseQuarterPatterns = {
4250
+ any: [/1/i, /2/i, /3/i, /4/i]
4251
+ };
4252
+ var matchMonthPatterns = {
4253
+ narrow: /^[jfmasond]/i,
4254
+ abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
4255
+ wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
4256
+ };
4257
+ var parseMonthPatterns = {
4258
+ 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],
4259
+ 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]
4260
+ };
4261
+ var matchDayPatterns = {
4262
+ narrow: /^[smtwf]/i,
4263
+ short: /^(su|mo|tu|we|th|fr|sa)/i,
4264
+ abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
4265
+ wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
4266
+ };
4267
+ var parseDayPatterns = {
4268
+ narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
4269
+ any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
4270
+ };
4271
+ var matchDayPeriodPatterns = {
4272
+ narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
4273
+ any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
4274
+ };
4275
+ var parseDayPeriodPatterns = {
4276
+ any: {
4277
+ am: /^a/i,
4278
+ pm: /^p/i,
4279
+ midnight: /^mi/i,
4280
+ noon: /^no/i,
4281
+ morning: /morning/i,
4282
+ afternoon: /afternoon/i,
4283
+ evening: /evening/i,
4284
+ night: /night/i
4285
+ }
4286
+ };
4287
+ var match = {
4288
+ ordinalNumber: buildMatchPatternFn({
4289
+ matchPattern: matchOrdinalNumberPattern,
4290
+ parsePattern: parseOrdinalNumberPattern,
4291
+ valueCallback: function(value) {
4292
+ return parseInt(value, 10);
4701
4293
  }
4702
- }, "O"),
4703
- z: /* @__PURE__ */ __name(function z(date, token, _localize, options) {
4704
- var originalDate = options._originalDate || date;
4705
- var timezoneOffset = originalDate.getTimezoneOffset();
4706
- switch (token) {
4707
- case "z":
4708
- case "zz":
4709
- case "zzz":
4710
- return "GMT" + formatTimezoneShort(timezoneOffset, ":");
4711
- case "zzzz":
4712
- default:
4713
- return "GMT" + formatTimezone(timezoneOffset, ":");
4294
+ }),
4295
+ era: buildMatchFn({
4296
+ matchPatterns: matchEraPatterns,
4297
+ defaultMatchWidth: "wide",
4298
+ parsePatterns: parseEraPatterns,
4299
+ defaultParseWidth: "any"
4300
+ }),
4301
+ quarter: buildMatchFn({
4302
+ matchPatterns: matchQuarterPatterns,
4303
+ defaultMatchWidth: "wide",
4304
+ parsePatterns: parseQuarterPatterns,
4305
+ defaultParseWidth: "any",
4306
+ valueCallback: function(index) {
4307
+ return index + 1;
4714
4308
  }
4715
- }, "z"),
4716
- t: /* @__PURE__ */ __name(function t(date, token, _localize, options) {
4717
- var originalDate = options._originalDate || date;
4718
- var timestamp = Math.floor(originalDate.getTime() / 1e3);
4719
- return addLeadingZeros(timestamp, token.length);
4720
- }, "t"),
4721
- T: /* @__PURE__ */ __name(function T(date, token, _localize, options) {
4722
- var originalDate = options._originalDate || date;
4723
- var timestamp = originalDate.getTime();
4724
- return addLeadingZeros(timestamp, token.length);
4725
- }, "T")
4309
+ }),
4310
+ month: buildMatchFn({
4311
+ matchPatterns: matchMonthPatterns,
4312
+ defaultMatchWidth: "wide",
4313
+ parsePatterns: parseMonthPatterns,
4314
+ defaultParseWidth: "any"
4315
+ }),
4316
+ day: buildMatchFn({
4317
+ matchPatterns: matchDayPatterns,
4318
+ defaultMatchWidth: "wide",
4319
+ parsePatterns: parseDayPatterns,
4320
+ defaultParseWidth: "any"
4321
+ }),
4322
+ dayPeriod: buildMatchFn({
4323
+ matchPatterns: matchDayPeriodPatterns,
4324
+ defaultMatchWidth: "any",
4325
+ parsePatterns: parseDayPeriodPatterns,
4326
+ defaultParseWidth: "any"
4327
+ })
4726
4328
  };
4727
- function formatTimezoneShort(offset, dirtyDelimiter) {
4728
- var sign = offset > 0 ? "-" : "+";
4729
- var absOffset = Math.abs(offset);
4730
- var hours = Math.floor(absOffset / 60);
4731
- var minutes = absOffset % 60;
4732
- if (minutes === 0) {
4733
- return sign + String(hours);
4329
+ var match_default = match;
4330
+
4331
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/locale/en-US/index.js
4332
+ var locale = {
4333
+ code: "en-US",
4334
+ formatDistance: formatDistance_default,
4335
+ formatLong: formatLong_default,
4336
+ formatRelative: formatRelative_default,
4337
+ localize: localize_default,
4338
+ match: match_default,
4339
+ options: {
4340
+ weekStartsOn: 0,
4341
+ firstWeekContainsDate: 1
4342
+ }
4343
+ };
4344
+ var en_US_default = locale;
4345
+
4346
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/subMilliseconds/index.js
4347
+ function subMilliseconds(dirtyDate, dirtyAmount) {
4348
+ requiredArgs(2, arguments);
4349
+ var amount = toInteger(dirtyAmount);
4350
+ return addMilliseconds(dirtyDate, -amount);
4351
+ }
4352
+ __name(subMilliseconds, "subMilliseconds");
4353
+
4354
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/getUTCDayOfYear/index.js
4355
+ var MILLISECONDS_IN_DAY = 864e5;
4356
+ function getUTCDayOfYear(dirtyDate) {
4357
+ requiredArgs(1, arguments);
4358
+ var date = toDate(dirtyDate);
4359
+ var timestamp = date.getTime();
4360
+ date.setUTCMonth(0, 1);
4361
+ date.setUTCHours(0, 0, 0, 0);
4362
+ var startOfYearTimestamp = date.getTime();
4363
+ var difference = timestamp - startOfYearTimestamp;
4364
+ return Math.floor(difference / MILLISECONDS_IN_DAY) + 1;
4365
+ }
4366
+ __name(getUTCDayOfYear, "getUTCDayOfYear");
4367
+
4368
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/startOfUTCISOWeek/index.js
4369
+ function startOfUTCISOWeek(dirtyDate) {
4370
+ requiredArgs(1, arguments);
4371
+ var weekStartsOn = 1;
4372
+ var date = toDate(dirtyDate);
4373
+ var day = date.getUTCDay();
4374
+ var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
4375
+ date.setUTCDate(date.getUTCDate() - diff);
4376
+ date.setUTCHours(0, 0, 0, 0);
4377
+ return date;
4378
+ }
4379
+ __name(startOfUTCISOWeek, "startOfUTCISOWeek");
4380
+
4381
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/getUTCISOWeekYear/index.js
4382
+ function getUTCISOWeekYear(dirtyDate) {
4383
+ requiredArgs(1, arguments);
4384
+ var date = toDate(dirtyDate);
4385
+ var year = date.getUTCFullYear();
4386
+ var fourthOfJanuaryOfNextYear = new Date(0);
4387
+ fourthOfJanuaryOfNextYear.setUTCFullYear(year + 1, 0, 4);
4388
+ fourthOfJanuaryOfNextYear.setUTCHours(0, 0, 0, 0);
4389
+ var startOfNextYear = startOfUTCISOWeek(fourthOfJanuaryOfNextYear);
4390
+ var fourthOfJanuaryOfThisYear = new Date(0);
4391
+ fourthOfJanuaryOfThisYear.setUTCFullYear(year, 0, 4);
4392
+ fourthOfJanuaryOfThisYear.setUTCHours(0, 0, 0, 0);
4393
+ var startOfThisYear = startOfUTCISOWeek(fourthOfJanuaryOfThisYear);
4394
+ if (date.getTime() >= startOfNextYear.getTime()) {
4395
+ return year + 1;
4396
+ } else if (date.getTime() >= startOfThisYear.getTime()) {
4397
+ return year;
4398
+ } else {
4399
+ return year - 1;
4734
4400
  }
4735
- var delimiter = dirtyDelimiter || "";
4736
- return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);
4737
4401
  }
4738
- __name(formatTimezoneShort, "formatTimezoneShort");
4739
- function formatTimezoneWithOptionalMinutes(offset, dirtyDelimiter) {
4740
- if (offset % 60 === 0) {
4741
- var sign = offset > 0 ? "-" : "+";
4742
- return sign + addLeadingZeros(Math.abs(offset) / 60, 2);
4743
- }
4744
- return formatTimezone(offset, dirtyDelimiter);
4402
+ __name(getUTCISOWeekYear, "getUTCISOWeekYear");
4403
+
4404
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/startOfUTCISOWeekYear/index.js
4405
+ function startOfUTCISOWeekYear(dirtyDate) {
4406
+ requiredArgs(1, arguments);
4407
+ var year = getUTCISOWeekYear(dirtyDate);
4408
+ var fourthOfJanuary = new Date(0);
4409
+ fourthOfJanuary.setUTCFullYear(year, 0, 4);
4410
+ fourthOfJanuary.setUTCHours(0, 0, 0, 0);
4411
+ var date = startOfUTCISOWeek(fourthOfJanuary);
4412
+ return date;
4745
4413
  }
4746
- __name(formatTimezoneWithOptionalMinutes, "formatTimezoneWithOptionalMinutes");
4747
- function formatTimezone(offset, dirtyDelimiter) {
4748
- var delimiter = dirtyDelimiter || "";
4749
- var sign = offset > 0 ? "-" : "+";
4750
- var absOffset = Math.abs(offset);
4751
- var hours = addLeadingZeros(Math.floor(absOffset / 60), 2);
4752
- var minutes = addLeadingZeros(absOffset % 60, 2);
4753
- return sign + hours + delimiter + minutes;
4414
+ __name(startOfUTCISOWeekYear, "startOfUTCISOWeekYear");
4415
+
4416
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/getUTCISOWeek/index.js
4417
+ var MILLISECONDS_IN_WEEK = 6048e5;
4418
+ function getUTCISOWeek(dirtyDate) {
4419
+ requiredArgs(1, arguments);
4420
+ var date = toDate(dirtyDate);
4421
+ var diff = startOfUTCISOWeek(date).getTime() - startOfUTCISOWeekYear(date).getTime();
4422
+ return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;
4754
4423
  }
4755
- __name(formatTimezone, "formatTimezone");
4756
- var formatters_default = formatters2;
4424
+ __name(getUTCISOWeek, "getUTCISOWeek");
4757
4425
 
4758
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/format/longFormatters/index.js
4759
- var dateLongFormatter = /* @__PURE__ */ __name(function dateLongFormatter2(pattern, formatLong2) {
4760
- switch (pattern) {
4761
- case "P":
4762
- return formatLong2.date({
4763
- width: "short"
4764
- });
4765
- case "PP":
4766
- return formatLong2.date({
4767
- width: "medium"
4768
- });
4769
- case "PPP":
4770
- return formatLong2.date({
4771
- width: "long"
4772
- });
4773
- case "PPPP":
4774
- default:
4775
- return formatLong2.date({
4776
- width: "full"
4777
- });
4778
- }
4779
- }, "dateLongFormatter");
4780
- var timeLongFormatter = /* @__PURE__ */ __name(function timeLongFormatter2(pattern, formatLong2) {
4781
- switch (pattern) {
4782
- case "p":
4783
- return formatLong2.time({
4784
- width: "short"
4785
- });
4786
- case "pp":
4787
- return formatLong2.time({
4788
- width: "medium"
4789
- });
4790
- case "ppp":
4791
- return formatLong2.time({
4792
- width: "long"
4793
- });
4794
- case "pppp":
4795
- default:
4796
- return formatLong2.time({
4797
- width: "full"
4798
- });
4426
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/startOfUTCWeek/index.js
4427
+ function startOfUTCWeek(dirtyDate, dirtyOptions) {
4428
+ requiredArgs(1, arguments);
4429
+ var options = dirtyOptions || {};
4430
+ var locale2 = options.locale;
4431
+ var localeWeekStartsOn = locale2 && locale2.options && locale2.options.weekStartsOn;
4432
+ var defaultWeekStartsOn = localeWeekStartsOn == null ? 0 : toInteger(localeWeekStartsOn);
4433
+ var weekStartsOn = options.weekStartsOn == null ? defaultWeekStartsOn : toInteger(options.weekStartsOn);
4434
+ if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {
4435
+ throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
4799
4436
  }
4800
- }, "timeLongFormatter");
4801
- var dateTimeLongFormatter = /* @__PURE__ */ __name(function dateTimeLongFormatter2(pattern, formatLong2) {
4802
- var matchResult = pattern.match(/(P+)(p+)?/) || [];
4803
- var datePattern = matchResult[1];
4804
- var timePattern = matchResult[2];
4805
- if (!timePattern) {
4806
- return dateLongFormatter(pattern, formatLong2);
4437
+ var date = toDate(dirtyDate);
4438
+ var day = date.getUTCDay();
4439
+ var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
4440
+ date.setUTCDate(date.getUTCDate() - diff);
4441
+ date.setUTCHours(0, 0, 0, 0);
4442
+ return date;
4443
+ }
4444
+ __name(startOfUTCWeek, "startOfUTCWeek");
4445
+
4446
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/getUTCWeekYear/index.js
4447
+ function getUTCWeekYear(dirtyDate, dirtyOptions) {
4448
+ requiredArgs(1, arguments);
4449
+ var date = toDate(dirtyDate);
4450
+ var year = date.getUTCFullYear();
4451
+ var options = dirtyOptions || {};
4452
+ var locale2 = options.locale;
4453
+ var localeFirstWeekContainsDate = locale2 && locale2.options && locale2.options.firstWeekContainsDate;
4454
+ var defaultFirstWeekContainsDate = localeFirstWeekContainsDate == null ? 1 : toInteger(localeFirstWeekContainsDate);
4455
+ var firstWeekContainsDate = options.firstWeekContainsDate == null ? defaultFirstWeekContainsDate : toInteger(options.firstWeekContainsDate);
4456
+ if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {
4457
+ throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");
4807
4458
  }
4808
- var dateTimeFormat;
4809
- switch (datePattern) {
4810
- case "P":
4811
- dateTimeFormat = formatLong2.dateTime({
4812
- width: "short"
4813
- });
4814
- break;
4815
- case "PP":
4816
- dateTimeFormat = formatLong2.dateTime({
4817
- width: "medium"
4818
- });
4819
- break;
4820
- case "PPP":
4821
- dateTimeFormat = formatLong2.dateTime({
4822
- width: "long"
4823
- });
4824
- break;
4825
- case "PPPP":
4826
- default:
4827
- dateTimeFormat = formatLong2.dateTime({
4828
- width: "full"
4829
- });
4830
- break;
4459
+ var firstWeekOfNextYear = new Date(0);
4460
+ firstWeekOfNextYear.setUTCFullYear(year + 1, 0, firstWeekContainsDate);
4461
+ firstWeekOfNextYear.setUTCHours(0, 0, 0, 0);
4462
+ var startOfNextYear = startOfUTCWeek(firstWeekOfNextYear, dirtyOptions);
4463
+ var firstWeekOfThisYear = new Date(0);
4464
+ firstWeekOfThisYear.setUTCFullYear(year, 0, firstWeekContainsDate);
4465
+ firstWeekOfThisYear.setUTCHours(0, 0, 0, 0);
4466
+ var startOfThisYear = startOfUTCWeek(firstWeekOfThisYear, dirtyOptions);
4467
+ if (date.getTime() >= startOfNextYear.getTime()) {
4468
+ return year + 1;
4469
+ } else if (date.getTime() >= startOfThisYear.getTime()) {
4470
+ return year;
4471
+ } else {
4472
+ return year - 1;
4831
4473
  }
4832
- return dateTimeFormat.replace("{{date}}", dateLongFormatter(datePattern, formatLong2)).replace("{{time}}", timeLongFormatter(timePattern, formatLong2));
4833
- }, "dateTimeLongFormatter");
4834
- var longFormatters = {
4835
- p: timeLongFormatter,
4836
- P: dateTimeLongFormatter
4837
- };
4838
- var longFormatters_default = longFormatters;
4474
+ }
4475
+ __name(getUTCWeekYear, "getUTCWeekYear");
4839
4476
 
4840
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/protectedTokens/index.js
4841
- var protectedDayOfYearTokens = ["D", "DD"];
4842
- var protectedWeekYearTokens = ["YY", "YYYY"];
4843
- function isProtectedDayOfYearToken(token) {
4844
- return protectedDayOfYearTokens.indexOf(token) !== -1;
4477
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/startOfUTCWeekYear/index.js
4478
+ function startOfUTCWeekYear(dirtyDate, dirtyOptions) {
4479
+ requiredArgs(1, arguments);
4480
+ var options = dirtyOptions || {};
4481
+ var locale2 = options.locale;
4482
+ var localeFirstWeekContainsDate = locale2 && locale2.options && locale2.options.firstWeekContainsDate;
4483
+ var defaultFirstWeekContainsDate = localeFirstWeekContainsDate == null ? 1 : toInteger(localeFirstWeekContainsDate);
4484
+ var firstWeekContainsDate = options.firstWeekContainsDate == null ? defaultFirstWeekContainsDate : toInteger(options.firstWeekContainsDate);
4485
+ var year = getUTCWeekYear(dirtyDate, dirtyOptions);
4486
+ var firstWeek = new Date(0);
4487
+ firstWeek.setUTCFullYear(year, 0, firstWeekContainsDate);
4488
+ firstWeek.setUTCHours(0, 0, 0, 0);
4489
+ var date = startOfUTCWeek(firstWeek, dirtyOptions);
4490
+ return date;
4845
4491
  }
4846
- __name(isProtectedDayOfYearToken, "isProtectedDayOfYearToken");
4847
- function isProtectedWeekYearToken(token) {
4848
- return protectedWeekYearTokens.indexOf(token) !== -1;
4492
+ __name(startOfUTCWeekYear, "startOfUTCWeekYear");
4493
+
4494
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/getUTCWeek/index.js
4495
+ var MILLISECONDS_IN_WEEK2 = 6048e5;
4496
+ function getUTCWeek(dirtyDate, options) {
4497
+ requiredArgs(1, arguments);
4498
+ var date = toDate(dirtyDate);
4499
+ var diff = startOfUTCWeek(date, options).getTime() - startOfUTCWeekYear(date, options).getTime();
4500
+ return Math.round(diff / MILLISECONDS_IN_WEEK2) + 1;
4849
4501
  }
4850
- __name(isProtectedWeekYearToken, "isProtectedWeekYearToken");
4851
- function throwProtectedError(token, format2, input) {
4852
- if (token === "YYYY") {
4853
- throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(format2, "`) for formatting years to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
4854
- } else if (token === "YY") {
4855
- throw new RangeError("Use `yy` instead of `YY` (in `".concat(format2, "`) for formatting years to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
4856
- } else if (token === "D") {
4857
- throw new RangeError("Use `d` instead of `D` (in `".concat(format2, "`) for formatting days of the month to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
4858
- } else if (token === "DD") {
4859
- throw new RangeError("Use `dd` instead of `DD` (in `".concat(format2, "`) for formatting days of the month to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
4502
+ __name(getUTCWeek, "getUTCWeek");
4503
+
4504
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/addLeadingZeros/index.js
4505
+ function addLeadingZeros(number, targetLength) {
4506
+ var sign = number < 0 ? "-" : "";
4507
+ var output = Math.abs(number).toString();
4508
+ while (output.length < targetLength) {
4509
+ output = "0" + output;
4860
4510
  }
4511
+ return sign + output;
4861
4512
  }
4862
- __name(throwProtectedError, "throwProtectedError");
4513
+ __name(addLeadingZeros, "addLeadingZeros");
4863
4514
 
4864
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/locale/en-US/_lib/formatDistance/index.js
4865
- var formatDistanceLocale = {
4866
- lessThanXSeconds: {
4867
- one: "less than a second",
4868
- other: "less than {{count}} seconds"
4515
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/format/lightFormatters/index.js
4516
+ var formatters = {
4517
+ y: function(date, token) {
4518
+ var signedYear = date.getUTCFullYear();
4519
+ var year = signedYear > 0 ? signedYear : 1 - signedYear;
4520
+ return addLeadingZeros(token === "yy" ? year % 100 : year, token.length);
4521
+ },
4522
+ M: function(date, token) {
4523
+ var month = date.getUTCMonth();
4524
+ return token === "M" ? String(month + 1) : addLeadingZeros(month + 1, 2);
4525
+ },
4526
+ d: function(date, token) {
4527
+ return addLeadingZeros(date.getUTCDate(), token.length);
4528
+ },
4529
+ a: function(date, token) {
4530
+ var dayPeriodEnumValue = date.getUTCHours() / 12 >= 1 ? "pm" : "am";
4531
+ switch (token) {
4532
+ case "a":
4533
+ case "aa":
4534
+ return dayPeriodEnumValue.toUpperCase();
4535
+ case "aaa":
4536
+ return dayPeriodEnumValue;
4537
+ case "aaaaa":
4538
+ return dayPeriodEnumValue[0];
4539
+ case "aaaa":
4540
+ default:
4541
+ return dayPeriodEnumValue === "am" ? "a.m." : "p.m.";
4542
+ }
4543
+ },
4544
+ h: function(date, token) {
4545
+ return addLeadingZeros(date.getUTCHours() % 12 || 12, token.length);
4546
+ },
4547
+ H: function(date, token) {
4548
+ return addLeadingZeros(date.getUTCHours(), token.length);
4549
+ },
4550
+ m: function(date, token) {
4551
+ return addLeadingZeros(date.getUTCMinutes(), token.length);
4552
+ },
4553
+ s: function(date, token) {
4554
+ return addLeadingZeros(date.getUTCSeconds(), token.length);
4555
+ },
4556
+ S: function(date, token) {
4557
+ var numberOfDigits = token.length;
4558
+ var milliseconds = date.getUTCMilliseconds();
4559
+ var fractionalSeconds = Math.floor(milliseconds * Math.pow(10, numberOfDigits - 3));
4560
+ return addLeadingZeros(fractionalSeconds, token.length);
4561
+ }
4562
+ };
4563
+ var lightFormatters_default = formatters;
4564
+
4565
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/format/formatters/index.js
4566
+ var dayPeriodEnum = {
4567
+ am: "am",
4568
+ pm: "pm",
4569
+ midnight: "midnight",
4570
+ noon: "noon",
4571
+ morning: "morning",
4572
+ afternoon: "afternoon",
4573
+ evening: "evening",
4574
+ night: "night"
4575
+ };
4576
+ var formatters2 = {
4577
+ G: function(date, token, localize2) {
4578
+ var era = date.getUTCFullYear() > 0 ? 1 : 0;
4579
+ switch (token) {
4580
+ case "G":
4581
+ case "GG":
4582
+ case "GGG":
4583
+ return localize2.era(era, {
4584
+ width: "abbreviated"
4585
+ });
4586
+ case "GGGGG":
4587
+ return localize2.era(era, {
4588
+ width: "narrow"
4589
+ });
4590
+ case "GGGG":
4591
+ default:
4592
+ return localize2.era(era, {
4593
+ width: "wide"
4594
+ });
4595
+ }
4869
4596
  },
4870
- xSeconds: {
4871
- one: "1 second",
4872
- other: "{{count}} seconds"
4597
+ y: function(date, token, localize2) {
4598
+ if (token === "yo") {
4599
+ var signedYear = date.getUTCFullYear();
4600
+ var year = signedYear > 0 ? signedYear : 1 - signedYear;
4601
+ return localize2.ordinalNumber(year, {
4602
+ unit: "year"
4603
+ });
4604
+ }
4605
+ return lightFormatters_default.y(date, token);
4873
4606
  },
4874
- halfAMinute: "half a minute",
4875
- lessThanXMinutes: {
4876
- one: "less than a minute",
4877
- other: "less than {{count}} minutes"
4607
+ Y: function(date, token, localize2, options) {
4608
+ var signedWeekYear = getUTCWeekYear(date, options);
4609
+ var weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;
4610
+ if (token === "YY") {
4611
+ var twoDigitYear = weekYear % 100;
4612
+ return addLeadingZeros(twoDigitYear, 2);
4613
+ }
4614
+ if (token === "Yo") {
4615
+ return localize2.ordinalNumber(weekYear, {
4616
+ unit: "year"
4617
+ });
4618
+ }
4619
+ return addLeadingZeros(weekYear, token.length);
4878
4620
  },
4879
- xMinutes: {
4880
- one: "1 minute",
4881
- other: "{{count}} minutes"
4621
+ R: function(date, token) {
4622
+ var isoWeekYear = getUTCISOWeekYear(date);
4623
+ return addLeadingZeros(isoWeekYear, token.length);
4882
4624
  },
4883
- aboutXHours: {
4884
- one: "about 1 hour",
4885
- other: "about {{count}} hours"
4625
+ u: function(date, token) {
4626
+ var year = date.getUTCFullYear();
4627
+ return addLeadingZeros(year, token.length);
4886
4628
  },
4887
- xHours: {
4888
- one: "1 hour",
4889
- other: "{{count}} hours"
4629
+ Q: function(date, token, localize2) {
4630
+ var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);
4631
+ switch (token) {
4632
+ case "Q":
4633
+ return String(quarter);
4634
+ case "QQ":
4635
+ return addLeadingZeros(quarter, 2);
4636
+ case "Qo":
4637
+ return localize2.ordinalNumber(quarter, {
4638
+ unit: "quarter"
4639
+ });
4640
+ case "QQQ":
4641
+ return localize2.quarter(quarter, {
4642
+ width: "abbreviated",
4643
+ context: "formatting"
4644
+ });
4645
+ case "QQQQQ":
4646
+ return localize2.quarter(quarter, {
4647
+ width: "narrow",
4648
+ context: "formatting"
4649
+ });
4650
+ case "QQQQ":
4651
+ default:
4652
+ return localize2.quarter(quarter, {
4653
+ width: "wide",
4654
+ context: "formatting"
4655
+ });
4656
+ }
4890
4657
  },
4891
- xDays: {
4892
- one: "1 day",
4893
- other: "{{count}} days"
4658
+ q: function(date, token, localize2) {
4659
+ var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);
4660
+ switch (token) {
4661
+ case "q":
4662
+ return String(quarter);
4663
+ case "qq":
4664
+ return addLeadingZeros(quarter, 2);
4665
+ case "qo":
4666
+ return localize2.ordinalNumber(quarter, {
4667
+ unit: "quarter"
4668
+ });
4669
+ case "qqq":
4670
+ return localize2.quarter(quarter, {
4671
+ width: "abbreviated",
4672
+ context: "standalone"
4673
+ });
4674
+ case "qqqqq":
4675
+ return localize2.quarter(quarter, {
4676
+ width: "narrow",
4677
+ context: "standalone"
4678
+ });
4679
+ case "qqqq":
4680
+ default:
4681
+ return localize2.quarter(quarter, {
4682
+ width: "wide",
4683
+ context: "standalone"
4684
+ });
4685
+ }
4894
4686
  },
4895
- aboutXWeeks: {
4896
- one: "about 1 week",
4897
- other: "about {{count}} weeks"
4687
+ M: function(date, token, localize2) {
4688
+ var month = date.getUTCMonth();
4689
+ switch (token) {
4690
+ case "M":
4691
+ case "MM":
4692
+ return lightFormatters_default.M(date, token);
4693
+ case "Mo":
4694
+ return localize2.ordinalNumber(month + 1, {
4695
+ unit: "month"
4696
+ });
4697
+ case "MMM":
4698
+ return localize2.month(month, {
4699
+ width: "abbreviated",
4700
+ context: "formatting"
4701
+ });
4702
+ case "MMMMM":
4703
+ return localize2.month(month, {
4704
+ width: "narrow",
4705
+ context: "formatting"
4706
+ });
4707
+ case "MMMM":
4708
+ default:
4709
+ return localize2.month(month, {
4710
+ width: "wide",
4711
+ context: "formatting"
4712
+ });
4713
+ }
4898
4714
  },
4899
- xWeeks: {
4900
- one: "1 week",
4901
- other: "{{count}} weeks"
4715
+ L: function(date, token, localize2) {
4716
+ var month = date.getUTCMonth();
4717
+ switch (token) {
4718
+ case "L":
4719
+ return String(month + 1);
4720
+ case "LL":
4721
+ return addLeadingZeros(month + 1, 2);
4722
+ case "Lo":
4723
+ return localize2.ordinalNumber(month + 1, {
4724
+ unit: "month"
4725
+ });
4726
+ case "LLL":
4727
+ return localize2.month(month, {
4728
+ width: "abbreviated",
4729
+ context: "standalone"
4730
+ });
4731
+ case "LLLLL":
4732
+ return localize2.month(month, {
4733
+ width: "narrow",
4734
+ context: "standalone"
4735
+ });
4736
+ case "LLLL":
4737
+ default:
4738
+ return localize2.month(month, {
4739
+ width: "wide",
4740
+ context: "standalone"
4741
+ });
4742
+ }
4902
4743
  },
4903
- aboutXMonths: {
4904
- one: "about 1 month",
4905
- other: "about {{count}} months"
4744
+ w: function(date, token, localize2, options) {
4745
+ var week = getUTCWeek(date, options);
4746
+ if (token === "wo") {
4747
+ return localize2.ordinalNumber(week, {
4748
+ unit: "week"
4749
+ });
4750
+ }
4751
+ return addLeadingZeros(week, token.length);
4906
4752
  },
4907
- xMonths: {
4908
- one: "1 month",
4909
- other: "{{count}} months"
4753
+ I: function(date, token, localize2) {
4754
+ var isoWeek = getUTCISOWeek(date);
4755
+ if (token === "Io") {
4756
+ return localize2.ordinalNumber(isoWeek, {
4757
+ unit: "week"
4758
+ });
4759
+ }
4760
+ return addLeadingZeros(isoWeek, token.length);
4761
+ },
4762
+ d: function(date, token, localize2) {
4763
+ if (token === "do") {
4764
+ return localize2.ordinalNumber(date.getUTCDate(), {
4765
+ unit: "date"
4766
+ });
4767
+ }
4768
+ return lightFormatters_default.d(date, token);
4769
+ },
4770
+ D: function(date, token, localize2) {
4771
+ var dayOfYear = getUTCDayOfYear(date);
4772
+ if (token === "Do") {
4773
+ return localize2.ordinalNumber(dayOfYear, {
4774
+ unit: "dayOfYear"
4775
+ });
4776
+ }
4777
+ return addLeadingZeros(dayOfYear, token.length);
4778
+ },
4779
+ E: function(date, token, localize2) {
4780
+ var dayOfWeek = date.getUTCDay();
4781
+ switch (token) {
4782
+ case "E":
4783
+ case "EE":
4784
+ case "EEE":
4785
+ return localize2.day(dayOfWeek, {
4786
+ width: "abbreviated",
4787
+ context: "formatting"
4788
+ });
4789
+ case "EEEEE":
4790
+ return localize2.day(dayOfWeek, {
4791
+ width: "narrow",
4792
+ context: "formatting"
4793
+ });
4794
+ case "EEEEEE":
4795
+ return localize2.day(dayOfWeek, {
4796
+ width: "short",
4797
+ context: "formatting"
4798
+ });
4799
+ case "EEEE":
4800
+ default:
4801
+ return localize2.day(dayOfWeek, {
4802
+ width: "wide",
4803
+ context: "formatting"
4804
+ });
4805
+ }
4806
+ },
4807
+ e: function(date, token, localize2, options) {
4808
+ var dayOfWeek = date.getUTCDay();
4809
+ var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
4810
+ switch (token) {
4811
+ case "e":
4812
+ return String(localDayOfWeek);
4813
+ case "ee":
4814
+ return addLeadingZeros(localDayOfWeek, 2);
4815
+ case "eo":
4816
+ return localize2.ordinalNumber(localDayOfWeek, {
4817
+ unit: "day"
4818
+ });
4819
+ case "eee":
4820
+ return localize2.day(dayOfWeek, {
4821
+ width: "abbreviated",
4822
+ context: "formatting"
4823
+ });
4824
+ case "eeeee":
4825
+ return localize2.day(dayOfWeek, {
4826
+ width: "narrow",
4827
+ context: "formatting"
4828
+ });
4829
+ case "eeeeee":
4830
+ return localize2.day(dayOfWeek, {
4831
+ width: "short",
4832
+ context: "formatting"
4833
+ });
4834
+ case "eeee":
4835
+ default:
4836
+ return localize2.day(dayOfWeek, {
4837
+ width: "wide",
4838
+ context: "formatting"
4839
+ });
4840
+ }
4910
4841
  },
4911
- aboutXYears: {
4912
- one: "about 1 year",
4913
- other: "about {{count}} years"
4842
+ c: function(date, token, localize2, options) {
4843
+ var dayOfWeek = date.getUTCDay();
4844
+ var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
4845
+ switch (token) {
4846
+ case "c":
4847
+ return String(localDayOfWeek);
4848
+ case "cc":
4849
+ return addLeadingZeros(localDayOfWeek, token.length);
4850
+ case "co":
4851
+ return localize2.ordinalNumber(localDayOfWeek, {
4852
+ unit: "day"
4853
+ });
4854
+ case "ccc":
4855
+ return localize2.day(dayOfWeek, {
4856
+ width: "abbreviated",
4857
+ context: "standalone"
4858
+ });
4859
+ case "ccccc":
4860
+ return localize2.day(dayOfWeek, {
4861
+ width: "narrow",
4862
+ context: "standalone"
4863
+ });
4864
+ case "cccccc":
4865
+ return localize2.day(dayOfWeek, {
4866
+ width: "short",
4867
+ context: "standalone"
4868
+ });
4869
+ case "cccc":
4870
+ default:
4871
+ return localize2.day(dayOfWeek, {
4872
+ width: "wide",
4873
+ context: "standalone"
4874
+ });
4875
+ }
4914
4876
  },
4915
- xYears: {
4916
- one: "1 year",
4917
- other: "{{count}} years"
4877
+ i: function(date, token, localize2) {
4878
+ var dayOfWeek = date.getUTCDay();
4879
+ var isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;
4880
+ switch (token) {
4881
+ case "i":
4882
+ return String(isoDayOfWeek);
4883
+ case "ii":
4884
+ return addLeadingZeros(isoDayOfWeek, token.length);
4885
+ case "io":
4886
+ return localize2.ordinalNumber(isoDayOfWeek, {
4887
+ unit: "day"
4888
+ });
4889
+ case "iii":
4890
+ return localize2.day(dayOfWeek, {
4891
+ width: "abbreviated",
4892
+ context: "formatting"
4893
+ });
4894
+ case "iiiii":
4895
+ return localize2.day(dayOfWeek, {
4896
+ width: "narrow",
4897
+ context: "formatting"
4898
+ });
4899
+ case "iiiiii":
4900
+ return localize2.day(dayOfWeek, {
4901
+ width: "short",
4902
+ context: "formatting"
4903
+ });
4904
+ case "iiii":
4905
+ default:
4906
+ return localize2.day(dayOfWeek, {
4907
+ width: "wide",
4908
+ context: "formatting"
4909
+ });
4910
+ }
4918
4911
  },
4919
- overXYears: {
4920
- one: "over 1 year",
4921
- other: "over {{count}} years"
4912
+ a: function(date, token, localize2) {
4913
+ var hours = date.getUTCHours();
4914
+ var dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am";
4915
+ switch (token) {
4916
+ case "a":
4917
+ case "aa":
4918
+ return localize2.dayPeriod(dayPeriodEnumValue, {
4919
+ width: "abbreviated",
4920
+ context: "formatting"
4921
+ });
4922
+ case "aaa":
4923
+ return localize2.dayPeriod(dayPeriodEnumValue, {
4924
+ width: "abbreviated",
4925
+ context: "formatting"
4926
+ }).toLowerCase();
4927
+ case "aaaaa":
4928
+ return localize2.dayPeriod(dayPeriodEnumValue, {
4929
+ width: "narrow",
4930
+ context: "formatting"
4931
+ });
4932
+ case "aaaa":
4933
+ default:
4934
+ return localize2.dayPeriod(dayPeriodEnumValue, {
4935
+ width: "wide",
4936
+ context: "formatting"
4937
+ });
4938
+ }
4922
4939
  },
4923
- almostXYears: {
4924
- one: "almost 1 year",
4925
- other: "almost {{count}} years"
4926
- }
4927
- };
4928
- var formatDistance = /* @__PURE__ */ __name(function formatDistance2(token, count, options) {
4929
- var result;
4930
- var tokenValue = formatDistanceLocale[token];
4931
- if (typeof tokenValue === "string") {
4932
- result = tokenValue;
4933
- } else if (count === 1) {
4934
- result = tokenValue.one;
4935
- } else {
4936
- result = tokenValue.other.replace("{{count}}", count.toString());
4937
- }
4938
- if (options !== null && options !== void 0 && options.addSuffix) {
4939
- if (options.comparison && options.comparison > 0) {
4940
- return "in " + result;
4940
+ b: function(date, token, localize2) {
4941
+ var hours = date.getUTCHours();
4942
+ var dayPeriodEnumValue;
4943
+ if (hours === 12) {
4944
+ dayPeriodEnumValue = dayPeriodEnum.noon;
4945
+ } else if (hours === 0) {
4946
+ dayPeriodEnumValue = dayPeriodEnum.midnight;
4941
4947
  } else {
4942
- return result + " ago";
4948
+ dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am";
4943
4949
  }
4944
- }
4945
- return result;
4946
- }, "formatDistance");
4947
- var formatDistance_default = formatDistance;
4948
-
4949
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/locale/_lib/buildFormatLongFn/index.js
4950
- function buildFormatLongFn(args) {
4951
- return function() {
4952
- var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
4953
- var width = options.width ? String(options.width) : args.defaultWidth;
4954
- var format2 = args.formats[width] || args.formats[args.defaultWidth];
4955
- return format2;
4956
- };
4957
- }
4958
- __name(buildFormatLongFn, "buildFormatLongFn");
4959
-
4960
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/locale/en-US/_lib/formatLong/index.js
4961
- var dateFormats = {
4962
- full: "EEEE, MMMM do, y",
4963
- long: "MMMM do, y",
4964
- medium: "MMM d, y",
4965
- short: "MM/dd/yyyy"
4966
- };
4967
- var timeFormats = {
4968
- full: "h:mm:ss a zzzz",
4969
- long: "h:mm:ss a z",
4970
- medium: "h:mm:ss a",
4971
- short: "h:mm a"
4972
- };
4973
- var dateTimeFormats = {
4974
- full: "{{date}} 'at' {{time}}",
4975
- long: "{{date}} 'at' {{time}}",
4976
- medium: "{{date}}, {{time}}",
4977
- short: "{{date}}, {{time}}"
4978
- };
4979
- var formatLong = {
4980
- date: buildFormatLongFn({
4981
- formats: dateFormats,
4982
- defaultWidth: "full"
4983
- }),
4984
- time: buildFormatLongFn({
4985
- formats: timeFormats,
4986
- defaultWidth: "full"
4987
- }),
4988
- dateTime: buildFormatLongFn({
4989
- formats: dateTimeFormats,
4990
- defaultWidth: "full"
4991
- })
4992
- };
4993
- var formatLong_default = formatLong;
4994
-
4995
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/locale/en-US/_lib/formatRelative/index.js
4996
- var formatRelativeLocale = {
4997
- lastWeek: "'last' eeee 'at' p",
4998
- yesterday: "'yesterday at' p",
4999
- today: "'today at' p",
5000
- tomorrow: "'tomorrow at' p",
5001
- nextWeek: "eeee 'at' p",
5002
- other: "P"
5003
- };
5004
- var formatRelative = /* @__PURE__ */ __name(function formatRelative2(token, _date, _baseDate, _options) {
5005
- return formatRelativeLocale[token];
5006
- }, "formatRelative");
5007
- var formatRelative_default = formatRelative;
5008
-
5009
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/locale/_lib/buildLocalizeFn/index.js
5010
- function buildLocalizeFn(args) {
5011
- return function(dirtyIndex, options) {
5012
- var context = options !== null && options !== void 0 && options.context ? String(options.context) : "standalone";
5013
- var valuesArray;
5014
- if (context === "formatting" && args.formattingValues) {
5015
- var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
5016
- var width = options !== null && options !== void 0 && options.width ? String(options.width) : defaultWidth;
5017
- valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
4950
+ switch (token) {
4951
+ case "b":
4952
+ case "bb":
4953
+ return localize2.dayPeriod(dayPeriodEnumValue, {
4954
+ width: "abbreviated",
4955
+ context: "formatting"
4956
+ });
4957
+ case "bbb":
4958
+ return localize2.dayPeriod(dayPeriodEnumValue, {
4959
+ width: "abbreviated",
4960
+ context: "formatting"
4961
+ }).toLowerCase();
4962
+ case "bbbbb":
4963
+ return localize2.dayPeriod(dayPeriodEnumValue, {
4964
+ width: "narrow",
4965
+ context: "formatting"
4966
+ });
4967
+ case "bbbb":
4968
+ default:
4969
+ return localize2.dayPeriod(dayPeriodEnumValue, {
4970
+ width: "wide",
4971
+ context: "formatting"
4972
+ });
4973
+ }
4974
+ },
4975
+ B: function(date, token, localize2) {
4976
+ var hours = date.getUTCHours();
4977
+ var dayPeriodEnumValue;
4978
+ if (hours >= 17) {
4979
+ dayPeriodEnumValue = dayPeriodEnum.evening;
4980
+ } else if (hours >= 12) {
4981
+ dayPeriodEnumValue = dayPeriodEnum.afternoon;
4982
+ } else if (hours >= 4) {
4983
+ dayPeriodEnumValue = dayPeriodEnum.morning;
5018
4984
  } else {
5019
- var _defaultWidth = args.defaultWidth;
5020
- var _width = options !== null && options !== void 0 && options.width ? String(options.width) : args.defaultWidth;
5021
- valuesArray = args.values[_width] || args.values[_defaultWidth];
4985
+ dayPeriodEnumValue = dayPeriodEnum.night;
4986
+ }
4987
+ switch (token) {
4988
+ case "B":
4989
+ case "BB":
4990
+ case "BBB":
4991
+ return localize2.dayPeriod(dayPeriodEnumValue, {
4992
+ width: "abbreviated",
4993
+ context: "formatting"
4994
+ });
4995
+ case "BBBBB":
4996
+ return localize2.dayPeriod(dayPeriodEnumValue, {
4997
+ width: "narrow",
4998
+ context: "formatting"
4999
+ });
5000
+ case "BBBB":
5001
+ default:
5002
+ return localize2.dayPeriod(dayPeriodEnumValue, {
5003
+ width: "wide",
5004
+ context: "formatting"
5005
+ });
5006
+ }
5007
+ },
5008
+ h: function(date, token, localize2) {
5009
+ if (token === "ho") {
5010
+ var hours = date.getUTCHours() % 12;
5011
+ if (hours === 0)
5012
+ hours = 12;
5013
+ return localize2.ordinalNumber(hours, {
5014
+ unit: "hour"
5015
+ });
5022
5016
  }
5023
- var index = args.argumentCallback ? args.argumentCallback(dirtyIndex) : dirtyIndex;
5024
- return valuesArray[index];
5025
- };
5026
- }
5027
- __name(buildLocalizeFn, "buildLocalizeFn");
5028
-
5029
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/locale/en-US/_lib/localize/index.js
5030
- var eraValues = {
5031
- narrow: ["B", "A"],
5032
- abbreviated: ["BC", "AD"],
5033
- wide: ["Before Christ", "Anno Domini"]
5034
- };
5035
- var quarterValues = {
5036
- narrow: ["1", "2", "3", "4"],
5037
- abbreviated: ["Q1", "Q2", "Q3", "Q4"],
5038
- wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
5039
- };
5040
- var monthValues = {
5041
- narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
5042
- abbreviated: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
5043
- wide: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]
5044
- };
5045
- var dayValues = {
5046
- narrow: ["S", "M", "T", "W", "T", "F", "S"],
5047
- short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
5048
- abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
5049
- wide: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
5050
- };
5051
- var dayPeriodValues = {
5052
- narrow: {
5053
- am: "a",
5054
- pm: "p",
5055
- midnight: "mi",
5056
- noon: "n",
5057
- morning: "morning",
5058
- afternoon: "afternoon",
5059
- evening: "evening",
5060
- night: "night"
5017
+ return lightFormatters_default.h(date, token);
5061
5018
  },
5062
- abbreviated: {
5063
- am: "AM",
5064
- pm: "PM",
5065
- midnight: "midnight",
5066
- noon: "noon",
5067
- morning: "morning",
5068
- afternoon: "afternoon",
5069
- evening: "evening",
5070
- night: "night"
5019
+ H: function(date, token, localize2) {
5020
+ if (token === "Ho") {
5021
+ return localize2.ordinalNumber(date.getUTCHours(), {
5022
+ unit: "hour"
5023
+ });
5024
+ }
5025
+ return lightFormatters_default.H(date, token);
5071
5026
  },
5072
- wide: {
5073
- am: "a.m.",
5074
- pm: "p.m.",
5075
- midnight: "midnight",
5076
- noon: "noon",
5077
- morning: "morning",
5078
- afternoon: "afternoon",
5079
- evening: "evening",
5080
- night: "night"
5081
- }
5082
- };
5083
- var formattingDayPeriodValues = {
5084
- narrow: {
5085
- am: "a",
5086
- pm: "p",
5087
- midnight: "mi",
5088
- noon: "n",
5089
- morning: "in the morning",
5090
- afternoon: "in the afternoon",
5091
- evening: "in the evening",
5092
- night: "at night"
5027
+ K: function(date, token, localize2) {
5028
+ var hours = date.getUTCHours() % 12;
5029
+ if (token === "Ko") {
5030
+ return localize2.ordinalNumber(hours, {
5031
+ unit: "hour"
5032
+ });
5033
+ }
5034
+ return addLeadingZeros(hours, token.length);
5093
5035
  },
5094
- abbreviated: {
5095
- am: "AM",
5096
- pm: "PM",
5097
- midnight: "midnight",
5098
- noon: "noon",
5099
- morning: "in the morning",
5100
- afternoon: "in the afternoon",
5101
- evening: "in the evening",
5102
- night: "at night"
5036
+ k: function(date, token, localize2) {
5037
+ var hours = date.getUTCHours();
5038
+ if (hours === 0)
5039
+ hours = 24;
5040
+ if (token === "ko") {
5041
+ return localize2.ordinalNumber(hours, {
5042
+ unit: "hour"
5043
+ });
5044
+ }
5045
+ return addLeadingZeros(hours, token.length);
5103
5046
  },
5104
- wide: {
5105
- am: "a.m.",
5106
- pm: "p.m.",
5107
- midnight: "midnight",
5108
- noon: "noon",
5109
- morning: "in the morning",
5110
- afternoon: "in the afternoon",
5111
- evening: "in the evening",
5112
- night: "at night"
5113
- }
5114
- };
5115
- var ordinalNumber = /* @__PURE__ */ __name(function ordinalNumber2(dirtyNumber, _options) {
5116
- var number = Number(dirtyNumber);
5117
- var rem100 = number % 100;
5118
- if (rem100 > 20 || rem100 < 10) {
5119
- switch (rem100 % 10) {
5120
- case 1:
5121
- return number + "st";
5122
- case 2:
5123
- return number + "nd";
5124
- case 3:
5125
- return number + "rd";
5047
+ m: function(date, token, localize2) {
5048
+ if (token === "mo") {
5049
+ return localize2.ordinalNumber(date.getUTCMinutes(), {
5050
+ unit: "minute"
5051
+ });
5126
5052
  }
5127
- }
5128
- return number + "th";
5129
- }, "ordinalNumber");
5130
- var localize = {
5131
- ordinalNumber,
5132
- era: buildLocalizeFn({
5133
- values: eraValues,
5134
- defaultWidth: "wide"
5135
- }),
5136
- quarter: buildLocalizeFn({
5137
- values: quarterValues,
5138
- defaultWidth: "wide",
5139
- argumentCallback: /* @__PURE__ */ __name(function argumentCallback(quarter) {
5140
- return quarter - 1;
5141
- }, "argumentCallback")
5142
- }),
5143
- month: buildLocalizeFn({
5144
- values: monthValues,
5145
- defaultWidth: "wide"
5146
- }),
5147
- day: buildLocalizeFn({
5148
- values: dayValues,
5149
- defaultWidth: "wide"
5150
- }),
5151
- dayPeriod: buildLocalizeFn({
5152
- values: dayPeriodValues,
5153
- defaultWidth: "wide",
5154
- formattingValues: formattingDayPeriodValues,
5155
- defaultFormattingWidth: "wide"
5156
- })
5157
- };
5158
- var localize_default = localize;
5159
-
5160
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/locale/_lib/buildMatchFn/index.js
5161
- function buildMatchFn(args) {
5162
- return function(string) {
5163
- var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
5164
- var width = options.width;
5165
- var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
5166
- var matchResult = string.match(matchPattern);
5167
- if (!matchResult) {
5168
- return null;
5053
+ return lightFormatters_default.m(date, token);
5054
+ },
5055
+ s: function(date, token, localize2) {
5056
+ if (token === "so") {
5057
+ return localize2.ordinalNumber(date.getUTCSeconds(), {
5058
+ unit: "second"
5059
+ });
5169
5060
  }
5170
- var matchedString = matchResult[0];
5171
- var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
5172
- var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function(pattern) {
5173
- return pattern.test(matchedString);
5174
- }) : findKey(parsePatterns, function(pattern) {
5175
- return pattern.test(matchedString);
5176
- });
5177
- var value;
5178
- value = args.valueCallback ? args.valueCallback(key) : key;
5179
- value = options.valueCallback ? options.valueCallback(value) : value;
5180
- var rest = string.slice(matchedString.length);
5181
- return {
5182
- value,
5183
- rest
5184
- };
5185
- };
5186
- }
5187
- __name(buildMatchFn, "buildMatchFn");
5188
- function findKey(object, predicate) {
5189
- for (var key in object) {
5190
- if (object.hasOwnProperty(key) && predicate(object[key])) {
5191
- return key;
5061
+ return lightFormatters_default.s(date, token);
5062
+ },
5063
+ S: function(date, token) {
5064
+ return lightFormatters_default.S(date, token);
5065
+ },
5066
+ X: function(date, token, _localize, options) {
5067
+ var originalDate = options._originalDate || date;
5068
+ var timezoneOffset = originalDate.getTimezoneOffset();
5069
+ if (timezoneOffset === 0) {
5070
+ return "Z";
5071
+ }
5072
+ switch (token) {
5073
+ case "X":
5074
+ return formatTimezoneWithOptionalMinutes(timezoneOffset);
5075
+ case "XXXX":
5076
+ case "XX":
5077
+ return formatTimezone(timezoneOffset);
5078
+ case "XXXXX":
5079
+ case "XXX":
5080
+ default:
5081
+ return formatTimezone(timezoneOffset, ":");
5082
+ }
5083
+ },
5084
+ x: function(date, token, _localize, options) {
5085
+ var originalDate = options._originalDate || date;
5086
+ var timezoneOffset = originalDate.getTimezoneOffset();
5087
+ switch (token) {
5088
+ case "x":
5089
+ return formatTimezoneWithOptionalMinutes(timezoneOffset);
5090
+ case "xxxx":
5091
+ case "xx":
5092
+ return formatTimezone(timezoneOffset);
5093
+ case "xxxxx":
5094
+ case "xxx":
5095
+ default:
5096
+ return formatTimezone(timezoneOffset, ":");
5097
+ }
5098
+ },
5099
+ O: function(date, token, _localize, options) {
5100
+ var originalDate = options._originalDate || date;
5101
+ var timezoneOffset = originalDate.getTimezoneOffset();
5102
+ switch (token) {
5103
+ case "O":
5104
+ case "OO":
5105
+ case "OOO":
5106
+ return "GMT" + formatTimezoneShort(timezoneOffset, ":");
5107
+ case "OOOO":
5108
+ default:
5109
+ return "GMT" + formatTimezone(timezoneOffset, ":");
5192
5110
  }
5111
+ },
5112
+ z: function(date, token, _localize, options) {
5113
+ var originalDate = options._originalDate || date;
5114
+ var timezoneOffset = originalDate.getTimezoneOffset();
5115
+ switch (token) {
5116
+ case "z":
5117
+ case "zz":
5118
+ case "zzz":
5119
+ return "GMT" + formatTimezoneShort(timezoneOffset, ":");
5120
+ case "zzzz":
5121
+ default:
5122
+ return "GMT" + formatTimezone(timezoneOffset, ":");
5123
+ }
5124
+ },
5125
+ t: function(date, token, _localize, options) {
5126
+ var originalDate = options._originalDate || date;
5127
+ var timestamp = Math.floor(originalDate.getTime() / 1e3);
5128
+ return addLeadingZeros(timestamp, token.length);
5129
+ },
5130
+ T: function(date, token, _localize, options) {
5131
+ var originalDate = options._originalDate || date;
5132
+ var timestamp = originalDate.getTime();
5133
+ return addLeadingZeros(timestamp, token.length);
5193
5134
  }
5194
- return void 0;
5135
+ };
5136
+ function formatTimezoneShort(offset, dirtyDelimiter) {
5137
+ var sign = offset > 0 ? "-" : "+";
5138
+ var absOffset = Math.abs(offset);
5139
+ var hours = Math.floor(absOffset / 60);
5140
+ var minutes = absOffset % 60;
5141
+ if (minutes === 0) {
5142
+ return sign + String(hours);
5143
+ }
5144
+ var delimiter = dirtyDelimiter || "";
5145
+ return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);
5195
5146
  }
5196
- __name(findKey, "findKey");
5197
- function findIndex(array, predicate) {
5198
- for (var key = 0; key < array.length; key++) {
5199
- if (predicate(array[key])) {
5200
- return key;
5201
- }
5147
+ __name(formatTimezoneShort, "formatTimezoneShort");
5148
+ function formatTimezoneWithOptionalMinutes(offset, dirtyDelimiter) {
5149
+ if (offset % 60 === 0) {
5150
+ var sign = offset > 0 ? "-" : "+";
5151
+ return sign + addLeadingZeros(Math.abs(offset) / 60, 2);
5202
5152
  }
5203
- return void 0;
5153
+ return formatTimezone(offset, dirtyDelimiter);
5204
5154
  }
5205
- __name(findIndex, "findIndex");
5206
-
5207
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/locale/_lib/buildMatchPatternFn/index.js
5208
- function buildMatchPatternFn(args) {
5209
- return function(string) {
5210
- var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
5211
- var matchResult = string.match(args.matchPattern);
5212
- if (!matchResult)
5213
- return null;
5214
- var matchedString = matchResult[0];
5215
- var parseResult = string.match(args.parsePattern);
5216
- if (!parseResult)
5217
- return null;
5218
- var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
5219
- value = options.valueCallback ? options.valueCallback(value) : value;
5220
- var rest = string.slice(matchedString.length);
5221
- return {
5222
- value,
5223
- rest
5224
- };
5225
- };
5155
+ __name(formatTimezoneWithOptionalMinutes, "formatTimezoneWithOptionalMinutes");
5156
+ function formatTimezone(offset, dirtyDelimiter) {
5157
+ var delimiter = dirtyDelimiter || "";
5158
+ var sign = offset > 0 ? "-" : "+";
5159
+ var absOffset = Math.abs(offset);
5160
+ var hours = addLeadingZeros(Math.floor(absOffset / 60), 2);
5161
+ var minutes = addLeadingZeros(absOffset % 60, 2);
5162
+ return sign + hours + delimiter + minutes;
5226
5163
  }
5227
- __name(buildMatchPatternFn, "buildMatchPatternFn");
5164
+ __name(formatTimezone, "formatTimezone");
5165
+ var formatters_default = formatters2;
5228
5166
 
5229
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/locale/en-US/_lib/match/index.js
5230
- var matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
5231
- var parseOrdinalNumberPattern = /\d+/i;
5232
- var matchEraPatterns = {
5233
- narrow: /^(b|a)/i,
5234
- abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
5235
- wide: /^(before christ|before common era|anno domini|common era)/i
5236
- };
5237
- var parseEraPatterns = {
5238
- any: [/^b/i, /^(a|c)/i]
5239
- };
5240
- var matchQuarterPatterns = {
5241
- narrow: /^[1234]/i,
5242
- abbreviated: /^q[1234]/i,
5243
- wide: /^[1234](th|st|nd|rd)? quarter/i
5244
- };
5245
- var parseQuarterPatterns = {
5246
- any: [/1/i, /2/i, /3/i, /4/i]
5247
- };
5248
- var matchMonthPatterns = {
5249
- narrow: /^[jfmasond]/i,
5250
- abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
5251
- wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
5252
- };
5253
- var parseMonthPatterns = {
5254
- 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],
5255
- 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]
5256
- };
5257
- var matchDayPatterns = {
5258
- narrow: /^[smtwf]/i,
5259
- short: /^(su|mo|tu|we|th|fr|sa)/i,
5260
- abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
5261
- wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
5262
- };
5263
- var parseDayPatterns = {
5264
- narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
5265
- any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
5266
- };
5267
- var matchDayPeriodPatterns = {
5268
- narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
5269
- any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
5270
- };
5271
- var parseDayPeriodPatterns = {
5272
- any: {
5273
- am: /^a/i,
5274
- pm: /^p/i,
5275
- midnight: /^mi/i,
5276
- noon: /^no/i,
5277
- morning: /morning/i,
5278
- afternoon: /afternoon/i,
5279
- evening: /evening/i,
5280
- night: /night/i
5167
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/format/longFormatters/index.js
5168
+ function dateLongFormatter(pattern, formatLong2) {
5169
+ switch (pattern) {
5170
+ case "P":
5171
+ return formatLong2.date({
5172
+ width: "short"
5173
+ });
5174
+ case "PP":
5175
+ return formatLong2.date({
5176
+ width: "medium"
5177
+ });
5178
+ case "PPP":
5179
+ return formatLong2.date({
5180
+ width: "long"
5181
+ });
5182
+ case "PPPP":
5183
+ default:
5184
+ return formatLong2.date({
5185
+ width: "full"
5186
+ });
5281
5187
  }
5282
- };
5283
- var match = {
5284
- ordinalNumber: buildMatchPatternFn({
5285
- matchPattern: matchOrdinalNumberPattern,
5286
- parsePattern: parseOrdinalNumberPattern,
5287
- valueCallback: /* @__PURE__ */ __name(function valueCallback(value) {
5288
- return parseInt(value, 10);
5289
- }, "valueCallback")
5290
- }),
5291
- era: buildMatchFn({
5292
- matchPatterns: matchEraPatterns,
5293
- defaultMatchWidth: "wide",
5294
- parsePatterns: parseEraPatterns,
5295
- defaultParseWidth: "any"
5296
- }),
5297
- quarter: buildMatchFn({
5298
- matchPatterns: matchQuarterPatterns,
5299
- defaultMatchWidth: "wide",
5300
- parsePatterns: parseQuarterPatterns,
5301
- defaultParseWidth: "any",
5302
- valueCallback: /* @__PURE__ */ __name(function valueCallback2(index) {
5303
- return index + 1;
5304
- }, "valueCallback")
5305
- }),
5306
- month: buildMatchFn({
5307
- matchPatterns: matchMonthPatterns,
5308
- defaultMatchWidth: "wide",
5309
- parsePatterns: parseMonthPatterns,
5310
- defaultParseWidth: "any"
5311
- }),
5312
- day: buildMatchFn({
5313
- matchPatterns: matchDayPatterns,
5314
- defaultMatchWidth: "wide",
5315
- parsePatterns: parseDayPatterns,
5316
- defaultParseWidth: "any"
5317
- }),
5318
- dayPeriod: buildMatchFn({
5319
- matchPatterns: matchDayPeriodPatterns,
5320
- defaultMatchWidth: "any",
5321
- parsePatterns: parseDayPeriodPatterns,
5322
- defaultParseWidth: "any"
5323
- })
5324
- };
5325
- var match_default = match;
5326
-
5327
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/locale/en-US/index.js
5328
- var locale = {
5329
- code: "en-US",
5330
- formatDistance: formatDistance_default,
5331
- formatLong: formatLong_default,
5332
- formatRelative: formatRelative_default,
5333
- localize: localize_default,
5334
- match: match_default,
5335
- options: {
5336
- weekStartsOn: 0,
5337
- firstWeekContainsDate: 1
5188
+ }
5189
+ __name(dateLongFormatter, "dateLongFormatter");
5190
+ function timeLongFormatter(pattern, formatLong2) {
5191
+ switch (pattern) {
5192
+ case "p":
5193
+ return formatLong2.time({
5194
+ width: "short"
5195
+ });
5196
+ case "pp":
5197
+ return formatLong2.time({
5198
+ width: "medium"
5199
+ });
5200
+ case "ppp":
5201
+ return formatLong2.time({
5202
+ width: "long"
5203
+ });
5204
+ case "pppp":
5205
+ default:
5206
+ return formatLong2.time({
5207
+ width: "full"
5208
+ });
5209
+ }
5210
+ }
5211
+ __name(timeLongFormatter, "timeLongFormatter");
5212
+ function dateTimeLongFormatter(pattern, formatLong2) {
5213
+ var matchResult = pattern.match(/(P+)(p+)?/) || [];
5214
+ var datePattern = matchResult[1];
5215
+ var timePattern = matchResult[2];
5216
+ if (!timePattern) {
5217
+ return dateLongFormatter(pattern, formatLong2);
5218
+ }
5219
+ var dateTimeFormat;
5220
+ switch (datePattern) {
5221
+ case "P":
5222
+ dateTimeFormat = formatLong2.dateTime({
5223
+ width: "short"
5224
+ });
5225
+ break;
5226
+ case "PP":
5227
+ dateTimeFormat = formatLong2.dateTime({
5228
+ width: "medium"
5229
+ });
5230
+ break;
5231
+ case "PPP":
5232
+ dateTimeFormat = formatLong2.dateTime({
5233
+ width: "long"
5234
+ });
5235
+ break;
5236
+ case "PPPP":
5237
+ default:
5238
+ dateTimeFormat = formatLong2.dateTime({
5239
+ width: "full"
5240
+ });
5241
+ break;
5338
5242
  }
5243
+ return dateTimeFormat.replace("{{date}}", dateLongFormatter(datePattern, formatLong2)).replace("{{time}}", timeLongFormatter(timePattern, formatLong2));
5244
+ }
5245
+ __name(dateTimeLongFormatter, "dateTimeLongFormatter");
5246
+ var longFormatters = {
5247
+ p: timeLongFormatter,
5248
+ P: dateTimeLongFormatter
5339
5249
  };
5340
- var en_US_default = locale;
5250
+ var longFormatters_default = longFormatters;
5341
5251
 
5342
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/_lib/defaultLocale/index.js
5343
- var defaultLocale_default = en_US_default;
5252
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/protectedTokens/index.js
5253
+ var protectedDayOfYearTokens = ["D", "DD"];
5254
+ var protectedWeekYearTokens = ["YY", "YYYY"];
5255
+ function isProtectedDayOfYearToken(token) {
5256
+ return protectedDayOfYearTokens.indexOf(token) !== -1;
5257
+ }
5258
+ __name(isProtectedDayOfYearToken, "isProtectedDayOfYearToken");
5259
+ function isProtectedWeekYearToken(token) {
5260
+ return protectedWeekYearTokens.indexOf(token) !== -1;
5261
+ }
5262
+ __name(isProtectedWeekYearToken, "isProtectedWeekYearToken");
5263
+ function throwProtectedError(token, format2, input) {
5264
+ if (token === "YYYY") {
5265
+ throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(format2, "`) for formatting years to the input `").concat(input, "`; see: https://git.io/fxCyr"));
5266
+ } else if (token === "YY") {
5267
+ throw new RangeError("Use `yy` instead of `YY` (in `".concat(format2, "`) for formatting years to the input `").concat(input, "`; see: https://git.io/fxCyr"));
5268
+ } else if (token === "D") {
5269
+ throw new RangeError("Use `d` instead of `D` (in `".concat(format2, "`) for formatting days of the month to the input `").concat(input, "`; see: https://git.io/fxCyr"));
5270
+ } else if (token === "DD") {
5271
+ throw new RangeError("Use `dd` instead of `DD` (in `".concat(format2, "`) for formatting days of the month to the input `").concat(input, "`; see: https://git.io/fxCyr"));
5272
+ }
5273
+ }
5274
+ __name(throwProtectedError, "throwProtectedError");
5344
5275
 
5345
- // ../../../node_modules/.pnpm/date-fns@2.29.3/node_modules/date-fns/esm/format/index.js
5276
+ // ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/format/index.js
5346
5277
  var formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g;
5347
5278
  var longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;
5348
5279
  var escapedStringRegExp = /^'([^]*?)'?$/;
5349
5280
  var doubleQuoteRegExp = /''/g;
5350
5281
  var unescapedLatinCharacterRegExp = /[a-zA-Z]/;
5351
- function format(dirtyDate, dirtyFormatStr, options) {
5352
- var _ref, _options$locale, _ref2, _ref3, _ref4, _options$firstWeekCon, _options$locale2, _options$locale2$opti, _defaultOptions$local, _defaultOptions$local2, _ref5, _ref6, _ref7, _options$weekStartsOn, _options$locale3, _options$locale3$opti, _defaultOptions$local3, _defaultOptions$local4;
5282
+ function format(dirtyDate, dirtyFormatStr, dirtyOptions) {
5353
5283
  requiredArgs(2, arguments);
5354
5284
  var formatStr = String(dirtyFormatStr);
5355
- var defaultOptions2 = getDefaultOptions();
5356
- var locale2 = (_ref = (_options$locale = options === null || options === void 0 ? void 0 : options.locale) !== null && _options$locale !== void 0 ? _options$locale : defaultOptions2.locale) !== null && _ref !== void 0 ? _ref : defaultLocale_default;
5357
- var firstWeekContainsDate = toInteger((_ref2 = (_ref3 = (_ref4 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale2 = options.locale) === null || _options$locale2 === void 0 ? void 0 : (_options$locale2$opti = _options$locale2.options) === null || _options$locale2$opti === void 0 ? void 0 : _options$locale2$opti.firstWeekContainsDate) !== null && _ref4 !== void 0 ? _ref4 : defaultOptions2.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : (_defaultOptions$local = defaultOptions2.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : 1);
5285
+ var options = dirtyOptions || {};
5286
+ var locale2 = options.locale || en_US_default;
5287
+ var localeFirstWeekContainsDate = locale2.options && locale2.options.firstWeekContainsDate;
5288
+ var defaultFirstWeekContainsDate = localeFirstWeekContainsDate == null ? 1 : toInteger(localeFirstWeekContainsDate);
5289
+ var firstWeekContainsDate = options.firstWeekContainsDate == null ? defaultFirstWeekContainsDate : toInteger(options.firstWeekContainsDate);
5358
5290
  if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {
5359
5291
  throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");
5360
5292
  }
5361
- var weekStartsOn = toInteger((_ref5 = (_ref6 = (_ref7 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale3 = options.locale) === null || _options$locale3 === void 0 ? void 0 : (_options$locale3$opti = _options$locale3.options) === null || _options$locale3$opti === void 0 ? void 0 : _options$locale3$opti.weekStartsOn) !== null && _ref7 !== void 0 ? _ref7 : defaultOptions2.weekStartsOn) !== null && _ref6 !== void 0 ? _ref6 : (_defaultOptions$local3 = defaultOptions2.locale) === null || _defaultOptions$local3 === void 0 ? void 0 : (_defaultOptions$local4 = _defaultOptions$local3.options) === null || _defaultOptions$local4 === void 0 ? void 0 : _defaultOptions$local4.weekStartsOn) !== null && _ref5 !== void 0 ? _ref5 : 0);
5293
+ var localeWeekStartsOn = locale2.options && locale2.options.weekStartsOn;
5294
+ var defaultWeekStartsOn = localeWeekStartsOn == null ? 0 : toInteger(localeWeekStartsOn);
5295
+ var weekStartsOn = options.weekStartsOn == null ? defaultWeekStartsOn : toInteger(options.weekStartsOn);
5362
5296
  if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {
5363
5297
  throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
5364
5298
  }
@@ -5384,7 +5318,7 @@ function format(dirtyDate, dirtyFormatStr, options) {
5384
5318
  var firstCharacter = substring[0];
5385
5319
  if (firstCharacter === "p" || firstCharacter === "P") {
5386
5320
  var longFormatter = longFormatters_default[firstCharacter];
5387
- return longFormatter(substring, locale2.formatLong);
5321
+ return longFormatter(substring, locale2.formatLong, formatterOptions);
5388
5322
  }
5389
5323
  return substring;
5390
5324
  }).join("").match(formattingTokensRegExp).map(function(substring) {
@@ -5397,11 +5331,11 @@ function format(dirtyDate, dirtyFormatStr, options) {
5397
5331
  }
5398
5332
  var formatter = formatters_default[firstCharacter];
5399
5333
  if (formatter) {
5400
- if (!(options !== null && options !== void 0 && options.useAdditionalWeekYearTokens) && isProtectedWeekYearToken(substring)) {
5401
- throwProtectedError(substring, dirtyFormatStr, String(dirtyDate));
5334
+ if (!options.useAdditionalWeekYearTokens && isProtectedWeekYearToken(substring)) {
5335
+ throwProtectedError(substring, dirtyFormatStr, dirtyDate);
5402
5336
  }
5403
- if (!(options !== null && options !== void 0 && options.useAdditionalDayOfYearTokens) && isProtectedDayOfYearToken(substring)) {
5404
- throwProtectedError(substring, dirtyFormatStr, String(dirtyDate));
5337
+ if (!options.useAdditionalDayOfYearTokens && isProtectedDayOfYearToken(substring)) {
5338
+ throwProtectedError(substring, dirtyFormatStr, dirtyDate);
5405
5339
  }
5406
5340
  return formatter(utcDate, substring, locale2.localize, formatterOptions);
5407
5341
  }
@@ -5414,11 +5348,7 @@ function format(dirtyDate, dirtyFormatStr, options) {
5414
5348
  }
5415
5349
  __name(format, "format");
5416
5350
  function cleanEscapedString(input) {
5417
- var matched = input.match(escapedStringRegExp);
5418
- if (!matched) {
5419
- return input;
5420
- }
5421
- return matched[1].replace(doubleQuoteRegExp, "'");
5351
+ return input.match(escapedStringRegExp)[1].replace(doubleQuoteRegExp, "'");
5422
5352
  }
5423
5353
  __name(cleanEscapedString, "cleanEscapedString");
5424
5354
 
@@ -5429,20 +5359,14 @@ var transformErrorCheck = /* @__PURE__ */ __name((error, _credential) => {
5429
5359
  }, "transformErrorCheck");
5430
5360
  var transformErrorMessage = /* @__PURE__ */ __name((error, credential) => {
5431
5361
  if (error.startsWith("expiration")) {
5432
- return credential.expirationDate ? `Invalid \u2022 Expired ${format(
5433
- new Date(credential.expirationDate),
5434
- "dd MMM yyyy"
5435
- ).toUpperCase()}` : "Invalid \u2022 Expired";
5362
+ return credential.expirationDate ? `Invalid \u2022 Expired ${format(new Date(credential.expirationDate), "dd MMM yyyy").toUpperCase()}` : "Invalid \u2022 Expired";
5436
5363
  }
5437
5364
  return error;
5438
5365
  }, "transformErrorMessage");
5439
5366
  var transformCheckMessage = /* @__PURE__ */ __name((check, credential) => {
5440
5367
  return {
5441
5368
  proof: "Valid",
5442
- expiration: credential.expirationDate ? `Valid \u2022 Expires ${format(
5443
- new Date(credential.expirationDate),
5444
- "dd MMM yyyy"
5445
- ).toUpperCase()}` : "Valid \u2022 Does Not Expire"
5369
+ expiration: credential.expirationDate ? `Valid \u2022 Expires ${format(new Date(credential.expirationDate), "dd MMM yyyy").toUpperCase()}` : "Valid \u2022 Does Not Expire"
5446
5370
  }[check] || check;
5447
5371
  }, "transformCheckMessage");
5448
5372
  var verifyCredential = /* @__PURE__ */ __name((learnCard) => {