@alfadocs/ui-kit 0.25.2 → 0.30.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/dist/_chunks/booking-Bw9eOU4k.js +2292 -0
  2. package/dist/_chunks/{calendar-9eOXumpH.js → calendar-WWNx448i.js} +10 -9
  3. package/dist/_chunks/{contact-card-CeEfEAxh.js → contact-card-DYbp--s-.js} +2 -2
  4. package/dist/_chunks/{header-B8V_sNPy.js → header-CkMb1TZS.js} +23 -23
  5. package/dist/_chunks/heart-pulse-CvuyFKHB.js +21 -0
  6. package/dist/_chunks/{link-DmM5IevO.js → link-DrD_cRUg.js} +50 -45
  7. package/dist/_chunks/parseISO-Dk4xa7q6.js +120 -0
  8. package/dist/_chunks/patient-search-DuSoGG2t.js +1113 -0
  9. package/dist/_chunks/{patient-shell-Bq8CjRYF.js → patient-shell-CAXYzbRw.js} +2 -2
  10. package/dist/_chunks/public-footer.agent-DivkKdG4.js +537 -0
  11. package/dist/_chunks/reviews-panel-CFttsfuC.js +513 -0
  12. package/dist/_chunks/slot-grid-B2zprPcv.js +387 -0
  13. package/dist/_chunks/stethoscope-DT5qCW8Y.js +18 -0
  14. package/dist/agent-catalog.json +117 -22
  15. package/dist/components/booking/booking-types.d.ts +167 -0
  16. package/dist/components/booking/booking.agent.d.ts +1 -1
  17. package/dist/components/booking/booking.d.ts +4 -89
  18. package/dist/components/booking/cascade.d.ts +96 -0
  19. package/dist/components/booking/details-form.d.ts +39 -0
  20. package/dist/components/booking/index.d.ts +2 -1
  21. package/dist/components/booking/index.js +5 -3
  22. package/dist/components/calendar/index.js +1 -1
  23. package/dist/components/checkbox/checkbox.d.ts +6 -2
  24. package/dist/components/contact-card/index.js +1 -1
  25. package/dist/components/header/index.js +1 -1
  26. package/dist/components/index.d.ts +3 -0
  27. package/dist/components/link/index.js +1 -1
  28. package/dist/components/link/link.d.ts +7 -0
  29. package/dist/components/patient-search/index.d.ts +4 -0
  30. package/dist/components/patient-search/index.js +6 -0
  31. package/dist/components/patient-search/patient-search.agent.d.ts +4 -0
  32. package/dist/components/patient-search/patient-search.d.ts +112 -0
  33. package/dist/components/public-footer/index.d.ts +6 -0
  34. package/dist/components/public-footer/index.js +10 -0
  35. package/dist/components/public-footer/legal-urls.d.ts +18 -0
  36. package/dist/components/public-footer/public-footer.agent.d.ts +4 -0
  37. package/dist/components/public-footer/public-footer.d.ts +58 -0
  38. package/dist/components/public-footer/socials.d.ts +9 -0
  39. package/dist/components/reviews-panel/index.d.ts +4 -0
  40. package/dist/components/reviews-panel/index.js +6 -0
  41. package/dist/components/reviews-panel/reviews-panel.agent.d.ts +4 -0
  42. package/dist/components/reviews-panel/reviews-panel.d.ts +76 -0
  43. package/dist/components/slot-grid/index.js +1 -1
  44. package/dist/i18n/config.js +3994 -38
  45. package/dist/i18n/locales/ar.d.ts +221 -0
  46. package/dist/i18n/locales/de.d.ts +221 -0
  47. package/dist/i18n/locales/el.d.ts +221 -0
  48. package/dist/i18n/locales/es.d.ts +221 -0
  49. package/dist/i18n/locales/fr.d.ts +221 -0
  50. package/dist/i18n/locales/hi.d.ts +221 -0
  51. package/dist/i18n/locales/ja.d.ts +221 -0
  52. package/dist/i18n/locales/nl.d.ts +221 -0
  53. package/dist/i18n/locales/pl.d.ts +221 -0
  54. package/dist/i18n/locales/pt.d.ts +221 -0
  55. package/dist/i18n/locales/ro.d.ts +221 -0
  56. package/dist/i18n/locales/ru.d.ts +221 -0
  57. package/dist/i18n/locales/sq.d.ts +221 -0
  58. package/dist/i18n/locales/sv.d.ts +221 -0
  59. package/dist/i18n/locales/tr.d.ts +221 -0
  60. package/dist/i18n/locales/zh.d.ts +221 -0
  61. package/dist/i18n/resources.d.ts +442 -0
  62. package/dist/index.js +351 -336
  63. package/dist/locales/ar.json +222 -1
  64. package/dist/locales/de.json +222 -1
  65. package/dist/locales/el.json +222 -1
  66. package/dist/locales/en.json +222 -1
  67. package/dist/locales/es.json +222 -1
  68. package/dist/locales/fr.json +222 -1
  69. package/dist/locales/hi.json +222 -1
  70. package/dist/locales/it.json +222 -1
  71. package/dist/locales/ja.json +222 -1
  72. package/dist/locales/nl.json +222 -1
  73. package/dist/locales/pl.json +222 -1
  74. package/dist/locales/pt.json +222 -1
  75. package/dist/locales/ro.json +222 -1
  76. package/dist/locales/ru.json +222 -1
  77. package/dist/locales/sq.json +222 -1
  78. package/dist/locales/sv.json +222 -1
  79. package/dist/locales/tr.json +222 -1
  80. package/dist/locales/zh.json +222 -1
  81. package/dist/patterns/patient-shell/index.js +1 -1
  82. package/dist/tokens.css +1 -1
  83. package/package.json +17 -1
  84. package/dist/_chunks/booking-CXngC-1u.js +0 -1743
  85. package/dist/_chunks/slot-grid-DoodeQGZ.js +0 -502
  86. package/dist/_chunks/stethoscope-B8kpbtjh.js +0 -35
@@ -17,10 +17,11 @@ import { C as de } from "./chevron-right-BrpYejk0.js";
17
17
  import { C as ce } from "./chevron-left-CX1jqD2M.js";
18
18
  import { c as V } from "./createLucideIcon-CrFbzy84.js";
19
19
  import { C as dt } from "./check-DPdL_Sm7.js";
20
- import { S as ct, H as lt } from "./stethoscope-B8kpbtjh.js";
21
- import { C as ut } from "./clock-21AGPWJ5.js";
22
- import { G as mt } from "./globe-BkEFMNSg.js";
23
- import { T as ft } from "./triangle-alert-CBPUIzQo.js";
20
+ import { S as ct } from "./stethoscope-DT5qCW8Y.js";
21
+ import { C as lt } from "./clock-21AGPWJ5.js";
22
+ import { G as ut } from "./globe-BkEFMNSg.js";
23
+ import { T as mt } from "./triangle-alert-CBPUIzQo.js";
24
+ import { H as ft } from "./heart-pulse-CvuyFKHB.js";
24
25
  /**
25
26
  * @license lucide-react v1.8.0 - ISC
26
27
  *
@@ -265,7 +266,7 @@ const At = {
265
266
  }
266
267
  ), Pt = {
267
268
  confirmed: yt,
268
- waiting: ut,
269
+ waiting: lt,
269
270
  in_care: ct,
270
271
  done: dt,
271
272
  cancelled: pt,
@@ -357,9 +358,9 @@ function Et({
357
358
  children: [
358
359
  /* @__PURE__ */ C("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)] ds:self-end", children: [
359
360
  O ? /* @__PURE__ */ a(O, { size: 14, "aria-hidden": "true" }) : null,
360
- L ? /* @__PURE__ */ a(mt, { size: 12, "aria-hidden": "true" }) : null,
361
- U ? /* @__PURE__ */ a(ft, { size: 12, "aria-hidden": "true" }) : null,
362
- $ ? /* @__PURE__ */ a(lt, { size: 12, "aria-hidden": "true" }) : null,
361
+ L ? /* @__PURE__ */ a(ut, { size: 12, "aria-hidden": "true" }) : null,
362
+ U ? /* @__PURE__ */ a(mt, { size: 12, "aria-hidden": "true" }) : null,
363
+ $ ? /* @__PURE__ */ a(ft, { size: 12, "aria-hidden": "true" }) : null,
363
364
  K ? /* @__PURE__ */ a(ht, { size: 12, "aria-hidden": "true" }) : null,
364
365
  p ? /* @__PURE__ */ a(Tt, { size: 12, "aria-hidden": "true" }) : null
365
366
  ] }),
@@ -1004,4 +1005,4 @@ export {
1004
1005
  Ct as c,
1005
1006
  le as r
1006
1007
  };
1007
- //# sourceMappingURL=calendar-9eOXumpH.js.map
1008
+ //# sourceMappingURL=calendar-WWNx448i.js.map
@@ -2,7 +2,7 @@ import { jsxs as t, jsx as a } from "react/jsx-runtime";
2
2
  import { forwardRef as i, Fragment as b } from "react";
3
3
  import { useTranslation as k } from "react-i18next";
4
4
  import { C as o } from "./card-DKTMLVrw.js";
5
- import { L as p } from "./link-DmM5IevO.js";
5
+ import { L as p } from "./link-DrD_cRUg.js";
6
6
  import { M as v } from "./map-pin-B8STOPMJ.js";
7
7
  function L(s) {
8
8
  return `tel:${s.replace(/\(0\)/g, "").replace(/[^\d+]/g, "")}`;
@@ -118,4 +118,4 @@ const M = Object.assign(f, {
118
118
  export {
119
119
  M as C
120
120
  };
121
- //# sourceMappingURL=contact-card-CeEfEAxh.js.map
121
+ //# sourceMappingURL=contact-card-DYbp--s-.js.map
@@ -1,4 +1,4 @@
1
- import { jsxs as m, Fragment as _, jsx as s } from "react/jsx-runtime";
1
+ import { jsxs as v, Fragment as y, jsx as s } from "react/jsx-runtime";
2
2
  import { forwardRef as t, useRef as k, useState as N, useEffect as j } from "react";
3
3
  import { c as o } from "./index-D2ZczOXr.js";
4
4
  import { useTranslation as l } from "react-i18next";
@@ -63,18 +63,18 @@ const B = o(
63
63
  // the existing scroll-shadow + border. White --primary-foreground ink
64
64
  // on blue-500 clears AAA (~12.8:1).
65
65
  brand: [
66
- "ds:bg-[var(--primary)] ds:text-[color:var(--primary-foreground)]",
66
+ "ds:bg-[var(--primary)] ds:text-[color:var(--header-foreground)]",
67
67
  "ds:[.theme-dark_&]:bg-[var(--background)]",
68
- "ds:[&_[data-header-slot=start]]:[--foreground:var(--primary-foreground)]",
69
- "ds:[&_[data-header-slot=start]]:[--muted-foreground:var(--primary-foreground)]",
70
- "ds:[&_[data-header-slot=start]]:[--border:color-mix(in_srgb,var(--primary-foreground)_40%,transparent)]",
71
- "ds:[&_[data-header-slot=start]]:[--muted:color-mix(in_srgb,var(--primary-foreground)_16%,transparent)]",
72
- "ds:[&_[data-header-slot=start]]:[--ring:var(--primary-foreground)]",
73
- "ds:[&_[data-header-slot=end]]:[--foreground:var(--primary-foreground)]",
74
- "ds:[&_[data-header-slot=end]]:[--muted-foreground:var(--primary-foreground)]",
75
- "ds:[&_[data-header-slot=end]]:[--border:color-mix(in_srgb,var(--primary-foreground)_40%,transparent)]",
76
- "ds:[&_[data-header-slot=end]]:[--muted:color-mix(in_srgb,var(--primary-foreground)_16%,transparent)]",
77
- "ds:[&_[data-header-slot=end]]:[--ring:var(--primary-foreground)]"
68
+ "ds:[&_[data-header-slot=start]]:[--foreground:var(--header-foreground)]",
69
+ "ds:[&_[data-header-slot=start]]:[--muted-foreground:var(--header-foreground)]",
70
+ "ds:[&_[data-header-slot=start]]:[--border:color-mix(in_srgb,var(--header-foreground)_40%,transparent)]",
71
+ "ds:[&_[data-header-slot=start]]:[--muted:color-mix(in_srgb,var(--header-foreground)_16%,transparent)]",
72
+ "ds:[&_[data-header-slot=start]]:[--ring:var(--header-foreground)]",
73
+ "ds:[&_[data-header-slot=end]]:[--foreground:var(--header-foreground)]",
74
+ "ds:[&_[data-header-slot=end]]:[--muted-foreground:var(--header-foreground)]",
75
+ "ds:[&_[data-header-slot=end]]:[--border:color-mix(in_srgb,var(--header-foreground)_40%,transparent)]",
76
+ "ds:[&_[data-header-slot=end]]:[--muted:color-mix(in_srgb,var(--header-foreground)_16%,transparent)]",
77
+ "ds:[&_[data-header-slot=end]]:[--ring:var(--header-foreground)]"
78
78
  ].join(" "),
79
79
  // Light surface — plain page background with primary-coloured chrome.
80
80
  // Start + end slots rescope --foreground, --border, --ring to --primary
@@ -154,21 +154,21 @@ const B = o(
154
154
  scrollLinkedElevation: d = !0,
155
155
  "aria-label": n,
156
156
  ...i
157
- }, v) => {
158
- const { t: p } = l(), g = n ?? p("navigation.header.label", "Page header"), c = k(null), [b, h] = N(!1);
157
+ }, m) => {
158
+ const { t: g } = l(), h = n ?? g("navigation.header.label", "Page header"), c = k(null), [p, b] = N(!1);
159
159
  return j(() => {
160
160
  if (!d) return;
161
161
  const u = c.current;
162
162
  if (!u || typeof IntersectionObserver > "u") return;
163
163
  const f = new IntersectionObserver(
164
- (y) => {
165
- const x = y[0];
166
- h(!x.isIntersecting);
164
+ (x) => {
165
+ const _ = x[0];
166
+ b(!_.isIntersecting);
167
167
  },
168
168
  { threshold: 0 }
169
169
  );
170
170
  return f.observe(u), () => f.disconnect();
171
- }, [d]), /* @__PURE__ */ m(_, { children: [
171
+ }, [d]), /* @__PURE__ */ v(y, { children: [
172
172
  d ? /* @__PURE__ */ s(
173
173
  "div",
174
174
  {
@@ -180,11 +180,11 @@ const B = o(
180
180
  /* @__PURE__ */ s(
181
181
  "header",
182
182
  {
183
- ref: v,
183
+ ref: m,
184
184
  role: "banner",
185
- "aria-label": g,
185
+ "aria-label": h,
186
186
  "data-component": "header",
187
- "data-scrolled": b ? "true" : void 0,
187
+ "data-scrolled": p ? "true" : void 0,
188
188
  className: B({ variant: e, className: r }),
189
189
  ...i,
190
190
  children: /* @__PURE__ */ s("div", { className: C(), children: a })
@@ -225,7 +225,7 @@ const E = t(({ className: e, ...r }, a) => /* @__PURE__ */ s(
225
225
  ));
226
226
  E.displayName = "HeaderEnd";
227
227
  const F = t(
228
- ({ logo: e, children: r, href: a = "/", className: d, ...n }, i) => /* @__PURE__ */ m(
228
+ ({ logo: e, children: r, href: a = "/", className: d, ...n }, i) => /* @__PURE__ */ v(
229
229
  "a",
230
230
  {
231
231
  ref: i,
@@ -299,4 +299,4 @@ export {
299
299
  P as f,
300
300
  R as g
301
301
  };
302
- //# sourceMappingURL=header-B8V_sNPy.js.map
302
+ //# sourceMappingURL=header-CkMb1TZS.js.map
@@ -0,0 +1,21 @@
1
+ import { c as a } from "./createLucideIcon-CrFbzy84.js";
2
+ /**
3
+ * @license lucide-react v1.8.0 - ISC
4
+ *
5
+ * This source code is licensed under the ISC license.
6
+ * See the LICENSE file in the root directory of this source tree.
7
+ */
8
+ const e = [
9
+ [
10
+ "path",
11
+ {
12
+ d: "M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",
13
+ key: "mvr1a0"
14
+ }
15
+ ],
16
+ ["path", { d: "M3.22 13H9.5l.5-1 2 4.5 2-7 1.5 3.5h5.27", key: "auskq0" }]
17
+ ], t = a("heart-pulse", e);
18
+ export {
19
+ t as H
20
+ };
21
+ //# sourceMappingURL=heart-pulse-CvuyFKHB.js.map
@@ -1,9 +1,9 @@
1
- import { jsxs as y, jsx as n } from "react/jsx-runtime";
2
- import { forwardRef as k } from "react";
3
- import { c as w } from "./index-D2ZczOXr.js";
4
- import { useTranslation as N } from "react-i18next";
5
- import { E as L } from "./external-link-C6F25E6k.js";
6
- const j = w(
1
+ import { jsxs as k, jsx as e } from "react/jsx-runtime";
2
+ import { forwardRef as L } from "react";
3
+ import { c as j } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as T } from "react-i18next";
5
+ import { E as z } from "./external-link-C6F25E6k.js";
6
+ const E = j(
7
7
  [
8
8
  "ds:underline-offset-4",
9
9
  "ds:rounded-[var(--radius-xs)]",
@@ -45,50 +45,51 @@ const j = w(
45
45
  hasIcon: "no"
46
46
  }
47
47
  }
48
- ), T = k(
48
+ ), I = L(
49
49
  ({
50
- href: l,
51
- external: e = !1,
52
- disabled: s = !1,
50
+ href: f,
51
+ external: s = !1,
52
+ externalIcon: u = !0,
53
+ disabled: n = !1,
53
54
  startIcon: i,
54
55
  endIcon: a,
55
56
  intent: r,
56
- weight: c,
57
- className: f,
58
- children: u,
59
- target: m,
57
+ weight: m,
58
+ className: v,
59
+ children: h,
60
+ target: p,
60
61
  rel: t,
61
62
  onClick: o,
62
- ...v
63
- }, h) => {
64
- const { t: p } = N(), g = e ? "_blank" : m, x = e ? [t, "noopener", "noreferrer"].filter(Boolean).join(" ") : t, b = p("link.opensInNewTab", "Opens in a new tab");
65
- return /* @__PURE__ */ y(
63
+ ...g
64
+ }, x) => {
65
+ const { t: b } = T(), y = s ? "_blank" : p, w = s ? [t, "noopener", "noreferrer"].filter(Boolean).join(" ") : t, d = b("link.opensInNewTab", "Opens in a new tab"), N = (c) => {
66
+ if (n) {
67
+ c.preventDefault();
68
+ return;
69
+ }
70
+ o == null || o(c);
71
+ }, l = s && u;
72
+ return /* @__PURE__ */ k(
66
73
  "a",
67
74
  {
68
- ref: h,
69
- href: s ? void 0 : l,
70
- role: s ? "link" : void 0,
71
- "aria-disabled": s || void 0,
72
- target: g,
73
- rel: x || void 0,
74
- onClick: (d) => {
75
- if (s) {
76
- d.preventDefault();
77
- return;
78
- }
79
- o == null || o(d);
80
- },
75
+ ref: x,
76
+ href: n ? void 0 : f,
77
+ role: n ? "link" : void 0,
78
+ "aria-disabled": n || void 0,
79
+ target: y,
80
+ rel: w || void 0,
81
+ onClick: N,
81
82
  "data-component": "link",
82
83
  "data-intent": r ?? "default",
83
- className: j({
84
+ className: E({
84
85
  intent: r,
85
- weight: c,
86
- hasIcon: !!(i || a || e) ? "yes" : "no",
87
- className: f
86
+ weight: m,
87
+ hasIcon: !!(i || a || l) ? "yes" : "no",
88
+ className: v
88
89
  }),
89
- ...v,
90
+ ...g,
90
91
  children: [
91
- i ? /* @__PURE__ */ n(
92
+ i ? /* @__PURE__ */ e(
92
93
  "span",
93
94
  {
94
95
  "aria-hidden": "true",
@@ -96,15 +97,19 @@ const j = w(
96
97
  children: i
97
98
  }
98
99
  ) : null,
99
- u,
100
- e ? /* @__PURE__ */ n(
100
+ h,
101
+ l ? /* @__PURE__ */ e(
101
102
  "span",
102
103
  {
103
104
  className: "ds:inline-flex ds:items-center",
104
- "aria-label": b,
105
- children: /* @__PURE__ */ n(L, { "aria-hidden": "true", className: "ds:size-[1em]" })
105
+ "aria-label": d,
106
+ children: /* @__PURE__ */ e(z, { "aria-hidden": "true", className: "ds:size-[1em]" })
106
107
  }
107
- ) : a ? /* @__PURE__ */ n(
108
+ ) : s ? (
109
+ // External wiring without the glyph — keep the SR-only
110
+ // "opens in new tab" announcement so the affordance reads.
111
+ /* @__PURE__ */ e("span", { className: "ds:sr-only", children: d })
112
+ ) : a ? /* @__PURE__ */ e(
108
113
  "span",
109
114
  {
110
115
  "aria-hidden": "true",
@@ -117,8 +122,8 @@ const j = w(
117
122
  );
118
123
  }
119
124
  );
120
- T.displayName = "Link";
125
+ I.displayName = "Link";
121
126
  export {
122
- T as L
127
+ I as L
123
128
  };
124
- //# sourceMappingURL=link-DmM5IevO.js.map
129
+ //# sourceMappingURL=link-DrD_cRUg.js.map
@@ -0,0 +1,120 @@
1
+ import { t as D, c as p, m as N, a as g } from "./isSameDay-DHG8Xade.js";
2
+ function W(t, e) {
3
+ const n = () => p(e == null ? void 0 : e.in, NaN), a = I(t);
4
+ let s;
5
+ if (a.date) {
6
+ const i = x(a.date, 2);
7
+ s = Y(i.restDateString, i.year);
8
+ }
9
+ if (!s || isNaN(+s)) return n();
10
+ const l = +s;
11
+ let c = 0, u;
12
+ if (a.time && (c = w(a.time), isNaN(c)))
13
+ return n();
14
+ if (a.timezone) {
15
+ if (u = y(a.timezone), isNaN(u)) return n();
16
+ } else {
17
+ const i = new Date(l + c), d = D(0, e == null ? void 0 : e.in);
18
+ return d.setFullYear(
19
+ i.getUTCFullYear(),
20
+ i.getUTCMonth(),
21
+ i.getUTCDate()
22
+ ), d.setHours(
23
+ i.getUTCHours(),
24
+ i.getUTCMinutes(),
25
+ i.getUTCSeconds(),
26
+ i.getUTCMilliseconds()
27
+ ), d;
28
+ }
29
+ return D(l + c + u, e == null ? void 0 : e.in);
30
+ }
31
+ const f = {
32
+ dateTimeDelimiter: /[T ]/,
33
+ timeZoneDelimiter: /[Z ]/i,
34
+ timezone: /([Z+-].*)$/
35
+ }, U = /^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/, h = /^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/, C = /^([+-])(\d{2})(?::?(\d{2}))?$/;
36
+ function I(t) {
37
+ const e = {}, n = t.split(f.dateTimeDelimiter);
38
+ let r;
39
+ if (n.length > 2)
40
+ return e;
41
+ if (/:/.test(n[0]) ? r = n[0] : (e.date = n[0], r = n[1], f.timeZoneDelimiter.test(e.date) && (e.date = t.split(f.timeZoneDelimiter)[0], r = t.substr(
42
+ e.date.length,
43
+ t.length
44
+ ))), r) {
45
+ const a = f.timezone.exec(r);
46
+ a ? (e.time = r.replace(a[1], ""), e.timezone = a[1]) : e.time = r;
47
+ }
48
+ return e;
49
+ }
50
+ function x(t, e) {
51
+ const n = new RegExp(
52
+ "^(?:(\\d{4}|[+-]\\d{" + (4 + e) + "})|(\\d{2}|[+-]\\d{" + (2 + e) + "})$)"
53
+ ), r = t.match(n);
54
+ if (!r) return { year: NaN, restDateString: "" };
55
+ const a = r[1] ? parseInt(r[1]) : null, s = r[2] ? parseInt(r[2]) : null;
56
+ return {
57
+ year: s === null ? a : s * 100,
58
+ restDateString: t.slice((r[1] || r[2]).length)
59
+ };
60
+ }
61
+ function Y(t, e) {
62
+ if (e === null) return /* @__PURE__ */ new Date(NaN);
63
+ const n = t.match(U);
64
+ if (!n) return /* @__PURE__ */ new Date(NaN);
65
+ const r = !!n[4], a = o(n[1]), s = o(n[2]) - 1, l = o(n[3]), c = o(n[4]), u = o(n[5]) - 1;
66
+ if (r)
67
+ return Z(e, c, u) ? z(e, c, u) : /* @__PURE__ */ new Date(NaN);
68
+ {
69
+ const i = /* @__PURE__ */ new Date(0);
70
+ return !M(e, s, l) || !O(e, a) ? /* @__PURE__ */ new Date(NaN) : (i.setUTCFullYear(e, s, Math.max(a, l)), i);
71
+ }
72
+ }
73
+ function o(t) {
74
+ return t ? parseInt(t) : 1;
75
+ }
76
+ function w(t) {
77
+ const e = t.match(h);
78
+ if (!e) return NaN;
79
+ const n = m(e[1]), r = m(e[2]), a = m(e[3]);
80
+ return k(n, r, a) ? n * N + r * g + a * 1e3 : NaN;
81
+ }
82
+ function m(t) {
83
+ return t && parseFloat(t.replace(",", ".")) || 0;
84
+ }
85
+ function y(t) {
86
+ if (t === "Z") return 0;
87
+ const e = t.match(C);
88
+ if (!e) return 0;
89
+ const n = e[1] === "+" ? -1 : 1, r = parseInt(e[2]), a = e[3] && parseInt(e[3]) || 0;
90
+ return R(r, a) ? n * (r * N + a * g) : NaN;
91
+ }
92
+ function z(t, e, n) {
93
+ const r = /* @__PURE__ */ new Date(0);
94
+ r.setUTCFullYear(t, 0, 4);
95
+ const a = r.getUTCDay() || 7, s = (e - 1) * 7 + n + 1 - a;
96
+ return r.setUTCDate(r.getUTCDate() + s), r;
97
+ }
98
+ const F = [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
99
+ function T(t) {
100
+ return t % 400 === 0 || t % 4 === 0 && t % 100 !== 0;
101
+ }
102
+ function M(t, e, n) {
103
+ return e >= 0 && e <= 11 && n >= 1 && n <= (F[e] || (T(t) ? 29 : 28));
104
+ }
105
+ function O(t, e) {
106
+ return e >= 1 && e <= (T(t) ? 366 : 365);
107
+ }
108
+ function Z(t, e, n) {
109
+ return e >= 1 && e <= 53 && n >= 0 && n <= 6;
110
+ }
111
+ function k(t, e, n) {
112
+ return t === 24 ? e === 0 && n === 0 : n >= 0 && n < 60 && e >= 0 && e < 60 && t >= 0 && t < 25;
113
+ }
114
+ function R(t, e) {
115
+ return e >= 0 && e <= 59;
116
+ }
117
+ export {
118
+ W as p
119
+ };
120
+ //# sourceMappingURL=parseISO-Dk4xa7q6.js.map