@nylas/react 1.4.3 → 1.4.5

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 (157) hide show
  1. package/README.md +7 -0
  2. package/dist/{add-circle-icon_2.entry-12cddf69.js → add-circle-icon_2.entry-55361a03.js} +3 -3
  3. package/dist/add-circle-icon_2.entry-75a3df95.cjs +1 -0
  4. package/dist/archive-icon.entry-3c4e4b28.js +16 -0
  5. package/dist/archive-icon.entry-8aa151fd.cjs +1 -0
  6. package/dist/arrow-icon.entry-2cef5ca1.cjs +1 -0
  7. package/dist/{arrow-icon.entry-66125a01.js → arrow-icon.entry-5bb183c1.js} +5 -5
  8. package/dist/{bold-icon.entry-4e0f124a.cjs → bold-icon.entry-c919c71d.cjs} +1 -1
  9. package/dist/{bold-icon.entry-96b5c7c9.js → bold-icon.entry-e0010c60.js} +4 -4
  10. package/dist/{button-component_2.entry-537ef8cf.cjs → button-component_2.entry-078ee06a.cjs} +1 -1
  11. package/dist/{button-component_2.entry-02ec97e5.js → button-component_2.entry-1dd1b8d6.js} +9 -9
  12. package/dist/{calendar-agenda-fill-icon_36.entry-a134ce8f.js → calendar-agenda-fill-icon_36.entry-772a70d7.js} +99 -99
  13. package/dist/calendar-agenda-fill-icon_36.entry-9b694a33.cjs +6 -0
  14. package/dist/{calendar-cancel-icon.entry-d4a5aa8d.js → calendar-cancel-icon.entry-7d1a7cea.js} +4 -4
  15. package/dist/{calendar-cancel-icon.entry-64d8a8f7.cjs → calendar-cancel-icon.entry-b791b6b1.cjs} +1 -1
  16. package/dist/{calendar-check-icon_2.entry-620c2161.cjs → calendar-check-icon_2.entry-2380a4e6.cjs} +1 -1
  17. package/dist/{calendar-check-icon_2.entry-d7d417b1.js → calendar-check-icon_2.entry-2b5711fd.js} +3 -3
  18. package/dist/{calendar-icon.entry-994e0116.js → calendar-icon.entry-9b23c994.js} +2 -2
  19. package/dist/{calendar-icon.entry-b1ba99b6.cjs → calendar-icon.entry-f88c8b09.cjs} +1 -1
  20. package/dist/{checkbox-component.entry-b43f7dcb.js → checkbox-component.entry-94fd68e7.js} +4 -4
  21. package/dist/{checkbox-component.entry-286cf4b6.cjs → checkbox-component.entry-af77c4fa.cjs} +1 -1
  22. package/dist/{checkmark-icon_15.entry-c20a861e.js → checkmark-icon_15.entry-3ddf90df.js} +224 -222
  23. package/dist/checkmark-icon_15.entry-de65b967.cjs +5 -0
  24. package/dist/chevron-icon_3.entry-a492d340.cjs +1 -0
  25. package/dist/{chevron-icon_3.entry-5e8c6975.js → chevron-icon_3.entry-af195326.js} +6 -6
  26. package/dist/{clock-icon_4.entry-ea55f4c7.cjs → clock-icon_4.entry-530cd13b.cjs} +1 -1
  27. package/dist/{clock-icon_4.entry-4ba6118a.js → clock-icon_4.entry-7dc4324b.js} +8 -8
  28. package/dist/{customParseFormat-6c652dbb-905f5f24.cjs → customParseFormat-129be926-30b2af24.cjs} +1 -1
  29. package/dist/{customParseFormat-6c652dbb-bafc6567.js → customParseFormat-129be926-36eabae2.js} +1 -1
  30. package/dist/{delete-icon.entry-6f8bb1a4.js → delete-icon.entry-3328484a.js} +4 -4
  31. package/dist/{delete-icon.entry-d5cc7ec2.cjs → delete-icon.entry-9369bf78.cjs} +1 -1
  32. package/dist/document-refresh-icon.entry-902ead30.js +16 -0
  33. package/dist/{document-refresh-icon.entry-59bcbf3e.cjs → document-refresh-icon.entry-f45be1c4.cjs} +1 -1
  34. package/dist/elements/index.d.ts +0 -8
  35. package/dist/{feedbackSync-de135b5b-1bb1eed1.cjs → feedbackSync-d943ffc7-13f01c1f.cjs} +1 -1
  36. package/dist/{feedbackSync-de135b5b-125921e6.js → feedbackSync-d943ffc7-d1e98ba0.js} +1 -1
  37. package/dist/{folder-icon.entry-a4b426f1.cjs → folder-icon.entry-48cfa8d0.cjs} +1 -1
  38. package/dist/{folder-icon.entry-c99aefa7.js → folder-icon.entry-c4ffba45.js} +2 -2
  39. package/dist/{forward-icon.entry-d5f444e4.cjs → forward-icon.entry-146f3318.cjs} +1 -1
  40. package/dist/{forward-icon.entry-c03a667b.js → forward-icon.entry-dd036273.js} +5 -5
  41. package/dist/{globe-icon_2.entry-5d4462c6.cjs → globe-icon_2.entry-049fbca2.cjs} +1 -1
  42. package/dist/{globe-icon_2.entry-b4bd2a2e.js → globe-icon_2.entry-d6a95f6e.js} +90 -80
  43. package/dist/{google-logo-icon_6.entry-b525183b.cjs → google-logo-icon_6.entry-4d9e06be.cjs} +2 -2
  44. package/dist/{google-logo-icon_6.entry-bbca3ca0.js → google-logo-icon_6.entry-e26385cc.js} +398 -380
  45. package/dist/{google-meet-icon_5.entry-29131db6.cjs → google-meet-icon_5.entry-94112d7e.cjs} +1 -1
  46. package/dist/{google-meet-icon_5.entry-070a3973.js → google-meet-icon_5.entry-c0129f58.js} +12 -12
  47. package/dist/inbox-icon.entry-74d7a10d.js +16 -0
  48. package/dist/inbox-icon.entry-94683ba9.cjs +1 -0
  49. package/dist/index-3b0366ac.cjs +57 -0
  50. package/dist/{index-5179ba9a.js → index-6e735f92.js} +5678 -4802
  51. package/dist/{index.es-19a10e83-9591824a.js → index.es-4615d47c-9156501b.js} +827 -1065
  52. package/dist/{index.es-19a10e83-89045449.cjs → index.es-4615d47c-b7c254fe.cjs} +6 -6
  53. package/dist/{info-icon_2.entry-327fa47f.cjs → info-icon_2.entry-8bcd39dc.cjs} +1 -1
  54. package/dist/{info-icon_2.entry-3066c0ae.js → info-icon_2.entry-ef5dbccc.js} +3 -3
  55. package/dist/{input-component.entry-9ec938d5.js → input-component.entry-922063d5.js} +9 -9
  56. package/dist/{input-component.entry-6a046128.cjs → input-component.entry-cc1fb2fa.cjs} +1 -1
  57. package/dist/{input-dropdown_2.entry-886a91a0.js → input-dropdown_2.entry-4041c294.js} +5 -5
  58. package/dist/input-dropdown_2.entry-f3750e99.cjs +1 -0
  59. package/dist/italic-icon.entry-63b6943f.cjs +1 -0
  60. package/dist/italic-icon.entry-6706da64.js +16 -0
  61. package/dist/{multi-select-dropdown_2.entry-6d631e1a.cjs → multi-select-dropdown_2.entry-1096321d.cjs} +1 -1
  62. package/dist/{multi-select-dropdown_2.entry-065aa4e8.js → multi-select-dropdown_2.entry-e10a9439.js} +22 -16
  63. package/dist/nylas-booked-event-card_12.entry-38f37135.cjs +1 -0
  64. package/dist/{nylas-booked-event-card_12.entry-c7c98fe2.js → nylas-booked-event-card_12.entry-7eceb6b6.js} +226 -224
  65. package/dist/nylas-event-calendar_3.entry-7dad0f2f.cjs +11 -0
  66. package/dist/{nylas-event-calendar_3.entry-36866347.js → nylas-event-calendar_3.entry-cc428f95.js} +2360 -2238
  67. package/dist/{nylas-form-card.entry-6adcea46.cjs → nylas-form-card.entry-984be5f9.cjs} +1 -1
  68. package/dist/{nylas-form-card.entry-cf5b0151.js → nylas-form-card.entry-dd3f240a.js} +3 -3
  69. package/dist/{nylas-scheduler-editor.entry-7a4190b0.js → nylas-scheduler-editor.entry-623da747.js} +39 -15
  70. package/dist/nylas-scheduler-editor.entry-8fb56081.cjs +2 -0
  71. package/dist/nylas-scheduling.entry-472ef577.cjs +1 -0
  72. package/dist/nylas-scheduling.entry-6608aa36.js +968 -0
  73. package/dist/{person-icon.entry-08d6cab1.cjs → person-icon.entry-168ba481.cjs} +1 -1
  74. package/dist/{person-icon.entry-0919d562.js → person-icon.entry-9f0233cd.js} +4 -4
  75. package/dist/{play-icon.entry-6a6c0b09.cjs → play-icon.entry-4115845d.cjs} +1 -1
  76. package/dist/play-icon.entry-5fbfabb5.js +16 -0
  77. package/dist/{radio-button-group.entry-3e9eb18a.cjs → radio-button-group.entry-3ae5f246.cjs} +1 -1
  78. package/dist/{radio-button-group.entry-82316913.js → radio-button-group.entry-da3f23ac.js} +2 -2
  79. package/dist/react.cjs +1 -1
  80. package/dist/react.js +96 -104
  81. package/dist/{refresh-icon.entry-c4f5caf0.cjs → refresh-icon.entry-13742bb5.cjs} +1 -1
  82. package/dist/{refresh-icon.entry-f19b8dbf.js → refresh-icon.entry-e1db3ca5.js} +2 -2
  83. package/dist/{register-component-139bea5f-38016ef2.js → register-component-083eb961-763c87e9.js} +1 -1
  84. package/dist/{register-component-139bea5f-93ebfbd3.cjs → register-component-083eb961-c5c48a1b.cjs} +1 -1
  85. package/dist/{reply-all-icon.entry-53a19ae0.cjs → reply-all-icon.entry-9446c2d0.cjs} +1 -1
  86. package/dist/{reply-all-icon.entry-3cf08a4a.js → reply-all-icon.entry-ded706c7.js} +2 -2
  87. package/dist/{reply-icon.entry-b1a1cda3.cjs → reply-icon.entry-0d362c63.cjs} +1 -1
  88. package/dist/{reply-icon.entry-78dc0e18.js → reply-icon.entry-7c5c0fd9.js} +5 -5
  89. package/dist/sent-icon.entry-92434496.cjs +1 -0
  90. package/dist/sent-icon.entry-bc9d1b35.js +16 -0
  91. package/dist/spam-icon.entry-11370b68.js +16 -0
  92. package/dist/spam-icon.entry-e0313c63.cjs +1 -0
  93. package/dist/{star-icon.entry-3f29c8bc.js → star-icon.entry-3a81207c.js} +6 -6
  94. package/dist/{star-icon.entry-262f813c.cjs → star-icon.entry-87823b56.cjs} +1 -1
  95. package/dist/{stop-icon.entry-0d3c0894.js → stop-icon.entry-472a11dc.js} +2 -2
  96. package/dist/{stop-icon.entry-00c3656b.cjs → stop-icon.entry-ddf9242a.cjs} +1 -1
  97. package/dist/{textarea-component.entry-cb4f5468.cjs → textarea-component.entry-2c6c0c7e.cjs} +1 -1
  98. package/dist/{textarea-component.entry-b03727b2.js → textarea-component.entry-f9797150.js} +2 -2
  99. package/dist/{toggle-switch.entry-eaadad98.js → toggle-switch.entry-a7cbc256.js} +2 -2
  100. package/dist/{toggle-switch.entry-4ba825d1.cjs → toggle-switch.entry-fbef6918.cjs} +1 -1
  101. package/dist/{translate-icon.entry-b964caca.js → translate-icon.entry-0ab604fe.js} +4 -4
  102. package/dist/{translate-icon.entry-e468fb5f.cjs → translate-icon.entry-2fe4868f.cjs} +1 -1
  103. package/dist/trash-fill-icon.entry-1904e8d6.cjs +1 -0
  104. package/dist/trash-fill-icon.entry-4bdfb061.js +16 -0
  105. package/dist/{underline-icon.entry-8a52f2c5.js → underline-icon.entry-29366789.js} +2 -2
  106. package/dist/{underline-icon.entry-fb2fe007.cjs → underline-icon.entry-6a2ca451.cjs} +1 -1
  107. package/dist/{warning-icon.entry-ba862018.js → warning-icon.entry-1649ffe7.js} +2 -2
  108. package/dist/{warning-icon.entry-e113397f.cjs → warning-icon.entry-3f848ed6.cjs} +1 -1
  109. package/package.json +2 -2
  110. package/dist/add-circle-icon_2.entry-fd842279.cjs +0 -1
  111. package/dist/archive-icon.entry-318baea1.cjs +0 -1
  112. package/dist/archive-icon.entry-f71155e0.js +0 -16
  113. package/dist/arrow-icon.entry-25e08042.cjs +0 -1
  114. package/dist/calendar-agenda-fill-icon_36.entry-97747463.cjs +0 -6
  115. package/dist/checkmark-icon_15.entry-6fa7dd5d.cjs +0 -5
  116. package/dist/chevron-icon_3.entry-bb5b71da.cjs +0 -1
  117. package/dist/document-refresh-icon.entry-15f6a5ce.js +0 -16
  118. package/dist/inbox-icon.entry-fae322d8.cjs +0 -1
  119. package/dist/inbox-icon.entry-feed5692.js +0 -16
  120. package/dist/index-22f83f6f.cjs +0 -57
  121. package/dist/input-dropdown_2.entry-33bd12b2.cjs +0 -1
  122. package/dist/italic-icon.entry-63976e0c.cjs +0 -1
  123. package/dist/italic-icon.entry-8b41cd6d.js +0 -16
  124. package/dist/notebook-store-b61693cd-0cdf1255.js +0 -14
  125. package/dist/notebook-store-b61693cd-c1314935.cjs +0 -5
  126. package/dist/nylas-booked-event-card_12.entry-35442a83.cjs +0 -1
  127. package/dist/nylas-call-summary.entry-c7482276.js +0 -16
  128. package/dist/nylas-call-summary.entry-e457f7dc.cjs +0 -1
  129. package/dist/nylas-event-calendar_3.entry-207500c1.cjs +0 -6
  130. package/dist/nylas-if-state.entry-ac37023b.cjs +0 -1
  131. package/dist/nylas-if-state.entry-f786a0c4.js +0 -95
  132. package/dist/nylas-key-points.entry-4eedc560.js +0 -29
  133. package/dist/nylas-key-points.entry-70648aaa.cjs +0 -1
  134. package/dist/nylas-login.entry-1f979b45.cjs +0 -1
  135. package/dist/nylas-login.entry-3c9d81eb.js +0 -74
  136. package/dist/nylas-provider.entry-6d72e728.js +0 -265
  137. package/dist/nylas-provider.entry-850dd082.cjs +0 -1
  138. package/dist/nylas-scheduler-editor.entry-f76b5368.cjs +0 -2
  139. package/dist/nylas-scheduling.entry-735334de.cjs +0 -1
  140. package/dist/nylas-scheduling.entry-c2426f53.js +0 -439
  141. package/dist/nylas-transcript.entry-b9707df7.js +0 -128
  142. package/dist/nylas-transcript.entry-f42910e3.cjs +0 -6
  143. package/dist/nylas-video-player.entry-4da5451f.js +0 -39
  144. package/dist/nylas-video-player.entry-61772b8a.cjs +0 -1
  145. package/dist/nylas-video-preview.entry-7e5f92da.cjs +0 -1
  146. package/dist/nylas-video-preview.entry-a43997ba.js +0 -16
  147. package/dist/play-icon.entry-07ce821c.js +0 -16
  148. package/dist/scheduler-config-store-d6729d8d-05905fa5.js +0 -29
  149. package/dist/scheduler-config-store-d6729d8d-416ec549.cjs +0 -1
  150. package/dist/scheduler-store-d97ec8e0-34c7a845.cjs +0 -1
  151. package/dist/scheduler-store-d97ec8e0-7c59bd89.js +0 -533
  152. package/dist/sent-icon.entry-8d9ffe9f.cjs +0 -1
  153. package/dist/sent-icon.entry-f7680a13.js +0 -16
  154. package/dist/spam-icon.entry-28e67f64.cjs +0 -1
  155. package/dist/spam-icon.entry-56089211.js +0 -16
  156. package/dist/trash-fill-icon.entry-6d7624a8.cjs +0 -1
  157. package/dist/trash-fill-icon.entry-742bcd40.js +0 -16
@@ -1,439 +0,0 @@
1
- import { i as u, r as Q, c as w, d as P, k as E, l as X, m as Z, h as n, H as C, g as V, F as ee } from "./index-5179ba9a.js";
2
- import { n as T, N as te } from "./index.es-19a10e83-9591824a.js";
3
- import { E as R, C as ne, N as ie } from "./scheduler-store-d97ec8e0-7c59bd89.js";
4
- import { L as oe } from "./constants-3d8016e3-3c080f00.js";
5
- import { i as se, a as ae, c as re, b as le, f as de } from "./feedbackSync-de135b5b-125921e6.js";
6
- import "react";
7
- import "react/jsx-runtime";
8
- import "react-dom";
9
- class ce {
10
- constructor({ schedulerAPIURL: e, nylasSchedulerStore: i, sessionId: a, configId: s, slug: r, clientId: l }) {
11
- if (!e)
12
- throw new Error("schedulerAPIURL is required");
13
- if (!i)
14
- throw new Error("nylasSchedulerStore is required");
15
- if (!a && !s && !(r || l))
16
- throw new Error("sessionId is required for private configs. If using public config either pass a configurationId or a combination of slug and clientId.");
17
- e === "/" && (e = new URL(window.location.href).origin), this.configId = s, this.sessionId = a, this.schedulerAPIURL = e, this.nylasSchedulerStore = i, this.slug = r, this.clientId = l;
18
- }
19
- init() {
20
- P("NylasConnector init");
21
- }
22
- get schedulerStore() {
23
- return this.nylasSchedulerStore;
24
- }
25
- get scheduler() {
26
- return this._schedulerAPIConnector ? this._schedulerAPIConnector : (this._schedulerAPIConnector = new ie({
27
- schedulerAPIURL: this.schedulerAPIURL,
28
- schedulerStore: this.schedulerStore,
29
- sessionId: this.sessionId,
30
- configId: this.configId,
31
- slug: this.slug,
32
- clientId: this.clientId
33
- }), this._schedulerAPIConnector);
34
- }
35
- resetStores() {
36
- this.nylasSchedulerStore.reset();
37
- }
38
- }
39
- const x = (t, e) => {
40
- const i = t.isLoading, a = t.showNotification, s = t.nylasBranding;
41
- return n(
42
- ee,
43
- null,
44
- a && n("nylas-notification", null),
45
- i && n(
46
- "div",
47
- { class: "loading" },
48
- n(
49
- "div",
50
- { class: "left" },
51
- n("div", { class: "skeleton" })
52
- ),
53
- n(
54
- "div",
55
- { class: "right" },
56
- n("div", { class: "skeleton" }),
57
- n("div", { class: "skeleton" }),
58
- n("div", { class: "skeleton" }),
59
- n("div", { class: "skeleton" }),
60
- n("div", { class: "skeleton" })
61
- )
62
- ),
63
- !i && e,
64
- n("div", { class: "footer" }, s && n(
65
- "a",
66
- { href: "https://scheduler.nylas.com?utm_source=powered-by-nylas-logoutm_medium=link&utm_campaign=get-scheduler&utm_id=get-scheduler", class: "powered-by-nylas", target: "_blank", rel: "noreferrer noopener" },
67
- "Powered by ",
68
- n("span", { class: "sr-only" }, "Nylas"),
69
- n("nylas-logo", { "aria-hidden": !0 })
70
- ))
71
- );
72
- }, Y = (t, e) => n("div", { class: "message-banner" }, e), he = ':host{display:flex;flex-direction:column;overflow:visible;border-radius:var(--nylas-border-radius-2x);width:fit-content;background:var(--nylas-base-0);position:relative;box-shadow:0px 4px 8px 2px rgba(0, 0, 0, 0.05), 0px 8px 16px -2px rgba(0, 0, 0, 0.1);--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff;font-family:var(--nylas-font-family);font-optical-sizing:auto;font-style:normal;font-variation-settings:"slnt" 0}@media screen and (max-width: 768px){:host{width:auto;min-width:325px}}:root{font-family:inherit}.error{padding:8rem 12rem;color:var(--nylas-base-0);background-color:var(--nylas-error);margin:1.5rem;border-radius:var(--nylas-border-radius-2x)}.message-banner{text-align:right;color:var(--nylas-base-800);padding:1rem;border-bottom:1px solid var(--nylas-color-primary-200);margin:0}.loading{margin:1.5rem;display:flex;gap:1rem}.loading .skeleton{border-radius:var(--nylas-border-radius-2x);animation:pulsate 1.5s infinite}.loading .skeleton:nth-child(2){animation-delay:-100ms}.loading .skeleton:nth-child(3){animation-delay:-200ms}.loading .skeleton:nth-child(4){animation-delay:-300ms}.loading .skeleton:nth-child(5){animation-delay:-400ms}.loading .left .skeleton{height:100%;width:400px}.loading .right .skeleton{height:5rem;width:300px;margin-bottom:1rem}.loading .right .skeleton:last-child{margin-bottom:0}@keyframes pulsate{0%{background-color:var(--nylas-base-50)}50%{background-color:var(--nylas-base-100)}100%{background-color:var(--nylas-base-50)}}.select-date-page,.additional-data-page,.booked-event-page,.manual-confirmation-page,.cancelled-event-page,.cancel-flow-page{border-top-left-radius:var(--nylas-border-radius-2x);border-top-right-radius:var(--nylas-border-radius-2x)}.select-date-page,.additional-data-page{display:flex}@media screen and (max-width: 768px){.select-date-page,.additional-data-page{flex-direction:column}}.booked-event-page,.manual-confirmation-page{background-color:var(--nylas-base-50)}.cancelled-event-page,.manual-confirmation-page,.cancel-flow-page{padding:1rem;height:496px;display:flex;justify-content:center;align-items:center}.booked-event-page,.manual-confirmation-page,.cancelled-event-page,.cancel-flow-page{min-width:784px;background:var(--nylas-base-50)}@media screen and (max-width: 768px){.booked-event-page,.manual-confirmation-page,.cancelled-event-page,.cancel-flow-page{min-width:90%}}.left-panel{display:flex;flex-direction:column;min-width:424px;border-top-left-radius:inherit;background:var(--nylas-base-0);position:relative;padding:1rem 0 0 0;height:624px}@media screen and (max-width: 768px){.left-panel{border-top-right-radius:inherit;min-width:unset;height:auto}}@media screen and (max-width: 768px){.select-date-page .left-panel{height:624px}}.border{margin-left:-20px;margin-right:-20px;border-top-width:1px;height:0.5px;background-color:var(--nylas-base-200)}@media screen and (max-width: 768px){.border{display:none}}.right-panel{min-width:360px;width:360px;background-color:var(--nylas-base-50);height:624px;padding-top:16px;border-left:1px solid var(--nylas-base-200);border-top-right-radius:inherit}.right-panel.reschedule{border-top-right-radius:0px}@media screen and (max-width: 768px){.right-panel{border-top-right-radius:0px;width:inherit;min-width:unset;height:auto;border-left:none}}.right-panel h2{display:flex;margin:0;height:48px;gap:0.5rem;justify-content:center;align-items:center;width:auto;font-size:1.125rem;line-height:1.5rem;font-weight:500;text-align:center;color:var(--nylas-base-800)}.additional-data-page .left-panel{background-color:var(--nylas-base-50)}.additional-data-page .right-panel{background-color:var(--nylas-base-0)}nylas-selected-event-card{height:604px;padding:0 1rem}@media screen and (max-width: 768px){nylas-selected-event-card{height:250px}}.footer{display:flex;justify-content:flex-end;align-items:center;padding:16px;font-size:14px;font-weight:300;color:var(--nylas-base-500);border-top:1px solid var(--nylas-base-200);min-height:24px}.footer .powered-by-nylas{display:flex;align-items:center;text-decoration:none;color:var(--nylas-base-500)}.footer .powered-by-nylas:hover{color:var(--nylas-base-800)}.footer svg{fill:var(--nylas-base-500)}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0}.footer svg{margin-top:1px}nylas-selected-event-card::part(nsec__timezone){position:absolute;bottom:0}nylas-notification{margin:1.5rem;width:-webkit-fill-available;width:-moz-available;position:absolute}nylas-locale-switch{position:absolute;padding:18px 20px;bottom:0;width:-webkit-fill-available;width:-moz-available;border-top:1px solid var(--nylas-base-200)}@media screen and (max-width: 768px){nylas-locale-switch{height:auto}}nylas-date-picker{padding:0 20px}button-component#report-issue{width:auto;position:absolute;bottom:4px;left:16px}nylas-feedback-form{position:absolute;top:0;height:100%;width:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;background:rgba(0, 0, 0, 0.6);z-index:2;border-radius:inherit}', ge = he, J = { title: u.t("genericErrorTitle"), type: T.Error, category: R.Component }, fe = class {
73
- constructor(t) {
74
- Q(this, t), this.init = w(this, "init", 7), this.schedulerWillLoad = w(this, "schedulerWillLoad", 7), this.schedulerDidLoad = w(this, "schedulerDidLoad", 7), this.nylasSchedulerError = w(this, "nylasSchedulerError", 7), this.nylasSchedulerInfo = w(this, "nylasSchedulerInfo", 7), this.configSettingsLoaded = w(this, "configSettingsLoaded", 7), this.bookingRefExtracted = w(this, "bookingRefExtracted", 7), this.bookedEventInfo = w(this, "bookedEventInfo", 7), this.mode = "app", this.defaultSchedulerState = void 0, this.sessionId = void 0, this.schedulerApiUrl = "https://api.us.nylas.com", this.bookingInfo = void 0, this.rescheduleBookingRef = void 0, this.cancelBookingRef = void 0, this.organizerConfirmationBookingRef = void 0, this.configurationId = void 0, this.slug = void 0, this.clientId = void 0, this.nylasBranding = !0, this.eventOverrides = {}, this.isLoading = void 0, this.themeConfig = void 0, this.localization = void 0, this.showNotification = !0, this.enableUserFeedback = !0, this.hour12 = void 0, this.automaticComponentRegistration = !0, this.selectedDateLabel = (/* @__PURE__ */ new Date()).toLocaleDateString(navigator.language, { dateStyle: "full" }) || `${u.t("noDateSelected")}`, this.refConfigId = void 0, this.language = navigator.language, this.showFeedbackModal = !1, this.bookingInfoConfirmed = null;
75
- }
76
- connectedCallback() {
77
- P("[nylas-scheduler] connectedCallback");
78
- }
79
- async componentWillLoad() {
80
- var s, r;
81
- P("[nylas-scheduler] Component will load"), this.enableUserFeedback && !se() && ae({
82
- dsn: "https://9d5731f1c77ca84c9ed3fb9b3ccf7ee1@o74852.ingest.us.sentry.io/4507889638178816",
83
- release: "1.4.3",
84
- integrations: (l) => [
85
- ...l.filter((o) => !1),
86
- de({
87
- colorScheme: "system",
88
- autoInject: !1
89
- })
90
- ],
91
- autoSessionTracking: !1,
92
- beforeSend: () => null
93
- });
94
- const t = this.schedulerWillLoad.emit(this.host);
95
- if ("schedulerWillLoad" in this.eventOverrides && (await this.eventOverrides.schedulerWillLoad(t, this.nylasSchedulerConnector), t.defaultPrevented))
96
- return;
97
- this.stores = {
98
- scheduler: ne({
99
- bookingInfo: this.bookingInfo,
100
- nylasBranding: this.nylasBranding,
101
- themeConfig: this.themeConfig,
102
- hour12: this.hour12,
103
- ...this.defaultSchedulerState
104
- })
105
- }, this.baseProvider = new te(this.host, this.stores, this.automaticComponentRegistration, this.eventOverrides), this.refConfigId = this.configurationId;
106
- let e;
107
- if (this.rescheduleBookingRef) {
108
- const [l, o, c] = E(this.rescheduleBookingRef);
109
- this.refConfigId = l, this.stores.scheduler.set("rescheduleBookingId", o), e = this.bookingRefExtracted.emit({ configurationId: l, bookingId: o });
110
- } else if (this.cancelBookingRef) {
111
- const [l, o, c] = E(this.cancelBookingRef);
112
- this.refConfigId = l, this.stores.scheduler.set("cancelBookingId", o), e = this.bookingRefExtracted.emit({ configurationId: l, bookingId: o });
113
- } else if (this.organizerConfirmationBookingRef) {
114
- const [l, o, c] = E(this.organizerConfirmationBookingRef);
115
- this.refConfigId = l, this.stores.scheduler.set("organizerConfirmationBookingId", o), this.stores.scheduler.set("organizerConfirmationSalt", c), e = this.bookingRefExtracted.emit({ configurationId: l, bookingId: o, salt: c });
116
- }
117
- if ("bookingRefExtracted" in this.eventOverrides && (await this.eventOverrides.bookingRefExtracted(e, this.nylasSchedulerConnector), e.defaultPrevented) || !this.checkIfSessionIdOrConfigIdExists())
118
- return;
119
- const i = (s = this.baseProvider) == null ? void 0 : s.getStore("scheduler");
120
- this.nylasSchedulerConnector = new ce({
121
- schedulerAPIURL: this.schedulerApiUrl,
122
- sessionId: this.sessionId,
123
- configId: this.refConfigId,
124
- slug: this.slug,
125
- clientId: this.clientId,
126
- nylasSchedulerStore: i
127
- });
128
- const a = this.init.emit(this.host);
129
- "init" in this.eventOverrides && (await this.eventOverrides.init(a, this.nylasSchedulerConnector), a.defaultPrevented) || ((r = this.baseProvider) == null || r.componentWillLoad(this.nylasSchedulerConnector), this.applyThemeConfig(this.themeConfig));
130
- }
131
- async componentDidLoad() {
132
- var c, m, y, g, h, f, k, D;
133
- (c = this.baseProvider) == null || c.componentDidLoad();
134
- const t = this.schedulerDidLoad.emit(this.host);
135
- if ("schedulerDidLoad" in this.eventOverrides && (await this.eventOverrides.schedulerDidLoad(t, this.nylasSchedulerConnector), t.defaultPrevented) || !this.checkIfSessionIdOrConfigIdExists())
136
- return;
137
- this.localizationChanged(this.localization);
138
- const e = await ((m = this.nylasSchedulerConnector) == null ? void 0 : m.scheduler.getUISettings());
139
- if (!e || "error" in e) {
140
- this.nylasSchedulerError.emit({ notification: { ...this.getErrorObject(e == null ? void 0 : e.error) }, host: this.host });
141
- return;
142
- } else {
143
- "data" in e && ((y = e.data) != null && y.appearance) && console.info("Appearance settings have been returned from the configuration used byt his scheduling page; please remember to grab them from the configSettingsLoaded event and apply them as desired.");
144
- const b = this.configSettingsLoaded.emit({ settings: e });
145
- if ("configSettingsLoaded" in this.eventOverrides && (await this.eventOverrides.configSettingsLoaded(b, this.nylasSchedulerConnector), b.defaultPrevented))
146
- return;
147
- }
148
- const i = (g = this.baseProvider) == null ? void 0 : g.getStore("scheduler"), a = (f = (h = i == null ? void 0 : i.get("configSettings")) == null ? void 0 : h.scheduler) == null ? void 0 : f.available_days_in_future, s = i == null ? void 0 : i.get("selectedTimeslot");
149
- if (s && (s != null && s.start_time)) {
150
- if (!this.isTimeslotValid(s))
151
- return;
152
- if (i != null && i.get("showBookingForm")) {
153
- i == null || i.set("selectedDate", s.start_time);
154
- return;
155
- }
156
- }
157
- const r = i == null ? void 0 : i.get("selectedDate"), l = i == null ? void 0 : i.get("availability");
158
- let o;
159
- if (!(l && l.length > 0)) {
160
- if (r) {
161
- const { startTime: b, endTime: v, endTimeForAvailableDaysInFuture: _ } = this.validateAvailableDaysInFuture(r, a || 30);
162
- r.getTime() < _ * 1e3 && (o = await ((D = this.nylasSchedulerConnector) == null ? void 0 : D.scheduler.getAvailability(b, v)));
163
- } else {
164
- const b = /* @__PURE__ */ new Date(), { startTime: v, endTime: _, endTimeForAvailableDaysInFuture: F } = this.validateAvailableDaysInFuture(b, a || 30);
165
- b.getTime() < F * 1e3 && (o = await ((k = this.nylasSchedulerConnector) == null ? void 0 : k.scheduler.getAvailability(v, _)));
166
- }
167
- if ((!o || "error" in o) && this.nylasSchedulerError.emit({ notification: { ...this.getErrorObject(o == null ? void 0 : o.error) }, host: this.host }), !r) {
168
- let b = /* @__PURE__ */ new Date();
169
- const v = i == null ? void 0 : i.get("availability").find((_) => new Date(_.start_time) > /* @__PURE__ */ new Date());
170
- v && (b = v.start_time), i == null || i.set("selectedDate", b);
171
- }
172
- }
173
- }
174
- componentDisconnected() {
175
- var t;
176
- (t = this.baseProvider) == null || t.componentDisconnected();
177
- }
178
- bookingInfoChanged(t) {
179
- var e;
180
- (e = this.stores) == null || e.scheduler.set("bookingInfo", t);
181
- }
182
- rescheduleBookingRefChanged(t) {
183
- var e, i;
184
- if (t) {
185
- const [a, s] = E(t);
186
- (e = this.stores) == null || e.scheduler.set("rescheduleBookingId", s), this.refConfigId = a, (i = this.nylasSchedulerConnector) == null || i.scheduler.setConfigId(a);
187
- }
188
- }
189
- cancelBookingRefChanged(t) {
190
- var e, i;
191
- if (t) {
192
- const [a, s] = E(t);
193
- (e = this.stores) == null || e.scheduler.set("cancelBookingId", s), this.refConfigId = a, (i = this.nylasSchedulerConnector) == null || i.scheduler.setConfigId(a);
194
- }
195
- }
196
- organizerConfirmationBookingRefChanged(t) {
197
- var e, i;
198
- if (t) {
199
- const [a, s] = E(t);
200
- (e = this.stores) == null || e.scheduler.set("organizerConfirmationBookingId", s), this.refConfigId = a, (i = this.nylasSchedulerConnector) == null || i.scheduler.setConfigId(a);
201
- }
202
- }
203
- localizationChanged(t) {
204
- t && Object.keys(t).forEach((e) => {
205
- e in oe && u.addResourceBundle(e, "translation", t[e], !1, !0);
206
- });
207
- }
208
- themeConfigChanged(t) {
209
- var e, i;
210
- (i = (e = this.baseProvider) == null ? void 0 : e.getStore("scheduler")) == null || i.set("themeConfig", t), this.applyThemeConfig(t);
211
- }
212
- languageChanged(t) {
213
- const e = t.detail;
214
- this.language = e, u.changeLanguage(e);
215
- }
216
- async registerComponentHandler(t) {
217
- var e;
218
- (e = this.baseProvider) == null || e.registerComponent(t.detail);
219
- }
220
- async unregisterComponentHandler(t) {
221
- var e;
222
- (e = this.baseProvider) == null || e.unregisterComponent(t.detail);
223
- }
224
- async monthChangedHandler(t) {
225
- var l, o, c, m, y, g, h;
226
- const e = t.detail, i = (m = (c = (o = (l = this.nylasSchedulerConnector) == null ? void 0 : l.schedulerStore) == null ? void 0 : o.get("configSettings")) == null ? void 0 : c.scheduler) == null ? void 0 : m.available_days_in_future, { startTime: a, endTime: s, endTimeForAvailableDaysInFuture: r } = this.validateAvailableDaysInFuture(e, i || 30);
227
- if (!t.defaultPrevented && a < r && e.getTime() < r * 1e3) {
228
- const f = await ((y = this.nylasSchedulerConnector) == null ? void 0 : y.scheduler.getAvailability(a, s));
229
- (!f || "error" in f) && this.nylasSchedulerError.emit({ notification: { ...this.getErrorObject(f == null ? void 0 : f.error) }, host: this.host });
230
- const k = (g = this.stores) == null ? void 0 : g.scheduler.get("selectableDates");
231
- k && k.length > 0 && ((h = this.stores) == null || h.scheduler.set("selectedDate", k[0]));
232
- }
233
- }
234
- mapToBookingData(t) {
235
- var l, o, c;
236
- const e = (l = this.stores) == null ? void 0 : l.scheduler.get("selectedTimeslot"), i = (o = this.stores) == null ? void 0 : o.scheduler.get("selectedLanguage"), a = (c = this.stores) == null ? void 0 : c.scheduler.get("selectedTimezone"), s = e != null && e.start_time ? new Date(e == null ? void 0 : e.start_time).getTime() / 1e3 : "", r = e != null && e.end_time ? new Date(e == null ? void 0 : e.end_time).getTime() / 1e3 : "";
237
- return {
238
- additional_guests: t.guests,
239
- guest: { ...t.primaryParticipant },
240
- additional_fields: { ...t.additionalFields },
241
- start_time: s,
242
- end_time: r,
243
- email_language: i,
244
- timezone: a
245
- };
246
- }
247
- async bookButtonClickedHandler(t) {
248
- var c, m, y, g;
249
- if (t.defaultPrevented)
250
- return;
251
- const e = t.detail, i = this.mapToBookingData(e);
252
- this.bookingInfoConfirmed = e;
253
- const s = (m = (c = this.nylasSchedulerConnector) == null ? void 0 : c.schedulerStore) == null ? void 0 : m.get("rescheduleBookingId");
254
- if (s) {
255
- const h = await ((y = this.nylasSchedulerConnector) == null ? void 0 : y.scheduler.rescheduleBooking(s, e));
256
- (!h || "error" in h) && this.nylasSchedulerError.emit({ notification: { ...this.getErrorObject(h == null ? void 0 : h.error) }, host: this.host });
257
- const f = h == null ? void 0 : h.data, k = this.bookedEventInfo.emit({ ...h, data: { ...f, ...i } });
258
- this.bookingInfoConfirmed = { ...this.bookingInfoConfirmed, ...f }, "bookedEventInfo" in this.eventOverrides && await this.eventOverrides.bookedEventInfo(k, this.nylasSchedulerConnector);
259
- return;
260
- }
261
- const r = await ((g = this.nylasSchedulerConnector) == null ? void 0 : g.scheduler.bookTimeslot(e));
262
- (!r || "error" in r) && this.nylasSchedulerError.emit({ notification: { ...this.getErrorObject(r == null ? void 0 : r.error) }, host: this.host });
263
- const l = r == null ? void 0 : r.data, o = this.bookedEventInfo.emit({ ...r, data: { ...l, ...i } });
264
- this.bookingInfoConfirmed = { ...this.bookingInfoConfirmed, ...l }, "bookedEventInfo" in this.eventOverrides && await this.eventOverrides.bookedEventInfo(o, this.nylasSchedulerConnector);
265
- }
266
- dateSelectedHandler(t) {
267
- const e = t.detail;
268
- this.selectedDateLabel = e ? e.toLocaleDateString(this.language, { dateStyle: "full" }) : `${u.t("noDateSelected")}`;
269
- }
270
- cancelBookedEventErrorHandler(t) {
271
- this.nylasSchedulerError.emit({ notification: { ...this.getErrorObject(t.detail.error) }, host: this.host });
272
- }
273
- cancelBookedEventValidationErrorHandler(t) {
274
- this.nylasSchedulerError.emit({ notification: { ...this.getErrorObject(t.detail.error) }, host: this.host });
275
- }
276
- rescheduleBookedEventErrorHandler(t) {
277
- this.nylasSchedulerError.emit({ notification: { ...this.getErrorObject(t.detail.error) }, host: this.host });
278
- }
279
- confirmBookingErrorHandler(t) {
280
- this.nylasSchedulerError.emit({ notification: { ...this.getErrorObject(t.detail.error) }, host: this.host });
281
- }
282
- feedbackModalClosedHandler() {
283
- this.showFeedbackModal = !1;
284
- }
285
- eventIsFullHandler(t) {
286
- const e = t.detail.error;
287
- t.detail.type === "error" ? this.nylasSchedulerError.emit({ notification: { ...this.getErrorObject({ message: e }) }, host: this.host }) : this.nylasSchedulerInfo.emit({
288
- notification: {
289
- title: "Event is full",
290
- category: R.Component,
291
- type: T.Info,
292
- description: "The event you selected is full. Please try a different time.",
293
- id: (/* @__PURE__ */ new Date()).getTime().toString(),
294
- ttl: 3e3
295
- },
296
- host: this.host
297
- });
298
- }
299
- feedbackSubmittedHandler(t) {
300
- const i = {
301
- eventId: re("Scheduling Page User Feedback", {
302
- extra: {
303
- configId: this.configurationId,
304
- slug: this.slug
305
- }
306
- }),
307
- message: t.detail.feedback
308
- };
309
- le(i, {
310
- includeReplay: !0,
311
- captureContext: {
312
- tags: {
313
- "nylas-web-element": "nylas-scheduling",
314
- "nylas-web-element-version": "1.4.3",
315
- "nylas-config-id": this.configurationId,
316
- "nylas-slug": this.slug,
317
- "host-url": window.location.href
318
- },
319
- extra: {
320
- configId: this.configurationId,
321
- slug: this.slug
322
- }
323
- }
324
- }), this.showFeedbackModal = !1;
325
- }
326
- async getNylasSchedulerStore() {
327
- var t;
328
- return (t = this.baseProvider) == null ? void 0 : t.getStore("scheduler");
329
- }
330
- async getNylasSchedulerConnector() {
331
- return this.nylasSchedulerConnector;
332
- }
333
- async getRef() {
334
- return this.host;
335
- }
336
- getErrorObject(t) {
337
- return {
338
- title: (t == null ? void 0 : t.title) || J.title,
339
- category: (t == null ? void 0 : t.category) || J.category,
340
- type: T.Error,
341
- description: (t == null ? void 0 : t.message) || "",
342
- id: (/* @__PURE__ */ new Date()).getTime().toString(),
343
- ttl: "none"
344
- };
345
- }
346
- checkIfSessionIdOrConfigIdExists() {
347
- if (!this.sessionId && !this.refConfigId && !(this.slug && this.clientId)) {
348
- let t = "";
349
- return this.sessionId || (t += u.t("sessionIdRequiredErrorMessage")), !this.sessionId && !this.refConfigId && !(this.slug && this.clientId) && (t = u.t("sessionIdRequiredErrorMessage") + " " + u.t("publicConfigErrorMessage")), this.nylasSchedulerError.emit({
350
- notification: {
351
- title: u.t("schedulingComponentErrorTitle"),
352
- category: R.Component,
353
- type: T.Error,
354
- description: t,
355
- id: (/* @__PURE__ */ new Date()).getTime().toString(),
356
- ttl: "none"
357
- },
358
- host: this.host
359
- }), !1;
360
- }
361
- return !0;
362
- }
363
- isTimeslotValid(t) {
364
- return new Date(t.start_time) < /* @__PURE__ */ new Date() ? (this.nylasSchedulerError.emit({
365
- notification: {
366
- title: u.t("invalidTimeslotErrorTitle"),
367
- category: R.Component,
368
- type: T.Error,
369
- description: u.t("invalidTimeslotErrorMessage"),
370
- id: (/* @__PURE__ */ new Date()).getTime().toString(),
371
- ttl: "none"
372
- },
373
- host: this.host
374
- }), !1) : !0;
375
- }
376
- validateAvailableDaysInFuture(t, e) {
377
- const i = /* @__PURE__ */ new Date(), a = new Date(t.getFullYear(), t.getMonth(), 1).getTime() / 1e3, s = new Date(t.getFullYear(), t.getMonth() + 1, 1).getTime() / 1e3, r = Math.floor(X(i, e).getTime() / 1e3), l = Math.min(r, s);
378
- return { startTime: a < i.getTime() / 1e3 ? Math.floor(i.getTime() / 1e3) : a, endTime: l, endTimeForAvailableDaysInFuture: r };
379
- }
380
- applyThemeConfig(t) {
381
- if (t)
382
- for (const [e, i] of Object.entries(t))
383
- this.host.style.setProperty(`${e}`, i);
384
- }
385
- onFeedbackClick(t) {
386
- t.preventDefault(), this.showFeedbackModal = !0;
387
- }
388
- redirectToCustomUrl(t) {
389
- window.location.assign(t);
390
- }
391
- render() {
392
- var k, D, b, v, _, F, N, A, M, U, j, H;
393
- const t = this.mode === "app", e = (k = this.baseProvider) == null ? void 0 : k.getStore("scheduler"), i = e == null ? void 0 : e.get("eventInfo"), a = e == null ? void 0 : e.get("showBookingForm"), s = e == null ? void 0 : e.get("cancelledEventInfo"), r = e == null ? void 0 : e.get("cancelBookingId"), l = e == null ? void 0 : e.get("selectedTimeslot"), o = e == null ? void 0 : e.get("rescheduleBookingId"), c = e == null ? void 0 : e.get("organizerConfirmationBookingId"), m = e == null ? void 0 : e.get("rejectBookingId"), y = e == null ? void 0 : e.get("confirmedEventInfo"), g = (e == null ? void 0 : e.get("nylasBranding")) || this.nylasBranding, h = e == null ? void 0 : e.get("selectedDate"), f = (b = (D = e == null ? void 0 : e.get("configSettings")) == null ? void 0 : D.scheduler) == null ? void 0 : b.confirmation_redirect_url;
394
- if (this.selectedDateLabel = h && this.language ? Z(h.toLocaleDateString(this.language, { dateStyle: "full" })) : `${u.t("noDateSelected")}`, t && (r || m) && !s)
395
- return n(C, null, n(x, { nylasBranding: g, isLoading: this.isLoading, showNotification: this.showNotification }, n("div", { class: "cancel-flow-page", part: "cancel-flow-page" }, n("nylas-cancel-booking-form", { selectedTimeslot: l, cancelBookingId: r, rejectBookingId: m, exportparts: "ncbf, ncbf__icon, ncbf__title, ncbf__description, ncbf__reason-textarea, ncbf__button-cta, ncbf__button-outline, ncbf__card" }))), this.enableUserFeedback && n("button-component", { id: "report-issue", variant: "basic", onClick: (d) => this.onFeedbackClick(d) }, n("feedback-icon", null)), this.showFeedbackModal && n("nylas-feedback-form", null));
396
- if (t && c)
397
- return n(C, null, n(x, null, n("div", { class: "manual-confirmation-page", part: "manual-confirmation-page" }, n("nylas-organizer-confirmation-card", { organizerConfirmationBookingId: c, exportparts: "nmcc, nmcc__title, nmcc__description, nmcc__button-cta, nmcc__button-outline" }))), this.enableUserFeedback && n("button-component", { id: "report-issue", variant: "basic", onClick: (d) => this.onFeedbackClick(d) }, n("feedback-icon", null)), this.showFeedbackModal && n("nylas-feedback-form", null));
398
- if (t && s)
399
- return n(C, null, n(x, { nylasBranding: g, isLoading: this.isLoading, showNotification: this.showNotification }, n("div", { class: "cancelled-event-page", part: "cancelled-event-page" }, n("nylas-cancelled-event-card", { cancelledEventInfo: s, exportparts: "ncec, ncec__icon, ncec__title, ncec__description, ncec__button-outline, ncec__card" }))), this.enableUserFeedback && n("button-component", { id: "report-issue", variant: "basic", onClick: (d) => this.onFeedbackClick(d) }, n("feedback-icon", null)), this.showFeedbackModal && n("nylas-feedback-form", null));
400
- if (t && y)
401
- return n(C, null, n(x, { nylasBranding: g, isLoading: this.isLoading, showNotification: this.showNotification }, n("div", { class: "cancelled-event-page", part: "confirmed-event-page" }, n("nylas-confirmed-event-card", { confirmedEventInfo: y, exportparts: "ncec, ncec__icon, ncec__title, ncec__description, ncec__button-outline, ncec__card" }))), this.enableUserFeedback && n("button-component", { id: "report-issue", variant: "basic", onClick: (d) => this.onFeedbackClick(d) }, n("feedback-icon", null)), this.showFeedbackModal && n("nylas-feedback-form", null));
402
- if (t && i && f) {
403
- const d = (v = this.bookingInfoConfirmed) == null ? void 0 : v.primaryParticipant, L = (_ = this.bookingInfoConfirmed) == null ? void 0 : _.location, $ = (F = this.bookingInfoConfirmed) == null ? void 0 : F.booking_ref, z = ((N = this.bookingInfoConfirmed) == null ? void 0 : N.additionalFields) || {};
404
- if (this.bookingInfo && typeof ((A = this.bookingInfo) == null ? void 0 : A.additionalFields) < "u") {
405
- const B = this.bookingInfo.additionalFields;
406
- Object.keys(B).forEach((S) => {
407
- !z[S] && (B != null && B[S]) && (z[S] = B[S].value);
408
- });
409
- }
410
- const I = (M = this.stores) == null ? void 0 : M.scheduler.get("selectedTimeslot"), W = (U = this.stores) == null ? void 0 : U.scheduler.get("selectedTimezone"), q = (j = this.stores) == null ? void 0 : j.scheduler.get("selectedLanguage"), O = (H = this.stores) == null ? void 0 : H.scheduler.get("configSettings"), G = this.configurationId ? this.configurationId : O == null ? void 0 : O.configuration_id, K = window.location.search, p = new URLSearchParams(K);
411
- p.set("booking_id", i.booking_id), d != null && d.name && p.set("name", d.name), d != null && d.email && p.set("email", d.email), I != null && I.start_time && p.set("start_time", (new Date(I.start_time).getTime() / 1e3).toString()), I != null && I.end_time && p.set("end_time", (new Date(I.end_time).getTime() / 1e3).toString()), W && p.set("tz", W), q && p.set("language", q), z && p.set("additional_values", JSON.stringify(z)), this.slug && p.set("page_slug", this.slug), G && p.set("config_id", G), L && p.set("location", L), $ && p.set("booking_ref", $), this.redirectToCustomUrl(`${f}?${p.toString()}`);
412
- return;
413
- }
414
- if (t && i)
415
- return n(C, null, n(x, { nylasBranding: g, isLoading: this.isLoading, showNotification: this.showNotification }, n("div", { class: "booked-event-page", part: "booked-event-page ns_booked-event-page" }, n("nylas-booked-event-card", { selectedTimeslot: l, eventInfo: i, exportparts: "nbec, nbec__title, nbec__card, nbec__description, nbec__button-outline, nbec__cancel-cta, nbec__reschedule-cta" }))), this.enableUserFeedback && n("button-component", { id: "report-issue", variant: "basic", onClick: (d) => this.onFeedbackClick(d) }, n("feedback-icon", null)), this.showFeedbackModal && n("nylas-feedback-form", null));
416
- if (t && (!i || o) && !a) {
417
- const d = this.host.querySelector('[slot="timeslot-picker-cta-label"]');
418
- return n(C, null, n(x, { nylasBranding: g, isLoading: this.isLoading, showNotification: this.showNotification }, o && n(Y, null, `${u.t("rescheduleTitle")}`), n("div", { class: "select-date-page", part: "select-date-page ns_select-date-page" }, n("div", { class: "left-panel", part: "ns_left-panel" }, n("nylas-date-picker", { exportparts: "ndp, ndp__title, ndp__month-header, ndp__month-button, ndp__day, ndp__date, ndp__date--disabled, ndp__date--selected, ndp__date--current-day, ndp__date--current-month" }), n("nylas-locale-switch", { exportparts: "nls, nls__timezone, nls__timezone-dropdown, nls__timezone-drop-button, nls__timezone-drop-button-selected-label, nls__timezone-drop-content, nls__timezone-drop-label, nls__language, nls__language-dropdown, nls__language-drop-button, nls__language-drop-content, nls__language-drop-label" })), n("div", { class: `right-panel ${o ? "reschedule" : ""}`, part: `ns_right-panel ${o ? "ns_reschedule" : ""}` }, n("h2", { part: "ns_right-panel__title" }, n("calendar-icon", { part: "ns_right-panel__calendar-icon" }), n("span", { id: "selectedDate", part: "ns_right-panel__selected-date" }, this.selectedDateLabel)), n("nylas-timeslot-picker", { exportparts: "ntp, ntp__time-picker-wrapper, ntp__timeslots, ntp__timeslot, ntp__timeslot--selected, ntp__button-primary" }, d && n("span", { slot: "timeslot-picker-cta-label" }, n("slot", { name: "timeslot-picker-cta-label" })))))), this.enableUserFeedback && n("button-component", { id: "report-issue", variant: "basic", onClick: (L) => this.onFeedbackClick(L) }, n("feedback-icon", null)), this.showFeedbackModal && n("nylas-feedback-form", null));
419
- }
420
- return t && !i && a ? n(C, null, n(x, { nylasBranding: g, isLoading: this.isLoading, showNotification: this.showNotification }, o && n(Y, null, `${u.t("rescheduleTitle")}`), n("div", { class: "additional-data-page", part: "additional-data-page ns_additional-data-page" }, n("div", { class: "left-panel ns_left-panel", part: "ns_left-panel" }, n("div", { class: "wrapper", part: "ns_left-panel__wrapper" }, n("nylas-selected-event-card", { exportparts: "nsec, nsec__card, nsec__icon, nsec__date, nsec__time, nsec__timezone" }))), n("div", { class: `right-panel ${o ? "reschedule" : ""}`, part: `ns_right-panel ${o ? "ns_reschedule" : ""}` }, n("nylas-booking-form", { exportparts: "nbf, nbf__input-textfield, nbf__button-ghost, nbf__button-outline, nbf__button-primary, nbf__input-wrapper, nbf__checkbox-component, nbf__radio-button-group, nbf__textarea-component, nbf__dropdown, nbf__dropdown-button, nbf__dropdown-content" })))), this.enableUserFeedback && n("button-component", { id: "report-issue", variant: "basic", onClick: (d) => this.onFeedbackClick(d) }, n("feedback-icon", null)), this.showFeedbackModal && n("nylas-feedback-form", null)) : n(C, null, n("slot", null));
421
- }
422
- get host() {
423
- return V(this);
424
- }
425
- static get watchers() {
426
- return {
427
- bookingInfo: ["bookingInfoChanged"],
428
- rescheduleBookingRef: ["rescheduleBookingRefChanged"],
429
- cancelBookingRef: ["cancelBookingRefChanged"],
430
- organizerConfirmationBookingRef: ["organizerConfirmationBookingRefChanged"],
431
- localization: ["localizationChanged"],
432
- themeConfig: ["themeConfigChanged"]
433
- };
434
- }
435
- };
436
- fe.style = ge;
437
- export {
438
- fe as nylas_scheduling
439
- };
@@ -1,128 +0,0 @@
1
- import { a as C, b as p, u, r as b, h as r, g as y } from "./index-5179ba9a.js";
2
- import { v as x } from "./notebook-store-b61693cd-0cdf1255.js";
3
- import "react";
4
- import "react/jsx-runtime";
5
- import "react-dom";
6
- const d = new CSSStyleSheet();
7
- d.replaceSync(`
8
- :host {
9
- font-family: Arial, sans-serif;
10
- }
11
- `);
12
- const i = C({
13
- style: d,
14
- toolbarState: "default",
15
- searchTerm: ""
16
- }), m = ({ width: t, height: e, fill: n }) => r(
17
- "svg",
18
- { viewBox: "0 0 16 16", width: t, height: e, xmlns: "http://www.w3.org/2000/svg" },
19
- r("path", { d: "M9.30887 10.016C8.53903 10.6318 7.56252 11 6.5 11C4.01472 11 2 8.98531 2 6.50002C2 4.01473 4.01472 2 6.5 2C8.98528 2 11 4.01473 11 6.50002C11 7.56252 10.6318 8.53901 10.016 9.30885L13.8536 13.1464C14.0488 13.3417 14.0488 13.6583 13.8536 13.8536C13.6583 14.0488 13.3417 14.0488 13.1464 13.8536L9.30887 10.016ZM10 6.50002C10 4.56701 8.433 3 6.5 3C4.567 3 3 4.56701 3 6.50002C3 8.43302 4.567 10 6.5 10C8.433 10 10 8.43302 10 6.50002Z", fill: n })
20
- ), h = ({ width: t, height: e, fill: n, className: s }) => r(
21
- "svg",
22
- { width: t, height: e, class: s, viewBox: "0 0 16 16", xmlns: "http://www.w3.org/2000/svg" },
23
- r("path", { d: "M4.00029 4.08525L4 10.5C4 11.8255 5.03154 12.91 6.33562 12.9947L6.5 13L10.9144 13.0007C10.7083 13.5829 10.1528 14 9.5 14H6C4.34315 14 3 12.6569 3 11V5.5C3 4.84678 3.41754 4.29109 4.00029 4.08525ZM11.5 2C12.3284 2 13 2.67157 13 3.5V10.5C13 11.3284 12.3284 12 11.5 12H6.5C5.67157 12 5 11.3284 5 10.5V3.5C5 2.67157 5.67157 2 6.5 2H11.5ZM11.5 3H6.5C6.22386 3 6 3.22386 6 3.5V10.5C6 10.7761 6.22386 11 6.5 11H11.5C11.7761 11 12 10.7761 12 10.5V3.5C12 3.22386 11.7761 3 11.5 3Z", fill: n })
24
- ), v = ({ width: t, height: e, fill: n }) => r(
25
- "svg",
26
- { width: t, height: e, viewBox: "0 0 16 16", xmlns: "http://www.w3.org/2000/svg" },
27
- r("path", { d: "M8 14C11.3137 14 14 11.3137 14 8C14 4.68629 11.3137 2 8 2C4.68629 2 2 4.68629 2 8C2 11.3137 4.68629 14 8 14ZM8 3C8.37372 3 8.87543 3.35608 9.31258 4.31781C9.4073 4.52619 9.49448 4.75446 9.57265 5H6.42735C6.50552 4.75446 6.5927 4.52619 6.68742 4.31781C7.12457 3.35608 7.62628 3 8 3ZM5.77705 3.90401C5.62614 4.23601 5.49428 4.6038 5.38411 5H3.99963C4.52341 4.30269 5.22525 3.74677 6.03766 3.39978C5.94287 3.56117 5.85596 3.7304 5.77705 3.90401ZM5.16299 6C5.05694 6.6275 5 7.30146 5 8C5 8.69854 5.05694 9.3725 5.16299 10H3.41604C3.14845 9.38754 3 8.7111 3 8C3 7.2889 3.14845 6.61246 3.41604 6H5.16299ZM5.38411 11C5.49428 11.3962 5.62614 11.764 5.77705 12.096C5.85596 12.2696 5.94287 12.4388 6.03766 12.6002C5.22525 12.2532 4.52341 11.6973 3.99963 11H5.38411ZM6.42735 11H9.57265C9.49448 11.2455 9.4073 11.4738 9.31258 11.6822C8.87543 12.6439 8.37372 13 8 13C7.62628 13 7.12457 12.6439 6.68742 11.6822C6.5927 11.4738 6.50552 11.2455 6.42735 11ZM9.82134 10H6.17866C6.06438 9.3892 6 8.71396 6 8C6 7.28604 6.06438 6.6108 6.17866 6H9.82134C9.93562 6.6108 10 7.28604 10 8C10 8.71396 9.93562 9.3892 9.82134 10ZM10.6159 11H12.0004C11.4766 11.6973 10.7747 12.2532 9.96234 12.6002C10.0571 12.4388 10.144 12.2696 10.2229 12.096C10.3739 11.764 10.5057 11.3962 10.6159 11ZM12.584 10H10.837C10.9431 9.3725 11 8.69854 11 8C11 7.30146 10.9431 6.6275 10.837 6H12.584C12.8516 6.61246 13 7.2889 13 8C13 8.7111 12.8516 9.38754 12.584 10ZM9.96234 3.39978C10.7747 3.74677 11.4766 4.30269 12.0004 5H10.6159C10.5057 4.6038 10.3739 4.23601 10.2229 3.90401C10.144 3.7304 10.0571 3.56117 9.96234 3.39978Z", fill: n })
28
- ), g = i.get, o = i.set, l = (t, e) => g(t) === e;
29
- function w({ transcripts: t }) {
30
- const e = () => {
31
- o("searchTerm", ""), o("toolbarState", "default");
32
- }, n = async () => {
33
- const s = {
34
- "text/plain": t.map((a) => `${a.ts} ${a.speaker}: ${a.text}`).join(`
35
- `)
36
- }, c = new ClipboardItem(s);
37
- await navigator.clipboard.write([c]);
38
- };
39
- return r(
40
- "div",
41
- { class: "toolbar" },
42
- l("toolbarState", "default") && r(
43
- "div",
44
- { class: "controls" },
45
- r(
46
- "button",
47
- { onClick: () => o("toolbarState", "search") },
48
- r(m, { height: 16, fill: "#2C2C2C" }),
49
- "Search"
50
- ),
51
- r(
52
- "button",
53
- { onClick: n },
54
- r(h, { height: 16, fill: "#2C2C2C" }),
55
- "Copy"
56
- ),
57
- r(
58
- "button",
59
- { onClick: () => o("toolbarState", "language") },
60
- r(v, { height: 16, fill: "#2C2C2C" }),
61
- "Language"
62
- )
63
- ),
64
- l("toolbarState", "search") && r(
65
- "div",
66
- { class: "search" },
67
- r("input", { type: "text", value: g("searchTerm"), onInput: (s) => o("searchTerm", s.target.value), onKeyDown: (s) => s.key === "Escape" && e(), placeholder: "Search transcript", autoFocus: !0 }),
68
- r("button", { class: "clear", onClick: e }, "Cancel")
69
- ),
70
- l("toolbarState", "language") && r(
71
- "div",
72
- { class: "language" },
73
- r(
74
- "select",
75
- null,
76
- r("option", { value: "en" }, "English"),
77
- r("option", { value: "fr" }, "French")
78
- ),
79
- r("button", { class: "regenerate" }, "Regenerate"),
80
- r("button", { class: "clear", onClick: e }, "Done")
81
- )
82
- );
83
- }
84
- const S = ':host{--background:white;--font-family:"Inter", sans-serif;--border-radius:8px}.nylas-transcript{background-color:var(--background);border-radius:var(--border-radius);border:1px solid #e0e6f9;font-size:14px;font-family:var(--font-family);font-optical-sizing:auto}.nylas-transcript .toolbar{padding:20px 20px}.nylas-transcript .toolbar input,.nylas-transcript .toolbar select{border:1px solid #4169e1;padding:10px 20px;border-radius:6px;width:100%}.nylas-transcript .toolbar button.clear{background:none;border:none;cursor:pointer;font-size:14px;font-family:var(--font-family)}.nylas-transcript .toolbar .controls{display:flex;align-items:center;justify-content:stretch;gap:6px}.nylas-transcript .toolbar .controls button{font-family:var(--font-family);cursor:pointer;background-color:white;border:1px solid #c7dbf9;border-radius:8px;padding-top:12px;padding-bottom:12px;flex-grow:1;letter-spacing:-4%;display:flex;align-items:center;justify-content:center}.nylas-transcript .toolbar .controls button svg{margin-right:6px}.nylas-transcript .toolbar .controls button:active{background-color:#f0f4f9}.nylas-transcript .toolbar .search,.nylas-transcript .toolbar .language{display:flex;align-items:center;justify-content:space-between;gap:20px}.nylas-transcript .language button.regenerate{width:93px;border-radius:8px;padding:12px 8px;text-align:center;outline:0;border:none;background-color:#4169e1;color:white}.nylas-transcript .transcripts{max-height:50vh;overflow-y:auto;border-top:1px solid #ebeff6}.nylas-transcript .transcripts .no-results{padding:20px;text-align:center;color:rgba(0, 0, 0, 0.6)}.nylas-transcript .transcripts .transcripts-item{padding:16px 18px;gap:20px;display:flex;line-height:24px;border-bottom:1px solid #ebeff6;transition:0.5s background-color ease-in-out;font-size:14px}.nylas-transcript .transcripts .transcripts-item .highlight{background-color:yellow}.nylas-transcript .transcripts .transcripts-item .copy-btn{fill:#4b4b4b;cursor:pointer;width:24px;transition:0.3s transform ease-in-out}.nylas-transcript .transcripts .transcripts-item .copy-btn:active{fill:#9747ff;transform:scale(2)}.nylas-transcript .transcripts .transcripts-item .speaker{font-weight:500;font-size:16px;margin-bottom:0.5rem}.nylas-transcript .transcripts .transcripts-item.active{background-color:#ebeff6}.nylas-transcript .transcripts .transcripts-item .time{color:#9747ff;font-weight:600;min-width:60px}', k = S;
85
- p.extend(u);
86
- const H = ({ text: t, highlight: e }) => (e && (t = t.replace(new RegExp(e, "gi"), `<span class="highlight">${e}</span>`)), r("div", { innerHTML: t })), T = class {
87
- constructor(t) {
88
- b(this, t), this.focusedIndex = -1, this.autoscroll = !0, this.transcript = void 0;
89
- }
90
- componentDidLoad() {
91
- i.onChange("style", (t) => {
92
- console.log("Style change", t), this.el.shadowRoot && t && (this.el.shadowRoot.adoptedStyleSheets = [t]);
93
- });
94
- }
95
- get transcripts() {
96
- var c;
97
- const t = x.get("videoTime"), e = i.get("searchTerm");
98
- if (!this.transcript)
99
- return [];
100
- const n = this.transcript.findIndex((a) => a.start / 1e3 >= t) - 1;
101
- n >= 0 && this.autoscroll && ((c = this.transcriptContainer.querySelector(".active")) == null || c.scrollIntoView({ behavior: "smooth", block: "center" }));
102
- let s = this.transcript.map((a, f) => ({
103
- ...a,
104
- active: f === n,
105
- ts: a.start ? this.secondsToStr(a.start) : null
106
- }));
107
- return e && (s = s.filter((a) => a.text.toLowerCase().includes(e.toLowerCase()))), s;
108
- }
109
- secondsToStr(t) {
110
- return t < 36e5 ? p.utc(t).format("mm:ss") : p.utc(t).format("HH:mm:ss");
111
- }
112
- handleCopy(t) {
113
- navigator.clipboard.writeText(`${t.ts} ${t.speaker}: ${t.text}`);
114
- }
115
- render() {
116
- return r("div", { key: "690629131ffa02c83db097568bcb9d983934a52d", class: "nylas-transcript" }, r(w, { key: "e259b18c6f56c48881b305e87540ccf8752299ad", transcripts: this.transcripts }), r("div", { key: "e9fd658295e29bf38877e3bf30c324710e732b8a", class: "transcripts", ref: (t) => this.transcriptContainer = t }, !this.transcripts.length && r("div", { class: "no-results" }, "Transcript not available."), this.transcripts.map((t, e) => r("div", { class: {
117
- "transcripts-item": !0,
118
- active: t.active
119
- }, onPointerEnter: () => this.focusedIndex = e, onPointerLeave: () => this.focusedIndex = -1 }, t.ts && r("div", { class: "time" }, this.focusedIndex === e ? r("span", { onClick: () => this.handleCopy(t) }, r(h, { className: "copy-btn" })) : t.ts), r("div", { class: "message" }, r("div", { class: "speaker" }, t.speaker), r(H, { text: t.text, highlight: i.get("searchTerm") }))))));
120
- }
121
- get el() {
122
- return y(this);
123
- }
124
- };
125
- T.style = k;
126
- export {
127
- T as nylas_transcript
128
- };
@@ -1,6 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-22f83f6f.cjs"),C=require("./notebook-store-b61693cd-c1314935.cjs");require("react");require("react/jsx-runtime");require("react-dom");const p=new CSSStyleSheet;p.replaceSync(`
2
- :host {
3
- font-family: Arial, sans-serif;
4
- }
5
- `);const i=t.createStore({style:p,toolbarState:"default",searchTerm:""}),f=({width:r,height:e,fill:n})=>t.h("svg",{viewBox:"0 0 16 16",width:r,height:e,xmlns:"http://www.w3.org/2000/svg"},t.h("path",{d:"M9.30887 10.016C8.53903 10.6318 7.56252 11 6.5 11C4.01472 11 2 8.98531 2 6.50002C2 4.01473 4.01472 2 6.5 2C8.98528 2 11 4.01473 11 6.50002C11 7.56252 10.6318 8.53901 10.016 9.30885L13.8536 13.1464C14.0488 13.3417 14.0488 13.6583 13.8536 13.8536C13.6583 14.0488 13.3417 14.0488 13.1464 13.8536L9.30887 10.016ZM10 6.50002C10 4.56701 8.433 3 6.5 3C4.567 3 3 4.56701 3 6.50002C3 8.43302 4.567 10 6.5 10C8.433 10 10 8.43302 10 6.50002Z",fill:n})),h=({width:r,height:e,fill:n,className:s})=>t.h("svg",{width:r,height:e,class:s,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg"},t.h("path",{d:"M4.00029 4.08525L4 10.5C4 11.8255 5.03154 12.91 6.33562 12.9947L6.5 13L10.9144 13.0007C10.7083 13.5829 10.1528 14 9.5 14H6C4.34315 14 3 12.6569 3 11V5.5C3 4.84678 3.41754 4.29109 4.00029 4.08525ZM11.5 2C12.3284 2 13 2.67157 13 3.5V10.5C13 11.3284 12.3284 12 11.5 12H6.5C5.67157 12 5 11.3284 5 10.5V3.5C5 2.67157 5.67157 2 6.5 2H11.5ZM11.5 3H6.5C6.22386 3 6 3.22386 6 3.5V10.5C6 10.7761 6.22386 11 6.5 11H11.5C11.7761 11 12 10.7761 12 10.5V3.5C12 3.22386 11.7761 3 11.5 3Z",fill:n})),b=({width:r,height:e,fill:n})=>t.h("svg",{width:r,height:e,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg"},t.h("path",{d:"M8 14C11.3137 14 14 11.3137 14 8C14 4.68629 11.3137 2 8 2C4.68629 2 2 4.68629 2 8C2 11.3137 4.68629 14 8 14ZM8 3C8.37372 3 8.87543 3.35608 9.31258 4.31781C9.4073 4.52619 9.49448 4.75446 9.57265 5H6.42735C6.50552 4.75446 6.5927 4.52619 6.68742 4.31781C7.12457 3.35608 7.62628 3 8 3ZM5.77705 3.90401C5.62614 4.23601 5.49428 4.6038 5.38411 5H3.99963C4.52341 4.30269 5.22525 3.74677 6.03766 3.39978C5.94287 3.56117 5.85596 3.7304 5.77705 3.90401ZM5.16299 6C5.05694 6.6275 5 7.30146 5 8C5 8.69854 5.05694 9.3725 5.16299 10H3.41604C3.14845 9.38754 3 8.7111 3 8C3 7.2889 3.14845 6.61246 3.41604 6H5.16299ZM5.38411 11C5.49428 11.3962 5.62614 11.764 5.77705 12.096C5.85596 12.2696 5.94287 12.4388 6.03766 12.6002C5.22525 12.2532 4.52341 11.6973 3.99963 11H5.38411ZM6.42735 11H9.57265C9.49448 11.2455 9.4073 11.4738 9.31258 11.6822C8.87543 12.6439 8.37372 13 8 13C7.62628 13 7.12457 12.6439 6.68742 11.6822C6.5927 11.4738 6.50552 11.2455 6.42735 11ZM9.82134 10H6.17866C6.06438 9.3892 6 8.71396 6 8C6 7.28604 6.06438 6.6108 6.17866 6H9.82134C9.93562 6.6108 10 7.28604 10 8C10 8.71396 9.93562 9.3892 9.82134 10ZM10.6159 11H12.0004C11.4766 11.6973 10.7747 12.2532 9.96234 12.6002C10.0571 12.4388 10.144 12.2696 10.2229 12.096C10.3739 11.764 10.5057 11.3962 10.6159 11ZM12.584 10H10.837C10.9431 9.3725 11 8.69854 11 8C11 7.30146 10.9431 6.6275 10.837 6H12.584C12.8516 6.61246 13 7.2889 13 8C13 8.7111 12.8516 9.38754 12.584 10ZM9.96234 3.39978C10.7747 3.74677 11.4766 4.30269 12.0004 5H10.6159C10.5057 4.6038 10.3739 4.23601 10.2229 3.90401C10.144 3.7304 10.0571 3.56117 9.96234 3.39978Z",fill:n})),d=i.get,o=i.set,l=(r,e)=>d(r)===e;function y({transcripts:r}){const e=()=>{o("searchTerm",""),o("toolbarState","default")},n=async()=>{const s={"text/plain":r.map(a=>`${a.ts} ${a.speaker}: ${a.text}`).join(`
6
- `)},c=new ClipboardItem(s);await navigator.clipboard.write([c])};return t.h("div",{class:"toolbar"},l("toolbarState","default")&&t.h("div",{class:"controls"},t.h("button",{onClick:()=>o("toolbarState","search")},t.h(f,{height:16,fill:"#2C2C2C"}),"Search"),t.h("button",{onClick:n},t.h(h,{height:16,fill:"#2C2C2C"}),"Copy"),t.h("button",{onClick:()=>o("toolbarState","language")},t.h(b,{height:16,fill:"#2C2C2C"}),"Language")),l("toolbarState","search")&&t.h("div",{class:"search"},t.h("input",{type:"text",value:d("searchTerm"),onInput:s=>o("searchTerm",s.target.value),onKeyDown:s=>s.key==="Escape"&&e(),placeholder:"Search transcript",autoFocus:!0}),t.h("button",{class:"clear",onClick:e},"Cancel")),l("toolbarState","language")&&t.h("div",{class:"language"},t.h("select",null,t.h("option",{value:"en"},"English"),t.h("option",{value:"fr"},"French")),t.h("button",{class:"regenerate"},"Regenerate"),t.h("button",{class:"clear",onClick:e},"Done")))}const x=':host{--background:white;--font-family:"Inter", sans-serif;--border-radius:8px}.nylas-transcript{background-color:var(--background);border-radius:var(--border-radius);border:1px solid #e0e6f9;font-size:14px;font-family:var(--font-family);font-optical-sizing:auto}.nylas-transcript .toolbar{padding:20px 20px}.nylas-transcript .toolbar input,.nylas-transcript .toolbar select{border:1px solid #4169e1;padding:10px 20px;border-radius:6px;width:100%}.nylas-transcript .toolbar button.clear{background:none;border:none;cursor:pointer;font-size:14px;font-family:var(--font-family)}.nylas-transcript .toolbar .controls{display:flex;align-items:center;justify-content:stretch;gap:6px}.nylas-transcript .toolbar .controls button{font-family:var(--font-family);cursor:pointer;background-color:white;border:1px solid #c7dbf9;border-radius:8px;padding-top:12px;padding-bottom:12px;flex-grow:1;letter-spacing:-4%;display:flex;align-items:center;justify-content:center}.nylas-transcript .toolbar .controls button svg{margin-right:6px}.nylas-transcript .toolbar .controls button:active{background-color:#f0f4f9}.nylas-transcript .toolbar .search,.nylas-transcript .toolbar .language{display:flex;align-items:center;justify-content:space-between;gap:20px}.nylas-transcript .language button.regenerate{width:93px;border-radius:8px;padding:12px 8px;text-align:center;outline:0;border:none;background-color:#4169e1;color:white}.nylas-transcript .transcripts{max-height:50vh;overflow-y:auto;border-top:1px solid #ebeff6}.nylas-transcript .transcripts .no-results{padding:20px;text-align:center;color:rgba(0, 0, 0, 0.6)}.nylas-transcript .transcripts .transcripts-item{padding:16px 18px;gap:20px;display:flex;line-height:24px;border-bottom:1px solid #ebeff6;transition:0.5s background-color ease-in-out;font-size:14px}.nylas-transcript .transcripts .transcripts-item .highlight{background-color:yellow}.nylas-transcript .transcripts .transcripts-item .copy-btn{fill:#4b4b4b;cursor:pointer;width:24px;transition:0.3s transform ease-in-out}.nylas-transcript .transcripts .transcripts-item .copy-btn:active{fill:#9747ff;transform:scale(2)}.nylas-transcript .transcripts .transcripts-item .speaker{font-weight:500;font-size:16px;margin-bottom:0.5rem}.nylas-transcript .transcripts .transcripts-item.active{background-color:#ebeff6}.nylas-transcript .transcripts .transcripts-item .time{color:#9747ff;font-weight:600;min-width:60px}',m=x;t.dayjs.extend(t.utc);const v=({text:r,highlight:e})=>(e&&(r=r.replace(new RegExp(e,"gi"),`<span class="highlight">${e}</span>`)),t.h("div",{innerHTML:r})),u=class{constructor(r){t.registerInstance(this,r),this.focusedIndex=-1,this.autoscroll=!0,this.transcript=void 0}componentDidLoad(){i.onChange("style",r=>{console.log("Style change",r),this.el.shadowRoot&&r&&(this.el.shadowRoot.adoptedStyleSheets=[r])})}get transcripts(){var c;const r=C.videoStore.get("videoTime"),e=i.get("searchTerm");if(!this.transcript)return[];const n=this.transcript.findIndex(a=>a.start/1e3>=r)-1;n>=0&&this.autoscroll&&((c=this.transcriptContainer.querySelector(".active"))==null||c.scrollIntoView({behavior:"smooth",block:"center"}));let s=this.transcript.map((a,g)=>({...a,active:g===n,ts:a.start?this.secondsToStr(a.start):null}));return e&&(s=s.filter(a=>a.text.toLowerCase().includes(e.toLowerCase()))),s}secondsToStr(r){return r<36e5?t.dayjs.utc(r).format("mm:ss"):t.dayjs.utc(r).format("HH:mm:ss")}handleCopy(r){navigator.clipboard.writeText(`${r.ts} ${r.speaker}: ${r.text}`)}render(){return t.h("div",{key:"690629131ffa02c83db097568bcb9d983934a52d",class:"nylas-transcript"},t.h(y,{key:"e259b18c6f56c48881b305e87540ccf8752299ad",transcripts:this.transcripts}),t.h("div",{key:"e9fd658295e29bf38877e3bf30c324710e732b8a",class:"transcripts",ref:r=>this.transcriptContainer=r},!this.transcripts.length&&t.h("div",{class:"no-results"},"Transcript not available."),this.transcripts.map((r,e)=>t.h("div",{class:{"transcripts-item":!0,active:r.active},onPointerEnter:()=>this.focusedIndex=e,onPointerLeave:()=>this.focusedIndex=-1},r.ts&&t.h("div",{class:"time"},this.focusedIndex===e?t.h("span",{onClick:()=>this.handleCopy(r)},t.h(h,{className:"copy-btn"})):r.ts),t.h("div",{class:"message"},t.h("div",{class:"speaker"},r.speaker),t.h(v,{text:r.text,highlight:i.get("searchTerm")}))))))}get el(){return t.getElement(this)}};u.style=m;exports.nylas_transcript=u;