@nylas/react 1.0.2-canary.2 → 1.1.0-canary.10

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 (145) hide show
  1. package/dist/add-circle-icon_21.entry-125b87a0.js +1719 -0
  2. package/dist/add-circle-icon_21.entry-1a699a29.cjs +1 -0
  3. package/dist/{archive-icon_7.entry-0e34d6e7.js → archive-icon_7.entry-70efea56.js} +13 -13
  4. package/dist/{archive-icon_7.entry-052ac074.cjs → archive-icon_7.entry-a69d3d98.cjs} +1 -1
  5. package/dist/{arrow-icon.entry-93f21385.cjs → arrow-icon.entry-0a07d7cc.cjs} +1 -1
  6. package/dist/{arrow-icon.entry-2afd9ea9.js → arrow-icon.entry-c9230436.js} +1 -1
  7. package/dist/{bold-icon_3.entry-88ce1d25.js → bold-icon_3.entry-54ff7799.js} +7 -7
  8. package/dist/bold-icon_3.entry-f7df4331.cjs +1 -0
  9. package/dist/{calendar-cancel-icon.entry-574c8aa4.cjs → calendar-cancel-icon.entry-71cc68e2.cjs} +1 -1
  10. package/dist/{calendar-cancel-icon.entry-e9c692fa.js → calendar-cancel-icon.entry-e5157332.js} +1 -1
  11. package/dist/{calendar-check-icon_2.entry-b0476bca.cjs → calendar-check-icon_2.entry-f02bf0fe.cjs} +1 -1
  12. package/dist/{calendar-check-icon_2.entry-d461c713.js → calendar-check-icon_2.entry-f75ef95e.js} +1 -1
  13. package/dist/{calendar-icon.entry-1ca202a4.js → calendar-icon.entry-67aa69f5.js} +1 -1
  14. package/dist/{calendar-icon.entry-98936e6d.cjs → calendar-icon.entry-a164e957.cjs} +1 -1
  15. package/dist/chevron-icon_3.entry-7687ca7a.cjs +1 -0
  16. package/dist/chevron-icon_3.entry-81c68946.js +117 -0
  17. package/dist/{close-icon.entry-8d6e9816.cjs → close-icon.entry-147b4d47.cjs} +1 -1
  18. package/dist/{close-icon.entry-37e8361f.js → close-icon.entry-3325a08e.js} +1 -1
  19. package/dist/{constants-b6bf6671-49a0f1f2.js → constants-f34b9c6e-21ac1910.js} +11 -2
  20. package/dist/{constants-b6bf6671-27e2557d.cjs → constants-f34b9c6e-99030371.cjs} +2 -2
  21. package/dist/{document-refresh-icon.entry-faea08ce.js → document-refresh-icon.entry-1b076630.js} +1 -1
  22. package/dist/{document-refresh-icon.entry-fcb33921.cjs → document-refresh-icon.entry-dea23e07.cjs} +1 -1
  23. package/dist/elements/index.d.ts +8 -0
  24. package/dist/{elements-dc5b338e-81a0319c.cjs → elements-dc5b338e-83c23e9b.cjs} +1 -1
  25. package/dist/{elements-dc5b338e-fb5dbfb5.js → elements-dc5b338e-c69d1f8a.js} +1 -1
  26. package/dist/focus-visible-e8093c16-3082af2c.cjs +1 -0
  27. package/dist/{focus-visible-e8093c16-28fc08a0.js → focus-visible-e8093c16-a6aff071.js} +5 -3
  28. package/dist/{forward-icon_6.entry-8da1f65d.js → forward-icon_6.entry-55fce1ca.js} +9 -11
  29. package/dist/forward-icon_6.entry-59c7a975.cjs +3 -0
  30. package/dist/{globe-icon.entry-4720304b.js → globe-icon.entry-25145785.js} +1 -1
  31. package/dist/{globe-icon.entry-90a0b9c9.cjs → globe-icon.entry-904f180f.cjs} +1 -1
  32. package/dist/google-logo-icon_4.entry-1f7b9522.js +387 -0
  33. package/dist/google-logo-icon_4.entry-feb7a561.cjs +1 -0
  34. package/dist/index-5f0940e0.cjs +37 -0
  35. package/dist/index-fd39ea9d.js +4042 -0
  36. package/dist/index.d.ts +4 -2
  37. package/dist/index.es-be19d2df-9ba9a7a6.cjs +7 -0
  38. package/dist/{index-10914bc1-346f04fa.js → index.es-be19d2df-ff4f0a10.js} +945 -1041
  39. package/dist/{info-icon_2.entry-9307db18.js → info-icon_2.entry-0e2105da.js} +3 -3
  40. package/dist/{info-icon_2.entry-81e95048.cjs → info-icon_2.entry-808e6516.cjs} +1 -1
  41. package/dist/loading-icon.entry-17efa7ca.cjs +1 -0
  42. package/dist/loading-icon.entry-a3b845bf.js +15 -0
  43. package/dist/{mailbox-store-e721b17c-cf9a43dd.js → mailbox-store-76540d24-5f0d1dff.js} +121 -59
  44. package/dist/mailbox-store-76540d24-ad0e366a.cjs +1 -0
  45. package/dist/{nylas-additional-participants.entry-1653dec7.js → nylas-additional-participants.entry-4120ea2e.js} +13 -15
  46. package/dist/nylas-additional-participants.entry-7e2446cb.cjs +1 -0
  47. package/dist/nylas-booked-event-card_10.entry-44812e35.cjs +1 -0
  48. package/dist/{nylas-booked-event-card_10.entry-aa971e8a.js → nylas-booked-event-card_10.entry-5e87b199.js} +294 -273
  49. package/dist/nylas-custom-booking-flow.entry-cbff44c8.js +106 -0
  50. package/dist/nylas-custom-booking-flow.entry-da5e66bb.cjs +1 -0
  51. package/dist/{nylas-form-card.entry-c4e78f88.js → nylas-form-card.entry-1c608edd.js} +13 -15
  52. package/dist/nylas-form-card.entry-2e629e36.cjs +1 -0
  53. package/dist/nylas-if-state.entry-2c0d8724.js +94 -0
  54. package/dist/nylas-if-state.entry-61771f3d.cjs +1 -0
  55. package/dist/{nylas-list-folders.entry-995fa819.js → nylas-list-folders.entry-d6e085b0.js} +6 -8
  56. package/dist/nylas-list-folders.entry-fa8e8ce9.cjs +1 -0
  57. package/dist/{nylas-list-threads.entry-21466eb3.js → nylas-list-threads.entry-4dd2de0a.js} +5 -7
  58. package/dist/nylas-list-threads.entry-99fc0baa.cjs +1 -0
  59. package/dist/nylas-login.entry-0ec0813c.cjs +1 -0
  60. package/dist/nylas-login.entry-6730e226.js +73 -0
  61. package/dist/{nylas-mailbox-pagination.entry-02d40186.js → nylas-mailbox-pagination.entry-5310880c.js} +7 -9
  62. package/dist/nylas-mailbox-pagination.entry-e3e52f42.cjs +1 -0
  63. package/dist/{nylas-mailbox-toolbar-button.entry-dbad44b4.js → nylas-mailbox-toolbar-button.entry-028075db.js} +15 -17
  64. package/dist/nylas-mailbox-toolbar-button.entry-4c377337.cjs +1 -0
  65. package/dist/nylas-mailbox.entry-87304850.cjs +1 -0
  66. package/dist/nylas-mailbox.entry-ab92780c.js +134 -0
  67. package/dist/nylas-provider.entry-3fb60fe4.cjs +1 -0
  68. package/dist/{nylas-provider.entry-bbee8c99.js → nylas-provider.entry-678a9fe7.js} +48 -58
  69. package/dist/nylas-scheduler-editor.entry-a0de0ae6.js +2269 -0
  70. package/dist/nylas-scheduler-editor.entry-cf19391e.cjs +7 -0
  71. package/dist/nylas-scheduling.entry-d8bb2648.cjs +1 -0
  72. package/dist/nylas-scheduling.entry-e38c3870.js +248 -0
  73. package/dist/nylas-threads-refresh.entry-79c8a061.cjs +1 -0
  74. package/dist/{nylas-threads-refresh.entry-414d8740.js → nylas-threads-refresh.entry-fcb2175f.js} +2 -4
  75. package/dist/{nylas-threads-search.entry-a19dc90f.js → nylas-threads-search.entry-7565bdf8.js} +13 -15
  76. package/dist/nylas-threads-search.entry-f2d5d0fb.cjs +1 -0
  77. package/dist/{nylas-view-thread.entry-38149162.js → nylas-view-thread.entry-1772e0c4.js} +10 -12
  78. package/dist/nylas-view-thread.entry-6a2ccece.cjs +1 -0
  79. package/dist/{people-icon.entry-4b682757.cjs → people-icon.entry-3218a267.cjs} +1 -1
  80. package/dist/{people-icon.entry-5c244c8d.js → people-icon.entry-bc2c70cf.js} +5 -5
  81. package/dist/play-icon_2.entry-450a7fa6.cjs +1 -0
  82. package/dist/play-icon_2.entry-b4dc4e6d.js +25 -0
  83. package/dist/react.cjs +1 -1
  84. package/dist/react.js +88 -78
  85. package/dist/{refresh-icon.entry-59fff3d4.cjs → refresh-icon.entry-030dda82.cjs} +1 -1
  86. package/dist/{refresh-icon.entry-63456c9a.js → refresh-icon.entry-d30c7264.js} +5 -5
  87. package/dist/register-component-83e24412-0b25de7f.cjs +1 -0
  88. package/dist/{register-component-d056a880-f3003d6c.js → register-component-83e24412-35c484c4.js} +37 -33
  89. package/dist/scheduler-config-store-ec3b6190-6d8cef0f.cjs +1 -0
  90. package/dist/scheduler-config-store-ec3b6190-d5edbae5.js +23 -0
  91. package/dist/scheduler-store-8ca9003d-38cca5ba.js +321 -0
  92. package/dist/scheduler-store-8ca9003d-c2aa3522.cjs +1 -0
  93. package/dist/time-period-selector.entry-b366ba86.js +76 -0
  94. package/dist/time-period-selector.entry-b3d04e93.cjs +1 -0
  95. package/dist/{translate-icon.entry-1784c18e.cjs → translate-icon.entry-03ab2513.cjs} +1 -1
  96. package/dist/{translate-icon.entry-35999e70.js → translate-icon.entry-b3c21ae9.js} +5 -5
  97. package/dist/warning-icon.entry-602d459b.js +15 -0
  98. package/dist/{warning-icon.entry-3a702d1d.cjs → warning-icon.entry-65ecfdf0.cjs} +1 -1
  99. package/package.json +3 -3
  100. package/dist/_commonjsHelpers-57e89916-4a3ae7d8.cjs +0 -1
  101. package/dist/_commonjsHelpers-57e89916-af061c86.js +0 -19
  102. package/dist/add-circle-icon_18.entry-b66b6343.cjs +0 -1
  103. package/dist/add-circle-icon_18.entry-f86ae88d.js +0 -1527
  104. package/dist/auth-store-69ac49c7-5a0bbb90.cjs +0 -1
  105. package/dist/auth-store-69ac49c7-cbfda055.js +0 -66
  106. package/dist/bold-icon_3.entry-8f55a9e7.cjs +0 -1
  107. package/dist/chevron-icon_3.entry-830f52c2.js +0 -105
  108. package/dist/chevron-icon_3.entry-f7801467.cjs +0 -1
  109. package/dist/focus-visible-e8093c16-f380b705.cjs +0 -1
  110. package/dist/forward-icon_6.entry-c4b37cb1.cjs +0 -3
  111. package/dist/index-10914bc1-c8c3a2f3.cjs +0 -7
  112. package/dist/index-457dcf0b.cjs +0 -30
  113. package/dist/index-ce40ad47.js +0 -1570
  114. package/dist/loading-icon.entry-06d37ef0.cjs +0 -1
  115. package/dist/loading-icon.entry-dc518df4.js +0 -15
  116. package/dist/mailbox-store-e721b17c-4e97e07d.cjs +0 -1
  117. package/dist/nylas-additional-participants.entry-ff8bf378.cjs +0 -1
  118. package/dist/nylas-booked-event-card_10.entry-06bc3c51.cjs +0 -1
  119. package/dist/nylas-editor-tabs.entry-49b5a3ab.cjs +0 -1
  120. package/dist/nylas-editor-tabs.entry-9d0959bf.js +0 -181
  121. package/dist/nylas-form-card.entry-69d2095b.cjs +0 -1
  122. package/dist/nylas-if-state_3.entry-2eb3f385.js +0 -293
  123. package/dist/nylas-if-state_3.entry-5baf6d6f.cjs +0 -1
  124. package/dist/nylas-list-folders.entry-3b24d92d.cjs +0 -1
  125. package/dist/nylas-list-threads.entry-fda42ded.cjs +0 -1
  126. package/dist/nylas-mailbox-pagination.entry-9dcd4901.cjs +0 -1
  127. package/dist/nylas-mailbox-toolbar-button.entry-d1099fab.cjs +0 -1
  128. package/dist/nylas-provider.entry-78e2fa30.cjs +0 -1
  129. package/dist/nylas-scheduler-editor.entry-550d3c59.cjs +0 -1
  130. package/dist/nylas-scheduler-editor.entry-8f7ecf3b.js +0 -111
  131. package/dist/nylas-scheduling.entry-22b5ad07.js +0 -236
  132. package/dist/nylas-scheduling.entry-30a63738.cjs +0 -1
  133. package/dist/nylas-threads-refresh.entry-05258b36.cjs +0 -1
  134. package/dist/nylas-threads-search.entry-ff21fc65.cjs +0 -1
  135. package/dist/nylas-view-thread.entry-5da81e99.cjs +0 -1
  136. package/dist/play-icon_2.entry-ccdc6b9c.cjs +0 -1
  137. package/dist/play-icon_2.entry-f36d6d55.js +0 -25
  138. package/dist/register-component-d056a880-2be11c56.cjs +0 -1
  139. package/dist/scheduler-config-store-4d035001-0256b40c.cjs +0 -1
  140. package/dist/scheduler-config-store-4d035001-db9dc78a.js +0 -33
  141. package/dist/scheduler-store-0fbe642c-14466305.js +0 -293
  142. package/dist/scheduler-store-0fbe642c-410fdbf4.cjs +0 -1
  143. package/dist/utils-0cd66d04-89ab163d.js +0 -2111
  144. package/dist/utils-0cd66d04-94b9c3b6.cjs +0 -8
  145. package/dist/warning-icon.entry-73de08c3.js +0 -15
@@ -1,1527 +0,0 @@
1
- import { r as g, h as a, c as C, H as k, g as _ } from "./index-ce40ad47.js";
2
- import { d, o as W, q as F, r as me, s as V, v as ae, w as ie, x as ye, y as ge, z as j, A as Re } from "./utils-0cd66d04-89ab163d.js";
3
- import { R as O } from "./register-component-d056a880-f3003d6c.js";
4
- import { T as ve, E as ke } from "./constants-b6bf6671-49a0f1f2.js";
5
- import { c as ze } from "./_commonjsHelpers-57e89916-af061c86.js";
6
- import "react";
7
- import "react-dom";
8
- const Be = ".sc-add-circle-icon-h{display:flex}", Ne = Be, Pe = class {
9
- constructor(e) {
10
- g(this, e), this.width = "24", this.height = "25";
11
- }
12
- render() {
13
- return a("svg", { key: "58ce81214aeed7ddc1ce5f76d674aba576422d48", width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, a("path", { key: "2a47ed74601a5370f0300da06295a2b5969d7e5f", d: "M12 2.5c5.523 0 10 4.477 10 10s-4.477 10-10 10-10-4.477-10-10 4.477-10 10-10ZM12 4a8.5 8.5 0 1 0 0 17 8.5 8.5 0 0 0 0-17Zm0 3.5a.75.75 0 0 1 .75.75v3.5h3.5a.75.75 0 0 1 0 1.5h-3.5v3.5a.75.75 0 0 1-1.5 0v-3.5h-3.5a.75.75 0 0 1 0-1.5h3.5v-3.5A.75.75 0 0 1 12 7.5Z", fill: "currentColor" }));
14
- }
15
- };
16
- Pe.style = Ne;
17
- const We = ".sc-calendar-info-icon-h{display:flex}", je = We, Ve = class {
18
- constructor(e) {
19
- g(this, e), this.width = "20", this.height = "20";
20
- }
21
- render() {
22
- return a("svg", { key: "4c290eae1d55ec9df96cbe6d9ba85d5d8b7ee102", width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, a("path", { key: "a2a76a5d0183952d59f1d2f448dc7c460694e410", d: "M12 0C13.3807 0 14.5 1.11929 14.5 2.5V6.59971C14.1832 6.43777 13.8486 6.30564 13.5 6.20703V4H1.5V11.5C1.5 12.3284 2.17157 13 3 13H6.70703C6.80564 13.3486 6.93777 13.6832 7.09971 14H3C1.61929 14 0.5 12.8807 0.5 11.5V2.5C0.5 1.11929 1.61929 0 3 0H12ZM12 1H3C2.17157 1 1.5 1.67157 1.5 2.5V3H13.5V2.5C13.5 1.67157 12.8284 1 12 1ZM11.375 9.5C11.375 9.15482 11.6548 8.875 12 8.875C12.3452 8.875 12.625 9.15482 12.625 9.5C12.625 9.84518 12.3452 10.125 12 10.125C11.6548 10.125 11.375 9.84518 11.375 9.5ZM12.5 13.5C12.5 13.7761 12.2761 14 12 14C11.7239 14 11.5 13.7761 11.5 13.5V11.5C11.5 11.2239 11.7239 11 12 11C12.2761 11 12.5 11.2239 12.5 11.5V13.5ZM7.5 11.5C7.5 9.01472 9.51472 7 12 7C14.4853 7 16.5 9.01472 16.5 11.5C16.5 13.9853 14.4853 16 12 16C9.51472 16 7.5 13.9853 7.5 11.5ZM8.5 11.5C8.5 13.433 10.067 15 12 15C13.933 15 15.5 13.433 15.5 11.5C15.5 9.567 13.933 8 12 8C10.067 8 8.5 9.567 8.5 11.5Z", fill: "currentColor" }));
23
- }
24
- };
25
- Ve.style = je;
26
- const Ue = ".sc-calendar-patterns-icon-h{display:flex}", Ze = Ue, Ye = class {
27
- constructor(e) {
28
- g(this, e), this.width = "20", this.height = "20";
29
- }
30
- render() {
31
- return a("svg", { key: "cf8071f578ad04793f5bd5b446dccaa1f6d4c1a3", width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, a("path", { key: "8e8a3c7d87bc41c6d6973a34863d05d996155c1d", d: "M3.25 0H11.75C13.2688 0 14.5 1.23122 14.5 2.75V11.25C14.5 12.7688 13.2688 14 11.75 14H3.25C1.73122 14 0.5 12.7688 0.5 11.25V2.75C0.5 1.23122 1.73122 0 3.25 0ZM2 2.75V4H13V2.75C13 2.05964 12.4404 1.5 11.75 1.5H3.25C2.55964 1.5 2 2.05964 2 2.75ZM12.2071 5L8.20711 9H10.7929L13 6.79289V5H12.2071ZM10.7929 5H8.20711L4.20711 9H6.79289L10.7929 5ZM2.79289 9L6.79289 5H4.20711L2 7.20711V9H2.79289ZM2 5.79289L2.79289 5H2V5.79289ZM12.2071 9H13V8.20711L12.2071 9Z", fill: "currentColor" }));
32
- }
33
- };
34
- Ye.style = Ze;
35
- const Ke = ".sc-flow-icon-h{display:flex}", qe = Ke, Je = class {
36
- constructor(e) {
37
- g(this, e), this.width = "16", this.height = "12";
38
- }
39
- render() {
40
- return a("svg", { key: "e0f4da46b751754406e8b0551890a1bffb1100e4", width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, a("path", { key: "21997cb261d91c8589c3e87a01036dc8f91a8d9b", d: "M13 1.66211C11.8954 1.66211 11 2.55754 11 3.66211C11 4.76668 11.8954 5.66211 13 5.66211C14.1046 5.66211 15 4.76668 15 3.66211C15 2.55754 14.1046 1.66211 13 1.66211ZM10.0407 3.16678C10.2768 1.74563 11.5119 0.662109 13 0.662109C14.6569 0.662109 16 2.00526 16 3.66211C16 5.31896 14.6569 6.66211 13 6.66211C11.5162 6.66211 10.2839 5.58482 10.0428 4.16971C9.37629 4.23688 8.82682 4.7426 8.71466 5.41551L8.27173 8.07311C8.07929 9.22776 7.11428 10.087 5.9593 10.1574C5.72319 11.5786 4.48813 12.6621 3 12.6621C1.34315 12.6621 0 11.319 0 9.66211C0 8.00526 1.34315 6.66211 3 6.66211C4.48384 6.66211 5.71607 7.73939 5.95724 9.15451C6.62371 9.08734 7.17318 8.58162 7.28534 7.90871L7.72827 5.25111C7.92071 4.09646 8.88571 3.23718 10.0407 3.16678ZM3 7.66211C1.89543 7.66211 1 8.55754 1 9.66211C1 10.7667 1.89543 11.6621 3 11.6621C4.10457 11.6621 5 10.7667 5 9.66211C5 8.55754 4.10457 7.66211 3 7.66211Z", fill: "currentColor" }));
41
- }
42
- };
43
- Je.style = qe;
44
- const Ge = ".sc-location-icon-h{display:flex}", Xe = Ge, Qe = class {
45
- constructor(e) {
46
- g(this, e), this.width = "16", this.height = "18";
47
- }
48
- render() {
49
- return a("svg", { key: "5b9c42e29bed565ef37d35d8196c038d0fb12a0c", width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, a("path", { key: "8be7bf4ede319cce00e35be8270c85c14bcbc4b5", d: "M10 7.66211C10 9.31896 8.65685 10.6621 7 10.6621C5.34315 10.6621 4 9.31896 4 7.66211C4 6.00526 5.34315 4.66211 7 4.66211C8.65685 4.66211 10 6.00526 10 7.66211ZM9 7.66211C9 6.55754 8.10457 5.66211 7 5.66211C5.89543 5.66211 5 6.55754 5 7.66211C5 8.76668 5.89543 9.66211 7 9.66211C8.10457 9.66211 9 8.76668 9 7.66211ZM11.9497 12.6171C14.6834 9.88221 14.6834 5.44812 11.9497 2.71326C9.21608 -0.0216067 4.78392 -0.0216067 2.05025 2.71326C-0.683418 5.44812 -0.683418 9.88221 2.05025 12.6171L3.57128 14.1159L5.61408 16.101L5.74691 16.2188C6.52168 16.8468 7.65623 16.8076 8.38611 16.1012L10.8223 13.7312L11.9497 12.6171ZM2.75499 3.4183C5.09944 1.07282 8.90055 1.07282 11.245 3.4183C13.5294 5.70364 13.5879 9.3725 11.4207 11.7288L11.245 11.912L9.92371 13.216L7.69315 15.3846L7.60016 15.4642C7.24594 15.732 6.7543 15.732 6.40012 15.4642L6.30713 15.3845L3.3263 12.4791L2.75499 11.912L2.57927 11.7288C0.412077 9.3725 0.47065 5.70364 2.75499 3.4183Z", fill: "currentColor" }));
50
- }
51
- };
52
- Qe.style = Xe;
53
- const et = ".sc-location-off-icon-h{display:flex}", tt = et, nt = class {
54
- constructor(e) {
55
- g(this, e), this.width = "16", this.height = "18";
56
- }
57
- render() {
58
- return a("svg", { key: "9f486b38064361394fa89c330d79cf275c862143", width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, a("path", { key: "02ef40d3c0d44a0eb38e8018ede7d30102e5e74b", d: "M0.146447 0.808556C0.341709 0.613294 0.658291 0.613294 0.853553 0.808556L15.8536 15.8086C16.0488 16.0038 16.0488 16.3204 15.8536 16.5157C15.6583 16.7109 15.3417 16.7109 15.1464 16.5157L12.0938 13.463L11.8223 13.7312L9.38611 16.1012C8.65623 16.8076 7.52168 16.8468 6.74691 16.2188L6.61408 16.101L4.57128 14.1159L3.05025 12.6171C0.607421 10.1732 0.347525 6.37239 2.27056 3.63976L0.146447 1.51566C-0.0488155 1.3204 -0.0488155 1.00382 0.146447 0.808556ZM9.07768 10.4469C8.74346 10.576 8.38024 10.6468 8.0005 10.6468C6.34839 10.6468 5.00909 9.30689 5.00909 7.65406C5.00909 7.27461 5.07967 6.91166 5.20843 6.57763L2.98793 4.35713C1.49206 6.62038 1.68917 9.67377 3.57927 11.7288L3.75499 11.912L4.3263 12.4791L7.30713 15.3845L7.40012 15.4642C7.7543 15.732 8.24594 15.732 8.60016 15.4642L8.69315 15.3846L10.9237 13.216L11.3883 12.7575L9.07768 10.4469ZM9.85409 8.39486L10.5983 9.13904C10.8487 8.70143 10.9919 8.19447 10.9919 7.65406C10.9919 6.00122 9.65261 4.66134 8.0005 4.66134C7.45986 4.66134 6.95271 4.80482 6.51504 5.05581L7.25921 5.79998C7.48839 5.70819 7.73855 5.6577 8.0005 5.6577C9.10258 5.6577 9.99599 6.5515 9.99599 7.65406C9.99599 7.91581 9.94564 8.16581 9.85409 8.39486ZM4.35291 2.89368C6.70671 1.08827 10.0908 1.26314 12.245 3.4183C14.3986 5.57283 14.5739 8.95702 12.771 11.3118L13.4812 12.022C15.6702 9.27273 15.493 5.25762 12.9497 2.71326C10.4058 0.168159 6.39081 -0.00843871 3.64269 2.18347L4.35291 2.89368Z", fill: "currentColor" }));
59
- }
60
- };
61
- nt.style = tt;
62
- const at = ':host{display:block;width:inherit;--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}.dropdown{display:inline-block;width:100%;position:relative}.dropdown .dropdown-label{display:flex;align-items:center;gap:0.25rem;color:var(--nylas-base-800)}.dropbtn{width:inherit;height:48px;color:black;padding:0.5rem;font-size:1rem;cursor:pointer;display:flex;gap:0.5rem;justify-content:space-between;align-items:center;background:transparent;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}.dropbtn.focus{background:transparent}.dropbtn:hover,.dropbtn:active{border:1px solid var(--nylas-primary)}.dropbtn:active{outline:2px solid var(--nylas-primary)}.dropbtn span.open{transform:rotate(90deg)}.dropbtn span.closed{transform:rotate(270deg)}.dropdown-content{display:block;margin-top:0.5rem;background-color:var(--nylas-base-0);width:100%;max-height:336px;overflow:auto;border:1px solid #ddd;z-index:1;border-radius:4px;position:absolute;box-shadow:0px 4px 6px -2px rgba(0, 0, 0, 0.0509803922);box-shadow:0px 10px 15px -3px rgba(0, 0, 0, 0.1019607843)}.dropdown-content ul{padding:0;list-style-type:none;color:var(--nylas-base-900);max-height:336px}.dropdown-content ul li{padding:16px, 12px, 16px, 12px;color:black;padding:12px 16px;text-decoration:none;display:block;font-family:inherit;font-size:14px;font-weight:400;line-height:20px;letter-spacing:0px;text-align:left;cursor:pointer}.dropdown-content ul li:hover,.dropdown-content ul li:focus{background-color:var(--nylas-base-100)}.dropdown-content ul li label{display:flex;align-items:center;gap:0.5rem}.dropdown-content ul li label input{margin:0}.selected-options{display:flex;flex-wrap:wrap;gap:0.5rem;padding:0.5rem 0;margin-top:0.25rem;background:var(--nylas-base-0)}.selected-options .selected-option{display:flex;align-items:center;gap:0.5rem;padding:4px 8px;border-radius:var(--nylas-border-radius-2x);background:var(--nylas-base-100);color:var(--nylas-base-800);font-size:16px;font-weight:500;line-height:1.5rem;letter-spacing:0.5px}.selected-options .selected-option button{background:transparent;border:none;cursor:pointer;padding:0}.selected-options .selected-option button:hover{color:var(--nylas-primary)}', it = at, st = class {
63
- constructor(e) {
64
- g(this, e), this.selectedOptionsChanged = C(this, "selectedOptionsChanged", 7), this.name = void 0, this.label = void 0, this.options = [], this.availableOptions = this.options, this.isOpen = !1, this.ariaActivedescendant = "", this.shouldFocusFirstOption = !1;
65
- }
66
- componentDidRender() {
67
- d("multi-select-dropdown", "componentDidRender"), this.isOpen && this.shouldFocusFirstOption && (this.ariaActivedescendant = this.availableOptions[0].value, this.focusOption(0), this.shouldFocusFirstOption = !1);
68
- }
69
- handleOutsideClick(e) {
70
- !e.composedPath().includes(this.el) && this.isOpen && (this.isOpen = !1);
71
- }
72
- selectOption(e) {
73
- this.availableOptions = this.availableOptions.map((n) => (n.value === e.value && (n.selected = !e.selected), n));
74
- const t = this.availableOptions.filter((n) => n.selected).map((n) => n.value);
75
- this.selectedOptionsChanged.emit({
76
- value: t,
77
- name: this.name
78
- });
79
- }
80
- toggleDropdown() {
81
- this.isOpen = !this.isOpen, this.isOpen ? this.shouldFocusFirstOption = !0 : this.ariaActivedescendant = "";
82
- }
83
- handleSelectButtonKeyDown(e) {
84
- switch (e.key) {
85
- case "ArrowDown":
86
- case "Enter":
87
- e.preventDefault(), this.isOpen || this.toggleDropdown();
88
- break;
89
- case "Escape":
90
- this.isOpen = !1;
91
- break;
92
- }
93
- }
94
- handleListboxKeydown(e) {
95
- const t = this.availableOptions, n = t.findIndex((s) => s.value === this.ariaActivedescendant);
96
- switch (e.key) {
97
- case "ArrowDown":
98
- case "Tab":
99
- if (e.shiftKey) {
100
- e.preventDefault();
101
- const l = n - 1 >= 0 ? n - 1 : t.length - 1;
102
- this.ariaActivedescendant = t[l].value, this.focusOption(l);
103
- } else {
104
- e.preventDefault();
105
- const l = n + 1 < t.length ? n + 1 : 0;
106
- this.ariaActivedescendant = t[l].value, this.focusOption(l);
107
- }
108
- break;
109
- case "ArrowUp":
110
- e.preventDefault();
111
- const s = n - 1 >= 0 ? n - 1 : t.length - 1;
112
- this.ariaActivedescendant = t[s].value, this.focusOption(s);
113
- break;
114
- case "Enter":
115
- e.preventDefault(), this.ariaActivedescendant && this.selectOption(t[n]);
116
- break;
117
- case "Escape":
118
- this.isOpen = !1;
119
- break;
120
- }
121
- }
122
- focusOption(e) {
123
- var l;
124
- const t = this.availableOptions[e];
125
- if (!t)
126
- return;
127
- const n = t.value, s = (l = this.el.shadowRoot) == null ? void 0 : l.getElementById(n);
128
- s && (s.focus(), s.scrollIntoView({ behavior: "smooth", block: "nearest" }));
129
- }
130
- getSelectedOptions() {
131
- return this.availableOptions.filter((e) => e.selected);
132
- }
133
- renderOption(e) {
134
- return a("li", { key: e.value, id: e.value, role: "option", tabindex: "0", "aria-selected": e.selected ? "true" : "false", onClick: (t) => {
135
- t.stopImmediatePropagation(), this.selectOption(e);
136
- }, class: { selected: !!e.selected } }, a("label", { htmlFor: e.value }, a("input", { "aria-hidden": "true", id: e.value, type: "checkbox", checked: e.selected }), a("span", null, e.label)));
137
- }
138
- render() {
139
- var e, t;
140
- return a(k, { key: "ff71916f4c5b0904c1c88acc24092685bb1a8c56" }, a("div", { key: "e9ff8065a2c85506b433bd5d9a58227f92486187", class: "dropdown", part: "msd_dropdown" }, a("label", { key: "10b60608219600df241af49b91ab63d1c70394a5", class: "dropdown-label" }, this.label, a("slot", { key: "9a9ceafb10875657f758a4f315dbe88c7184ef15", name: "label-icon", "aria-hidden": "true" })), a("button", { key: "4d004314767768524db8ab302e602e6a28929558", part: "msd_dropdown-button", class: { dropbtn: !0, open: this.isOpen }, onClick: () => this.toggleDropdown(), "aria-haspopup": "listbox", "aria-expanded": this.isOpen ? "true" : "false", "aria-label": this.name, onKeyDown: (n) => this.handleSelectButtonKeyDown(n) }, a("slot", { key: "2556aed7a1ff5a5428d5a334d80aa408a26b836a", name: "select-icon", "aria-hidden": "true" }), a("span", { key: "e237a06138def9e1279231715c933c0d27f7b5ea", class: "selected-option", part: "msd_dropdown-button-selected-label" }, this.getSelectedOptions().length > 1 ? `Multiple ${this.name}s selected` : ((e = this.availableOptions.filter((n) => n.selected)[0]) == null ? void 0 : e.label) ?? ((t = this.availableOptions[0]) == null ? void 0 : t.label)), a("span", { key: "0ff8048547586614e1b14dca82e271c3e3bb49c7", class: this.isOpen ? "open" : "closed", "aria-hidden": "true" }, a("chevron-icon", { key: "aab301fdd0e369aede69e378649d2b294b049d88", width: "16", height: "16" }))), this.isOpen ? null : a("div", { class: "selected-options" }, this.getSelectedOptions().map((n) => a("span", { class: "selected-option" }, n.label, a("button", { key: n.label, onClick: () => this.selectOption(n) }, a("close-icon", null))))), this.isOpen ? a("div", { class: "dropdown-content", part: "msd_dropdown-content" }, a("ul", { tabindex: "-1", role: "listbox", "aria-label": this.name, "aria-multiselectable": !0, "aria-activedescendant": this.ariaActivedescendant, onKeyDown: (n) => this.handleListboxKeydown(n) }, this.availableOptions.map((n) => this.renderOption(n)))) : null));
141
- }
142
- get el() {
143
- return _(this);
144
- }
145
- };
146
- st.style = it;
147
- const lt = ':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;width:inherit}.nylas-availability-picker{width:inherit;display:flex;flex-direction:column;margin:1rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-200)}.nylas-availability-picker .header{padding:1rem;border-bottom:1px solid var(--nylas-base-200)}.nylas-availability-picker .header h3{margin:0;font-size:1rem;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-availability-picker .header p{margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.nylas-availability-picker .content{padding:1rem;color:var(--nylas-base-900)}.nylas-availability-picker .content .select-timezone{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--nylas-base-200);padding-bottom:1rem}.nylas-availability-picker .content .select-timezone h4{display:flex;gap:0.5rem;align-items:center;margin:0;font-size:1rem;font-weight:500;line-height:20px}.nylas-availability-picker .content .select-timezone select-dropdown{border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}.nylas-availability-picker .content .availability{display:flex;flex-direction:column;gap:1rem;padding:0 0.5rem;margin:1rem 0}.nylas-availability-picker .content .availability .availability-day{display:grid;grid-template-columns:minmax(auto, 65px) 1fr minmax(auto, 40px);gap:1rem;align-items:baseline}@media screen and (max-width: 768px){.nylas-availability-picker .content .availability .availability-day{grid-template-columns:auto}}.nylas-availability-picker .content .availability .availability-day .day{display:flex;gap:0.5rem;align-items:center}.nylas-availability-picker .content .availability .availability-day .time-ranges span.unavailable{height:48px;display:flex;align-items:center}.nylas-availability-picker .content .availability .availability-day .time-ranges .time-range{display:flex;gap:1.5rem;justify-content:space-between;align-items:baseline}.nylas-availability-picker .content .availability .availability-day .time-ranges .time-range .pickers{display:flex;gap:1rem}.nylas-availability-picker .content .availability .availability-day .time-ranges .time-range .pickers span{margin-top:0.75rem}.nylas-availability-picker .content .availability .availability-day .time-ranges .time-range:not(:last-of-type){margin-bottom:1rem}.nylas-availability-picker .content .availability .availability-day .time-ranges p.error{color:var(--nylas-error)}.nylas-availability-picker .content .availability .availability-day button{border:none;background:transparent;height:40px;cursor:pointer;color:var(--nylas-base-800)}.nylas-availability-picker .content .availability .availability-day button:hover,.nylas-availability-picker .content .availability .availability-day button:active{color:var(--nylas-primary)}', ot = lt;
148
- var rt = function(e, t, n, s) {
149
- var l = arguments.length, i = l < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, n) : s, o;
150
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
151
- i = Reflect.decorate(e, t, n, s);
152
- else
153
- for (var r = e.length - 1; r >= 0; r--)
154
- (o = e[r]) && (i = (l < 3 ? o(i) : l > 3 ? o(t, n, i) : o(t, n)) || i);
155
- return l > 3 && i && Object.defineProperty(t, n, i), i;
156
- }, se = function(e, t) {
157
- if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
158
- return Reflect.metadata(e, t);
159
- };
160
- const xe = class {
161
- constructor(e) {
162
- g(this, e), this.valueChanged = C(this, "valueChanged", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.openHours = void 0, this.name = "availability", this.defaultTimezone = Intl.DateTimeFormat().resolvedOptions().timeZone, this.schedule = {
163
- SUN: [],
164
- MON: [{ start: "09:00am", end: "05:00pm" }],
165
- TUE: [{ start: "09:00am", end: "05:00pm" }],
166
- WED: [{ start: "09:00am", end: "05:00pm" }],
167
- THU: [{ start: "09:00am", end: "05:00pm" }],
168
- FRI: [{ start: "09:00am", end: "05:00pm" }],
169
- SAT: []
170
- }, this.timezone = Intl.DateTimeFormat().resolvedOptions().timeZone, this.overlapDays = {};
171
- }
172
- elementNameChangedHandler(e) {
173
- d("nylas-calendar-picker", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
174
- }
175
- scheduleChanged(e, t) {
176
- var n;
177
- if (e !== t) {
178
- this.valueChanged.emit({
179
- value: this.scheduleToOpenHours(e, this.timezone),
180
- name: this.name
181
- });
182
- let s = {};
183
- if (Object.keys(e).forEach((l) => {
184
- const i = e[l];
185
- if (i.length > 0) {
186
- const o = this.getOverlaps(i);
187
- o.length > 0 && (s[l] = o);
188
- }
189
- }), this.overlapDays = s, typeof this.internals.setFormValue != "function")
190
- return;
191
- if (Object.keys(s).length > 0) {
192
- const l = (n = this.host.shadowRoot) == null ? void 0 : n.getElementById(Object.keys(s)[0]);
193
- l && this.internals.setValidity({ customError: !0 }, "Overlapping time ranges found", l);
194
- } else
195
- this.internals.setValidity({ customError: !1 }), this.internals.setFormValue(JSON.stringify(this.scheduleToOpenHours(e, this.timezone)));
196
- }
197
- }
198
- selectedOptionChangedHandler(e) {
199
- const { name: t, value: n } = e.detail;
200
- if (t === "timezone") {
201
- if (this.timezone = n, typeof this.internals.setFormValue != "function")
202
- return;
203
- this.internals.setFormValue(JSON.stringify(this.scheduleToOpenHours(this.schedule, this.timezone)));
204
- }
205
- }
206
- connectedCallback() {
207
- d("nylas-availability-picker", "connectedCallback");
208
- }
209
- disconnectedCallback() {
210
- d("nylas-availability-picker", "disconnectedCallback");
211
- }
212
- componentWillLoad() {
213
- d("nylas-availability-picker", "componentWillLoad"), this.host.setAttribute("name", this.name);
214
- }
215
- componentDidLoad() {
216
- d("nylas-availability-picker", "componentDidLoad"), this.openHours && this.openHours.length > 0 && this.updateSchedule(this.openHours), typeof this.internals.setFormValue == "function" && this.internals.setFormValue(JSON.stringify(this.scheduleToOpenHours(this.schedule, this.timezone)));
217
- }
218
- getOverlaps(e) {
219
- let t = e.map((s, l) => ({
220
- start: W(s.start),
221
- end: W(s.end),
222
- originalIndex: l
223
- }));
224
- t.sort((s, l) => s.start - l.start);
225
- let n = [];
226
- for (let s = 1; s < t.length; s++)
227
- t[s].start < t[s - 1].end && (n.includes(t[s].originalIndex) || n.push(t[s].originalIndex), n.includes(t[s - 1].originalIndex) || n.push(t[s - 1].originalIndex));
228
- return n.sort((s, l) => s - l);
229
- }
230
- addTimeRange(e) {
231
- const t = this.schedule[e], n = 0, s = 1425;
232
- if (t.length === 0)
233
- this.schedule[e] = [{ start: "09:00am", end: "05:00pm" }];
234
- else {
235
- const l = t.map((o) => ({
236
- start: W(o.start),
237
- end: W(o.end)
238
- })).sort((o, r) => o.start - r.start), i = l[l.length - 1].end;
239
- if (i + 60 <= s)
240
- this.schedule[e].push({
241
- start: F(j(i)),
242
- end: F(j(i + 60))
243
- });
244
- else {
245
- let o = !1;
246
- if (l[0].start > n + 60 && (this.schedule[e].push({
247
- start: F(j(n)),
248
- end: F(j(n + 60))
249
- }), o = !0), !o)
250
- for (let r = 0; r < l.length - 1; r++) {
251
- const h = l[r].end;
252
- if (l[r + 1].start - h >= 60) {
253
- this.schedule[e].push({
254
- start: F(j(h)),
255
- end: F(j(h + 60))
256
- });
257
- break;
258
- }
259
- }
260
- }
261
- }
262
- this.schedule[e].sort((l, i) => W(l.start) - W(i.start)), this.schedule = { ...this.schedule };
263
- }
264
- removeTimeRange(e, t) {
265
- this.schedule[e].splice(t, 1), this.schedule = { ...this.schedule };
266
- }
267
- setTime(e, t, n) {
268
- const [s, l] = e.split("_"), [i, o] = s.split(":");
269
- l === "start" ? this.schedule[i][o].start = n : l === "end" && (this.schedule[i][o].end = n), this.internals.setValidity({ customError: !1 }), this.schedule = { ...this.schedule };
270
- }
271
- setFormError(e, t, n) {
272
- var o;
273
- const [s, l] = e.split("_"), i = (o = this.host.shadowRoot) == null ? void 0 : o.getElementById(e);
274
- i && this.internals.setValidity({ customError: !0 }, `Invalid ${l} time`, i);
275
- }
276
- updateSchedule(e) {
277
- const t = {
278
- SUN: [],
279
- MON: [],
280
- TUE: [],
281
- WED: [],
282
- THU: [],
283
- FRI: [],
284
- SAT: []
285
- };
286
- e.forEach((n) => {
287
- n.days.forEach((s) => {
288
- const l = this.getDayKey(s), i = F(n.start), o = F(n.end), r = { start: i, end: o };
289
- let h = !1;
290
- t[l] && (h = t[l].some((f) => f.start === r.start && f.end === r.end)), h || (t[l] ? t[l].push(r) : t[l] = [r]);
291
- });
292
- }), e.length === 0 && (this.timezone = e[0].timezone), this.timezone = e[0].timezone, this.schedule = t;
293
- }
294
- getDayKey(e) {
295
- return ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"][e];
296
- }
297
- scheduleToOpenHours(e, t = "UTC") {
298
- const n = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"];
299
- let s = /* @__PURE__ */ new Map();
300
- n.forEach((i, o) => {
301
- e[i] && e[i].forEach((r) => {
302
- const h = me(r.start), f = me(r.end), u = `${h}-${f}`;
303
- if (!s.has(u))
304
- s.set(u, { days: [o], start: h, end: f });
305
- else {
306
- let p = s.get(u);
307
- p && (p.days.push(o), s.set(u, p));
308
- }
309
- });
310
- });
311
- let l = [];
312
- return s.forEach((i, o) => {
313
- l.push({
314
- days: i.days,
315
- start: i.start,
316
- end: i.end,
317
- timezone: t
318
- });
319
- }), l;
320
- }
321
- render() {
322
- const e = Object.keys(ve).map((t) => ({
323
- label: ve[t],
324
- value: t
325
- }));
326
- return a(k, { key: "212096aa82e4abcfb7ab34a0a0921e541c4570af" }, a("div", { key: "83a12b281dd08f77e2a184941f47f69c29d804ba", class: "nylas-availability-picker" }, a("div", { key: "82f32b28ac7e9e13c1aa01a0cc99bd2ea68f2400", class: "header", part: "ncp__header" }, a("h3", { key: "c47f420a6c0226b2d3352d178f8c739978554195" }, "General availability"), a("p", { key: "badf2c5553670dc99da06815fc418dba59772f7a" }, "Set your availability for scheduling meetings.")), a("div", { key: "32d90f90f5c98ec4afb71286d5963e4431b65932", class: "content" }, a("div", { key: "f29ed9e09dd1c480b1cc93f6adebf0af6d7a17f9", class: "select-timezone" }, a("h4", { key: "82f68bd68a4c775afb5c16641ce7c42769850722", class: "sub-header" }, "Select timezone", a("span", { key: "3f6113c3d9703096321389d4f7ac6daa259f13f5", class: "icon" }, a("tooltip-component", { key: "c2c8212ae124d05ccc150c14a3efd1a16e027970" }, a("info-icon", { key: "f80669ec0e2200c94351a98ce3a7ba710f154df4", slot: "tooltip-icon" }), a("span", { key: "25f33c0424a8bcb48b5e09a9e1297877834f9ff2", slot: "tooltip-content" }, "Select your timezone for displaying availability.")))), a("select-dropdown", { key: "fa2b1fbb694ac302e94e8b75740a26b3ec841fdc", name: "timezone", options: e, defaultSelectedOption: e.find((t) => t.value === this.defaultTimezone) }, a("span", { key: "a8795a7bbf57c96e54ed30a8bf53884119f5a051", slot: "select-icon" }, a("globe-icon", { key: "f041371f0d5be498ee7c474296f97d8995bcd9e4", width: "20", height: "20" })))), a("div", { key: "caa143f02b423a5bee811b944246fff8746e2229", class: "availability" }, Object.keys(this.schedule).map((t) => {
327
- const n = t, s = this.schedule[t];
328
- return a("div", { class: "availability-day" }, a("div", { class: "day", part: "ndp__day" }, a("input", { type: "checkbox", name: n, id: n, checked: s.length > 0, onClick: () => {
329
- s.length > 0 ? this.schedule[n] = [] : this.schedule[n] = [{ start: "09:00am", end: "05:00pm" }], this.schedule = { ...this.schedule };
330
- } }), a("label", { htmlFor: n, "aria-label": "Select day" }, n)), a("div", { class: "time-ranges" }, s.length ? null : a("span", { class: "unavailable" }, "Unavailable"), s.length > 0 && s.map((l, i) => {
331
- var h, f;
332
- const o = `${t}:${i}_start`, r = `${t}:${i}_end`;
333
- return a("div", { class: "time-range" }, a("div", { class: "pickers" }, a("nylas-time-window-picker", { id: o, hasError: (h = this.overlapDays[n]) == null ? void 0 : h.includes(i), time: l.start, name: o, key: o, setTime: (u, p) => this.setTime(o, u, p), setFormError: (u, p) => this.setFormError(o, u, p) }), a("span", null, " - "), a("nylas-time-window-picker", { id: r, hasError: (f = this.overlapDays[n]) == null ? void 0 : f.includes(i), time: l.end, name: r, key: r, minimumStartTime: l.start, setTime: (u, p) => this.setTime(r, u, p), setFormError: (u, p) => this.setFormError(r, u, p) })), a("button", { onClick: () => this.removeTimeRange(n, i) }, a("close-icon", null)));
334
- }), a("p", { class: "error" }, this.overlapDays[n] ? "Overlapping time ranges" : "")), a("div", null, s.length > 0 ? a("button", { onClick: () => this.addTimeRange(n) }, a("add-circle-icon", null)) : null));
335
- })))));
336
- }
337
- static get formAssociated() {
338
- return !0;
339
- }
340
- get host() {
341
- return _(this);
342
- }
343
- static get watchers() {
344
- return {
345
- name: ["elementNameChangedHandler"],
346
- schedule: ["scheduleChanged"]
347
- };
348
- }
349
- };
350
- rt([
351
- O({
352
- name: "nylas-availability-picker",
353
- fireRegisterEvent: !0
354
- }),
355
- se("design:type", Function),
356
- se("design:paramtypes", []),
357
- se("design:returntype", void 0)
358
- ], xe.prototype, "render", null);
359
- xe.style = ot;
360
- const dt = ':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;width:inherit}.nylas-booking-calendar-picker{width:inherit;display:flex;flex-direction:column;margin:1rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-200)}.nylas-booking-calendar-picker .header{padding:1rem;border-bottom:1px solid var(--nylas-base-200)}.nylas-booking-calendar-picker .header h3{margin:0;font-size:1rem;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-booking-calendar-picker .header p{margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__loading{padding-bottom:1rem}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__loading .label{display:flex;align-items:center;gap:0.5rem;margin:1rem 1rem 0;color:var(--nylas-base-800)}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__loading .loading-button{margin:0 1rem;padding:0;width:inherit;height:48px;color:black;font-size:1rem;cursor:not-allowed;display:flex;gap:0.5rem;justify-content:space-between;align-items:center;background:transparent;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__loading .loading-button span{padding:0 1rem}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__dropdown{padding:1rem}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__dropdown span.label{display:flex;align-items:center;gap:4px;color:var(--nylas-base-800)}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__dropdown span.label tooltip-component{display:flex}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__dropdown select-dropdown::part(sd_dropdown){width:100%}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__dropdown select-dropdown::part(sd_dropdown-content){width:100%;max-width:unset}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__dropdown select-dropdown::part(sd_dropdown-button){width:100%;display:flex;justify-content:space-between;align-items:center;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);padding:1rem}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__dropdown select-dropdown::part(sd_dropdown-button-selected-label){max-width:calc(100% - 2rem);font-family:var(--nylas-font-family);font-size:16px;line-height:24px}', ct = dt;
361
- var ft = function(e, t, n, s) {
362
- var l = arguments.length, i = l < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, n) : s, o;
363
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
364
- i = Reflect.decorate(e, t, n, s);
365
- else
366
- for (var r = e.length - 1; r >= 0; r--)
367
- (o = e[r]) && (i = (l < 3 ? o(i) : l > 3 ? o(t, n, i) : o(t, n)) || i);
368
- return l > 3 && i && Object.defineProperty(t, n, i), i;
369
- }, le = function(e, t) {
370
- if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
371
- return Reflect.metadata(e, t);
372
- };
373
- const we = class {
374
- constructor(e) {
375
- g(this, e), this.valueChanged = C(this, "valueChanged", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.calendars = void 0, this.name = "calendar", this.defaultBookingCalendar = "", this.selectedCalendar = "";
376
- }
377
- connectedCallback() {
378
- d("nylas-booking-calendar-picker", "connectedCallback");
379
- }
380
- disconnectedCallback() {
381
- d("nylas-booking-calendar-picker", "disconnectedCallback");
382
- }
383
- componentWillLoad() {
384
- d("nylas-booking-calendar-picker", "componentWillLoad"), this.host.setAttribute("name", this.name);
385
- }
386
- componentDidLoad() {
387
- d("nylas-booking-calendar-picker", "componentDidLoad"), typeof this.internals.setFormValue == "function" && this.internals.setFormValue(this.defaultBookingCalendar.toString(), "booking-calendar"), this.selectedCalendar = this.defaultBookingCalendar;
388
- }
389
- componentWillUpdate() {
390
- d("nylas-booking-calendar-picker", "componentWillUpdate");
391
- }
392
- componentDidUpdate() {
393
- d("nylas-booking-calendar-picker", "componentDidUpdate");
394
- }
395
- componentWillRender() {
396
- d("nylas-booking-calendar-picker", "componentWillRender");
397
- }
398
- componentDidRender() {
399
- d("nylas-booking-calendar-picker", "componentDidRender");
400
- }
401
- elementNameChangedHandler(e) {
402
- d("nylas-booking-calendar-picker", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
403
- }
404
- selectedOptionChangedHandler(e) {
405
- d("nylas-booking-calendar-picker", "selectedOptionChangedHandler", e.detail);
406
- const t = (n) => {
407
- const { value: s } = n.detail;
408
- this.selectedCalendar = s, this.internals.setFormValue(s.toString(), "booking-calendar");
409
- };
410
- this.valueChanged.emit({ ...e.detail, valueChanged: t });
411
- }
412
- render() {
413
- var t;
414
- const e = ((t = this.calendars) == null ? void 0 : t.map((n) => ({
415
- value: n.id,
416
- label: n.name
417
- }))) ?? [];
418
- return a(k, null, a("div", { class: "nylas-booking-calendar-picker" }, a("div", { class: "header", part: "ncp__header" }, a("h3", null, "Calendar booking"), a("p", null, "Choose calendar where you’d like the event bookings to show up.")), e.length > 0 ? a("div", { class: "nylas-booking-calendar-picker__dropdown" }, a("span", { class: "label" }, "Select a calendar to book meetings on", a("tooltip-component", null, a("info-icon", { slot: "tooltip-icon" }), a("span", { slot: "tooltip-content" }, "Check availability across one or multiple calendars. If multiple calendars are selected, you must be available across all of them to be considered available."))), a("select-dropdown", { name: "booking-calendar", options: e, withSearch: !1, defaultSelectedOption: e.find((n) => n.value == this.defaultBookingCalendar) ?? e[0] })) : a("div", { class: "nylas-booking-calendar-picker__loading" }, a("span", { class: "label" }, "Select a calendar to book meetings on ", a("info-icon", null)), a("div", { class: "loading-button" }, a("span", null, "Loading...")))));
419
- }
420
- static get formAssociated() {
421
- return !0;
422
- }
423
- get host() {
424
- return _(this);
425
- }
426
- static get watchers() {
427
- return {
428
- name: ["elementNameChangedHandler"]
429
- };
430
- }
431
- };
432
- ft([
433
- O({
434
- name: "nylas-booking-calendar-picker",
435
- eventToProps: {
436
- valueChanged: async (e, t) => {
437
- const { valueChanged: n } = e.detail;
438
- n && n(e);
439
- }
440
- },
441
- fireRegisterEvent: !0
442
- }),
443
- le("design:type", Function),
444
- le("design:paramtypes", []),
445
- le("design:returntype", void 0)
446
- ], we.prototype, "render", null);
447
- we.style = ct;
448
- const pt = ':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;width:inherit}.nylas-buffer-time{width:inherit;display:flex;flex-direction:column;margin:1rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-200);text-align:left}.nylas-buffer-time .header{padding:1rem;border-bottom:1px solid var(--nylas-base-200)}.nylas-buffer-time .header h3{margin:0;font-size:1rem;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-buffer-time .header p{margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.nylas-buffer-time .nylas-buffer-time__body{display:grid;grid-template-columns:1fr auto}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__dropdown{padding:1rem;display:flex;flex-direction:column;gap:1rem;border-right:1px solid var(--nylas-base-200)}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__dropdown .nylas-buffer-time__row{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:1rem}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__dropdown .nylas-buffer-time__row label{width:200px}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__dropdown .nylas-buffer-time__row .dropdown-container{display:flex;gap:1rem;align-items:center}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__preview{width:200px;padding:1rem;background:var(--nylas-base-25);border-bottom-right-radius:var(--nylas-border-radius-2x)}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__preview h4{font-size:12px;line-height:24px;color:var(--nylas-base-600);font-family:var(--nylas-font-family);font-weight:500;text-align:center}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__preview .preview-container .slot{background-color:transparent;border-top:1px solid var(--nylas-base-300)}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__preview .preview-container .slot.active{background-color:var(--nylas-base-100)}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__preview .preview-container .slot:last-of-type{border-bottom:1px solid var(--nylas-base-300)}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__preview .preview-container .event-slot{background-color:var(--nylas-base-600);border-top:1px solid var(--nylas-base-300);border-bottom:1px solid var(--nylas-base-300)}.nylas-buffer-time .nylas-buffer-time__dropdown select-dropdown::part(sd_dropdown-button){width:104px;display:flex;justify-content:space-between;align-items:center;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);padding:1rem}.nylas-buffer-time .nylas-buffer-time__dropdown select-dropdown::part(sd_dropdown-content){width:100%}.nylas-buffer-time .nylas-buffer-time__dropdown select-dropdown::part(sd_dropdown-button-selected-label){max-width:calc(100% - 2rem);font-family:var(--nylas-font-family);font-size:16px;line-height:24px}', ht = pt;
449
- var bt = function(e, t, n, s) {
450
- var l = arguments.length, i = l < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, n) : s, o;
451
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
452
- i = Reflect.decorate(e, t, n, s);
453
- else
454
- for (var r = e.length - 1; r >= 0; r--)
455
- (o = e[r]) && (i = (l < 3 ? o(i) : l > 3 ? o(t, n, i) : o(t, n)) || i);
456
- return l > 3 && i && Object.defineProperty(t, n, i), i;
457
- }, oe = function(e, t) {
458
- if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
459
- return Reflect.metadata(e, t);
460
- };
461
- const Ce = class {
462
- constructor(e) {
463
- g(this, e), this.valueChanged = C(this, "valueChanged", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.name = "buffer-time", this.buffer = { before: 0, after: 0 }, this.selectedBeforeBufferTime = this.buffer.before, this.selectedAfterBufferTime = this.buffer.after;
464
- }
465
- connectedCallback() {
466
- d("nylas-buffer-time", "connectedCallback");
467
- }
468
- disconnectedCallback() {
469
- d("nylas-buffer-time", "disconnectedCallback");
470
- }
471
- componentWillLoad() {
472
- d("nylas-buffer-time", "componentWillLoad"), this.host.setAttribute("name", this.name);
473
- }
474
- componentDidLoad() {
475
- if (d("nylas-buffer-time", "componentDidLoad"), typeof this.internals.setFormValue == "function") {
476
- const e = {
477
- before: this.selectedBeforeBufferTime,
478
- after: this.selectedAfterBufferTime
479
- };
480
- this.internals.setFormValue(JSON.stringify(e), this.name);
481
- }
482
- this.selectedAfterBufferTime = this.buffer.after, this.selectedBeforeBufferTime = this.buffer.before;
483
- }
484
- componentWillUpdate() {
485
- d("nylas-buffer-time", "componentWillUpdate");
486
- }
487
- componentDidUpdate() {
488
- d("nylas-buffer-time", "componentDidUpdate");
489
- }
490
- componentWillRender() {
491
- d("nylas-buffer-time", "componentWillRender");
492
- }
493
- componentDidRender() {
494
- d("nylas-buffer-time", "componentDidRender");
495
- }
496
- elementNameChangedHandler(e) {
497
- d("nylas-buffer-time", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
498
- }
499
- selectedOptionChangedHandler(e) {
500
- d("nylas-buffer-time", "selectedOptionChangedHandler", e.detail);
501
- const t = (n) => {
502
- const { value: s, name: l } = n.detail;
503
- l === "before-buffer-time" ? this.selectedBeforeBufferTime = parseInt(s) : l === "after-buffer-time" && (this.selectedAfterBufferTime = parseInt(s));
504
- const i = {
505
- before: this.selectedBeforeBufferTime,
506
- after: this.selectedAfterBufferTime
507
- };
508
- this.internals.setFormValue(JSON.stringify(i), "booking-calendar");
509
- };
510
- this.valueChanged.emit({ ...e.detail, valueChanged: t });
511
- }
512
- renderPreview() {
513
- const s = (o) => {
514
- const r = Math.floor(o / 30), h = o % 30 / 30 * 20;
515
- return {
516
- fullSlots: r,
517
- partialFillHeight: h
518
- };
519
- }, l = () => {
520
- const { fullSlots: o, partialFillHeight: r } = s(this.selectedBeforeBufferTime);
521
- return Array.from({ length: 4 }, (h, f) => {
522
- const u = this.selectedBeforeBufferTime > 0 && f > 4 - o - 1, p = this.selectedBeforeBufferTime > 0 && f === 4 - o - 1 && r > 0;
523
- let v = {};
524
- return u && !p ? v.backgroundColor = "var(--nylas-base-100)" : p && (v.background = `linear-gradient(to top, var(--nylas-base-100) ${r}px, transparent 0)`), a("div", { class: `slot ${u ? "active" : ""}`, style: {
525
- height: "20px",
526
- ...v
527
- } });
528
- });
529
- }, i = () => {
530
- const { fullSlots: o, partialFillHeight: r } = s(this.selectedAfterBufferTime);
531
- return Array.from({ length: 4 }, (h, f) => {
532
- const u = this.selectedAfterBufferTime > 0 && f < o, p = f === o && r > 0;
533
- let v = {};
534
- return u && !p ? v.backgroundColor = "var(--nylas-base-100)" : p && (v.background = `linear-gradient(to bottom, var(--nylas-base-100) ${r}px, transparent 0)`), a("div", { class: `slot ${u ? "active" : ""}`, style: {
535
- height: "20px",
536
- ...v
537
- } });
538
- });
539
- };
540
- return a("div", { class: "preview-container" }, l(), a("div", { class: "event-slot", style: { height: "40px" } }), i());
541
- }
542
- render() {
543
- const e = Array.from({ length: 121 }, (t, n) => ({
544
- label: n.toString(),
545
- value: n
546
- }));
547
- return a(k, null, a("div", { class: "nylas-buffer-time" }, a("div", { class: "header", part: "ncp__header" }, a("h3", null, "Buffer time"), a("p", null, "Add buffer time before and after the event.")), a("div", { class: "nylas-buffer-time__body" }, a("div", { class: "nylas-buffer-time__dropdown" }, a("div", { class: "nylas-buffer-time__row" }, a("label", null, "Before the event"), a("div", { class: "dropdown-container" }, a("select-dropdown", { id: "before-buffer-time", name: "before-buffer-time", options: e, defaultSelectedOption: e.find((t) => t.value == this.selectedBeforeBufferTime) ?? e[0] }), a("span", null, "mins"))), a("div", { class: "nylas-buffer-time__row" }, a("label", null, "After the event"), a("div", { class: "dropdown-container" }, a("select-dropdown", { id: "after-buffer-time", name: "after-buffer-time", options: e, defaultSelectedOption: e.find((t) => t.value == this.selectedAfterBufferTime) ?? e[0] }), a("span", null, "mins")))), a("div", { class: "nylas-buffer-time__preview" }, a("h4", null, "PREVIEW"), this.renderPreview()))));
548
- }
549
- static get formAssociated() {
550
- return !0;
551
- }
552
- get host() {
553
- return _(this);
554
- }
555
- static get watchers() {
556
- return {
557
- name: ["elementNameChangedHandler"]
558
- };
559
- }
560
- };
561
- bt([
562
- O({
563
- name: "nylas-buffer-time",
564
- eventToProps: {
565
- valueChanged: async (e, t) => {
566
- const { valueChanged: n } = e.detail;
567
- n && n(e);
568
- }
569
- },
570
- fireRegisterEvent: !0
571
- }),
572
- oe("design:type", Function),
573
- oe("design:paramtypes", []),
574
- oe("design:returntype", void 0)
575
- ], Ce.prototype, "render", null);
576
- Ce.style = ht;
577
- const ut = ':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;width:inherit}.nylas-calendar-picker{width:inherit;display:flex;flex-direction:column;margin:1rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-200)}.nylas-calendar-picker .header{padding:1rem;border-bottom:1px solid var(--nylas-base-200)}.nylas-calendar-picker .header h3{margin:0;font-size:1rem;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-calendar-picker .header p{margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.nylas-calendar-picker .nylas-calendar-picker__loading{padding-bottom:1rem}.nylas-calendar-picker .nylas-calendar-picker__loading .label{display:flex;align-items:center;gap:0.5rem;margin:1rem 1rem 0;color:var(--nylas-base-800)}.nylas-calendar-picker .nylas-calendar-picker__loading .label tooltip-component{display:flex}.nylas-calendar-picker .nylas-calendar-picker__loading .loading-button{margin:0 1rem;padding:0;width:inherit;height:48px;color:black;font-size:1rem;cursor:not-allowed;display:flex;gap:0.5rem;justify-content:space-between;align-items:center;background:transparent;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}.nylas-calendar-picker .nylas-calendar-picker__loading .loading-button span{padding:0 1rem}.nylas-calendar-picker .nylas-calendar-picker__dropdown{padding:1rem}.nylas-calendar-picker .nylas-calendar-picker__dropdown multi-select-dropdown::part(msd_dropdown){width:100%}.nylas-calendar-picker .nylas-calendar-picker__dropdown multi-select-dropdown::part(msd_dropdown-button){width:100%;display:flex;justify-content:space-between;align-items:center;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);padding:1rem}.nylas-calendar-picker .nylas-calendar-picker__dropdown multi-select-dropdown::part(msd_dropdown-content){width:100%;max-width:unset}.nylas-calendar-picker .nylas-calendar-picker__dropdown multi-select-dropdown::part(msd_dropdown-button-selected-label){max-width:calc(100% - 2rem);font-family:var(--nylas-font-family);font-size:16px;line-height:24px}', mt = ut;
578
- var yt = function(e, t, n, s) {
579
- var l = arguments.length, i = l < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, n) : s, o;
580
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
581
- i = Reflect.decorate(e, t, n, s);
582
- else
583
- for (var r = e.length - 1; r >= 0; r--)
584
- (o = e[r]) && (i = (l < 3 ? o(i) : l > 3 ? o(t, n, i) : o(t, n)) || i);
585
- return l > 3 && i && Object.defineProperty(t, n, i), i;
586
- }, re = function(e, t) {
587
- if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
588
- return Reflect.metadata(e, t);
589
- };
590
- const _e = class {
591
- constructor(e) {
592
- g(this, e), this.valueChanged = C(this, "valueChanged", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.calendars = void 0, this.organizerEmail = void 0, this.name = "calendar", this.defaultSelectedCalendars = [], this.selectedCalendars = [];
593
- }
594
- connectedCallback() {
595
- d("nylas-calendar-picker", "connectedCallback");
596
- }
597
- disconnectedCallback() {
598
- d("nylas-calendar-picker", "disconnectedCallback");
599
- }
600
- componentWillLoad() {
601
- d("nylas-calendar-picker", "componentWillLoad"), this.host.setAttribute("name", this.name);
602
- }
603
- componentDidLoad() {
604
- d("nylas-calendar-picker", "componentDidLoad"), typeof this.internals.setFormValue == "function" && this.internals.setFormValue(this.defaultSelectedCalendars.toString(), "calendar");
605
- }
606
- componentWillUpdate() {
607
- d("nylas-calendar-picker", "componentWillUpdate");
608
- }
609
- componentDidUpdate() {
610
- d("nylas-calendar-picker", "componentDidUpdate");
611
- }
612
- componentWillRender() {
613
- d("nylas-calendar-picker", "componentWillRender");
614
- }
615
- componentDidRender() {
616
- d("nylas-calendar-picker", "componentDidRender");
617
- }
618
- elementNameChangedHandler(e) {
619
- d("nylas-calendar-picker", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
620
- }
621
- selectedOptionsChangedHandler(e) {
622
- d("nylas-calendar-picker", "selectedOptionChangedHandler", e.detail);
623
- const t = (n) => {
624
- const { value: s } = n.detail;
625
- this.selectedCalendars = [...s], this.internals.setFormValue(s.toString(), "calendar");
626
- };
627
- this.valueChanged.emit({ ...e.detail, name: this.name, valueChangedHandler: t });
628
- }
629
- render() {
630
- var t;
631
- const e = ((t = this.calendars) == null ? void 0 : t.map((n) => {
632
- var s, l;
633
- return {
634
- value: n.id,
635
- label: n.name,
636
- selected: ((s = this.defaultSelectedCalendars) == null ? void 0 : s.includes(n.id)) || ((l = this.defaultSelectedCalendars) == null ? void 0 : l.includes("primary")) && n.id === this.organizerEmail
637
- };
638
- })) ?? [];
639
- return a(k, null, a("div", { class: "nylas-calendar-picker" }, a("div", { class: "header", part: "ncp__header" }, a("h3", null, "Calendar availability"), a("p", null, "Select calendars that you’d like to use for checking your availability.")), e.length > 0 ? a("div", { class: "nylas-calendar-picker__dropdown" }, a("multi-select-dropdown", { name: "calendar", label: "Select calendars that will be checked for availability", options: e }, a("span", { slot: "label-icon" }, a("tooltip-component", null, a("info-icon", { slot: "tooltip-icon" }), a("span", { slot: "tooltip-content" }, "Check availability across one or multiple calendars. If multiple calendars are selected, you must be available across all of them to be considered available. The default is your primary calendar if none are selected."))))) : a("div", { class: "nylas-calendar-picker__loading" }, a("span", { class: "label" }, "Select calendars that will be checked for availability ", a("info-icon", null)), a("div", { class: "loading-button" }, a("span", null, "Loading...")))));
640
- }
641
- static get formAssociated() {
642
- return !0;
643
- }
644
- get host() {
645
- return _(this);
646
- }
647
- static get watchers() {
648
- return {
649
- name: ["elementNameChangedHandler"]
650
- };
651
- }
652
- };
653
- yt([
654
- O({
655
- name: "nylas-calendar-picker",
656
- eventToProps: {
657
- valueChanged: async (e, t) => {
658
- const { valueChangedHandler: n } = e.detail;
659
- n && n(e);
660
- }
661
- },
662
- fireRegisterEvent: !0
663
- }),
664
- re("design:type", Function),
665
- re("design:paramtypes", []),
666
- re("design:returntype", void 0)
667
- ], _e.prototype, "render", null);
668
- _e.style = mt;
669
- const gt = ':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;width:inherit}.nylas-custom-booking-flow{width:inherit;display:flex;flex-direction:column;margin:1rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-200)}.nylas-custom-booking-flow .header{padding:1rem;border-bottom:1px solid var(--nylas-base-200)}.nylas-custom-booking-flow .header h3{margin:0;font-size:1rem;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-custom-booking-flow .header p{margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.nylas-custom-booking-flow .nylas-custom-booking-flow__loading{padding-bottom:1rem}.nylas-custom-booking-flow .nylas-custom-booking-flow__loading .label{display:flex;align-items:center;gap:0.5rem;margin:1rem 1rem 0;color:var(--nylas-base-800)}.nylas-custom-booking-flow .nylas-custom-booking-flow__loading .loading-button{margin:0 1rem;padding:0;width:inherit;height:48px;color:black;font-size:1rem;cursor:not-allowed;display:flex;gap:0.5rem;justify-content:space-between;align-items:center;background:transparent;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}.nylas-custom-booking-flow .nylas-custom-booking-flow__loading .loading-button span{padding:0 1rem}.nylas-custom-booking-flow .nylas-custom-booking-flow__dropdown{padding:1rem}.nylas-custom-booking-flow .nylas-custom-booking-flow__dropdown span.label{display:flex;align-items:center;gap:4px;color:var(--nylas-base-800)}.nylas-custom-booking-flow .nylas-custom-booking-flow__dropdown span.label tooltip-component{display:flex}.nylas-custom-booking-flow .nylas-custom-booking-flow__dropdown select-dropdown::part(sd_dropdown){width:100%}.nylas-custom-booking-flow .nylas-custom-booking-flow__dropdown select-dropdown::part(sd_dropdown-button){width:100%;display:flex;justify-content:space-between;align-items:center;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);padding:1rem}.nylas-custom-booking-flow .nylas-custom-booking-flow__dropdown select-dropdown::part(sd_dropdown-content){width:100%;max-width:unset}.nylas-custom-booking-flow .nylas-custom-booking-flow__dropdown select-dropdown::part(sd_dropdown-button-selected-label){max-width:calc(100% - 2rem);font-family:var(--nylas-font-family);font-size:16px;line-height:24px}', vt = gt;
670
- var kt = function(e, t, n, s) {
671
- var l = arguments.length, i = l < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, n) : s, o;
672
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
673
- i = Reflect.decorate(e, t, n, s);
674
- else
675
- for (var r = e.length - 1; r >= 0; r--)
676
- (o = e[r]) && (i = (l < 3 ? o(i) : l > 3 ? o(t, n, i) : o(t, n)) || i);
677
- return l > 3 && i && Object.defineProperty(t, n, i), i;
678
- }, de = function(e, t) {
679
- if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
680
- return Reflect.metadata(e, t);
681
- };
682
- const Te = class {
683
- constructor(e) {
684
- g(this, e), this.valueChanged = C(this, "valueChanged", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.name = "booking-type", this.bookingType = "", this.selectedBookingType = "";
685
- }
686
- connectedCallback() {
687
- d("nylas-custom-booking-flow", "connectedCallback");
688
- }
689
- disconnectedCallback() {
690
- d("nylas-custom-booking-flow", "disconnectedCallback");
691
- }
692
- componentWillLoad() {
693
- d("nylas-custom-booking-flow", "componentWillLoad"), this.host.setAttribute("name", this.name);
694
- }
695
- componentDidLoad() {
696
- d("nylas-custom-booking-flow", "componentDidLoad"), typeof this.internals.setFormValue == "function" && this.internals.setFormValue(this.bookingType.toString(), "booking-calendar"), this.selectedBookingType = this.bookingType;
697
- }
698
- componentWillUpdate() {
699
- d("nylas-custom-booking-flow", "componentWillUpdate");
700
- }
701
- componentDidUpdate() {
702
- d("nylas-custom-booking-flow", "componentDidUpdate");
703
- }
704
- componentWillRender() {
705
- d("nylas-custom-booking-flow", "componentWillRender");
706
- }
707
- componentDidRender() {
708
- d("nylas-custom-booking-flow", "componentDidRender");
709
- }
710
- elementNameChangedHandler(e) {
711
- d("nylas-custom-booking-flow", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
712
- }
713
- selectedOptionChangedHandler(e) {
714
- d("nylas-custom-booking-flow", "selectedOptionChangedHandler", e.detail);
715
- const t = (n) => {
716
- const { value: s } = n.detail;
717
- this.selectedBookingType = s, this.internals.setFormValue(s.toString(), "booking-calendar");
718
- };
719
- this.valueChanged.emit({ ...e.detail, valueChanged: t });
720
- }
721
- render() {
722
- const e = [
723
- {
724
- label: "Automatically accept bookings",
725
- value: "booking"
726
- },
727
- {
728
- label: "Manually confirm/decline bookings",
729
- value: "pre-booking"
730
- }
731
- ];
732
- return a(k, { key: "8caff7b115db52f355185615eab1e5c0c3fe32db" }, a("div", { key: "9c43d51b15ceefa958560b8fbb0a684f77e58eb0", class: "nylas-custom-booking-flow" }, a("div", { key: "2d25054eef5b8208ad0e1b9ac165e023061cb85c", class: "header", part: "ncp__header" }, a("h3", { key: "63f570c5f8e6423123eaec621dacda10be0a33e6" }, "Customize booking flow"), a("p", { key: "cf6b5cb225510a9bb6ba9cee1fa850caa331c9ea" }, "Customize how new bookings are handled when a booking is completed.")), e.length > 0 ? a("div", { class: "nylas-custom-booking-flow__dropdown" }, a("span", { class: "label" }, "After a booking is confirmed", a("tooltip-component", null, a("info-icon", { slot: "tooltip-icon" }), a("span", { slot: "tooltip-content" }, "Choose how you’d like to handle new bookings. If you choose to manually confirm/decline bookings, you will be able to review and accept or decline each booking request."))), a("select-dropdown", { name: "booking-type", options: e, withSearch: !1, defaultSelectedOption: e.find((t) => t.value == this.bookingType) ?? e[0] })) : a("div", { class: "nylas-custom-booking-flow__loading" }, a("span", { class: "label" }, "Select a calendar to book meetings on ", a("info-icon", null)), a("div", { class: "loading-button" }, a("span", null, "Loading...")))));
733
- }
734
- static get formAssociated() {
735
- return !0;
736
- }
737
- get host() {
738
- return _(this);
739
- }
740
- static get watchers() {
741
- return {
742
- name: ["elementNameChangedHandler"]
743
- };
744
- }
745
- };
746
- kt([
747
- O({
748
- name: "nylas-custom-booking-flow",
749
- eventToProps: {
750
- valueChanged: async (e, t) => {
751
- const { valueChanged: n } = e.detail;
752
- n && n(e);
753
- }
754
- },
755
- fireRegisterEvent: !0
756
- }),
757
- de("design:type", Function),
758
- de("design:paramtypes", []),
759
- de("design:returntype", void 0)
760
- ], Te.prototype, "render", null);
761
- Te.style = vt;
762
- const xt = ':host{--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-event-description{display:flex;flex-direction:column;gap:4px}.nylas-event-description label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:14px;font-style:normal;font-weight:400;line-height:150%;}.nylas-event-description label span.label-icon{margin-left:4px}.nylas-event-description label span.label-icon tooltip-component{display:flex}.nylas-event-description textarea{padding:12px 16px;border-width:1;resize:vertical;border-radius:8px;font-family:var(--nylas-font-family);font-size:16px;line-height:24px;border:1px solid var(--nylas-base-200)}.nylas-event-description textarea::-webkit-resizer{display:none}', wt = xt;
763
- var Ct = function(e, t, n, s) {
764
- var l = arguments.length, i = l < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, n) : s, o;
765
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
766
- i = Reflect.decorate(e, t, n, s);
767
- else
768
- for (var r = e.length - 1; r >= 0; r--)
769
- (o = e[r]) && (i = (l < 3 ? o(i) : l > 3 ? o(t, n, i) : o(t, n)) || i);
770
- return l > 3 && i && Object.defineProperty(t, n, i), i;
771
- }, ce = function(e, t) {
772
- if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
773
- return Reflect.metadata(e, t);
774
- };
775
- const Oe = class {
776
- constructor(e) {
777
- g(this, e), this.valueChanged = C(this, "valueChanged", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.eventDescription = void 0, this.description = this.eventDescription ?? "", this.name = "description";
778
- }
779
- elementNameChangedHandler(e) {
780
- d("nylas-event-description", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
781
- }
782
- connectedCallback() {
783
- d("nylas-event-description", "connectedCallback");
784
- }
785
- componentWillLoad() {
786
- d("nylas-event-description", "componentWillLoad"), this.host.setAttribute("name", this.name);
787
- }
788
- componentDidLoad() {
789
- d("nylas-event-description", "componentDidLoad");
790
- }
791
- disconnectedCallback() {
792
- d("nylas-event-description", "disconnectedCallback");
793
- }
794
- handleChange(e) {
795
- this.description = e.target.value, this.internals.setFormValue(e.target.value, "description"), this.valueChanged.emit({ value: e.target.value, name: this.name });
796
- }
797
- render() {
798
- return a(k, { key: "d9ddc56b47dc13868d46d5ecccaf573125d9d930" }, a("div", { key: "e266bc83de28714a40934cd97d3d7faa9b579612", class: "nylas-event-description" }, a("label", { key: "15dea6c63596093c5dbc2f1abb8c414af6a7d059", htmlFor: "description" }, "Event description", a("span", { key: "615987a7b3b7595fed47462d9337f3731449586d", class: "label-icon" }, a("tooltip-component", { key: "ea67b662376df9d50b6dd51892ae5ed241e0c911" }, a("info-icon", { key: "2e6dafef89f8d1575c583b7bcb7da7486687439b", slot: "tooltip-icon" }), a("span", { key: "b435c40a6abfef7114f04f752e97a20eade17ae5", slot: "tooltip-content" }, "Provide any additional details for your event.")))), a("textarea", { key: "35d614a13f24213668c504ee427956e81d18185d", id: "description", name: "description", value: this.description, maxlength: "8192", onInput: (e) => this.handleChange(e) })));
799
- }
800
- static get formAssociated() {
801
- return !0;
802
- }
803
- get host() {
804
- return _(this);
805
- }
806
- static get watchers() {
807
- return {
808
- name: ["elementNameChangedHandler"]
809
- };
810
- }
811
- };
812
- Ct([
813
- O({
814
- name: "nylas-event-description",
815
- eventToProps: {},
816
- fireRegisterEvent: !0
817
- }),
818
- ce("design:type", Function),
819
- ce("design:paramtypes", []),
820
- ce("design:returntype", void 0)
821
- ], Oe.prototype, "render", null);
822
- Oe.style = wt;
823
- const _t = ':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-event-duration{display:flex;flex-direction:column;gap:4px}.nylas-event-duration label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:14px;font-style:normal;font-weight:400;line-height:150%;}.nylas-event-duration label span.required{color:var(--nylas-error, #cc4841)}.nylas-event-duration label span.label-icon{margin-left:4px}.nylas-event-duration label span.label-icon tooltip-component{display:flex}.nylas-event-duration__wrapper{display:flex;align-items:center;gap:0.5rem}.nylas-event-duration__wrapper input{padding:12px 16px;border-width:1;border-radius:8px;border:1px solid var(--nylas-base-200);font-family:var(--nylas-font-family);font-size:16px;line-height:24px;width:48px}.nylas-event-duration__wrapper select-dropdown::part(sd_dropdown-button){border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);padding:12px 16px}.nylas-event-duration__wrapper select-dropdown::part(sd_dropdown-button-selected-label){font-family:var(--nylas-font-family);font-size:16px;line-height:24px}', Tt = _t;
824
- var Ot = function(e, t, n, s) {
825
- var l = arguments.length, i = l < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, n) : s, o;
826
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
827
- i = Reflect.decorate(e, t, n, s);
828
- else
829
- for (var r = e.length - 1; r >= 0; r--)
830
- (o = e[r]) && (i = (l < 3 ? o(i) : l > 3 ? o(t, n, i) : o(t, n)) || i);
831
- return l > 3 && i && Object.defineProperty(t, n, i), i;
832
- }, fe = function(e, t) {
833
- if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
834
- return Reflect.metadata(e, t);
835
- };
836
- const Se = class {
837
- constructor(e) {
838
- g(this, e), this.valueChanged = C(this, "valueChanged", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.name = "duration", this.eventDurationMinutes = void 0, this.duration = this.eventDurationMinutes ? this.eventDurationMinutes >= 60 ? this.eventDurationMinutes / 60 : this.eventDurationMinutes : 5, this.durationMinutes = this.eventDurationMinutes ?? 5, this.durationIncrement = this.eventDurationMinutes && this.eventDurationMinutes >= 60 ? 60 : 1;
839
- }
840
- elementNameChangedHandler(e) {
841
- d("nylas-event-duration", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
842
- }
843
- durationMinutesChangedHandler(e, t) {
844
- d("nylas-event-duration", "durationMinutesChangedHandler", e), e !== t && this.valueChanged.emit({ value: e.toString(), name: this.name });
845
- }
846
- connectedCallback() {
847
- d("nylas-event-duration", "connectedCallback");
848
- }
849
- componentWillLoad() {
850
- d("nylas-event-duration", "componentWillLoad"), this.host.setAttribute("name", this.name);
851
- }
852
- componentDidLoad() {
853
- d("nylas-event-duration", "componentDidLoad"), this.internals.setFormValue(this.durationMinutes.toString(), "duration");
854
- }
855
- disconnectedCallback() {
856
- d("nylas-event-duration", "disconnectedCallback");
857
- }
858
- handleChange(e) {
859
- this.duration = e.target.value, this.durationMinutes = this.duration * this.durationIncrement, this.internals.setFormValue(this.durationMinutes.toString(), "duration");
860
- }
861
- handleBlur() {
862
- (this.duration === null || this.duration === void 0) && this.durationIncrement === 1 && (this.duration = 5), (this.duration <= 0 || this.duration === null || this.duration === void 0) && this.durationIncrement === 60 && (this.duration = 1), this.duration < 5 && this.durationIncrement === 1 && (this.duration = 5), this.duration > 720 && this.durationIncrement === 1 && (this.duration = 720), this.duration > 12 && this.durationIncrement === 60 && (this.duration = 12), this.durationMinutes = this.duration * this.durationIncrement, this.internals.setFormValue(this.durationMinutes.toString(), "duration");
863
- }
864
- selectedOptionChangedHandler(e) {
865
- d("nylas-calendar-picker", "selectedOptionChangedHandler", e.detail);
866
- const { value: t } = e.detail;
867
- this.durationIncrement = parseInt(t), this.durationIncrement === 1 ? this.duration = 5 : this.duration = 1, this.durationMinutes = this.duration * this.durationIncrement, this.internals.setFormValue(this.durationMinutes.toString(), "duration");
868
- }
869
- render() {
870
- const e = [
871
- { value: 1, label: "minutes" },
872
- { value: 60, label: "hours" }
873
- ];
874
- return a(k, { key: "75a6d393097f97adeee60d72fb29054876965598" }, a("div", { key: "e9f8bb8666505fde3ed1979cca7288c3eef13e20", class: "nylas-event-duration" }, a("label", { key: "37701c923fff3654317cfcc36e2300f20d4c4925", htmlFor: "duration" }, "Event duration", a("span", { key: "7f39f7f4fb8ffdc0fd7900edee0ac3ec330a88b0", class: "required" }, "*"), a("span", { key: "410df0fe6b679346d2347e2df08aa17a29b21b98", class: "label-icon" }, a("tooltip-component", { key: "42883303ef733e39e110568d556c3d9f943a8292" }, a("info-icon", { key: "feda0379b69dbe55563959d5f7bc10b8230c2ad9", slot: "tooltip-icon" }), a("span", { key: "44f88a269e336398bb5c48dca1e529aac07a5ddb", slot: "tooltip-content" }, "Set the duration of your event.")))), a("div", { key: "84b6c6aa9b431ef3e300e26b8ea81b49e975a003", class: "nylas-event-duration__wrapper" }, a("input", { key: "599e0d424d7366cce3723fe9d30c45d52ec75958", type: "number", id: "duration", name: "duration", value: this.duration, onBlur: () => this.handleBlur(), onInput: (t) => this.handleChange(t), min: 5 }), a("select-dropdown", { key: "f699922c7ac3854c22356bfaefced2834fc0ca7b", name: "event-duration", options: e, defaultSelectedOption: e.find((t) => t.value == this.durationIncrement) ?? e[0], withSearch: !1 }))));
875
- }
876
- static get formAssociated() {
877
- return !0;
878
- }
879
- get host() {
880
- return _(this);
881
- }
882
- static get watchers() {
883
- return {
884
- name: ["elementNameChangedHandler"],
885
- durationMinutes: ["durationMinutesChangedHandler"]
886
- };
887
- }
888
- };
889
- Ot([
890
- O({
891
- name: "nylas-event-duration",
892
- eventToProps: {},
893
- fireRegisterEvent: !0
894
- }),
895
- fe("design:type", Function),
896
- fe("design:paramtypes", []),
897
- fe("design:returntype", void 0)
898
- ], Se.prototype, "render", null);
899
- Se.style = Tt;
900
- const St = ':host{display:block;margin:1rem;--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-event-info__title{color:var(--nylas-base-nylas-base-900-aaa, #101323);font-size:16px;font-style:normal;font-weight:600;line-height:20px;margin:0;text-align:left}.nylas-event-info__subtitle{color:var(--nylas-base-nylas-base-600-aaa, #3e4784);font-size:14px;font-style:normal;font-weight:400;line-height:20px;margin:0.25rem 0px 0px;text-align:left}.nylas-event-info__content{padding:1rem;display:flex;flex-direction:column;gap:1rem}.nylas-event-info__block{display:flex;justify-content:space-between;gap:0.5rem}', Et = St;
901
- var Dt = function(e, t, n, s) {
902
- var l = arguments.length, i = l < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, n) : s, o;
903
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
904
- i = Reflect.decorate(e, t, n, s);
905
- else
906
- for (var r = e.length - 1; r >= 0; r--)
907
- (o = e[r]) && (i = (l < 3 ? o(i) : l > 3 ? o(t, n, i) : o(t, n)) || i);
908
- return l > 3 && i && Object.defineProperty(t, n, i), i;
909
- }, pe = function(e, t) {
910
- if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
911
- return Reflect.metadata(e, t);
912
- };
913
- const Ee = class {
914
- constructor(e) {
915
- g(this, e), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals);
916
- }
917
- connectedCallback() {
918
- d("nylas-event-info", "connectedCallback");
919
- }
920
- componentWillLoad() {
921
- d("nylas-event-info", "componentWillLoad");
922
- }
923
- componentDidLoad() {
924
- d("nylas-event-info", "componentDidLoad");
925
- }
926
- disconnectedCallback() {
927
- d("nylas-event-info", "disconnectedCallback");
928
- }
929
- render() {
930
- return a(k, { key: "0bb711d5c047feb6eabe91f0067fa12080ff1e05" }, a("nylas-form-card", { key: "c01cb8fc177acda4a20b0327f3567cd98ff4d1c1" }, a("h1", { key: "b6bb50950769c270a06b6af0e3af527cac3202d4", slot: "header-title", class: "nylas-event-info__title" }, "Event information"), a("h3", { key: "e02f8407c1737626118e4bf85c81ae9cfbf11167", slot: "header-subtitle", class: "nylas-event-info__subtitle" }, "Enter all event information."), a("div", { key: "a2e3467a533b29de82a30ee540f1cd7249cefaf4", slot: "content", class: "nylas-event-info__content" }, a("slot", { key: "90659526ed86eba38a7d1974bd14e16994fb61dd", name: "inputs" }))));
931
- }
932
- static get formAssociated() {
933
- return !0;
934
- }
935
- };
936
- Dt([
937
- O({
938
- name: "nylas-event-info",
939
- eventToProps: {},
940
- fireRegisterEvent: !0
941
- }),
942
- pe("design:type", Function),
943
- pe("design:paramtypes", []),
944
- pe("design:returntype", void 0)
945
- ], Ee.prototype, "render", null);
946
- Ee.style = Et;
947
- const Lt = ':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-event-title{display:flex;flex-direction:column;gap:4px;position:relative;text-align:left}.nylas-event-title div.title{padding:12px 16px;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);overflow:scroll;white-space:nowrap;scrollbar-width:thin}.nylas-event-title div.title::-webkit-scrollbar{width:6px;height:6px}.nylas-event-title input{padding:12px 16px;border-width:1;border-radius:8px;border:1px solid var(--nylas-base-200)}.nylas-event-title span.help-text{color:var(--nylas-base-800);font-size:14px;font-style:normal;font-weight:400;line-height:21px}.nylas-event-title label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:14px;font-style:normal;font-weight:400;line-height:150%;}.nylas-event-title label span.required{color:var(--nylas-error, #cc4841)}.nylas-event-title label span.label-icon{margin-left:4px}.nylas-event-title label span.label-icon tooltip-component{display:flex}.highlighted-tag{background-color:var(--nylas-base-200);border-radius:var(--nylas-border-radius);padding:5px;margin-left:4px}.token-options{display:block;background-color:var(--nylas-base-0);width:100%;max-height:336px;overflow:auto;z-index:1;border-radius:4px;position:absolute;top:80px;box-shadow:0px 4px 6px -2px rgba(0, 0, 0, 0.0509803922);box-shadow:0px 10px 15px -3px rgba(0, 0, 0, 0.1019607843)}@media screen and (max-width: 768px){.token-options{right:0;width:325px;max-width:unset}}.token-options ul{padding:0;list-style-type:none;color:var(--nylas-base-900);max-height:336px;margin:0}.token-options ul li{padding:16px, 12px, 16px, 12px;color:black;padding:12px 16px;text-decoration:none;display:block;font-family:inherit;font-size:14px;font-weight:400;line-height:20px;letter-spacing:0px;text-align:left;cursor:pointer}.token-options ul li .token-label{display:flex;flex-direction:column;font-weight:400}.token-options ul li .token-label .token{color:var(--nylas-abse-900);font-size:16px;line-height:24px}.token-options ul li .token-label .description{color:var(--nylas-base-600);font-size:14px;line-height:21px}.token-options ul li:hover,.token-options ul li:focus,.token-options ul li:active,.token-options ul li.active{background-color:var(--nylas-base-100)}.token-options ul li:hover .token-label .token,.token-options ul li:focus .token-label .token,.token-options ul li:active .token-label .token,.token-options ul li.active .token-label .token{color:var(--nylas-primary)}.token-options .selected{background-color:var(--nylas-base-100)}', It = Lt;
948
- var $t = function(e, t, n, s) {
949
- var l = arguments.length, i = l < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, n) : s, o;
950
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
951
- i = Reflect.decorate(e, t, n, s);
952
- else
953
- for (var r = e.length - 1; r >= 0; r--)
954
- (o = e[r]) && (i = (l < 3 ? o(i) : l > 3 ? o(t, n, i) : o(t, n)) || i);
955
- return l > 3 && i && Object.defineProperty(t, n, i), i;
956
- }, he = function(e, t) {
957
- if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
958
- return Reflect.metadata(e, t);
959
- };
960
- const De = class {
961
- constructor(e) {
962
- g(this, e), this.valueChanged = C(this, "valueChanged", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.eventTitle = void 0, this.name = "title", this.showTokens = !1, this.availableTokens = ke.map((t) => ({
963
- label: t.token,
964
- value: t.value,
965
- labelHTML: t
966
- })), this.filteredTokens = this.availableTokens, this.ariaActivedescendant = "", this.currentWord = { $value: "", fullText: "", index: -1, focusOffset: -1 };
967
- }
968
- elementNameChangedHandler(e) {
969
- d("nylas-event-title", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
970
- }
971
- ariaActivedescendantChangedHandler(e) {
972
- var t, n;
973
- if (d("nylas-event-title", "ariaActivedescendantChangedHandler", e), e !== "") {
974
- const s = (t = this.host.shadowRoot) == null ? void 0 : t.getElementById(e);
975
- s == null || s.classList.add("active");
976
- } else {
977
- const s = (n = this.host.shadowRoot) == null ? void 0 : n.querySelectorAll(".token-options li.active");
978
- s == null || s.forEach((l) => l.classList.remove("active"));
979
- }
980
- }
981
- connectedCallback() {
982
- d("nylas-event-title", "connectedCallback");
983
- }
984
- componentWillLoad() {
985
- d("nylas-event-title", "componentWillLoad"), this.host.setAttribute("name", this.name);
986
- }
987
- componentDidLoad() {
988
- d("nylas-event-title", "componentDidLoad"), this.updateEventTitleFromProp(this.eventTitle || "");
989
- }
990
- disconnectedCallback() {
991
- d("nylas-event-title", "disconnectedCallback");
992
- }
993
- updateEventTitleFromProp(e) {
994
- d("nylas-event-title", "eventTitleChangedHandler", e), this.titleRef.innerHTML = this.highlightTokens(), this.titleRef.focus();
995
- }
996
- highlightTokens() {
997
- let e = this.eventTitle || "";
998
- return ke.forEach((t) => {
999
- const n = t.value, s = new RegExp(`(\\${n})(?!\\w)`, "g");
1000
- e = e.replace(s, '<span class="highlighted-tag">$1</span>');
1001
- }), e;
1002
- }
1003
- getCurrentSelectionForBrowser() {
1004
- var n, s, l;
1005
- const e = (i, o, r) => {
1006
- const h = i.replace(/[\u200B-\u200D\uFEFF]/g, ""), f = h.lastIndexOf("$"), u = h.substring(f).split(" ")[0];
1007
- return {
1008
- focusOffset: o,
1009
- dollarIndex: f,
1010
- lastWord: u,
1011
- currentText: h,
1012
- node: r
1013
- };
1014
- }, t = Re();
1015
- switch (console.log("currentBrowser", t), t) {
1016
- case "Chrome":
1017
- const i = (n = this.host.shadowRoot) == null ? void 0 : n.getSelection(), o = i == null ? void 0 : i.focusNode, r = (o == null ? void 0 : o.nodeValue) || "";
1018
- return e(r, (i == null ? void 0 : i.focusOffset) || -1, o);
1019
- case "Firefox":
1020
- const h = document.getSelection(), f = ((s = h == null ? void 0 : h.anchorNode) == null ? void 0 : s.nodeValue) || "";
1021
- return e(f, (h == null ? void 0 : h.focusOffset) || -1, h == null ? void 0 : h.anchorNode);
1022
- case "Safari":
1023
- const u = window.getSelection(), p = u == null ? void 0 : u.getComposedRanges(this.host.shadowRoot)[0], v = ((l = p == null ? void 0 : p.startContainer) == null ? void 0 : l.nodeValue) || "";
1024
- return e(v, (p == null ? void 0 : p.endOffset) || -1, p == null ? void 0 : p.startContainer);
1025
- default:
1026
- return console.warn("Browser not supported"), null;
1027
- }
1028
- }
1029
- handleChange(e) {
1030
- const t = e.target.textContent || "", n = this.getCurrentSelectionForBrowser();
1031
- if (!n) {
1032
- this.updateEventTitle(t), this.resetDropdown();
1033
- return;
1034
- }
1035
- const { focusOffset: s, dollarIndex: l, lastWord: i, currentText: o } = n;
1036
- if (l === -1 || s < l) {
1037
- this.updateEventTitle(t), this.resetDropdown();
1038
- return;
1039
- }
1040
- i.startsWith("$") ? (this.showTokens = !0, this.currentWord = {
1041
- $value: i,
1042
- fullText: o,
1043
- index: l,
1044
- focusOffset: s
1045
- }, this.populateSuggestionsDropdown(i)) : this.resetDropdown(), this.updateEventTitle(t);
1046
- }
1047
- handleInputKeyDown(e) {
1048
- var t, n, s, l;
1049
- if (e.key === "Enter") {
1050
- e.preventDefault();
1051
- const i = (t = this.host.shadowRoot) == null ? void 0 : t.getElementById(this.ariaActivedescendant);
1052
- i && (i.click(), this.ariaActivedescendant = "");
1053
- } else if (e.key === "ArrowDown") {
1054
- e.preventDefault();
1055
- const i = (n = this.host.shadowRoot) == null ? void 0 : n.getElementById(this.ariaActivedescendant);
1056
- if (i) {
1057
- const o = i.nextElementSibling;
1058
- o ? this.ariaActivedescendant = o.id : this.ariaActivedescendant = this.filteredTokens[0].label;
1059
- } else
1060
- this.ariaActivedescendant = this.filteredTokens[0].label;
1061
- } else if (e.key === "ArrowUp") {
1062
- e.preventDefault();
1063
- const i = (s = this.host.shadowRoot) == null ? void 0 : s.getElementById(this.ariaActivedescendant);
1064
- if (i) {
1065
- const o = i.previousElementSibling;
1066
- o ? this.ariaActivedescendant = o.id : this.ariaActivedescendant = this.filteredTokens[this.filteredTokens.length - 1].label;
1067
- } else
1068
- this.ariaActivedescendant = this.filteredTokens[this.filteredTokens.length - 1].label;
1069
- } else if (e.key === "Escape")
1070
- e.preventDefault(), this.resetDropdown();
1071
- else if (e.key === "Backspace" || e.key === "Delete") {
1072
- const i = this.getCurrentSelectionForBrowser();
1073
- i != null && i.currentText.startsWith("${") && (l = i == null ? void 0 : i.node) != null && l.parentNode && i.node.parentNode.removeChild(i.node);
1074
- }
1075
- }
1076
- selectOption(e, t) {
1077
- var c;
1078
- e.preventDefault();
1079
- const n = this.currentWord.fullText, s = this.currentWord.$value;
1080
- let l = this.titleRef.firstChild, i = null;
1081
- for (; l; ) {
1082
- if (l.nodeType === 3) {
1083
- const b = ((c = l.textContent) == null ? void 0 : c.replace(/[\u200B-\u200D\uFEFF]/g, "")) || "", m = n.replace(/[\u200B-\u200D\uFEFF]/g, "");
1084
- if (b.includes(m)) {
1085
- i = l;
1086
- break;
1087
- }
1088
- }
1089
- l = l.nextSibling;
1090
- }
1091
- if (!i)
1092
- return;
1093
- const o = i.textContent || "", r = o.indexOf(s), h = o.substring(0, r), f = o.substring(r + s.length), u = document.createTextNode(h), p = document.createRange(), v = document.createElement("span");
1094
- v.classList.add("highlighted-tag"), v.textContent = `${t.value}`;
1095
- const Z = document.createTextNode(f);
1096
- if (f !== "")
1097
- i.replaceWith(u, v, Z), p.setStart(Z, 0);
1098
- else {
1099
- const b = document.createTextNode("​");
1100
- i.replaceWith(u, v, b), p.setStart(b, 0);
1101
- }
1102
- this.resetDropdown(), this.titleRef.focus();
1103
- const I = window.getSelection();
1104
- p.collapse(!0), I == null || I.removeAllRanges(), I == null || I.addRange(p), this.updateEventTitle(this.titleRef.textContent || "");
1105
- }
1106
- populateSuggestionsDropdown(e = "") {
1107
- this.filteredTokens = this.availableTokens.filter((t) => t.label.startsWith(e.toString()) || t.value.startsWith(e.toString())), this.filteredTokens.length > 0 && (this.ariaActivedescendant = this.filteredTokens[0].label);
1108
- }
1109
- updateEventTitle(e) {
1110
- const t = e.replace(/ +/g, " ");
1111
- this.valueChanged.emit({ value: t, name: this.name });
1112
- }
1113
- resetDropdown() {
1114
- this.showTokens = !1, this.ariaActivedescendant = "";
1115
- }
1116
- getLabelHTML(e) {
1117
- return a("div", { class: "token-label" }, a("span", { class: "token" }, e.token), a("span", { class: "description" }, e.description));
1118
- }
1119
- render() {
1120
- var e;
1121
- return a(k, { key: "3a7d0d3f26d3a8e3b5aa8c05f50f6d29c174b842" }, a("div", { key: "23a7a97be25be6c4a3e9f6cba2da58221bfa577f", class: "nylas-event-title" }, a("label", { key: "43c64b93196da3ead8579832d41ce441b585ee47", htmlFor: "title" }, "Event title", a("span", { key: "92948ef95c675e976bc390947ae7f59368ded040", class: "required" }, "*"), a("span", { key: "e4d974e193065f9ddd27c3a1c6cbdfa4b887d555", class: "label-icon" }, a("tooltip-component", { key: "5a22f040163c9a437d0be6850ece29f2e0a48985" }, a("info-icon", { key: "4f065a1ff2a00f9d1974915a52722cfc38a30d7a", slot: "tooltip-icon" }), a("span", { key: "5517a19abdcfe5cec829140dea3cd810a3575a27", slot: "tooltip-content" }, "Enter a title for your event.")))), a("div", { key: "de04b5e1505e50f61bbf43430db853b04149be3e", class: "title", ref: (t) => this.titleRef = t, contentEditable: "true", onInput: (t) => this.handleChange(t), onKeyDown: (t) => this.handleInputKeyDown(t) }), this.showTokens && ((e = this.filteredTokens) == null ? void 0 : e.length) > 0 && a("div", { class: "token-options" }, a("ul", { tabindex: "-1", role: "listbox", "aria-label": this.name, "aria-activedescendant": this.ariaActivedescendant }, this.filteredTokens.map((t) => a("li", { tabindex: "0", key: t.label, id: t.label, class: { active: this.ariaActivedescendant === t.label }, onClick: (n) => this.selectOption(n, t), role: "option" }, this.getLabelHTML(t.labelHTML))))), a("span", { key: "c3b75b0038f5cc22c7c9a4db0aaa0c9f5d61036a", class: "help-text" }, "Create a dynamic templated event title by typing $. Learn more")));
1122
- }
1123
- static get formAssociated() {
1124
- return !0;
1125
- }
1126
- get host() {
1127
- return _(this);
1128
- }
1129
- static get watchers() {
1130
- return {
1131
- name: ["elementNameChangedHandler"],
1132
- ariaActivedescendant: ["ariaActivedescendantChangedHandler"]
1133
- };
1134
- }
1135
- };
1136
- $t([
1137
- O({
1138
- name: "nylas-event-title",
1139
- eventToProps: {},
1140
- fireRegisterEvent: !0
1141
- }),
1142
- he("design:type", Function),
1143
- he("design:paramtypes", []),
1144
- he("design:returntype", void 0)
1145
- ], De.prototype, "render", null);
1146
- De.style = It;
1147
- const At = ':host{--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-event-location{display:flex;flex-direction:column;gap:4px;font-family:var(--nylas-font-family)}.nylas-event-location label{display:flex;align-items:center;color:var(--nylas-base-nylas-base-800);font-size:14px;font-style:normal;font-weight:400;line-height:150%;}.nylas-event-location label span.label-icon{margin-left:4px}.nylas-event-location label span.label-icon tooltip-component{display:flex}.nylas-event-location span[slot=select-icon]{border-right:1px solid var(--nylas-base-200);padding:16px 0.75rem 16px 0.5rem;border-radius:var(--nylas-border-radius-2x);border-bottom-right-radius:0;border-top-right-radius:0;height:20px}.nylas-event-location div.location-input{display:grid;grid-template-columns:auto 1fr;width:100%;gap:0.5rem}.nylas-event-location div.location-input input{border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);padding:12px 16px;font-family:var(--nylas-font-family);font-size:16px;line-height:24px}.nylas-event-location select-dropdown{width:208px}@media screen and (max-width: 768px){.nylas-event-location select-dropdown{width:100%}}.nylas-event-location select-dropdown::part(sd_dropdown){width:100%}.nylas-event-location select-dropdown::part(sd_dropdown-content){left:calc(35px + 0.5rem)}.nylas-event-location select-dropdown::part(sd_dropdown-button){display:flex;justify-content:space-between;width:100%;border:1px solid var(--nylas-base-200);padding:0 0.5rem}.nylas-event-location select-dropdown::part(sd_dropdown-button-selected-label){display:inline-flex;align-self:center;padding:14px 0;font-family:var(--nylas-font-family);font-size:16px;line-height:24px}', Ht = At;
1148
- var Ft = function(e, t, n, s) {
1149
- var l = arguments.length, i = l < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, n) : s, o;
1150
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
1151
- i = Reflect.decorate(e, t, n, s);
1152
- else
1153
- for (var r = e.length - 1; r >= 0; r--)
1154
- (o = e[r]) && (i = (l < 3 ? o(i) : l > 3 ? o(t, n, i) : o(t, n)) || i);
1155
- return l > 3 && i && Object.defineProperty(t, n, i), i;
1156
- }, be = function(e, t) {
1157
- if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
1158
- return Reflect.metadata(e, t);
1159
- };
1160
- const Le = class {
1161
- constructor(e) {
1162
- g(this, e), this.valueChanged = C(this, "valueChanged", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.eventLocation = void 0, this.location = this.eventLocation ?? "", this.selectedLocationOption = this.eventLocation ? "custom" : "none", this.name = "location";
1163
- }
1164
- elementNameChangedHandler(e) {
1165
- d("nylas-location-component", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
1166
- }
1167
- eventLocationChangedHandler(e, t) {
1168
- d("nylas-location-component", "eventLocationChangedHandler", e), e !== t && (this.selectedLocationOption = e ? "custom" : "none");
1169
- }
1170
- connectedCallback() {
1171
- d("nylas-location-component", "connectedCallback");
1172
- }
1173
- componentWillLoad() {
1174
- d("nylas-location-component", "componentWillLoad"), this.host.setAttribute("name", this.name);
1175
- }
1176
- componentDidLoad() {
1177
- d("nylas-location-component", "componentDidLoad");
1178
- }
1179
- disconnectedCallback() {
1180
- d("nylas-location-component", "disconnectedCallback");
1181
- }
1182
- selectedOptionChangedHandler(e) {
1183
- this.selectedLocationOption = e.detail.value, this.selectedLocationOption === "none" && (this.location = "", this.setFormValue("", "location"), this.valueChanged.emit({ value: "", name: this.name }));
1184
- }
1185
- setFormValue(e, t) {
1186
- typeof this.internals.setFormValue == "function" && this.internals.setFormValue(e, t);
1187
- }
1188
- handleChange(e) {
1189
- this.location = e.target.value, this.setFormValue(e.target.value, "location"), this.valueChanged.emit({ value: e.target.value, name: this.name });
1190
- }
1191
- render() {
1192
- const e = [
1193
- { value: "none", label: "None" },
1194
- { value: "custom", label: "Custom location" }
1195
- ], t = {
1196
- none: a("location-off-icon", { key: "021fd97ea9f51cc9ef6edab397e12181f24bddb2" }),
1197
- custom: a("location-icon", { key: "24a170f7a38501da4f46eef8da5231f9002347b1" })
1198
- };
1199
- return a(k, { key: "8b520fcbc5f57bf6ab51d6cb83fd58eb452f702a" }, a("div", { key: "6e7b240c7b5603cea809a8e83f003ffc48db183b", class: "nylas-event-location" }, a("label", { key: "e6979aeff1965f62540bc274818cbb7b46f454d6", htmlFor: "location" }, "Location type", a("span", { key: "0334a62e0b8d15d07f35722561743d9654364176", class: "label-icon" }, a("tooltip-component", { key: "a1267dbc795c9abc4faa08ee4bd28d5fbb0dcc8f" }, a("info-icon", { key: "ad03af910d69f86b5459e8e3d9129a6532b67b27", slot: "tooltip-icon" }), a("span", { key: "8bec251481f72beea08ed8649b628a6d9604ef39", slot: "tooltip-content" }, "Choose how you’ll meet with the participants at the scheduled time. Pick from available conferencing options or add a custom location.")))), a("div", { key: "4cddd535ae80ee17f25566fff3c79cb92fe5ed73", class: "location-input" }, a("select-dropdown", { key: "efe580f62aa4ea955cefff02a9e133a1eb66057d", withSearch: !1, name: "location", options: e, defaultSelectedOption: e.find((n) => n.value == this.selectedLocationOption) }, a("span", { key: "58faabe958e2faf6cc518d3a02ff7dee5586f48d", slot: "select-icon" }, t[this.selectedLocationOption])), this.selectedLocationOption === "custom" && a("input", { type: "text", id: "location", name: "location", maxlength: "1024", value: this.location, onInput: (n) => this.handleChange(n) }))));
1200
- }
1201
- static get formAssociated() {
1202
- return !0;
1203
- }
1204
- get host() {
1205
- return _(this);
1206
- }
1207
- static get watchers() {
1208
- return {
1209
- name: ["elementNameChangedHandler"],
1210
- eventLocation: ["eventLocationChangedHandler"]
1211
- };
1212
- }
1213
- };
1214
- Ft([
1215
- O({
1216
- name: "nylas-location-component",
1217
- eventToProps: {},
1218
- fireRegisterEvent: !0
1219
- }),
1220
- be("design:type", Function),
1221
- be("design:paramtypes", []),
1222
- be("design:returntype", void 0)
1223
- ], Le.prototype, "render", null);
1224
- Le.style = Ht;
1225
- var Ie = { exports: {} };
1226
- (function(e, t) {
1227
- (function(n, s) {
1228
- e.exports = s();
1229
- })(ze, function() {
1230
- var n = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, s = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, l = /\d\d/, i = /\d\d?/, o = /\d*[^-_:/,()\s\d]+/, r = {}, h = function(c) {
1231
- return (c = +c) + (c > 68 ? 1900 : 2e3);
1232
- }, f = function(c) {
1233
- return function(b) {
1234
- this[c] = +b;
1235
- };
1236
- }, u = [/[+-]\d\d:?(\d\d)?|Z/, function(c) {
1237
- (this.zone || (this.zone = {})).offset = function(b) {
1238
- if (!b || b === "Z")
1239
- return 0;
1240
- var m = b.match(/([+-]|\d\d)/g), y = 60 * m[1] + (+m[2] || 0);
1241
- return y === 0 ? 0 : m[0] === "+" ? -y : y;
1242
- }(c);
1243
- }], p = function(c) {
1244
- var b = r[c];
1245
- return b && (b.indexOf ? b : b.s.concat(b.f));
1246
- }, v = function(c, b) {
1247
- var m, y = r.meridiem;
1248
- if (y) {
1249
- for (var S = 1; S <= 24; S += 1)
1250
- if (c.indexOf(y(S, 0, b)) > -1) {
1251
- m = S > 12;
1252
- break;
1253
- }
1254
- } else
1255
- m = c === (b ? "pm" : "PM");
1256
- return m;
1257
- }, Z = { A: [o, function(c) {
1258
- this.afternoon = v(c, !1);
1259
- }], a: [o, function(c) {
1260
- this.afternoon = v(c, !0);
1261
- }], S: [/\d/, function(c) {
1262
- this.milliseconds = 100 * +c;
1263
- }], SS: [l, function(c) {
1264
- this.milliseconds = 10 * +c;
1265
- }], SSS: [/\d{3}/, function(c) {
1266
- this.milliseconds = +c;
1267
- }], s: [i, f("seconds")], ss: [i, f("seconds")], m: [i, f("minutes")], mm: [i, f("minutes")], H: [i, f("hours")], h: [i, f("hours")], HH: [i, f("hours")], hh: [i, f("hours")], D: [i, f("day")], DD: [l, f("day")], Do: [o, function(c) {
1268
- var b = r.ordinal, m = c.match(/\d+/);
1269
- if (this.day = m[0], b)
1270
- for (var y = 1; y <= 31; y += 1)
1271
- b(y).replace(/\[|\]/g, "") === c && (this.day = y);
1272
- }], M: [i, f("month")], MM: [l, f("month")], MMM: [o, function(c) {
1273
- var b = p("months"), m = (p("monthsShort") || b.map(function(y) {
1274
- return y.slice(0, 3);
1275
- })).indexOf(c) + 1;
1276
- if (m < 1)
1277
- throw new Error();
1278
- this.month = m % 12 || m;
1279
- }], MMMM: [o, function(c) {
1280
- var b = p("months").indexOf(c) + 1;
1281
- if (b < 1)
1282
- throw new Error();
1283
- this.month = b % 12 || b;
1284
- }], Y: [/[+-]?\d+/, f("year")], YY: [l, function(c) {
1285
- this.year = h(c);
1286
- }], YYYY: [/\d{4}/, f("year")], Z: u, ZZ: u };
1287
- function I(c) {
1288
- var b, m;
1289
- b = c, m = r && r.formats;
1290
- for (var y = (c = b.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(R, $, T) {
1291
- var x = T && T.toUpperCase();
1292
- return $ || m[T] || n[T] || m[x].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(A, H, z) {
1293
- return H || z.slice(1);
1294
- });
1295
- })).match(s), S = y.length, E = 0; E < S; E += 1) {
1296
- var U = y[E], M = Z[U], D = M && M[0], L = M && M[1];
1297
- y[E] = L ? { regex: D, parser: L } : U.replace(/^\[|\]$/g, "");
1298
- }
1299
- return function(R) {
1300
- for (var $ = {}, T = 0, x = 0; T < S; T += 1) {
1301
- var A = y[T];
1302
- if (typeof A == "string")
1303
- x += A.length;
1304
- else {
1305
- var H = A.regex, z = A.parser, Y = R.slice(x), N = H.exec(Y)[0];
1306
- z.call($, N), R = R.replace(N, "");
1307
- }
1308
- }
1309
- return function(B) {
1310
- var w = B.afternoon;
1311
- if (w !== void 0) {
1312
- var P = B.hours;
1313
- w ? P < 12 && (B.hours += 12) : P === 12 && (B.hours = 0), delete B.afternoon;
1314
- }
1315
- }($), $;
1316
- };
1317
- }
1318
- return function(c, b, m) {
1319
- m.p.customParseFormat = !0, c && c.parseTwoDigitYear && (h = c.parseTwoDigitYear);
1320
- var y = b.prototype, S = y.parse;
1321
- y.parse = function(E) {
1322
- var U = E.date, M = E.utc, D = E.args;
1323
- this.$u = M;
1324
- var L = D[1];
1325
- if (typeof L == "string") {
1326
- var R = D[2] === !0, $ = D[3] === !0, T = R || $, x = D[2];
1327
- $ && (x = D[2]), r = this.$locale(), !R && x && (r = m.Ls[x]), this.$d = function(Y, N, B) {
1328
- try {
1329
- if (["x", "X"].indexOf(N) > -1)
1330
- return new Date((N === "X" ? 1e3 : 1) * Y);
1331
- var w = I(N)(Y), P = w.year, K = w.month, $e = w.day, Ae = w.hours, He = w.minutes, Fe = w.seconds, Me = w.milliseconds, ue = w.zone, J = /* @__PURE__ */ new Date(), G = $e || (P || K ? 1 : J.getDate()), X = P || J.getFullYear(), q = 0;
1332
- P && !K || (q = K > 0 ? K - 1 : J.getMonth());
1333
- var Q = Ae || 0, ee = He || 0, te = Fe || 0, ne = Me || 0;
1334
- return ue ? new Date(Date.UTC(X, q, G, Q, ee, te, ne + 60 * ue.offset * 1e3)) : B ? new Date(Date.UTC(X, q, G, Q, ee, te, ne)) : new Date(X, q, G, Q, ee, te, ne);
1335
- } catch {
1336
- return /* @__PURE__ */ new Date("");
1337
- }
1338
- }(U, L, M), this.init(), x && x !== !0 && (this.$L = this.locale(x).$L), T && U != this.format(L) && (this.$d = /* @__PURE__ */ new Date("")), r = {};
1339
- } else if (L instanceof Array)
1340
- for (var A = L.length, H = 1; H <= A; H += 1) {
1341
- D[1] = L[H - 1];
1342
- var z = m.apply(this, D);
1343
- if (z.isValid()) {
1344
- this.$d = z.$d, this.$L = z.$L, this.init();
1345
- break;
1346
- }
1347
- H === A && (this.$d = /* @__PURE__ */ new Date(""));
1348
- }
1349
- else
1350
- S.call(this, E);
1351
- };
1352
- };
1353
- });
1354
- })(Ie);
1355
- const Mt = Ie.exports, Rt = ':host{display:block;position:relative;--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}.time-picker{display:inline-block;width:150px;position:relative}@media screen and (max-width: 768px){.time-picker{width:auto}}.time-picker input{width:150px;height:48px;text-align:center;font-size:1rem;cursor:pointer;background:transparent;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}@media screen and (max-width: 768px){.time-picker input{width:98px}}.time-picker input.focus{background:transparent}.time-picker input:hover,.time-picker input:active{border:1px solid var(--nylas-primary)}.time-picker input:active{outline:2px solid var(--nylas-primary)}.time-picker input span.open{transform:rotate(90deg)}.time-picker input span.closed{transform:rotate(270deg)}.time-picker input.error{border:1px solid var(--nylas-error)}.time-picker p.error{color:var(--nylas-error);font-size:0.875rem;margin:0}.times{display:block;margin-top:0.5rem;background-color:var(--nylas-base-0);width:100%;max-height:336px;overflow:auto;border:1px solid #ddd;z-index:1;border-radius:4px;position:absolute;box-shadow:0px 4px 6px -2px rgba(0, 0, 0, 0.0509803922);box-shadow:0px 10px 15px -3px rgba(0, 0, 0, 0.1019607843)}.times ul{padding:0;list-style-type:none;color:var(--nylas-base-900);max-height:336px}.times ul li{padding:16px, 12px, 16px, 12px;color:black;padding:12px 16px;text-decoration:none;display:block;font-family:inherit;font-size:14px;font-weight:400;line-height:20px;letter-spacing:0px;text-align:center;cursor:pointer}.times ul li.focused{background-color:var(--nylas-base-100)}.times ul li:hover,.times ul li:focus{background-color:var(--nylas-base-100)}.times ul li label{display:flex;align-items:center;gap:0.5rem}.times ul li label input{margin:0}', zt = Rt;
1356
- V.extend(Mt);
1357
- const Bt = class {
1358
- constructor(e) {
1359
- g(this, e), this.timeChange = C(this, "timeChange", 7), this.time = void 0, this.minimumStartTime = null, this.placeholder = "hh:mmam/pm", this.setTime = void 0, this.name = void 0, this.hasError = !1, this.setFormError = void 0, this.err = "", this.showTimes = !1, this.ariaActivedescendant = "", this.times = this.generateTimes(), this.shouldAutoScroll = !1;
1360
- }
1361
- handleOutsideClick(e) {
1362
- !e.composedPath().includes(this.el) && this.showTimes && (this.showTimes = !1);
1363
- }
1364
- minimumStartTimeChangedHandler() {
1365
- if (this.minimumStartTime) {
1366
- let e = V().hour(parseInt(this.minimumStartTime)).minute(parseInt(this.minimumStartTime.slice(-4, -2)));
1367
- this.minimumStartTime.slice(-2).toLowerCase() === "pm" && parseInt(this.minimumStartTime) !== 12 ? e = e.add(12, "hour") : this.minimumStartTime.slice(-2).toLowerCase() === "am" && parseInt(this.minimumStartTime) === 12 && (e = e.subtract(12, "hour")), this.times = this.generateTimes();
1368
- const t = V(this.times[0].value, "hh:mma");
1369
- V(this.time, "hh:mma").isBefore(t) && (this.err = "Invalid", this.setFormError(null, "Invalid"));
1370
- }
1371
- }
1372
- componentDidRender() {
1373
- if (this.showTimes && this.shouldAutoScroll) {
1374
- const e = ae(this.time), t = this.times.findIndex((n) => n.value === e);
1375
- t > -1 && (this.shouldAutoScroll = !1, this.scrollToViewWithinParent(t));
1376
- return;
1377
- }
1378
- }
1379
- handleTimeChange(e, t) {
1380
- const n = t.split(":");
1381
- n[0] === "00" && n[1].slice(-2) == "pm" && (this.err = "Invalid", this.setFormError(e, "Invalid")), ie(t) ? (this.err = "", this.setFormError(null)) : (this.err = "Invalid", this.setFormError(e, "Invalid")), this.setTime(e, t), this.timeChange.emit(t);
1382
- }
1383
- handleTimeAutocomplete(e) {
1384
- var n;
1385
- const t = (n = e.target) == null ? void 0 : n.value;
1386
- if (!ie(t)) {
1387
- this.err = "Invalid", this.setFormError(e, "Invalid");
1388
- return;
1389
- }
1390
- if (t === "") {
1391
- const s = ye().format("hh:mma");
1392
- this.setTime(e, s);
1393
- return;
1394
- }
1395
- if (!ge(t)) {
1396
- const s = ae(t);
1397
- this.setTime(s);
1398
- return;
1399
- }
1400
- this.setTime(e, t);
1401
- }
1402
- handleOnInput(e) {
1403
- var n;
1404
- const t = (n = e.target) == null ? void 0 : n.value;
1405
- if (ie(t)) {
1406
- if (t === "") {
1407
- const s = ye().format("hh:mma"), l = this.times.findIndex((i) => i.value === s);
1408
- l > -1 && this.scrollToViewWithinParent(l);
1409
- return;
1410
- }
1411
- if (!ge(t)) {
1412
- const s = ae(t), l = this.times.findIndex((i) => i.value === s);
1413
- l > -1 && this.scrollToViewWithinParent(l);
1414
- return;
1415
- }
1416
- }
1417
- }
1418
- generateTimes() {
1419
- const e = [];
1420
- let t = V().set("hour", 0).set("minute", 0).set("second", 0);
1421
- this.minimumStartTime && (t = V(this.minimumStartTime, "hh:mma"));
1422
- const n = t.endOf("day").diff(t, "minutes"), s = Math.round(n / 15);
1423
- for (let l = 0; l < s + 1; l++) {
1424
- const i = t.add(l * 15, "minute");
1425
- if (l == s && i.format("hh:mma").includes("am"))
1426
- break;
1427
- e.push({ id: l, value: i.format("hh:mma") });
1428
- }
1429
- return e;
1430
- }
1431
- handleComboboxKeyDown(e) {
1432
- if (e.key === "ArrowDown") {
1433
- if (e.preventDefault(), !this.showTimes) {
1434
- this.showTimes = !0, this.shouldAutoScroll = !0;
1435
- return;
1436
- }
1437
- if (this.ariaActivedescendant === "")
1438
- this.ariaActivedescendant = this.times[0].id.toString(), this.focusOption(0);
1439
- else {
1440
- const t = this.times.findIndex((s) => s.id.toString() === this.ariaActivedescendant), n = t + 1 < this.times.length ? t + 1 : 0;
1441
- this.ariaActivedescendant = this.times[n].id.toString(), this.focusOption(n);
1442
- }
1443
- } else if (e.key === "ArrowUp")
1444
- if (e.preventDefault(), this.ariaActivedescendant === "")
1445
- this.ariaActivedescendant = this.times[this.times.length - 1].id.toString(), this.focusOption(this.times.length - 1);
1446
- else {
1447
- const t = this.times.findIndex((s) => s.id.toString() === this.ariaActivedescendant), n = t - 1 >= 0 ? t - 1 : this.times.length - 1;
1448
- this.ariaActivedescendant = this.times[n].id.toString(), this.focusOption(n);
1449
- }
1450
- else
1451
- e.key === "Escape" && (this.showTimes = !1, this.timeInput.focus());
1452
- }
1453
- handleListboxKeydown(e) {
1454
- const t = this.times, n = t.findIndex((s) => s.id.toString() === this.ariaActivedescendant);
1455
- if (e.key === "ArrowDown" || e.key === "Tab" && !e.shiftKey) {
1456
- e.preventDefault();
1457
- const s = n + 1 < t.length ? n + 1 : 0;
1458
- this.ariaActivedescendant = t[s].id.toString(), this.focusOption(s);
1459
- } else if (e.key === "ArrowUp" || e.key === "Tab" && e.shiftKey) {
1460
- e.preventDefault();
1461
- const s = n - 1 >= 0 ? n - 1 : t.length - 1;
1462
- this.ariaActivedescendant = t[s].id.toString(), this.focusOption(s);
1463
- } else if (e.key === "Enter") {
1464
- if (e.preventDefault(), this.ariaActivedescendant) {
1465
- const s = t[n];
1466
- this.handleTimeChange(e, s.value), this.showTimes = !1, this.ariaActivedescendant = "", this.timeInput.focus();
1467
- }
1468
- } else
1469
- e.key === "Escape" && (this.showTimes = !1, this.timeInput.focus());
1470
- }
1471
- scrollToViewWithinParent(e) {
1472
- var o;
1473
- const t = this.times[e], n = (o = this.el.shadowRoot) == null ? void 0 : o.getElementById(t.id.toString()), s = this.timeMenu;
1474
- this.ariaActivedescendant = t.id.toString();
1475
- const l = n.getBoundingClientRect(), i = s.getBoundingClientRect();
1476
- l.top < i.top ? s.scrollTop -= i.top - l.top : l.bottom > i.bottom && (s.scrollTop += l.bottom - i.bottom), l.left < i.left ? s.scrollLeft -= i.left - l.left : l.right > i.right && (s.scrollLeft += l.right - i.right);
1477
- }
1478
- focusOption(e) {
1479
- var l;
1480
- const t = this.times[e];
1481
- if (!t)
1482
- return;
1483
- const n = t.id.toString(), s = (l = this.el.shadowRoot) == null ? void 0 : l.getElementById(n);
1484
- s && (s.focus(), s.scrollIntoView({ behavior: "smooth", block: "nearest" }));
1485
- }
1486
- render() {
1487
- return a(k, { key: "ae06613962a37471cde869695544eff5897956e7" }, a("div", { key: "26062a373ad43bd0392e6c68cb8924719110912e", class: "time-picker" }, a("input", { key: "6bbb11bd7e469ced0d09df07f8f60878337699c2", type: "text", name: this.name, id: this.name, class: {
1488
- "time-input": !0,
1489
- error: !!this.err || this.hasError
1490
- }, ref: (e) => this.timeInput = e, value: this.time, onClick: () => {
1491
- this.showTimes = !0, this.shouldAutoScroll = !0;
1492
- }, "aria-haspopup": "listbox", "aria-label": this.name, "aria-expanded": this.showTimes ? "true" : "false", placeholder: this.placeholder, onKeyDown: (e) => this.handleComboboxKeyDown(e), onInput: (e) => this.handleOnInput(e), onBlur: (e) => this.handleTimeAutocomplete(e) }), this.err && a("div", { class: "invalid-time-icon" }), this.showTimes && a("div", { class: "times", ref: (e) => this.timeMenu = e }, a("ul", { tabindex: "-1", role: "listbox", "aria-label": this.name, "aria-activedescendant": this.ariaActivedescendant, onKeyDown: (e) => this.handleListboxKeydown(e) }, this.times.map((e) => a("li", { tabindex: "0", key: e.id, id: e.id.toString(), class: {
1493
- focused: this.ariaActivedescendant === e.id.toString()
1494
- }, onClick: (t) => {
1495
- this.handleTimeChange(t, e.value), this.showTimes = !1, this.timeInput.focus();
1496
- }, role: "option" }, `${e.value}`)))), !this.showTimes && this.err && a("p", { class: "error", id: "email-error" }, this.err)));
1497
- }
1498
- get el() {
1499
- return _(this);
1500
- }
1501
- static get watchers() {
1502
- return {
1503
- minimumStartTime: ["minimumStartTimeChangedHandler"]
1504
- };
1505
- }
1506
- };
1507
- Bt.style = zt;
1508
- export {
1509
- Pe as add_circle_icon,
1510
- Ve as calendar_info_icon,
1511
- Ye as calendar_patterns_icon,
1512
- Je as flow_icon,
1513
- Qe as location_icon,
1514
- nt as location_off_icon,
1515
- st as multi_select_dropdown,
1516
- xe as nylas_availability_picker,
1517
- we as nylas_booking_calendar_picker,
1518
- Ce as nylas_buffer_time,
1519
- _e as nylas_calendar_picker,
1520
- Te as nylas_custom_booking_flow,
1521
- Oe as nylas_event_description,
1522
- Se as nylas_event_duration,
1523
- Ee as nylas_event_info,
1524
- De as nylas_event_title,
1525
- Le as nylas_location_component,
1526
- Bt as nylas_time_window_picker
1527
- };