@nylas/react 1.1.0-canary.14 → 1.1.0-canary.15

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 (130) hide show
  1. package/dist/add-circle-icon_2.entry-00dc2c13.cjs +1 -0
  2. package/dist/add-circle-icon_2.entry-3f834b47.js +26 -0
  3. package/dist/{archive-icon_7.entry-60311199.cjs → archive-icon_7.entry-25d8b2f0.cjs} +1 -1
  4. package/dist/{archive-icon_7.entry-0dfc9782.js → archive-icon_7.entry-ca8262ff.js} +15 -15
  5. package/dist/{arrow-icon.entry-eb53c4cb.cjs → arrow-icon.entry-01192ecf.cjs} +1 -1
  6. package/dist/{arrow-icon.entry-f38f3014.js → arrow-icon.entry-991ba7cd.js} +2 -2
  7. package/dist/{bold-icon_3.entry-20e74265.js → bold-icon_3.entry-81a3ff1e.js} +10 -10
  8. package/dist/{bold-icon_3.entry-d5100ffa.cjs → bold-icon_3.entry-e94dcf5b.cjs} +1 -1
  9. package/dist/{calendar-cancel-icon.entry-e5d1bc0a.cjs → calendar-cancel-icon.entry-9088fa8b.cjs} +1 -1
  10. package/dist/{calendar-cancel-icon.entry-0bdee178.js → calendar-cancel-icon.entry-f646c147.js} +5 -5
  11. package/dist/{calendar-check-icon_2.entry-10af2017.cjs → calendar-check-icon_2.entry-4dc1391a.cjs} +1 -1
  12. package/dist/{calendar-check-icon_2.entry-f18a2ddb.js → calendar-check-icon_2.entry-a7e4d0e6.js} +7 -7
  13. package/dist/{calendar-icon.entry-12ca0ae4.js → calendar-icon.entry-1658930c.js} +2 -2
  14. package/dist/{calendar-icon.entry-bc6f0808.cjs → calendar-icon.entry-1e2acd5c.cjs} +1 -1
  15. package/dist/{add-circle-icon_22.entry-ab0d5ede.js → calendar-info-icon_25.entry-493c5547.js} +966 -704
  16. package/dist/calendar-info-icon_25.entry-7513d798.cjs +1 -0
  17. package/dist/chevron-icon_3.entry-52b97043.cjs +1 -0
  18. package/dist/chevron-icon_3.entry-b3c7eb44.js +126 -0
  19. package/dist/{clock-icon_2.entry-ffc9e057.js → clock-icon_2.entry-58f07042.js} +3 -3
  20. package/dist/{clock-icon_2.entry-7cddf901.cjs → clock-icon_2.entry-882249ee.cjs} +1 -1
  21. package/dist/close-icon.entry-4a39816a.js +15 -0
  22. package/dist/close-icon.entry-f1166251.cjs +1 -0
  23. package/dist/{constants-f34b9c6e-108993e8.cjs → constants-f34b9c6e-1da5094b.cjs} +1 -1
  24. package/dist/{constants-f34b9c6e-37cabe82.js → constants-f34b9c6e-628beaa8.js} +1 -1
  25. package/dist/{document-refresh-icon.entry-d1f6259a.cjs → document-refresh-icon.entry-4f581bf4.cjs} +1 -1
  26. package/dist/{document-refresh-icon.entry-e4636c8e.js → document-refresh-icon.entry-b53316b4.js} +2 -2
  27. package/dist/elements/index.d.ts +9 -0
  28. package/dist/{elements-dc5b338e-a37a0510.cjs → elements-dc5b338e-3284591d.cjs} +1 -1
  29. package/dist/{elements-dc5b338e-c6f2806c.js → elements-dc5b338e-7abe37c6.js} +1 -1
  30. package/dist/{focus-visible-e8093c16-b62197ad.cjs → focus-visible-e8093c16-cb6c97b1.cjs} +1 -1
  31. package/dist/{focus-visible-e8093c16-b0821d89.js → focus-visible-e8093c16-d6612604.js} +1 -1
  32. package/dist/{forward-icon_6.entry-2a694e7c.js → forward-icon_6.entry-d54244f7.js} +9 -9
  33. package/dist/{forward-icon_6.entry-b81b22f6.cjs → forward-icon_6.entry-e402ad1e.cjs} +2 -2
  34. package/dist/{globe-icon.entry-c037589b.cjs → globe-icon.entry-db7377d9.cjs} +1 -1
  35. package/dist/{globe-icon.entry-e794eb52.js → globe-icon.entry-e83c79c2.js} +4 -4
  36. package/dist/google-logo-icon_4.entry-8818686b.js +429 -0
  37. package/dist/google-logo-icon_4.entry-fa65ae29.cjs +1 -0
  38. package/dist/{index-d61429c6.js → index-2d032bec.js} +1288 -1265
  39. package/dist/index-53420959-41ed02ae.js +5 -0
  40. package/dist/index-53420959-a76f0327.cjs +1 -0
  41. package/dist/{index-ef01c714-1e2feefc.js → index-6d9eeb53-91d36348.js} +2 -2
  42. package/dist/{index-ef01c714-54e17405.cjs → index-6d9eeb53-f478270c.cjs} +1 -1
  43. package/dist/index-9c04361d.cjs +42 -0
  44. package/dist/{index.es-74f70f7d-a22eba35.cjs → index.es-9cc0eb3c-2242baf6.cjs} +1 -1
  45. package/dist/{index.es-74f70f7d-da0e7fcf.js → index.es-9cc0eb3c-ee2ebbe1.js} +1 -1
  46. package/dist/{info-icon_2.entry-23e3fa8a.cjs → info-icon_2.entry-4b257e73.cjs} +1 -1
  47. package/dist/{info-icon_2.entry-647915bb.js → info-icon_2.entry-74eb7415.js} +5 -5
  48. package/dist/input-component.entry-3ef7ce2c.cjs +1 -0
  49. package/dist/input-component.entry-6bb4a5e8.js +45 -0
  50. package/dist/input-dropdown_2.entry-a87714fc.cjs +1 -0
  51. package/dist/input-dropdown_2.entry-f71e4c01.js +209 -0
  52. package/dist/{loading-icon.entry-1ddd0244.js → loading-icon.entry-30724cb0.js} +2 -2
  53. package/dist/{loading-icon.entry-98d65a5d.cjs → loading-icon.entry-bb250f1c.cjs} +1 -1
  54. package/dist/{mailbox-store-050a2914-6fef25fb.js → mailbox-store-64b4ef7c-202f1afd.js} +2 -2
  55. package/dist/{mailbox-store-050a2914-bd0a86bb.cjs → mailbox-store-64b4ef7c-74f959be.cjs} +1 -1
  56. package/dist/{nylas-additional-participants.entry-3c598863.cjs → nylas-additional-participants.entry-567c7c2a.cjs} +1 -1
  57. package/dist/{nylas-additional-participants.entry-0f93e24e.js → nylas-additional-participants.entry-7961be04.js} +5 -5
  58. package/dist/nylas-booked-event-card_10.entry-c2f889ba.cjs +1 -0
  59. package/dist/{nylas-booked-event-card_10.entry-9f7869af.js → nylas-booked-event-card_10.entry-ddfcff5e.js} +371 -299
  60. package/dist/{nylas-custom-booking-flow.entry-877cac85.cjs → nylas-custom-booking-flow.entry-63ed387e.cjs} +1 -1
  61. package/dist/{nylas-custom-booking-flow.entry-69638c50.js → nylas-custom-booking-flow.entry-a1f66d05.js} +10 -10
  62. package/dist/{nylas-form-card.entry-4349d07d.cjs → nylas-form-card.entry-6fece0ff.cjs} +1 -1
  63. package/dist/{nylas-form-card.entry-b2da5266.js → nylas-form-card.entry-ea1153b9.js} +11 -11
  64. package/dist/{nylas-if-state.entry-62474acb.js → nylas-if-state.entry-05f8f66f.js} +3 -3
  65. package/dist/{nylas-if-state.entry-9eade180.cjs → nylas-if-state.entry-b75320f0.cjs} +1 -1
  66. package/dist/{nylas-list-folders.entry-348a784b.js → nylas-list-folders.entry-bd5a1b1d.js} +7 -7
  67. package/dist/{nylas-list-folders.entry-b32ec92a.cjs → nylas-list-folders.entry-edc61b97.cjs} +1 -1
  68. package/dist/{nylas-list-threads.entry-7e8044b2.cjs → nylas-list-threads.entry-79ad0944.cjs} +1 -1
  69. package/dist/{nylas-list-threads.entry-ec1c5fb6.js → nylas-list-threads.entry-f3cd80de.js} +3 -3
  70. package/dist/{nylas-login.entry-0495d0b5.cjs → nylas-login.entry-68873357.cjs} +1 -1
  71. package/dist/{nylas-login.entry-f6f1e306.js → nylas-login.entry-b3207e82.js} +7 -7
  72. package/dist/{nylas-mailbox-pagination.entry-24c82c53.js → nylas-mailbox-pagination.entry-22c5b9ca.js} +2 -2
  73. package/dist/{nylas-mailbox-pagination.entry-22385ead.cjs → nylas-mailbox-pagination.entry-2ef5b88a.cjs} +1 -1
  74. package/dist/{nylas-mailbox-toolbar-button.entry-b13b2a58.js → nylas-mailbox-toolbar-button.entry-95bb58b5.js} +9 -9
  75. package/dist/{nylas-mailbox-toolbar-button.entry-e8e52474.cjs → nylas-mailbox-toolbar-button.entry-f2fa3a8e.cjs} +1 -1
  76. package/dist/{nylas-mailbox.entry-77f4c37e.cjs → nylas-mailbox.entry-4b1d320f.cjs} +1 -1
  77. package/dist/{nylas-mailbox.entry-0365fbb0.js → nylas-mailbox.entry-4ef7d18d.js} +6 -6
  78. package/dist/{nylas-provider.entry-11239372.js → nylas-provider.entry-7f7e098a.js} +6 -6
  79. package/dist/{nylas-provider.entry-d454a4d1.cjs → nylas-provider.entry-b629340a.cjs} +1 -1
  80. package/dist/{nylas-scheduler-editor.entry-16473950.cjs → nylas-scheduler-editor.entry-19a29c4c.cjs} +2 -2
  81. package/dist/{nylas-scheduler-editor.entry-c4d38853.js → nylas-scheduler-editor.entry-2d19593f.js} +13 -7
  82. package/dist/nylas-scheduling.entry-70454242.cjs +1 -0
  83. package/dist/{nylas-scheduling.entry-cc2535a9.js → nylas-scheduling.entry-753cb746.js} +61 -61
  84. package/dist/{nylas-threads-refresh.entry-725ef87d.cjs → nylas-threads-refresh.entry-0a832631.cjs} +1 -1
  85. package/dist/{nylas-threads-refresh.entry-5a6378fe.js → nylas-threads-refresh.entry-5a774ad7.js} +4 -4
  86. package/dist/{nylas-threads-search.entry-5e7b6a03.js → nylas-threads-search.entry-451c6d5c.js} +9 -9
  87. package/dist/nylas-threads-search.entry-5b57688b.cjs +1 -0
  88. package/dist/{nylas-view-thread.entry-98f8e35b.cjs → nylas-view-thread.entry-7b273955.cjs} +1 -1
  89. package/dist/{nylas-view-thread.entry-249f0b65.js → nylas-view-thread.entry-e0af8998.js} +3 -3
  90. package/dist/{people-icon.entry-0ab4b752.cjs → people-icon.entry-c7fb7f6c.cjs} +1 -1
  91. package/dist/{people-icon.entry-0ed95db0.js → people-icon.entry-de3fada0.js} +6 -6
  92. package/dist/{play-icon_2.entry-433a8722.js → play-icon_2.entry-58592b64.js} +5 -5
  93. package/dist/play-icon_2.entry-5b22a7ca.cjs +1 -0
  94. package/dist/react.cjs +1 -1
  95. package/dist/react.js +98 -89
  96. package/dist/{refresh-icon.entry-508a246d.cjs → refresh-icon.entry-876b8aea.cjs} +1 -1
  97. package/dist/{refresh-icon.entry-b5bee0f4.js → refresh-icon.entry-90756bc6.js} +4 -4
  98. package/dist/{register-component-e4dc8778-7812a275.cjs → register-component-a5a9ca5d-1fbb27d2.cjs} +1 -1
  99. package/dist/{register-component-e4dc8778-53fe0729.js → register-component-a5a9ca5d-8bede801.js} +1 -1
  100. package/dist/{scheduler-config-store-ec3b6190-435c84ca.cjs → scheduler-config-store-ec3b6190-104df545.cjs} +1 -1
  101. package/dist/{scheduler-config-store-ec3b6190-01892765.js → scheduler-config-store-ec3b6190-cbc40d60.js} +1 -1
  102. package/dist/scheduler-store-f02ce045-1d93c571.js +390 -0
  103. package/dist/scheduler-store-f02ce045-712c600c.cjs +1 -0
  104. package/dist/textarea-component.entry-3ea161d6.js +35 -0
  105. package/dist/textarea-component.entry-9d6b5cdc.cjs +1 -0
  106. package/dist/toggle-switch.entry-10aa0c1a.cjs +1 -0
  107. package/dist/toggle-switch.entry-a08c1027.js +25 -0
  108. package/dist/{translate-icon.entry-f77cfd3d.cjs → translate-icon.entry-04dde6b1.cjs} +1 -1
  109. package/dist/{translate-icon.entry-c34bad94.js → translate-icon.entry-be9c3401.js} +6 -6
  110. package/dist/{warning-icon.entry-f781a623.js → warning-icon.entry-347d77af.js} +5 -5
  111. package/dist/{warning-icon.entry-f73b31bf.cjs → warning-icon.entry-84121a43.cjs} +1 -1
  112. package/package.json +3 -3
  113. package/dist/add-circle-icon_22.entry-c165f0de.cjs +0 -1
  114. package/dist/chevron-icon_3.entry-55eb864f.js +0 -117
  115. package/dist/chevron-icon_3.entry-a18c373d.cjs +0 -1
  116. package/dist/close-icon.entry-7c67181c.js +0 -15
  117. package/dist/close-icon.entry-918dd254.cjs +0 -1
  118. package/dist/google-logo-icon_4.entry-748af8c3.cjs +0 -1
  119. package/dist/google-logo-icon_4.entry-b4464873.js +0 -393
  120. package/dist/index-53420959-31867ccf.js +0 -5
  121. package/dist/index-53420959-535906ce.cjs +0 -1
  122. package/dist/index-6a4ee4f8.cjs +0 -42
  123. package/dist/nylas-booked-event-card_10.entry-912e4a89.cjs +0 -1
  124. package/dist/nylas-scheduling.entry-5b156a28.cjs +0 -1
  125. package/dist/nylas-threads-search.entry-a2553cbe.cjs +0 -1
  126. package/dist/play-icon_2.entry-f9c0b647.cjs +0 -1
  127. package/dist/scheduler-store-04e15f8a-5d06eaf3.cjs +0 -1
  128. package/dist/scheduler-store-04e15f8a-69eb8d7a.js +0 -376
  129. package/dist/time-period-selector.entry-77a6debf.cjs +0 -1
  130. package/dist/time-period-selector.entry-a29c8ffa.js +0 -76
@@ -1,37 +1,37 @@
1
- import { r as h, c as d, z as Y, d as c, h as a, H as f, g as X, A as J, C as K, l as Q, D as m, E as ee, G as C, F as te } from "./index-d61429c6.js";
2
- import { R as p } from "./register-component-e4dc8778-53fe0729.js";
3
- import { T as u, g as ae, L as F } from "./constants-f34b9c6e-37cabe82.js";
4
- import { s as w } from "./index-ef01c714-1e2feefc.js";
5
- import "./index-53420959-31867ccf.js";
1
+ import { r as m, c as d, d as c, h as a, H as h, g as ae, l as V, z as ne, A as ie, C as u, D as oe, E as S, F as se } from "./index-2d032bec.js";
2
+ import { R as y } from "./register-component-a5a9ca5d-8bede801.js";
3
+ import { T as _, g as re, L as q } from "./constants-f34b9c6e-628beaa8.js";
4
+ import { s as z } from "./index-6d9eeb53-91d36348.js";
5
+ import "./index-53420959-41ed02ae.js";
6
6
  import "react";
7
7
  import "react-dom";
8
- const ne = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}sp-theme{height:inherit;display:flex;flex-direction:column;justify-content:space-between;align-items:center;font-family:var(--nylas-font-family)}.event-card-wrapper{display:flex;align-items:center;flex-direction:column;background-color:var(--nylas-base-0);color:var(--nylas-base-900);border-radius:var(--nylas-border-radius-3x);position:relative;margin-top:1rem;margin-bottom:2rem;width:424px;box-shadow:0px 1px 4px rgba(0, 0, 0, 0.1), 0px 3px 6px rgba(0, 0, 0, 0.06)}@media screen and (max-width: 768px){.event-card-wrapper{width:100%;border-radius:0px}}.calendar-icon{display:flex;align-items:center;justify-content:center;width:3rem;height:3rem;border-radius:50%;position:absolute;top:-1.25rem;left:50%;transform:translateX(-50%);background-color:var(--nylas-base-0);border:1px solid var(--nylas-base-200);color:var(--nylas-base-700)}.booked-event-header{margin:1.5rem 4rem;overflow-wrap:anywhere;display:flex;align-items:center;flex-direction:column;font-size:1rem;font-weight:400}.booked-event-header h2{color:var(--nylas-base-600);margin-top:1.5rem;margin-bottom:0.25rem;font-size:1.125rem;font-weight:600}.booking-date-time,.booking-participants{padding:0 1rem;margin-top:1.5rem;margin-left:3rem;display:flex;flex-direction:column;justify-content:space-between;align-self:flex-start;position:relative}.booking-date-time svg,.booking-participants svg{color:var(--nylas-base-700);position:absolute;left:-10px}.booking-date-time .block,.booking-participants .block{display:block}.booking-date-time h3,.booking-participants h3{color:var(--nylas-base-600);margin:0;font-size:16px;font-weight:600;line-height:1.25rem;text-align:justify;margin-bottom:4px}.booking-date-time p,.booking-participants p{font-size:16px;margin:0;font-weight:400;text-align:justify;color:var(--nylas-base-800)}.booking-participants{margin-bottom:1.5rem}.booked-event-timezone{display:flex;color:var(--nylas-base-600);margin-bottom:1.5rem;gap:4px;margin:2rem;align-items:center;align-self:flex-end}.footer{padding:0.5rem;display:grid;grid-template-columns:1fr 1fr;gap:0.5rem;box-sizing:border-box;background-color:var(--nylas-base-25);width:100%;border-radius:0 0 var(--nylas-border-radius-2x) var(--nylas-border-radius-2x)}sp-button{background-color:var(--nylas-base-0);color:var(--nylas-base-700);border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);font-size:16px;padding:8px;font-family:var(--nylas-font-family);font-weight:600;height:48px;line-height:24px}sp-button.cancel{color:var(--nylas-error)}sp-button.cancel:hover,sp-button.cancel:focus{border-color:var(--nylas-error)}sp-button.cancel:active{color:var(--nylas-error-pressed);border-color:var(--nylas-error-pressed)}sp-button.reschedule:hover,sp-button.reschedule:focus{border-color:var(--nylas-primary)}sp-button.reschedule:active{border-color:var(--nylas-base-600)}sp-divider{background-color:var(--nylas-base-200);height:1px}calendar-check-icon{display:flex;align-items:center;justify-content:center;height:100%}', ie = ne;
9
- var se = function(e, t, i, s) {
10
- var r = arguments.length, n = r < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, i) : s, o;
8
+ const le = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}sp-theme{height:inherit;display:flex;flex-direction:column;justify-content:space-between;align-items:center;font-family:var(--nylas-font-family)}.event-card-wrapper{display:flex;align-items:center;flex-direction:column;background-color:var(--nylas-base-0);color:var(--nylas-base-900);border-radius:var(--nylas-border-radius-3x);position:relative;margin-top:1rem;margin-bottom:2rem;width:424px;box-shadow:0px 1px 4px rgba(0, 0, 0, 0.1), 0px 3px 6px rgba(0, 0, 0, 0.06)}@media screen and (max-width: 768px){.event-card-wrapper{width:100%;border-radius:0px}}.calendar-icon{display:flex;align-items:center;justify-content:center;width:3rem;height:3rem;border-radius:50%;position:absolute;top:-1.25rem;left:50%;transform:translateX(-50%);background-color:var(--nylas-base-0);border:1px solid var(--nylas-base-200);color:var(--nylas-base-700)}.booked-event-header{margin:1.5rem 4rem;overflow-wrap:anywhere;display:flex;align-items:center;flex-direction:column;font-size:1rem;font-weight:400}.booked-event-header h2{color:var(--nylas-base-600);margin-top:1.5rem;margin-bottom:0.25rem;font-size:1.125rem;font-weight:600}.booking-date-time,.booking-participants{padding:0 1rem;margin-top:1.5rem;margin-left:3rem;display:flex;flex-direction:column;justify-content:space-between;align-self:flex-start;position:relative}.booking-date-time svg,.booking-participants svg{color:var(--nylas-base-700);position:absolute;left:-10px}.booking-date-time .block,.booking-participants .block{display:block}.booking-date-time h3,.booking-participants h3{color:var(--nylas-base-600);margin:0;font-size:16px;font-weight:600;line-height:1.25rem;text-align:justify;margin-bottom:4px}.booking-date-time p,.booking-participants p{font-size:16px;margin:0;font-weight:400;text-align:justify;color:var(--nylas-base-800)}.booking-participants{margin-bottom:1.5rem}.booked-event-timezone{display:flex;color:var(--nylas-base-600);margin-bottom:1.5rem;gap:4px;margin:2rem;align-items:center;align-self:flex-end}.footer{padding:0.5rem;display:grid;grid-template-columns:1fr 1fr;gap:0.5rem;box-sizing:border-box;background-color:var(--nylas-base-25);width:100%;border-radius:0 0 var(--nylas-border-radius-2x) var(--nylas-border-radius-2x)}.footer.no-template-cols{grid-template-columns:1fr}.footer.no-footer{display:none}sp-button{background-color:var(--nylas-base-0);color:var(--nylas-base-700);border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);font-size:16px;padding:8px;font-family:var(--nylas-font-family);font-weight:600;height:48px;line-height:24px}sp-button.cancel{color:var(--nylas-error)}sp-button.cancel:hover,sp-button.cancel:focus{border-color:var(--nylas-error)}sp-button.cancel:active{color:var(--nylas-error-pressed);border-color:var(--nylas-error-pressed)}sp-button.reschedule:hover,sp-button.reschedule:focus{border-color:var(--nylas-primary)}sp-button.reschedule:active{border-color:var(--nylas-base-600)}sp-divider{background-color:var(--nylas-base-200);height:1px}calendar-check-icon{display:flex;align-items:center;justify-content:center;height:100%}', ce = le;
9
+ var de = function(e, t, n, s) {
10
+ var o = arguments.length, i = o < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, n) : s, r;
11
11
  if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
12
- n = Reflect.decorate(e, t, i, s);
12
+ i = Reflect.decorate(e, t, n, s);
13
13
  else
14
14
  for (var l = e.length - 1; l >= 0; l--)
15
- (o = e[l]) && (n = (r < 3 ? o(n) : r > 3 ? o(t, i, n) : o(t, i)) || n);
16
- return r > 3 && n && Object.defineProperty(t, i, n), n;
17
- }, _ = function(e, t) {
15
+ (r = e[l]) && (i = (o < 3 ? r(i) : o > 3 ? r(t, n, i) : r(t, n)) || i);
16
+ return o > 3 && i && Object.defineProperty(t, n, i), i;
17
+ }, B = function(e, t) {
18
18
  if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
19
19
  return Reflect.metadata(e, t);
20
20
  };
21
- const H = class {
21
+ const W = class {
22
22
  constructor(e) {
23
- h(this, e), this.cancelBookingButtonClicked = d(this, "cancelBookingButtonClicked", 7), this.rescheduleButtonClicked = d(this, "rescheduleButtonClicked", 7), this.rescheduleBookedEventError = d(this, "rescheduleBookedEventError", 7), this.cancelBookedEventValidationError = d(this, "cancelBookedEventValidationError", 7), this.handleCancelBookingButtonClicked = () => {
24
- var r;
25
- const t = /* @__PURE__ */ new Date(), i = (r = this.configSettings) == null ? void 0 : r.scheduler.min_cancellation_notice, s = Y(t, i);
26
- t.getTime() < s.getTime() ? this.cancelBookedEventValidationError.emit({
23
+ m(this, e), this.cancelBookingButtonClicked = d(this, "cancelBookingButtonClicked", 7), this.rescheduleButtonClicked = d(this, "rescheduleButtonClicked", 7), this.rescheduleBookedEventError = d(this, "rescheduleBookedEventError", 7), this.cancelBookedEventValidationError = d(this, "cancelBookedEventValidationError", 7), this.handleCancelBookingButtonClicked = () => {
24
+ var o;
25
+ const t = new Date(this.selectedTimeslot.start_time), n = (o = this.configSettings) == null ? void 0 : o.scheduler.min_cancellation_notice, s = t.getTime() - n * 60 * 1e3;
26
+ t.getTime() < s ? this.cancelBookedEventValidationError.emit({
27
27
  error: {
28
28
  title: "Cancellation Error",
29
- message: `You cannot cancel the booking within ${i} minutes of the event.`
29
+ message: `You cannot cancel the booking within ${n} minutes of the event.`
30
30
  }
31
31
  }) : this.cancelBookingButtonClicked.emit({ bookingId: this.eventInfo.booking_id });
32
32
  }, this.handleRescheduleButtonClicked = () => {
33
- const t = (i) => {
34
- this.rescheduleBookedEventError.emit(i);
33
+ const t = (n) => {
34
+ this.rescheduleBookedEventError.emit(n);
35
35
  };
36
36
  this.rescheduleButtonClicked.emit({ bookingId: this.eventInfo.booking_id, errorHandler: t });
37
37
  }, this.getOrganizer = (t) => t == null ? void 0 : t.organizer, this.getPaticipantType = (t) => {
@@ -56,12 +56,16 @@ const H = class {
56
56
  c("[nylas-booked-event-card] Component did load"), this.eventInfo || console.warn('[nylas-booked-event-card] "eventInfo" prop missing. Please provide the event info to display the event details in the booked event card component.'), this.bookingInfo || console.warn('[nylas-booked-event-card] "bookingInfo" prop missing. Please provide the booking info to display the guest details in the booked event card component.');
57
57
  }
58
58
  render() {
59
- var e, t, i, s, r, n, o, l, b;
60
- return a(f, { key: "67dd2b25ed9f6e97043f3df7b939c5e23e465109", part: "nbec" }, a("sp-theme", { key: "52e55db58f82c3e4b11da76f4d595395512ea9d7", theme: "spectrum", color: "dark", scale: "medium" }, a("div", { key: "197889d870b6c052e6444984bff0f3fe35644bc7", class: "booked-event-timezone" }, a("globe-icon", { key: "95132cf92e263162a745ab54f8df090d7a65c53f" }), u[this.selectedTimezone]), a("div", { key: "c6a057ddcbffd3cdf2a2b898cf0e071adaa8fc8a", class: "event-card-wrapper", part: "nbec__card" }, a("div", { key: "3a2dc83f4a3f79e2cd46576037026074ffc75ca7", class: "calendar-icon" }, a("calendar-check-icon", { key: "dedeccea4e24d5cf61bd19669f819921422ee9b5" })), a("div", { key: "41cf9cd787f85d85a53add470562a146e65b2405", class: "booked-event-header" }, a("h2", { key: "7457dedb9bc4cfa1a04f8edb2e0b42dcfb71024f", slot: "card-title", part: "nbec__title" }, "Booking ", this.rescheduleBookingId ? "rescheduled" : "confirmed", "!"), a("div", { key: "03b987813744b2b625f089d4217c9bc7820d0a7c", part: "nbec__description" }, ((e = this.getOrganizer(this.eventInfo)) == null ? void 0 : e.name) || ((t = this.getOrganizer(this.eventInfo)) == null ? void 0 : t.email), " & ", ((s = (i = this.bookingInfo) == null ? void 0 : i.primaryParticipant) == null ? void 0 : s.name) || ((n = (r = this.bookingInfo) == null ? void 0 : r.primaryParticipant) == null ? void 0 : n.email))), a("sp-divider", { key: "5f12482df20b09a77df16c2b4945439b90364655" }), a("div", { key: "efa52924c2d866be7eecd216ef9be381228671b7", class: "booking-date-time" }, a("checkmark-circle-icon", { key: "a24ebafa19530d7be9e86bfe5a30bc059708b7c7" }), a("h3", { key: "835150638c5cc9328a067e60328bf1e8cb28dd1b" }, "Booking date and time"), a("p", { key: "ab0897c947c57c847836ddd6f04ce922cc216c77" }, new Date((o = this.selectedTimeslot) == null ? void 0 : o.start_time).toLocaleDateString(void 0, { dateStyle: "full" }), " ", a("br", { key: "47a610f350fefe6554af54b567bfd5b79dd08f20" }), new Date((l = this.selectedTimeslot) == null ? void 0 : l.start_time).toLocaleTimeString(void 0, { timeStyle: "short" }), " -", " ", new Date((b = this.selectedTimeslot) == null ? void 0 : b.end_time).toLocaleTimeString(void 0, { timeStyle: "short" }))), a("div", { key: "0db95adfa64e57bcc5e7c216e85c1479f0b6e4de", class: "booking-participants" }), a("sp-divider", { key: "68ee8a7fd3f4ff6c31dee82d7b8b1e4f0d75a889" }), a("div", { key: "efe3bb06d1a26c36ab75807ed7d24a3098e0015f", class: "footer" }, a("sp-button", { key: "31a69af4569c122200cc52866ceac17f49b781df", variant: "secondary", treatment: "outline", class: "cancel", onClick: this.handleCancelBookingButtonClicked, part: "nbec__button-outline nbec__cancel-cta" }, "Cancel booking"), a("sp-button", { key: "393c0f23c68e5e24c5190df328867fba4a05abc9", variant: "secondary", treatment: "outline", class: "reschedule", onClick: this.handleRescheduleButtonClicked, part: "nbec__button-outline nbec__reschedule-cta" }, "Reschedule")))));
59
+ var e, t, n, s, o, i, r, l, b, f, v, k, x, C, g, p, w, $, A, Z, G;
60
+ return a(h, { key: "25f461e554d352c8b62341f77c84d61521a40472", part: "nbec" }, a("sp-theme", { key: "fa7ae9d97b3c334d71a64076bd6c5787b48b124b", theme: "spectrum", color: "dark", scale: "medium" }, a("div", { key: "731d9d89bfc2f63b8a1095ea671f39d1a99dc4a4", class: "booked-event-timezone" }, a("globe-icon", { key: "e7a7d73d7c9461f34145ddf3e99bf5640b39ab56" }), _[this.selectedTimezone]), a("div", { key: "dbb07cac45a1528a2633119af6050a630f8df173", class: "event-card-wrapper", part: "nbec__card" }, a("div", { key: "79b6b636707f8e867358da1b4340e6f0bfeb386e", class: "calendar-icon" }, a("calendar-check-icon", { key: "a268b01ecbf64976dc61c9e3c66a67cade9d2227" })), a("div", { key: "52c4c97407582b05bfb87e1379930f7cf149c013", class: "booked-event-header" }, a("h2", { key: "ed4631c601b4920b20c27d158063dcbef92084d4", slot: "card-title", part: "nbec__title" }, "Booking ", this.rescheduleBookingId ? "rescheduled" : "confirmed", "!"), a("div", { key: "f5e93f73c4828764cb7e27cc3d5ab2b761e66fdc", part: "nbec__description" }, ((e = this.getOrganizer(this.eventInfo)) == null ? void 0 : e.name) || ((t = this.getOrganizer(this.eventInfo)) == null ? void 0 : t.email), " & ", ((s = (n = this.bookingInfo) == null ? void 0 : n.primaryParticipant) == null ? void 0 : s.name) || ((i = (o = this.bookingInfo) == null ? void 0 : o.primaryParticipant) == null ? void 0 : i.email))), a("sp-divider", { key: "d9f14eeb24c4935f131edebb3102ffd69d2bde43" }), a("div", { key: "57f6f7877162eb8de8898d6523dac452b3c841e9", class: "booking-date-time" }, a("checkmark-circle-icon", { key: "5bd672ae7c70b0102d6a14e2761b8ecc222ce488" }), a("h3", { key: "5e8ca582a26a51f790ca111648381a10f8ef917c" }, "Booking date and time"), a("p", { key: "0b98f73c94add678003f63cd1e59352f7acd29b3" }, new Date((r = this.selectedTimeslot) == null ? void 0 : r.start_time).toLocaleDateString(void 0, { dateStyle: "full" }), " ", a("br", { key: "cc2a50917760651ca2e015fa22f264740b545a58" }), new Date((l = this.selectedTimeslot) == null ? void 0 : l.start_time).toLocaleTimeString(void 0, { timeStyle: "short" }), " -", " ", new Date((b = this.selectedTimeslot) == null ? void 0 : b.end_time).toLocaleTimeString(void 0, { timeStyle: "short" }))), a("div", { key: "5ccf1dbc6002c9eaf60b3bd9211e590ab9135d68", class: "booking-participants" }), a("sp-divider", { key: "7ff9b9f4fa4bfc19da47d358ddda325b13b1a465" }), a("div", { key: "2c3d69854b255864cca3782a9ad87175a18d8cf9", class: {
61
+ footer: !0,
62
+ "no-footer": ((v = (f = this.configSettings) == null ? void 0 : f.scheduler) == null ? void 0 : v.hide_cancellation_options) && ((x = (k = this.configSettings) == null ? void 0 : k.scheduler) == null ? void 0 : x.hide_rescheduling_options),
63
+ "no-template-cols": ((g = (C = this.configSettings) == null ? void 0 : C.scheduler) == null ? void 0 : g.hide_cancellation_options) || ((w = (p = this.configSettings) == null ? void 0 : p.scheduler) == null ? void 0 : w.hide_rescheduling_options)
64
+ } }, !((A = ($ = this.configSettings) == null ? void 0 : $.scheduler) != null && A.hide_cancellation_options) && a("sp-button", { variant: "secondary", treatment: "outline", class: "cancel", onClick: this.handleCancelBookingButtonClicked, part: "nbec__button-outline nbec__cancel-cta" }, "Cancel booking"), !((G = (Z = this.configSettings) == null ? void 0 : Z.scheduler) != null && G.hide_rescheduling_options) && a("sp-button", { variant: "secondary", treatment: "outline", class: "reschedule", onClick: this.handleRescheduleButtonClicked, part: "nbec__button-outline nbec__reschedule-cta" }, "Reschedule")))));
61
65
  }
62
66
  };
63
- se([
64
- p({
67
+ de([
68
+ y({
65
69
  name: "nylas-booked-event-card",
66
70
  stateToProps: /* @__PURE__ */ new Map([
67
71
  ["scheduler.bookingInfo", "bookingInfo"],
@@ -75,144 +79,188 @@ se([
75
79
  t.scheduler.setCancel(e.detail.bookingId);
76
80
  },
77
81
  rescheduleButtonClicked: async (e, t) => {
78
- const i = await t.scheduler.setReschedule(e.detail.bookingId), { errorHandler: s } = e.detail;
79
- s && (!i || "error" in i) && s(i);
82
+ const n = await t.scheduler.setReschedule(e.detail.bookingId), { errorHandler: s } = e.detail;
83
+ s && (!n || "error" in n) && s(n);
80
84
  }
81
85
  },
82
86
  fireRegisterEvent: !0
83
87
  }),
84
- _("design:type", Function),
85
- _("design:paramtypes", []),
86
- _("design:returntype", void 0)
87
- ], H.prototype, "render", null);
88
- H.style = ie;
89
- const oe = ':host{display:block;height:100%;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.nylas-booking-form{width:100%;padding:1.5rem;box-sizing:border-box;height:450px;overflow-y:auto;height:100%}form{height:100%;display:flex;flex-direction:column;justify-content:space-between;align-items:center}sp-textfield{--spectrum-corner-radius-100:var(--nylas-border-radius-2x);--spectrum-textfield-border-color:var(--nylas-base-300);position:relative;width:100%;height:48px;margin-bottom:16px;color:var(--nylas-base-500)}.cta{width:100%;display:flex;flex-direction:row;align-items:flex-start;justify-content:space-between;gap:0.5rem;padding:10px;box-sizing:border-box;border-top:1px solid var(--nylas-base-200)}@media screen and (max-width: 768px){.cta{flex-direction:column-reverse}}sp-button{background-color:transparent;color:var(--nylas-base-800);border-radius:var(--nylas-border-radius-2x);--button-width:50%;font-family:var(--nylas-font-family);font-size:16px;font-weight:600;border:none;height:48px;padding:14px}@media screen and (max-width: 768px){sp-button{--button-width:100%}}sp-button:hover,sp-button:focus{background-color:var(--nylas-base-100);color:var(--nylas-primary);border-radius:var(--nylas-border-radius-2x)}sp-button:active{background-color:var(--nylas-base-200);color:var(--nylas-base-800)}sp-button.back{width:var(--button-width);background-color:transparent;color:var(--nylas-base-700);outline:1px solid var(--nylas-base-300)}sp-button.back:hover,sp-button.back:focus{outline-color:var(--nylas-primary)}sp-button.back:active{outline:2px solid var(--nylas-base-600)}sp-button.book{width:var(--button-width);background-color:var(--nylas-primary);color:var(--nylas-base-0)}sp-button.book:hover,sp-button.book:focus{background-color:var(--nylas-base-600)}sp-button.book:active{background-color:var(--nylas-base-800)}.input-wrapper{width:100%;display:flex;flex-direction:column;align-items:flex-start;gap:4px;margin-bottom:1rem}.input-wrapper input::placeholder{color:var(--nylas-base-300)}.input-wrapper label,.input-wrapper input{font-family:var(--nylas-font-family);font-size:16px}.input-wrapper .help-text{margin:0;color:var(--nylas-error)}.button-wrapper{width:100%;align-items:flex-start;height:max-content;position:relative}sp-infield-button{--spectrum-infield-button-background-color:transparent;--spectrum-infield-button-background-color-hover:transparent;--spectrum-infield-button-background-color-active:transparent;--spectrum-infield-button-border-color:transparent;--spectrum-infield-button-border-width:1px;--spectrum-infield-button-border-radius:0;color:var(--nylas-base-600);background:transparent;border:none;outline:1px solid var(--nylas-base-300);border-radius:0 var(--nylas-border-radius-2x) var(--nylas-border-radius-2x) 0;height:52px;width:52px;display:flex;position:absolute;right:0;align-items:center;justify-content:center;cursor:pointer}sp-infield-button sp-icon-cross300{color:var(--nylas-base-600)}sp-infield-button.error{border-width:2px;border-color:var(--nylas-error)}input[type=text],input[type=email]{display:flex;height:48px;padding-left:16px;align-items:center;gap:8px;align-self:stretch;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-300);background:var(--nylas-base-0);width:-webkit-fill-available;color:var(--nylas-base-900);font-size:16px;font-style:normal;font-weight:400;line-height:150%}input[type=text]:focus,input[type=email]:focus{outline-color:var(--nylas-primary)}input[type=text].error,input[type=email].error{border-radius:var(--nylas-border-radius-2x);font-weight:600;border-color:var(--nylas-error);border-width:2px}input[type=text].error::placeholder,input[type=email].error::placeholder{font-weight:400}input[type=text].guest-email,input[type=email].guest-email{color:var(--nylas-base-900);padding-right:52px}label{display:flex;color:var(--nylas-base-800, #293056);font-size:14px;font-style:normal;font-weight:400;line-height:150%}label.error{color:var(--nylas-error)}label span.required{color:var(--nylas-error);padding:0 0.25rem}', re = oe;
90
- var le = function(e, t, i, s) {
91
- var r = arguments.length, n = r < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, i) : s, o;
88
+ B("design:type", Function),
89
+ B("design:paramtypes", []),
90
+ B("design:returntype", void 0)
91
+ ], W.prototype, "render", null);
92
+ W.style = ce;
93
+ const be = ':host{display:block;height:100%;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.nylas-booking-form{width:100%;padding:1.5rem;box-sizing:border-box;height:450px;overflow-y:auto;height:100%}form{height:100%;display:flex;flex-direction:column;justify-content:space-between;align-items:center}sp-textfield{--spectrum-corner-radius-100:var(--nylas-border-radius-2x);--spectrum-textfield-border-color:var(--nylas-base-300);position:relative;width:100%;height:48px;margin-bottom:16px;color:var(--nylas-base-500)}.cta{width:100%;display:flex;flex-direction:row;align-items:flex-start;justify-content:space-between;gap:0.5rem;padding:14px;box-sizing:border-box;border-top:1px solid var(--nylas-base-200)}@media screen and (max-width: 768px){.cta{flex-direction:column-reverse}}sp-button{background-color:transparent;color:var(--nylas-base-800);border-radius:var(--nylas-border-radius-2x);--button-width:50%;font-family:var(--nylas-font-family);font-size:16px;font-weight:600;border:none;height:48px;padding:14px}@media screen and (max-width: 768px){sp-button{--button-width:100%}}sp-button:hover,sp-button:focus{background-color:var(--nylas-base-100);color:var(--nylas-primary);border-radius:var(--nylas-border-radius-2x)}sp-button:active{background-color:var(--nylas-base-200);color:var(--nylas-base-800)}sp-button.back{width:var(--button-width);background-color:transparent;color:var(--nylas-base-700);outline:1px solid var(--nylas-base-300)}sp-button.back:hover,sp-button.back:focus{outline-color:var(--nylas-primary)}sp-button.back:active{outline:2px solid var(--nylas-base-600)}sp-button.book{width:var(--button-width);background-color:var(--nylas-primary);color:var(--nylas-base-0)}sp-button.book:hover,sp-button.book:focus{background-color:var(--nylas-base-600)}sp-button.book:active{background-color:var(--nylas-base-800)}.input-wrapper{width:100%;display:flex;flex-direction:column;align-items:flex-start;gap:4px;margin-bottom:1rem}.input-wrapper input::placeholder{color:var(--nylas-base-300)}.input-wrapper label,.input-wrapper input{font-family:var(--nylas-font-family);font-size:16px}.input-wrapper .help-text{margin:0;color:var(--nylas-error)}.button-wrapper{width:100%;align-items:flex-start;height:max-content;position:relative}.button-content{display:flex;gap:4px;align-items:center}sp-infield-button{--spectrum-infield-button-background-color:transparent;--spectrum-infield-button-background-color-hover:transparent;--spectrum-infield-button-background-color-active:transparent;--spectrum-infield-button-border-color:transparent;--spectrum-infield-button-border-width:1px;--spectrum-infield-button-border-radius:0;color:var(--nylas-base-600);background:transparent;border:none;outline:1px solid var(--nylas-base-300);border-radius:0 var(--nylas-border-radius-2x) var(--nylas-border-radius-2x) 0;height:52px;width:52px;display:flex;position:absolute;right:0;align-items:center;justify-content:center;cursor:pointer}sp-infield-button sp-icon-cross300{color:var(--nylas-base-600)}sp-infield-button.error{border-width:2px;border-color:var(--nylas-error)}input[type=text],input[type=email]{display:flex;height:48px;padding-left:16px;align-items:center;gap:8px;align-self:stretch;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-300);background:var(--nylas-base-0);width:-webkit-fill-available;color:var(--nylas-base-900);font-size:16px;font-style:normal;font-weight:400;line-height:150%}input[type=text]:focus,input[type=email]:focus{outline-color:var(--nylas-primary)}input[type=text].error,input[type=email].error{border-radius:var(--nylas-border-radius-2x);font-weight:600;border-color:var(--nylas-error);border-width:2px}input[type=text].error::placeholder,input[type=email].error::placeholder{font-weight:400}input[type=text]::placeholder,input[type=email]::placeholder{color:var(--nylas-base-300)}input[type=text].guest-email,input[type=email].guest-email{color:var(--nylas-base-900);padding-right:52px}label{display:flex;color:var(--nylas-base-800, #293056);font-size:14px;font-style:normal;font-weight:400;line-height:150%}label.error{color:var(--nylas-error)}label span.required{color:var(--nylas-error);padding:0 0.25rem}button-component.remove-guest{position:absolute;height:51px;right:0}button-component.remove-guest.error button{border-color:var(--nylas-error)}button-component.remove-guest button{height:inherit;border-top-left-radius:initial;border-bottom-left-radius:initial;border:none !important;border-left:1px solid var(--nylas-base-300) !important}button-component.remove-guest button:hover,button-component.remove-guest button:focus{outline:1px solid var(--nylas-primary) !important;color:var(--nylas-primary)}.guest-email-input{position:relative;display:flex;width:100%}', fe = be;
94
+ var he = function(e, t, n, s) {
95
+ var o = arguments.length, i = o < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, n) : s, r;
92
96
  if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
93
- n = Reflect.decorate(e, t, i, s);
97
+ i = Reflect.decorate(e, t, n, s);
94
98
  else
95
99
  for (var l = e.length - 1; l >= 0; l--)
96
- (o = e[l]) && (n = (r < 3 ? o(n) : r > 3 ? o(t, i, n) : o(t, i)) || n);
97
- return r > 3 && n && Object.defineProperty(t, i, n), n;
98
- }, E = function(e, t) {
100
+ (r = e[l]) && (i = (o < 3 ? r(i) : o > 3 ? r(t, n, i) : r(t, n)) || i);
101
+ return o > 3 && i && Object.defineProperty(t, n, i), i;
102
+ }, L = function(e, t) {
99
103
  if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
100
104
  return Reflect.metadata(e, t);
101
105
  };
102
- const T = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/, $ = class {
106
+ const E = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/, U = class {
103
107
  constructor(e) {
104
- h(this, e), this.nameChanged = d(this, "nameChanged", 7), this.emailChanged = d(this, "emailChanged", 7), this.backButtonClicked = d(this, "backButtonClicked", 7), this.detailsConfirmed = d(this, "detailsConfirmed", 7), this.bookingFormError = d(this, "bookingFormError", 7), this.handleGuestChange = (t, i) => {
108
+ m(this, e), this.nameChanged = d(this, "nameChanged", 7), this.emailChanged = d(this, "emailChanged", 7), this.backButtonClicked = d(this, "backButtonClicked", 7), this.detailsConfirmed = d(this, "detailsConfirmed", 7), this.bookingFormError = d(this, "bookingFormError", 7), this.bookingFormSubmitted = d(this, "bookingFormSubmitted", 7), this.handleGuestChange = (t, n) => {
105
109
  this.resetGuestEmailError(t);
106
110
  const s = [...this.guestEmails];
107
- s[t] = w(i), this.guestEmails = [...s];
108
- }, this.handleGuestBlur = (t, i) => {
109
- if (this.resetGuestEmailError(t), i === "") {
111
+ s[t] = z(n), this.guestEmails = [...s];
112
+ }, this.handleGuestBlur = (t, n) => {
113
+ if (this.resetGuestEmailError(t), n === "") {
110
114
  this.guestEmailErrors[t] = "Email is required";
111
115
  return;
112
116
  }
113
- if (!T.test(i)) {
117
+ if (!E.test(n)) {
114
118
  this.guestEmailErrors[t] = "Enter a valid email address";
115
119
  return;
116
120
  }
117
- this.handleGuestChange(t, i);
118
- }, this.addGuestButtonClickedHandler = () => {
119
- this.guestEmails = [...this.guestEmails, ""];
120
- }, this.removeGuestButtonClickHandler = (t, i) => {
121
- t.preventDefault(), this.resetGuestEmailError(i);
121
+ this.handleGuestChange(t, n);
122
+ }, this.addGuestButtonClickedHandler = (t) => {
123
+ t.preventDefault(), this.guestEmails = [...this.guestEmails, ""];
124
+ }, this.removeGuestButtonClickHandler = (t, n) => {
125
+ t.preventDefault(), this.resetGuestEmailError(n);
122
126
  const s = [...this.guestEmails];
123
- s.splice(i, 1), this.guestEmails = [...s];
127
+ s.splice(n, 1), this.guestEmails = [...s];
124
128
  }, this.handleBackButtonClicked = () => {
125
129
  this.backButtonClicked.emit();
126
130
  }, this.bookButtonClickedHandler = async (t) => {
127
- var n, o, l, b, y, N, M;
128
- t.preventDefault(), c("nylas-booking-form", "bookButtonClickedHandler", this.bookingInfo);
129
- const i = this.name || ((o = (n = this.bookingInfo) == null ? void 0 : n.primaryParticipant) == null ? void 0 : o.name), s = this.email || ((b = (l = this.bookingInfo) == null ? void 0 : l.primaryParticipant) == null ? void 0 : b.email);
130
- if (!i || i === "") {
131
+ var l, b, f, v, k, x, C;
132
+ if (t.preventDefault(), this.bookingFormSubmitted.emit().defaultPrevented)
133
+ return;
134
+ c("nylas-booking-form", "bookButtonClickedHandler", this.bookingInfo);
135
+ const s = this.name || ((b = (l = this.bookingInfo) == null ? void 0 : l.primaryParticipant) == null ? void 0 : b.name), o = this.email || ((v = (f = this.bookingInfo) == null ? void 0 : f.primaryParticipant) == null ? void 0 : v.email);
136
+ if (!s || s === "") {
131
137
  this.isNameValid = !1, this.validationError.name = "Name is required", this.bookingFormError.emit({
132
138
  title: "Booking form error",
133
139
  description: "Name is required"
134
140
  });
135
141
  return;
136
142
  }
137
- if (!s || s === "") {
143
+ if (!o || o === "") {
138
144
  this.isEmailValid = !1, this.validationError.email = "Email is required", this.bookingFormError.emit({
139
145
  title: "Booking form error",
140
146
  description: "Email is required"
141
147
  });
142
148
  return;
143
149
  }
144
- if (!T.test(s)) {
150
+ if (!E.test(o)) {
145
151
  this.isEmailValid = !1, this.validationError.email = "Enter a valid email address", this.bookingFormError.emit({
146
152
  title: "Booking form error",
147
153
  description: "Invalid email"
148
154
  });
149
155
  return;
150
156
  }
151
- let r = [];
157
+ let i = [];
152
158
  if (this.guestEmails.length > 0) {
153
- let x = !1;
154
- if (this.guestEmails.forEach((g, O) => {
155
- g === "" ? (x = !0, this.guestEmailErrors = { ...this.guestEmailErrors, [O]: "Email is required" }) : T.test(g) || (x = !0, this.guestEmailErrors = { ...this.guestEmailErrors, [O]: "Enter a valid email address" });
156
- }), x) {
159
+ let g = !1;
160
+ if (this.guestEmails.forEach((p, w) => {
161
+ p === "" ? (g = !0, this.guestEmailErrors = { ...this.guestEmailErrors, [w]: "Email is required" }) : E.test(p) || (g = !0, this.guestEmailErrors = { ...this.guestEmailErrors, [w]: "Enter a valid email address" });
162
+ }), g) {
157
163
  this.bookingFormError.emit({
158
164
  title: "Booking form error",
159
165
  description: "Invalid guest email"
160
166
  });
161
167
  return;
162
168
  }
163
- r = this.guestEmails.map((g) => ({ name: "", email: g.trim() }));
169
+ i = this.guestEmails.map((p) => ({ name: p.trim(), email: p.trim() }));
164
170
  } else
165
- (y = this.bookingInfo) != null && y.guests && (r = (N = this.bookingInfo) == null ? void 0 : N.guests);
171
+ (k = this.bookingInfo) != null && k.guests && (i = (x = this.bookingInfo) == null ? void 0 : x.guests);
172
+ const r = ((C = this.bookingInfo) == null ? void 0 : C.additionalFields) || [];
166
173
  this.detailsConfirmed.emit({
167
174
  primaryParticipant: {
168
- name: i,
169
- email: s
175
+ name: s,
176
+ email: o
170
177
  },
171
- guests: r,
172
- additionalFields: {
173
- ...(M = this.bookingInfo) == null ? void 0 : M.additionalFields
174
- }
178
+ guests: i,
179
+ additionalFields: [...r, ...this.additionalFields]
175
180
  });
176
- }, this.isLoading = void 0, this.bookingInfo = void 0, this.eventInfo = void 0, this.name = "", this.email = "", this.guestEmails = [], this.guestEmailErrors = {}, this.isNameValid = !0, this.isEmailValid = !0, this.validationError = { name: "", email: "" };
181
+ }, this.updateAdditionalFields = (t, n, s) => {
182
+ const o = this.additionalFields.findIndex((i) => i.name === t);
183
+ o > -1 ? this.additionalFields[o].value = n : this.additionalFields.push({ name: t, value: n, type: s || "text" });
184
+ }, this.isLoading = void 0, this.bookingInfo = void 0, this.eventInfo = void 0, this.configSettings = void 0, this.name = "", this.email = "", this.guestEmails = [], this.guestEmailErrors = {}, this.isNameValid = !0, this.isEmailValid = !0, this.additionalFields = [], this.validationError = { name: "", email: "" };
177
185
  }
178
186
  connectedCallback() {
179
187
  }
180
188
  disconnectedCallback() {
181
189
  }
182
190
  componentWillLoad() {
183
- var e, t;
184
- c("nylas-booking-form", "componentWillLoad", this.bookingInfo), this.bookingInfo && (this.name = (e = this.bookingInfo.primaryParticipant) == null ? void 0 : e.name, this.email = (t = this.bookingInfo.primaryParticipant) == null ? void 0 : t.email);
191
+ var e, t, n;
192
+ c("nylas-booking-form", "componentWillLoad", this.bookingInfo), this.bookingInfo && ((e = this.bookingInfo) != null && e.primaryParticipant) && (this.name = (t = this.bookingInfo.primaryParticipant) == null ? void 0 : t.name, this.email = (n = this.bookingInfo.primaryParticipant) == null ? void 0 : n.email);
185
193
  }
186
194
  bookingInfoChangedHandler(e) {
187
195
  e && e.primaryParticipant && (this.name = e.primaryParticipant.name, this.email = e.primaryParticipant.email);
188
196
  }
189
197
  changeName(e) {
190
- this.isNameValid = !0, this.validationError.name = "", this.name = w(e), this.nameChanged.emit(e);
198
+ this.isNameValid = !0, this.validationError.name = "", this.name = z(e), this.nameChanged.emit(e);
191
199
  }
192
200
  changeEmail(e) {
193
- this.isEmailValid = !0, this.validationError.email = "", this.email = w(e), this.emailChanged.emit(e);
201
+ this.isEmailValid = !0, this.validationError.email = "", this.email = z(e), this.emailChanged.emit(e);
194
202
  }
195
203
  resetGuestEmailError(e) {
196
204
  const t = { ...this.guestEmailErrors };
197
205
  delete t[e], this.guestEmailErrors = { ...t };
198
206
  }
207
+ nylasFormInputChangedHandler(e) {
208
+ switch (e.detail.name) {
209
+ case "name":
210
+ this.changeName(e.detail.value);
211
+ break;
212
+ case "email":
213
+ this.changeEmail(e.detail.value);
214
+ break;
215
+ default:
216
+ if (e.detail.error) {
217
+ this.bookingFormError.emit({
218
+ title: "Booking form error",
219
+ description: e.detail.error
220
+ });
221
+ return;
222
+ }
223
+ this.updateAdditionalFields(e.detail.label, e.detail.value, e.detail.type);
224
+ break;
225
+ }
226
+ e.detail.name === "name" ? this.changeName(e.detail.value) : e.detail.name === "email" && this.changeEmail(e.detail.value);
227
+ }
228
+ selectOptionChangedHandler(e) {
229
+ if (e.detail.error) {
230
+ this.bookingFormError.emit({
231
+ title: "Booking form error",
232
+ description: e.detail.error
233
+ });
234
+ return;
235
+ }
236
+ this.updateAdditionalFields(e.detail.label, e.detail.value, "dropdown");
237
+ }
238
+ switchToggledHandler(e) {
239
+ this.updateAdditionalFields(e.detail.label, e.detail.checked ? "true" : "false", "checkbox");
240
+ }
241
+ checkboxToggledHandler(e) {
242
+ this.updateAdditionalFields(e.detail.label, e.detail.checked ? "true" : "false", "checkbox");
243
+ }
199
244
  render() {
200
- return a(f, { key: "bee0a966f819effdeabadaa8cc1229f5ee4c7060" }, a("form", { key: "d90b5a39e6f3ce8474f0d2f27cd1c9a3ce8aefe2", onSubmit: (e) => this.bookButtonClickedHandler(e), noValidate: !0 }, a("div", { key: "8ff0260d32955371dcb45d27838ca1d02547f146", class: "nylas-booking-form" }, a("slot", { key: "e1015293cc5196a6b3f8d8198abb965b2fff77ce", name: "custom-booking-form" }, a("div", { key: "a5d52a3f967170cfac3c4d2dedb481d1b838d1c6", class: "input-wrapper" }, a("label", { key: "a67a697fe8308055735e766ca5bfcc9d78f6e44e", htmlFor: "name", class: { "input-label": !0, error: !this.isNameValid }, part: "nbf__input-label" }, "Name ", a("span", { key: "e2b5ba9820903f7e7dbe859c17ae72b10e90d6ab", class: "required" }, "*")), a("input", { key: "4b60f641975188748f5993e289680062afea8040", id: "name", type: "text", placeholder: "Enter your name", value: this.name, class: {
201
- input: !0,
202
- error: !this.isNameValid
203
- }, maxLength: 100, part: "nbf__input-textfield", onInput: (e) => {
204
- var t;
205
- return this.changeName((t = e.target) == null ? void 0 : t.value);
206
- } }), a("p", { key: "267dc5714e20d262c83bea6537b7285c36c147f1", class: "help-text" }, this.validationError.name)), a("div", { key: "3577781aebed1a45766636e3d5e0975d0f19fbb1", class: "input-wrapper" }, a("label", { key: "a7ea061ca58e73b716398818e6f9dedc5be6ccef", htmlFor: "email", class: { "input-label": !0, error: !this.isEmailValid }, part: "nbf__input-label" }, "Email ", a("span", { key: "bc47e307dadb4871ea49f3860caea3e3399a746c", class: "required" }, "*")), a("input", { key: "be165163609b1076570229ce82e441be46ca6280", id: "email", type: "email", placeholder: "Enter your email", value: this.email, maxLength: 100, class: {
207
- input: !0,
208
- error: !this.isEmailValid
209
- }, part: "nbf__input-textfield", onInput: (e) => {
210
- var t;
211
- return this.changeEmail((t = e.target) == null ? void 0 : t.value);
212
- } }), a("p", { key: "99abcc70e33efa30b4e16283049a79148b0ec507", class: "help-text" }, this.validationError.email)))), a("div", { key: "ac458a426a8262f22868ec8fa4a9fb7326b2a7c7", class: "cta" }, a("sp-button", { key: "8306f88e73ba2c3162662a3e77153730f2a5f039", treatment: "outline", variant: "secondary", class: "back", part: "nbf__button-outline", onClick: this.handleBackButtonClicked }, a("slot", { key: "18238d444c45a2ce872cbecdbea6e2a6d12bf79c", name: "booking-form-back-label" }, "Back")), a("sp-button", { key: "837886ad7f762c978af174fcfa4e2b78a0920960", variant: "primary", class: "book", part: "nbf__button-primary", type: "submit" }, this.isLoading && a("loading-icon", { slot: "icon" }), a("slot", { key: "57a0a6ce4784a2969a0f8e89980ac146ab0a2e3a", name: "booking-form-book-label" }, "Book now")))));
245
+ var e, t, n, s, o, i;
246
+ return a(h, { key: "5a4ca2feb2f89ada6abada8dd3f6dc4909cb3500" }, a("form", { key: "1df9fb2f5a519f4e3ed189f9a11623caa86f3dee", onSubmit: (r) => this.bookButtonClickedHandler(r), noValidate: !0 }, a("div", { key: "86a4548532291a4aec3f004eeeb6edde6064248b", class: "nylas-booking-form" }, a("div", { key: "7749795a2086658ef53cbe1e6dfa073b29b8b880", class: "input-wrapper" }, a("input-component", { key: "b2fd6473fa91b144cb2a23d1db9059f7aafce20b", label: "Name", name: "name", id: "name", defaultValue: ((t = (e = this.bookingInfo) == null ? void 0 : e.primaryParticipant) == null ? void 0 : t.name) || this.name, placeholder: "Enter your name", type: "text", required: !0, part: "nbf__input-textfield" })), a("div", { key: "cf6fca8e8ced455047b555905e5b21ad7307505d", class: "input-wrapper" }, a("input-component", { key: "0a5639811623911f7ed59fa12bd45ceb76ae0373", label: "Email", name: "email", id: "email", pattern: E, defaultValue: ((s = (n = this.bookingInfo) == null ? void 0 : n.primaryParticipant) == null ? void 0 : s.email) || this.email, placeholder: "Enter your email", type: "email", required: !0, part: "nbf__input-textfield" })), ((i = (o = this.configSettings) == null ? void 0 : o.scheduler) == null ? void 0 : i.additional_guests_hidden) !== !0 && a("div", { class: "input-wrapper" }, this.guestEmails.map((r, l) => a("div", { class: "input-wrapper button-wrapper" }, a("label", { class: {
247
+ error: !!this.guestEmailErrors[l]
248
+ } }, "Guest email"), a("div", { class: "guest-email-input" }, a("input", { type: "email", id: `guest-email-${l}`, maxLength: 100, class: {
249
+ "guest-email": !0,
250
+ error: !!this.guestEmailErrors[l]
251
+ }, placeholder: "Enter guest email", value: r, "data-index": l, part: "nbf__input-textfield", onBlur: (b) => {
252
+ var f;
253
+ return this.handleGuestBlur(l, (f = b.target) == null ? void 0 : f.value);
254
+ }, onInput: (b) => {
255
+ var f;
256
+ return this.handleGuestChange(l, (f = b.target) == null ? void 0 : f.value);
257
+ } }), a("button-component", { variant: "basic", onClick: (b) => this.removeGuestButtonClickHandler(b, l), class: {
258
+ "remove-guest": !0,
259
+ error: !!this.guestEmailErrors[l]
260
+ } }, a("close-icon", null))), a("p", { class: "help-text" }, this.guestEmailErrors[l]))), a("button-component", { class: "add-guest", variant: "invisible", part: "nbf__button-ghost", onClick: (r) => this.addGuestButtonClickedHandler(r) }, a("div", { class: "button-content" }, a("add-circle-icon", { slot: "icon" }), "Add ", this.guestEmails.length > 0 ? "another " : "", "guest"))), a("slot", { key: "d803e320680a184cf9f88956312f202c353ad8ab", name: "custom-booking-form" })), a("div", { key: "133c6d4edc0cce58ad2c3b1c81f1f4db3af62867", class: "cta" }, a("sp-button", { key: "7c918d85c91574a13c5554f3e3cfea913860cb33", treatment: "outline", variant: "secondary", class: "back", part: "nbf__button-outline", onClick: this.handleBackButtonClicked }, a("slot", { key: "91e718bf54cb2a9bd6cf387da927888a73608be0", name: "booking-form-back-label" }, "Back")), a("sp-button", { key: "8ee30e206049de131bf443413e914027f9e48d3f", variant: "primary", class: "book", part: "nbf__button-primary", type: "submit" }, this.isLoading && a("loading-icon", { slot: "icon" }), a("slot", { key: "302f27c0705119d4c20d634c4d94c3569cc18c92", name: "booking-form-book-label" }, "Book now")))));
213
261
  }
214
262
  get host() {
215
- return X(this);
263
+ return ae(this);
216
264
  }
217
265
  static get watchers() {
218
266
  return {
@@ -220,13 +268,14 @@ const T = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-
220
268
  };
221
269
  }
222
270
  };
223
- le([
224
- p({
271
+ he([
272
+ y({
225
273
  name: "nylas-booking-form",
226
274
  stateToProps: /* @__PURE__ */ new Map([
227
275
  ["scheduler.isLoading", "isLoading"],
228
276
  ["scheduler.bookingInfo", "bookingInfo"],
229
- ["scheduler.eventInfo", "eventInfo"]
277
+ ["scheduler.eventInfo", "eventInfo"],
278
+ ["scheduler.configSettings", "configSettings"]
230
279
  ]),
231
280
  eventToProps: {
232
281
  backButtonClicked: async (e, t) => {
@@ -241,41 +290,46 @@ le([
241
290
  },
242
291
  fireRegisterEvent: !0
243
292
  }),
244
- E("design:type", Function),
245
- E("design:paramtypes", []),
246
- E("design:returntype", void 0)
247
- ], $.prototype, "render", null);
248
- $.style = re;
249
- const ce = ':host{display:block;width:400px;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}sp-theme{height:inherit;display:flex;flex-direction:column;justify-content:space-between;align-items:center;font-family:var(--nylas-font-family)}.nylas-cancel-booking-form{display:flex;align-items:center;flex-direction:column;background-color:var(--nylas-base-0);color:var(--nylas-base-800);border-radius:var(--nylas-border-radius-2x);padding:1.5rem;position:relative;box-shadow:0px 1px 4px rgba(0, 0, 0, 0.1), 0px 3px 6px rgba(0, 0, 0, 0.06)}.nylas-cancel-booking-form__title{font-size:18px;font-weight:600;margin-bottom:0;color:var(--nylas-base-900)}.nylas-cancel-booking-form__description{font-size:1rem;font-style:normal;font-weight:400;line-height:140%;color:var(--nylas-base-600)}.nylas-cancel-booking-form__calendar-icon{width:3rem;height:3rem;border-radius:50%;position:absolute;top:-1.25rem;left:50%;transform:translateX(-50%);background-color:var(--nylas-base-0);border:1px solid var(--nylas-base-200)}calendar-cancel-icon{display:flex;align-items:center;justify-content:center;height:100%}sp-button{background-color:var(--nylas-base-0);color:var(--nylas-base-700);border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);font-size:16px;font-weight:600;width:100%;height:48px;padding:8px;line-height:24px;font-family:var(--nylas-font-family)}sp-button.cancel{margin-top:1.25rem;background-color:var(--nylas-primary);color:var(--nylas-base-0)}sp-button.cancel:hover,sp-button.cancel:focus{background-color:var(--nylas-base-600)}sp-button.cancel:active{background-color:var(--nylas-base-800)}sp-button.back{margin-top:0.5rem}sp-button.back:hover,sp-button.back:focus{border-color:var(--nylas-primary)}sp-button.back:active{border-color:var(--nylas-base-600)}sp-field-label{margin-top:1rem;display:flex;color:var(--nylas-base-800);font-size:14px}sp-field-label.error{color:var(--nylas-error)}sp-field-label span.required{color:var(--nylas-error)}sp-textfield{--spectrum-textfield-border-color:var(--nylas-base-300);--spectrum-textfield-icon-color-invalid:var(--nylas-error);position:relative;width:100%;height:48px;margin-bottom:16px;background-color:var(--nylas-base-0);color:var(--nylas-base-500)}sp-textfield.error{--spectrum-textfield-border-color:var(--nylas-error)}sp-help-text{margin:0.25rem 0 1rem 0;color:var(--nylas-error)}', de = ce;
250
- var fe = function(e, t, i, s) {
251
- var r = arguments.length, n = r < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, i) : s, o;
293
+ L("design:type", Function),
294
+ L("design:paramtypes", []),
295
+ L("design:returntype", void 0)
296
+ ], U.prototype, "render", null);
297
+ U.style = fe;
298
+ const me = ':host{display:block;width:400px;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}sp-theme{height:inherit;display:flex;flex-direction:column;justify-content:space-between;align-items:center;font-family:var(--nylas-font-family)}.nylas-cancel-booking-form{display:flex;align-items:center;flex-direction:column;background-color:var(--nylas-base-0);color:var(--nylas-base-800);border-radius:var(--nylas-border-radius-2x);padding:1.5rem;position:relative;box-shadow:0px 1px 4px rgba(0, 0, 0, 0.1), 0px 3px 6px rgba(0, 0, 0, 0.06)}.nylas-cancel-booking-form__title{font-size:18px;font-weight:600;margin-bottom:0;color:var(--nylas-base-900)}.nylas-cancel-booking-form__description{font-size:1rem;font-style:normal;font-weight:400;line-height:140%;color:var(--nylas-base-600)}.nylas-cancel-booking-form__calendar-icon{width:3rem;height:3rem;border-radius:50%;position:absolute;top:-1.25rem;left:50%;transform:translateX(-50%);background-color:var(--nylas-base-0);border:1px solid var(--nylas-base-200)}calendar-cancel-icon{display:flex;align-items:center;justify-content:center;height:100%}sp-button{background-color:var(--nylas-base-0);color:var(--nylas-base-700);border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);font-size:16px;font-weight:600;width:100%;height:48px;padding:8px;line-height:24px;font-family:var(--nylas-font-family)}sp-button.cancel{margin-top:1.25rem;background-color:var(--nylas-primary);color:var(--nylas-base-0)}sp-button.cancel:hover,sp-button.cancel:focus{background-color:var(--nylas-base-600)}sp-button.cancel:active{background-color:var(--nylas-base-800)}sp-button.back{margin-top:0.5rem}sp-button.back:hover,sp-button.back:focus{border-color:var(--nylas-primary)}sp-button.back:active{border-color:var(--nylas-base-600)}sp-field-label{margin-top:1rem;display:flex;color:var(--nylas-base-800);font-size:14px}sp-field-label.error{color:var(--nylas-error)}sp-field-label span.required{color:var(--nylas-error)}sp-textfield{--spectrum-textfield-border-color:var(--nylas-base-300);--spectrum-textfield-icon-color-invalid:var(--nylas-error);position:relative;width:100%;height:48px;margin-bottom:16px;background-color:var(--nylas-base-0);color:var(--nylas-base-500)}sp-textfield.error{--spectrum-textfield-border-color:var(--nylas-error)}sp-help-text{margin:0.25rem 0 1rem 0;color:var(--nylas-error)}', pe = me;
299
+ var ue = function(e, t, n, s) {
300
+ var o = arguments.length, i = o < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, n) : s, r;
252
301
  if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
253
- n = Reflect.decorate(e, t, i, s);
302
+ i = Reflect.decorate(e, t, n, s);
254
303
  else
255
304
  for (var l = e.length - 1; l >= 0; l--)
256
- (o = e[l]) && (n = (r < 3 ? o(n) : r > 3 ? o(t, i, n) : o(t, i)) || n);
257
- return r > 3 && n && Object.defineProperty(t, i, n), n;
258
- }, D = function(e, t) {
305
+ (r = e[l]) && (i = (o < 3 ? r(i) : o > 3 ? r(t, n, i) : r(t, n)) || i);
306
+ return o > 3 && i && Object.defineProperty(t, n, i), i;
307
+ }, I = function(e, t) {
259
308
  if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
260
309
  return Reflect.metadata(e, t);
261
310
  };
262
- const Z = class {
311
+ const Y = class {
263
312
  constructor(e) {
264
- h(this, e), this.goBackButtonClicked = d(this, "goBackButtonClicked", 7), this.cancelBookingFormSubmitted = d(this, "cancelBookingFormSubmitted", 7), this.cancelBookedEventError = d(this, "cancelBookedEventError", 7), this.cancelBookingFormError = d(this, "cancelBookingFormError", 7), this.handleGoBackClicked = () => {
313
+ var t, n;
314
+ m(this, e), this.goBackButtonClicked = d(this, "goBackButtonClicked", 7), this.cancelBookingFormSubmitted = d(this, "cancelBookingFormSubmitted", 7), this.cancelBookedEventError = d(this, "cancelBookedEventError", 7), this.cancelBookingFormError = d(this, "cancelBookingFormError", 7), this.handleGoBackClicked = () => {
265
315
  this.goBackButtonClicked.emit();
266
- }, this.handleSubmitCancelBooking = (t) => {
267
- if (t.preventDefault(), !this.cancellationReason) {
316
+ }, this.handleSubmitCancelBooking = (s) => {
317
+ if (s.preventDefault(), !this.cancellationReason) {
268
318
  this.cancellationError = "Please provide a reason for cancellation.", this.cancelBookingFormError.emit({ title: "Cancel booking form error", description: "Please provide a reason for cancellation." });
269
319
  return;
270
320
  }
271
321
  c(`[nylas-cancel-booking-form] Cancel booking form submitted with reason: ${this.cancellationReason}`);
272
- const i = (s) => {
273
- this.cancelBookedEventError.emit(s);
322
+ const o = (i) => {
323
+ this.cancelBookedEventError.emit(i);
274
324
  };
275
- this.cancelBookingFormSubmitted.emit({ bookingId: this.cancelBookingId, reason: this.cancellationReason, errorHandler: i });
276
- }, this.handleOnChangeCancellationReason = (t) => {
277
- this.cancellationError = "", this.cancellationReason = t.target.value;
278
- }, this.cancelBookingId = void 0, this.cancellationReason = "", this.cancellationError = "";
325
+ this.cancelBookingFormSubmitted.emit({ bookingId: this.cancelBookingId, reason: this.cancellationReason, errorHandler: o });
326
+ }, this.handleOnChangeCancellationReason = (s) => {
327
+ this.cancellationError = "", this.cancellationReason = s.target.value;
328
+ }, this.cancelBookingId = void 0, this.configSettings = void 0, this.cancellationReason = "", this.cancellationError = "", this.cancellationPolicy = ((n = (t = this.configSettings) == null ? void 0 : t.scheduler) == null ? void 0 : n.cancellation_policy) || "Your current timeslot will become available to others.";
329
+ }
330
+ configSettingsChangedHandler(e) {
331
+ var t;
332
+ this.cancellationPolicy = ((t = e == null ? void 0 : e.scheduler) == null ? void 0 : t.cancellation_policy) || "Your current timeslot will become available to others.";
279
333
  }
280
334
  connectedCallback() {
281
335
  c("[nylas-cancel-booking-form] Component connected");
@@ -290,44 +344,50 @@ const Z = class {
290
344
  c("[nylas-cancel-booking-form] Component disconnected");
291
345
  }
292
346
  render() {
293
- return a(f, { key: "1adb9feda638c4d8d8a1d8393a7cf9a91b8bc670", part: "ncec" }, a("sp-theme", { key: "dda572233ab6b2816594ca6f7cd2ea2199a34394", theme: "spectrum", scale: "medium" }, a("div", { key: "2e54734b0763bc127a7b8e2acaba77cb91e6217c", class: "nylas-cancel-booking-form", part: "ncec__card" }, a("div", { key: "79300b5640e3f6e1602cbdc26c598e3aab403721", class: "nylas-cancel-booking-form__calendar-icon", part: "ncec__icon" }, a("calendar-cancel-icon", { key: "1e57e7c3d0154929da6c318215f99349696a0f42" })), a("h3", { key: "7df6fe8acbe6cfa030305555fed0307d0b3c7150", class: "nylas-cancel-booking-form__title", part: "ncec__title" }, "Cancel booking?"), a("div", { key: "80a3b525b440d81470bd9279a9e81da53db5823d", class: "nylas-cancel-booking-form__description", part: "ncec__description" }, "Your current timeslot will become available to others."), a("form", { key: "a0bd33531db46816774c1cf5802e5b0a03046436", onSubmit: this.handleSubmitCancelBooking }, a("sp-field-label", { key: "2d4896e6c61f464a5914a6c854075542aeeb637e", for: "cancel-reason", class: this.cancellationError ? "error" : "" }, "Reason for cancellation ", a("span", { key: "c867adf9311edef27d535e525faf7e776d7edb1f", class: "required" }, "*")), a("sp-textfield", { key: "96d9a97dced583946423e07f561964fd6e5a1f85", id: "cancel-reason", class: this.cancellationError ? "error" : "", part: "ncec__reason-textarea", multiline: !0, value: this.cancellationReason, onInput: this.handleOnChangeCancellationReason, onFocus: this.handleOnChangeCancellationReason, invalid: !!this.cancellationError }, a("sp-help-text", { key: "771bc7ae47ba5635d5707e5840bf4ebb13cdd60c", slot: "negative-help-text" }, this.cancellationError)), a("sp-button", { key: "07bc558de2f6464c043ff86af24da036c0848f96", variant: "primary", class: "cancel", type: "submit", part: "ncec__button-cta" }, "Cancel booking"), a("sp-button", { key: "f33976367a2e023a442b9477ad0cbc9d4e520055", variant: "secondary", class: "back", treatment: "outline", part: "ncec__button-outline", onClick: this.handleGoBackClicked }, "Go back")))));
347
+ return a(h, { key: "073a93d34ef7f08acaa827d0e5f391481572c447", part: "ncec" }, a("sp-theme", { key: "b2183d3473931a5d1dd18dfdbe32fed0128d5dc1", theme: "spectrum", scale: "medium" }, a("div", { key: "f9147a9d4041b5848bd11f06da7c96e98af3d9bd", class: "nylas-cancel-booking-form", part: "ncec__card" }, a("div", { key: "15da6ffbfe870b80bd057415469a4c94c1b3a243", class: "nylas-cancel-booking-form__calendar-icon", part: "ncec__icon" }, a("calendar-cancel-icon", { key: "f3f36d408dbbe9717ff2ca13981714c36a4ba160" })), a("h3", { key: "56cd0d658ba9a1c63cd0017514a190c42796dbf4", class: "nylas-cancel-booking-form__title", part: "ncec__title" }, "Cancel booking?"), a("div", { key: "db6672c70cc566544ec748f9c7a7426000e0c619", class: "nylas-cancel-booking-form__description", part: "ncec__description" }, this.cancellationPolicy), a("form", { key: "d227b962561915e823a151a289b135c1d9065510", onSubmit: this.handleSubmitCancelBooking }, a("sp-field-label", { key: "42eea73d2ffb041b90fbdffdc0c7e16603eee949", for: "cancel-reason", class: this.cancellationError ? "error" : "" }, "Reason for cancellation ", a("span", { key: "57978569e7bd5828b9dfaee053de9a8fae0892d5", class: "required" }, "*")), a("sp-textfield", { key: "08eb8ef56d7536053939086f5da1d5137e43b201", id: "cancel-reason", class: this.cancellationError ? "error" : "", part: "ncec__reason-textarea", multiline: !0, value: this.cancellationReason, onInput: this.handleOnChangeCancellationReason, onFocus: this.handleOnChangeCancellationReason, invalid: !!this.cancellationError }, a("sp-help-text", { key: "dd985c41efd6427e1cec09874caee5c5d345c1cb", slot: "negative-help-text" }, this.cancellationError)), a("sp-button", { key: "97705e808b56f0d373dc1fa705fd61b912ed643e", variant: "primary", class: "cancel", type: "submit", part: "ncec__button-cta" }, "Cancel booking"), a("sp-button", { key: "21ae78e3492ad79cbee485709bb863c29f4b041f", variant: "secondary", class: "back", treatment: "outline", part: "ncec__button-outline", onClick: this.handleGoBackClicked }, "Go back")))));
348
+ }
349
+ static get watchers() {
350
+ return {
351
+ configSettings: ["configSettingsChangedHandler"]
352
+ };
294
353
  }
295
354
  };
296
- fe([
297
- p({
355
+ ue([
356
+ y({
298
357
  name: "nylas-cancel-booking-form",
358
+ stateToProps: /* @__PURE__ */ new Map([["scheduler.configSettings", "configSettings"]]),
299
359
  eventToProps: {
300
360
  cancelBookingFormSubmitted: async (e, t) => {
301
- const i = await t.scheduler.cancelBooking(e.detail.bookingId, e.detail.reason), { errorHandler: s } = e.detail;
302
- s && (!i || "error" in i) && s(i);
361
+ const n = await t.scheduler.cancelBooking(e.detail.bookingId, e.detail.reason), { errorHandler: s } = e.detail;
362
+ s && (!n || "error" in n) && s(n);
303
363
  }
304
364
  },
305
365
  fireRegisterEvent: !0
306
366
  }),
307
- D("design:type", Function),
308
- D("design:paramtypes", []),
309
- D("design:returntype", void 0)
310
- ], Z.prototype, "render", null);
311
- Z.style = de;
312
- const be = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}sp-theme{height:inherit;display:flex;flex-direction:column;justify-content:space-between;align-items:center;font-family:var(--nylas-font-family)}.nylas-cancelled-event-card{display:flex;align-items:center;flex-direction:column;width:400px;background-color:var(--nylas-base-0);color:var(--nylas-base-800);border-radius:var(--nylas-border-radius-2x);padding:1.5rem;position:relative;box-shadow:0px 1px 4px rgba(0, 0, 0, 0.1), 0px 3px 6px rgba(0, 0, 0, 0.06)}@media screen and (max-width: 768px){.nylas-cancelled-event-card{width:inherit}}.nylas-cancelled-event-card__title{font-size:18px;font-weight:600;line-height:24px;color:var(--nylas-base-900);text-align:center}.nylas-cancelled-event-description{font-size:16px;font-weight:500;color:var(--nylas-base-600)}.nylas-cancelled-event-card__calendar-icon{width:3rem;height:3rem;border-radius:50%;position:absolute;top:-1.25rem;left:50%;transform:translateX(-50%);background-color:var(--nylas-base-0);border:1px solid var(--nylas-base-200)}.nylas-cancelled-event-card__cta{width:100%;display:flex;flex-direction:row;align-items:flex-start;margin-top:1rem}calendar-cancel-icon{display:flex;align-items:center;justify-content:center;height:100%}sp-button{background-color:var(--nylas-base-0);color:var(--nylas-base-700);border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);font-size:1rem;height:48px;padding:8px;line-height:24px;width:100%}sp-button:hover,sp-button:focus{border-color:var(--nylas-primary)}sp-button:active{border-color:var(--nylas-base-600)}', he = be;
313
- var me = function(e, t, i, s) {
314
- var r = arguments.length, n = r < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, i) : s, o;
367
+ I("design:type", Function),
368
+ I("design:paramtypes", []),
369
+ I("design:returntype", void 0)
370
+ ], Y.prototype, "render", null);
371
+ Y.style = pe;
372
+ const ye = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}sp-theme{height:inherit;display:flex;flex-direction:column;justify-content:space-between;align-items:center;font-family:var(--nylas-font-family)}.nylas-cancelled-event-card{display:flex;align-items:center;flex-direction:column;width:400px;background-color:var(--nylas-base-0);color:var(--nylas-base-800);border-radius:var(--nylas-border-radius-2x);padding:1.5rem;position:relative;box-shadow:0px 1px 4px rgba(0, 0, 0, 0.1), 0px 3px 6px rgba(0, 0, 0, 0.06)}@media screen and (max-width: 768px){.nylas-cancelled-event-card{width:inherit}}.nylas-cancelled-event-card__title{font-size:18px;font-weight:600;line-height:24px;color:var(--nylas-base-900);text-align:center}.nylas-cancelled-event-description{font-size:16px;font-weight:500;color:var(--nylas-base-600)}.nylas-cancelled-event-card__calendar-icon{width:3rem;height:3rem;border-radius:50%;position:absolute;top:-1.25rem;left:50%;transform:translateX(-50%);background-color:var(--nylas-base-0);border:1px solid var(--nylas-base-200)}.nylas-cancelled-event-card__cta{width:100%;display:flex;flex-direction:row;align-items:flex-start;margin-top:1rem}calendar-cancel-icon{display:flex;align-items:center;justify-content:center;height:100%}sp-button{background-color:var(--nylas-base-0);color:var(--nylas-base-700);border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);font-size:1rem;height:48px;padding:8px;line-height:24px;width:100%}sp-button:hover,sp-button:focus{border-color:var(--nylas-primary)}sp-button:active{border-color:var(--nylas-base-600)}', ge = ye;
373
+ var ve = function(e, t, n, s) {
374
+ var o = arguments.length, i = o < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, n) : s, r;
315
375
  if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
316
- n = Reflect.decorate(e, t, i, s);
376
+ i = Reflect.decorate(e, t, n, s);
317
377
  else
318
378
  for (var l = e.length - 1; l >= 0; l--)
319
- (o = e[l]) && (n = (r < 3 ? o(n) : r > 3 ? o(t, i, n) : o(t, i)) || n);
320
- return r > 3 && n && Object.defineProperty(t, i, n), n;
321
- }, z = function(e, t) {
379
+ (r = e[l]) && (i = (o < 3 ? r(i) : o > 3 ? r(t, n, i) : r(t, n)) || i);
380
+ return o > 3 && i && Object.defineProperty(t, n, i), i;
381
+ }, R = function(e, t) {
322
382
  if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
323
383
  return Reflect.metadata(e, t);
324
384
  };
325
- const A = class {
385
+ const X = class {
326
386
  constructor(e) {
327
- h(this, e), this.closeCancelEventCardClicked = d(this, "closeCancelEventCardClicked", 7), this.cancelledEventCardError = d(this, "cancelledEventCardError", 7), this.handleCloseClicked = () => {
387
+ m(this, e), this.closeCancelEventCardClicked = d(this, "closeCancelEventCardClicked", 7), this.cancelledEventCardError = d(this, "cancelledEventCardError", 7), this.handleCloseClicked = () => {
328
388
  this.isClosing = !0;
329
- const t = (i) => {
330
- this.cancelledEventCardError.emit(i), this.isClosing = !1;
389
+ const t = (n) => {
390
+ this.cancelledEventCardError.emit(n), this.isClosing = !1;
331
391
  };
332
392
  this.closeCancelEventCardClicked.emit({ errorHandler: t });
333
393
  }, this.cancelledEventInfo = void 0, this.isClosing = !1, this.configSettings = void 0;
@@ -346,91 +406,98 @@ const A = class {
346
406
  }
347
407
  render() {
348
408
  var e, t;
349
- return a(f, { key: "570e95a1df3f30fdc6bd8e2cd4c38bfa0a7a6f88", part: "ncec" }, a("sp-theme", { key: "bb6095bec7b1880219f62e80b7437efa4551a56f", theme: "spectrum", color: "dark", scale: "medium" }, a("div", { key: "928ca293a610a8a49c5426e50c66ff0e67beb039", class: "nylas-cancelled-event-card", part: "ncec__card" }, a("div", { key: "634f6af4c75cac6ae19b3992c0eb250faccfeb3b", class: "nylas-cancelled-event-card__calendar-icon", part: "ncec__icon" }, a("calendar-cancel-icon", { key: "a57e39e3ffe08fb07856a9f9b840ec41242cd183" })), a("h3", { key: "21a2122ff49af730735ee612c4a0e64076a65d94", class: "nylas-cancelled-event-card__title", part: "ncec__title" }, "Your booking has been cancelled successfully!"), a("div", { key: "517c4657f8f19466622c3992077bb245333e2452", class: "nylas-cancelled-event-card__description", part: "ncec__description" }, "A cancellation email has been sent to ", ((t = (e = this.configSettings) == null ? void 0 : e.organizer) == null ? void 0 : t.name) || "the participants", "."), a("div", { key: "8cbd77f9dc6b13c383b367ccc9576c3f1c2fc57b", class: "nylas-cancelled-event-card__cta" }, a("sp-button", { key: "b9a1d5cb47fff9eb6688ab57b6acc701a4e4f1b1", variant: "secondary", treatment: "outline", disabled: this.isClosing, part: "ncec__button-outline", onClick: this.handleCloseClicked }, this.isClosing ? "Closing..." : "Close")))));
409
+ return a(h, { key: "11c4720a791169b5d562f484fecc2e5586bbdeaf", part: "ncec" }, a("sp-theme", { key: "ccd04e6a1a895ad4be18bdb14d27a1c7403a0568", theme: "spectrum", color: "dark", scale: "medium" }, a("div", { key: "a0360afadc55f58d20e651cb33036aa364a3740e", class: "nylas-cancelled-event-card", part: "ncec__card" }, a("div", { key: "727eba1d97de774c9a51909bec714688d9e60c1c", class: "nylas-cancelled-event-card__calendar-icon", part: "ncec__icon" }, a("calendar-cancel-icon", { key: "bd96caf7b68ee65a470e5949d6622de0893c112d" })), a("h3", { key: "9bcb27d08117825255c2a5625e7b8f630e35b1e5", class: "nylas-cancelled-event-card__title", part: "ncec__title" }, "Your booking has been cancelled successfully!"), a("div", { key: "f356c2776a296b89efe9ff9b02dd0f928ea1c0c8", class: "nylas-cancelled-event-card__description", part: "ncec__description" }, "A cancellation email has been sent to ", ((t = (e = this.configSettings) == null ? void 0 : e.organizer) == null ? void 0 : t.name) || "the participants", "."), a("div", { key: "50130b11b9806a5c6adfd67f436d273fbec91774", class: "nylas-cancelled-event-card__cta" }, a("sp-button", { key: "77e8e62722ac4ace0a667b45feed6684b3bb6056", variant: "secondary", treatment: "outline", disabled: this.isClosing, part: "ncec__button-outline", onClick: this.handleCloseClicked }, this.isClosing ? "Closing..." : "Close")))));
350
410
  }
351
411
  };
352
- me([
353
- p({
412
+ ve([
413
+ y({
354
414
  name: "nylas-cancelled-event-card",
355
415
  stateToProps: /* @__PURE__ */ new Map([["scheduler.configSettings", "configSettings"]]),
356
416
  eventToProps: {
357
417
  closeCancelEventCardClicked: async (e, t) => {
358
- const i = await t.scheduler.resetCancel(), { errorHandler: s } = e.detail;
359
- s && (!i || "error" in i) && s(i);
418
+ const n = await t.scheduler.resetCancel(), { errorHandler: s } = e.detail;
419
+ s && (!n || "error" in n) && s(n);
360
420
  }
361
421
  },
362
422
  fireRegisterEvent: !0
363
423
  }),
364
- z("design:type", Function),
365
- z("design:paramtypes", []),
366
- z("design:returntype", void 0)
367
- ], A.prototype, "render", null);
368
- A.style = he;
369
- const B = /* @__PURE__ */ new Date(), L = /* @__PURE__ */ new Date();
370
- function k(e, t, i, s) {
371
- function r(n) {
372
- return e(n = arguments.length === 0 ? /* @__PURE__ */ new Date() : /* @__PURE__ */ new Date(+n)), n;
373
- }
374
- return r.floor = (n) => (e(n = /* @__PURE__ */ new Date(+n)), n), r.ceil = (n) => (e(n = new Date(n - 1)), t(n, 1), e(n), n), r.round = (n) => {
375
- const o = r(n), l = r.ceil(n);
376
- return n - o < l - n ? o : l;
377
- }, r.offset = (n, o) => (t(n = /* @__PURE__ */ new Date(+n), o == null ? 1 : Math.floor(o)), n), r.range = (n, o, l) => {
424
+ R("design:type", Function),
425
+ R("design:paramtypes", []),
426
+ R("design:returntype", void 0)
427
+ ], X.prototype, "render", null);
428
+ X.style = ge;
429
+ const P = /* @__PURE__ */ new Date(), F = /* @__PURE__ */ new Date();
430
+ function T(e, t, n, s) {
431
+ function o(i) {
432
+ return e(i = arguments.length === 0 ? /* @__PURE__ */ new Date() : /* @__PURE__ */ new Date(+i)), i;
433
+ }
434
+ return o.floor = (i) => (e(i = /* @__PURE__ */ new Date(+i)), i), o.ceil = (i) => (e(i = new Date(i - 1)), t(i, 1), e(i), i), o.round = (i) => {
435
+ const r = o(i), l = o.ceil(i);
436
+ return i - r < l - i ? r : l;
437
+ }, o.offset = (i, r) => (t(i = /* @__PURE__ */ new Date(+i), r == null ? 1 : Math.floor(r)), i), o.range = (i, r, l) => {
378
438
  const b = [];
379
- if (n = r.ceil(n), l = l == null ? 1 : Math.floor(l), !(n < o) || !(l > 0))
439
+ if (i = o.ceil(i), l = l == null ? 1 : Math.floor(l), !(i < r) || !(l > 0))
380
440
  return b;
381
- let y;
441
+ let f;
382
442
  do
383
- b.push(y = /* @__PURE__ */ new Date(+n)), t(n, l), e(n);
384
- while (y < n && n < o);
443
+ b.push(f = /* @__PURE__ */ new Date(+i)), t(i, l), e(i);
444
+ while (f < i && i < r);
385
445
  return b;
386
- }, r.filter = (n) => k((o) => {
387
- if (o >= o)
388
- for (; e(o), !n(o); )
389
- o.setTime(o - 1);
390
- }, (o, l) => {
391
- if (o >= o)
446
+ }, o.filter = (i) => T((r) => {
447
+ if (r >= r)
448
+ for (; e(r), !i(r); )
449
+ r.setTime(r - 1);
450
+ }, (r, l) => {
451
+ if (r >= r)
392
452
  if (l < 0)
393
453
  for (; ++l <= 0; )
394
- for (; t(o, -1), !n(o); )
454
+ for (; t(r, -1), !i(r); )
395
455
  ;
396
456
  else
397
457
  for (; --l >= 0; )
398
- for (; t(o, 1), !n(o); )
458
+ for (; t(r, 1), !i(r); )
399
459
  ;
400
- }), i && (r.count = (n, o) => (B.setTime(+n), L.setTime(+o), e(B), e(L), Math.floor(i(B, L))), r.every = (n) => (n = Math.floor(n), !isFinite(n) || !(n > 0) ? null : n > 1 ? r.filter(s ? (o) => s(o) % n === 0 : (o) => r.count(0, o) % n === 0) : r)), r;
460
+ }), n && (o.count = (i, r) => (P.setTime(+i), F.setTime(+r), e(P), e(F), Math.floor(n(P, F))), o.every = (i) => (i = Math.floor(i), !isFinite(i) || !(i > 0) ? null : i > 1 ? o.filter(s ? (r) => s(r) % i === 0 : (r) => o.count(0, r) % i === 0) : o)), o;
401
461
  }
402
- const pe = 1e3, V = pe * 60, ye = V * 60, v = ye * 24, S = k(
462
+ const ke = 1e3, J = ke * 60, xe = J * 60, D = xe * 24, j = T(
403
463
  (e) => e.setHours(0, 0, 0, 0),
404
464
  (e, t) => e.setDate(e.getDate() + t),
405
- (e, t) => (t - e - (t.getTimezoneOffset() - e.getTimezoneOffset()) * V) / v,
465
+ (e, t) => (t - e - (t.getTimezoneOffset() - e.getTimezoneOffset()) * J) / D,
406
466
  (e) => e.getDate() - 1
407
467
  );
408
- k((e) => {
468
+ T((e) => {
409
469
  e.setUTCHours(0, 0, 0, 0);
410
470
  }, (e, t) => {
411
471
  e.setUTCDate(e.getUTCDate() + t);
412
- }, (e, t) => (t - e) / v, (e) => e.getUTCDate() - 1);
413
- k((e) => {
472
+ }, (e, t) => (t - e) / D, (e) => e.getUTCDate() - 1);
473
+ T((e) => {
414
474
  e.setUTCHours(0, 0, 0, 0);
415
475
  }, (e, t) => {
416
476
  e.setUTCDate(e.getUTCDate() + t);
417
- }, (e, t) => (t - e) / v, (e) => Math.floor(e / v));
418
- const ue = ':host{display:block;min-height:444px;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}@media screen and (max-width: 768px){:host{min-height:auto}}.nylas-date-picker{display:flex;gap:1rem;flex-direction:column}.header{margin:0 0.5rem;height:48px}.header h2{font-size:1.3125rem;font-weight:400;line-height:1rem;color:var(--nylas-base-800)}.header h2 strong{font-weight:600}.title{margin:0 -1.25rem;display:flex;flex-direction:column;padding:0 1.5rem;gap:0.5rem;border-bottom:1px solid var(--nylas-base-200);font-family:var(--nylas-font-family)}.title h1{margin-bottom:0;font-size:18px;line-height:20px;font-weight:600;display:flex;gap:0.5rem;align-items:center}.title p{margin-top:0;font-size:16px;display:flex;gap:0.5rem;align-items:center}@keyframes pulsate{0%{background-color:var(--nylas-base-50)}50%{background-color:var(--nylas-base-100)}100%{background-color:var(--nylas-base-50)}}.dates{display:grid;justify-items:center;grid-template-columns:repeat(7, 1fr);gap:0.5rem;margin-bottom:24px}.dates .date{position:relative;display:flex;flex-direction:row;justify-content:center;align-items:center;height:48px;width:48px;min-width:2rem;min-height:2rem;cursor:pointer;border-radius:var(--nylas-border-radius-2x);font-size:16px;font-weight:600;font-family:inherit;color:var(--nylas-base-text);background-color:var(--nylas-base-100);cursor:pointer;border:none}@media screen and (max-width: 412px){.dates .date{width:38px;height:38px;min-width:none}}.dates .date:hover:not(:disabled){box-shadow:0 0 0 2px var(--nylas-base-500) inset}.dates .date.date.current-month{color:var(--nylas-base-800)}.dates .date.date.selected{background-color:var(--nylas-primary);color:var(--nylas-base-0);font-weight:700}.dates .date.date.day-skeleton{color:var(--nylas-base-300)}.dates .date:disabled{color:var(--nylas-base-300);background-color:transparent;font-weight:400;cursor:not-allowed}.dates .day{font-size:12px;color:var(--nylas-base-800);font-weight:600;letter-spacing:0.5px;height:32px;display:flex;align-items:center}@media screen and (max-width: 768px){.dates .day{font-size:14px}}.dates .date.day-skeleton{height:48px;width:48px;border-radius:var(--nylas-border-radius-2x);animation:pulsate 1.5s infinite ease-in-out;background-color:var(--nylas-base-50)}@media screen and (max-width: 412px){.dates .date.day-skeleton{width:38px;height:38px;min-width:none}}.dates .date.current-day::after{content:"";position:absolute;bottom:6px;left:50%;transform:translateX(-50%);width:6px;height:6px;border-radius:50%;background-color:var(--nylas-base-500)}.dates .date.current-day.selected::after{background-color:var(--nylas-base-100)}.pagination{display:flex;flex-direction:row;justify-content:space-between;align-items:center;min-width:92px}.pagination .chevron-right{transform:rotate(180deg)}.pagination .button{display:flex;flex-direction:row;justify-content:center;align-items:center;height:3vh;width:3vh;min-width:3em;min-height:3em;cursor:pointer;border-radius:var(--nylas-border-radius-2x);background-color:transparent;color:var(--nylas-base-800);cursor:pointer;border:none}.pagination .button:hover{background-color:var(--nylas-base-50)}.pagination .button:active{background-color:var(--nylas-base-100)}.pagination .button:disabled{background-color:transparent;color:var(--nylas-base-300);cursor:not-allowed}.flex-row{display:flex;flex-direction:row;justify-content:space-between;align-items:center;color:var(--nylas-base-500)}', ge = ue;
419
- var ve = function(e, t, i, s) {
420
- var r = arguments.length, n = r < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, i) : s, o;
477
+ }, (e, t) => (t - e) / D, (e) => Math.floor(e / D));
478
+ const Ce = ':host{display:block;min-height:444px;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}@media screen and (max-width: 768px){:host{min-height:auto}}.nylas-date-picker{display:flex;gap:1rem;flex-direction:column}.header{margin:0 0.5rem;height:48px}.header h2{font-size:1.3125rem;font-weight:400;line-height:1rem;color:var(--nylas-base-800)}.header h2 strong{font-weight:600}.title{margin:0 -1.25rem;display:flex;flex-direction:column;padding:0 1.5rem;gap:0.5rem;border-bottom:1px solid var(--nylas-base-200);font-family:var(--nylas-font-family)}.title h1{margin-bottom:0;font-size:18px;line-height:20px;font-weight:600;display:flex;gap:0.5rem;align-items:center}.title p{margin-top:0;font-size:16px;display:flex;gap:0.5rem;align-items:center}@keyframes pulsate{0%{background-color:var(--nylas-base-50)}50%{background-color:var(--nylas-base-100)}100%{background-color:var(--nylas-base-50)}}.dates{display:grid;justify-items:center;grid-template-columns:repeat(7, 1fr);gap:0.5rem;margin-bottom:24px}.dates .date{position:relative;display:flex;flex-direction:row;justify-content:center;align-items:center;height:48px;width:48px;min-width:2rem;min-height:2rem;cursor:pointer;border-radius:var(--nylas-border-radius-2x);font-size:16px;font-weight:600;font-family:inherit;color:var(--nylas-base-text);background-color:var(--nylas-base-100);cursor:pointer;border:none}@media screen and (max-width: 412px){.dates .date{width:38px;height:38px;min-width:none}}.dates .date:hover:not(:disabled){box-shadow:0 0 0 2px var(--nylas-base-500) inset}.dates .date.date.current-month{color:var(--nylas-base-800)}.dates .date.date.selected{background-color:var(--nylas-primary);color:var(--nylas-base-0);font-weight:700}.dates .date.date.day-skeleton{color:var(--nylas-base-300)}.dates .date:disabled{color:var(--nylas-base-300);background-color:transparent;font-weight:400;cursor:not-allowed}.dates .day{font-size:12px;color:var(--nylas-base-800);font-weight:600;letter-spacing:0.5px;height:32px;display:flex;align-items:center}@media screen and (max-width: 768px){.dates .day{font-size:14px}}.dates .date.day-skeleton{height:48px;width:48px;border-radius:var(--nylas-border-radius-2x);animation:pulsate 1.5s infinite ease-in-out;background-color:var(--nylas-base-50)}@media screen and (max-width: 412px){.dates .date.day-skeleton{width:38px;height:38px;min-width:none}}.dates .date.current-day::after{content:"";position:absolute;bottom:6px;left:50%;transform:translateX(-50%);width:6px;height:6px;border-radius:50%;background-color:var(--nylas-base-500)}.dates .date.current-day.selected::after{background-color:var(--nylas-base-100)}.pagination{display:flex;flex-direction:row;justify-content:space-between;align-items:center;min-width:92px}.pagination .chevron-right{transform:rotate(180deg)}.pagination .button{display:flex;flex-direction:row;justify-content:center;align-items:center;height:3vh;width:3vh;min-width:3em;min-height:3em;cursor:pointer;border-radius:var(--nylas-border-radius-2x);background-color:transparent;color:var(--nylas-base-800);cursor:pointer;border:none}.pagination .button:hover{background-color:var(--nylas-base-50)}.pagination .button:active{background-color:var(--nylas-base-100)}.pagination .button:disabled{background-color:transparent;color:var(--nylas-base-300);cursor:not-allowed}.flex-row{display:flex;flex-direction:row;justify-content:space-between;align-items:center;color:var(--nylas-base-500)}', we = Ce;
479
+ var _e = function(e, t, n, s) {
480
+ var o = arguments.length, i = o < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, n) : s, r;
421
481
  if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
422
- n = Reflect.decorate(e, t, i, s);
482
+ i = Reflect.decorate(e, t, n, s);
423
483
  else
424
484
  for (var l = e.length - 1; l >= 0; l--)
425
- (o = e[l]) && (n = (r < 3 ? o(n) : r > 3 ? o(t, i, n) : o(t, i)) || n);
426
- return r > 3 && n && Object.defineProperty(t, i, n), n;
427
- }, I = function(e, t) {
485
+ (r = e[l]) && (i = (o < 3 ? r(i) : o > 3 ? r(t, n, i) : r(t, n)) || i);
486
+ return o > 3 && i && Object.defineProperty(t, n, i), i;
487
+ }, M = function(e, t) {
428
488
  if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
429
489
  return Reflect.metadata(e, t);
430
490
  };
431
- const G = class {
491
+ const K = class {
432
492
  constructor(e) {
433
- h(this, e), this.dateSelected = d(this, "dateSelected", 7), this.monthChanged = d(this, "monthChanged", 7), this.selectableDates = void 0, this.selectedDate = void 0, this.configSettings = void 0, this.isLoading = void 0, this.eventDuration = void 0, this.month = this.selectedDate || /* @__PURE__ */ new Date(), this.dates = this.getDates(), this.disableNextMonthButton = !1;
493
+ m(this, e), this.dateSelected = d(this, "dateSelected", 7), this.monthChanged = d(this, "monthChanged", 7), this.selectableDates = void 0, this.selectedDate = void 0, this.configSettings = void 0, this.isLoading = void 0, this.eventDuration = void 0, this.month = this.selectedDate || /* @__PURE__ */ new Date(), this.dates = this.getDates(), this.disableNextMonthButton = !1;
494
+ }
495
+ configSettingsChanged(e) {
496
+ var o;
497
+ const t = new Date(this.month.getFullYear(), this.month.getMonth() + 1, 1), n = (o = e == null ? void 0 : e.scheduler) == null ? void 0 : o.available_days_in_future;
498
+ if (n === void 0)
499
+ return;
500
+ V(/* @__PURE__ */ new Date(), n).getTime() < t.getTime() ? this.disableNextMonthButton = !0 : this.disableNextMonthButton = !1;
434
501
  }
435
502
  connectedCallback() {
436
503
  }
@@ -439,43 +506,48 @@ const G = class {
439
506
  componentWillLoad() {
440
507
  }
441
508
  getDates() {
442
- const e = J(this.month), t = K(this.month);
443
- return S.range(S.offset(t, -t.getDay()), S.offset(e, 7 - e.getDay()));
509
+ const e = ne(this.month), t = ie(this.month);
510
+ return j.range(j.offset(t, -t.getDay()), j.offset(e, 7 - e.getDay()));
444
511
  }
445
512
  selectDate(e) {
446
513
  this.dateSelected.emit(e);
447
514
  }
448
515
  changeMonth(e) {
449
- var r, n;
516
+ var o, i;
450
517
  this.month = new Date(this.month.getFullYear(), this.month.getMonth() + e, 1);
451
- const t = new Date(this.month.getFullYear(), this.month.getMonth() + 1, 1), i = (n = (r = this.configSettings) == null ? void 0 : r.scheduler) == null ? void 0 : n.available_days_in_future;
452
- Q(/* @__PURE__ */ new Date(), i).getTime() < t.getTime() ? this.disableNextMonthButton = !0 : this.disableNextMonthButton = !1, this.dates = this.getDates(), this.monthChanged.emit(this.month), this.selectDate();
518
+ const t = new Date(this.month.getFullYear(), this.month.getMonth() + 1, 1), n = (i = (o = this.configSettings) == null ? void 0 : o.scheduler) == null ? void 0 : i.available_days_in_future;
519
+ V(/* @__PURE__ */ new Date(), n).getTime() < t.getTime() ? this.disableNextMonthButton = !0 : this.disableNextMonthButton = !1, this.dates = this.getDates(), this.monthChanged.emit(this.month), this.selectDate();
453
520
  }
454
- isSelected(e, t, i) {
455
- return e && t && m(e, t) && i && (i == null ? void 0 : i.length) > 0;
521
+ isSelected(e, t, n) {
522
+ return e && t && u(e, t) && n && (n == null ? void 0 : n.length) > 0;
456
523
  }
457
524
  isDisabled(e, t) {
458
- return e && (t == null ? void 0 : t.find((i) => m(i, e))) === void 0;
525
+ return e && (t == null ? void 0 : t.find((n) => u(n, e))) === void 0;
459
526
  }
460
527
  render() {
461
- var e, t, i, s, r;
462
- return a(f, { key: "a015e0a944f8f149be1c4e2f11a457e2eaa835f4", part: "ndp" }, a("div", { key: "0e9b0e42d8c194bc099b108834b0718e49fe87a1", class: "nylas-date-picker" }, a("div", { key: "48858da247f5148c48be7c0e4cb612c827c2c573", class: "title", part: "'ndp__title" }, a("h1", { key: "da2651fd1b32579b6f94134096e0bb24372fe335" }, a("person-icon", { key: "02e38c19d8aa489c060339a8cf431f7106bdee4c" }), ((t = (e = this.configSettings) == null ? void 0 : e.organizer) == null ? void 0 : t.name) || ((i = this.configSettings) == null ? void 0 : i.organizer.email)), a("p", { key: "b6beb5d95ce832acd3969dd5b8dedf55c4910455" }, a("clock-icon", { key: "b5eb3534daee467c482b4d9b696c3fedb4e1ac38" }), this.eventDuration ? ee(this.eventDuration) : "- minutes")), a("div", { key: "cd593ff88f3958671955c0a87071f3fbaa254820", class: "header flex-row" }, a("h2", { key: "8b11d5e5a2fbecb1b41fd2ad018a35d949cb2170", part: "ndp__month-header" }, a("strong", { key: "f9781cdf0f7e66ff6b40629e6316f73c195b5254" }, this.month.toLocaleDateString(void 0, { month: "long" })), " ", this.month.toLocaleDateString(void 0, { year: "numeric" })), a("div", { key: "a04be08256c1b8cd90d4bd7f51a41cb2741ad18b", class: "pagination" }, a("button", { key: "fdec6bb568e8e857f7a8dd68f00f751d6db78cf4", onClick: () => this.changeMonth(-1), class: { "chevron-left": !0, button: !0 }, disabled: !((s = this.selectableDates) != null && s.length) || this.month <= /* @__PURE__ */ new Date(), part: "ndp__month-button" }, a("chevron-icon", { key: "530a0bdb932ec987731721b26976c559eb939f1a" })), a("button", { key: "af35238a1b2fd324af994c758d4ad85ab1a479b7", onClick: () => this.changeMonth(1), class: { "chevron-right": !0, button: !0 }, disabled: !((r = this.selectableDates) != null && r.length) || this.disableNextMonthButton, part: "ndp__month-button" }, a("chevron-icon", { key: "a27412828bcb40a204c1f7cb6ecbf35af53f8257" })))), a("div", { key: "b92c36bd25605f4a0149e9a6fb81c697b2180a43", class: "dates" }, ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"].map((n) => a("div", { class: "day", part: "ndp__day" }, n)), this.dates.map((n, o) => {
463
- var b;
464
- const l = this.isDisabled(n, this.selectableDates);
528
+ var e, t, n, s;
529
+ return a(h, { key: "bc2d37f59dc4cc59c9659a15ce640d3f3c738239", part: "ndp" }, a("div", { key: "7b39c6ff3b5c820d6ee4cc3419a80f9803011deb", class: "nylas-date-picker" }, a("div", { key: "e7e08bbe189da82d187241b1025633f9ea690bbe", class: "title", part: "'ndp__title" }, a("h1", { key: "6619e950e5b31181663916bb95eb72efcda2031b" }, a("person-icon", { key: "3db3207dea880167c6f7f4058887b51620da58f9" }), ((t = (e = this.configSettings) == null ? void 0 : e.organizer) == null ? void 0 : t.name) || ((n = this.configSettings) == null ? void 0 : n.organizer.email)), a("p", { key: "8a1ec0fe12579b46279b1c95af1928740b9fffb4" }, a("clock-icon", { key: "677dc941e4bba5387a16af1f47eb52ed0daf37ab" }), this.eventDuration ? oe(this.eventDuration) : "- minutes")), a("div", { key: "55ceabd5fe27d3261d8a1c320cc9d612829c50b5", class: "header flex-row" }, a("h2", { key: "0fb27b957ac9315139b1cc6ead9504d3b35549cd", part: "ndp__month-header" }, a("strong", { key: "c916747bc9714fa1e0743674aa8845f0bb3bc8c6" }, this.month.toLocaleDateString(void 0, { month: "long" })), " ", this.month.toLocaleDateString(void 0, { year: "numeric" })), a("div", { key: "f730a61b661c581d623eca6d56f809d40c0a775b", class: "pagination" }, a("button", { key: "69555f5b4de9306dedd29bdeeb90effbda01c521", onClick: () => this.changeMonth(-1), class: { "chevron-left": !0, button: !0 }, disabled: !((s = this.selectableDates) != null && s.length) || this.month <= /* @__PURE__ */ new Date(), part: "ndp__month-button" }, a("chevron-icon", { key: "ea5c5492aa75cbb1c94af57d01c091a353b7ee2a" })), a("button", { key: "9313976fea433d8babf3ce5a63891492e93c22bc", onClick: () => this.changeMonth(1), class: { "chevron-right": !0, button: !0 }, disabled: this.disableNextMonthButton, part: "ndp__month-button" }, a("chevron-icon", { key: "81f86816719358949d8eef1e346702da314de68f" })))), a("div", { key: "32e3e0cf78205054739acc6ae3a3363b7d10c926", class: "dates" }, ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"].map((o) => a("div", { class: "day", part: "ndp__day" }, o)), this.dates.map((o, i) => {
530
+ var l;
531
+ const r = this.isDisabled(o, this.selectableDates);
465
532
  return this.isLoading ? a("button", { disabled: !0, class: {
466
533
  "date day-skeleton": !0,
467
- "current-month": C(n, this.month)
468
- }, style: { animationDelay: `${o * 20}ms` }, part: "ndp__date" }, n.getDate()) : a("button", { class: {
534
+ "current-month": S(o, this.month)
535
+ }, style: { animationDelay: `${i * 20}ms` }, part: "ndp__date" }, o.getDate()) : a("button", { class: {
469
536
  date: !0,
470
- selected: !!(this.selectedDate && m(n, this.selectedDate) && this.selectableDates && ((b = this.selectableDates) == null ? void 0 : b.length) > 0),
471
- "current-day": m(n, /* @__PURE__ */ new Date()),
472
- "current-month": C(n, this.month)
473
- }, "aria-lang": n.toLocaleDateString(void 0, { dateStyle: "full" }), disabled: l, onClick: () => this.selectDate(n), part: `ndp__date ${this.isSelected(n, this.selectedDate, this.selectableDates) ? "ndp__date--selected" : ""} ${m(n, /* @__PURE__ */ new Date()) ? "ndp__date--current-day" : ""} ${C(n, this.month) ? "ndp__date--current-month" : ""}` }, n.getDate());
537
+ selected: !!(this.selectedDate && u(o, this.selectedDate) && this.selectableDates && ((l = this.selectableDates) == null ? void 0 : l.length) > 0),
538
+ "current-day": u(o, /* @__PURE__ */ new Date()),
539
+ "current-month": S(o, this.month)
540
+ }, "aria-lang": o.toLocaleDateString(void 0, { dateStyle: "full" }), disabled: r, onClick: () => this.selectDate(o), part: `ndp__date ${this.isSelected(o, this.selectedDate, this.selectableDates) ? "ndp__date--selected" : ""} ${u(o, /* @__PURE__ */ new Date()) ? "ndp__date--current-day" : ""} ${S(o, this.month) ? "ndp__date--current-month" : ""}` }, o.getDate());
474
541
  }))));
475
542
  }
543
+ static get watchers() {
544
+ return {
545
+ configSettings: ["configSettingsChanged"]
546
+ };
547
+ }
476
548
  };
477
- ve([
478
- p({
549
+ _e([
550
+ y({
479
551
  name: "nylas-date-picker",
480
552
  stateToProps: /* @__PURE__ */ new Map([
481
553
  ["scheduler.selectableDates", "selectableDates"],
@@ -491,27 +563,27 @@ ve([
491
563
  },
492
564
  fireRegisterEvent: !0
493
565
  }),
494
- I("design:type", Function),
495
- I("design:paramtypes", []),
496
- I("design:returntype", void 0)
497
- ], G.prototype, "render", null);
498
- G.style = ge;
499
- const ke = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.nylas-locale-switch{display:flex;flex-direction:row;justify-content:space-between;align-items:center;height:68px;border-left:none;border-right:none;color:var(--nylas-base-50);font-size:14px;font-weight:600;cursor:pointer;transition:all 0.2s ease-in-out;font-family:inherit}@media screen and (max-width: 768px){.nylas-locale-switch{font-size:16px}}.select-wrapper{display:flex;align-items:center;gap:0.5rem}select{border:none;background:transparent;cursor:pointer;outline:none;background-color:transparent;margin:0 0 1px;padding:4px;vertical-align:middle}select#timezone{width:140px}select#language{width:80px}span.timezone-label{display:flex;width:-webkit-fill-available;justify-content:space-between}select-dropdown::part(sd_dropdown-content){width:100%}', xe = ke;
500
- var Ce = function(e, t, i, s) {
501
- var r = arguments.length, n = r < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, i) : s, o;
566
+ M("design:type", Function),
567
+ M("design:paramtypes", []),
568
+ M("design:returntype", void 0)
569
+ ], K.prototype, "render", null);
570
+ K.style = we;
571
+ const Ee = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.nylas-locale-switch{display:flex;flex-direction:row;justify-content:space-between;align-items:center;border-left:none;border-right:none;color:var(--nylas-base-50);font-size:14px;font-weight:600;cursor:pointer;transition:all 0.2s ease-in-out;font-family:inherit}@media screen and (max-width: 768px){.nylas-locale-switch{font-size:16px}}.select-wrapper{display:flex;align-items:center;gap:0.5rem}select{border:none;background:transparent;cursor:pointer;outline:none;background-color:transparent;margin:0 0 1px;padding:4px;vertical-align:middle}select#timezone{width:140px}select#language{width:80px}span.timezone-label{display:flex;width:-webkit-fill-available;justify-content:space-between}select-dropdown{width:auto}select-dropdown::part(sd_dropdown-button){border:none;padding:10px}select-dropdown::part(sd_dropdown-content){max-width:306px}', De = Ee;
572
+ var Te = function(e, t, n, s) {
573
+ var o = arguments.length, i = o < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, n) : s, r;
502
574
  if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
503
- n = Reflect.decorate(e, t, i, s);
575
+ i = Reflect.decorate(e, t, n, s);
504
576
  else
505
577
  for (var l = e.length - 1; l >= 0; l--)
506
- (o = e[l]) && (n = (r < 3 ? o(n) : r > 3 ? o(t, i, n) : o(t, i)) || n);
507
- return r > 3 && n && Object.defineProperty(t, i, n), n;
508
- }, R = function(e, t) {
578
+ (r = e[l]) && (i = (o < 3 ? r(i) : o > 3 ? r(t, n, i) : r(t, n)) || i);
579
+ return o > 3 && i && Object.defineProperty(t, n, i), i;
580
+ }, N = function(e, t) {
509
581
  if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
510
582
  return Reflect.metadata(e, t);
511
583
  };
512
- const q = class {
584
+ const Q = class {
513
585
  constructor(e) {
514
- h(this, e), this.timezoneChanged = d(this, "timezoneChanged", 7), this.languageChanged = d(this, "languageChanged", 7), this.selectedTimezone = Intl.DateTimeFormat().resolvedOptions().timeZone, this.selectedLanguage = navigator.language;
586
+ m(this, e), this.timezoneChanged = d(this, "timezoneChanged", 7), this.languageChanged = d(this, "languageChanged", 7), this.selectedTimezone = Intl.DateTimeFormat().resolvedOptions().timeZone, this.selectedLanguage = navigator.language;
515
587
  }
516
588
  connectedCallback() {
517
589
  }
@@ -525,43 +597,43 @@ const q = class {
525
597
  changeLanguage(e) {
526
598
  this.selectedLanguage = e, this.languageChanged.emit(e);
527
599
  }
528
- selectedOptionChangedHandler(e) {
529
- const { name: t, value: i } = e.detail;
530
- t === "timezone" ? this.changeTimezone(i) : t === "language" && this.changeLanguage(i);
600
+ nylasFormDropdownChangedHandler(e) {
601
+ const { name: t, value: n } = e.detail;
602
+ t === "timezone" ? this.changeTimezone(n) : t === "language" && this.changeLanguage(n);
531
603
  }
532
604
  getTimezoneLabelHTML(e) {
533
- const t = ae(e);
605
+ const t = re(e);
534
606
  return a("span", { class: "timezone-label", style: {
535
607
  display: "flex",
536
608
  alignItems: "center",
537
609
  justifyContent: "space-between",
538
610
  width: "-webkit-fill-available"
539
- } }, u[e], " ", a("span", { class: "timezone-offset", style: {
611
+ } }, _[e], " ", a("span", { class: "timezone-offset", style: {
540
612
  fontSize: "14px",
541
613
  fontWeight: "400",
542
614
  color: "var(--nylas-base-500)"
543
615
  } }, t));
544
616
  }
545
617
  render() {
546
- const e = Object.keys(u).map((i) => ({
547
- labelHTML: this.getTimezoneLabelHTML(i),
548
- label: u[i],
549
- value: i
550
- })), t = Object.keys(F).map((i) => ({
551
- label: F[i],
552
- value: i
618
+ const e = Object.keys(_).map((n) => ({
619
+ labelHTML: this.getTimezoneLabelHTML(n),
620
+ label: _[n],
621
+ value: n
622
+ })), t = Object.keys(q).map((n) => ({
623
+ label: q[n],
624
+ value: n
553
625
  }));
554
- return a(f, { key: "c0a6a862393a28172f9e5a27f877ad1649bedca2" }, a("div", { key: "924cea83d4737928c8e22ceba75db5ed55c23cdd", class: "nylas-locale-switch" }, a("div", { key: "8503ba7c1983961e904acaba394153e3f391cd6d", class: {
626
+ return a(h, { key: "b568b75977c586e88d88d69ce6a4b7651fd6123b" }, a("div", { key: "95b12f2d96e46b31ed606c85c4fe3151861d188c", class: "nylas-locale-switch" }, a("div", { key: "d44690dae20a0068ffe55ab87024c8e283acaa6c", class: {
555
627
  "select-wrapper": !0,
556
628
  timezone: !0
557
- } }, a("select-dropdown", { key: "41232c533e3da00301397c9550bbcff763d8632f", name: "timezone", options: e, defaultSelectedOption: e.find((i) => i.value == this.selectedTimezone) }, a("span", { key: "66fdd8cb15f9c2f6a61d4f7d11b4a6ea602a1230", slot: "select-icon" }, a("globe-icon", { key: "17997840324dd2dc42d8dd29163289cbe18fbb6a", width: "20", height: "20" })))), a("div", { key: "350c75bd2b1b7c482daa6c1a07d0c5f30247ba5d", class: {
629
+ } }, a("select-dropdown", { key: "09b895b074f36381567d439869b68d8e10869b2a", name: "timezone", options: e, defaultSelectedOption: e.find((n) => n.value == this.selectedTimezone) }, a("span", { key: "72a40810ca3d7a59b0e8d76be62c63f70c1cf183", slot: "select-icon" }, a("globe-icon", { key: "01dedea1be14b299cf447085b5778663015b2e2d", width: "20", height: "20" })))), a("div", { key: "2b4078132bc366f7784648cce51fe0ee33467d06", class: {
558
630
  "select-wrapper": !0,
559
631
  language: !0
560
- } }, a("select-dropdown", { key: "f4e9247105873e359a9d048b924bcb27428ad3ab", name: "language", options: t, defaultSelectedOption: t.find((i) => i.value == this.selectedLanguage) }, a("span", { key: "f3cae8af43608f1fb571f181c6ae861e74a0d35f", slot: "select-icon" }, a("translate-icon", { key: "0d89c0fac2bc30f0d557785f5dc93e565542ff2e", width: "20", height: "20" }))))));
632
+ } }, a("select-dropdown", { key: "eb73c3eb853aba5c0acde42bf49dd09c19f1d43b", name: "language", options: t, defaultSelectedOption: t.find((n) => n.value == this.selectedLanguage) }, a("span", { key: "b2b1b5e1d8d2b85e67615c6f63a69ac955e3fc16", slot: "select-icon" }, a("translate-icon", { key: "161bb7dad0a08d8362c5c3cdd85238d732e5888c", width: "20", height: "20" }))))));
561
633
  }
562
634
  };
563
- Ce([
564
- p({
635
+ Te([
636
+ y({
565
637
  name: "nylas-locale-switch",
566
638
  stateToProps: /* @__PURE__ */ new Map([
567
639
  ["scheduler.selectedLanguage", "selectedLanguage"],
@@ -574,23 +646,23 @@ Ce([
574
646
  },
575
647
  fireRegisterEvent: !0
576
648
  }),
577
- R("design:type", Function),
578
- R("design:paramtypes", []),
579
- R("design:returntype", void 0)
580
- ], q.prototype, "render", null);
581
- q.style = xe;
582
- const we = ".sc-nylas-logo-h{display:flex}", _e = we, Ee = class {
649
+ N("design:type", Function),
650
+ N("design:paramtypes", []),
651
+ N("design:returntype", void 0)
652
+ ], Q.prototype, "render", null);
653
+ Q.style = De;
654
+ const Se = ".sc-nylas-logo-h{display:flex}", ze = Se, Be = class {
583
655
  constructor(e) {
584
- h(this, e), this.width = "69", this.height = "24";
656
+ m(this, e), this.width = "69", this.height = "24";
585
657
  }
586
658
  render() {
587
- return a("svg", { key: "ed631631650c1b1e72a33514c62620f07db0aab5", width: this.width, height: this.height, viewBox: "0 0 69 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, a("g", { key: "4529b46e6c641a1a510ddcd26e7867ef67719d51", "clip-path": "url(#clip0_455_3543)" }, a("path", { key: "3b6abbf3d05c2d64979feacc3e472478cc2b6bef", d: "M15.8092 3.03248C14.6497 1.86996 13.1076 1.23047 11.4646 1.23047C9.82156 1.23047 8.27753 1.86996 7.11999 3.03248L0.835347 9.33381C0.686846 9.4827 0.60498 9.68123 0.60498 9.89312C0.60498 10.105 0.686846 10.3035 0.835347 10.4524C0.983848 10.6013 1.18185 10.6834 1.39318 10.6834C1.60451 10.6834 1.80251 10.6013 1.95101 10.4524L8.23374 4.15111C10.0139 2.36627 12.9134 2.36627 14.6935 4.15111C16.4736 5.93785 16.4756 8.84322 14.6935 10.6281L8.4108 16.9275C8.10428 17.2348 8.10428 17.7368 8.4108 18.0461C8.5593 18.195 8.75731 18.2771 8.96863 18.2771C9.17996 18.2771 9.37796 18.195 9.52646 18.0461L15.8092 11.7467C16.9687 10.5841 17.6064 9.03793 17.6064 7.39053C17.6064 5.74314 16.9687 4.19501 15.8092 3.03439V3.03248Z", fill: "currentColor" }), a("path", { key: "0fab0203a5b35f5328cf556cffc5b70d91b1c6cf", d: "M14.9296 7.39038C14.9296 6.46074 14.5698 5.58837 13.9148 4.93361C12.5631 3.57828 10.3641 3.57828 9.01239 4.93361L0.663961 13.3023C0.51546 13.4512 0.433594 13.6497 0.433594 13.8616C0.433594 14.0735 0.51546 14.272 0.663961 14.4209C0.812462 14.5698 1.01046 14.6519 1.22179 14.6519C1.43312 14.6519 1.63112 14.5698 1.77962 14.4209L10.0367 6.1515L10.05 6.13623C10.0747 6.10759 10.1014 6.07705 10.128 6.05033C10.1585 6.01978 10.1928 5.99115 10.2251 5.96252L10.2442 5.94534C10.9886 5.31349 12.1119 5.3593 12.8011 6.05033C13.4903 6.74135 13.536 7.78171 12.9705 8.53192L12.9648 8.53955C12.9058 8.61591 12.8544 8.67699 12.8011 8.73044C12.7497 8.78198 12.6906 8.83352 12.6069 8.90033L4.45264 17.0991C4.30414 17.248 4.22227 17.4465 4.22227 17.6584C4.22227 17.8703 4.30414 18.0689 4.45264 18.2177C4.60114 18.3666 4.79914 18.4487 5.01047 18.4487C5.2218 18.4487 5.4198 18.3666 5.5683 18.2177L13.9167 9.84716C14.5698 9.1924 14.9315 8.31812 14.9315 7.39038H14.9296Z", fill: "currentColor" }), a("path", { key: "f1a4740faedaa576e3eaba1a5e57c6373d0919f3", d: "M10.6821 9.11238C10.4727 9.01694 10.2861 8.88904 10.1281 8.7306C9.97008 8.57216 9.84252 8.38508 9.74733 8.1751L9.69021 8.05103L0.467916 17.2978C0.287049 17.4792 0.174721 17.7082 0.149971 17.9411C0.125221 18.1778 0.19376 18.3897 0.344165 18.5405C0.471724 18.6684 0.65259 18.739 0.850592 18.739C1.11142 18.739 1.37796 18.6207 1.58358 18.4145L10.8059 9.16774L10.6821 9.11047V9.11238Z", fill: "currentColor" }), a("path", { key: "161dbecb5673e0585285692d3e1a863c7f949994", d: "M68.401 10.6185C68.2126 10.2692 67.9593 9.97334 67.6433 9.73854C67.3235 9.49993 66.956 9.31094 66.5486 9.17541C66.1316 9.03606 65.7033 8.91771 65.2749 8.81844C64.7951 8.70582 64.3039 8.57983 63.8165 8.44811C63.3196 8.31258 62.9065 8.14269 62.5905 7.94225C62.4743 7.88689 62.3391 7.76663 62.3391 7.50129C62.3391 7.39821 62.3639 7.29704 62.4153 7.19587L62.4248 7.18059C62.5352 7.02216 62.7142 6.8828 62.975 6.75109C63.234 6.62128 63.609 6.55829 64.1231 6.55829C64.5286 6.55829 64.877 6.61365 65.1569 6.72436C65.4348 6.83508 65.6652 6.96871 65.8442 7.12524C66.0212 7.27986 66.1659 7.45357 66.2782 7.63873C66.3563 7.76854 66.4267 7.89262 66.4858 8.00525L68.2754 6.84081C68.1669 6.59456 68.0146 6.33495 67.8204 6.0677C67.6033 5.768 67.3254 5.4893 66.9922 5.23732C66.659 4.98534 66.2516 4.77345 65.7813 4.60929C65.3111 4.44512 64.7532 4.36304 64.1231 4.36304C63.3844 4.36304 62.7599 4.46421 62.2706 4.66083C61.7813 4.85935 61.3815 5.09988 61.0845 5.37667C60.7875 5.65346 60.5628 5.95125 60.4143 6.2605C60.2639 6.57547 60.1611 6.85799 60.1078 7.10233C60.0945 7.18059 60.0812 7.27031 60.0678 7.36767C60.0545 7.4593 60.0469 7.5452 60.0469 7.62537C60.0469 8.13314 60.1745 8.56074 60.4239 8.89671C60.679 9.24222 61.0045 9.53429 61.391 9.76336C61.7813 9.99624 62.2116 10.1852 62.6704 10.3227C63.1388 10.462 63.5862 10.5823 64.0012 10.6796C64.4067 10.777 64.7932 10.8782 65.1531 10.9774C65.5224 11.0786 65.8289 11.2122 66.0631 11.3745C66.2801 11.5425 66.3887 11.7448 66.3887 11.9777C66.3887 12.2278 66.2916 12.4263 66.0993 12.5695C65.9279 12.6954 65.7261 12.7985 65.4958 12.8711C65.273 12.9436 65.0407 12.9913 64.8066 13.0142C64.58 13.0352 64.3915 13.0467 64.2468 13.0467C63.8032 13.0467 63.4224 13.0028 63.1197 12.915C62.8151 12.8272 62.5638 12.7241 62.3734 12.6057C62.1811 12.4874 62.0288 12.3614 61.9222 12.2316C61.8213 12.1094 61.747 12.0082 61.7014 11.9319L61.4957 11.6303L59.708 12.7928C59.8508 13.0161 60.0298 13.2643 60.2392 13.5296C60.4772 13.8293 60.7837 14.1138 61.153 14.3734C61.5224 14.633 61.966 14.8525 62.4724 15.0243C62.9788 15.1961 63.5748 15.282 64.2468 15.282C64.797 15.282 65.2901 15.2324 65.7166 15.137C66.1412 15.0396 66.5162 14.9117 66.8285 14.7552C67.1388 14.6005 67.4015 14.4192 67.6109 14.2149C67.8223 14.0107 67.9974 13.8026 68.1326 13.6003C68.4563 13.1135 68.6409 12.5504 68.6828 11.9262C68.6828 11.4069 68.5876 10.9641 68.401 10.6166V10.6185Z", fill: "currentColor" }), a("path", { key: "c11c9713589afaa684befbfb82aa5748196f92f2", d: "M26.3585 4.27905C23.7901 4.27905 21.6997 6.37504 21.6997 8.95017V15.0701H23.9291V8.95017C23.9291 7.6082 25.0181 6.5163 26.3565 6.5163C27.695 6.5163 28.784 7.6082 28.784 8.95017V15.0701H31.0134V8.95017C31.0134 6.37504 28.9229 4.27905 26.3546 4.27905H26.3585Z", fill: "currentColor" }), a("path", { key: "c6c0c7c00597373123a283b5ed63f3045b3c2dec", d: "M53.4522 4.27905C50.4251 4.27905 47.9634 6.74728 47.9634 9.78245C47.9634 12.8176 50.427 15.2859 53.4522 15.2859C54.5545 15.2859 55.6188 14.9594 56.5288 14.3409L56.7116 14.2169V15.0682H58.941V9.78245C58.941 6.74728 56.4793 4.27905 53.4522 4.27905ZM53.4522 13.0505C51.655 13.0505 50.1928 11.5845 50.1928 9.78245C50.1928 7.98044 51.655 6.51439 53.4522 6.51439C55.2494 6.51439 56.7116 7.98044 56.7116 9.78245C56.7116 11.5845 55.2494 13.0505 53.4522 13.0505Z", fill: "currentColor" }), a("path", { key: "abaeeab72cdf96a4875750bb5804272ccd95ad62", d: "M45.5795 10.6166V0.356201H43.3501V10.6166C43.3501 13.1517 45.3758 15.2228 47.8908 15.2858V13.0486C46.6057 12.9875 45.5795 11.9204 45.5795 10.6166Z", fill: "currentColor" }), a("path", { key: "55ce1c450fcc735ec75faeb729691a7b40541c98", d: "M39.5428 4.4967V10.63C39.5428 11.6761 38.8669 12.621 37.9016 12.9284C37.1249 13.1746 36.3157 13.0486 35.6817 12.5829C35.0592 12.1247 34.6879 11.3917 34.6879 10.6186V4.4967H32.4585V10.5995C32.4585 12.7165 33.8388 14.57 35.8131 15.1084C37.0354 15.4424 38.2995 15.2973 39.3695 14.7037L39.5428 14.6063V14.9747C39.5428 16.2766 38.5166 17.3437 37.2315 17.4067V19.6439C39.7465 19.5809 41.7722 17.5117 41.7722 14.9747V4.4967H39.5428Z", fill: "currentColor" })), a("defs", { key: "724826a441c49bc34aed5507963411bbb58db4c4" }, a("clipPath", { key: "039d04c4978547f1d3125f48eb57d2862ad0aa4a", id: "clip0_455_3543" }, a("rect", { key: "d1a31fb9f05a649236f5b3a4b3bebcabb8663146", width: "68.7123", height: "19.2877", fill: "white", transform: "translate(0.144043 0.356201)" }))));
659
+ return a("svg", { key: "cc4e67942af5cfd37cdad41f7f8dc87652109481", width: this.width, height: this.height, viewBox: "0 0 69 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, a("g", { key: "5f5e9fd7f9ce51ec576b6004828e0c323dcb1701", "clip-path": "url(#clip0_455_3543)" }, a("path", { key: "0390e7e1cc90e26d025adccbb77df76b7c779b9e", d: "M15.8092 3.03248C14.6497 1.86996 13.1076 1.23047 11.4646 1.23047C9.82156 1.23047 8.27753 1.86996 7.11999 3.03248L0.835347 9.33381C0.686846 9.4827 0.60498 9.68123 0.60498 9.89312C0.60498 10.105 0.686846 10.3035 0.835347 10.4524C0.983848 10.6013 1.18185 10.6834 1.39318 10.6834C1.60451 10.6834 1.80251 10.6013 1.95101 10.4524L8.23374 4.15111C10.0139 2.36627 12.9134 2.36627 14.6935 4.15111C16.4736 5.93785 16.4756 8.84322 14.6935 10.6281L8.4108 16.9275C8.10428 17.2348 8.10428 17.7368 8.4108 18.0461C8.5593 18.195 8.75731 18.2771 8.96863 18.2771C9.17996 18.2771 9.37796 18.195 9.52646 18.0461L15.8092 11.7467C16.9687 10.5841 17.6064 9.03793 17.6064 7.39053C17.6064 5.74314 16.9687 4.19501 15.8092 3.03439V3.03248Z", fill: "currentColor" }), a("path", { key: "08783eb775743742f7520a632016676f156469d3", d: "M14.9296 7.39038C14.9296 6.46074 14.5698 5.58837 13.9148 4.93361C12.5631 3.57828 10.3641 3.57828 9.01239 4.93361L0.663961 13.3023C0.51546 13.4512 0.433594 13.6497 0.433594 13.8616C0.433594 14.0735 0.51546 14.272 0.663961 14.4209C0.812462 14.5698 1.01046 14.6519 1.22179 14.6519C1.43312 14.6519 1.63112 14.5698 1.77962 14.4209L10.0367 6.1515L10.05 6.13623C10.0747 6.10759 10.1014 6.07705 10.128 6.05033C10.1585 6.01978 10.1928 5.99115 10.2251 5.96252L10.2442 5.94534C10.9886 5.31349 12.1119 5.3593 12.8011 6.05033C13.4903 6.74135 13.536 7.78171 12.9705 8.53192L12.9648 8.53955C12.9058 8.61591 12.8544 8.67699 12.8011 8.73044C12.7497 8.78198 12.6906 8.83352 12.6069 8.90033L4.45264 17.0991C4.30414 17.248 4.22227 17.4465 4.22227 17.6584C4.22227 17.8703 4.30414 18.0689 4.45264 18.2177C4.60114 18.3666 4.79914 18.4487 5.01047 18.4487C5.2218 18.4487 5.4198 18.3666 5.5683 18.2177L13.9167 9.84716C14.5698 9.1924 14.9315 8.31812 14.9315 7.39038H14.9296Z", fill: "currentColor" }), a("path", { key: "e9c104e64b877dce04ae82221cd976688e97968f", d: "M10.6821 9.11238C10.4727 9.01694 10.2861 8.88904 10.1281 8.7306C9.97008 8.57216 9.84252 8.38508 9.74733 8.1751L9.69021 8.05103L0.467916 17.2978C0.287049 17.4792 0.174721 17.7082 0.149971 17.9411C0.125221 18.1778 0.19376 18.3897 0.344165 18.5405C0.471724 18.6684 0.65259 18.739 0.850592 18.739C1.11142 18.739 1.37796 18.6207 1.58358 18.4145L10.8059 9.16774L10.6821 9.11047V9.11238Z", fill: "currentColor" }), a("path", { key: "144a43759016fd4da29dd3f0493d9221e666c89f", d: "M68.401 10.6185C68.2126 10.2692 67.9593 9.97334 67.6433 9.73854C67.3235 9.49993 66.956 9.31094 66.5486 9.17541C66.1316 9.03606 65.7033 8.91771 65.2749 8.81844C64.7951 8.70582 64.3039 8.57983 63.8165 8.44811C63.3196 8.31258 62.9065 8.14269 62.5905 7.94225C62.4743 7.88689 62.3391 7.76663 62.3391 7.50129C62.3391 7.39821 62.3639 7.29704 62.4153 7.19587L62.4248 7.18059C62.5352 7.02216 62.7142 6.8828 62.975 6.75109C63.234 6.62128 63.609 6.55829 64.1231 6.55829C64.5286 6.55829 64.877 6.61365 65.1569 6.72436C65.4348 6.83508 65.6652 6.96871 65.8442 7.12524C66.0212 7.27986 66.1659 7.45357 66.2782 7.63873C66.3563 7.76854 66.4267 7.89262 66.4858 8.00525L68.2754 6.84081C68.1669 6.59456 68.0146 6.33495 67.8204 6.0677C67.6033 5.768 67.3254 5.4893 66.9922 5.23732C66.659 4.98534 66.2516 4.77345 65.7813 4.60929C65.3111 4.44512 64.7532 4.36304 64.1231 4.36304C63.3844 4.36304 62.7599 4.46421 62.2706 4.66083C61.7813 4.85935 61.3815 5.09988 61.0845 5.37667C60.7875 5.65346 60.5628 5.95125 60.4143 6.2605C60.2639 6.57547 60.1611 6.85799 60.1078 7.10233C60.0945 7.18059 60.0812 7.27031 60.0678 7.36767C60.0545 7.4593 60.0469 7.5452 60.0469 7.62537C60.0469 8.13314 60.1745 8.56074 60.4239 8.89671C60.679 9.24222 61.0045 9.53429 61.391 9.76336C61.7813 9.99624 62.2116 10.1852 62.6704 10.3227C63.1388 10.462 63.5862 10.5823 64.0012 10.6796C64.4067 10.777 64.7932 10.8782 65.1531 10.9774C65.5224 11.0786 65.8289 11.2122 66.0631 11.3745C66.2801 11.5425 66.3887 11.7448 66.3887 11.9777C66.3887 12.2278 66.2916 12.4263 66.0993 12.5695C65.9279 12.6954 65.7261 12.7985 65.4958 12.8711C65.273 12.9436 65.0407 12.9913 64.8066 13.0142C64.58 13.0352 64.3915 13.0467 64.2468 13.0467C63.8032 13.0467 63.4224 13.0028 63.1197 12.915C62.8151 12.8272 62.5638 12.7241 62.3734 12.6057C62.1811 12.4874 62.0288 12.3614 61.9222 12.2316C61.8213 12.1094 61.747 12.0082 61.7014 11.9319L61.4957 11.6303L59.708 12.7928C59.8508 13.0161 60.0298 13.2643 60.2392 13.5296C60.4772 13.8293 60.7837 14.1138 61.153 14.3734C61.5224 14.633 61.966 14.8525 62.4724 15.0243C62.9788 15.1961 63.5748 15.282 64.2468 15.282C64.797 15.282 65.2901 15.2324 65.7166 15.137C66.1412 15.0396 66.5162 14.9117 66.8285 14.7552C67.1388 14.6005 67.4015 14.4192 67.6109 14.2149C67.8223 14.0107 67.9974 13.8026 68.1326 13.6003C68.4563 13.1135 68.6409 12.5504 68.6828 11.9262C68.6828 11.4069 68.5876 10.9641 68.401 10.6166V10.6185Z", fill: "currentColor" }), a("path", { key: "9f11d314804629377158c00854f3849d1033c601", d: "M26.3585 4.27905C23.7901 4.27905 21.6997 6.37504 21.6997 8.95017V15.0701H23.9291V8.95017C23.9291 7.6082 25.0181 6.5163 26.3565 6.5163C27.695 6.5163 28.784 7.6082 28.784 8.95017V15.0701H31.0134V8.95017C31.0134 6.37504 28.9229 4.27905 26.3546 4.27905H26.3585Z", fill: "currentColor" }), a("path", { key: "f6591deaa756e6e18c08a65a9eefc453965296da", d: "M53.4522 4.27905C50.4251 4.27905 47.9634 6.74728 47.9634 9.78245C47.9634 12.8176 50.427 15.2859 53.4522 15.2859C54.5545 15.2859 55.6188 14.9594 56.5288 14.3409L56.7116 14.2169V15.0682H58.941V9.78245C58.941 6.74728 56.4793 4.27905 53.4522 4.27905ZM53.4522 13.0505C51.655 13.0505 50.1928 11.5845 50.1928 9.78245C50.1928 7.98044 51.655 6.51439 53.4522 6.51439C55.2494 6.51439 56.7116 7.98044 56.7116 9.78245C56.7116 11.5845 55.2494 13.0505 53.4522 13.0505Z", fill: "currentColor" }), a("path", { key: "ee90a807361a94004319eb9c5f89082558211d05", d: "M45.5795 10.6166V0.356201H43.3501V10.6166C43.3501 13.1517 45.3758 15.2228 47.8908 15.2858V13.0486C46.6057 12.9875 45.5795 11.9204 45.5795 10.6166Z", fill: "currentColor" }), a("path", { key: "ac09ff51d464eba8732f1c61f18eafd587227b93", d: "M39.5428 4.4967V10.63C39.5428 11.6761 38.8669 12.621 37.9016 12.9284C37.1249 13.1746 36.3157 13.0486 35.6817 12.5829C35.0592 12.1247 34.6879 11.3917 34.6879 10.6186V4.4967H32.4585V10.5995C32.4585 12.7165 33.8388 14.57 35.8131 15.1084C37.0354 15.4424 38.2995 15.2973 39.3695 14.7037L39.5428 14.6063V14.9747C39.5428 16.2766 38.5166 17.3437 37.2315 17.4067V19.6439C39.7465 19.5809 41.7722 17.5117 41.7722 14.9747V4.4967H39.5428Z", fill: "currentColor" })), a("defs", { key: "c0e42870fa615d20b75bb38e4ec4047f2aba08cc" }, a("clipPath", { key: "e19ed121d42704ac0bf568a704679ca03dd70ed7", id: "clip0_455_3543" }, a("rect", { key: "2848bbbc3c36ecb6bdbc7336e8ac07c966baca5b", width: "68.7123", height: "19.2877", fill: "white", transform: "translate(0.144043 0.356201)" }))));
588
660
  }
589
661
  };
590
- Ee.style = _e;
591
- const Te = ':host{display:block;margin-bottom:-12px;width:100%;z-index:1;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.notif{display:flex;padding:17px;align-items:flex-start;justify-content:space-between;gap:16px;border-radius:var(--nylas-border-radius-2x);border:1.5px solid var(--nylas-error);background:var(--nylas-base-0)}@media screen and (max-width: 768px){.notif{width:auto}}.notif .content{display:flex;flex-direction:row;gap:8px}.notif .content .message{font-size:14px;font-weight:400;color:var(--nylas-base-800)}.notif .content .message .title{font-size:16px;font-weight:600;color:var(--nylas-base-950);display:block}.notif .content .message .description{font-size:14px;font-weight:400;color:var(--nylas-base-800);display:block}.notif .content .icon.error{color:var(--nylas-error)}.notif.error{border-color:var(--nylas-error);background:rgb(255, 248, 248)}.notif.warning{border-color:var(--nylas-warning)}.notif.info{border-color:var(--nylas-info)}.notif.success{border-color:var(--nylas-success)}.notif .dismiss-btn{background:none;border:none;color:var(--nylas-base-950);cursor:pointer}', De = Te, ze = class {
662
+ Be.style = ze;
663
+ const Le = ':host{display:block;margin-bottom:-12px;width:100%;z-index:1;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.notif{display:flex;padding:17px;align-items:flex-start;justify-content:space-between;gap:16px;border-radius:var(--nylas-border-radius-2x);border:1.5px solid var(--nylas-error);background:var(--nylas-base-0)}@media screen and (max-width: 768px){.notif{width:auto}}.notif .content{display:flex;flex-direction:row;gap:8px}.notif .content .message{font-size:14px;font-weight:400;color:var(--nylas-base-800)}.notif .content .message .title{font-size:16px;font-weight:600;color:var(--nylas-base-950);display:block}.notif .content .message .description{font-size:14px;font-weight:400;color:var(--nylas-base-800);display:block}.notif .content .icon.error{color:var(--nylas-error)}.notif.error{border-color:var(--nylas-error);background:rgb(255, 248, 248)}.notif.warning{border-color:var(--nylas-warning)}.notif.info{border-color:var(--nylas-info)}.notif.success{border-color:var(--nylas-success)}.notif .dismiss-btn{background:none;border:none;color:var(--nylas-base-950);cursor:pointer}', Ie = Le, Re = class {
592
664
  constructor(e) {
593
- h(this, e), this.ttl = 5e3, this.allowedCategories = ["component", "api", "validation", "invalid_session"], this.notifications = [];
665
+ m(this, e), this.ttl = 5e3, this.allowedCategories = ["component", "api", "validation", "invalid_session"], this.notifications = [];
594
666
  }
595
667
  onError(e) {
596
668
  c(`[nylas-notification] Error: ${e.detail.title}`), this.handleNotification(e);
@@ -620,7 +692,7 @@ const Te = ':host{display:block;margin-bottom:-12px;width:100%;z-index:1;--nylas
620
692
  if (this.notifications = [...this.notifications, { ...e.detail }], e.detail.ttl !== "none") {
621
693
  const t = e.detail.ttl ? e.detail.ttl : this.ttl;
622
694
  window.setTimeout(() => {
623
- this.notifications = this.notifications.filter((i) => i.id !== e.detail.id);
695
+ this.notifications = this.notifications.filter((n) => n.id !== e.detail.id);
624
696
  }, t);
625
697
  }
626
698
  }
@@ -628,26 +700,26 @@ const Te = ':host{display:block;margin-bottom:-12px;width:100%;z-index:1;--nylas
628
700
  this.notifications = this.notifications.filter((t) => t.id !== e);
629
701
  }
630
702
  render() {
631
- return a(f, { key: "04b12b24fcae1b215c6fd27745eda909e200ce99" }, a(te, { key: "023971b83ac850df2801d2aa02c3af37b834ddc8" }, this.notifications.map((e) => a("div", { class: `notif ${e.type}`, key: e.id }, a("div", { class: "content" }, a("span", { class: `icon ${e.type}` }, (e.type === "error" || e.type === "warning") && a("warning-icon", null)), a("span", { class: "message" }, a("span", { class: "title" }, e.title), e.description && a("span", { class: "description" }, e.description))), a("button", { class: "dismiss-btn", onClick: () => this.dismissNotification(e.id) }, a("close-icon", null)))), a("slot", { key: "2bf249b06c07b8acad8511608831e77bc6c50ec7" })));
703
+ return a(h, { key: "ab83962fa679505585445e3baab12b31bf1abd00" }, a(se, { key: "3f4c77b79718eb71600129910be78980a70c3022" }, this.notifications.map((e) => a("div", { class: `notif ${e.type}`, key: e.id }, a("div", { class: "content" }, a("span", { class: `icon ${e.type}` }, (e.type === "error" || e.type === "warning") && a("warning-icon", null)), a("span", { class: "message" }, a("span", { class: "title" }, e.title), e.description && a("span", { class: "description" }, e.description))), a("button", { class: "dismiss-btn", onClick: () => this.dismissNotification(e.id) }, a("close-icon", null)))), a("slot", { key: "45286b7e48b19c7b76089ef2d661e9cd176b4a8f" })));
632
704
  }
633
705
  };
634
- ze.style = De;
635
- const Be = ":host{display:block}sp-theme{position:relative;height:inherit;display:flex;flex-direction:column;justify-content:center;align-items:center;font-family:var(--nylas-font-family)}.event-card{display:flex;align-items:center;flex-direction:column;width:calc(100% - 3rem);background-color:var(--nylas-base-0);color:var(--nylas-base-800);border-radius:var(--nylas-border-radius-2x);padding:3rem 1.5rem 1.5rem 1.5rem;position:relative;box-shadow:0px 1px 3px 0px rgba(0, 0, 0, 0.1), 0px 1px 2px 0px rgba(0, 0, 0, 0.06)}@media screen and (max-width: 768px){.event-card{margin-bottom:2rem}}.nylas-selected-event-card__date{font-size:min(max(16px, 3vw), 18px);font-weight:600}.nylas-selected-event-card__time{font-size:16px;font-weight:500}.calendar-icon{width:3rem;height:3rem;border-radius:50%;position:absolute;top:-1.25rem;left:50%;transform:translateX(-50%);background-color:var(--nylas-base-0);border:1px solid var(--nylas-base-200)}calendar-icon{display:flex;align-items:center;justify-content:center;height:100%}.event-timezone{display:flex;color:var(--nylas-base-600);margin-bottom:8px;gap:4px;align-items:center}@media screen and (max-width: 768px){.event-timezone{margin-bottom:16px}}", Le = Be;
636
- var Se = function(e, t, i, s) {
637
- var r = arguments.length, n = r < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, i) : s, o;
706
+ Re.style = Ie;
707
+ const Pe = ":host{display:block}sp-theme{position:relative;height:inherit;display:flex;flex-direction:column;justify-content:center;align-items:center;font-family:var(--nylas-font-family)}.event-card{display:flex;align-items:center;flex-direction:column;width:calc(100% - 3rem);background-color:var(--nylas-base-0);color:var(--nylas-base-800);border-radius:var(--nylas-border-radius-2x);padding:3rem 1.5rem 1.5rem 1.5rem;position:relative;box-shadow:0px 1px 3px 0px rgba(0, 0, 0, 0.1), 0px 1px 2px 0px rgba(0, 0, 0, 0.06)}@media screen and (max-width: 768px){.event-card{margin-bottom:2rem}}.nylas-selected-event-card__date{font-size:min(max(16px, 3vw), 18px);font-weight:600}.nylas-selected-event-card__time{font-size:16px;font-weight:500}.calendar-icon{width:3rem;height:3rem;border-radius:50%;position:absolute;top:-1.25rem;left:50%;transform:translateX(-50%);background-color:var(--nylas-base-0);border:1px solid var(--nylas-base-200)}calendar-icon{display:flex;align-items:center;justify-content:center;height:100%}.event-timezone{display:flex;color:var(--nylas-base-600);margin-bottom:8px;gap:4px;align-items:center}@media screen and (max-width: 768px){.event-timezone{margin-bottom:16px}}", Fe = Pe;
708
+ var je = function(e, t, n, s) {
709
+ var o = arguments.length, i = o < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, n) : s, r;
638
710
  if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
639
- n = Reflect.decorate(e, t, i, s);
711
+ i = Reflect.decorate(e, t, n, s);
640
712
  else
641
713
  for (var l = e.length - 1; l >= 0; l--)
642
- (o = e[l]) && (n = (r < 3 ? o(n) : r > 3 ? o(t, i, n) : o(t, i)) || n);
643
- return r > 3 && n && Object.defineProperty(t, i, n), n;
644
- }, j = function(e, t) {
714
+ (r = e[l]) && (i = (o < 3 ? r(i) : o > 3 ? r(t, n, i) : r(t, n)) || i);
715
+ return o > 3 && i && Object.defineProperty(t, n, i), i;
716
+ }, O = function(e, t) {
645
717
  if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
646
718
  return Reflect.metadata(e, t);
647
719
  };
648
- const W = class {
720
+ const ee = class {
649
721
  constructor(e) {
650
- h(this, e), this.selectedDate = void 0, this.selectedTimeslot = void 0, this.selectedTimezone = Intl.DateTimeFormat().resolvedOptions().timeZone, this.startTime = "", this.endTime = "";
722
+ m(this, e), this.selectedDate = void 0, this.selectedTimeslot = void 0, this.selectedTimezone = Intl.DateTimeFormat().resolvedOptions().timeZone, this.startTime = "", this.endTime = "";
651
723
  }
652
724
  connectedCallback() {
653
725
  }
@@ -664,7 +736,7 @@ const W = class {
664
736
  }
665
737
  render() {
666
738
  var e;
667
- return a(f, { key: "5db94a07ff685fc783fa49e6eb890fce2be57cbf", part: "nsec" }, a("sp-theme", { key: "9444e08365080532c403eb0db8241d3a5be1bbf1", theme: "spectrum", color: "dark", scale: "medium" }, a("div", { key: "ace05d8165e68b9eb389fad78926a4c19e64859a", class: "event-card", part: "nsec__card" }, a("div", { key: "82f4ea6cb3bfad565cfea1ef8eef651c9776b486", class: "calendar-icon", part: "nsec__icon" }, a("calendar-icon", { key: "f984463ebcaab6e32e24951293633f651ebb7f24" })), a("div", { key: "1c48032e65079ce172219d92a79b38338db03c89", class: "nylas-selected-event-card__date", part: "nsec__date" }, (e = this.selectedDate) == null ? void 0 : e.toLocaleDateString(void 0, { dateStyle: "full" })), a("div", { key: "71efc4d5f7d409877d3a5d6cf62fd95f7df10176", class: "nylas-selected-event-card__time", part: "nsec__time" }, this.startTime, " - ", this.endTime)), a("div", { key: "3f9cbf108c99a8d6cfdc448781dfa67c90504c18", class: "event-timezone", part: "nsec__timezone" }, a("globe-icon", { key: "92f77867dc3b6fba848746b690484f83511e9c7e" }), u[this.selectedTimezone])));
739
+ return a(h, { key: "27aa2e0c4ea3a4ac04c24c3e7049360ab1da450c", part: "nsec" }, a("sp-theme", { key: "06a93ef1f378da9bf9c8eeb8cbb3b7ab912cbe39", theme: "spectrum", color: "dark", scale: "medium" }, a("div", { key: "cbeab1951966e48db4e7c0e652946099377abfaa", class: "event-card", part: "nsec__card" }, a("div", { key: "014aed3ae5739ec763f3fe0ff7b94f859a35090c", class: "calendar-icon", part: "nsec__icon" }, a("calendar-icon", { key: "b19e2752e3b87c07f14c23651416de2a1fa78ca5" })), a("div", { key: "d4adee688565fcec2e217cc2b3ae8bb2d2572630", class: "nylas-selected-event-card__date", part: "nsec__date" }, (e = this.selectedDate) == null ? void 0 : e.toLocaleDateString(void 0, { dateStyle: "full" })), a("div", { key: "c9f15e73f1cf65d6df1739fe348abd9fe50c34d9", class: "nylas-selected-event-card__time", part: "nsec__time" }, this.startTime, " - ", this.endTime)), a("div", { key: "531c381692eefac442a0646d4584f9cf2a51808e", class: "event-timezone", part: "nsec__timezone" }, a("globe-icon", { key: "d6d7225298063ab5d5005f2c0a8d2a57de0d1a27" }), _[this.selectedTimezone])));
668
740
  }
669
741
  static get watchers() {
670
742
  return {
@@ -672,8 +744,8 @@ const W = class {
672
744
  };
673
745
  }
674
746
  };
675
- Se([
676
- p({
747
+ je([
748
+ y({
677
749
  name: "nylas-selected-event-card",
678
750
  stateToProps: /* @__PURE__ */ new Map([
679
751
  ["scheduler.selectedDate", "selectedDate"],
@@ -683,28 +755,28 @@ Se([
683
755
  eventToProps: {},
684
756
  fireRegisterEvent: !0
685
757
  }),
686
- j("design:type", Function),
687
- j("design:paramtypes", []),
688
- j("design:returntype", void 0)
689
- ], W.prototype, "render", null);
690
- W.style = Le;
691
- const Ie = ":host{display:block;height:calc(100% - 48px)}.time-picker-wrapper{display:flex;flex-direction:column;height:100%}.time-slots{position:relative;display:flex;flex-direction:column;gap:0.75rem;align-items:center;overflow-y:scroll;padding:0.5rem 1.5rem 1.5rem;flex:1}.time{box-sizing:border-box;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:4px 12px;gap:0.5rem;font-size:16px;font-weight:500;font-family:inherit;width:100%;height:48px;color:var(--nylas-base-800);background:var(--nylas-base-0);border:none;outline:1.5px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);flex:none;order:4;align-self:stretch;flex-grow:0;cursor:pointer}.time:hover,.time:focus{color:var(--nylas-primary);outline-color:var(--nylas-primary)}.time.selected{font-weight:600;color:var(--nylas-primary);outline:2px solid var(--nylas-primary);border-color:transparent;box-shadow:0 0 0 2px var(--nylas-primary)}.empty{text-align:center;padding:0 1.5rem;color:var(--nylas-base-600);font-size:min(max(12px, 2vw), 14px);height:450px;display:flex;align-items:center;justify-content:center}@keyframes pulsate{0%{background-color:var(--nylas-base-50)}50%{background-color:var(--nylas-base-100)}100%{background-color:var(--nylas-base-50)}}.loading{padding:0 1.5rem}.loading .time-slot-skeleton{width:100%;height:4rem;background-color:var(--nylas-base-50);margin-bottom:0.5rem;border-radius:var(--nylas-border-radius-2x);animation:pulsate 1.5s infinite ease-in-out}.footer{width:100%;padding:9px;box-sizing:border-box;border-top:1px solid var(--nylas-base-200)}.footer sp-button{padding:14px;color:var(--nylas-base-100);border-radius:var(--nylas-border-radius-2x);width:100%;height:48px;font-weight:600;font-size:16px;background-color:var(--nylas-primary);border:none}.footer sp-button:hover,.footer sp-button:focus{background-color:var(--nylas-base-600)}.footer sp-button:active{background-color:var(--nylas-base-800)}", Re = Ie;
692
- var je = function(e, t, i, s) {
693
- var r = arguments.length, n = r < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, i) : s, o;
758
+ O("design:type", Function),
759
+ O("design:paramtypes", []),
760
+ O("design:returntype", void 0)
761
+ ], ee.prototype, "render", null);
762
+ ee.style = Fe;
763
+ const Me = ":host{display:block;height:calc(100% - 48px)}.time-picker-wrapper{display:flex;flex-direction:column;height:100%}.time-slots{position:relative;display:flex;flex-direction:column;gap:0.75rem;align-items:center;overflow-y:scroll;padding:0.5rem 1.5rem 1.5rem;flex:1}.time{box-sizing:border-box;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:4px 12px;gap:0.5rem;font-size:16px;font-weight:500;font-family:inherit;width:100%;height:48px;color:var(--nylas-base-800);background:var(--nylas-base-0);border:none;outline:1.5px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);flex:none;order:4;align-self:stretch;flex-grow:0;cursor:pointer}.time:hover,.time:focus{color:var(--nylas-primary);outline-color:var(--nylas-primary)}.time.selected{font-weight:600;color:var(--nylas-primary);outline:2px solid var(--nylas-primary);border-color:transparent;box-shadow:0 0 0 2px var(--nylas-primary)}.empty{text-align:center;padding:0 1.5rem;color:var(--nylas-base-600);font-size:min(max(12px, 2vw), 14px);height:450px;display:flex;align-items:center;justify-content:center}@keyframes pulsate{0%{background-color:var(--nylas-base-50)}50%{background-color:var(--nylas-base-100)}100%{background-color:var(--nylas-base-50)}}.loading{padding:0 1.5rem}.loading .time-slot-skeleton{width:100%;height:4rem;background-color:var(--nylas-base-50);margin-bottom:0.5rem;border-radius:var(--nylas-border-radius-2x);animation:pulsate 1.5s infinite ease-in-out}.footer{width:100%;padding:14px;box-sizing:border-box;border-top:1px solid var(--nylas-base-200)}.footer sp-button{padding:14px;color:var(--nylas-base-100);border-radius:var(--nylas-border-radius-2x);width:100%;height:48px;font-weight:600;font-size:16px;background-color:var(--nylas-primary);border:none}.footer sp-button:hover,.footer sp-button:focus{background-color:var(--nylas-base-600)}.footer sp-button:active{background-color:var(--nylas-base-800)}", Ne = Me;
764
+ var Oe = function(e, t, n, s) {
765
+ var o = arguments.length, i = o < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, n) : s, r;
694
766
  if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
695
- n = Reflect.decorate(e, t, i, s);
767
+ i = Reflect.decorate(e, t, n, s);
696
768
  else
697
769
  for (var l = e.length - 1; l >= 0; l--)
698
- (o = e[l]) && (n = (r < 3 ? o(n) : r > 3 ? o(t, i, n) : o(t, i)) || n);
699
- return r > 3 && n && Object.defineProperty(t, i, n), n;
700
- }, P = function(e, t) {
770
+ (r = e[l]) && (i = (o < 3 ? r(i) : o > 3 ? r(t, n, i) : r(t, n)) || i);
771
+ return o > 3 && i && Object.defineProperty(t, n, i), i;
772
+ }, H = function(e, t) {
701
773
  if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
702
774
  return Reflect.metadata(e, t);
703
775
  };
704
- const U = class {
776
+ const te = class {
705
777
  constructor(e) {
706
- h(this, e), this.timeslotSelected = d(this, "timeslotSelected", 7), this.timeslotConfirmed = d(this, "timeslotConfirmed", 7), this.handleConfirmedTimeslot = async (t, i) => {
707
- t.preventDefault(), c("[nylas-timeslot-picker] Confirm timeslot", i), this.timeslotConfirmed.emit(i);
778
+ m(this, e), this.timeslotSelected = d(this, "timeslotSelected", 7), this.timeslotConfirmed = d(this, "timeslotConfirmed", 7), this.handleConfirmedTimeslot = async (t, n) => {
779
+ t.preventDefault(), c("[nylas-timeslot-picker] Confirm timeslot", n), this.timeslotConfirmed.emit(n);
708
780
  }, this.handleMouseEnter = (t) => {
709
781
  this.hoveredTimeslotIndex = t;
710
782
  }, this.handleMouseLeave = () => {
@@ -717,7 +789,7 @@ const U = class {
717
789
  }
718
790
  async componentWillLoad() {
719
791
  var t;
720
- const e = (t = this.availability) == null ? void 0 : t.filter((i) => this.selectedDate && m(i.start_time, this.selectedDate)).map((i) => i);
792
+ const e = (t = this.availability) == null ? void 0 : t.filter((n) => this.selectedDate && u(n.start_time, this.selectedDate)).map((n) => n);
721
793
  this.times = e || [], c("[nylas-timeslot-picker] Component will load", { selectedDate: this.selectedDate, availability: this.availability, times: this.times });
722
794
  }
723
795
  async componentDidLoad() {
@@ -743,24 +815,24 @@ const U = class {
743
815
  selectedDateChanged(e) {
744
816
  var t;
745
817
  if (c("[nylas-timeslot-picker] Selected date changed", { newVal: e }), e && (this.selectedTimeslotIndex = "", typeof e < "u")) {
746
- const i = (t = this.availability) == null ? void 0 : t.filter((s) => m(s.start_time, e)).map((s) => s);
747
- this.times = i || [];
818
+ const n = (t = this.availability) == null ? void 0 : t.filter((s) => u(s.start_time, e)).map((s) => s);
819
+ this.times = n || [];
748
820
  }
749
821
  }
750
822
  availabilityChanged(e) {
751
823
  if (c("[nylas-timeslot-picker] Available times changed", { newVal: e, selectedDate: this.selectedDate }), typeof e < "u") {
752
- const t = e == null ? void 0 : e.filter((i) => this.selectedDate && m(i.start_time, this.selectedDate)).map((i) => i);
824
+ const t = e == null ? void 0 : e.filter((n) => this.selectedDate && u(n.start_time, this.selectedDate)).map((n) => n);
753
825
  this.times = t || [];
754
826
  }
755
827
  }
756
828
  render() {
757
- return this.isLoading ? a(f, null, a("div", { class: "loading" }, new Array(6).fill(0).map((e, t) => a("div", { class: "time-slot-skeleton", style: { animationDelay: `${t * 20}ms` } })))) : this.availability && this.availability.length === 0 ? a(f, null, a("div", { class: "empty" }, a("span", null, "No dates available"))) : (!this.times || this.times.length === 0) && this.selectedDate ? a(f, null, a("div", { class: "empty" }, a("span", null, "No time slots available for selected date"))) : this.selectedDate ? a(f, { part: "ntp" }, a("div", { class: "time-picker-wrapper" }, a("div", { class: "time-slots" }, this.times.map((e, t) => {
758
- var i, s, r, n;
759
- return a("button", { part: `ntp__timeslot ${((s = (i = this.selectedTimeslot) == null ? void 0 : i.start_time) == null ? void 0 : s.getTime()) === e.start_time.getTime() ? "ntp__timeslot--selected" : ""}`, "aria-role": "button", class: {
829
+ return this.isLoading ? a(h, null, a("div", { class: "loading" }, new Array(6).fill(0).map((e, t) => a("div", { class: "time-slot-skeleton", style: { animationDelay: `${t * 20}ms` } })))) : this.availability && this.availability.length === 0 ? a(h, null, a("div", { class: "empty" }, a("span", null, "No dates available"))) : (!this.times || this.times.length === 0) && this.selectedDate ? a(h, null, a("div", { class: "empty" }, a("span", null, "No time slots available for selected date"))) : this.selectedDate ? a(h, { part: "ntp" }, a("div", { class: "time-picker-wrapper" }, a("div", { class: "time-slots" }, this.times.map((e, t) => {
830
+ var n, s, o, i;
831
+ return a("button", { part: `ntp__timeslot ${((s = (n = this.selectedTimeslot) == null ? void 0 : n.start_time) == null ? void 0 : s.getTime()) === e.start_time.getTime() ? "ntp__timeslot--selected" : ""}`, "aria-role": "button", class: {
760
832
  time: !0,
761
- selected: typeof this.selectedTimeslot < "u" && ((n = (r = this.selectedTimeslot) == null ? void 0 : r.start_time) == null ? void 0 : n.getTime()) === e.start_time.getTime()
833
+ selected: typeof this.selectedTimeslot < "u" && ((i = (o = this.selectedTimeslot) == null ? void 0 : o.start_time) == null ? void 0 : i.getTime()) === e.start_time.getTime()
762
834
  }, onClick: () => this.onClickSelectTime(e, t), onMouseEnter: () => this.handleMouseEnter(t), onMouseLeave: () => this.handleMouseLeave() }, this.hoveredTimeslotIndex == t || this.selectedTimeslotIndex == this.getTimeslotId(e.start_time, t) ? this.getTimeSlotLabel(e) : e.start_time.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit", timeZone: this.selectedTimezone }));
763
- })), this.selectedTimeslot && a("div", { class: "footer" }, a("sp-button", { variant: "primary", onClick: (e) => this.handleConfirmedTimeslot(e, this.selectedTimeslot), part: "ntp__button-primary" }, a("slot", { name: "timeslot-picker-cta-label" }, "Next"))))) : a(f, null);
835
+ })), this.selectedTimeslot && a("div", { class: "footer" }, a("sp-button", { variant: "primary", onClick: (e) => this.handleConfirmedTimeslot(e, this.selectedTimeslot), part: "ntp__button-primary" }, a("slot", { name: "timeslot-picker-cta-label" }, "Next"))))) : a(h, null);
764
836
  }
765
837
  static get watchers() {
766
838
  return {
@@ -769,8 +841,8 @@ const U = class {
769
841
  };
770
842
  }
771
843
  };
772
- je([
773
- p({
844
+ Oe([
845
+ y({
774
846
  name: "nylas-timeslot-picker",
775
847
  stateToProps: /* @__PURE__ */ new Map([
776
848
  ["scheduler.selectedDate", "selectedDate"],
@@ -789,20 +861,20 @@ je([
789
861
  },
790
862
  fireRegisterEvent: !0
791
863
  }),
792
- P("design:type", Function),
793
- P("design:paramtypes", []),
794
- P("design:returntype", void 0)
795
- ], U.prototype, "render", null);
796
- U.style = Re;
864
+ H("design:type", Function),
865
+ H("design:paramtypes", []),
866
+ H("design:returntype", void 0)
867
+ ], te.prototype, "render", null);
868
+ te.style = Ne;
797
869
  export {
798
- H as nylas_booked_event_card,
799
- $ as nylas_booking_form,
800
- Z as nylas_cancel_booking_form,
801
- A as nylas_cancelled_event_card,
802
- G as nylas_date_picker,
803
- q as nylas_locale_switch,
804
- Ee as nylas_logo,
805
- ze as nylas_notification,
806
- W as nylas_selected_event_card,
807
- U as nylas_timeslot_picker
870
+ W as nylas_booked_event_card,
871
+ U as nylas_booking_form,
872
+ Y as nylas_cancel_booking_form,
873
+ X as nylas_cancelled_event_card,
874
+ K as nylas_date_picker,
875
+ Q as nylas_locale_switch,
876
+ Be as nylas_logo,
877
+ Re as nylas_notification,
878
+ ee as nylas_selected_event_card,
879
+ te as nylas_timeslot_picker
808
880
  };