@getmicdrop/venue-calendar 4.3.52 → 4.3.54

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 (125) hide show
  1. package/dist/{ArrowLeftIcon-BVz8rVy-.js → ArrowLeftIcon-DjqiKzR8.js} +1 -1
  2. package/dist/{Badge-n7TfNjln.js → Badge-BsWJrQII.js} +8 -7
  3. package/dist/{BlockPlaceholder-BMor_G7G.js → BlockPlaceholder-CgZr2Euq.js} +2 -2
  4. package/dist/Button-AZ8OLQqj.js +178 -0
  5. package/dist/{Button-klwKgfhG.js → Button-B8GiiO44.js} +588 -855
  6. package/dist/Calendar-CS_RqyU_.js +486 -0
  7. package/dist/{CalendarFoundryView-Bq547Oiz.js → CalendarFoundryView-D6cytJxm.js} +7218 -10025
  8. package/dist/{CalendarIcon-B1zQMDYt.js → CalendarIcon-D9Z9YFz6.js} +1 -1
  9. package/dist/CartView-DTXoQTOC.js +2294 -0
  10. package/dist/ChartBlock-CaxNJtrg.js +1190 -0
  11. package/dist/{Checkout-pjUaSvU6.js → Checkout-B8ZkBxF_.js} +66 -65
  12. package/dist/Checkout-QIxYrkeK.js +1832 -0
  13. package/dist/{CheckoutTimer-DjYTRwVK.js → CheckoutTimer-CyN-mQCP.js} +5 -4
  14. package/dist/{ChevronDownIcon-8-uVEhg0.js → ChevronDownIcon-D9I-5bmz.js} +1 -1
  15. package/dist/ChevronDownOutline-D7YDiKBF.js +13 -0
  16. package/dist/{ClockIcon-CubuxycE.js → ClockIcon-C7nkbmvv.js} +1 -1
  17. package/dist/{CloseIcon-pz6eBxlB.js → CloseIcon-DPdjPdoi.js} +1 -1
  18. package/dist/{CollectionView-CWwhiJHK.js → CollectionView-CkKwCXQj.js} +15 -14
  19. package/dist/{CropImage-BFtvLjTE.js → CropImage-9r61-nLv.js} +66 -64
  20. package/dist/EmptyState-DxahojFY.js +53 -0
  21. package/dist/{Event-Cj5-V360.js → Event-BfWRG4dm.js} +415 -409
  22. package/dist/EventPage-dCTHvk7P.js +1201 -0
  23. package/dist/ExclamationCircleOutline-D3XbhOwM.js +13 -0
  24. package/dist/Grid-kuP6V0GW.js +89 -0
  25. package/dist/{Heading-D6bWtGZA.js → Heading-CZMbiuFu.js} +2 -1
  26. package/dist/Input-CDw-j5fQ.js +292 -0
  27. package/dist/{MailIcon-B4iLV34K.js → MailIcon-C__hyCKr.js} +1 -1
  28. package/dist/{Modal-DZ8fudB4.js → Modal-D6NKikBr.js} +2 -2
  29. package/dist/ModalFooter-ngqovl_z.js +377 -0
  30. package/dist/{ModalHeader-DkKpWKcG.js → ModalHeader-CI7Ev4MQ.js} +2 -2
  31. package/dist/{PasswordInput-Dd_mQxbp.js → PasswordInput-D3Pwparw.js} +2 -2
  32. package/dist/PhoneInput-oGG1WJii.js +1568 -0
  33. package/dist/{RecommendationsRail-D7NWOEEf.js → RecommendationsRail-DPxl9JCm.js} +17 -15
  34. package/dist/{ScarcityBadge--Rh62z2D.js → ScarcityBadge-BXn6HM_K.js} +24 -24
  35. package/dist/{SeriesPage-Dx0PFJkE.js → SeriesPage-B7z1yoAK.js} +7 -7
  36. package/dist/{Spinner-D8dOJe6O.js → Spinner-6UtYyNcF.js} +3 -3
  37. package/dist/{Success-Fj5TXPWu.js → Success-BzuOliUV.js} +43 -42
  38. package/dist/{TagIcon-DVXKjStU.js → TagIcon-DwWcRiXS.js} +1 -1
  39. package/dist/{Textarea-D24kYZAW.js → Textarea-CyfWw1Zf.js} +6 -6
  40. package/dist/{ViewTicketsEmbed-DByaBHeq.js → ViewTicketsEmbed-BE8iTUF9.js} +31 -30
  41. package/dist/{WarningCircleIcon-CbNmDN5r.js → WarningCircleIcon-C2fJjhKf.js} +18 -28
  42. package/dist/{WarningTriIcon-CZPGuEl3.js → WarningTriIcon-OqM9Rfwq.js} +1 -1
  43. package/dist/action-test-id-DJZiaKrZ.js +145 -0
  44. package/dist/api/gift-cards.d.ts +11 -2
  45. package/dist/{api-Cbbszsig.js → api-BsBSvoNj.js} +21 -20
  46. package/dist/{copyToClipboard-DfqOeS1-.js → copyToClipboard-CL9BmJA4.js} +1 -1
  47. package/dist/createErrorGate.svelte-DwTTmYou.js +83 -0
  48. package/dist/{de-DdgY9gjK.js → de-Cx6vl1bo.js} +1 -1
  49. package/dist/{defaultLabels-C7rJdC-m.js → defaultLabels-BaVkGLw4.js} +431 -605
  50. package/dist/{defaults-DBpwynsR.js → defaults-BHXY6s4i.js} +2 -2
  51. package/dist/{event-transform-rUtOP2f0.js → event-transform-oLpmof1H.js} +5 -4
  52. package/dist/{event-B4F3zifd.js → event-xgg-eiTq.js} +1 -1
  53. package/dist/{eventStatusStream-CeFdF0pM.js → eventStatusStream-BIxriEut.js} +2 -2
  54. package/dist/floatingPosition-DXLeLxPY.js +846 -0
  55. package/dist/{href-C_CnchY7.js → href-DO3HKeJp.js} +3 -3
  56. package/dist/i18n-8EWq-WHv.js +28 -0
  57. package/dist/{i18n-CEpacwpz.js → i18n-JpkI3lvS.js} +55 -54
  58. package/dist/{id-DLwaroVD.js → id-KAEn4B4Q.js} +1 -1
  59. package/dist/{imageOptimizer-Cf0BbZJ7.js → imageOptimizer-Bb09jR0m.js} +60 -57
  60. package/dist/{it-CB7RtPbU.js → it-CQcRIzL4.js} +1 -1
  61. package/dist/{it-BzBtirlA.js → it-DmnGZl3R.js} +2 -2
  62. package/dist/{ja-Bg0GgXOg.js → ja-BrzmyaoG.js} +1 -1
  63. package/dist/keyboard-Crrnn87b.js +55 -0
  64. package/dist/{ko-CTS9jPS0.js → ko-DY6ctJAC.js} +1 -1
  65. package/dist/locales/4.3.54/flow/it.js +1 -0
  66. package/dist/locales/4.3.54/main/de.js +1 -0
  67. package/dist/locales/4.3.54/main/id.js +1 -0
  68. package/dist/locales/4.3.54/main/it.js +1 -0
  69. package/dist/locales/{4.3.52 → 4.3.54}/main/ja.js +1 -1
  70. package/dist/locales/4.3.54/main/ko.js +1 -0
  71. package/dist/locales/4.3.54/main/pt-br.js +1 -0
  72. package/dist/locales/4.3.54/main/zh.js +1 -0
  73. package/dist/{order-totals-c3zn-HDr.js → order-totals-5X0jD77w.js} +4 -4
  74. package/dist/{orders-DZbxfNI9.js → orders--luy9Lyn.js} +6 -5
  75. package/dist/{createErrorGate.svelte-Ct8gFqvn.js → phoneUtils-CS66SHie.js} +607 -686
  76. package/dist/{pixels-CoXwcqE_.js → pixels-FefBmhJt.js} +3 -3
  77. package/dist/portal-BZBgqs8B.js +98 -0
  78. package/dist/{promo-X_5x9P0A.js → promo-BNwWtZjP.js} +3 -3
  79. package/dist/{pt-br-QgRkwqJk.js → pt-br-COrMoRiG.js} +1 -1
  80. package/dist/{scarcity-Do5MrSwn.js → scarcity-CR1Pa81F.js} +105 -104
  81. package/dist/seo/HostSeoController.d.ts +92 -1
  82. package/dist/seo/seo.cjs +1 -1
  83. package/dist/seo/seo.mjs +39 -6
  84. package/dist/seo/types.d.ts +13 -0
  85. package/dist/{serverTotals-6RxxdfwU.js → serverTotals-DeOPPRj6.js} +8 -8
  86. package/dist/{showcase-state-options-nn-CiCd1.js → showcase-state-options-BGmvUaQ_.js} +1 -1
  87. package/dist/sizing-CFDo_qh_.js +216 -0
  88. package/dist/{to-event-card-props-DwRTJ3x9.js → to-event-card-props-DLOxO2oP.js} +103 -188
  89. package/dist/{utils--rXGNV9Z.js → utils-BFaSYuNA.js} +3 -3
  90. package/dist/venue-calendar.css +1 -1
  91. package/dist/venue-calendar.es.js +1205 -1154
  92. package/dist/venue-calendar.iife.js +37 -74
  93. package/dist/venue-calendar.umd.js +51 -51
  94. package/dist/{zh-CWmj934h.js → zh-Mf1aD1Qu.js} +1 -1
  95. package/package.json +220 -220
  96. package/dist/Calendar-c-VQOPhK.js +0 -1373
  97. package/dist/CartView-hWsZGkVQ.js +0 -2292
  98. package/dist/Checkout-BwxyqHY_.js +0 -1831
  99. package/dist/EventPage-Gh0QX1Wk.js +0 -1197
  100. package/dist/Input-B0S168FA.js +0 -301
  101. package/dist/ModalFooter-T1gpnywp.js +0 -470
  102. package/dist/i18n-iYGbHTiH.js +0 -28
  103. package/dist/locales/4.3.52/flow/it.js +0 -1
  104. package/dist/locales/4.3.52/main/de.js +0 -1
  105. package/dist/locales/4.3.52/main/id.js +0 -1
  106. package/dist/locales/4.3.52/main/it.js +0 -1
  107. package/dist/locales/4.3.52/main/ko.js +0 -1
  108. package/dist/locales/4.3.52/main/pt-br.js +0 -1
  109. package/dist/locales/4.3.52/main/zh.js +0 -1
  110. /package/dist/locales/{4.3.52 → 4.3.54}/flow/de.js +0 -0
  111. /package/dist/locales/{4.3.52 → 4.3.54}/flow/es.js +0 -0
  112. /package/dist/locales/{4.3.52 → 4.3.54}/flow/fr.js +0 -0
  113. /package/dist/locales/{4.3.52 → 4.3.54}/flow/id.js +0 -0
  114. /package/dist/locales/{4.3.52 → 4.3.54}/flow/ja.js +0 -0
  115. /package/dist/locales/{4.3.52 → 4.3.54}/flow/ko.js +0 -0
  116. /package/dist/locales/{4.3.52 → 4.3.54}/flow/nl.js +0 -0
  117. /package/dist/locales/{4.3.52 → 4.3.54}/flow/pl.js +0 -0
  118. /package/dist/locales/{4.3.52 → 4.3.54}/flow/pt-br.js +0 -0
  119. /package/dist/locales/{4.3.52 → 4.3.54}/flow/tr.js +0 -0
  120. /package/dist/locales/{4.3.52 → 4.3.54}/flow/zh.js +0 -0
  121. /package/dist/locales/{4.3.52 → 4.3.54}/main/es.js +0 -0
  122. /package/dist/locales/{4.3.52 → 4.3.54}/main/fr.js +0 -0
  123. /package/dist/locales/{4.3.52 → 4.3.54}/main/nl.js +0 -0
  124. /package/dist/locales/{4.3.52 → 4.3.54}/main/pl.js +0 -0
  125. /package/dist/locales/{4.3.52 → 4.3.54}/main/tr.js +0 -0
@@ -1,301 +0,0 @@
1
- import { C as e, O as t, S as n, T as r, _ as i, b as a } from "./Button-klwKgfhG.js";
2
- import { b as o } from "./scarcity-Do5MrSwn.js";
3
- import { d as s, n as c, r as l } from "./z-index-Bo0dqmiq.js";
4
- import { t as ee } from "./RequiredIndicator-CYcnRFsA.js";
5
- import "svelte/internal/disclose-version";
6
- import * as u from "svelte/internal/client";
7
- import { onDestroy as d } from "svelte";
8
- //#region node_modules/@getmicdrop/svelte-components/dist/primitives/Icons/EyeOutline.svelte
9
- var f = u.from_svg("<svg aria-hidden=\"true\" fill=\"none\" stroke-width=\"1.5\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M2.036 12.322a1.012 1.012 0 010-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178z\"></path><path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M15 12a3 3 0 11-6 0 3 3 0 016 0z\"></path></svg>");
10
- function te(e, t) {
11
- let n = u.prop(t, "size", 3, "24"), r = u.prop(t, "color", 3, "currentColor"), i = u.prop(t, "class", 3, "");
12
- var a = f();
13
- u.template_effect(() => {
14
- u.set_class(a, 0, u.clsx(i())), u.set_attribute(a, "width", n()), u.set_attribute(a, "height", n()), u.set_attribute(a, "stroke", r());
15
- }), u.append(e, a);
16
- }
17
- //#endregion
18
- //#region node_modules/@getmicdrop/svelte-components/dist/primitives/Icons/EyeSlashOutline.svelte
19
- var p = u.from_svg("<svg aria-hidden=\"true\" fill=\"none\" stroke-width=\"1.5\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M3.98 8.223A10.477 10.477 0 001.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.45 10.45 0 0112 4.5c4.756 0 8.773 3.162 10.065 7.498a10.523 10.523 0 01-4.293 5.774M6.228 6.228L3 3m3.228 3.228l3.65 3.65m7.894 7.894L21 21m-3.228-3.228l-3.65-3.65m0 0a3 3 0 10-4.243-4.243m4.242 4.242L9.88 9.88\"></path></svg>");
20
- function m(e, t) {
21
- let n = u.prop(t, "size", 3, "24"), r = u.prop(t, "color", 3, "currentColor"), i = u.prop(t, "class", 3, "");
22
- var a = p();
23
- u.template_effect(() => {
24
- u.set_class(a, 0, u.clsx(i())), u.set_attribute(a, "width", n()), u.set_attribute(a, "height", n()), u.set_attribute(a, "stroke", r());
25
- }), u.append(e, a);
26
- }
27
- //#endregion
28
- //#region node_modules/@getmicdrop/svelte-components/dist/primitives/Icons/CloseCircleOutline.svelte
29
- var h = u.from_svg("<svg aria-hidden=\"true\" fill=\"none\" stroke-width=\"1.5\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9.75 9.75l4.5 4.5m0-4.5l-4.5 4.5M21 12a9 9 0 11-18 0 9 9 0 0118 0z\"></path></svg>");
30
- function ne(e, t) {
31
- let n = u.prop(t, "size", 3, "24"), r = u.prop(t, "color", 3, "currentColor"), i = u.prop(t, "class", 3, "");
32
- var a = h();
33
- u.template_effect(() => {
34
- u.set_class(a, 0, u.clsx(i())), u.set_attribute(a, "width", n()), u.set_attribute(a, "height", n()), u.set_attribute(a, "stroke", r());
35
- }), u.append(e, a);
36
- }
37
- //#endregion
38
- //#region node_modules/@getmicdrop/svelte-components/dist/primitives/Icons/ExclamationCircleOutline.svelte
39
- var re = u.from_svg("<svg aria-hidden=\"true\" fill=\"none\" stroke-width=\"1.5\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M12 9v3.75m9-.75a9 9 0 11-18 0 9 9 0 0118 0zm-9 3.75h.008v.008H12v-.008z\"></path></svg>");
40
- function ie(e, t) {
41
- let n = u.prop(t, "size", 3, "24"), r = u.prop(t, "color", 3, "currentColor"), i = u.prop(t, "class", 3, "");
42
- var a = re();
43
- u.template_effect(() => {
44
- u.set_class(a, 0, u.clsx(i())), u.set_attribute(a, "width", n()), u.set_attribute(a, "height", n()), u.set_attribute(a, "stroke", r());
45
- }), u.append(e, a);
46
- }
47
- //#endregion
48
- //#region node_modules/@getmicdrop/svelte-components/dist/utils/phoneShape.js
49
- function g(e) {
50
- if (!e) return "";
51
- if (e.startsWith("+")) return e;
52
- let t = e.replace(/\D/g, "");
53
- return t.length === 10 ? `+1${t}` : t.length === 11 && t.startsWith("1") ? `+${t}` : e;
54
- }
55
- var _ = "310", ae = 7, v = 10;
56
- function oe(e) {
57
- let t = String(e ?? "").replace(/\D/g, "").slice(0, v);
58
- if (!t) return "";
59
- if (t[0] === "1") {
60
- let e = t.slice(1);
61
- return e ? e[0] === "0" || e[0] === "1" ? t : `1 ${y(e)}` : "1";
62
- }
63
- return t[0] === "0" ? t : y(t);
64
- }
65
- function y(e) {
66
- return e.startsWith(_) && e.length <= ae ? e.length === 3 ? _ : `${_}-${e.slice(3)}` : e.length <= 2 ? e : e.length === 3 ? `(${e})` : e.length <= 6 ? `(${e.slice(0, 3)}) ${e.slice(3)}` : `(${e.slice(0, 3)}) ${e.slice(3, 6)}-${e.slice(6)}`;
67
- }
68
- //#endregion
69
- //#region node_modules/@getmicdrop/svelte-components/dist/primitives/Input/Input.svelte
70
- var se = /* @__PURE__ */ new Set(/* @__PURE__ */ "$$slots.$$events.$$legacy.required.disabled.optional.icon.buttonIcon.buttonText.maxlength.minlength.type.placeholder.label.id.name.class.size.textareaSize.errorText.color.helperText.helperIcon.hintText.hintIcon.contentFloat.readonly.controlled.onButtonClick.onbuttonclick.value.autocomplete.autofocus.showPasswordToggle.animateFocus.statusText.statusType.buttonDisabled.inputmode.instantSearch.debounceMs.minSearchChars.showClearButton.onsearch.onfocus.onblur.onkeydown.oninputchange.leftIcon.rightIcon.prefix.labels.data-testid".split(".")), b = u.from_html("<span> </span>"), ce = u.from_html("<div class=\"flex justify-start items-center gap-1\"><label> <!></label> <!> <!></div>"), le = u.from_html("<textarea rows=\"4\"></textarea>"), ue = u.from_html("<div><input/> <button type=\"button\" class=\"flex items-center justify-center px-3 tone-muted focus:outline-none\" tabindex=\"-1\"><!></button></div>"), de = u.from_html("<div class=\"absolute left-3 inset-y-0 flex items-center tone-muted z-sticky pointer-events-none\"><!></div>"), fe = u.from_html("<div class=\"absolute right-3 inset-y-0 flex items-center tone-muted z-sticky pointer-events-none\"><!></div>"), pe = u.from_html("<button type=\"button\" class=\"absolute right-2 top-1/2 -translate-y-1/2 flex items-center justify-center p-1 tone-muted\" tabindex=\"-1\"><!></button>"), me = u.from_html("<img class=\"w-5 h-5\"/>"), he = u.from_html("<span class=\"type-label\"> </span>"), ge = u.from_html("<button type=\"button\"><!> <!></button>"), _e = u.from_html("<img class=\"absolute inset-y-0 right-0 w-5 h-5 mr-3 top-1/2 transform -translate-y-1/2\"/>"), ve = u.from_html("<div class=\"relative flex items-center w-full\"><!> <!> <input/> <!> <!></div>"), ye = u.from_html("<div class=\"flex items-start gap-1.5 mt-2\" role=\"alert\" aria-live=\"assertive\"><!> <p> </p></div>"), be = u.from_html("<img class=\"w-4 h-4 mr-2\"/>"), xe = u.from_html("<div><!> <span> </span></div>"), Se = u.from_html("<div><!> <div class=\"relative w-full\"><!> <!></div></div>");
71
- function x(f, p) {
72
- let h = u.props_id();
73
- u.push(p, !0);
74
- let re = {
75
- hidePassword: "Hide password",
76
- showPassword: "Show password",
77
- clearInput: "Clear input",
78
- buttonIconAlt: "Button Icon",
79
- inputIconAlt: "Input icon",
80
- helperIconAlt: "Helper icon",
81
- optional: "(optional)"
82
- }, g = u.prop(p, "required", 3, !1), _ = u.prop(p, "disabled", 3, !1), ae = u.prop(p, "optional", 3, !1), v = u.prop(p, "icon", 3, null), y = u.prop(p, "buttonIcon", 3, null), x = u.prop(p, "buttonText", 3, null), S = u.prop(p, "maxlength", 3, null), C = u.prop(p, "minlength", 3, null), w = u.prop(p, "type", 3, "text"), T = u.prop(p, "placeholder", 3, ""), E = u.prop(p, "label", 3, ""), Ce = u.prop(p, "id", 3, h), D = u.prop(p, "name", 3, ""), we = u.prop(p, "class", 3, ""), Te = u.prop(p, "size", 3, "md"), Ee = u.prop(p, "textareaSize", 3, ""), O = u.prop(p, "errorText", 3, ""), De = u.prop(p, "color", 3, "base"), k = u.prop(p, "helperText", 3, ""), Oe = u.prop(p, "helperIcon", 3, ""), A = u.prop(p, "hintText", 3, ""), ke = u.prop(p, "hintIcon", 3, ""), Ae = u.prop(p, "contentFloat", 3, "left"), j = u.prop(p, "readonly", 3, !1), je = u.prop(p, "controlled", 3, !1), Me = u.prop(p, "onButtonClick", 3, null), Ne = u.prop(p, "onbuttonclick", 3, null), M = u.prop(p, "value", 15, ""), Pe = u.prop(p, "autocomplete", 3, null), Fe = u.prop(p, "autofocus", 3, !1), N = u.prop(p, "showPasswordToggle", 3, !0), Ie = u.prop(p, "animateFocus", 3, !0), P = u.prop(p, "statusText", 3, ""), F = u.prop(p, "statusType", 3, ""), Le = u.prop(p, "buttonDisabled", 3, !1), Re = u.prop(p, "inputmode", 3, null), I = u.prop(p, "instantSearch", 3, !1), ze = u.prop(p, "debounceMs", 3, 250), Be = u.prop(p, "minSearchChars", 3, 2), L = u.prop(p, "showClearButton", 3, !1), R = u.prop(p, "prefix", 3, ""), Ve = u.prop(p, "labels", 19, () => ({})), He = u.rest_props(p, se), z = u.derived(() => Ce() || h);
83
- Me() && !Ne() && r("Input: prop \"onButtonClick\" is deprecated. Use \"onbuttonclick\" instead.");
84
- let Ue = u.derived(() => Ne() ?? Me()), B = u.derived(() => t(re, Ve())), V = u.state(""), H = u.state(null), U, We = u.derived(() => Re() || Ke(w())), Ge = u.derived(() => Pe() ?? null);
85
- function Ke(e) {
86
- switch (e) {
87
- case "phoneNumber":
88
- case "creditCardNumber": return "tel";
89
- case "email": return "email";
90
- default: return null;
91
- }
92
- }
93
- u.user_effect(() => {
94
- M() !== u.get(V) && u.set(V, M(), !0);
95
- });
96
- function qe() {
97
- u.get(H) && u.get(H).value !== u.get(V) && (u.set(V, u.get(H).value, !0), M(u.get(V)));
98
- }
99
- let W = u.state(!1), G = u.derived(() => De() === "red" || !!O()), K = u.derived(() => `${u.get(z)}-error`), Je = u.derived(() => `${u.get(z)}-prefix`), Ye = u.derived(() => [R() ? u.get(Je) : "", O() ? u.get(K) : ""].filter(Boolean).join(" ") || void 0), Xe = u.derived(() => N() && u.get(W) ? "text" : w()), q = u.derived(() => Ie() && !_() && !j()), Ze = u.derived(() => i[Te()] || i.md), Qe = () => {
100
- u.set(W, !u.get(W));
101
- }, J = (e) => {
102
- let t = e.target, n = t.value;
103
- if (w() === "creditCardNumber") {
104
- let e = n.replaceAll(/\D/g, "");
105
- n = o(e), t.value = n;
106
- }
107
- if (w() === "phoneNumber" && (n = oe(n.replaceAll(/\D/g, "").slice(0, 10)), t.value = n), w() === "username") {
108
- let e = n.trim(), r = e.match(/(?:https?:\/\/)?(?:www\.)?(?:instagram\.com|twitter\.com|x\.com|facebook\.com|fb\.com|tiktok\.com|linkedin\.com)\/(?:@)?([A-Za-z0-9._]+)\/?/i);
109
- r && (e = r[1]), e = e.replace(/^@+/, ""), e = e.replaceAll(/[^A-Za-z0-9._]/g, ""), n = e, t.value = n;
110
- }
111
- if (u.set(V, n, !0), M(n), p.oninputchange?.(n), I()) {
112
- if (clearTimeout(U), n.length === 0) {
113
- p.onsearch?.({ query: "" });
114
- return;
115
- }
116
- n.length >= Be() && (U = setTimeout(() => {
117
- p.onsearch?.({ query: n });
118
- }, ze()));
119
- }
120
- };
121
- function $e() {
122
- u.set(V, ""), M(""), clearTimeout(U), I() && p.onsearch?.({ query: "" }), u.get(H) && u.get(H).focus();
123
- }
124
- function et(e) {
125
- p.onkeydown?.(e), !e.defaultPrevented && I() && (e.key === "Enter" && (clearTimeout(U), p.onsearch?.({ query: String(u.get(V) ?? "") })), e.key === "Escape" && $e());
126
- }
127
- d(() => {
128
- clearTimeout(U);
129
- });
130
- let Y = () => {
131
- p.onblur?.();
132
- }, X = () => {
133
- p.onfocus?.();
134
- }, Z = () => {
135
- switch (Ae()) {
136
- case "center": return "text-center";
137
- case "right": return "text-right";
138
- default: return "text-left";
139
- }
140
- }, tt = () => {
141
- switch (Ee()) {
142
- case "sm": return "h-24";
143
- case "md": return "h-36";
144
- case "lg": return "h-44";
145
- default: return "";
146
- }
147
- }, nt = () => {
148
- typeof u.get(Ue) == "function" && u.get(Ue)(String(u.get(V) ?? ""));
149
- };
150
- var Q = Se();
151
- u.attribute_effect(Q, () => ({
152
- class: `flex flex-col gap-1 ${we() ?? ""}`,
153
- ...He
154
- }));
155
- var rt = u.child(Q), it = (t) => {
156
- var n = ce(), r = u.child(n), i = u.child(r, !0), o = u.sibling(i);
157
- ee(o, { get required() {
158
- return g();
159
- } }), u.reset(r);
160
- var s = u.sibling(r, 2), c = (e) => {
161
- var t = b(), n = u.child(t);
162
- u.reset(t), u.template_effect(() => {
163
- u.set_class(t, 1, `type-label ${F() === "success" ? "text-accent-success" : F() === "error" ? "text-accent-danger" : ""}`), u.set_text(n, `(${P() ?? ""})`);
164
- }), u.append(e, t);
165
- };
166
- u.if(s, (e) => {
167
- P() && e(c);
168
- });
169
- var l = u.sibling(s, 2), d = (t) => {
170
- var n = b(), r = u.child(n, !0);
171
- u.reset(n), u.template_effect(() => {
172
- u.set_class(n, 1, u.clsx(e.smMuted)), u.set_text(r, u.get(B).optional);
173
- }), u.append(t, n);
174
- };
175
- u.if(l, (e) => {
176
- ae() && e(d);
177
- }), u.reset(n), u.template_effect(() => {
178
- u.set_attribute(r, "for", u.get(z)), u.set_class(r, 1, `${e.caption} tone-secondary ${a.tight} sm:${a.none} ${u.get(G) ? "text-status-error-text" : ""}`), u.set_text(i, E());
179
- }), u.append(t, n);
180
- };
181
- u.if(rt, (e) => {
182
- E() && e(it);
183
- });
184
- var at = u.sibling(rt, 2), $ = u.child(at), ot = (t) => {
185
- var r = le();
186
- u.remove_textarea_child(r), r.required = !1, u.template_effect((t, i) => {
187
- u.set_attribute(r, "id", u.get(z)), u.set_attribute(r, "name", D()), u.set_attribute(r, "placeholder", T()), u.set_value(r, u.get(V)), u.set_attribute(r, "maxlength", S()), u.set_attribute(r, "minlength", C()), u.set_class(r, 1, `${e.sm ?? ""} w-full px-3 py-2 bg-bg-secondary border rounded-lg ${n.emphasis ?? ""} placeholder-muted-foreground transition-all focus:outline-none focus:ring-4 focus:ring-focus-ring resize-y ${u.get(G) ? "border-status-error-border" : "border-stroke-primary hover:border-interactive-border focus:border-interactive-border"} ${t ?? ""} ${i ?? ""} ${u.get(q) ? "focus:scale-grow" : ""}`), r.disabled = _(), r.readOnly = j(), u.set_attribute(r, "aria-required", g()), u.set_attribute(r, "aria-invalid", u.get(G)), u.set_attribute(r, "aria-describedby", O() ? u.get(K) : void 0), u.set_attribute(r, "data-testid", p["data-testid"]);
188
- }, [() => Z(), () => tt()]), u.delegated("input", r, J), u.event("blur", r, Y), u.event("focus", r, X), u.append(t, r);
189
- }, st = (t) => {
190
- var r = ue(), i = u.child(r);
191
- u.remove_input_defaults(i), i.required = !1, u.autofocus(i, Fe()), u.bind_this(i, (e) => u.set(H, e), () => u.get(H));
192
- var a = u.sibling(i, 2), o = u.child(a), s = (e) => {
193
- m(e, { class: "w-5 h-5" });
194
- }, c = (e) => {
195
- te(e, { class: "w-5 h-5" });
196
- };
197
- u.if(o, (e) => {
198
- u.get(W) ? e(s) : e(c, -1);
199
- }), u.reset(a), u.reset(r), u.template_effect((t) => {
200
- u.set_class(r, 1, `flex items-center w-full bg-bg-secondary border rounded-lg transition-all outline-none focus-within:ring-4 focus-within:ring-focus-ring ${u.get(G) ? "border-status-error-border" : "border-stroke-primary hover:border-interactive-border focus-within:border-interactive-border"} ${u.get(q) ? "focus-within:scale-grow" : ""} ${_() ? "opacity-50 cursor-not-allowed" : ""}`), u.set_attribute(i, "id", u.get(z)), u.set_attribute(i, "type", u.get(Xe)), u.set_attribute(i, "name", D()), u.set_attribute(i, "placeholder", T()), u.set_value(i, u.get(V)), u.set_attribute(i, "maxlength", S()), u.set_attribute(i, "minlength", C()), u.set_class(i, 1, `password-input-inner ${e.sm ?? ""} flex-1 w-full ${u.get(Ze) ?? ""} bg-transparent border-0 ${n.emphasis ?? ""} placeholder-muted-foreground focus:outline-none focus:ring-0 ${t ?? ""}`), i.disabled = _(), i.readOnly = j(), u.set_attribute(i, "aria-required", g()), u.set_attribute(i, "aria-invalid", u.get(G)), u.set_attribute(i, "aria-describedby", O() ? u.get(K) : void 0), u.set_attribute(i, "data-testid", p["data-testid"]), u.set_attribute(i, "autocomplete", u.get(Ge)), u.set_attribute(i, "inputmode", u.get(We)), u.set_attribute(a, "aria-label", u.get(W) ? u.get(B).hidePassword : u.get(B).showPassword);
201
- }, [() => Z()]), u.delegated("input", i, J), u.delegated("change", i, qe), u.event("blur", i, Y), u.event("focus", i, X), u.delegated("click", a, Qe), u.append(t, r);
202
- }, ct = (t) => {
203
- var r = ve(), i = u.child(r), a = (t) => {
204
- var n = b(), r = u.child(n, !0);
205
- u.reset(n), u.template_effect(() => {
206
- u.set_attribute(n, "id", u.get(Je)), u.set_attribute(n, "data-testid", p["data-testid"] ? `${p["data-testid"]}-prefix` : void 0), u.set_class(n, 1, `${e.body ?? ""} shrink-0 self-stretch flex items-center px-3 bg-bg-tertiary tone-muted border border-r-0 rounded-l-lg select-none ${u.get(G) ? "border-status-error-border" : "border-stroke-primary"} ${_() ? "opacity-50" : ""}`), u.set_text(r, R());
207
- }), u.append(t, n);
208
- };
209
- u.if(i, (e) => {
210
- R() && e(a);
211
- });
212
- var o = u.sibling(i, 2), s = (e) => {
213
- var t = de(), n = u.child(t);
214
- u.snippet(n, () => p.leftIcon), u.reset(t), u.append(e, t);
215
- };
216
- u.if(o, (e) => {
217
- p.leftIcon && e(s);
218
- });
219
- var c = u.sibling(o, 2);
220
- u.remove_input_defaults(c), c.required = !1, u.autofocus(c, Fe()), u.bind_this(c, (e) => u.set(H, e), () => u.get(H));
221
- var l = u.sibling(c, 2), ee = (e) => {
222
- var t = fe(), n = u.child(t);
223
- u.snippet(n, () => p.rightIcon), u.reset(t), u.append(e, t);
224
- }, d = (e) => {
225
- var t = pe();
226
- ne(u.child(t), { class: "w-4 h-4" }), u.reset(t), u.template_effect(() => u.set_attribute(t, "aria-label", u.get(B).clearInput)), u.delegated("click", t, $e), u.append(e, t);
227
- }, f = (e) => {
228
- var t = ge(), n = u.child(t), r = (e) => {
229
- var t = me();
230
- u.template_effect(() => {
231
- u.set_attribute(t, "src", y()), u.set_attribute(t, "alt", u.get(B).buttonIconAlt);
232
- }), u.append(e, t);
233
- };
234
- u.if(n, (e) => {
235
- y() && e(r);
236
- });
237
- var i = u.sibling(n, 2), a = (e) => {
238
- var t = he(), n = u.child(t, !0);
239
- u.reset(t), u.template_effect(() => u.set_text(n, x())), u.append(e, t);
240
- };
241
- u.if(i, (e) => {
242
- x() && e(a);
243
- }), u.reset(t), u.template_effect(() => {
244
- t.disabled = Le(), u.set_class(t, 1, `absolute inset-y-0 right-0 gap-1 flex items-center justify-center px-4 text-brand-primary hover:text-brand-primary disabled:opacity-50 disabled:cursor-not-allowed ${k() || A() || O() ? "mb-7" : ""}`);
245
- }), u.delegated("click", t, nt), u.append(e, t);
246
- };
247
- u.if(l, (e) => {
248
- p.rightIcon ? e(ee) : L() && u.get(V) ? e(d, 1) : je() && (y() || x()) && e(f, 2);
249
- });
250
- var te = u.sibling(l, 2), m = (e) => {
251
- var t = _e();
252
- u.template_effect(() => {
253
- u.set_attribute(t, "src", v()), u.set_attribute(t, "alt", u.get(B).inputIconAlt);
254
- }), u.append(e, t);
255
- };
256
- u.if(te, (e) => {
257
- v() && w() !== "textarea" && !p.rightIcon && !(L() && u.get(V)) && e(m);
258
- }), u.reset(r), u.template_effect((t) => {
259
- u.set_attribute(c, "id", u.get(z)), u.set_attribute(c, "type", u.get(Xe)), u.set_attribute(c, "name", D()), u.set_attribute(c, "placeholder", T()), u.set_value(c, u.get(V)), u.set_attribute(c, "maxlength", S()), u.set_attribute(c, "minlength", C()), u.set_class(c, 1, `${e.body ?? ""} w-full ${R() ? "min-w-0 " : ""}${u.get(Ze) ?? ""} bg-bg-secondary border ${R() ? "rounded-r-lg" : "rounded-lg"} ${n.emphasis ?? ""} placeholder-muted-foreground transition-all focus:outline-none focus:ring-4 focus:ring-focus-ring ${u.get(G) ? "border-status-error-border" : "border-stroke-primary hover:border-interactive-border focus:border-interactive-border"} ${v() || p.rightIcon || L() && u.get(V) ? "pr-10" : ""} ${p.leftIcon ? "pl-10" : ""} ${t ?? ""} ${u.get(q) && !R() ? "focus:scale-grow" : ""} ${_() ? "opacity-50 cursor-not-allowed" : ""}`), c.disabled = _(), c.readOnly = j(), u.set_attribute(c, "aria-required", g()), u.set_attribute(c, "aria-invalid", u.get(G)), u.set_attribute(c, "aria-describedby", u.get(Ye)), u.set_attribute(c, "data-testid", p["data-testid"]), u.set_attribute(c, "autocomplete", u.get(Ge)), u.set_attribute(c, "inputmode", u.get(We));
260
- }, [() => Z()]), u.delegated("input", c, J), u.delegated("change", c, qe), u.event("blur", c, Y), u.event("focus", c, X), u.delegated("keydown", c, et), u.append(t, r);
261
- };
262
- u.if($, (e) => {
263
- w() === "textarea" ? e(ot) : w() === "password" && N() ? e(st, 1) : e(ct, -1);
264
- });
265
- var lt = u.sibling($, 2), ut = (t) => {
266
- var n = ye(), r = u.child(n);
267
- ie(r, { class: "w-4 h-4 shrink-0 text-accent-danger mt-0.5" });
268
- var i = u.sibling(r, 2), a = u.child(i, !0);
269
- u.reset(i), u.reset(n), u.template_effect(() => {
270
- u.set_attribute(n, "id", u.get(K)), u.set_class(i, 1, u.clsx(e.error)), u.set_text(a, O());
271
- }), u.transition(3, n, () => s, () => ({
272
- duration: c.normal,
273
- easing: l.out
274
- })), u.append(t, n);
275
- }, dt = (t) => {
276
- var n = xe(), r = u.child(n), i = (e) => {
277
- var t = be();
278
- u.template_effect(() => {
279
- u.set_attribute(t, "src", Oe() || ke()), u.set_attribute(t, "alt", u.get(B).helperIconAlt);
280
- }), u.append(e, t);
281
- };
282
- u.if(r, (e) => {
283
- (Oe() || ke()) && e(i);
284
- });
285
- var a = u.sibling(r, 2), o = u.child(a, !0);
286
- u.reset(a), u.reset(n), u.template_effect(() => {
287
- u.set_class(n, 1, `mt-2 flex items-center ${e.xsMuted} opacity-65`), u.set_text(o, k() || A());
288
- }), u.append(t, n);
289
- };
290
- u.if(lt, (e) => {
291
- O() ? e(ut) : (k() || A()) && e(dt, 1);
292
- }), u.reset(at), u.reset(Q), u.append(f, Q), u.pop();
293
- }
294
- u.delegate([
295
- "input",
296
- "change",
297
- "click",
298
- "keydown"
299
- ]);
300
- //#endregion
301
- export { ne as i, g as n, ie as r, x as t };