@wssto2/vue-core 0.3.0 → 0.4.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 (161) hide show
  1. package/README.md +3 -0
  2. package/dist/{AccessGate.vue_vue_type_script_setup_true_lang-DKX3PH2n.js → AccessGate.vue_vue_type_script_setup_true_lang-DcbZBINh.js} +1 -1
  3. package/dist/{AccountMenuItem.vue_vue_type_script_setup_true_lang-DIGqTLwd.js → AccountMenuItem.vue_vue_type_script_setup_true_lang-CPeNxh5K.js} +1 -1
  4. package/dist/{ActionRow.vue_vue_type_script_setup_true_lang-B7Lpfkf6.js → ActionRow.vue_vue_type_script_setup_true_lang-LlfIPWsJ.js} +2 -2
  5. package/dist/{Activity-DviO0VQ8.js → Activity-ylf1r2lv.js} +9 -9
  6. package/dist/{AdaptivePageShell.vue_vue_type_script_setup_true_lang-CvAnzdc1.js → AdaptivePageShell.vue_vue_type_script_setup_true_lang-CUtGqVGA.js} +4 -4
  7. package/dist/{AlertDialog.vue_vue_type_script_setup_true_lang-CJsMUIUg.js → AlertDialog.vue_vue_type_script_setup_true_lang-whA4WLdl.js} +1 -1
  8. package/dist/{AsyncSection.vue_vue_type_script_setup_true_lang-CCtthMRd.js → AsyncSection.vue_vue_type_script_setup_true_lang-Blj6KgCr.js} +4 -4
  9. package/dist/{Banner.vue_vue_type_script_setup_true_lang-Cib_YYpr.js → Banner.vue_vue_type_script_setup_true_lang-DSStj_5z.js} +1 -1
  10. package/dist/{Button.vue_vue_type_script_setup_true_lang-CYil8h9z.js → Button.vue_vue_type_script_setup_true_lang-CL9Qh5yq.js} +1 -1
  11. package/dist/{Changes-DlT5mN9G.js → Changes-B1-2LPkp.js} +8 -8
  12. package/dist/{CollectionPage.vue_vue_type_script_setup_true_lang-CXILftEc.js → CollectionPage.vue_vue_type_script_setup_true_lang-DU_jzTg7.js} +176 -172
  13. package/dist/{DataTable.vue_vue_type_script_setup_true_lang-DSYgS9lC.js → DataTable.vue_vue_type_script_setup_true_lang-UH6f9puS.js} +1 -1
  14. package/dist/DateField.vue_vue_type_script_setup_true_lang-GVasv8ao.js +255 -0
  15. package/dist/DeadLetters-CcogaMTK.js +104 -0
  16. package/dist/{DiscardChangesModal.vue_vue_type_script_setup_true_lang-Cb3xJI1x.js → DiscardChangesModal.vue_vue_type_script_setup_true_lang-D1arePCZ.js} +1 -1
  17. package/dist/{EmptyState.vue_vue_type_script_setup_true_lang-C2ZYIT9F.js → EmptyState.vue_vue_type_script_setup_true_lang-50p-Mp8I.js} +1 -1
  18. package/dist/{FormErrors.vue_vue_type_script_setup_true_lang-DVgNBQ8p.js → FormErrors.vue_vue_type_script_setup_true_lang-BQb7wLT0.js} +1 -1
  19. package/dist/{FormGroup.vue_vue_type_script_setup_true_lang-0mfG8TkU.js → FormGroup.vue_vue_type_script_setup_true_lang-DG2zdG_a.js} +10 -10
  20. package/dist/{FormView.vue_vue_type_script_setup_true_lang-Bz2m3AtF.js → FormView.vue_vue_type_script_setup_true_lang-cr0xNDXP.js} +2 -2
  21. package/dist/{General-BD-Hcz0a.js → General-DSrflQib.js} +9 -9
  22. package/dist/HeaderAction.vue_vue_type_script_setup_true_lang-Cgji-Jrr.js +45 -0
  23. package/dist/{Icon.vue_vue_type_script_lang-VvcV2Bzo.js → Icon.vue_vue_type_script_lang-D7oC-d-S.js} +33 -29
  24. package/dist/{IconTile.vue_vue_type_script_setup_true_lang-D7QgnUyN.js → IconTile.vue_vue_type_script_setup_true_lang-BpIjgu5E.js} +1 -1
  25. package/dist/{LeaveGuardRoot.vue_vue_type_script_setup_true_lang-C2udmeEA.js → LeaveGuardRoot.vue_vue_type_script_setup_true_lang-Cv7KlA5y.js} +1 -1
  26. package/dist/{Menu.vue_vue_type_script_setup_true_lang-BNAjx9tj.js → Menu.vue_vue_type_script_setup_true_lang-DTbAcDzL.js} +30 -26
  27. package/dist/{Modal.vue_vue_type_script_setup_true_lang-D7SwVPpL.js → Modal.vue_vue_type_script_setup_true_lang-DpBb8ans.js} +2 -2
  28. package/dist/{NewRolePage-Dla4YnMs.js → NewRolePage-Du9eyEG2.js} +4 -4
  29. package/dist/{NoAccess.vue_vue_type_script_setup_true_lang-8m9cNptR.js → NoAccess.vue_vue_type_script_setup_true_lang-DWxq-MTM.js} +1 -1
  30. package/dist/{NumberField.vue_vue_type_script_setup_true_lang-CYRg7Kfg.js → NumberField.vue_vue_type_script_setup_true_lang-C7N5nq0P.js} +1 -1
  31. package/dist/{PageBar.vue_vue_type_script_setup_true_lang-Cfr5xsJx.js → PageBar.vue_vue_type_script_setup_true_lang-B7qdEeej.js} +1 -1
  32. package/dist/{Panel.vue_vue_type_script_setup_true_lang-BCRxRK4D.js → Panel.vue_vue_type_script_setup_true_lang-BA0u_DtS.js} +1 -1
  33. package/dist/PanelActions.vue_vue_type_script_setup_true_lang-E9VdIGkf.js +46 -0
  34. package/dist/{PhotoViewer.vue_vue_type_script_setup_true_lang-B3Q4dhqJ.js → PhotoViewer.vue_vue_type_script_setup_true_lang-QPCW3Xi6.js} +1 -1
  35. package/dist/ProfilePage-BjvWyg_e.js +654 -0
  36. package/dist/{RecordHeader.vue_vue_type_script_setup_true_lang-DKsaKlAq.js → RecordHeader.vue_vue_type_script_setup_true_lang-Ci4fs5s5.js} +2 -2
  37. package/dist/{ResourcePage.vue_vue_type_script_setup_true_lang-CJcKa9SW.js → ResourcePage.vue_vue_type_script_setup_true_lang-KPVA-1fI.js} +5 -5
  38. package/dist/{RoleEditor.vue_vue_type_script_setup_true_lang-DuEPOmjI.js → RoleEditor.vue_vue_type_script_setup_true_lang-Ci1Aqc37.js} +30 -29
  39. package/dist/{RolePage-bZzv_E4l.js → RolePage-BDD6volP.js} +13 -13
  40. package/dist/{RolesPage-BniZv0nB.js → RolesPage-Bzun0trr.js} +9 -9
  41. package/dist/{SectionList.vue_vue_type_script_setup_true_lang-BKP_bge8.js → SectionList.vue_vue_type_script_setup_true_lang-DBheVDeX.js} +3 -3
  42. package/dist/{SectionNavigator.vue_vue_type_script_setup_true_lang-BgGEGxSI.js → SectionNavigator.vue_vue_type_script_setup_true_lang-L4TXI0wR.js} +6 -6
  43. package/dist/{SegmentedField.vue_vue_type_script_setup_true_lang-BZ9UdgA1.js → SegmentedField.vue_vue_type_script_setup_true_lang-BMqWlpsL.js} +1 -1
  44. package/dist/{SelectField.vue_vue_type_script_setup_true_lang-BiGaEKBQ.js → SelectField.vue_vue_type_script_setup_true_lang-7O1BAx04.js} +15 -14
  45. package/dist/{SessionList.vue_vue_type_script_setup_true_lang-DUQpr7gb.js → SessionList.vue_vue_type_script_setup_true_lang-D5KRitar.js} +4 -4
  46. package/dist/{Sessions-Co5-xdeb.js → Sessions-BOzz38WJ.js} +6 -6
  47. package/dist/SettingsPage-BXlYHt8u.js +255 -0
  48. package/dist/{Sheet.vue_vue_type_script_setup_true_lang-bHYzx7-J.js → Sheet.vue_vue_type_script_setup_true_lang-DgOFV4fa.js} +48 -45
  49. package/dist/{SignIn-BWwFbxki.js → SignIn-CenfvX8C.js} +7 -7
  50. package/dist/{SignInPage-FnLtoi2q.js → SignInPage-23sJGIXh.js} +6 -6
  51. package/dist/{SignInTable.vue_vue_type_script_setup_true_lang-Dnx3T_42.js → SignInTable.vue_vue_type_script_setup_true_lang-CEbAvZ_C.js} +1 -1
  52. package/dist/{SignIns-3UcI64_h.js → SignIns-DRaTo-T0.js} +6 -6
  53. package/dist/{SwipeActions.vue_vue_type_script_setup_true_lang-4I8m27ol.js → SwipeActions.vue_vue_type_script_setup_true_lang-BJIA2JfI.js} +1 -1
  54. package/dist/SwitchField.vue_vue_type_script_setup_true_lang-CM8yp9JQ.js +64 -0
  55. package/dist/{Tabs.vue_vue_type_script_setup_true_lang-BeGaydRr.js → Tabs.vue_vue_type_script_setup_true_lang-CcMcE38r.js} +1 -1
  56. package/dist/{TextField.vue_vue_type_script_setup_true_lang-C_FMf3Vc.js → TextField.vue_vue_type_script_setup_true_lang-B9dwVASU.js} +3 -3
  57. package/dist/TextareaField.vue_vue_type_script_setup_true_lang-CqAWfABZ.js +68 -0
  58. package/dist/TimeField.vue_vue_type_script_setup_true_lang-DWfAUlnz.js +164 -0
  59. package/dist/{Timestamp.vue_vue_type_script_setup_true_lang-1RJGKxbD.js → Timestamp.vue_vue_type_script_setup_true_lang-FVRUr-9y.js} +1 -1
  60. package/dist/{UserRecord-Ci8HfwbX.js → UserRecord-BreLQOPG.js} +13 -13
  61. package/dist/{UsersList-vEJ-cgkT.js → UsersList-CKLqiOpt.js} +8 -8
  62. package/dist/{ViewTabs.vue_vue_type_script_setup_true_lang-ByqTU2JT.js → ViewTabs.vue_vue_type_script_setup_true_lang-BJIoZAlH.js} +1 -1
  63. package/dist/access/index.js +1 -1
  64. package/dist/access-DmAceEo5.js +42 -0
  65. package/dist/app/feature.d.ts +2 -0
  66. package/dist/app/index.js +11 -11
  67. package/dist/button/index.js +1 -1
  68. package/dist/{chrome-BS3xJcad.js → chrome-nUcmVu8G.js} +2 -2
  69. package/dist/client/index.js +11 -19
  70. package/dist/{client-Bw0aM5Gu.js → client-k9euDWF4.js} +19 -19
  71. package/dist/collection/definition.d.ts +3 -0
  72. package/dist/collection/index.js +6 -6
  73. package/dist/collection/useCollection.d.ts +2 -0
  74. package/dist/content/index.js +2 -2
  75. package/dist/{contributions-CDDg3fKp.js → contributions-DsfmDoRD.js} +1 -1
  76. package/dist/control-7EP4tjYy.js +313 -0
  77. package/dist/controls/index.js +4 -4
  78. package/dist/form/index.js +987 -1134
  79. package/dist/{guards-Cd1V28oG.js → guards-Dve61KjR.js} +1 -1
  80. package/dist/{http-DGGSKWvU.js → http-CNcDHSOj.js} +9 -8
  81. package/dist/i18n/index.js +20 -20
  82. package/dist/icon/core.d.ts +4 -0
  83. package/dist/icon/index.js +1 -1
  84. package/dist/identity/index.js +1 -1
  85. package/dist/index-0TeI4rVv.js +504 -0
  86. package/dist/{index-B2dbYZR9.js → index-BBdzJnvG.js} +15 -15
  87. package/dist/{index-BAcl44SC.js → index-CnVf6Uk_.js} +19 -19
  88. package/dist/index.d.ts +1 -1
  89. package/dist/index.js +1 -1
  90. package/dist/modal/Sheet.vue.d.ts +2 -0
  91. package/dist/modal/index.js +5 -5
  92. package/dist/modules/events/entities.d.ts +16 -0
  93. package/dist/modules/events/routes.d.ts +17 -0
  94. package/dist/modules/events/schemas.d.ts +16 -0
  95. package/dist/modules/notification/entities.d.ts +46 -0
  96. package/dist/modules/notification/routes.d.ts +26 -0
  97. package/dist/modules/notification/schemas.d.ts +25 -0
  98. package/dist/{navigation-BPWa63ge.js → navigation-Cm3iChlR.js} +1 -1
  99. package/dist/{neighbors-D0WRBxXI.js → neighbors-DpaIMQAL.js} +1 -1
  100. package/dist/notifications/InboxPanel.vue.d.ts +16 -0
  101. package/dist/notifications/MarkAllRead.vue.d.ts +7 -0
  102. package/dist/notifications/NotificationBell.vue.d.ts +2 -0
  103. package/dist/notifications/SettingsLink.vue.d.ts +6 -0
  104. package/dist/notifications/context.d.ts +20 -0
  105. package/dist/notifications/deadletters/DeadLetters.vue.d.ts +2 -0
  106. package/dist/notifications/deadletters/access.d.ts +3 -0
  107. package/dist/notifications/deadletters/list.d.ts +3 -0
  108. package/dist/notifications/deadletters/routes.d.ts +13 -0
  109. package/dist/notifications/feature.d.ts +31 -0
  110. package/dist/notifications/inbox.d.ts +62 -0
  111. package/dist/notifications/index.d.ts +13 -0
  112. package/dist/notifications/index.js +8 -0
  113. package/dist/notifications/settings/EmailPanel.vue.d.ts +14 -0
  114. package/dist/notifications/settings/QuietHoursPanel.vue.d.ts +14 -0
  115. package/dist/notifications/settings/SettingsMenuItem.vue.d.ts +2 -0
  116. package/dist/notifications/settings/SettingsPage.vue.d.ts +2 -0
  117. package/dist/notifications/settings/categoryText.d.ts +9 -0
  118. package/dist/notifications/settings/routes.d.ts +13 -0
  119. package/dist/notifications/settings/settings.d.ts +18 -0
  120. package/dist/notifications/settings/state.d.ts +16 -0
  121. package/dist/notifications/state.d.ts +27 -0
  122. package/dist/notifications/stream.d.ts +21 -0
  123. package/dist/options-Ba_0uLWN.js +18 -0
  124. package/dist/overlay/index.js +3 -3
  125. package/dist/page/chrome.d.ts +4 -1
  126. package/dist/page/index.d.ts +1 -1
  127. package/dist/page/index.js +25 -24
  128. package/dist/phone/index.js +68 -67
  129. package/dist/platform/index.js +2 -2
  130. package/dist/{platform-hunMqFdB.js → platform-q3cjODLx.js} +1 -1
  131. package/dist/resource/index.js +1 -1
  132. package/dist/route-goWMxDUN.js +13 -0
  133. package/dist/router/access.d.ts +1 -1
  134. package/dist/router/index.js +5 -5
  135. package/dist/router/pageRefresh.d.ts +6 -0
  136. package/dist/{rowLayout-BI7a3Kom.js → rowLayout-BqTEhEuy.js} +5 -5
  137. package/dist/{sections-BEqW1dOc.js → sections-D-kD98vu.js} +2 -2
  138. package/dist/shell/BackofficeShell.vue.d.ts +4 -1
  139. package/dist/shell/NavigationDrawer.vue.d.ts +1 -1
  140. package/dist/shell/PullToRefresh.vue.d.ts +2 -0
  141. package/dist/shell/ShellSidebar.vue.d.ts +2 -1
  142. package/dist/shell/backofficeShell.d.ts +3 -1
  143. package/dist/shell/index.js +638 -584
  144. package/dist/shell/pullToRefresh.d.ts +16 -0
  145. package/dist/shell/search.d.ts +3 -0
  146. package/dist/state/index.js +4 -4
  147. package/dist/{status-C9aXR-Jb.js → status-jB5r1cG2.js} +2 -2
  148. package/dist/styles.css +1 -1
  149. package/dist/{suggestions-BJAqOj4c.js → suggestions-BxMm6MQA.js} +1 -1
  150. package/dist/testing/index.js +1 -1
  151. package/dist/transport-BnP7WC0Y.js +4 -0
  152. package/dist/{useCommand-BgRwnYlV.js → useCommand-BkONMn3X.js} +2 -2
  153. package/dist/{useResourceForm-Bgc9jMcu.js → useResourceForm-D1hIpwW5.js} +1 -1
  154. package/dist/{useSaveChrome-chi6D3HY.js → useSaveChrome-DuWm0Czf.js} +1 -1
  155. package/dist/useTypedEntry-aTfPBAhw.js +857 -0
  156. package/package.json +8 -4
  157. package/dist/DateField.vue_vue_type_script_setup_true_lang-DMVjNsaM.js +0 -1099
  158. package/dist/ProfilePage-OJMQ8cr8.js +0 -691
  159. package/dist/TextareaField.vue_vue_type_script_setup_true_lang-CU3KTKIJ.js +0 -127
  160. package/dist/access-DdRFrVV1.js +0 -40
  161. package/dist/options-BXkMR63B.js +0 -329
@@ -0,0 +1,857 @@
1
+ import { defineComponent as B, ref as L, watch as oe, computed as _, openBlock as f, createElementBlock as b, Fragment as I, createElementVNode as h, normalizeClass as $, unref as y, createVNode as N, createTextVNode as Pe, toDisplayString as M, renderList as j, useModel as de, useId as De, useTemplateRef as ce, createCommentVNode as G, createBlock as ie, mergeModels as me, nextTick as Te, onMounted as Ee, onBeforeUnmount as Fe, normalizeStyle as X, withCtx as he } from "vue";
2
+ import { useI18n as J } from "vue-i18n";
3
+ import { u as Ce } from "./format-B8mJm946.js";
4
+ import { _ as je } from "./Sheet.vue_vue_type_script_setup_true_lang-DgOFV4fa.js";
5
+ import { _ as F } from "./Icon.vue_vue_type_script_lang-D7oC-d-S.js";
6
+ import { a as Oe } from "./mediaQuery-CygcXmFW.js";
7
+ const We = /^(\d{4})-(\d{2})-(\d{2})$/, Me = 864e5, W = (e, t = 2) => String(e).padStart(t, "0"), Re = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], He = (e) => e % 4 === 0 && e % 100 !== 0 || e % 400 === 0, re = (e, t) => t === 2 && He(e) ? 29 : Re[t - 1] ?? 0;
8
+ function O(e, t, a) {
9
+ return !Number.isInteger(e) || !Number.isInteger(t) || !Number.isInteger(a) || e < 1 || e > 9999 || t < 1 || t > 12 || a < 1 || a > re(e, t) ? null : `${W(e, 4)}-${W(t)}-${W(a)}`;
10
+ }
11
+ function R(e) {
12
+ const t = e ? We.exec(e) : null;
13
+ if (!t) return null;
14
+ const a = { year: Number(t[1]), month: Number(t[2]), day: Number(t[3]) };
15
+ return O(a.year, a.month, a.day) ? a : null;
16
+ }
17
+ const ne = (e) => R(e) !== null, Ve = (e) => `${W(e.year, 4)}-${W(e.month)}-${W(e.day)}`;
18
+ function Ne(e) {
19
+ const t = /* @__PURE__ */ new Date(0);
20
+ return t.setUTCFullYear(e.year, e.month - 1, e.day), Math.round(t.getTime() / Me);
21
+ }
22
+ function Be(e) {
23
+ const t = new Date(e * Me);
24
+ return { year: t.getUTCFullYear(), month: t.getUTCMonth() + 1, day: t.getUTCDate() };
25
+ }
26
+ const se = (e) => R(e) ?? { year: 1970, month: 1, day: 1 };
27
+ function Y(e, t) {
28
+ return Ve(Be(Ne(se(e)) + t));
29
+ }
30
+ function H(e, t) {
31
+ const a = se(e), n = a.year * 12 + (a.month - 1) + t, u = Math.floor(n / 12), m = n % 12 + 1;
32
+ return O(u, m, Math.min(a.day, re(u, m))) ?? e;
33
+ }
34
+ const ye = (e, t) => H(e, t * 12);
35
+ function le(e) {
36
+ const t = se(e);
37
+ return Ve({ ...t, day: re(t.year, t.month) });
38
+ }
39
+ function fe(e) {
40
+ const t = (Ne(se(e)) + 3) % 7;
41
+ return (t < 0 ? t + 7 : t) + 1;
42
+ }
43
+ function ve(e, t) {
44
+ return Y(e, -((fe(e) - t + 7) % 7));
45
+ }
46
+ const Ke = (e, t) => Y(ve(e, t), 6);
47
+ function Qe(e) {
48
+ let t = Y(e, 1);
49
+ for (; fe(t) >= 6; ) t = Y(t, 1);
50
+ return t;
51
+ }
52
+ function ue(e = /* @__PURE__ */ new Date()) {
53
+ return O(e.getFullYear(), e.getMonth() + 1, e.getDate()) ?? "1970-01-01";
54
+ }
55
+ function qe(e, t) {
56
+ if (t.min && e < t.min || t.max && e > t.max) return !0;
57
+ const a = t.disabled;
58
+ return a ? typeof a == "function" ? a(e) : a.some((n) => typeof n == "string" ? n === e : e >= n.from && e <= n.to) : !1;
59
+ }
60
+ function ee(e, t) {
61
+ return t.min && e < t.min ? t.min : t.max && e > t.max ? t.max : e;
62
+ }
63
+ function Ge(e) {
64
+ return Se(e)?.firstDay ?? 1;
65
+ }
66
+ function Ze(e) {
67
+ return Se(e)?.weekend ?? [6, 7];
68
+ }
69
+ function Se(e) {
70
+ try {
71
+ const t = new Intl.Locale(e);
72
+ return t.getWeekInfo?.() ?? t.weekInfo ?? null;
73
+ } catch {
74
+ return null;
75
+ }
76
+ }
77
+ function Je(e, t, a) {
78
+ const n = O(e, t, 1) ?? "1970-01-01", u = le(n), m = [];
79
+ for (let r = ve(n, a.firstWeekday); r <= u; r = Y(r, 7))
80
+ m.push(
81
+ Array.from({ length: 7 }, (d, o) => {
82
+ const c = Y(r, o);
83
+ return {
84
+ day: c,
85
+ date: Number(c.slice(8)),
86
+ inMonth: c.startsWith(n.slice(0, 7)),
87
+ weekend: a.weekend.includes(fe(c)),
88
+ today: c === a.today,
89
+ selected: c === a.selected,
90
+ disabled: qe(c, a.rules)
91
+ };
92
+ })
93
+ );
94
+ return m;
95
+ }
96
+ function Xe(e, t, a, n) {
97
+ switch (t) {
98
+ case "ArrowLeft":
99
+ return Y(e, -1);
100
+ case "ArrowRight":
101
+ return Y(e, 1);
102
+ case "ArrowUp":
103
+ return Y(e, -7);
104
+ case "ArrowDown":
105
+ return Y(e, 7);
106
+ case "PageUp":
107
+ return a ? ye(e, -1) : H(e, -1);
108
+ case "PageDown":
109
+ return a ? ye(e, 1) : H(e, 1);
110
+ case "Home":
111
+ return ve(e, n);
112
+ case "End":
113
+ return Ke(e, n);
114
+ default:
115
+ return null;
116
+ }
117
+ }
118
+ const et = {
119
+ class: "flex flex-col gap-2",
120
+ "data-test": "month-year-panel"
121
+ }, tt = { class: "flex items-center" }, at = ["disabled", "aria-label"], nt = ["aria-label"], lt = ["disabled", "aria-label"], ot = { class: "grid grid-cols-3 gap-1.5" }, rt = ["aria-pressed", "aria-label", "disabled", "onClick"], st = { class: "flex items-center" }, it = ["disabled", "aria-label"], ut = {
122
+ class: "grow text-center text-body font-semibold tabular-nums",
123
+ "aria-live": "polite"
124
+ }, dt = ["disabled", "aria-label"], ct = { class: "grid grid-cols-3 gap-1.5" }, mt = ["aria-pressed", "disabled", "onClick"], te = "flex size-8 cursor-pointer items-center justify-center rounded-control text-content-link hover:bg-fill disabled:cursor-default disabled:text-content-disabled disabled:hover:bg-transparent focus-visible:outline-2 focus-visible:outline-border-focus", xe = "min-h-9 cursor-pointer rounded-full px-1 text-subheadline focus-visible:outline-2 focus-visible:outline-border-focus disabled:cursor-default disabled:text-content-disabled disabled:hover:bg-fill", ft = /* @__PURE__ */ B({
125
+ __name: "MonthYearPanel",
126
+ props: {
127
+ month: { default: null },
128
+ year: { default: null },
129
+ viewYear: { default: void 0 },
130
+ minYear: { default: 1 },
131
+ maxYear: { default: 9999 },
132
+ monthDisabled: { type: Function, default: void 0 }
133
+ },
134
+ emits: ["pick"],
135
+ setup(e, { emit: t }) {
136
+ const a = e, n = t, { t: u } = J(), m = (k) => Math.floor(k / 10) * 10, r = L(c(a.year ?? a.viewYear ?? (/* @__PURE__ */ new Date()).getFullYear())), d = L(!1), o = L(m(r.value));
137
+ oe(
138
+ () => a.year,
139
+ (k) => {
140
+ k !== null && (r.value = c(k));
141
+ }
142
+ );
143
+ function c(k) {
144
+ return Math.min(a.maxYear, Math.max(a.minYear, k));
145
+ }
146
+ const v = _(() => Array.from({ length: 12 }, (k, g) => o.value + g)), w = (k, g) => u(`core.form.months.${g}.${k}`), D = (k) => a.month === k && a.year === r.value;
147
+ function z() {
148
+ o.value = m(r.value), d.value = !0;
149
+ }
150
+ function S(k) {
151
+ r.value = k, d.value = !1;
152
+ }
153
+ const P = (k) => k ? "bg-tint font-semibold text-content-on-tint" : "bg-fill text-content-strong hover:bg-fill-strong";
154
+ return (k, g) => (f(), b("div", et, [
155
+ d.value ? (f(), b(I, { key: 1 }, [
156
+ h("div", st, [
157
+ h("button", {
158
+ type: "button",
159
+ disabled: o.value <= a.minYear,
160
+ "aria-label": y(u)("core.form.date.previous_years"),
161
+ class: $(te),
162
+ onClick: g[2] || (g[2] = (p) => o.value -= 12)
163
+ }, [
164
+ N(y(F), {
165
+ name: "arrowLeftSLine",
166
+ size: 18
167
+ })
168
+ ], 8, it),
169
+ h("p", ut, M(v.value[0]) + " – " + M(v.value[11]), 1),
170
+ h("button", {
171
+ type: "button",
172
+ disabled: o.value + 11 >= a.maxYear,
173
+ "aria-label": y(u)("core.form.date.next_years"),
174
+ class: $(te),
175
+ onClick: g[3] || (g[3] = (p) => o.value += 12)
176
+ }, [
177
+ N(y(F), {
178
+ name: "arrowRightSLine",
179
+ size: 18
180
+ })
181
+ ], 8, dt)
182
+ ]),
183
+ h("div", ct, [
184
+ (f(!0), b(I, null, j(v.value, (p) => (f(), b("button", {
185
+ key: p,
186
+ type: "button",
187
+ "aria-pressed": a.year === p,
188
+ disabled: p < a.minYear || p > a.maxYear,
189
+ class: $([xe, "tabular-nums", P(a.year === p || a.year === null && r.value === p)]),
190
+ onClick: (l) => S(p)
191
+ }, M(p), 11, mt))), 128))
192
+ ])
193
+ ], 64)) : (f(), b(I, { key: 0 }, [
194
+ h("div", tt, [
195
+ h("button", {
196
+ type: "button",
197
+ disabled: r.value <= a.minYear,
198
+ "aria-label": y(u)("core.form.date.previous_year"),
199
+ class: $(te),
200
+ onClick: g[0] || (g[0] = (p) => r.value = c(r.value - 1))
201
+ }, [
202
+ N(y(F), {
203
+ name: "arrowLeftSLine",
204
+ size: 18
205
+ })
206
+ ], 8, at),
207
+ h("button", {
208
+ type: "button",
209
+ "aria-label": y(u)("core.form.date.years"),
210
+ "aria-expanded": "false",
211
+ class: "flex min-h-8 grow cursor-pointer items-center justify-center gap-1 rounded-control text-lg font-semibold tabular-nums hover:bg-fill focus-visible:outline-2 focus-visible:outline-border-focus",
212
+ onClick: z
213
+ }, [
214
+ Pe(M(r.value), 1),
215
+ N(y(F), {
216
+ name: "arrowDownSLine",
217
+ size: 14,
218
+ class: "text-content-link"
219
+ })
220
+ ], 8, nt),
221
+ h("button", {
222
+ type: "button",
223
+ disabled: r.value >= a.maxYear,
224
+ "aria-label": y(u)("core.form.date.next_year"),
225
+ class: $(te),
226
+ onClick: g[1] || (g[1] = (p) => r.value = c(r.value + 1))
227
+ }, [
228
+ N(y(F), {
229
+ name: "arrowRightSLine",
230
+ size: 18
231
+ })
232
+ ], 8, lt)
233
+ ]),
234
+ h("div", ot, [
235
+ (f(), b(I, null, j(12, (p) => h("button", {
236
+ key: p,
237
+ type: "button",
238
+ "aria-pressed": D(p),
239
+ "aria-label": `${w(p, "long")} ${r.value}`,
240
+ disabled: a.monthDisabled?.(r.value, p),
241
+ class: $([xe, P(D(p))]),
242
+ onClick: (l) => n("pick", { month: p, year: r.value })
243
+ }, M(w(p, "short")), 11, rt)), 64))
244
+ ])
245
+ ], 64))
246
+ ]));
247
+ }
248
+ }), vt = ["aria-expanded", "aria-label"], bt = ["id"], pt = ["id"], ht = ["disabled", "aria-label"], yt = ["disabled", "aria-label"], xt = ["aria-labelledby"], gt = ["aria-selected"], kt = ["data-day", "aria-label", "aria-current", "aria-disabled", "tabindex", "onClick"], ge = "flex shrink-0 cursor-pointer items-center justify-center rounded-control text-content-link hover:bg-fill disabled:cursor-default disabled:text-content-disabled disabled:hover:bg-transparent focus-visible:outline-2 focus-visible:outline-border-focus", _t = /* @__PURE__ */ B({
249
+ __name: "Calendar",
250
+ props: /* @__PURE__ */ me({
251
+ min: { default: null },
252
+ max: { default: null },
253
+ disabledDates: { type: [Array, Function], default: void 0 },
254
+ openOn: { default: null },
255
+ size: { default: "regular" },
256
+ monthPicker: { type: Boolean, default: !1 }
257
+ }, {
258
+ modelValue: { default: null },
259
+ modelModifiers: {}
260
+ }),
261
+ emits: ["update:modelValue"],
262
+ setup(e, { expose: t }) {
263
+ const a = e, n = de(e, "modelValue"), { t: u } = J(), m = Ce(), r = De(), d = ce("grid"), o = _(() => ({ min: a.min, max: a.max, disabled: a.disabledDates })), c = _(() => Ge(m.locale));
264
+ function v() {
265
+ return ne(n.value) ? n.value : ee(ne(a.openOn) ? a.openOn : ue(), o.value);
266
+ }
267
+ const w = R(v()), D = L({ year: w.year, month: w.month }), z = L(v()), S = L(!1);
268
+ oe(n, (i) => {
269
+ ne(i) && P(i);
270
+ });
271
+ function P(i) {
272
+ const x = R(i);
273
+ D.value = { year: x.year, month: x.month }, z.value = i;
274
+ }
275
+ const k = _(
276
+ () => Je(D.value.year, D.value.month, { firstWeekday: c.value, weekend: Ze(m.locale), today: ue(), selected: n.value, rules: o.value })
277
+ ), g = _(() => O(D.value.year, D.value.month, 1) ?? "1970-01-01"), p = _(() => z.value.startsWith(g.value.slice(0, 7)) ? z.value : g.value), l = _(() => u("core.form.months.with_year", { month: u(`core.form.months.long.${D.value.month}`), year: D.value.year })), T = _(() => {
278
+ const i = new Intl.DateTimeFormat(m.locale, { weekday: "short", timeZone: "UTC" });
279
+ return Array.from({ length: 7 }, (x, C) => {
280
+ const Q = new Date(Date.UTC(2026, 8, 28 + (c.value - 1 + C) % 7)), V = i.format(Q).replace(/\.$/, "");
281
+ return V.charAt(0).toLocaleUpperCase(m.locale) + V.slice(1, 2);
282
+ });
283
+ }), s = _(() => {
284
+ const i = new Intl.DateTimeFormat(m.locale, { dateStyle: "full", timeZone: "UTC" });
285
+ return (x) => {
286
+ const C = R(x);
287
+ return i.format(new Date(Date.UTC(C.year, C.month - 1, C.day)));
288
+ };
289
+ }), A = _(() => !a.min || le(H(g.value, -1)) >= a.min), E = _(() => !a.max || H(g.value, 1) <= a.max);
290
+ async function K(i, x) {
291
+ P(i), x && (await Te(), be());
292
+ }
293
+ function be() {
294
+ d.value?.querySelector(`[data-day="${p.value}"]`)?.focus();
295
+ }
296
+ function Ye(i) {
297
+ if (i.altKey || i.ctrlKey || i.metaKey) return;
298
+ const x = Xe(p.value, i.key, i.shiftKey, c.value);
299
+ x && (i.preventDefault(), K(ee(x, o.value), !0));
300
+ }
301
+ const pe = (i) => K(ee(H(p.value, i), o.value), !1);
302
+ function ze(i, x) {
303
+ z.value = i, x || (n.value = i);
304
+ }
305
+ function Ae(i) {
306
+ const x = O(i.year, i.month, Math.min(Number(p.value.slice(8)), re(i.year, i.month)));
307
+ S.value = !1, K(ee(x ?? g.value, o.value), !0);
308
+ }
309
+ const Ie = (i, x) => {
310
+ const C = O(i, x, 1) ?? "";
311
+ return !!a.max && C > a.max || !!a.min && le(C) < a.min;
312
+ };
313
+ t({ focus: be });
314
+ const U = _(() => a.size === "touch");
315
+ function Le(i) {
316
+ if (i.selected) return "bg-tint font-semibold text-content-on-tint";
317
+ const x = i.disabled ? "cursor-default text-content-disabled line-through decoration-1" : i.inMonth ? i.weekend ? "text-content-muted" : "text-content-strong" : "text-content-disabled", C = i.today ? "font-bold text-content-link ring-[1.5px] ring-inset ring-tint" : "";
318
+ return [x, C, i.disabled ? "" : "hover:bg-fill"].join(" ");
319
+ }
320
+ return (i, x) => (f(), b("div", {
321
+ class: $(["flex flex-col", U.value ? "gap-1" : "gap-2"]),
322
+ "data-test": "calendar"
323
+ }, [
324
+ h("div", {
325
+ class: $(["flex items-center gap-1", U.value ? "px-1" : ""])
326
+ }, [
327
+ a.monthPicker ? (f(), b("button", {
328
+ key: 0,
329
+ type: "button",
330
+ "aria-expanded": S.value,
331
+ "aria-label": y(u)("core.form.date.choose_month"),
332
+ class: "flex min-h-8 cursor-pointer items-center gap-1 rounded-control px-1.5 py-1 text-lg font-semibold hover:bg-fill focus-visible:outline-2 focus-visible:outline-border-focus",
333
+ onClick: x[0] || (x[0] = (C) => S.value = !S.value)
334
+ }, [
335
+ h("span", {
336
+ id: y(r),
337
+ "aria-live": "polite"
338
+ }, M(l.value), 9, bt),
339
+ N(y(F), {
340
+ name: "arrowDownSLine",
341
+ size: 14,
342
+ class: "text-content-link"
343
+ })
344
+ ], 8, vt)) : (f(), b("p", {
345
+ key: 1,
346
+ id: y(r),
347
+ "aria-live": "polite",
348
+ class: $(["ml-1.5 font-semibold", U.value ? "text-headline" : "text-lg"])
349
+ }, M(l.value), 11, pt)),
350
+ x[3] || (x[3] = h("span", { class: "grow" }, null, -1)),
351
+ S.value ? G("", !0) : (f(), b(I, { key: 2 }, [
352
+ h("button", {
353
+ type: "button",
354
+ disabled: !A.value,
355
+ "aria-label": y(u)("core.form.date.previous_month"),
356
+ class: $([ge, U.value ? "size-11" : "size-8"]),
357
+ onClick: x[1] || (x[1] = (C) => pe(-1))
358
+ }, [
359
+ N(y(F), {
360
+ name: "arrowLeftSLine",
361
+ size: U.value ? 22 : 18
362
+ }, null, 8, ["size"])
363
+ ], 10, ht),
364
+ h("button", {
365
+ type: "button",
366
+ disabled: !E.value,
367
+ "aria-label": y(u)("core.form.date.next_month"),
368
+ class: $([ge, U.value ? "size-11" : "size-8"]),
369
+ onClick: x[2] || (x[2] = (C) => pe(1))
370
+ }, [
371
+ N(y(F), {
372
+ name: "arrowRightSLine",
373
+ size: U.value ? 22 : 18
374
+ }, null, 8, ["size"])
375
+ ], 10, yt)
376
+ ], 64))
377
+ ], 2),
378
+ S.value ? (f(), ie(ft, {
379
+ key: 0,
380
+ month: D.value.month,
381
+ year: D.value.year,
382
+ "min-year": a.min ? Number(a.min.slice(0, 4)) : 1,
383
+ "max-year": a.max ? Number(a.max.slice(0, 4)) : 9999,
384
+ "month-disabled": Ie,
385
+ onPick: Ae
386
+ }, null, 8, ["month", "year", "min-year", "max-year"])) : (f(), b("div", {
387
+ key: 1,
388
+ ref_key: "grid",
389
+ ref: d,
390
+ role: "grid",
391
+ "aria-labelledby": y(r),
392
+ class: $(["flex flex-col", U.value ? "gap-y-1" : "gap-0.5"]),
393
+ onKeydown: Ye
394
+ }, [
395
+ h("div", {
396
+ role: "row",
397
+ class: $(["grid grid-cols-7 text-center", U.value ? "" : "gap-0.5"])
398
+ }, [
399
+ (f(!0), b(I, null, j(T.value, (C, Q) => (f(), b("div", {
400
+ key: Q,
401
+ role: "columnheader",
402
+ class: $(["py-1 font-semibold text-content-disabled", U.value ? "text-footnote" : "text-caption"])
403
+ }, M(C), 3))), 128))
404
+ ], 2),
405
+ (f(!0), b(I, null, j(k.value, (C, Q) => (f(), b("div", {
406
+ key: Q,
407
+ role: "row",
408
+ class: $(["grid grid-cols-7", U.value ? "" : "gap-0.5"])
409
+ }, [
410
+ (f(!0), b(I, null, j(C, (V) => (f(), b("div", {
411
+ key: V.day,
412
+ role: "gridcell",
413
+ "aria-selected": V.selected
414
+ }, [
415
+ h("button", {
416
+ type: "button",
417
+ "data-day": V.day,
418
+ "aria-label": s.value(V.day),
419
+ "aria-current": V.today ? "date" : void 0,
420
+ "aria-disabled": V.disabled || void 0,
421
+ tabindex: V.day === p.value ? 0 : -1,
422
+ class: $(["w-full cursor-pointer rounded-full tabular-nums transition-colors duration-motion-fast focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus", [U.value ? "h-11 text-body" : "h-9 text-body", Le(V)]]),
423
+ onClick: (Kt) => ze(V.day, V.disabled)
424
+ }, M(V.date), 11, kt)
425
+ ], 8, gt))), 128))
426
+ ], 2))), 128))
427
+ ], 42, xt))
428
+ ], 2));
429
+ }
430
+ }), wt = ["aria-label"], $t = ["disabled", "aria-pressed", "onClick"], Dt = /* @__PURE__ */ B({
431
+ __name: "QuickChips",
432
+ props: {
433
+ items: {},
434
+ selected: { default: null },
435
+ variant: { default: "popover" }
436
+ },
437
+ emits: ["pick"],
438
+ setup(e, { emit: t }) {
439
+ const a = e, n = t, { t: u } = J();
440
+ return (m, r) => (f(), b("div", {
441
+ role: "group",
442
+ "aria-label": y(u)("core.form.date.quick"),
443
+ class: "flex flex-wrap gap-1.5",
444
+ "data-test": "quick-picks"
445
+ }, [
446
+ (f(!0), b(I, null, j(a.items, (d) => (f(), b("button", {
447
+ key: d.key,
448
+ type: "button",
449
+ disabled: d.disabled,
450
+ "aria-pressed": d.value === a.selected,
451
+ class: $(["cursor-pointer whitespace-nowrap rounded-full font-medium transition-colors duration-motion-fast focus-visible:outline-2 focus-visible:outline-border-focus disabled:cursor-default disabled:opacity-45", [
452
+ a.variant === "sheet" ? "px-3 py-2 text-subheadline" : "px-2.5 py-1.5 text-footnote",
453
+ d.value === a.selected ? a.variant === "sheet" ? "bg-tint text-content-on-tint" : "bg-tint-soft text-content-link" : a.variant === "sheet" ? "bg-surface-cell text-content-strong shadow-group" : "bg-fill text-content-strong hover:bg-fill-strong"
454
+ ]]),
455
+ onClick: (o) => n("pick", d.value)
456
+ }, M(d.label), 11, $t))), 128))
457
+ ], 8, wt));
458
+ }
459
+ }), Tt = /^(\d{2}):(\d{2})$/, ke = (e) => String(e).padStart(2, "0");
460
+ function Z(e, t) {
461
+ return !Number.isInteger(e) || !Number.isInteger(t) || e < 0 || e > 23 || t < 0 || t > 59 ? null : `${ke(e)}:${ke(t)}`;
462
+ }
463
+ function Ue(e) {
464
+ const t = e ? Tt.exec(e) : null;
465
+ return t && Z(Number(t[1]), Number(t[2])) ? { hour: Number(t[1]), minute: Number(t[2]) } : null;
466
+ }
467
+ const ea = (e) => Ue(e) !== null;
468
+ function Ct(e) {
469
+ const t = Number.isInteger(e) && e >= 1 && e <= 30 ? e : 1;
470
+ return Array.from({ length: Math.ceil(60 / t) }, (a, n) => n * t);
471
+ }
472
+ const _e = Array.from({ length: 24 }, (e, t) => t);
473
+ function we(e = 1, t = /* @__PURE__ */ new Date()) {
474
+ const a = Number.isInteger(e) && e >= 1 && e <= 30 ? e : 1;
475
+ return Z(t.getHours(), t.getMinutes() - t.getMinutes() % a) ?? "00:00";
476
+ }
477
+ function ta(e, t = 1) {
478
+ const a = e.trim().toLowerCase();
479
+ let n, u;
480
+ const m = /^(\d{1,2})\s*[:.,h]\s*(\d{1,2})?$/.exec(a);
481
+ if (m)
482
+ n = Number(m[1]), u = m[2] === void 0 ? 0 : Number(m[2]);
483
+ else if (/^\d{1,2}$/.test(a))
484
+ n = Number(a), u = 0;
485
+ else if (/^\d{3,4}$/.test(a))
486
+ n = Number(a.slice(0, -2)), u = Number(a.slice(-2));
487
+ else return { error: "invalid" };
488
+ const r = Z(n, u);
489
+ return r ? t > 1 && u % t !== 0 ? { error: "step" } : { time: r } : { error: "invalid" };
490
+ }
491
+ const Mt = (e, t) => `${e}T${t}`;
492
+ function Vt(e) {
493
+ const t = e ? /^(\d{4}-\d{2}-\d{2})(?:[T ](\d{2}:\d{2}))?/.exec(e) : null;
494
+ return { day: t?.[1] ?? null, time: t?.[2] ?? null };
495
+ }
496
+ const Nt = ["aria-label", "aria-activedescendant"], St = ["id", "aria-selected", "data-value", "onClick"], Ut = ["aria-label", "aria-activedescendant"], Yt = ["id", "aria-selected", "data-value", "onClick"], q = 30, $e = 150, ae = /* @__PURE__ */ B({
497
+ __name: "ValueColumn",
498
+ props: /* @__PURE__ */ me({
499
+ values: {},
500
+ label: {},
501
+ variant: { default: "list" }
502
+ }, {
503
+ modelValue: { default: null },
504
+ modelModifiers: {}
505
+ }),
506
+ emits: ["update:modelValue"],
507
+ setup(e) {
508
+ const t = e, a = de(e, "modelValue"), n = ($e - q) / 2, u = De(), m = ce("scroller"), r = Oe("(prefers-reduced-motion: reduce)"), d = _(() => a.value === null ? -1 : t.values.indexOf(a.value)), o = L(Math.max(0, d.value));
509
+ let c;
510
+ const v = (l) => String(l).padStart(2, "0"), w = (l) => `${u}-${l}`;
511
+ function D(l) {
512
+ l !== void 0 && (a.value = l);
513
+ }
514
+ function z(l) {
515
+ const T = t.values.length - 1, s = d.value, E = {
516
+ ArrowDown: s < 0 ? 0 : Math.min(T, s + 1),
517
+ ArrowUp: s < 0 ? 0 : Math.max(0, s - 1),
518
+ PageDown: s < 0 ? 0 : Math.min(T, s + 5),
519
+ PageUp: s < 0 ? 0 : Math.max(0, s - 5),
520
+ Home: 0,
521
+ End: T
522
+ }[l.key];
523
+ E !== void 0 && (l.preventDefault(), D(t.values[E]));
524
+ }
525
+ function S(l) {
526
+ D(l);
527
+ }
528
+ function P(l, T) {
529
+ const s = m.value;
530
+ if (!s || l < 0 || typeof s.scrollTo != "function") return;
531
+ const A = T || r.value ? "instant" : "smooth";
532
+ if (t.variant === "wheel") {
533
+ Math.abs(s.scrollTop - l * q) > 1 && s.scrollTo({ top: l * q, behavior: A });
534
+ return;
535
+ }
536
+ const E = s.querySelector(`[data-value="${t.values[l]}"]`);
537
+ if (!E) return;
538
+ const K = E.offsetTop - (s.clientHeight - E.offsetHeight) / 2;
539
+ s.scrollTo({ top: Math.max(0, K), behavior: A });
540
+ }
541
+ function k() {
542
+ const l = m.value;
543
+ t.variant !== "wheel" || !l || (o.value = Math.min(t.values.length - 1, Math.max(0, Math.round(l.scrollTop / q))), clearTimeout(c), c = setTimeout(() => {
544
+ const T = t.values[o.value];
545
+ T !== void 0 && T !== a.value && (a.value = T);
546
+ }, 90));
547
+ }
548
+ Ee(() => void Te(() => P(d.value, !0))), Fe(() => clearTimeout(c)), oe(d, (l) => {
549
+ o.value = Math.max(0, l), P(l, !1);
550
+ });
551
+ const g = (l) => Math.abs(l - o.value), p = (l) => g(l) === 0 ? "text-[22px] font-semibold text-content-strong" : g(l) === 1 ? "text-[19px] text-content-muted" : "text-base text-content-disabled";
552
+ return (l, T) => t.variant === "list" ? (f(), b("div", {
553
+ key: 0,
554
+ ref_key: "scroller",
555
+ ref: m,
556
+ role: "listbox",
557
+ tabindex: "0",
558
+ "aria-label": t.label,
559
+ "aria-activedescendant": d.value >= 0 ? w(t.values[d.value]) : void 0,
560
+ class: "relative flex min-w-0 grow flex-col gap-0.5 overflow-y-auto rounded-control [scrollbar-width:none] focus-visible:outline-2 focus-visible:outline-border-focus [&::-webkit-scrollbar]:hidden",
561
+ onKeydown: z
562
+ }, [
563
+ (f(!0), b(I, null, j(t.values, (s) => (f(), b("div", {
564
+ id: w(s),
565
+ key: s,
566
+ role: "option",
567
+ "aria-selected": s === a.value,
568
+ "data-value": s,
569
+ class: $(["flex min-h-6.5 shrink-0 cursor-pointer items-center justify-center rounded-md text-body tabular-nums transition-colors duration-motion-fast", s === a.value ? "bg-tint font-semibold text-content-on-tint" : "text-content-strong hover:bg-fill"]),
570
+ onClick: (A) => S(s)
571
+ }, M(v(s)), 11, St))), 128))
572
+ ], 40, Nt)) : (f(), b("div", {
573
+ key: 1,
574
+ ref_key: "scroller",
575
+ ref: m,
576
+ role: "listbox",
577
+ tabindex: "0",
578
+ "aria-label": t.label,
579
+ "aria-activedescendant": d.value >= 0 ? w(t.values[d.value]) : void 0,
580
+ class: "relative w-16 snap-y snap-mandatory overflow-y-auto overscroll-contain rounded-control [scrollbar-width:none] focus-visible:outline-2 focus-visible:outline-border-focus [&::-webkit-scrollbar]:hidden",
581
+ style: X({ height: `${$e}px` }),
582
+ onScrollPassive: k,
583
+ onKeydown: z
584
+ }, [
585
+ h("div", {
586
+ style: X({ height: `${n}px` }),
587
+ "aria-hidden": "true"
588
+ }, null, 4),
589
+ (f(!0), b(I, null, j(t.values, (s, A) => (f(), b("div", {
590
+ id: w(s),
591
+ key: s,
592
+ role: "option",
593
+ "aria-selected": s === a.value,
594
+ "data-value": s,
595
+ class: $(["flex cursor-pointer snap-center items-center justify-center tabular-nums", p(A)]),
596
+ style: X({ height: `${q}px` }),
597
+ onClick: (E) => S(s)
598
+ }, M(v(s)), 15, Yt))), 128)),
599
+ h("div", {
600
+ style: X({ height: `${n}px` }),
601
+ "aria-hidden": "true"
602
+ }, null, 4)
603
+ ], 44, Ut));
604
+ }
605
+ }), zt = {
606
+ key: 0,
607
+ class: "flex h-49 gap-1.5",
608
+ "data-test": "time-columns"
609
+ }, At = {
610
+ key: 1,
611
+ class: "relative flex items-center justify-center gap-1",
612
+ "data-test": "time-columns"
613
+ }, It = /* @__PURE__ */ B({
614
+ __name: "TimeColumns",
615
+ props: /* @__PURE__ */ me({
616
+ step: { default: 1 },
617
+ variant: { default: "list" }
618
+ }, {
619
+ modelValue: { default: null },
620
+ modelModifiers: {}
621
+ }),
622
+ emits: ["update:modelValue"],
623
+ setup(e) {
624
+ const t = e, a = de(e, "modelValue"), { t: n } = J(), u = _(() => Ue(a.value)), m = _(() => Ct(t.step)), r = _({
625
+ get: () => u.value?.hour ?? null,
626
+ set: (o) => {
627
+ o !== null && (a.value = Z(o, u.value?.minute ?? 0));
628
+ }
629
+ }), d = _({
630
+ get: () => u.value?.minute ?? null,
631
+ set: (o) => {
632
+ o !== null && (a.value = Z(u.value?.hour ?? 0, o));
633
+ }
634
+ });
635
+ return (o, c) => t.variant === "list" ? (f(), b("div", zt, [
636
+ N(ae, {
637
+ modelValue: r.value,
638
+ "onUpdate:modelValue": c[0] || (c[0] = (v) => r.value = v),
639
+ values: y(_e),
640
+ label: y(n)("core.form.time.hour")
641
+ }, null, 8, ["modelValue", "values", "label"]),
642
+ N(ae, {
643
+ modelValue: d.value,
644
+ "onUpdate:modelValue": c[1] || (c[1] = (v) => d.value = v),
645
+ values: m.value,
646
+ label: y(n)("core.form.time.minute")
647
+ }, null, 8, ["modelValue", "values", "label"])
648
+ ])) : (f(), b("div", At, [
649
+ c[4] || (c[4] = h("div", {
650
+ class: "pointer-events-none absolute inset-x-0 h-9 rounded-lg bg-fill",
651
+ "aria-hidden": "true"
652
+ }, null, -1)),
653
+ N(ae, {
654
+ modelValue: r.value,
655
+ "onUpdate:modelValue": c[2] || (c[2] = (v) => r.value = v),
656
+ values: y(_e),
657
+ label: y(n)("core.form.time.hour"),
658
+ variant: "wheel",
659
+ class: "relative"
660
+ }, null, 8, ["modelValue", "values", "label"]),
661
+ c[5] || (c[5] = h("span", {
662
+ class: "relative text-[22px] font-semibold",
663
+ "aria-hidden": "true"
664
+ }, ":", -1)),
665
+ N(ae, {
666
+ modelValue: d.value,
667
+ "onUpdate:modelValue": c[3] || (c[3] = (v) => d.value = v),
668
+ values: m.value,
669
+ label: y(n)("core.form.time.minute"),
670
+ variant: "wheel",
671
+ class: "relative"
672
+ }, null, 8, ["modelValue", "values", "label"])
673
+ ]));
674
+ }
675
+ }), Lt = { class: "flex min-h-bar-height items-center gap-2 px-4 pb-1" }, Pt = ["disabled"], Et = ["id"], Ft = {
676
+ class: "flex flex-col gap-3.5",
677
+ "data-test": "date-picker-sheet"
678
+ }, jt = {
679
+ key: 1,
680
+ class: "rounded-group bg-surface-cell p-2.5 shadow-group"
681
+ }, Ot = {
682
+ key: 2,
683
+ class: "flex items-center gap-2 rounded-group bg-surface-cell px-4 py-2 shadow-group"
684
+ }, Wt = {
685
+ key: 0,
686
+ class: "w-22 shrink-0 text-body"
687
+ }, Rt = { class: "flex grow justify-center" }, Ht = {
688
+ class: "min-h-5 text-center text-subheadline text-content-muted",
689
+ "aria-live": "polite"
690
+ }, aa = /* @__PURE__ */ B({
691
+ __name: "DatePickerSheet",
692
+ props: {
693
+ title: {},
694
+ mode: {},
695
+ modelValue: { default: null },
696
+ min: { default: null },
697
+ max: { default: null },
698
+ disabledDates: { type: [Array, Function], default: void 0 },
699
+ openOn: { default: null },
700
+ shortcuts: { default: () => [] },
701
+ step: { default: 1 },
702
+ clearable: { type: Boolean, default: !0 }
703
+ },
704
+ emits: ["update:modelValue"],
705
+ setup(e, { expose: t, emit: a }) {
706
+ const n = e, u = a, { t: m } = J(), r = Ce(), d = ce("sheet"), o = _(() => n.mode !== "time"), c = _(() => n.mode !== "date"), v = L(null), w = L(null);
707
+ function D() {
708
+ const l = n.mode === "time" ? { day: null, time: n.modelValue } : n.mode === "date" ? { day: n.modelValue, time: null } : Vt(n.modelValue);
709
+ v.value = ne(l.day) ? l.day : null, w.value = c.value ? l.time ?? we(n.step) : null, d.value?.present();
710
+ }
711
+ function z() {
712
+ return n.mode === "time" ? w.value : v.value ? n.mode === "date" ? v.value : Mt(v.value, w.value ?? we(n.step)) : null;
713
+ }
714
+ function S() {
715
+ u("update:modelValue", z()), d.value?.dismiss();
716
+ }
717
+ function P() {
718
+ u("update:modelValue", null), d.value?.dismiss();
719
+ }
720
+ function k(l) {
721
+ n.mode === "time" ? w.value = l : v.value = l;
722
+ }
723
+ function g(l) {
724
+ w.value = l, o.value && !v.value && (v.value = ue());
725
+ }
726
+ const p = _(() => {
727
+ const l = (T) => {
728
+ const s = R(T), A = new Intl.DateTimeFormat(r.locale, { dateStyle: "full", timeZone: "UTC" }).format(new Date(Date.UTC(s.year, s.month - 1, s.day)));
729
+ return A.charAt(0).toLocaleUpperCase(r.locale) + A.slice(1);
730
+ };
731
+ return n.mode === "time" ? w.value ?? "" : v.value ? n.mode === "date" || !w.value ? l(v.value) : m("core.form.time.at", { date: l(v.value), time: w.value }) : "";
732
+ });
733
+ return t({ present: D, dismiss: () => d.value?.dismiss() }), (l, T) => (f(), ie(je, {
734
+ ref_key: "sheet",
735
+ ref: d,
736
+ title: n.title,
737
+ grouped: ""
738
+ }, {
739
+ header: he(({ titleId: s }) => [
740
+ h("div", Lt, [
741
+ h("button", {
742
+ type: "button",
743
+ disabled: !n.clearable,
744
+ class: "min-w-16 cursor-pointer py-1.5 text-start text-headline text-content-link focus-visible:outline-2 focus-visible:outline-border-focus disabled:cursor-default disabled:text-content-disabled",
745
+ onClick: P
746
+ }, M(y(m)("core.form.select.clear")), 9, Pt),
747
+ h("h3", {
748
+ id: s,
749
+ class: "min-w-0 grow truncate text-center text-headline font-semibold"
750
+ }, M(n.title), 9, Et),
751
+ h("button", {
752
+ type: "button",
753
+ class: "min-w-16 cursor-pointer py-1.5 text-end text-headline font-semibold text-content-link focus-visible:outline-2 focus-visible:outline-border-focus",
754
+ onClick: S
755
+ }, M(y(m)("core.form.select.done")), 1)
756
+ ])
757
+ ]),
758
+ default: he(() => [
759
+ h("div", Ft, [
760
+ n.shortcuts.length > 0 ? (f(), ie(Dt, {
761
+ key: 0,
762
+ variant: "sheet",
763
+ items: n.shortcuts,
764
+ selected: n.mode === "time" ? w.value : v.value,
765
+ onPick: k
766
+ }, null, 8, ["items", "selected"])) : G("", !0),
767
+ o.value ? (f(), b("div", jt, [
768
+ N(_t, {
769
+ modelValue: v.value,
770
+ "onUpdate:modelValue": T[0] || (T[0] = (s) => v.value = s),
771
+ size: "touch",
772
+ min: n.min,
773
+ max: n.max,
774
+ "disabled-dates": n.disabledDates,
775
+ "open-on": n.openOn
776
+ }, null, 8, ["modelValue", "min", "max", "disabled-dates", "open-on"])
777
+ ])) : G("", !0),
778
+ c.value ? (f(), b("div", Ot, [
779
+ o.value ? (f(), b("p", Wt, M(y(m)("core.form.time.label")), 1)) : G("", !0),
780
+ h("div", Rt, [
781
+ N(It, {
782
+ "model-value": w.value,
783
+ variant: "wheel",
784
+ step: n.step,
785
+ "onUpdate:modelValue": g
786
+ }, null, 8, ["model-value", "step"])
787
+ ])
788
+ ])) : G("", !0),
789
+ h("p", Ht, M(p.value), 1)
790
+ ])
791
+ ]),
792
+ _: 1
793
+ }, 8, ["title"]));
794
+ }
795
+ }), na = (e) => e ? ["today", "tomorrow", "next-working-day"] : ["today", "tomorrow", "week", "month-end"], la = ["now", "08:00", "12:00"], Bt = {
796
+ today: (e) => e,
797
+ tomorrow: (e) => Y(e, 1),
798
+ week: (e) => Y(e, 7),
799
+ "month-end": (e) => le(e),
800
+ "next-working-day": (e) => Qe(e)
801
+ };
802
+ function oa(e, t, a) {
803
+ return typeof e == "string" ? { key: e, label: t(e), value: Bt[e](a) } : { key: e.label, label: e.label, value: e.day(a) };
804
+ }
805
+ function ra(e, t, a) {
806
+ return e === "now" ? { key: "now", label: t, value: a } : typeof e == "string" ? { key: e, label: `${Number(e.slice(0, 2))}${e.slice(2)}`, value: e } : { key: e.label, label: e.label, value: e.time() };
807
+ }
808
+ function sa(e) {
809
+ const t = L(null), a = L(), n = _(() => t.value ?? (e.model.value ? e.display(e.model.value) : "")), u = _(() => {
810
+ if (t.value === null || t.value.trim() === "") return null;
811
+ const o = e.parse(t.value);
812
+ return "value" in o ? o.value : null;
813
+ });
814
+ function m(o) {
815
+ t.value = o, a.value = void 0;
816
+ }
817
+ function r(o) {
818
+ t.value = null, a.value = void 0, e.model.value = o;
819
+ }
820
+ function d() {
821
+ if (t.value === null) return;
822
+ if (t.value.trim() === "") return r(null);
823
+ const o = e.parse(t.value);
824
+ if ("error" in o) {
825
+ a.value = o.error, e.model.value !== null && (e.model.value = null);
826
+ return;
827
+ }
828
+ r(o.value);
829
+ }
830
+ return oe(e.model, (o) => {
831
+ o === null && a.value || (t.value = null, a.value = void 0);
832
+ }), { text: n, typed: u, message: a, input: m, commit: d, set: r };
833
+ }
834
+ export {
835
+ aa as _,
836
+ Ue as a,
837
+ It as b,
838
+ Dt as c,
839
+ la as d,
840
+ ue as e,
841
+ Y as f,
842
+ qe as g,
843
+ na as h,
844
+ ea as i,
845
+ oa as j,
846
+ ne as k,
847
+ _t as l,
848
+ O as m,
849
+ Z as n,
850
+ Mt as o,
851
+ ta as p,
852
+ ft as q,
853
+ ra as r,
854
+ Vt as s,
855
+ we as t,
856
+ sa as u
857
+ };