@nylas/react 1.1.5 → 1.1.7

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 (227) hide show
  1. package/dist/{add-circle-icon_2.entry-31acee1d.cjs → add-circle-icon_2.entry-5814b516.cjs} +1 -1
  2. package/dist/{add-circle-icon_2.entry-1e899552.js → add-circle-icon_2.entry-5db67b5b.js} +1 -1
  3. package/dist/add-circle-icon_2.entry-95b23b9d.js +25 -0
  4. package/dist/add-circle-icon_2.entry-ae11c837.cjs +1 -0
  5. package/dist/{archive-icon.entry-e932c9e6.cjs → archive-icon.entry-10ebbf9a.cjs} +1 -1
  6. package/dist/archive-icon.entry-2ead8ef0.cjs +1 -0
  7. package/dist/{archive-icon.entry-b5f307e8.js → archive-icon.entry-769e863b.js} +1 -1
  8. package/dist/archive-icon.entry-b28d195c.js +15 -0
  9. package/dist/{arrow-icon.entry-e35a6cad.cjs → arrow-icon.entry-024d613a.cjs} +1 -1
  10. package/dist/{arrow-icon.entry-aae2e22d.js → arrow-icon.entry-1ebd553a.js} +1 -1
  11. package/dist/arrow-icon.entry-8de38831.cjs +1 -0
  12. package/dist/arrow-icon.entry-e29d7a6c.js +15 -0
  13. package/dist/{bold-icon.entry-d5d86b3f.js → bold-icon.entry-17c78a12.js} +1 -1
  14. package/dist/bold-icon.entry-316f5e61.js +15 -0
  15. package/dist/{bold-icon.entry-1e3c9b1f.cjs → bold-icon.entry-8bc27b72.cjs} +1 -1
  16. package/dist/bold-icon.entry-caf96585.cjs +1 -0
  17. package/dist/{button-component_2.entry-5284316e.js → button-component_2.entry-1095ad9f.js} +1 -1
  18. package/dist/button-component_2.entry-531a725d.js +26 -0
  19. package/dist/{button-component_2.entry-a86f8dca.cjs → button-component_2.entry-5cd0adf0.cjs} +1 -1
  20. package/dist/button-component_2.entry-64a41161.cjs +1 -0
  21. package/dist/{calendar-agenda-fill-icon_54.entry-5672c589.js → calendar-agenda-fill-icon_54.entry-6b2114d5.js} +309 -294
  22. package/dist/calendar-agenda-fill-icon_54.entry-84e72636.js +5656 -0
  23. package/dist/calendar-agenda-fill-icon_54.entry-abb96e20.cjs +10 -0
  24. package/dist/calendar-agenda-fill-icon_54.entry-f5577fdb.cjs +10 -0
  25. package/dist/{calendar-cancel-icon.entry-e9792eaa.cjs → calendar-cancel-icon.entry-4c58ea10.cjs} +1 -1
  26. package/dist/{calendar-cancel-icon.entry-7f81de9d.js → calendar-cancel-icon.entry-d27593a5.js} +1 -1
  27. package/dist/calendar-cancel-icon.entry-f11e5aaa.cjs +1 -0
  28. package/dist/calendar-cancel-icon.entry-f1a6f9bc.js +15 -0
  29. package/dist/{calendar-check-icon_2.entry-84db1700.js → calendar-check-icon_2.entry-38e1140b.js} +1 -1
  30. package/dist/{calendar-check-icon_2.entry-ad055b37.cjs → calendar-check-icon_2.entry-4a35f416.cjs} +1 -1
  31. package/dist/calendar-check-icon_2.entry-52187599.cjs +1 -0
  32. package/dist/calendar-check-icon_2.entry-7f17a3a6.js +25 -0
  33. package/dist/{calendar-icon.entry-019f7feb.cjs → calendar-icon.entry-002ee369.cjs} +1 -1
  34. package/dist/calendar-icon.entry-3c5c97d4.cjs +1 -0
  35. package/dist/{calendar-icon.entry-45db1630.js → calendar-icon.entry-4543de86.js} +1 -1
  36. package/dist/calendar-icon.entry-b76e26e6.js +15 -0
  37. package/dist/{checkbox-component_2.entry-8325ff88.cjs → checkbox-component_2.entry-ad4ab088.cjs} +1 -1
  38. package/dist/checkbox-component_2.entry-b24885e9.cjs +1 -0
  39. package/dist/{checkbox-component_2.entry-84a053ff.js → checkbox-component_2.entry-cf15106d.js} +1 -1
  40. package/dist/checkbox-component_2.entry-e4a3dd2d.js +79 -0
  41. package/dist/{chevron-icon_3.entry-0edde2a6.cjs → chevron-icon_3.entry-582df6f7.cjs} +1 -1
  42. package/dist/chevron-icon_3.entry-59d8b408.cjs +1 -0
  43. package/dist/{chevron-icon_3.entry-ec894a13.js → chevron-icon_3.entry-5e60a853.js} +1 -1
  44. package/dist/chevron-icon_3.entry-cab72db3.js +143 -0
  45. package/dist/{clock-icon_4.entry-935fe48d.cjs → clock-icon_4.entry-8348282a.cjs} +1 -1
  46. package/dist/{clock-icon_4.entry-8ec9c29b.js → clock-icon_4.entry-d03310ae.js} +1 -1
  47. package/dist/clock-icon_4.entry-f6b9f85d.js +45 -0
  48. package/dist/clock-icon_4.entry-fcbc39b0.cjs +1 -0
  49. package/dist/{copy-icon.entry-d9405510.js → copy-icon.entry-3ea78e28.js} +1 -1
  50. package/dist/copy-icon.entry-430beab4.js +15 -0
  51. package/dist/{copy-icon.entry-5a2030da.cjs → copy-icon.entry-5337f980.cjs} +1 -1
  52. package/dist/copy-icon.entry-74a59fc5.cjs +1 -0
  53. package/dist/{delete-icon.entry-1b0a3ba4.js → delete-icon.entry-480ac215.js} +1 -1
  54. package/dist/{delete-icon.entry-3f3d1ffb.cjs → delete-icon.entry-87b2daaa.cjs} +1 -1
  55. package/dist/delete-icon.entry-9c1af040.js +15 -0
  56. package/dist/delete-icon.entry-e320cde1.cjs +1 -0
  57. package/dist/{document-refresh-icon.entry-fab58d33.js → document-refresh-icon.entry-665a7947.js} +1 -1
  58. package/dist/{document-refresh-icon.entry-59a18097.cjs → document-refresh-icon.entry-6be2b468.cjs} +1 -1
  59. package/dist/document-refresh-icon.entry-930ee2b7.js +15 -0
  60. package/dist/document-refresh-icon.entry-fcde4ff6.cjs +1 -0
  61. package/dist/{feedbackSync-b56b29ed-7a1f1f75.js → feedbackSync-b56b29ed-36483932.js} +1 -1
  62. package/dist/{feedbackSync-b56b29ed-b6f352f3.cjs → feedbackSync-b56b29ed-599103b9.cjs} +1 -1
  63. package/dist/feedbackSync-b56b29ed-7a7c650e.cjs +448 -0
  64. package/dist/feedbackSync-b56b29ed-9e38fdb6.js +6035 -0
  65. package/dist/{folder-icon.entry-e85383b6.cjs → folder-icon.entry-89f0974f.cjs} +1 -1
  66. package/dist/folder-icon.entry-977e50eb.cjs +1 -0
  67. package/dist/{folder-icon.entry-b5a123d0.js → folder-icon.entry-9bf864d7.js} +1 -1
  68. package/dist/folder-icon.entry-b80d8fd7.js +15 -0
  69. package/dist/{forward-icon.entry-88ab1a85.js → forward-icon.entry-2b0167a7.js} +1 -1
  70. package/dist/{forward-icon.entry-7c8ed4c3.cjs → forward-icon.entry-699c55d9.cjs} +1 -1
  71. package/dist/forward-icon.entry-c4c20f31.cjs +1 -0
  72. package/dist/forward-icon.entry-eb64aa16.js +15 -0
  73. package/dist/{globe-icon.entry-b1253516.cjs → globe-icon.entry-3d08a9c4.cjs} +1 -1
  74. package/dist/{globe-icon.entry-6fb414ca.js → globe-icon.entry-5d962e7a.js} +1 -1
  75. package/dist/globe-icon.entry-5ef1dc42.cjs +1 -0
  76. package/dist/globe-icon.entry-667987bd.js +15 -0
  77. package/dist/{google-logo-icon_4.entry-ae09d065.cjs → google-logo-icon_4.entry-12f1492f.cjs} +1 -1
  78. package/dist/google-logo-icon_4.entry-bd4d2237.cjs +1 -0
  79. package/dist/{google-logo-icon_4.entry-fe627741.js → google-logo-icon_4.entry-ec724f2e.js} +101 -101
  80. package/dist/google-logo-icon_4.entry-fc38681e.js +729 -0
  81. package/dist/{inbox-icon.entry-cec35da1.js → inbox-icon.entry-2020fa96.js} +1 -1
  82. package/dist/{inbox-icon.entry-7dce836e.cjs → inbox-icon.entry-45414f66.cjs} +1 -1
  83. package/dist/inbox-icon.entry-49353988.js +15 -0
  84. package/dist/inbox-icon.entry-b556231f.cjs +1 -0
  85. package/dist/index-290b2932.cjs +81 -0
  86. package/dist/{index-3fd31877.js → index-2b208d5d.js} +50 -50
  87. package/dist/{index-bd6fdc8c.cjs → index-bf124f70.cjs} +2 -2
  88. package/dist/index-fb096a02.js +13011 -0
  89. package/dist/{index.es-c7ca1bad-0a324dca.cjs → index.es-c7ca1bad-67a99f41.cjs} +1 -1
  90. package/dist/{index.es-c7ca1bad-b895d84b.js → index.es-c7ca1bad-70899f2a.js} +1 -1
  91. package/dist/index.es-c7ca1bad-b7a3e6bd.cjs +7 -0
  92. package/dist/index.es-c7ca1bad-cb3a99a7.js +3129 -0
  93. package/dist/{info-icon_2.entry-1dab6311.cjs → info-icon_2.entry-237205a0.cjs} +1 -1
  94. package/dist/{info-icon_2.entry-f7e6b4aa.js → info-icon_2.entry-b98a2882.js} +1 -1
  95. package/dist/info-icon_2.entry-caf64c28.cjs +1 -0
  96. package/dist/info-icon_2.entry-d935e5c2.js +34 -0
  97. package/dist/{input-color-picker.entry-30cda4e2.js → input-color-picker.entry-684413c1.js} +1 -1
  98. package/dist/input-color-picker.entry-752534de.js +48 -0
  99. package/dist/{input-color-picker.entry-b6e53c29.cjs → input-color-picker.entry-8fe3482d.cjs} +1 -1
  100. package/dist/input-color-picker.entry-f856fce3.cjs +1 -0
  101. package/dist/{input-component.entry-7a04bc8b.js → input-component.entry-00b97287.js} +1 -1
  102. package/dist/input-component.entry-4400f98e.js +70 -0
  103. package/dist/{input-component.entry-1f1f8e00.cjs → input-component.entry-bcd13373.cjs} +1 -1
  104. package/dist/input-component.entry-d486907a.cjs +1 -0
  105. package/dist/{input-dropdown.entry-abf134a8.js → input-dropdown.entry-3c39e23a.js} +1 -1
  106. package/dist/{input-dropdown.entry-5e5b67be.cjs → input-dropdown.entry-b26475c4.cjs} +1 -1
  107. package/dist/input-dropdown.entry-bea3c690.js +134 -0
  108. package/dist/input-dropdown.entry-d3d4e50e.cjs +1 -0
  109. package/dist/{italic-icon.entry-c793243b.cjs → italic-icon.entry-14081a02.cjs} +1 -1
  110. package/dist/{italic-icon.entry-4631c594.js → italic-icon.entry-2199bb17.js} +1 -1
  111. package/dist/italic-icon.entry-63726952.cjs +1 -0
  112. package/dist/italic-icon.entry-a3c87e5e.js +15 -0
  113. package/dist/{multi-select-dropdown.entry-9a93da56.js → multi-select-dropdown.entry-2141b848.js} +1 -1
  114. package/dist/{multi-select-dropdown.entry-2b8728d5.cjs → multi-select-dropdown.entry-7b66d2ae.cjs} +1 -1
  115. package/dist/multi-select-dropdown.entry-8a2c4b42.cjs +1 -0
  116. package/dist/multi-select-dropdown.entry-cdd97d65.js +95 -0
  117. package/dist/nylas-booked-event-card_12.entry-20c254bb.cjs +1 -0
  118. package/dist/nylas-booked-event-card_12.entry-2d88375a.js +1237 -0
  119. package/dist/nylas-booked-event-card_12.entry-90a0b6c7.cjs +1 -0
  120. package/dist/nylas-booked-event-card_12.entry-bbd7cfb0.js +1237 -0
  121. package/dist/{nylas-form-card.entry-af179b96.cjs → nylas-form-card.entry-1e9225b0.cjs} +1 -1
  122. package/dist/{nylas-form-card.entry-862519b4.js → nylas-form-card.entry-a8a44a3b.js} +2 -2
  123. package/dist/nylas-form-card.entry-d6287d76.cjs +1 -0
  124. package/dist/nylas-form-card.entry-fadd7718.js +57 -0
  125. package/dist/{nylas-if-state.entry-8803a762.js → nylas-if-state.entry-32b11afa.js} +2 -2
  126. package/dist/{nylas-if-state.entry-c1c1282d.cjs → nylas-if-state.entry-473230a6.cjs} +1 -1
  127. package/dist/nylas-if-state.entry-8be8107e.js +94 -0
  128. package/dist/nylas-if-state.entry-9c341f13.cjs +1 -0
  129. package/dist/{nylas-login.entry-65f8f046.cjs → nylas-login.entry-995b6f99.cjs} +1 -1
  130. package/dist/nylas-login.entry-b9c2fb27.cjs +1 -0
  131. package/dist/{nylas-login.entry-3e12f747.js → nylas-login.entry-d663205c.js} +2 -2
  132. package/dist/nylas-login.entry-e3a9c5c1.js +73 -0
  133. package/dist/{nylas-provider.entry-9626b113.cjs → nylas-provider.entry-050f20bd.cjs} +1 -1
  134. package/dist/nylas-provider.entry-5b54f2cc.cjs +1 -0
  135. package/dist/{nylas-provider.entry-e3501bd1.js → nylas-provider.entry-c24474c3.js} +4 -4
  136. package/dist/nylas-provider.entry-ca3e06ce.js +264 -0
  137. package/dist/{nylas-scheduler-editor.entry-17cd1514.cjs → nylas-scheduler-editor.entry-3b834bb1.cjs} +1 -1
  138. package/dist/{nylas-scheduler-editor.entry-6df45b05.js → nylas-scheduler-editor.entry-5c0a5fb4.js} +3 -3
  139. package/dist/nylas-scheduler-editor.entry-b86f49a1.js +1447 -0
  140. package/dist/nylas-scheduler-editor.entry-d52db29e.cjs +2 -0
  141. package/dist/{nylas-scheduling.entry-08051ba3.js → nylas-scheduling.entry-04c3951e.js} +73 -73
  142. package/dist/nylas-scheduling.entry-a5c4b050.js +412 -0
  143. package/dist/{nylas-scheduling.entry-b1fafd91.cjs → nylas-scheduling.entry-d549c5c3.cjs} +1 -1
  144. package/dist/nylas-scheduling.entry-ed12a4f6.cjs +1 -0
  145. package/dist/{nylas-time-window-picker.entry-4989d421.cjs → nylas-time-window-picker.entry-337d03c1.cjs} +1 -1
  146. package/dist/nylas-time-window-picker.entry-4aefade8.cjs +1 -0
  147. package/dist/{nylas-time-window-picker.entry-bdc8c6ea.js → nylas-time-window-picker.entry-678a7dbf.js} +1 -1
  148. package/dist/nylas-time-window-picker.entry-ecc3ee10.js +316 -0
  149. package/dist/{person-icon.entry-fb7efa8f.cjs → person-icon.entry-3fee5bc4.cjs} +1 -1
  150. package/dist/{person-icon.entry-d62a16b4.js → person-icon.entry-902b2c0d.js} +1 -1
  151. package/dist/person-icon.entry-9680bc2b.js +15 -0
  152. package/dist/person-icon.entry-dede7140.cjs +1 -0
  153. package/dist/{play-icon.entry-01b95392.js → play-icon.entry-1078da37.js} +1 -1
  154. package/dist/{play-icon.entry-f485a2c8.cjs → play-icon.entry-a7f648f7.cjs} +1 -1
  155. package/dist/play-icon.entry-c8f3a5d8.cjs +1 -0
  156. package/dist/play-icon.entry-dacc3aa6.js +15 -0
  157. package/dist/react.cjs +1 -1
  158. package/dist/react.js +1 -1
  159. package/dist/{refresh-icon.entry-5f997e86.cjs → refresh-icon.entry-06f9d181.cjs} +1 -1
  160. package/dist/{refresh-icon.entry-1ff4b39f.js → refresh-icon.entry-5399f64b.js} +1 -1
  161. package/dist/refresh-icon.entry-555a38ec.cjs +1 -0
  162. package/dist/refresh-icon.entry-d4dcfc3a.js +15 -0
  163. package/dist/{register-component-3444af44-854971ad.js → register-component-3444af44-3d6e535a.js} +1 -1
  164. package/dist/register-component-3444af44-4a273c0a.js +109 -0
  165. package/dist/{register-component-3444af44-9053e8c3.cjs → register-component-3444af44-6d269634.cjs} +1 -1
  166. package/dist/register-component-3444af44-d3e7252a.cjs +1 -0
  167. package/dist/{reply-all-icon.entry-1dad6514.cjs → reply-all-icon.entry-70ffe5be.cjs} +1 -1
  168. package/dist/{reply-all-icon.entry-cbafb8a0.js → reply-all-icon.entry-a3a20f76.js} +1 -1
  169. package/dist/reply-all-icon.entry-bb2a88ad.js +15 -0
  170. package/dist/reply-all-icon.entry-f8a32be1.cjs +1 -0
  171. package/dist/{reply-icon.entry-a43bc252.js → reply-icon.entry-302ed745.js} +1 -1
  172. package/dist/reply-icon.entry-423fb307.js +15 -0
  173. package/dist/{reply-icon.entry-162d9945.cjs → reply-icon.entry-a08c0e57.cjs} +1 -1
  174. package/dist/reply-icon.entry-d2da8972.cjs +1 -0
  175. package/dist/{scheduler-config-store-ed4a8dfd-eeaeaa50.cjs → scheduler-config-store-ed4a8dfd-34c4c119.cjs} +1 -1
  176. package/dist/scheduler-config-store-ed4a8dfd-474f6252.cjs +1 -0
  177. package/dist/{scheduler-config-store-ed4a8dfd-22db9285.js → scheduler-config-store-ed4a8dfd-81687f55.js} +1 -1
  178. package/dist/scheduler-config-store-ed4a8dfd-fe2b9d18.js +26 -0
  179. package/dist/{scheduler-store-d4784b24-9a5f5734.js → scheduler-store-2e7db190-c648278f.js} +27 -25
  180. package/dist/scheduler-store-2e7db190-fb6a20a1.cjs +1 -0
  181. package/dist/scheduler-store-5fbba021-09da63cf.cjs +1 -0
  182. package/dist/scheduler-store-5fbba021-6298edf3.js +484 -0
  183. package/dist/{sent-icon.entry-a05486d5.js → sent-icon.entry-4d7b65ba.js} +1 -1
  184. package/dist/{sent-icon.entry-a1aec7e9.cjs → sent-icon.entry-6396b793.cjs} +1 -1
  185. package/dist/sent-icon.entry-6ed4170a.js +15 -0
  186. package/dist/sent-icon.entry-db89fd38.cjs +1 -0
  187. package/dist/{spam-icon.entry-473f11af.js → spam-icon.entry-45e7b83b.js} +1 -1
  188. package/dist/spam-icon.entry-81073952.js +15 -0
  189. package/dist/{spam-icon.entry-b481a04b.cjs → spam-icon.entry-8648a315.cjs} +1 -1
  190. package/dist/spam-icon.entry-cf05a2a7.cjs +1 -0
  191. package/dist/{star-icon.entry-6b1fe3cf.cjs → star-icon.entry-1c416cef.cjs} +1 -1
  192. package/dist/{star-icon.entry-12fdc345.js → star-icon.entry-61c36332.js} +1 -1
  193. package/dist/star-icon.entry-8279e6a9.cjs +1 -0
  194. package/dist/star-icon.entry-bb26cc4e.js +15 -0
  195. package/dist/{stop-icon.entry-4bd609f7.js → stop-icon.entry-089ac3ba.js} +1 -1
  196. package/dist/{stop-icon.entry-72481153.cjs → stop-icon.entry-d68aa652.cjs} +1 -1
  197. package/dist/stop-icon.entry-f62d063b.js +15 -0
  198. package/dist/stop-icon.entry-f88a5a2a.cjs +1 -0
  199. package/dist/{textarea-component.entry-f330a755.cjs → textarea-component.entry-502c8659.cjs} +1 -1
  200. package/dist/{textarea-component.entry-47e1b2e6.js → textarea-component.entry-8f5d835f.js} +1 -1
  201. package/dist/textarea-component.entry-d4a682fa.js +37 -0
  202. package/dist/textarea-component.entry-e06ee834.cjs +1 -0
  203. package/dist/{time-period-selector.entry-c7611563.cjs → time-period-selector.entry-001a1c59.cjs} +1 -1
  204. package/dist/{time-period-selector.entry-a4899368.js → time-period-selector.entry-7da7d316.js} +1 -1
  205. package/dist/time-period-selector.entry-837b9be3.js +80 -0
  206. package/dist/time-period-selector.entry-c5b6d0c9.cjs +1 -0
  207. package/dist/{translate-icon.entry-40dfa8c9.cjs → translate-icon.entry-4ee80d22.cjs} +1 -1
  208. package/dist/{translate-icon.entry-4517838d.js → translate-icon.entry-5166d376.js} +1 -1
  209. package/dist/translate-icon.entry-c1a623d8.cjs +1 -0
  210. package/dist/translate-icon.entry-e5cfae44.js +15 -0
  211. package/dist/{trash-fill-icon.entry-86ca3055.cjs → trash-fill-icon.entry-2f814465.cjs} +1 -1
  212. package/dist/{trash-fill-icon.entry-d7e960eb.js → trash-fill-icon.entry-49844a82.js} +1 -1
  213. package/dist/trash-fill-icon.entry-85e0e841.js +15 -0
  214. package/dist/trash-fill-icon.entry-def90241.cjs +1 -0
  215. package/dist/{underline-icon.entry-352970f5.js → underline-icon.entry-181f1d7e.js} +1 -1
  216. package/dist/{underline-icon.entry-f16d4943.cjs → underline-icon.entry-4ba93e7b.cjs} +1 -1
  217. package/dist/underline-icon.entry-72dadbdf.cjs +1 -0
  218. package/dist/underline-icon.entry-f7a75755.js +15 -0
  219. package/dist/{warning-icon.entry-63987dad.js → warning-icon.entry-2406b765.js} +1 -1
  220. package/dist/{warning-icon.entry-79ef75b2.cjs → warning-icon.entry-44ac5566.cjs} +1 -1
  221. package/dist/warning-icon.entry-5b6aeb2b.cjs +1 -0
  222. package/dist/warning-icon.entry-ef601856.js +15 -0
  223. package/package.json +2 -2
  224. package/dist/calendar-agenda-fill-icon_54.entry-702b29cc.cjs +0 -10
  225. package/dist/nylas-booked-event-card_12.entry-8d502a3c.cjs +0 -1
  226. package/dist/nylas-booked-event-card_12.entry-f13f3f54.js +0 -1144
  227. package/dist/scheduler-store-d4784b24-aed474e8.cjs +0 -1
@@ -0,0 +1,412 @@
1
+ import { i as f, r as Y, c as C, d as O, f as D, j as J, k as K, h as n, H as w, g as Q, F as W } from "./index-fb096a02.js";
2
+ import { n as z, N as X } from "./index.es-c7ca1bad-70899f2a.js";
3
+ import { E as S, C as Z, N as V } from "./scheduler-store-2e7db190-c648278f.js";
4
+ import { L as ee, a as te } from "./constants-c549b12b-7ea4c7f5.js";
5
+ import { i as ne, a as ie, c as oe, b as se, f as ae } from "./feedbackSync-b56b29ed-36483932.js";
6
+ import "react";
7
+ import "react-dom";
8
+ class re {
9
+ constructor({ schedulerAPIURL: e, nylasSchedulerStore: i, sessionId: a, configId: o, slug: r, clientId: d }) {
10
+ if (!e)
11
+ throw new Error("schedulerAPIURL is required");
12
+ if (!i)
13
+ throw new Error("nylasSchedulerStore is required");
14
+ if (!a && !o && !(r || d))
15
+ throw new Error("sessionId is required for private configs. If using public config either pass a configurationId or a combination of slug and clientId.");
16
+ e === "/" && (e = new URL(window.location.href).origin), this.configId = o, this.sessionId = a, this.schedulerAPIURL = e, this.nylasSchedulerStore = i, this.slug = r, this.clientId = d;
17
+ }
18
+ init() {
19
+ O("NylasConnector init");
20
+ }
21
+ get schedulerStore() {
22
+ return this.nylasSchedulerStore;
23
+ }
24
+ get scheduler() {
25
+ return this._schedulerAPIConnector ? this._schedulerAPIConnector : (this._schedulerAPIConnector = new V({
26
+ schedulerAPIURL: this.schedulerAPIURL,
27
+ schedulerStore: this.schedulerStore,
28
+ sessionId: this.sessionId,
29
+ configId: this.configId,
30
+ slug: this.slug,
31
+ clientId: this.clientId
32
+ }), this._schedulerAPIConnector);
33
+ }
34
+ resetStores() {
35
+ this.nylasSchedulerStore.reset();
36
+ }
37
+ }
38
+ const x = (t, e) => {
39
+ const i = t.isLoading, a = t.showNotification, o = t.nylasBranding;
40
+ return n(
41
+ W,
42
+ null,
43
+ a && n("nylas-notification", null),
44
+ i && n(
45
+ "div",
46
+ { class: "loading" },
47
+ n(
48
+ "div",
49
+ { class: "left" },
50
+ n("div", { class: "skeleton" })
51
+ ),
52
+ n(
53
+ "div",
54
+ { class: "right" },
55
+ n("div", { class: "skeleton" }),
56
+ n("div", { class: "skeleton" }),
57
+ n("div", { class: "skeleton" }),
58
+ n("div", { class: "skeleton" }),
59
+ n("div", { class: "skeleton" })
60
+ )
61
+ ),
62
+ !i && e,
63
+ n("div", { class: "footer" }, o && n(
64
+ W,
65
+ null,
66
+ "Powered by ",
67
+ n("nylas-logo", null)
68
+ ))
69
+ );
70
+ }, $ = (t, e) => n("div", { class: "message-banner" }, e), de = ':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-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;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{padding:0.5rem 4px 0;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}}.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 svg{fill:var(--nylas-base-500)}.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}', le = de, q = { title: f.t("genericErrorTitle"), type: z.Error, category: S.Component }, ce = class {
71
+ constructor(t) {
72
+ Y(this, t), this.init = C(this, "init", 7), this.schedulerWillLoad = C(this, "schedulerWillLoad", 7), this.schedulerDidLoad = C(this, "schedulerDidLoad", 7), this.nylasSchedulerError = C(this, "nylasSchedulerError", 7), this.configSettingsLoaded = C(this, "configSettingsLoaded", 7), this.bookingRefExtracted = C(this, "bookingRefExtracted", 7), this.bookedEventInfo = C(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.automaticComponentRegistration = !0, this.selectedDateLabel = (/* @__PURE__ */ new Date()).toLocaleDateString(void 0, { dateStyle: "full" }) || `${f.t("noDateSelected")}`, this.refConfigId = void 0, this.language = navigator.language, this.showFeedbackModal = !1, this.bookingInfoConfirmed = null;
73
+ }
74
+ connectedCallback() {
75
+ O("[nylas-scheduler] connectedCallback");
76
+ }
77
+ async componentWillLoad() {
78
+ var o, r;
79
+ O("[nylas-scheduler] Component will load"), this.enableUserFeedback && !ne() && ie({
80
+ dsn: "https://9d5731f1c77ca84c9ed3fb9b3ccf7ee1@o74852.ingest.us.sentry.io/4507889638178816",
81
+ release: "1.1.7",
82
+ integrations: (d) => [
83
+ ...d.filter((s) => !1),
84
+ ae({
85
+ colorScheme: "system",
86
+ autoInject: !1
87
+ })
88
+ ],
89
+ autoSessionTracking: !1,
90
+ beforeSend: () => null
91
+ });
92
+ const t = this.schedulerWillLoad.emit(this.host);
93
+ if ("schedulerWillLoad" in this.eventOverrides && (await this.eventOverrides.schedulerWillLoad(t, this.nylasSchedulerConnector), t.defaultPrevented))
94
+ return;
95
+ this.stores = {
96
+ scheduler: Z({
97
+ bookingInfo: this.bookingInfo,
98
+ nylasBranding: this.nylasBranding,
99
+ ...this.defaultSchedulerState
100
+ })
101
+ }, this.baseProvider = new X(this.host, this.stores, this.automaticComponentRegistration, this.eventOverrides), this.refConfigId = this.configurationId;
102
+ let e;
103
+ if (this.rescheduleBookingRef) {
104
+ const [d, s, c] = D(this.rescheduleBookingRef);
105
+ this.refConfigId = d, this.stores.scheduler.set("rescheduleBookingId", s), e = this.bookingRefExtracted.emit({ configurationId: d, bookingId: s });
106
+ } else if (this.cancelBookingRef) {
107
+ const [d, s, c] = D(this.cancelBookingRef);
108
+ this.refConfigId = d, this.stores.scheduler.set("cancelBookingId", s), e = this.bookingRefExtracted.emit({ configurationId: d, bookingId: s });
109
+ } else if (this.organizerConfirmationBookingRef) {
110
+ const [d, s, c] = D(this.organizerConfirmationBookingRef);
111
+ this.refConfigId = d, this.stores.scheduler.set("organizerConfirmationBookingId", s), this.stores.scheduler.set("organizerConfirmationSalt", c), e = this.bookingRefExtracted.emit({ configurationId: d, bookingId: s, salt: c });
112
+ }
113
+ if ("bookingRefExtracted" in this.eventOverrides && (await this.eventOverrides.bookingRefExtracted(e, this.nylasSchedulerConnector), e.defaultPrevented) || !this.checkIfSessionIdOrConfigIdExists())
114
+ return;
115
+ const i = (o = this.baseProvider) == null ? void 0 : o.getStore("scheduler");
116
+ this.nylasSchedulerConnector = new re({
117
+ schedulerAPIURL: this.schedulerApiUrl,
118
+ sessionId: this.sessionId,
119
+ configId: this.refConfigId,
120
+ slug: this.slug,
121
+ clientId: this.clientId,
122
+ nylasSchedulerStore: i
123
+ });
124
+ const a = this.init.emit(this.host);
125
+ "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));
126
+ }
127
+ async componentDidLoad() {
128
+ var c, m, p, g, h, u, k, B;
129
+ (c = this.baseProvider) == null || c.componentDidLoad();
130
+ const t = this.schedulerDidLoad.emit(this.host);
131
+ if ("schedulerDidLoad" in this.eventOverrides && (await this.eventOverrides.schedulerDidLoad(t, this.nylasSchedulerConnector), t.defaultPrevented) || !this.checkIfSessionIdOrConfigIdExists())
132
+ return;
133
+ this.localizationChanged(this.localization);
134
+ const e = await ((m = this.nylasSchedulerConnector) == null ? void 0 : m.scheduler.getUISettings());
135
+ if (!e || "error" in e) {
136
+ this.nylasSchedulerError.emit({ notification: { ...this.getErrorObject(e == null ? void 0 : e.error) }, host: this.host });
137
+ return;
138
+ } else {
139
+ "data" in e && ((p = e.data) != null && p.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.");
140
+ const b = this.configSettingsLoaded.emit({ settings: e });
141
+ if ("configSettingsLoaded" in this.eventOverrides && (await this.eventOverrides.configSettingsLoaded(b, this.nylasSchedulerConnector), b.defaultPrevented))
142
+ return;
143
+ }
144
+ const i = (g = this.baseProvider) == null ? void 0 : g.getStore("scheduler"), a = (u = (h = i == null ? void 0 : i.get("configSettings")) == null ? void 0 : h.scheduler) == null ? void 0 : u.available_days_in_future, o = i == null ? void 0 : i.get("selectedTimeslot");
145
+ if (o && (o != null && o.start_time)) {
146
+ if (!this.isTimeslotValid(o))
147
+ return;
148
+ if (i != null && i.get("showBookingForm")) {
149
+ i == null || i.set("selectedDate", o.start_time);
150
+ return;
151
+ }
152
+ }
153
+ const r = i == null ? void 0 : i.get("selectedDate"), d = i == null ? void 0 : i.get("availability");
154
+ let s;
155
+ if (!(d && d.length > 0)) {
156
+ if (r) {
157
+ const { startTime: b, endTime: y, endTimeForAvailableDaysInFuture: _ } = this.validateAvailableDaysInFuture(r, a || 30);
158
+ r.getTime() < _ * 1e3 && (s = await ((B = this.nylasSchedulerConnector) == null ? void 0 : B.scheduler.getAvailability(b, y)));
159
+ } else {
160
+ const b = /* @__PURE__ */ new Date(), { startTime: y, endTime: _, endTimeForAvailableDaysInFuture: L } = this.validateAvailableDaysInFuture(b, a || 30);
161
+ b.getTime() < L * 1e3 && (s = await ((k = this.nylasSchedulerConnector) == null ? void 0 : k.scheduler.getAvailability(y, _)));
162
+ }
163
+ if ((!s || "error" in s) && this.nylasSchedulerError.emit({ notification: { ...this.getErrorObject(s == null ? void 0 : s.error) }, host: this.host }), !r) {
164
+ let b = /* @__PURE__ */ new Date();
165
+ const y = i == null ? void 0 : i.get("availability").find((_) => new Date(_.start_time) > /* @__PURE__ */ new Date());
166
+ y && (b = y.start_time), i == null || i.set("selectedDate", b);
167
+ }
168
+ }
169
+ }
170
+ componentDisconnected() {
171
+ var t;
172
+ (t = this.baseProvider) == null || t.componentDisconnected();
173
+ }
174
+ bookingInfoChanged(t) {
175
+ var e;
176
+ (e = this.stores) == null || e.scheduler.set("bookingInfo", t);
177
+ }
178
+ rescheduleBookingRefChanged(t) {
179
+ var e, i;
180
+ if (t) {
181
+ const [a, o] = D(t);
182
+ (e = this.stores) == null || e.scheduler.set("rescheduleBookingId", o), this.refConfigId = a, (i = this.nylasSchedulerConnector) == null || i.scheduler.setConfigId(a);
183
+ }
184
+ }
185
+ cancelBookingRefChanged(t) {
186
+ var e, i;
187
+ if (t) {
188
+ const [a, o] = D(t);
189
+ (e = this.stores) == null || e.scheduler.set("cancelBookingId", o), this.refConfigId = a, (i = this.nylasSchedulerConnector) == null || i.scheduler.setConfigId(a);
190
+ }
191
+ }
192
+ organizerConfirmationBookingRefChanged(t) {
193
+ var e, i;
194
+ if (t) {
195
+ const [a, o] = D(t);
196
+ (e = this.stores) == null || e.scheduler.set("organizerConfirmationBookingId", o), this.refConfigId = a, (i = this.nylasSchedulerConnector) == null || i.scheduler.setConfigId(a);
197
+ }
198
+ }
199
+ localizationChanged(t) {
200
+ t && Object.keys(t).forEach((e) => {
201
+ e in ee && (f.addResourceBundle(e, "translation", t[e], !1, !0), this.language = this.language);
202
+ });
203
+ }
204
+ themeConfigChanged(t) {
205
+ this.applyThemeConfig(t);
206
+ }
207
+ languageChanged(t) {
208
+ const e = t.detail;
209
+ this.language = e, f.changeLanguage(e);
210
+ }
211
+ async registerComponentHandler(t) {
212
+ var e;
213
+ (e = this.baseProvider) == null || e.registerComponent(t.detail);
214
+ }
215
+ async unregisterComponentHandler(t) {
216
+ var e;
217
+ (e = this.baseProvider) == null || e.unregisterComponent(t.detail);
218
+ }
219
+ async monthChangedHandler(t) {
220
+ var d, s, c, m, p, g, h;
221
+ const e = t.detail, i = (m = (c = (s = (d = this.nylasSchedulerConnector) == null ? void 0 : d.schedulerStore) == null ? void 0 : s.get("configSettings")) == null ? void 0 : c.scheduler) == null ? void 0 : m.available_days_in_future, { startTime: a, endTime: o, endTimeForAvailableDaysInFuture: r } = this.validateAvailableDaysInFuture(e, i || 30);
222
+ if (a < r && e.getTime() < r * 1e3) {
223
+ const u = await ((p = this.nylasSchedulerConnector) == null ? void 0 : p.scheduler.getAvailability(a, o));
224
+ (!u || "error" in u) && this.nylasSchedulerError.emit({ notification: { ...this.getErrorObject(u == null ? void 0 : u.error) }, host: this.host });
225
+ const k = (g = this.stores) == null ? void 0 : g.scheduler.get("selectableDates");
226
+ k && k.length > 0 && ((h = this.stores) == null || h.scheduler.set("selectedDate", k[0]));
227
+ }
228
+ }
229
+ mapToBookingData(t) {
230
+ var d, s, c;
231
+ const e = (d = this.stores) == null ? void 0 : d.scheduler.get("selectedTimeslot"), i = (s = this.stores) == null ? void 0 : s.scheduler.get("selectedLanguage"), a = (c = this.stores) == null ? void 0 : c.scheduler.get("selectedTimezone"), o = 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 : "";
232
+ return {
233
+ additional_guests: t.guests,
234
+ guest: { ...t.primaryParticipant },
235
+ additional_fields: { ...t.additionalFields },
236
+ start_time: o,
237
+ end_time: r,
238
+ email_language: i,
239
+ timezone: a
240
+ };
241
+ }
242
+ async bookButtonClickedHandler(t) {
243
+ var c, m, p, g;
244
+ if (t.defaultPrevented)
245
+ return;
246
+ const e = t.detail, i = this.mapToBookingData(e);
247
+ this.bookingInfoConfirmed = e;
248
+ const o = (m = (c = this.nylasSchedulerConnector) == null ? void 0 : c.schedulerStore) == null ? void 0 : m.get("rescheduleBookingId");
249
+ if (o) {
250
+ const h = await ((p = this.nylasSchedulerConnector) == null ? void 0 : p.scheduler.rescheduleBooking(o, e));
251
+ (!h || "error" in h) && this.nylasSchedulerError.emit({ notification: { ...this.getErrorObject(h == null ? void 0 : h.error) }, host: this.host });
252
+ const u = h == null ? void 0 : h.data, k = this.bookedEventInfo.emit({ ...h, data: { ...u, ...i } });
253
+ "bookedEventInfo" in this.eventOverrides && await this.eventOverrides.bookedEventInfo(k, this.nylasSchedulerConnector);
254
+ return;
255
+ }
256
+ const r = await ((g = this.nylasSchedulerConnector) == null ? void 0 : g.scheduler.bookTimeslot(e));
257
+ (!r || "error" in r) && this.nylasSchedulerError.emit({ notification: { ...this.getErrorObject(r == null ? void 0 : r.error) }, host: this.host });
258
+ const d = r == null ? void 0 : r.data, s = this.bookedEventInfo.emit({ ...r, data: { ...d, ...i } });
259
+ "bookedEventInfo" in this.eventOverrides && await this.eventOverrides.bookedEventInfo(s, this.nylasSchedulerConnector);
260
+ }
261
+ dateSelectedHandler(t) {
262
+ const e = t.detail;
263
+ this.selectedDateLabel = e ? e.toLocaleDateString(void 0, { dateStyle: "full" }) : `${f.t("noDateSelected")}`;
264
+ }
265
+ cancelBookedEventErrorHandler(t) {
266
+ this.nylasSchedulerError.emit({ notification: { ...this.getErrorObject(t.detail.error) }, host: this.host });
267
+ }
268
+ cancelBookedEventValidationErrorHandler(t) {
269
+ this.nylasSchedulerError.emit({ notification: { ...this.getErrorObject(t.detail.error) }, host: this.host });
270
+ }
271
+ rescheduleBookedEventErrorHandler(t) {
272
+ this.nylasSchedulerError.emit({ notification: { ...this.getErrorObject(t.detail.error) }, host: this.host });
273
+ }
274
+ confirmBookingErrorHandler(t) {
275
+ this.nylasSchedulerError.emit({ notification: { ...this.getErrorObject(t.detail.error) }, host: this.host });
276
+ }
277
+ feedbackModalClosedHandler() {
278
+ this.showFeedbackModal = !1;
279
+ }
280
+ feedbackSubmittedHandler(t) {
281
+ const i = {
282
+ eventId: oe("Scheduling Page User Feedback"),
283
+ message: t.detail.feedback
284
+ };
285
+ se(i, {
286
+ includeReplay: !0,
287
+ captureContext: {
288
+ tags: {
289
+ "nylas-web-element": "nylas-schduling",
290
+ "nylas-web-element-version": "1.1.7"
291
+ },
292
+ extra: {
293
+ configId: this.configurationId,
294
+ slug: this.slug
295
+ }
296
+ }
297
+ }), this.showFeedbackModal = !1;
298
+ }
299
+ async getNylasSchedulerStore() {
300
+ var t;
301
+ return (t = this.baseProvider) == null ? void 0 : t.getStore("scheduler");
302
+ }
303
+ async getNylasSchedulerConnector() {
304
+ return this.nylasSchedulerConnector;
305
+ }
306
+ async getRef() {
307
+ return this.host;
308
+ }
309
+ getErrorObject(t) {
310
+ return {
311
+ title: (t == null ? void 0 : t.title) || q.title,
312
+ category: (t == null ? void 0 : t.category) || q.category,
313
+ type: z.Error,
314
+ description: (t == null ? void 0 : t.message) || "",
315
+ id: (/* @__PURE__ */ new Date()).getTime().toString(),
316
+ ttl: "none"
317
+ };
318
+ }
319
+ checkIfSessionIdOrConfigIdExists() {
320
+ if (!this.sessionId && !this.refConfigId && !(this.slug && this.clientId)) {
321
+ let t = "";
322
+ return this.sessionId || (t += f.t("sessionIdRequiredErrorMessage")), !this.sessionId && !this.refConfigId && !(this.slug && this.clientId) && (t = f.t("sessionIdRequiredErrorMessage") + " " + f.t("publicConfigErrorMessage")), this.nylasSchedulerError.emit({
323
+ notification: {
324
+ title: f.t("schedulingComponentErrorTitle"),
325
+ category: S.Component,
326
+ type: z.Error,
327
+ description: t,
328
+ id: (/* @__PURE__ */ new Date()).getTime().toString(),
329
+ ttl: "none"
330
+ },
331
+ host: this.host
332
+ }), !1;
333
+ }
334
+ return !0;
335
+ }
336
+ isTimeslotValid(t) {
337
+ return new Date(t.start_time) < /* @__PURE__ */ new Date() ? (this.nylasSchedulerError.emit({
338
+ notification: {
339
+ title: f.t("invalidTimeslotErrorTitle"),
340
+ category: S.Component,
341
+ type: z.Error,
342
+ description: f.t("invalidTimeslotErrorMessage"),
343
+ id: (/* @__PURE__ */ new Date()).getTime().toString(),
344
+ ttl: "none"
345
+ },
346
+ host: this.host
347
+ }), !1) : !0;
348
+ }
349
+ validateAvailableDaysInFuture(t, e) {
350
+ const i = /* @__PURE__ */ new Date(), a = new Date(t.getFullYear(), t.getMonth(), 1).getTime() / 1e3, o = new Date(t.getFullYear(), t.getMonth() + 1, 1).getTime() / 1e3, r = Math.floor(J(i, e).getTime() / 1e3), d = Math.min(r, o);
351
+ return { startTime: a < i.getTime() / 1e3 ? Math.floor(i.getTime() / 1e3) : a, endTime: d, endTimeForAvailableDaysInFuture: r };
352
+ }
353
+ applyThemeConfig(t) {
354
+ if (t)
355
+ for (const [e, i] of Object.entries(t))
356
+ this.host.style.setProperty(`${e}`, i);
357
+ }
358
+ onFeedbackClick(t) {
359
+ t.preventDefault(), this.showFeedbackModal = !0;
360
+ }
361
+ redirectToCustomUrl(t) {
362
+ window.location.assign(t);
363
+ }
364
+ render() {
365
+ var k, B, b, y, _, L, P, N, A, M;
366
+ 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"), o = e == null ? void 0 : e.get("cancelledEventInfo"), r = e == null ? void 0 : e.get("cancelBookingId"), d = e == null ? void 0 : e.get("selectedTimeslot"), s = e == null ? void 0 : e.get("rescheduleBookingId"), c = e == null ? void 0 : e.get("organizerConfirmationBookingId"), m = e == null ? void 0 : e.get("rejectBookingId"), p = 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"), u = (b = (B = e == null ? void 0 : e.get("configSettings")) == null ? void 0 : B.scheduler) == null ? void 0 : b.confirmation_redirect_url;
367
+ if (this.selectedDateLabel = h && this.language ? K(h.toLocaleDateString(te[this.language], { dateStyle: "full" })) : `${f.t("noDateSelected")}`, t && (r || m) && !o)
368
+ return n(w, 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: d, 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: (l) => this.onFeedbackClick(l) }, n("feedback-icon", null)), this.showFeedbackModal && n("nylas-feedback-form", null));
369
+ if (t && c)
370
+ return n(w, 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: (l) => this.onFeedbackClick(l) }, n("feedback-icon", null)), this.showFeedbackModal && n("nylas-feedback-form", null));
371
+ if (t && o)
372
+ return n(w, 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: o, exportparts: "ncec, ncec__icon, ncec__title, ncec__description, ncec__button-outline, ncec__card" }))), 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));
373
+ if (t && p)
374
+ return n(w, 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: p, exportparts: "ncec, ncec__icon, ncec__title, ncec__description, ncec__button-outline, ncec__card" }))), 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));
375
+ if (t && i && u) {
376
+ const l = (y = this.bookingInfoConfirmed) == null ? void 0 : y.primaryParticipant, E = ((_ = this.bookingInfoConfirmed) == null ? void 0 : _.additionalFields) || {};
377
+ if (this.bookingInfo && typeof ((L = this.bookingInfo) == null ? void 0 : L.additionalFields) < "u") {
378
+ const T = this.bookingInfo.additionalFields;
379
+ Object.keys(T).forEach((F) => {
380
+ !E[F] && (T != null && T[F]) && (E[F] = T[F].value);
381
+ });
382
+ }
383
+ const I = (P = this.stores) == null ? void 0 : P.scheduler.get("selectedTimeslot"), U = (N = this.stores) == null ? void 0 : N.scheduler.get("selectedTimezone"), j = (A = this.stores) == null ? void 0 : A.scheduler.get("selectedLanguage"), R = (M = this.stores) == null ? void 0 : M.scheduler.get("configSettings"), H = this.configurationId ? this.configurationId : R == null ? void 0 : R.configuration_id, G = window.location.search, v = new URLSearchParams(G);
384
+ v.set("booking_id", i.booking_id), l != null && l.name && v.set("name", l.name), l != null && l.email && v.set("email", l.email), I != null && I.start_time && v.set("start_time", (new Date(I.start_time).getTime() / 1e3).toString()), I != null && I.end_time && v.set("end_time", (new Date(I.end_time).getTime() / 1e3).toString()), U && v.set("tz", U), j && v.set("language", j), E && v.set("additional_values", JSON.stringify(E)), this.slug && v.set("page_slug", this.slug), H && v.set("config_id", H), this.redirectToCustomUrl(`${u}?${v.toString()}`);
385
+ return;
386
+ }
387
+ if (t && i)
388
+ return n(w, null, n(x, { nylasBranding: g, isLoading: this.isLoading, showNotification: this.showNotification }, n("div", { class: "booked-event-page", part: "booked-event-page" }, n("nylas-booked-event-card", { selectedTimeslot: d, 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: (l) => this.onFeedbackClick(l) }, n("feedback-icon", null)), this.showFeedbackModal && n("nylas-feedback-form", null));
389
+ if (t && (!i || s) && !a) {
390
+ const l = this.host.querySelector('[slot="timeslot-picker-cta-label"]');
391
+ return n(w, null, n(x, { nylasBranding: g, isLoading: this.isLoading, showNotification: this.showNotification }, s && n($, null, `${f.t("rescheduleTitle")}`), n("div", { class: "select-date-page", part: "select-date-page" }, n("div", { class: "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 ${s ? "reschedule" : ""}` }, n("h2", null, n("calendar-icon", null), n("span", { id: "selectedDate" }, this.selectedDateLabel)), n("nylas-timeslot-picker", { exportparts: "ntp, ntp__timeslot, ntp__timeslot--selected, ntp__button-primary" }, l && 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: (E) => this.onFeedbackClick(E) }, n("feedback-icon", null)), this.showFeedbackModal && n("nylas-feedback-form", null));
392
+ }
393
+ return t && !i && a ? n(w, null, n(x, { nylasBranding: g, isLoading: this.isLoading, showNotification: this.showNotification }, s && n($, null, `${f.t("rescheduleTitle")}`), n("div", { class: "additional-data-page", part: "additional-data-page" }, n("div", { class: "left-panel" }, n("div", { class: "wrapper" }, n("nylas-selected-event-card", { exportparts: "nsec, nsec__card, nsec__icon, nsec__date, nsec__time, nsec__timezone" }))), n("div", { class: `right-panel ${s ? "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: (l) => this.onFeedbackClick(l) }, n("feedback-icon", null)), this.showFeedbackModal && n("nylas-feedback-form", null)) : n(w, null, n("slot", null));
394
+ }
395
+ get host() {
396
+ return Q(this);
397
+ }
398
+ static get watchers() {
399
+ return {
400
+ bookingInfo: ["bookingInfoChanged"],
401
+ rescheduleBookingRef: ["rescheduleBookingRefChanged"],
402
+ cancelBookingRef: ["cancelBookingRefChanged"],
403
+ organizerConfirmationBookingRef: ["organizerConfirmationBookingRefChanged"],
404
+ localization: ["localizationChanged"],
405
+ themeConfig: ["themeConfigChanged"]
406
+ };
407
+ }
408
+ };
409
+ ce.style = le;
410
+ export {
411
+ ce as nylas_scheduling
412
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-bd6fdc8c.cjs"),E=require("./index.es-c7ca1bad-0a324dca.cjs"),D=require("./scheduler-store-d4784b24-aed474e8.cjs"),N=require("./constants-c549b12b-c85413b1.cjs"),x=require("./feedbackSync-b56b29ed-b6f352f3.cjs");require("react");require("react-dom");class W{constructor({schedulerAPIURL:t,nylasSchedulerStore:i,sessionId:a,configId:o,slug:r,clientId:d}){if(!t)throw new Error("schedulerAPIURL is required");if(!i)throw new Error("nylasSchedulerStore is required");if(!a&&!o&&!(r||d))throw new Error("sessionId is required for private configs. If using public config either pass a configurationId or a combination of slug and clientId.");t==="/"&&(t=new URL(window.location.href).origin),this.configId=o,this.sessionId=a,this.schedulerAPIURL=t,this.nylasSchedulerStore=i,this.slug=r,this.clientId=d}init(){e.debug("NylasConnector init")}get schedulerStore(){return this.nylasSchedulerStore}get scheduler(){return this._schedulerAPIConnector?this._schedulerAPIConnector:(this._schedulerAPIConnector=new D.NylaSchedulerAPIConnector({schedulerAPIURL:this.schedulerAPIURL,schedulerStore:this.schedulerStore,sessionId:this.sessionId,configId:this.configId,slug:this.slug,clientId:this.clientId}),this._schedulerAPIConnector)}resetStores(){this.nylasSchedulerStore.reset()}}const I=(n,t)=>{const i=n.isLoading,a=n.showNotification,o=n.nylasBranding;return e.h(e.Fragment,null,a&&e.h("nylas-notification",null),i&&e.h("div",{class:"loading"},e.h("div",{class:"left"},e.h("div",{class:"skeleton"})),e.h("div",{class:"right"},e.h("div",{class:"skeleton"}),e.h("div",{class:"skeleton"}),e.h("div",{class:"skeleton"}),e.h("div",{class:"skeleton"}),e.h("div",{class:"skeleton"}))),!i&&t,e.h("div",{class:"footer"},o&&e.h(e.Fragment,null,"Powered by ",e.h("nylas-logo",null))))},M=(n,t)=>e.h("div",{class:"message-banner"},t),$=':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-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;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{padding:0.5rem 4px 0;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}}.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 svg{fill:var(--nylas-base-500)}.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}',G=$,j={title:e.instance.t("genericErrorTitle"),type:E.nr.Error,category:D.ErrorCategory.Component},H=class{constructor(n){e.registerInstance(this,n),this.init=e.createEvent(this,"init",7),this.schedulerWillLoad=e.createEvent(this,"schedulerWillLoad",7),this.schedulerDidLoad=e.createEvent(this,"schedulerDidLoad",7),this.nylasSchedulerError=e.createEvent(this,"nylasSchedulerError",7),this.configSettingsLoaded=e.createEvent(this,"configSettingsLoaded",7),this.bookingRefExtracted=e.createEvent(this,"bookingRefExtracted",7),this.bookedEventInfo=e.createEvent(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.automaticComponentRegistration=!0,this.selectedDateLabel=new Date().toLocaleDateString(void 0,{dateStyle:"full"})||`${e.instance.t("noDateSelected")}`,this.refConfigId=void 0,this.language=navigator.language,this.showFeedbackModal=!1,this.bookingInfoConfirmed=null}connectedCallback(){e.debug("[nylas-scheduler] connectedCallback")}async componentWillLoad(){var o,r;e.debug("[nylas-scheduler] Component will load"),this.enableUserFeedback&&!x.isInitialized()&&x.init({dsn:"https://9d5731f1c77ca84c9ed3fb9b3ccf7ee1@o74852.ingest.us.sentry.io/4507889638178816",release:"1.1.5",integrations:d=>[...d.filter(s=>!1),x.feedbackSyncIntegration({colorScheme:"system",autoInject:!1})],autoSessionTracking:!1,beforeSend:()=>null});const n=this.schedulerWillLoad.emit(this.host);if("schedulerWillLoad"in this.eventOverrides&&(await this.eventOverrides.schedulerWillLoad(n,this.nylasSchedulerConnector),n.defaultPrevented))return;this.stores={scheduler:D.CreateNylasSchedulerStore({bookingInfo:this.bookingInfo,nylasBranding:this.nylasBranding,...this.defaultSchedulerState})},this.baseProvider=new E.NylasBaseProvider(this.host,this.stores,this.automaticComponentRegistration,this.eventOverrides),this.refConfigId=this.configurationId;let t;if(this.rescheduleBookingRef){const[d,s,l]=e.compactStringToUUIDs(this.rescheduleBookingRef);this.refConfigId=d,this.stores.scheduler.set("rescheduleBookingId",s),t=this.bookingRefExtracted.emit({configurationId:d,bookingId:s})}else if(this.cancelBookingRef){const[d,s,l]=e.compactStringToUUIDs(this.cancelBookingRef);this.refConfigId=d,this.stores.scheduler.set("cancelBookingId",s),t=this.bookingRefExtracted.emit({configurationId:d,bookingId:s})}else if(this.organizerConfirmationBookingRef){const[d,s,l]=e.compactStringToUUIDs(this.organizerConfirmationBookingRef);this.refConfigId=d,this.stores.scheduler.set("organizerConfirmationBookingId",s),this.stores.scheduler.set("organizerConfirmationSalt",l),t=this.bookingRefExtracted.emit({configurationId:d,bookingId:s,salt:l})}if("bookingRefExtracted"in this.eventOverrides&&(await this.eventOverrides.bookingRefExtracted(t,this.nylasSchedulerConnector),t.defaultPrevented)||!this.checkIfSessionIdOrConfigIdExists())return;const i=(o=this.baseProvider)==null?void 0:o.getStore("scheduler");this.nylasSchedulerConnector=new W({schedulerAPIURL:this.schedulerApiUrl,sessionId:this.sessionId,configId:this.refConfigId,slug:this.slug,clientId:this.clientId,nylasSchedulerStore:i});const a=this.init.emit(this.host);"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))}async componentDidLoad(){var l,u,b,h,c,g,m,C;(l=this.baseProvider)==null||l.componentDidLoad();const n=this.schedulerDidLoad.emit(this.host);if("schedulerDidLoad"in this.eventOverrides&&(await this.eventOverrides.schedulerDidLoad(n,this.nylasSchedulerConnector),n.defaultPrevented)||!this.checkIfSessionIdOrConfigIdExists())return;this.localizationChanged(this.localization);const t=await((u=this.nylasSchedulerConnector)==null?void 0:u.scheduler.getUISettings());if(!t||"error"in t){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(t==null?void 0:t.error)},host:this.host});return}else{"data"in t&&((b=t.data)!=null&&b.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.");const f=this.configSettingsLoaded.emit({settings:t});if("configSettingsLoaded"in this.eventOverrides&&(await this.eventOverrides.configSettingsLoaded(f,this.nylasSchedulerConnector),f.defaultPrevented))return}const i=(h=this.baseProvider)==null?void 0:h.getStore("scheduler"),a=(g=(c=i==null?void 0:i.get("configSettings"))==null?void 0:c.scheduler)==null?void 0:g.available_days_in_future,o=i==null?void 0:i.get("selectedTimeslot");if(o&&(o!=null&&o.start_time)){if(!this.isTimeslotValid(o))return;if(i!=null&&i.get("showBookingForm")){i==null||i.set("selectedDate",o.start_time);return}}const r=i==null?void 0:i.get("selectedDate"),d=i==null?void 0:i.get("availability");let s;if(!(d&&d.length>0)){if(r){const{startTime:f,endTime:v,endTimeForAvailableDaysInFuture:y}=this.validateAvailableDaysInFuture(r,a||30);r.getTime()<y*1e3&&(s=await((C=this.nylasSchedulerConnector)==null?void 0:C.scheduler.getAvailability(f,v)))}else{const f=new Date,{startTime:v,endTime:y,endTimeForAvailableDaysInFuture:B}=this.validateAvailableDaysInFuture(f,a||30);f.getTime()<B*1e3&&(s=await((m=this.nylasSchedulerConnector)==null?void 0:m.scheduler.getAvailability(v,y)))}if((!s||"error"in s)&&this.nylasSchedulerError.emit({notification:{...this.getErrorObject(s==null?void 0:s.error)},host:this.host}),!r){let f=new Date;const v=i==null?void 0:i.get("availability").find(y=>new Date(y.start_time)>new Date);v&&(f=v.start_time),i==null||i.set("selectedDate",f)}}}componentDisconnected(){var n;(n=this.baseProvider)==null||n.componentDisconnected()}bookingInfoChanged(n){var t;(t=this.stores)==null||t.scheduler.set("bookingInfo",n)}rescheduleBookingRefChanged(n){var t,i;if(n){const[a,o]=e.compactStringToUUIDs(n);(t=this.stores)==null||t.scheduler.set("rescheduleBookingId",o),this.refConfigId=a,(i=this.nylasSchedulerConnector)==null||i.scheduler.setConfigId(a)}}cancelBookingRefChanged(n){var t,i;if(n){const[a,o]=e.compactStringToUUIDs(n);(t=this.stores)==null||t.scheduler.set("cancelBookingId",o),this.refConfigId=a,(i=this.nylasSchedulerConnector)==null||i.scheduler.setConfigId(a)}}organizerConfirmationBookingRefChanged(n){var t,i;if(n){const[a,o]=e.compactStringToUUIDs(n);(t=this.stores)==null||t.scheduler.set("organizerConfirmationBookingId",o),this.refConfigId=a,(i=this.nylasSchedulerConnector)==null||i.scheduler.setConfigId(a)}}localizationChanged(n){n&&Object.keys(n).forEach(t=>{t in N.LANGUAGE_CODE&&(e.instance.addResourceBundle(t,"translation",n[t],!1,!0),this.language=this.language)})}themeConfigChanged(n){this.applyThemeConfig(n)}languageChanged(n){const t=n.detail;this.language=t,e.instance.changeLanguage(t)}async registerComponentHandler(n){var t;(t=this.baseProvider)==null||t.registerComponent(n.detail)}async unregisterComponentHandler(n){var t;(t=this.baseProvider)==null||t.unregisterComponent(n.detail)}async monthChangedHandler(n){var d,s,l,u,b,h,c;const t=n.detail,i=(u=(l=(s=(d=this.nylasSchedulerConnector)==null?void 0:d.schedulerStore)==null?void 0:s.get("configSettings"))==null?void 0:l.scheduler)==null?void 0:u.available_days_in_future,{startTime:a,endTime:o,endTimeForAvailableDaysInFuture:r}=this.validateAvailableDaysInFuture(t,i||30);if(a<r&&t.getTime()<r*1e3){const g=await((b=this.nylasSchedulerConnector)==null?void 0:b.scheduler.getAvailability(a,o));(!g||"error"in g)&&this.nylasSchedulerError.emit({notification:{...this.getErrorObject(g==null?void 0:g.error)},host:this.host});const m=(h=this.stores)==null?void 0:h.scheduler.get("selectableDates");m&&m.length>0&&((c=this.stores)==null||c.scheduler.set("selectedDate",m[0]))}}mapToBookingData(n){var d,s,l;const t=(d=this.stores)==null?void 0:d.scheduler.get("selectedTimeslot"),i=(s=this.stores)==null?void 0:s.scheduler.get("selectedLanguage"),a=(l=this.stores)==null?void 0:l.scheduler.get("selectedTimezone"),o=t!=null&&t.start_time?new Date(t==null?void 0:t.start_time).getTime()/1e3:"",r=t!=null&&t.end_time?new Date(t==null?void 0:t.end_time).getTime()/1e3:"";return{additional_guests:n.guests,guest:{...n.primaryParticipant},additional_fields:{...n.additionalFields},start_time:o,end_time:r,email_language:i,timezone:a}}async bookButtonClickedHandler(n){var l,u,b,h;if(n.defaultPrevented)return;const t=n.detail,i=this.mapToBookingData(t);this.bookingInfoConfirmed=t;const o=(u=(l=this.nylasSchedulerConnector)==null?void 0:l.schedulerStore)==null?void 0:u.get("rescheduleBookingId");if(o){const c=await((b=this.nylasSchedulerConnector)==null?void 0:b.scheduler.rescheduleBooking(o,t));(!c||"error"in c)&&this.nylasSchedulerError.emit({notification:{...this.getErrorObject(c==null?void 0:c.error)},host:this.host});const g=c==null?void 0:c.data,m=this.bookedEventInfo.emit({...c,data:{...g,...i}});"bookedEventInfo"in this.eventOverrides&&await this.eventOverrides.bookedEventInfo(m,this.nylasSchedulerConnector);return}const r=await((h=this.nylasSchedulerConnector)==null?void 0:h.scheduler.bookTimeslot(t));(!r||"error"in r)&&this.nylasSchedulerError.emit({notification:{...this.getErrorObject(r==null?void 0:r.error)},host:this.host});const d=r==null?void 0:r.data,s=this.bookedEventInfo.emit({...r,data:{...d,...i}});"bookedEventInfo"in this.eventOverrides&&await this.eventOverrides.bookedEventInfo(s,this.nylasSchedulerConnector)}dateSelectedHandler(n){const t=n.detail;this.selectedDateLabel=t?t.toLocaleDateString(void 0,{dateStyle:"full"}):`${e.instance.t("noDateSelected")}`}cancelBookedEventErrorHandler(n){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(n.detail.error)},host:this.host})}cancelBookedEventValidationErrorHandler(n){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(n.detail.error)},host:this.host})}rescheduleBookedEventErrorHandler(n){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(n.detail.error)},host:this.host})}confirmBookingErrorHandler(n){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(n.detail.error)},host:this.host})}feedbackModalClosedHandler(){this.showFeedbackModal=!1}feedbackSubmittedHandler(n){const i={eventId:x.captureMessage("Scheduling Page User Feedback"),message:n.detail.feedback};x.captureFeedback(i,{includeReplay:!0,captureContext:{tags:{"nylas-web-element":"nylas-schduling","nylas-web-element-version":"1.1.5"},extra:{configId:this.configurationId,slug:this.slug}}}),this.showFeedbackModal=!1}async getNylasSchedulerStore(){var n;return(n=this.baseProvider)==null?void 0:n.getStore("scheduler")}async getNylasSchedulerConnector(){return this.nylasSchedulerConnector}async getRef(){return this.host}getErrorObject(n){return{title:(n==null?void 0:n.title)||j.title,category:(n==null?void 0:n.category)||j.category,type:E.nr.Error,description:(n==null?void 0:n.message)||"",id:new Date().getTime().toString(),ttl:"none"}}checkIfSessionIdOrConfigIdExists(){if(!this.sessionId&&!this.refConfigId&&!(this.slug&&this.clientId)){let n="";return this.sessionId||(n+=e.instance.t("sessionIdRequiredErrorMessage")),!this.sessionId&&!this.refConfigId&&!(this.slug&&this.clientId)&&(n=e.instance.t("sessionIdRequiredErrorMessage")+" "+e.instance.t("publicConfigErrorMessage")),this.nylasSchedulerError.emit({notification:{title:e.instance.t("schedulingComponentErrorTitle"),category:D.ErrorCategory.Component,type:E.nr.Error,description:n,id:new Date().getTime().toString(),ttl:"none"},host:this.host}),!1}return!0}isTimeslotValid(n){return new Date(n.start_time)<new Date?(this.nylasSchedulerError.emit({notification:{title:e.instance.t("invalidTimeslotErrorTitle"),category:D.ErrorCategory.Component,type:E.nr.Error,description:e.instance.t("invalidTimeslotErrorMessage"),id:new Date().getTime().toString(),ttl:"none"},host:this.host}),!1):!0}validateAvailableDaysInFuture(n,t){const i=new Date,a=new Date(n.getFullYear(),n.getMonth(),1).getTime()/1e3,o=new Date(n.getFullYear(),n.getMonth()+1,1).getTime()/1e3,r=Math.floor(e.addDaysToCurrentDate(i,t).getTime()/1e3),d=Math.min(r,o);return{startTime:a<i.getTime()/1e3?Math.floor(i.getTime()/1e3):a,endTime:d,endTimeForAvailableDaysInFuture:r}}applyThemeConfig(n){if(n)for(const[t,i]of Object.entries(n))this.host.style.setProperty(`${t}`,i)}onFeedbackClick(){this.showFeedbackModal=!0}redirectToCustomUrl(n){window.location.assign(n)}render(){var m,C,f,v,y,B,S,z,O,R;const n=this.mode==="app",t=(m=this.baseProvider)==null?void 0:m.getStore("scheduler"),i=t==null?void 0:t.get("eventInfo"),a=t==null?void 0:t.get("showBookingForm"),o=t==null?void 0:t.get("cancelledEventInfo"),r=t==null?void 0:t.get("cancelBookingId"),d=t==null?void 0:t.get("selectedTimeslot"),s=t==null?void 0:t.get("rescheduleBookingId"),l=t==null?void 0:t.get("organizerConfirmationBookingId"),u=t==null?void 0:t.get("rejectBookingId"),b=t==null?void 0:t.get("confirmedEventInfo"),h=(t==null?void 0:t.get("nylasBranding"))||this.nylasBranding,c=t==null?void 0:t.get("selectedDate"),g=(f=(C=t==null?void 0:t.get("configSettings"))==null?void 0:C.scheduler)==null?void 0:f.confirmation_redirect_url;if(this.selectedDateLabel=c&&this.language?e.capitalizeFirstLetter(c.toLocaleDateString(N.LANGUAGE_CODE_MAP[this.language],{dateStyle:"full"})):`${e.instance.t("noDateSelected")}`,n&&(r||u)&&!o)return e.h(e.Host,null,e.h(I,{nylasBranding:h,isLoading:this.isLoading,showNotification:this.showNotification},e.h("div",{class:"cancel-flow-page",part:"cancel-flow-page"},e.h("nylas-cancel-booking-form",{selectedTimeslot:d,cancelBookingId:r,rejectBookingId:u,exportparts:"ncbf, ncbf__icon, ncbf__title, ncbf__description, ncbf__reason-textarea, ncbf__button-cta, ncbf__button-outline, ncbf__card"}))),this.enableUserFeedback&&e.h("button-component",{id:"report-issue",variant:"basic",onClick:()=>this.onFeedbackClick()},e.h("feedback-icon",null)),this.showFeedbackModal&&e.h("nylas-feedback-form",null));if(n&&l)return e.h(e.Host,null,e.h(I,null,e.h("div",{class:"manual-confirmation-page",part:"manual-confirmation-page"},e.h("nylas-organizer-confirmation-card",{organizerConfirmationBookingId:l,exportparts:"nmcc, nmcc__title, nmcc__description, nmcc__button-cta, nmcc__button-outline"}))),this.enableUserFeedback&&e.h("button-component",{id:"report-issue",variant:"basic",onClick:()=>this.onFeedbackClick()},e.h("feedback-icon",null)),this.showFeedbackModal&&e.h("nylas-feedback-form",null));if(n&&o)return e.h(e.Host,null,e.h(I,{nylasBranding:h,isLoading:this.isLoading,showNotification:this.showNotification},e.h("div",{class:"cancelled-event-page",part:"cancelled-event-page"},e.h("nylas-cancelled-event-card",{cancelledEventInfo:o,exportparts:"ncec, ncec__icon, ncec__title, ncec__description, ncec__button-outline, ncec__card"}))),this.enableUserFeedback&&e.h("button-component",{id:"report-issue",variant:"basic",onClick:()=>this.onFeedbackClick()},e.h("feedback-icon",null)),this.showFeedbackModal&&e.h("nylas-feedback-form",null));if(n&&b)return e.h(e.Host,null,e.h(I,{nylasBranding:h,isLoading:this.isLoading,showNotification:this.showNotification},e.h("div",{class:"cancelled-event-page",part:"confirmed-event-page"},e.h("nylas-confirmed-event-card",{confirmedEventInfo:b,exportparts:"ncec, ncec__icon, ncec__title, ncec__description, ncec__button-outline, ncec__card"}))),this.enableUserFeedback&&e.h("button-component",{id:"report-issue",variant:"basic",onClick:()=>this.onFeedbackClick()},e.h("feedback-icon",null)),this.showFeedbackModal&&e.h("nylas-feedback-form",null));if(n&&i&&g){const k=(v=this.bookingInfoConfirmed)==null?void 0:v.primaryParticipant,T=((y=this.bookingInfoConfirmed)==null?void 0:y.additionalFields)||{};if(this.bookingInfo&&typeof((B=this.bookingInfo)==null?void 0:B.additionalFields)<"u"){const w=this.bookingInfo.additionalFields;Object.keys(w).forEach(L=>{!T[L]&&(w!=null&&w[L])&&(T[L]=w[L].value)})}const _=(S=this.stores)==null?void 0:S.scheduler.get("selectedTimeslot"),P=(z=this.stores)==null?void 0:z.scheduler.get("selectedTimezone"),U=(O=this.stores)==null?void 0:O.scheduler.get("selectedLanguage"),F=(R=this.stores)==null?void 0:R.scheduler.get("configSettings"),A=this.configurationId?this.configurationId:F==null?void 0:F.configuration_id,q=window.location.search,p=new URLSearchParams(q);p.set("booking_id",i.booking_id),k!=null&&k.name&&p.set("name",k.name),k!=null&&k.email&&p.set("email",k.email),_!=null&&_.start_time&&p.set("start_time",(new Date(_.start_time).getTime()/1e3).toString()),_!=null&&_.end_time&&p.set("end_time",(new Date(_.end_time).getTime()/1e3).toString()),P&&p.set("tz",P),U&&p.set("language",U),T&&p.set("additional_values",JSON.stringify(T)),this.slug&&p.set("page_slug",this.slug),A&&p.set("config_id",A),this.redirectToCustomUrl(`${g}?${p.toString()}`);return}if(n&&i)return e.h(e.Host,null,e.h(I,{nylasBranding:h,isLoading:this.isLoading,showNotification:this.showNotification},e.h("div",{class:"booked-event-page",part:"booked-event-page"},e.h("nylas-booked-event-card",{selectedTimeslot:d,eventInfo:i,exportparts:"nbec, nbec__title, nbec__card, nbec__description, nbec__button-outline, nbec__cancel-cta, nbec__reschedule-cta"}))),this.enableUserFeedback&&e.h("button-component",{id:"report-issue",variant:"basic",onClick:()=>this.onFeedbackClick()},e.h("feedback-icon",null)),this.showFeedbackModal&&e.h("nylas-feedback-form",null));if(n&&(!i||s)&&!a){const k=this.host.querySelector('[slot="timeslot-picker-cta-label"]');return e.h(e.Host,null,e.h(I,{nylasBranding:h,isLoading:this.isLoading,showNotification:this.showNotification},s&&e.h(M,null,`${e.instance.t("rescheduleTitle")}`),e.h("div",{class:"select-date-page",part:"select-date-page"},e.h("div",{class:"left-panel"},e.h("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"}),e.h("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"})),e.h("div",{class:`right-panel ${s?"reschedule":""}`},e.h("h2",null,e.h("calendar-icon",null),e.h("span",{id:"selectedDate"},this.selectedDateLabel)),e.h("nylas-timeslot-picker",{exportparts:"ntp, ntp__timeslot, ntp__timeslot--selected, ntp__button-primary"},k&&e.h("span",{slot:"timeslot-picker-cta-label"},e.h("slot",{name:"timeslot-picker-cta-label"})))))),this.enableUserFeedback&&e.h("button-component",{id:"report-issue",variant:"basic",onClick:()=>this.onFeedbackClick()},e.h("feedback-icon",null)),this.showFeedbackModal&&e.h("nylas-feedback-form",null))}return n&&!i&&a?e.h(e.Host,null,e.h(I,{nylasBranding:h,isLoading:this.isLoading,showNotification:this.showNotification},s&&e.h(M,null,`${e.instance.t("rescheduleTitle")}`),e.h("div",{class:"additional-data-page",part:"additional-data-page"},e.h("div",{class:"left-panel"},e.h("div",{class:"wrapper"},e.h("nylas-selected-event-card",{exportparts:"nsec, nsec__card, nsec__icon, nsec__date, nsec__time, nsec__timezone"}))),e.h("div",{class:`right-panel ${s?"reschedule":""}`},e.h("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&&e.h("button-component",{id:"report-issue",variant:"basic",onClick:()=>this.onFeedbackClick()},e.h("feedback-icon",null)),this.showFeedbackModal&&e.h("nylas-feedback-form",null)):e.h(e.Host,null,e.h("slot",null))}get host(){return e.getElement(this)}static get watchers(){return{bookingInfo:["bookingInfoChanged"],rescheduleBookingRef:["rescheduleBookingRefChanged"],cancelBookingRef:["cancelBookingRefChanged"],organizerConfirmationBookingRef:["organizerConfirmationBookingRefChanged"],localization:["localizationChanged"],themeConfig:["themeConfigChanged"]}}};H.style=G;exports.nylas_scheduling=H;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-290b2932.cjs"),D=require("./index.es-c7ca1bad-67a99f41.cjs"),B=require("./scheduler-store-5fbba021-09da63cf.cjs"),N=require("./constants-c549b12b-c85413b1.cjs"),E=require("./feedbackSync-b56b29ed-599103b9.cjs");require("react");require("react-dom");class W{constructor({schedulerAPIURL:t,nylasSchedulerStore:i,sessionId:a,configId:o,slug:r,clientId:d}){if(!t)throw new Error("schedulerAPIURL is required");if(!i)throw new Error("nylasSchedulerStore is required");if(!a&&!o&&!(r||d))throw new Error("sessionId is required for private configs. If using public config either pass a configurationId or a combination of slug and clientId.");t==="/"&&(t=new URL(window.location.href).origin),this.configId=o,this.sessionId=a,this.schedulerAPIURL=t,this.nylasSchedulerStore=i,this.slug=r,this.clientId=d}init(){e.debug("NylasConnector init")}get schedulerStore(){return this.nylasSchedulerStore}get scheduler(){return this._schedulerAPIConnector?this._schedulerAPIConnector:(this._schedulerAPIConnector=new B.NylaSchedulerAPIConnector({schedulerAPIURL:this.schedulerAPIURL,schedulerStore:this.schedulerStore,sessionId:this.sessionId,configId:this.configId,slug:this.slug,clientId:this.clientId}),this._schedulerAPIConnector)}resetStores(){this.nylasSchedulerStore.reset()}}const I=(n,t)=>{const i=n.isLoading,a=n.showNotification,o=n.nylasBranding;return e.h(e.Fragment,null,a&&e.h("nylas-notification",null),i&&e.h("div",{class:"loading"},e.h("div",{class:"left"},e.h("div",{class:"skeleton"})),e.h("div",{class:"right"},e.h("div",{class:"skeleton"}),e.h("div",{class:"skeleton"}),e.h("div",{class:"skeleton"}),e.h("div",{class:"skeleton"}),e.h("div",{class:"skeleton"}))),!i&&t,e.h("div",{class:"footer"},o&&e.h(e.Fragment,null,"Powered by ",e.h("nylas-logo",null))))},M=(n,t)=>e.h("div",{class:"message-banner"},t),$=':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-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;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{padding:0.5rem 4px 0;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}}.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 svg{fill:var(--nylas-base-500)}.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}',G=$,j={title:e.instance.t("genericErrorTitle"),type:D.nr.Error,category:B.ErrorCategory.Component},H=class{constructor(n){e.registerInstance(this,n),this.init=e.createEvent(this,"init",7),this.schedulerWillLoad=e.createEvent(this,"schedulerWillLoad",7),this.schedulerDidLoad=e.createEvent(this,"schedulerDidLoad",7),this.nylasSchedulerError=e.createEvent(this,"nylasSchedulerError",7),this.configSettingsLoaded=e.createEvent(this,"configSettingsLoaded",7),this.bookingRefExtracted=e.createEvent(this,"bookingRefExtracted",7),this.bookedEventInfo=e.createEvent(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.automaticComponentRegistration=!0,this.selectedDateLabel=new Date().toLocaleDateString(void 0,{dateStyle:"full"})||`${e.instance.t("noDateSelected")}`,this.refConfigId=void 0,this.language=navigator.language,this.showFeedbackModal=!1,this.bookingInfoConfirmed=null}connectedCallback(){e.debug("[nylas-scheduler] connectedCallback")}async componentWillLoad(){var o,r;e.debug("[nylas-scheduler] Component will load"),this.enableUserFeedback&&!E.isInitialized()&&E.init({dsn:"https://9d5731f1c77ca84c9ed3fb9b3ccf7ee1@o74852.ingest.us.sentry.io/4507889638178816",release:"1.1.6",integrations:d=>[...d.filter(s=>!1),E.feedbackSyncIntegration({colorScheme:"system",autoInject:!1})],autoSessionTracking:!1,beforeSend:()=>null});const n=this.schedulerWillLoad.emit(this.host);if("schedulerWillLoad"in this.eventOverrides&&(await this.eventOverrides.schedulerWillLoad(n,this.nylasSchedulerConnector),n.defaultPrevented))return;this.stores={scheduler:B.CreateNylasSchedulerStore({bookingInfo:this.bookingInfo,nylasBranding:this.nylasBranding,...this.defaultSchedulerState})},this.baseProvider=new D.NylasBaseProvider(this.host,this.stores,this.automaticComponentRegistration,this.eventOverrides),this.refConfigId=this.configurationId;let t;if(this.rescheduleBookingRef){const[d,s,c]=e.compactStringToUUIDs(this.rescheduleBookingRef);this.refConfigId=d,this.stores.scheduler.set("rescheduleBookingId",s),t=this.bookingRefExtracted.emit({configurationId:d,bookingId:s})}else if(this.cancelBookingRef){const[d,s,c]=e.compactStringToUUIDs(this.cancelBookingRef);this.refConfigId=d,this.stores.scheduler.set("cancelBookingId",s),t=this.bookingRefExtracted.emit({configurationId:d,bookingId:s})}else if(this.organizerConfirmationBookingRef){const[d,s,c]=e.compactStringToUUIDs(this.organizerConfirmationBookingRef);this.refConfigId=d,this.stores.scheduler.set("organizerConfirmationBookingId",s),this.stores.scheduler.set("organizerConfirmationSalt",c),t=this.bookingRefExtracted.emit({configurationId:d,bookingId:s,salt:c})}if("bookingRefExtracted"in this.eventOverrides&&(await this.eventOverrides.bookingRefExtracted(t,this.nylasSchedulerConnector),t.defaultPrevented)||!this.checkIfSessionIdOrConfigIdExists())return;const i=(o=this.baseProvider)==null?void 0:o.getStore("scheduler");this.nylasSchedulerConnector=new W({schedulerAPIURL:this.schedulerApiUrl,sessionId:this.sessionId,configId:this.refConfigId,slug:this.slug,clientId:this.clientId,nylasSchedulerStore:i});const a=this.init.emit(this.host);"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))}async componentDidLoad(){var c,b,m,g,h,f,p,w;(c=this.baseProvider)==null||c.componentDidLoad();const n=this.schedulerDidLoad.emit(this.host);if("schedulerDidLoad"in this.eventOverrides&&(await this.eventOverrides.schedulerDidLoad(n,this.nylasSchedulerConnector),n.defaultPrevented)||!this.checkIfSessionIdOrConfigIdExists())return;this.localizationChanged(this.localization);const t=await((b=this.nylasSchedulerConnector)==null?void 0:b.scheduler.getUISettings());if(!t||"error"in t){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(t==null?void 0:t.error)},host:this.host});return}else{"data"in t&&((m=t.data)!=null&&m.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.");const u=this.configSettingsLoaded.emit({settings:t});if("configSettingsLoaded"in this.eventOverrides&&(await this.eventOverrides.configSettingsLoaded(u,this.nylasSchedulerConnector),u.defaultPrevented))return}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,o=i==null?void 0:i.get("selectedTimeslot");if(o&&(o!=null&&o.start_time)){if(!this.isTimeslotValid(o))return;if(i!=null&&i.get("showBookingForm")){i==null||i.set("selectedDate",o.start_time);return}}const r=i==null?void 0:i.get("selectedDate"),d=i==null?void 0:i.get("availability");let s;if(!(d&&d.length>0)){if(r){const{startTime:u,endTime:v,endTimeForAvailableDaysInFuture:y}=this.validateAvailableDaysInFuture(r,a||30);r.getTime()<y*1e3&&(s=await((w=this.nylasSchedulerConnector)==null?void 0:w.scheduler.getAvailability(u,v)))}else{const u=new Date,{startTime:v,endTime:y,endTimeForAvailableDaysInFuture:T}=this.validateAvailableDaysInFuture(u,a||30);u.getTime()<T*1e3&&(s=await((p=this.nylasSchedulerConnector)==null?void 0:p.scheduler.getAvailability(v,y)))}if((!s||"error"in s)&&this.nylasSchedulerError.emit({notification:{...this.getErrorObject(s==null?void 0:s.error)},host:this.host}),!r){let u=new Date;const v=i==null?void 0:i.get("availability").find(y=>new Date(y.start_time)>new Date);v&&(u=v.start_time),i==null||i.set("selectedDate",u)}}}componentDisconnected(){var n;(n=this.baseProvider)==null||n.componentDisconnected()}bookingInfoChanged(n){var t;(t=this.stores)==null||t.scheduler.set("bookingInfo",n)}rescheduleBookingRefChanged(n){var t,i;if(n){const[a,o]=e.compactStringToUUIDs(n);(t=this.stores)==null||t.scheduler.set("rescheduleBookingId",o),this.refConfigId=a,(i=this.nylasSchedulerConnector)==null||i.scheduler.setConfigId(a)}}cancelBookingRefChanged(n){var t,i;if(n){const[a,o]=e.compactStringToUUIDs(n);(t=this.stores)==null||t.scheduler.set("cancelBookingId",o),this.refConfigId=a,(i=this.nylasSchedulerConnector)==null||i.scheduler.setConfigId(a)}}organizerConfirmationBookingRefChanged(n){var t,i;if(n){const[a,o]=e.compactStringToUUIDs(n);(t=this.stores)==null||t.scheduler.set("organizerConfirmationBookingId",o),this.refConfigId=a,(i=this.nylasSchedulerConnector)==null||i.scheduler.setConfigId(a)}}localizationChanged(n){n&&Object.keys(n).forEach(t=>{t in N.LANGUAGE_CODE&&(e.instance.addResourceBundle(t,"translation",n[t],!1,!0),this.language=this.language)})}themeConfigChanged(n){this.applyThemeConfig(n)}languageChanged(n){const t=n.detail;this.language=t,e.instance.changeLanguage(t)}async registerComponentHandler(n){var t;(t=this.baseProvider)==null||t.registerComponent(n.detail)}async unregisterComponentHandler(n){var t;(t=this.baseProvider)==null||t.unregisterComponent(n.detail)}async monthChangedHandler(n){var d,s,c,b,m,g,h;const t=n.detail,i=(b=(c=(s=(d=this.nylasSchedulerConnector)==null?void 0:d.schedulerStore)==null?void 0:s.get("configSettings"))==null?void 0:c.scheduler)==null?void 0:b.available_days_in_future,{startTime:a,endTime:o,endTimeForAvailableDaysInFuture:r}=this.validateAvailableDaysInFuture(t,i||30);if(a<r&&t.getTime()<r*1e3){const f=await((m=this.nylasSchedulerConnector)==null?void 0:m.scheduler.getAvailability(a,o));(!f||"error"in f)&&this.nylasSchedulerError.emit({notification:{...this.getErrorObject(f==null?void 0:f.error)},host:this.host});const p=(g=this.stores)==null?void 0:g.scheduler.get("selectableDates");p&&p.length>0&&((h=this.stores)==null||h.scheduler.set("selectedDate",p[0]))}}mapToBookingData(n){var d,s,c;const t=(d=this.stores)==null?void 0:d.scheduler.get("selectedTimeslot"),i=(s=this.stores)==null?void 0:s.scheduler.get("selectedLanguage"),a=(c=this.stores)==null?void 0:c.scheduler.get("selectedTimezone"),o=t!=null&&t.start_time?new Date(t==null?void 0:t.start_time).getTime()/1e3:"",r=t!=null&&t.end_time?new Date(t==null?void 0:t.end_time).getTime()/1e3:"";return{additional_guests:n.guests,guest:{...n.primaryParticipant},additional_fields:{...n.additionalFields},start_time:o,end_time:r,email_language:i,timezone:a}}async bookButtonClickedHandler(n){var c,b,m,g;if(n.defaultPrevented)return;const t=n.detail,i=this.mapToBookingData(t);this.bookingInfoConfirmed=t;const o=(b=(c=this.nylasSchedulerConnector)==null?void 0:c.schedulerStore)==null?void 0:b.get("rescheduleBookingId");if(o){const h=await((m=this.nylasSchedulerConnector)==null?void 0:m.scheduler.rescheduleBooking(o,t));(!h||"error"in h)&&this.nylasSchedulerError.emit({notification:{...this.getErrorObject(h==null?void 0:h.error)},host:this.host});const f=h==null?void 0:h.data,p=this.bookedEventInfo.emit({...h,data:{...f,...i}});"bookedEventInfo"in this.eventOverrides&&await this.eventOverrides.bookedEventInfo(p,this.nylasSchedulerConnector);return}const r=await((g=this.nylasSchedulerConnector)==null?void 0:g.scheduler.bookTimeslot(t));(!r||"error"in r)&&this.nylasSchedulerError.emit({notification:{...this.getErrorObject(r==null?void 0:r.error)},host:this.host});const d=r==null?void 0:r.data,s=this.bookedEventInfo.emit({...r,data:{...d,...i}});"bookedEventInfo"in this.eventOverrides&&await this.eventOverrides.bookedEventInfo(s,this.nylasSchedulerConnector)}dateSelectedHandler(n){const t=n.detail;this.selectedDateLabel=t?t.toLocaleDateString(void 0,{dateStyle:"full"}):`${e.instance.t("noDateSelected")}`}cancelBookedEventErrorHandler(n){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(n.detail.error)},host:this.host})}cancelBookedEventValidationErrorHandler(n){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(n.detail.error)},host:this.host})}rescheduleBookedEventErrorHandler(n){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(n.detail.error)},host:this.host})}confirmBookingErrorHandler(n){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(n.detail.error)},host:this.host})}feedbackModalClosedHandler(){this.showFeedbackModal=!1}feedbackSubmittedHandler(n){const i={eventId:E.captureMessage("Scheduling Page User Feedback"),message:n.detail.feedback};E.captureFeedback(i,{includeReplay:!0,captureContext:{tags:{"nylas-web-element":"nylas-schduling","nylas-web-element-version":"1.1.6"},extra:{configId:this.configurationId,slug:this.slug}}}),this.showFeedbackModal=!1}async getNylasSchedulerStore(){var n;return(n=this.baseProvider)==null?void 0:n.getStore("scheduler")}async getNylasSchedulerConnector(){return this.nylasSchedulerConnector}async getRef(){return this.host}getErrorObject(n){return{title:(n==null?void 0:n.title)||j.title,category:(n==null?void 0:n.category)||j.category,type:D.nr.Error,description:(n==null?void 0:n.message)||"",id:new Date().getTime().toString(),ttl:"none"}}checkIfSessionIdOrConfigIdExists(){if(!this.sessionId&&!this.refConfigId&&!(this.slug&&this.clientId)){let n="";return this.sessionId||(n+=e.instance.t("sessionIdRequiredErrorMessage")),!this.sessionId&&!this.refConfigId&&!(this.slug&&this.clientId)&&(n=e.instance.t("sessionIdRequiredErrorMessage")+" "+e.instance.t("publicConfigErrorMessage")),this.nylasSchedulerError.emit({notification:{title:e.instance.t("schedulingComponentErrorTitle"),category:B.ErrorCategory.Component,type:D.nr.Error,description:n,id:new Date().getTime().toString(),ttl:"none"},host:this.host}),!1}return!0}isTimeslotValid(n){return new Date(n.start_time)<new Date?(this.nylasSchedulerError.emit({notification:{title:e.instance.t("invalidTimeslotErrorTitle"),category:B.ErrorCategory.Component,type:D.nr.Error,description:e.instance.t("invalidTimeslotErrorMessage"),id:new Date().getTime().toString(),ttl:"none"},host:this.host}),!1):!0}validateAvailableDaysInFuture(n,t){const i=new Date,a=new Date(n.getFullYear(),n.getMonth(),1).getTime()/1e3,o=new Date(n.getFullYear(),n.getMonth()+1,1).getTime()/1e3,r=Math.floor(e.addDaysToCurrentDate(i,t).getTime()/1e3),d=Math.min(r,o);return{startTime:a<i.getTime()/1e3?Math.floor(i.getTime()/1e3):a,endTime:d,endTimeForAvailableDaysInFuture:r}}applyThemeConfig(n){if(n)for(const[t,i]of Object.entries(n))this.host.style.setProperty(`${t}`,i)}onFeedbackClick(n){n.preventDefault(),this.showFeedbackModal=!0}redirectToCustomUrl(n){window.location.assign(n)}render(){var p,w,u,v,y,T,S,z,O,R;const n=this.mode==="app",t=(p=this.baseProvider)==null?void 0:p.getStore("scheduler"),i=t==null?void 0:t.get("eventInfo"),a=t==null?void 0:t.get("showBookingForm"),o=t==null?void 0:t.get("cancelledEventInfo"),r=t==null?void 0:t.get("cancelBookingId"),d=t==null?void 0:t.get("selectedTimeslot"),s=t==null?void 0:t.get("rescheduleBookingId"),c=t==null?void 0:t.get("organizerConfirmationBookingId"),b=t==null?void 0:t.get("rejectBookingId"),m=t==null?void 0:t.get("confirmedEventInfo"),g=(t==null?void 0:t.get("nylasBranding"))||this.nylasBranding,h=t==null?void 0:t.get("selectedDate"),f=(u=(w=t==null?void 0:t.get("configSettings"))==null?void 0:w.scheduler)==null?void 0:u.confirmation_redirect_url;if(this.selectedDateLabel=h&&this.language?e.capitalizeFirstLetter(h.toLocaleDateString(N.LANGUAGE_CODE_MAP[this.language],{dateStyle:"full"})):`${e.instance.t("noDateSelected")}`,n&&(r||b)&&!o)return e.h(e.Host,null,e.h(I,{nylasBranding:g,isLoading:this.isLoading,showNotification:this.showNotification},e.h("div",{class:"cancel-flow-page",part:"cancel-flow-page"},e.h("nylas-cancel-booking-form",{selectedTimeslot:d,cancelBookingId:r,rejectBookingId:b,exportparts:"ncbf, ncbf__icon, ncbf__title, ncbf__description, ncbf__reason-textarea, ncbf__button-cta, ncbf__button-outline, ncbf__card"}))),this.enableUserFeedback&&e.h("button-component",{id:"report-issue",variant:"basic",onClick:l=>this.onFeedbackClick(l)},e.h("feedback-icon",null)),this.showFeedbackModal&&e.h("nylas-feedback-form",null));if(n&&c)return e.h(e.Host,null,e.h(I,null,e.h("div",{class:"manual-confirmation-page",part:"manual-confirmation-page"},e.h("nylas-organizer-confirmation-card",{organizerConfirmationBookingId:c,exportparts:"nmcc, nmcc__title, nmcc__description, nmcc__button-cta, nmcc__button-outline"}))),this.enableUserFeedback&&e.h("button-component",{id:"report-issue",variant:"basic",onClick:l=>this.onFeedbackClick(l)},e.h("feedback-icon",null)),this.showFeedbackModal&&e.h("nylas-feedback-form",null));if(n&&o)return e.h(e.Host,null,e.h(I,{nylasBranding:g,isLoading:this.isLoading,showNotification:this.showNotification},e.h("div",{class:"cancelled-event-page",part:"cancelled-event-page"},e.h("nylas-cancelled-event-card",{cancelledEventInfo:o,exportparts:"ncec, ncec__icon, ncec__title, ncec__description, ncec__button-outline, ncec__card"}))),this.enableUserFeedback&&e.h("button-component",{id:"report-issue",variant:"basic",onClick:l=>this.onFeedbackClick(l)},e.h("feedback-icon",null)),this.showFeedbackModal&&e.h("nylas-feedback-form",null));if(n&&m)return e.h(e.Host,null,e.h(I,{nylasBranding:g,isLoading:this.isLoading,showNotification:this.showNotification},e.h("div",{class:"cancelled-event-page",part:"confirmed-event-page"},e.h("nylas-confirmed-event-card",{confirmedEventInfo:m,exportparts:"ncec, ncec__icon, ncec__title, ncec__description, ncec__button-outline, ncec__card"}))),this.enableUserFeedback&&e.h("button-component",{id:"report-issue",variant:"basic",onClick:l=>this.onFeedbackClick(l)},e.h("feedback-icon",null)),this.showFeedbackModal&&e.h("nylas-feedback-form",null));if(n&&i&&f){const l=(v=this.bookingInfoConfirmed)==null?void 0:v.primaryParticipant,C=((y=this.bookingInfoConfirmed)==null?void 0:y.additionalFields)||{};if(this.bookingInfo&&typeof((T=this.bookingInfo)==null?void 0:T.additionalFields)<"u"){const x=this.bookingInfo.additionalFields;Object.keys(x).forEach(L=>{!C[L]&&(x!=null&&x[L])&&(C[L]=x[L].value)})}const _=(S=this.stores)==null?void 0:S.scheduler.get("selectedTimeslot"),P=(z=this.stores)==null?void 0:z.scheduler.get("selectedTimezone"),U=(O=this.stores)==null?void 0:O.scheduler.get("selectedLanguage"),F=(R=this.stores)==null?void 0:R.scheduler.get("configSettings"),A=this.configurationId?this.configurationId:F==null?void 0:F.configuration_id,q=window.location.search,k=new URLSearchParams(q);k.set("booking_id",i.booking_id),l!=null&&l.name&&k.set("name",l.name),l!=null&&l.email&&k.set("email",l.email),_!=null&&_.start_time&&k.set("start_time",(new Date(_.start_time).getTime()/1e3).toString()),_!=null&&_.end_time&&k.set("end_time",(new Date(_.end_time).getTime()/1e3).toString()),P&&k.set("tz",P),U&&k.set("language",U),C&&k.set("additional_values",JSON.stringify(C)),this.slug&&k.set("page_slug",this.slug),A&&k.set("config_id",A),this.redirectToCustomUrl(`${f}?${k.toString()}`);return}if(n&&i)return e.h(e.Host,null,e.h(I,{nylasBranding:g,isLoading:this.isLoading,showNotification:this.showNotification},e.h("div",{class:"booked-event-page",part:"booked-event-page"},e.h("nylas-booked-event-card",{selectedTimeslot:d,eventInfo:i,exportparts:"nbec, nbec__title, nbec__card, nbec__description, nbec__button-outline, nbec__cancel-cta, nbec__reschedule-cta"}))),this.enableUserFeedback&&e.h("button-component",{id:"report-issue",variant:"basic",onClick:l=>this.onFeedbackClick(l)},e.h("feedback-icon",null)),this.showFeedbackModal&&e.h("nylas-feedback-form",null));if(n&&(!i||s)&&!a){const l=this.host.querySelector('[slot="timeslot-picker-cta-label"]');return e.h(e.Host,null,e.h(I,{nylasBranding:g,isLoading:this.isLoading,showNotification:this.showNotification},s&&e.h(M,null,`${e.instance.t("rescheduleTitle")}`),e.h("div",{class:"select-date-page",part:"select-date-page"},e.h("div",{class:"left-panel"},e.h("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"}),e.h("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"})),e.h("div",{class:`right-panel ${s?"reschedule":""}`},e.h("h2",null,e.h("calendar-icon",null),e.h("span",{id:"selectedDate"},this.selectedDateLabel)),e.h("nylas-timeslot-picker",{exportparts:"ntp, ntp__timeslot, ntp__timeslot--selected, ntp__button-primary"},l&&e.h("span",{slot:"timeslot-picker-cta-label"},e.h("slot",{name:"timeslot-picker-cta-label"})))))),this.enableUserFeedback&&e.h("button-component",{id:"report-issue",variant:"basic",onClick:C=>this.onFeedbackClick(C)},e.h("feedback-icon",null)),this.showFeedbackModal&&e.h("nylas-feedback-form",null))}return n&&!i&&a?e.h(e.Host,null,e.h(I,{nylasBranding:g,isLoading:this.isLoading,showNotification:this.showNotification},s&&e.h(M,null,`${e.instance.t("rescheduleTitle")}`),e.h("div",{class:"additional-data-page",part:"additional-data-page"},e.h("div",{class:"left-panel"},e.h("div",{class:"wrapper"},e.h("nylas-selected-event-card",{exportparts:"nsec, nsec__card, nsec__icon, nsec__date, nsec__time, nsec__timezone"}))),e.h("div",{class:`right-panel ${s?"reschedule":""}`},e.h("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&&e.h("button-component",{id:"report-issue",variant:"basic",onClick:l=>this.onFeedbackClick(l)},e.h("feedback-icon",null)),this.showFeedbackModal&&e.h("nylas-feedback-form",null)):e.h(e.Host,null,e.h("slot",null))}get host(){return e.getElement(this)}static get watchers(){return{bookingInfo:["bookingInfoChanged"],rescheduleBookingRef:["rescheduleBookingRefChanged"],cancelBookingRef:["cancelBookingRefChanged"],organizerConfirmationBookingRef:["organizerConfirmationBookingRefChanged"],localization:["localizationChanged"],themeConfig:["themeConfigChanged"]}}};H.style=G;exports.nylas_scheduling=H;