@nylas/web-elements 1.1.0-canary.5 → 1.1.0-canary.8
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.
- package/dist/cjs/add-circle-icon.cjs.entry.js +1 -1
- package/dist/cjs/add-circle-icon_22.cjs.entry.js +242 -101
- package/dist/cjs/add-circle-icon_22.cjs.entry.js.map +1 -1
- package/dist/cjs/archive-icon.cjs.entry.js +1 -1
- package/dist/cjs/archive-icon_7.cjs.entry.js +7 -7
- package/dist/cjs/arrow-icon.cjs.entry.js +1 -1
- package/dist/cjs/bold-icon.cjs.entry.js +1 -1
- package/dist/cjs/bold-icon_3.cjs.entry.js +3 -3
- package/dist/cjs/button-component.cjs.entry.js +2 -2
- package/dist/cjs/button-component.cjs.entry.js.map +1 -1
- package/dist/cjs/calendar-cancel-icon.cjs.entry.js +1 -1
- package/dist/cjs/calendar-check-icon.cjs.entry.js +1 -1
- package/dist/cjs/calendar-check-icon_2.cjs.entry.js +2 -2
- package/dist/cjs/calendar-icon.cjs.entry.js +1 -1
- package/dist/cjs/calendar-info-icon.cjs.entry.js +1 -1
- package/dist/cjs/calendar-patterns-icon.cjs.entry.js +1 -1
- package/dist/cjs/checkmark-circle-icon.cjs.entry.js +1 -1
- package/dist/cjs/chevron-icon.cjs.entry.js +1 -1
- package/dist/cjs/chevron-icon_3.cjs.entry.js +4 -4
- package/dist/cjs/close-icon.cjs.entry.js +1 -1
- package/dist/cjs/{constants-6baf1f1d.js → constants-3e962931.js} +11 -1
- package/dist/cjs/{constants-6baf1f1d.js.map → constants-3e962931.js.map} +1 -1
- package/dist/cjs/{constants-0fba94a4.js → constants-d590922e.js} +11 -1
- package/dist/cjs/{constants-0fba94a4.js.map → constants-d590922e.js.map} +1 -1
- package/dist/cjs/document-refresh-icon.cjs.entry.js +1 -1
- package/dist/cjs/flow-icon.cjs.entry.js +1 -1
- package/dist/cjs/folder-icon.cjs.entry.js +1 -1
- package/dist/cjs/forward-icon.cjs.entry.js +1 -1
- package/dist/cjs/forward-icon_6.cjs.entry.js +9 -9
- package/dist/cjs/globe-icon.cjs.entry.js +1 -1
- package/dist/cjs/google-logo-icon.cjs.entry.js +1 -1
- package/dist/cjs/google-logo-icon_4.cjs.entry.js +95 -51
- package/dist/cjs/google-logo-icon_4.cjs.entry.js.map +1 -1
- package/dist/cjs/inbox-icon.cjs.entry.js +1 -1
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/{index.es-b12b7df1.js → index.es-4a7d8d3f.js} +2 -2
- package/dist/cjs/{index.es-b12b7df1.js.map → index.es-4a7d8d3f.js.map} +1 -1
- package/dist/cjs/{index.es-0a0f2d87.js → index.es-b2cce060.js} +2 -2
- package/dist/cjs/{index.es-0a0f2d87.js.map → index.es-b2cce060.js.map} +1 -1
- package/dist/cjs/info-icon.cjs.entry.js +1 -1
- package/dist/cjs/info-icon_2.cjs.entry.js +2 -2
- package/dist/cjs/italic-icon.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/loading-icon.cjs.entry.js +1 -1
- package/dist/cjs/location-icon.cjs.entry.js +1 -1
- package/dist/cjs/location-off-icon.cjs.entry.js +1 -1
- package/dist/cjs/{mailbox-store-05fa3bec.js → mailbox-store-a2f858b7.js} +3 -3
- package/dist/cjs/{mailbox-store-05fa3bec.js.map → mailbox-store-a2f858b7.js.map} +1 -1
- package/dist/cjs/{mailbox-store-14531fd4.js → mailbox-store-ecceb918.js} +3 -3
- package/dist/cjs/{mailbox-store-14531fd4.js.map → mailbox-store-ecceb918.js.map} +1 -1
- package/dist/cjs/microsoft-logo-icon.cjs.entry.js +1 -1
- package/dist/cjs/multi-select-dropdown.cjs.entry.js +3 -3
- package/dist/cjs/nylas-additional-participants.cjs.entry.js +3 -3
- package/dist/cjs/{nylas-api-request-2a0e7022.js → nylas-api-request-28b4576a.js} +14 -3
- package/dist/cjs/nylas-api-request-28b4576a.js.map +1 -0
- package/dist/cjs/{nylas-api-request-55923233.js → nylas-api-request-c9e0e347.js} +14 -3
- package/dist/cjs/nylas-api-request-c9e0e347.js.map +1 -0
- package/dist/cjs/nylas-availability-picker.cjs.entry.js +33 -16
- package/dist/cjs/nylas-availability-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-booked-event-card.cjs.entry.js +3 -3
- package/dist/cjs/nylas-booked-event-card_10.cjs.entry.js +7 -7
- package/dist/cjs/nylas-booking-calendar-picker.cjs.entry.js +12 -6
- package/dist/cjs/nylas-booking-calendar-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-booking-form.cjs.entry.js +2 -2
- package/dist/cjs/nylas-buffer-time.cjs.entry.js +2 -2
- package/dist/cjs/nylas-calendar-picker.cjs.entry.js +13 -8
- package/dist/cjs/nylas-calendar-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-cancel-booking-form.cjs.entry.js +3 -3
- package/dist/cjs/nylas-cancelled-event-card.cjs.entry.js +3 -3
- package/dist/cjs/nylas-composer.cjs.entry.js +2 -2
- package/dist/cjs/nylas-custom-booking-flow.cjs.entry.js +21 -12
- package/dist/cjs/nylas-custom-booking-flow.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-date-picker.cjs.entry.js +2 -2
- package/dist/cjs/nylas-editor-tabs.cjs.entry.js +69 -40
- package/dist/cjs/nylas-editor-tabs.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-event-description.cjs.entry.js +15 -6
- package/dist/cjs/nylas-event-description.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-event-duration.cjs.entry.js +15 -10
- package/dist/cjs/nylas-event-duration.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-event-info.cjs.entry.js +3 -3
- package/dist/cjs/nylas-event-limits.cjs.entry.js +3 -3
- package/dist/cjs/nylas-event-title.cjs.entry.js +70 -19
- package/dist/cjs/nylas-event-title.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-form-card.cjs.entry.js +3 -3
- package/dist/cjs/nylas-if-state.cjs.entry.js +2 -2
- package/dist/cjs/nylas-limit-future-bookings.cjs.entry.js +24 -11
- package/dist/cjs/nylas-limit-future-bookings.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-list-configurations.cjs.entry.js +26 -11
- package/dist/cjs/nylas-list-configurations.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-list-folders.cjs.entry.js +3 -3
- package/dist/cjs/nylas-list-threads.cjs.entry.js +3 -3
- package/dist/cjs/nylas-locale-switch.cjs.entry.js +3 -3
- package/dist/cjs/nylas-location-component.cjs.entry.js +17 -6
- package/dist/cjs/nylas-location-component.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-login.cjs.entry.js +3 -3
- package/dist/cjs/nylas-logo.cjs.entry.js +1 -1
- package/dist/cjs/nylas-mailbox-pagination.cjs.entry.js +2 -2
- package/dist/cjs/nylas-mailbox-toolbar-button.cjs.entry.js +3 -3
- package/dist/cjs/nylas-mailbox.cjs.entry.js +4 -4
- package/dist/cjs/nylas-min-cancellation-notice.cjs.entry.js +28 -13
- package/dist/cjs/nylas-min-cancellation-notice.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-notification.cjs.entry.js +2 -2
- package/dist/cjs/nylas-provider.cjs.entry.js +6 -6
- package/dist/cjs/nylas-scheduler-editor.cjs.entry.js +18 -18
- package/dist/cjs/nylas-scheduler-editor.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-scheduling.cjs.entry.js +3 -3
- package/dist/cjs/nylas-selected-event-card.cjs.entry.js +3 -3
- package/dist/cjs/nylas-summarize-message-button.cjs.entry.js +4 -4
- package/dist/cjs/nylas-threads-refresh.cjs.entry.js +4 -4
- package/dist/cjs/nylas-threads-search.cjs.entry.js +3 -3
- package/dist/cjs/nylas-time-window-picker.cjs.entry.js +2 -2
- package/dist/cjs/nylas-timeslot-picker.cjs.entry.js +2 -2
- package/dist/cjs/nylas-view-email.cjs.entry.js +2 -2
- package/dist/cjs/nylas-view-thread.cjs.entry.js +3 -3
- package/dist/cjs/nylas-web-elements.cjs.js +1 -1
- package/dist/cjs/people-icon.cjs.entry.js +1 -1
- package/dist/cjs/play-icon.cjs.entry.js +1 -1
- package/dist/cjs/play-icon_2.cjs.entry.js +2 -2
- package/dist/cjs/refresh-icon.cjs.entry.js +1 -1
- package/dist/cjs/{register-component-c8b6e907.js → register-component-7ecacf90.js} +2 -2
- package/dist/cjs/{register-component-09ebdf31.js.map → register-component-7ecacf90.js.map} +1 -1
- package/dist/cjs/{register-component-09ebdf31.js → register-component-98ab6f54.js} +2 -2
- package/dist/cjs/{register-component-c8b6e907.js.map → register-component-98ab6f54.js.map} +1 -1
- package/dist/cjs/reply-all-icon.cjs.entry.js +1 -1
- package/dist/cjs/reply-icon.cjs.entry.js +1 -1
- package/dist/cjs/{scheduler-config-store-4d93a9b7.js → scheduler-config-store-37690bf0.js} +10 -4
- package/dist/cjs/scheduler-config-store-37690bf0.js.map +1 -0
- package/dist/cjs/{scheduler-config-store-a0e08cab.js → scheduler-config-store-529c8d7e.js} +10 -4
- package/dist/cjs/scheduler-config-store-529c8d7e.js.map +1 -0
- package/dist/cjs/{scheduler-store-e148a4cc.js → scheduler-store-22103c86.js} +16 -3
- package/dist/cjs/scheduler-store-22103c86.js.map +1 -0
- package/dist/cjs/{scheduler-store-a492526c.js → scheduler-store-fad9ed7a.js} +16 -3
- package/dist/cjs/scheduler-store-fad9ed7a.js.map +1 -0
- package/dist/cjs/search-icon.cjs.entry.js +1 -1
- package/dist/cjs/select-dropdown.cjs.entry.js +2 -2
- package/dist/cjs/sent-icon.cjs.entry.js +1 -1
- package/dist/cjs/spam-icon.cjs.entry.js +1 -1
- package/dist/cjs/star-icon.cjs.entry.js +1 -1
- package/dist/cjs/stop-icon.cjs.entry.js +1 -1
- package/dist/cjs/time-period-selector.cjs.entry.js +2 -2
- package/dist/cjs/tooltip-component.cjs.entry.js +1 -1
- package/dist/cjs/translate-icon.cjs.entry.js +1 -1
- package/dist/cjs/trash-icon.cjs.entry.js +1 -1
- package/dist/cjs/underline-icon.cjs.entry.js +1 -1
- package/dist/cjs/{utils-20663d54.js → utils-9fc33c77.js} +46 -1
- package/dist/cjs/utils-9fc33c77.js.map +1 -0
- package/dist/cjs/{utils-2c7f0895.js → utils-d8cfc3be.js} +46 -1
- package/dist/cjs/{utils-2c7f0895.js.map → utils-d8cfc3be.js.map} +1 -1
- package/dist/cjs/warning-icon.cjs.entry.js +1 -1
- package/dist/collection/common/constants.js +9 -0
- package/dist/collection/common/constants.js.map +1 -1
- package/dist/collection/common/icons/add-circle.js +1 -1
- package/dist/collection/common/icons/archive.js +1 -1
- package/dist/collection/common/icons/arrow.js +1 -1
- package/dist/collection/common/icons/bold.js +1 -1
- package/dist/collection/common/icons/calendar-cancel.js +1 -1
- package/dist/collection/common/icons/calendar-check.js +1 -1
- package/dist/collection/common/icons/calendar-info.js +1 -1
- package/dist/collection/common/icons/calendar-patterns.js +1 -1
- package/dist/collection/common/icons/calendar.js +1 -1
- package/dist/collection/common/icons/checkmark-circle.js +1 -1
- package/dist/collection/common/icons/chevron.js +1 -1
- package/dist/collection/common/icons/close.js +1 -1
- package/dist/collection/common/icons/document-refresh.js +1 -1
- package/dist/collection/common/icons/flow.js +1 -1
- package/dist/collection/common/icons/folder.js +1 -1
- package/dist/collection/common/icons/forward.js +1 -1
- package/dist/collection/common/icons/globe.js +1 -1
- package/dist/collection/common/icons/google-logo.js +1 -1
- package/dist/collection/common/icons/inbox.js +1 -1
- package/dist/collection/common/icons/info.js +1 -1
- package/dist/collection/common/icons/italic.js +1 -1
- package/dist/collection/common/icons/loading.js +1 -1
- package/dist/collection/common/icons/location-off.js +1 -1
- package/dist/collection/common/icons/location.js +1 -1
- package/dist/collection/common/icons/microsoft-logo.js +1 -1
- package/dist/collection/common/icons/nylas-logo.js +1 -1
- package/dist/collection/common/icons/people.js +1 -1
- package/dist/collection/common/icons/play.js +1 -1
- package/dist/collection/common/icons/refresh.js +1 -1
- package/dist/collection/common/icons/reply-all.js +1 -1
- package/dist/collection/common/icons/reply.js +1 -1
- package/dist/collection/common/icons/search.js +1 -1
- package/dist/collection/common/icons/sent.js +1 -1
- package/dist/collection/common/icons/spam.js +1 -1
- package/dist/collection/common/icons/star.js +1 -1
- package/dist/collection/common/icons/stop.js +1 -1
- package/dist/collection/common/icons/translate.js +1 -1
- package/dist/collection/common/icons/trash.js +1 -1
- package/dist/collection/common/icons/underline.js +1 -1
- package/dist/collection/common/icons/warning.js +1 -1
- package/dist/collection/common/nylas-api-request.js +12 -1
- package/dist/collection/common/nylas-api-request.js.map +1 -1
- package/dist/collection/components/design-system/button-component/button-component.css +5 -0
- package/dist/collection/components/design-system/button-component/button-component.js +1 -1
- package/dist/collection/components/design-system/multi-select-dropdown/multi-select-dropdown.js +2 -2
- package/dist/collection/components/design-system/select-dropdown/select-dropdown.js +2 -2
- package/dist/collection/components/design-system/time-period-selector/time-period-selector.js +1 -1
- package/dist/collection/components/design-system/tooltip-component/toolitp-component.js +1 -1
- package/dist/collection/components/mailbox/nylas-composer/nylas-composer.js +1 -1
- package/dist/collection/components/mailbox/nylas-list-folders/nylas-list-folders.js +1 -1
- package/dist/collection/components/mailbox/nylas-list-threads/nylas-list-threads.js +1 -1
- package/dist/collection/components/mailbox/nylas-mailbox/nylas-mailbox.js +1 -1
- package/dist/collection/components/mailbox/nylas-mailbox-toolbar-button/nylas-mailbox-toolbar-button.js +1 -1
- package/dist/collection/components/mailbox/nylas-summarize-message-button/nylas-summarize-message-button.js +2 -2
- package/dist/collection/components/mailbox/nylas-threads-refresh/nylas-threads-refresh.js +2 -2
- package/dist/collection/components/mailbox/nylas-threads-search/nylas-threads-search.js +1 -1
- package/dist/collection/components/mailbox/nylas-view-email/nylas-view-email.js +1 -1
- package/dist/collection/components/mailbox/nylas-view-thread/nylas-view-thread.js +1 -1
- package/dist/collection/components/nylas-login/nylas-login.js +1 -1
- package/dist/collection/components/nylas-provider/nylas-provider.js +2 -2
- package/dist/collection/components/scheduler/nylas-booked-event-card/nylas-booked-event-card.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-cancel-booking-form/nylas-cancel-booking-form.js +1 -1
- package/dist/collection/components/scheduler/nylas-cancelled-event-card/nylas-cancelled-event-card.js +1 -1
- package/dist/collection/components/scheduler/nylas-notification/nylas-notification.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-availability-picker/nylas-availability-picker.js +55 -15
- package/dist/collection/components/scheduler-editor/nylas-availability-picker/nylas-availability-picker.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-booking-calendar-picker/nylas-booking-calendar-picker.js +32 -5
- package/dist/collection/components/scheduler-editor/nylas-booking-calendar-picker/nylas-booking-calendar-picker.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-calendar-picker/nylas-calendar-picker.js +23 -14
- package/dist/collection/components/scheduler-editor/nylas-calendar-picker/nylas-calendar-picker.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-custom-booking-flow/nylas-custom-booking-flow.js +41 -9
- package/dist/collection/components/scheduler-editor/nylas-custom-booking-flow/nylas-custom-booking-flow.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.css +35 -3
- package/dist/collection/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.js +99 -36
- package/dist/collection/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-editor-tabs/tab-contents.js +4 -4
- package/dist/collection/components/scheduler-editor/nylas-editor-tabs/tab-contents.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-description/nylas-event-description.css +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-description/nylas-event-description.js +34 -2
- package/dist/collection/components/scheduler-editor/nylas-event-description/nylas-event-description.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-duration/nylas-event-duration.css +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-duration/nylas-event-duration.js +35 -7
- package/dist/collection/components/scheduler-editor/nylas-event-duration/nylas-event-duration.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-info/nylas-event-info.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-limits/nylas-event-limits.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-title/nylas-event-title.css +8 -1
- package/dist/collection/components/scheduler-editor/nylas-event-title/nylas-event-title.js +102 -17
- package/dist/collection/components/scheduler-editor/nylas-event-title/nylas-event-title.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-form-card/nylas-form-card.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-limit-future-bookings/nylas-limit-future-bookings.js +45 -9
- package/dist/collection/components/scheduler-editor/nylas-limit-future-bookings/nylas-limit-future-bookings.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.css +39 -2
- package/dist/collection/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.js +46 -9
- package/dist/collection/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-location-component/nylas-location-component.css +2 -2
- package/dist/collection/components/scheduler-editor/nylas-location-component/nylas-location-component.js +37 -3
- package/dist/collection/components/scheduler-editor/nylas-location-component/nylas-location-component.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-min-cancellation-notice/nylas-min-cancellation-notice.js +49 -11
- package/dist/collection/components/scheduler-editor/nylas-min-cancellation-notice/nylas-min-cancellation-notice.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.css +6 -0
- package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.js +36 -16
- package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-time-window-picker/nylas-time-window-picker.js +1 -1
- package/dist/collection/connector/nylas-scheduler-connector/errors/index.js +8 -0
- package/dist/collection/connector/nylas-scheduler-connector/errors/index.js.map +1 -1
- package/dist/collection/connector/shared/api/scheduler-config.js +6 -6
- package/dist/collection/connector/shared/api/scheduler-config.js.map +1 -1
- package/dist/collection/connector/shared/api/scheduler.js +6 -1
- package/dist/collection/connector/shared/api/scheduler.js.map +1 -1
- package/dist/collection/index.js +0 -1
- package/dist/collection/index.js.map +1 -1
- package/dist/collection/stores/scheduler-config-store.js +9 -3
- package/dist/collection/stores/scheduler-config-store.js.map +1 -1
- package/dist/collection/utils/utils.js +44 -0
- package/dist/collection/utils/utils.js.map +1 -1
- package/dist/components/add-circle.js +1 -1
- package/dist/components/archive.js +1 -1
- package/dist/components/arrow.js +1 -1
- package/dist/components/bold.js +1 -1
- package/dist/components/button-component2.js +2 -2
- package/dist/components/button-component2.js.map +1 -1
- package/dist/components/calendar-cancel.js +1 -1
- package/dist/components/calendar-check.js +1 -1
- package/dist/components/calendar-info.js +1 -1
- package/dist/components/calendar-patterns.js +1 -1
- package/dist/components/calendar.js +1 -1
- package/dist/components/checkmark-circle.js +1 -1
- package/dist/components/chevron.js +1 -1
- package/dist/components/close.js +1 -1
- package/dist/components/constants.js +11 -2
- package/dist/components/constants.js.map +1 -1
- package/dist/components/document-refresh-icon.js +1 -1
- package/dist/components/flow.js +1 -1
- package/dist/components/focus-visible.js +1 -1
- package/dist/components/folder.js +1 -1
- package/dist/components/forward.js +1 -1
- package/dist/components/globe.js +1 -1
- package/dist/components/google-logo.js +1 -1
- package/dist/components/inbox.js +1 -1
- package/dist/components/index.d.ts +0 -179
- package/dist/components/index.es.js +2 -194
- package/dist/components/index.es.js.map +1 -1
- package/dist/components/index.js +2 -89
- package/dist/components/index.js.map +1 -1
- package/dist/components/index2.js +196 -0
- package/dist/components/index2.js.map +1 -0
- package/dist/components/info.js +1 -1
- package/dist/components/italic.js +1 -1
- package/dist/components/loading.js +1 -1
- package/dist/components/location-off.js +1 -1
- package/dist/components/location.js +1 -1
- package/dist/components/mailbox-store.js +3 -2
- package/dist/components/mailbox-store.js.map +1 -1
- package/dist/components/microsoft-logo.js +1 -1
- package/dist/components/multi-select-dropdown2.js +3 -3
- package/dist/components/nylas-additional-participants.js +2 -2
- package/dist/{nylas-web-elements/nylas-api-request-4f3dbb72.js → components/nylas-api-request.js} +14 -3
- package/dist/components/nylas-api-request.js.map +1 -0
- package/dist/components/nylas-availability-picker2.js +33 -14
- package/dist/components/nylas-availability-picker2.js.map +1 -1
- package/dist/components/nylas-booked-event-card2.js +1 -1
- package/dist/components/nylas-booking-calendar-picker2.js +12 -5
- package/dist/components/nylas-booking-calendar-picker2.js.map +1 -1
- package/dist/components/nylas-booking-form2.js +1 -1
- package/dist/components/nylas-buffer-time2.js +1 -1
- package/dist/components/nylas-calendar-picker2.js +13 -8
- package/dist/components/nylas-calendar-picker2.js.map +1 -1
- package/dist/components/nylas-cancel-booking-form2.js +2 -2
- package/dist/components/nylas-cancelled-event-card2.js +2 -2
- package/dist/components/nylas-composer2.js +2 -2
- package/dist/components/nylas-custom-booking-flow2.js +23 -12
- package/dist/components/nylas-custom-booking-flow2.js.map +1 -1
- package/dist/components/nylas-date-picker2.js +1 -1
- package/dist/components/nylas-editor-tabs2.js +74 -43
- package/dist/components/nylas-editor-tabs2.js.map +1 -1
- package/dist/components/nylas-event-description2.js +17 -6
- package/dist/components/nylas-event-description2.js.map +1 -1
- package/dist/components/nylas-event-duration2.js +16 -9
- package/dist/components/nylas-event-duration2.js.map +1 -1
- package/dist/components/nylas-event-info2.js +2 -2
- package/dist/components/nylas-event-limits2.js +2 -2
- package/dist/components/nylas-event-title2.js +74 -20
- package/dist/components/nylas-event-title2.js.map +1 -1
- package/dist/components/nylas-form-card2.js +2 -2
- package/dist/components/nylas-if-state.js +1 -1
- package/dist/components/nylas-limit-future-bookings2.js +25 -10
- package/dist/components/nylas-limit-future-bookings2.js.map +1 -1
- package/dist/components/nylas-list-configurations2.js +28 -11
- package/dist/components/nylas-list-configurations2.js.map +1 -1
- package/dist/components/nylas-list-folders.js +2 -2
- package/dist/components/nylas-list-threads.js +2 -2
- package/dist/components/nylas-location-component2.js +18 -5
- package/dist/components/nylas-location-component2.js.map +1 -1
- package/dist/components/nylas-login.js +1 -1
- package/dist/components/nylas-logo2.js +1 -1
- package/dist/components/nylas-mailbox-pagination.js +1 -1
- package/dist/components/nylas-mailbox-toolbar-button.js +2 -2
- package/dist/components/nylas-mailbox.js +2 -2
- package/dist/components/nylas-min-cancellation-notice2.js +29 -12
- package/dist/components/nylas-min-cancellation-notice2.js.map +1 -1
- package/dist/components/nylas-notification2.js +2 -2
- package/dist/components/nylas-provider.js +2 -2
- package/dist/components/nylas-scheduler-editor.js +18 -58
- package/dist/components/nylas-scheduler-editor.js.map +1 -1
- package/dist/components/nylas-scheduling.js +1 -1
- package/dist/components/nylas-selected-event-card2.js +1 -1
- package/dist/components/nylas-summarize-message-button2.js +3 -3
- package/dist/components/nylas-threads-refresh.js +3 -3
- package/dist/components/nylas-threads-search.js +2 -2
- package/dist/components/nylas-time-window-picker2.js +2 -2
- package/dist/components/nylas-timeslot-picker2.js +1 -1
- package/dist/components/nylas-view-email2.js +2 -2
- package/dist/components/nylas-view-thread.js +2 -2
- package/dist/components/people-icon.js +1 -1
- package/dist/components/play.js +1 -1
- package/dist/components/refresh.js +1 -1
- package/dist/components/register-component.js +1 -1
- package/dist/components/reply-all.js +1 -1
- package/dist/components/reply.js +1 -1
- package/dist/components/scheduler-config-store.js +10 -4
- package/dist/components/scheduler-config-store.js.map +1 -1
- package/dist/components/scheduler-store.js +16 -3
- package/dist/components/scheduler-store.js.map +1 -1
- package/dist/components/search.js +1 -1
- package/dist/components/select-dropdown2.js +2 -2
- package/dist/components/sent.js +1 -1
- package/dist/components/spam.js +1 -1
- package/dist/components/star.js +1 -1
- package/dist/components/stop.js +1 -1
- package/dist/components/time-period-selector2.js +2 -2
- package/dist/components/toolitp-component.js +1 -1
- package/dist/components/translate.js +1 -1
- package/dist/components/trash.js +1 -1
- package/dist/components/underline.js +1 -1
- package/dist/components/utils.js +45 -1
- package/dist/components/utils.js.map +1 -1
- package/dist/components/warning.js +1 -1
- package/dist/esm/add-circle-icon.entry.js +1 -1
- package/dist/esm/add-circle-icon_22.entry.js +242 -101
- package/dist/esm/add-circle-icon_22.entry.js.map +1 -1
- package/dist/esm/archive-icon.entry.js +1 -1
- package/dist/esm/archive-icon_7.entry.js +7 -7
- package/dist/esm/arrow-icon.entry.js +1 -1
- package/dist/esm/bold-icon.entry.js +1 -1
- package/dist/esm/bold-icon_3.entry.js +3 -3
- package/dist/esm/button-component.entry.js +2 -2
- package/dist/esm/button-component.entry.js.map +1 -1
- package/dist/esm/calendar-cancel-icon.entry.js +1 -1
- package/dist/esm/calendar-check-icon.entry.js +1 -1
- package/dist/esm/calendar-check-icon_2.entry.js +2 -2
- package/dist/esm/calendar-icon.entry.js +1 -1
- package/dist/esm/calendar-info-icon.entry.js +1 -1
- package/dist/esm/calendar-patterns-icon.entry.js +1 -1
- package/dist/esm/checkmark-circle-icon.entry.js +1 -1
- package/dist/esm/chevron-icon.entry.js +1 -1
- package/dist/esm/chevron-icon_3.entry.js +4 -4
- package/dist/esm/close-icon.entry.js +1 -1
- package/dist/esm/{constants-335dffcf.js → constants-bf39e913.js} +11 -2
- package/dist/{nylas-web-elements/constants-335dffcf.js.map → esm/constants-bf39e913.js.map} +1 -1
- package/dist/esm/{constants-6ee60d6d.js → constants-f34b9c6e.js} +11 -2
- package/dist/esm/{constants-6ee60d6d.js.map → constants-f34b9c6e.js.map} +1 -1
- package/dist/esm/document-refresh-icon.entry.js +1 -1
- package/dist/esm/flow-icon.entry.js +1 -1
- package/dist/esm/folder-icon.entry.js +1 -1
- package/dist/esm/forward-icon.entry.js +1 -1
- package/dist/esm/forward-icon_6.entry.js +9 -9
- package/dist/esm/globe-icon.entry.js +1 -1
- package/dist/esm/google-logo-icon.entry.js +1 -1
- package/dist/esm/google-logo-icon_4.entry.js +95 -51
- package/dist/esm/google-logo-icon_4.entry.js.map +1 -1
- package/dist/esm/inbox-icon.entry.js +1 -1
- package/dist/esm/{index.es-f57e612a.js → index.es-df564f87.js} +2 -2
- package/dist/esm/{index.es-f57e612a.js.map → index.es-df564f87.js.map} +1 -1
- package/dist/{nylas-web-elements/index.es-2842f8c8.js → esm/index.es-e4f027a2.js} +2 -2
- package/dist/esm/{index.es-2842f8c8.js.map → index.es-e4f027a2.js.map} +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/info-icon.entry.js +1 -1
- package/dist/esm/info-icon_2.entry.js +2 -2
- package/dist/esm/italic-icon.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/loading-icon.entry.js +1 -1
- package/dist/esm/location-icon.entry.js +1 -1
- package/dist/esm/location-off-icon.entry.js +1 -1
- package/dist/{nylas-web-elements/mailbox-store-d48269de.js → esm/mailbox-store-5075f820.js} +3 -3
- package/dist/{nylas-web-elements/mailbox-store-d48269de.js.map → esm/mailbox-store-5075f820.js.map} +1 -1
- package/dist/esm/{mailbox-store-47fc8a1a.js → mailbox-store-69c5c5f6.js} +3 -3
- package/dist/esm/{mailbox-store-47fc8a1a.js.map → mailbox-store-69c5c5f6.js.map} +1 -1
- package/dist/esm/microsoft-logo-icon.entry.js +1 -1
- package/dist/esm/multi-select-dropdown.entry.js +3 -3
- package/dist/esm/nylas-additional-participants.entry.js +3 -3
- package/dist/esm/{nylas-api-request-4f3dbb72.js → nylas-api-request-6a19db25.js} +14 -3
- package/dist/esm/nylas-api-request-6a19db25.js.map +1 -0
- package/dist/esm/{nylas-api-request-3120d9ac.js → nylas-api-request-b49b1da6.js} +14 -3
- package/dist/esm/nylas-api-request-b49b1da6.js.map +1 -0
- package/dist/esm/nylas-availability-picker.entry.js +33 -16
- package/dist/esm/nylas-availability-picker.entry.js.map +1 -1
- package/dist/esm/nylas-booked-event-card.entry.js +3 -3
- package/dist/esm/nylas-booked-event-card_10.entry.js +7 -7
- package/dist/esm/nylas-booking-calendar-picker.entry.js +12 -6
- package/dist/esm/nylas-booking-calendar-picker.entry.js.map +1 -1
- package/dist/esm/nylas-booking-form.entry.js +2 -2
- package/dist/esm/nylas-buffer-time.entry.js +2 -2
- package/dist/esm/nylas-calendar-picker.entry.js +13 -8
- package/dist/esm/nylas-calendar-picker.entry.js.map +1 -1
- package/dist/esm/nylas-cancel-booking-form.entry.js +3 -3
- package/dist/esm/nylas-cancelled-event-card.entry.js +3 -3
- package/dist/esm/nylas-composer.entry.js +2 -2
- package/dist/esm/nylas-custom-booking-flow.entry.js +21 -12
- package/dist/esm/nylas-custom-booking-flow.entry.js.map +1 -1
- package/dist/esm/nylas-date-picker.entry.js +2 -2
- package/dist/esm/nylas-editor-tabs.entry.js +69 -40
- package/dist/esm/nylas-editor-tabs.entry.js.map +1 -1
- package/dist/esm/nylas-event-description.entry.js +15 -6
- package/dist/esm/nylas-event-description.entry.js.map +1 -1
- package/dist/esm/nylas-event-duration.entry.js +15 -10
- package/dist/esm/nylas-event-duration.entry.js.map +1 -1
- package/dist/esm/nylas-event-info.entry.js +3 -3
- package/dist/esm/nylas-event-limits.entry.js +3 -3
- package/dist/esm/nylas-event-title.entry.js +70 -19
- package/dist/esm/nylas-event-title.entry.js.map +1 -1
- package/dist/esm/nylas-form-card.entry.js +3 -3
- package/dist/esm/nylas-if-state.entry.js +2 -2
- package/dist/esm/nylas-limit-future-bookings.entry.js +24 -11
- package/dist/esm/nylas-limit-future-bookings.entry.js.map +1 -1
- package/dist/esm/nylas-list-configurations.entry.js +26 -11
- package/dist/esm/nylas-list-configurations.entry.js.map +1 -1
- package/dist/esm/nylas-list-folders.entry.js +3 -3
- package/dist/esm/nylas-list-threads.entry.js +3 -3
- package/dist/esm/nylas-locale-switch.entry.js +3 -3
- package/dist/esm/nylas-location-component.entry.js +17 -6
- package/dist/esm/nylas-location-component.entry.js.map +1 -1
- package/dist/esm/nylas-login.entry.js +3 -3
- package/dist/esm/nylas-logo.entry.js +1 -1
- package/dist/esm/nylas-mailbox-pagination.entry.js +2 -2
- package/dist/esm/nylas-mailbox-toolbar-button.entry.js +3 -3
- package/dist/esm/nylas-mailbox.entry.js +4 -4
- package/dist/esm/nylas-min-cancellation-notice.entry.js +28 -13
- package/dist/esm/nylas-min-cancellation-notice.entry.js.map +1 -1
- package/dist/esm/nylas-notification.entry.js +2 -2
- package/dist/esm/nylas-provider.entry.js +6 -6
- package/dist/esm/nylas-scheduler-editor.entry.js +18 -18
- package/dist/esm/nylas-scheduler-editor.entry.js.map +1 -1
- package/dist/esm/nylas-scheduling.entry.js +3 -3
- package/dist/esm/nylas-selected-event-card.entry.js +3 -3
- package/dist/esm/nylas-summarize-message-button.entry.js +4 -4
- package/dist/esm/nylas-threads-refresh.entry.js +4 -4
- package/dist/esm/nylas-threads-search.entry.js +3 -3
- package/dist/esm/nylas-time-window-picker.entry.js +2 -2
- package/dist/esm/nylas-timeslot-picker.entry.js +2 -2
- package/dist/esm/nylas-view-email.entry.js +2 -2
- package/dist/esm/nylas-view-thread.entry.js +3 -3
- package/dist/esm/nylas-web-elements.js +1 -1
- package/dist/esm/people-icon.entry.js +1 -1
- package/dist/esm/play-icon.entry.js +1 -1
- package/dist/esm/play-icon_2.entry.js +2 -2
- package/dist/esm/refresh-icon.entry.js +1 -1
- package/dist/esm/{register-component-cf5c8420.js → register-component-b9cfcbaf.js} +2 -2
- package/dist/esm/{register-component-cf5c8420.js.map → register-component-b9cfcbaf.js.map} +1 -1
- package/dist/esm/{register-component-e5afe237.js → register-component-ff6f5df4.js} +2 -2
- package/dist/esm/{register-component-e5afe237.js.map → register-component-ff6f5df4.js.map} +1 -1
- package/dist/esm/reply-all-icon.entry.js +1 -1
- package/dist/esm/reply-icon.entry.js +1 -1
- package/dist/esm/{scheduler-config-store-6222c0ed.js → scheduler-config-store-07d98279.js} +10 -4
- package/dist/esm/scheduler-config-store-07d98279.js.map +1 -0
- package/dist/esm/{scheduler-config-store-0efc3519.js → scheduler-config-store-8f2e658e.js} +10 -4
- package/dist/esm/scheduler-config-store-8f2e658e.js.map +1 -0
- package/dist/esm/{scheduler-store-39d37291.js → scheduler-store-24fd0e91.js} +16 -3
- package/dist/esm/scheduler-store-24fd0e91.js.map +1 -0
- package/dist/esm/{scheduler-store-8ddcc496.js → scheduler-store-e62b2146.js} +16 -3
- package/dist/esm/scheduler-store-e62b2146.js.map +1 -0
- package/dist/esm/search-icon.entry.js +1 -1
- package/dist/esm/select-dropdown.entry.js +2 -2
- package/dist/esm/sent-icon.entry.js +1 -1
- package/dist/esm/spam-icon.entry.js +1 -1
- package/dist/esm/star-icon.entry.js +1 -1
- package/dist/esm/stop-icon.entry.js +1 -1
- package/dist/esm/time-period-selector.entry.js +2 -2
- package/dist/esm/tooltip-component.entry.js +1 -1
- package/dist/esm/translate-icon.entry.js +1 -1
- package/dist/esm/trash-icon.entry.js +1 -1
- package/dist/esm/underline-icon.entry.js +1 -1
- package/dist/{nylas-web-elements/utils-73d8a928.js → esm/utils-3e18e0b2.js} +46 -2
- package/dist/esm/{utils-73d8a928.js.map → utils-3e18e0b2.js.map} +1 -1
- package/dist/esm/{utils-d6204242.js → utils-db11d29c.js} +46 -2
- package/dist/esm/utils-db11d29c.js.map +1 -0
- package/dist/esm/warning-icon.entry.js +1 -1
- package/dist/nylas-web-elements/add-circle-icon.entry.js +1 -1
- package/dist/nylas-web-elements/archive-icon.entry.js +1 -1
- package/dist/nylas-web-elements/arrow-icon.entry.js +1 -1
- package/dist/nylas-web-elements/bold-icon.entry.js +1 -1
- package/dist/nylas-web-elements/button-component.entry.js +2 -2
- package/dist/nylas-web-elements/button-component.entry.js.map +1 -1
- package/dist/nylas-web-elements/calendar-cancel-icon.entry.js +1 -1
- package/dist/nylas-web-elements/calendar-check-icon.entry.js +1 -1
- package/dist/nylas-web-elements/calendar-icon.entry.js +1 -1
- package/dist/nylas-web-elements/calendar-info-icon.entry.js +1 -1
- package/dist/nylas-web-elements/calendar-patterns-icon.entry.js +1 -1
- package/dist/nylas-web-elements/checkmark-circle-icon.entry.js +1 -1
- package/dist/nylas-web-elements/chevron-icon.entry.js +1 -1
- package/dist/nylas-web-elements/close-icon.entry.js +1 -1
- package/dist/nylas-web-elements/{constants-335dffcf.js → constants-bf39e913.js} +11 -2
- package/dist/{esm/constants-335dffcf.js.map → nylas-web-elements/constants-bf39e913.js.map} +1 -1
- package/dist/nylas-web-elements/document-refresh-icon.entry.js +1 -1
- package/dist/nylas-web-elements/flow-icon.entry.js +1 -1
- package/dist/nylas-web-elements/folder-icon.entry.js +1 -1
- package/dist/nylas-web-elements/forward-icon.entry.js +1 -1
- package/dist/nylas-web-elements/globe-icon.entry.js +1 -1
- package/dist/nylas-web-elements/google-logo-icon.entry.js +1 -1
- package/dist/nylas-web-elements/inbox-icon.entry.js +1 -1
- package/dist/{esm/index.es-2842f8c8.js → nylas-web-elements/index.es-e4f027a2.js} +2 -2
- package/dist/nylas-web-elements/{index.es-2842f8c8.js.map → index.es-e4f027a2.js.map} +1 -1
- package/dist/nylas-web-elements/index.esm.js +2 -2
- package/dist/nylas-web-elements/info-icon.entry.js +1 -1
- package/dist/nylas-web-elements/italic-icon.entry.js +1 -1
- package/dist/nylas-web-elements/loading-icon.entry.js +1 -1
- package/dist/nylas-web-elements/location-icon.entry.js +1 -1
- package/dist/nylas-web-elements/location-off-icon.entry.js +1 -1
- package/dist/{esm/mailbox-store-d48269de.js → nylas-web-elements/mailbox-store-5075f820.js} +3 -3
- package/dist/{esm/mailbox-store-d48269de.js.map → nylas-web-elements/mailbox-store-5075f820.js.map} +1 -1
- package/dist/nylas-web-elements/microsoft-logo-icon.entry.js +1 -1
- package/dist/nylas-web-elements/multi-select-dropdown.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-additional-participants.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-api-request-6a19db25.js +58 -0
- package/dist/nylas-web-elements/nylas-api-request-6a19db25.js.map +1 -0
- package/dist/nylas-web-elements/nylas-availability-picker.entry.js +33 -16
- package/dist/nylas-web-elements/nylas-availability-picker.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-booked-event-card.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-booking-calendar-picker.entry.js +12 -6
- package/dist/nylas-web-elements/nylas-booking-calendar-picker.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-booking-form.entry.js +2 -2
- package/dist/nylas-web-elements/nylas-buffer-time.entry.js +2 -2
- package/dist/nylas-web-elements/nylas-calendar-picker.entry.js +13 -8
- package/dist/nylas-web-elements/nylas-calendar-picker.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-cancel-booking-form.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-cancelled-event-card.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-composer.entry.js +2 -2
- package/dist/nylas-web-elements/nylas-custom-booking-flow.entry.js +21 -12
- package/dist/nylas-web-elements/nylas-custom-booking-flow.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-date-picker.entry.js +2 -2
- package/dist/nylas-web-elements/nylas-editor-tabs.entry.js +69 -40
- package/dist/nylas-web-elements/nylas-editor-tabs.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-event-description.entry.js +15 -6
- package/dist/nylas-web-elements/nylas-event-description.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-event-duration.entry.js +15 -10
- package/dist/nylas-web-elements/nylas-event-duration.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-event-info.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-event-limits.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-event-title.entry.js +70 -19
- package/dist/nylas-web-elements/nylas-event-title.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-form-card.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-if-state.entry.js +2 -2
- package/dist/nylas-web-elements/nylas-limit-future-bookings.entry.js +24 -11
- package/dist/nylas-web-elements/nylas-limit-future-bookings.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-list-configurations.entry.js +26 -11
- package/dist/nylas-web-elements/nylas-list-configurations.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-list-folders.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-list-threads.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-locale-switch.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-location-component.entry.js +17 -6
- package/dist/nylas-web-elements/nylas-location-component.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-login.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-logo.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-mailbox-pagination.entry.js +2 -2
- package/dist/nylas-web-elements/nylas-mailbox-toolbar-button.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-mailbox.entry.js +4 -4
- package/dist/nylas-web-elements/nylas-min-cancellation-notice.entry.js +28 -13
- package/dist/nylas-web-elements/nylas-min-cancellation-notice.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-notification.entry.js +2 -2
- package/dist/nylas-web-elements/nylas-provider.entry.js +6 -6
- package/dist/nylas-web-elements/nylas-scheduler-editor.entry.js +18 -18
- package/dist/nylas-web-elements/nylas-scheduler-editor.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-scheduling.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-selected-event-card.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-summarize-message-button.entry.js +4 -4
- package/dist/nylas-web-elements/nylas-threads-refresh.entry.js +4 -4
- package/dist/nylas-web-elements/nylas-threads-search.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-time-window-picker.entry.js +2 -2
- package/dist/nylas-web-elements/nylas-timeslot-picker.entry.js +2 -2
- package/dist/nylas-web-elements/nylas-view-email.entry.js +2 -2
- package/dist/nylas-web-elements/nylas-view-thread.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-web-elements.esm.js +1 -1
- package/dist/nylas-web-elements/p-00a9efc1.entry.js +2 -0
- package/dist/nylas-web-elements/{p-618b94cd.entry.js → p-074919b0.entry.js} +2 -2
- package/dist/nylas-web-elements/p-1e445e86.entry.js +2 -0
- package/dist/nylas-web-elements/{p-7692056f.entry.js → p-2081b475.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-370cdcca.entry.js → p-21c3dcad.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-55368bc0.entry.js → p-22531c3d.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-7c55dfa0.entry.js → p-2d151de9.entry.js} +2 -2
- package/dist/nylas-web-elements/p-343a02e1.entry.js +2 -0
- package/dist/nylas-web-elements/{p-1c94940d.entry.js → p-349f07e3.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-9c399019.entry.js → p-3b281401.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-e03b2592.entry.js → p-4154e97e.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-3f6155de.entry.js → p-434fcde2.entry.js} +2 -2
- package/dist/nylas-web-elements/p-44a9ce77.entry.js +2 -0
- package/dist/nylas-web-elements/{p-e22aa0b0.js → p-47b99cf5.js} +2 -2
- package/dist/nylas-web-elements/{p-1819b3d7.js → p-49f716ed.js} +4 -4
- package/dist/nylas-web-elements/p-49f716ed.js.map +1 -0
- package/dist/nylas-web-elements/p-4c12e1e9.js +2 -0
- package/dist/nylas-web-elements/p-4c12e1e9.js.map +1 -0
- package/dist/nylas-web-elements/{p-1ab25f04.entry.js → p-50b4a80f.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-266f9995.entry.js → p-571472d4.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-c199d203.entry.js → p-5caa0f36.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-57b753c6.entry.js → p-607b547b.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-945caf14.entry.js → p-694b511a.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-18a936a3.entry.js → p-73c062f8.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-81ea7310.entry.js → p-7614e31e.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-fe3b8e66.entry.js → p-7687925d.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-c451c9e1.entry.js → p-828165d3.entry.js} +2 -2
- package/dist/nylas-web-elements/p-939db546.entry.js +2 -0
- package/dist/nylas-web-elements/{p-858f0aad.entry.js → p-95a3094a.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-ae893050.entry.js → p-980c32d9.entry.js} +3 -3
- package/dist/nylas-web-elements/{p-04e3a98e.entry.js → p-a17f542c.entry.js} +2 -2
- package/dist/nylas-web-elements/p-a3b1a98c.js +2 -0
- package/dist/nylas-web-elements/p-a3b1a98c.js.map +1 -0
- package/dist/nylas-web-elements/{p-41dc0d93.js → p-ad7cf473.js} +2 -2
- package/dist/nylas-web-elements/p-ad7cf473.js.map +1 -0
- package/dist/nylas-web-elements/{p-8b1a6e27.entry.js → p-b25821e1.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-572bf8c2.entry.js → p-b53062f7.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-674b6d5d.entry.js → p-bb89e973.entry.js} +2 -2
- package/dist/nylas-web-elements/p-c20ab972.entry.js +2 -0
- package/dist/nylas-web-elements/p-c529dced.entry.js +2 -0
- package/dist/nylas-web-elements/p-c529dced.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-1260ac06.entry.js → p-d5375409.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-9d4bffbb.entry.js → p-d8f09631.entry.js} +2 -2
- package/dist/nylas-web-elements/p-da74ec1c.entry.js +2 -0
- package/dist/nylas-web-elements/p-da74ec1c.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-db15d382.js +2 -0
- package/dist/nylas-web-elements/p-db15d382.js.map +1 -0
- package/dist/nylas-web-elements/{p-9ea458c3.js → p-f0250b7d.js} +2 -2
- package/dist/nylas-web-elements/{p-eaa9151b.js → p-f0f3f350.js} +2 -2
- package/dist/nylas-web-elements/{p-424f4d9a.entry.js → p-f3974e14.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-9b195811.entry.js → p-f47163ac.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-1655dec3.entry.js → p-f5d17746.entry.js} +4 -4
- package/dist/nylas-web-elements/p-f5d17746.entry.js.map +1 -0
- package/dist/nylas-web-elements/people-icon.entry.js +1 -1
- package/dist/nylas-web-elements/play-icon.entry.js +1 -1
- package/dist/nylas-web-elements/refresh-icon.entry.js +1 -1
- package/dist/nylas-web-elements/{register-component-e5afe237.js → register-component-ff6f5df4.js} +2 -2
- package/dist/nylas-web-elements/{register-component-e5afe237.js.map → register-component-ff6f5df4.js.map} +1 -1
- package/dist/nylas-web-elements/reply-all-icon.entry.js +1 -1
- package/dist/nylas-web-elements/reply-icon.entry.js +1 -1
- package/dist/nylas-web-elements/{scheduler-config-store-0efc3519.js → scheduler-config-store-8f2e658e.js} +10 -4
- package/dist/nylas-web-elements/scheduler-config-store-8f2e658e.js.map +1 -0
- package/dist/nylas-web-elements/{scheduler-store-8ddcc496.js → scheduler-store-e62b2146.js} +16 -3
- package/dist/nylas-web-elements/scheduler-store-e62b2146.js.map +1 -0
- package/dist/nylas-web-elements/search-icon.entry.js +1 -1
- package/dist/nylas-web-elements/select-dropdown.entry.js +2 -2
- package/dist/nylas-web-elements/sent-icon.entry.js +1 -1
- package/dist/nylas-web-elements/spam-icon.entry.js +1 -1
- package/dist/nylas-web-elements/star-icon.entry.js +1 -1
- package/dist/nylas-web-elements/stop-icon.entry.js +1 -1
- package/dist/nylas-web-elements/time-period-selector.entry.js +2 -2
- package/dist/nylas-web-elements/tooltip-component.entry.js +1 -1
- package/dist/nylas-web-elements/translate-icon.entry.js +1 -1
- package/dist/nylas-web-elements/trash-icon.entry.js +1 -1
- package/dist/nylas-web-elements/underline-icon.entry.js +1 -1
- package/dist/{esm/utils-73d8a928.js → nylas-web-elements/utils-3e18e0b2.js} +46 -2
- package/dist/nylas-web-elements/{utils-73d8a928.js.map → utils-3e18e0b2.js.map} +1 -1
- package/dist/nylas-web-elements/warning-icon.entry.js +1 -1
- package/dist/types/common/constants.d.ts +2 -0
- package/dist/types/common/nylas-api-request.d.ts +3 -0
- package/dist/types/components/scheduler-editor/nylas-availability-picker/nylas-availability-picker.d.ts +10 -4
- package/dist/types/components/scheduler-editor/nylas-booking-calendar-picker/nylas-booking-calendar-picker.d.ts +2 -0
- package/dist/types/components/scheduler-editor/nylas-calendar-picker/nylas-calendar-picker.d.ts +3 -2
- package/dist/types/components/scheduler-editor/nylas-custom-booking-flow/nylas-custom-booking-flow.d.ts +4 -1
- package/dist/types/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.d.ts +35 -5
- package/dist/types/components/scheduler-editor/nylas-event-description/nylas-event-description.d.ts +3 -0
- package/dist/types/components/scheduler-editor/nylas-event-duration/nylas-event-duration.d.ts +3 -0
- package/dist/types/components/scheduler-editor/nylas-event-title/nylas-event-title.d.ts +7 -1
- package/dist/types/components/scheduler-editor/nylas-limit-future-bookings/nylas-limit-future-bookings.d.ts +6 -6
- package/dist/types/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.d.ts +2 -0
- package/dist/types/components/scheduler-editor/nylas-location-component/nylas-location-component.d.ts +3 -0
- package/dist/types/components/scheduler-editor/nylas-min-cancellation-notice/nylas-min-cancellation-notice.d.ts +4 -1
- package/dist/types/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.d.ts +3 -2
- package/dist/types/components.d.ts +110 -22
- package/dist/types/connector/nylas-connector/index.d.ts +1 -1
- package/dist/types/connector/nylas-scheduler-config-connector/index.d.ts +1 -1
- package/dist/types/connector/nylas-scheduler-connector/errors/index.d.ts +1 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/stores/scheduler-config-store.d.ts +6 -2
- package/dist/types/utils/utils.d.ts +1 -0
- package/package.json +4 -2
- package/dist/cjs/nylas-api-request-2a0e7022.js.map +0 -1
- package/dist/cjs/nylas-api-request-55923233.js.map +0 -1
- package/dist/cjs/scheduler-config-store-4d93a9b7.js.map +0 -1
- package/dist/cjs/scheduler-config-store-a0e08cab.js.map +0 -1
- package/dist/cjs/scheduler-store-a492526c.js.map +0 -1
- package/dist/cjs/scheduler-store-e148a4cc.js.map +0 -1
- package/dist/cjs/utils-20663d54.js.map +0 -1
- package/dist/esm/nylas-api-request-3120d9ac.js.map +0 -1
- package/dist/esm/nylas-api-request-4f3dbb72.js.map +0 -1
- package/dist/esm/scheduler-config-store-0efc3519.js.map +0 -1
- package/dist/esm/scheduler-config-store-6222c0ed.js.map +0 -1
- package/dist/esm/scheduler-store-39d37291.js.map +0 -1
- package/dist/esm/scheduler-store-8ddcc496.js.map +0 -1
- package/dist/esm/utils-d6204242.js.map +0 -1
- package/dist/nylas-web-elements/nylas-api-request-4f3dbb72.js.map +0 -1
- package/dist/nylas-web-elements/p-0edb3b69.entry.js +0 -2
- package/dist/nylas-web-elements/p-1655dec3.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-1819b3d7.js.map +0 -1
- package/dist/nylas-web-elements/p-1aa7b357.js +0 -2
- package/dist/nylas-web-elements/p-1aa7b357.js.map +0 -1
- package/dist/nylas-web-elements/p-1f843391.js +0 -2
- package/dist/nylas-web-elements/p-1f843391.js.map +0 -1
- package/dist/nylas-web-elements/p-3116f5cc.js +0 -2
- package/dist/nylas-web-elements/p-3116f5cc.js.map +0 -1
- package/dist/nylas-web-elements/p-41dc0d93.js.map +0 -1
- package/dist/nylas-web-elements/p-47180df9.entry.js +0 -2
- package/dist/nylas-web-elements/p-605142a9.entry.js +0 -2
- package/dist/nylas-web-elements/p-6dcc9411.entry.js +0 -2
- package/dist/nylas-web-elements/p-6dcc9411.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-9d0c0340.entry.js +0 -2
- package/dist/nylas-web-elements/p-9d75bcb2.entry.js +0 -2
- package/dist/nylas-web-elements/p-9d75bcb2.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-be7124f0.entry.js +0 -2
- package/dist/nylas-web-elements/p-c45ac7c6.entry.js +0 -2
- package/dist/nylas-web-elements/scheduler-config-store-0efc3519.js.map +0 -1
- package/dist/nylas-web-elements/scheduler-store-8ddcc496.js.map +0 -1
- /package/dist/nylas-web-elements/{p-c45ac7c6.entry.js.map → p-00a9efc1.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-618b94cd.entry.js.map → p-074919b0.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-47180df9.entry.js.map → p-1e445e86.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-7692056f.entry.js.map → p-2081b475.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-370cdcca.entry.js.map → p-21c3dcad.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-55368bc0.entry.js.map → p-22531c3d.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-7c55dfa0.entry.js.map → p-2d151de9.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-be7124f0.entry.js.map → p-343a02e1.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-1c94940d.entry.js.map → p-349f07e3.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-9c399019.entry.js.map → p-3b281401.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-e03b2592.entry.js.map → p-4154e97e.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-3f6155de.entry.js.map → p-434fcde2.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-605142a9.entry.js.map → p-44a9ce77.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-e22aa0b0.js.map → p-47b99cf5.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-1ab25f04.entry.js.map → p-50b4a80f.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-266f9995.entry.js.map → p-571472d4.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-c199d203.entry.js.map → p-5caa0f36.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-57b753c6.entry.js.map → p-607b547b.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-945caf14.entry.js.map → p-694b511a.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-18a936a3.entry.js.map → p-73c062f8.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-81ea7310.entry.js.map → p-7614e31e.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-fe3b8e66.entry.js.map → p-7687925d.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-c451c9e1.entry.js.map → p-828165d3.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-9d0c0340.entry.js.map → p-939db546.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-858f0aad.entry.js.map → p-95a3094a.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-ae893050.entry.js.map → p-980c32d9.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-04e3a98e.entry.js.map → p-a17f542c.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-8b1a6e27.entry.js.map → p-b25821e1.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-572bf8c2.entry.js.map → p-b53062f7.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-674b6d5d.entry.js.map → p-bb89e973.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-0edb3b69.entry.js.map → p-c20ab972.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-1260ac06.entry.js.map → p-d5375409.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-9d4bffbb.entry.js.map → p-d8f09631.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-9ea458c3.js.map → p-f0250b7d.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-eaa9151b.js.map → p-f0f3f350.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-424f4d9a.entry.js.map → p-f3974e14.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-9b195811.entry.js.map → p-f47163ac.entry.js.map} +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{r as e,h as t,c as n,H as o,a as i,F as r}from"./p-68c2fadf.js";import{a as s,j as a,k as l,l as c,p as f}from"./p-41dc0d93.js";import{R as u}from"./p-eaa9151b.js";import{c as d}from"./p-cb65c223.js";const m=".sc-forward-icon-h{display:flex}";const p=m;const h=class{constructor(t){e(this,t);this.width="15";this.height="15"}render(){return t("svg",{key:"6a4eb6d9a2531279db927e298081ac4da5428fca",fill:"auto",width:this.width,height:this.height,viewBox:"0 0 1920 1920",xmlns:"http://www.w3.org/2000/svg"},t("path",{key:"ad2847c25e5d83df09cf22a76a198eb4e7f212f9",d:"m1246.246 64-90.496 90.496 477.952 477.952h-590.848C467.878 632.448.038 1100.416.038 1675.392v109.056h128v-109.056c0-504.576 410.368-914.944 914.816-914.944h590.848l-477.952 478.08 90.496 90.496 632.448-632.576L1246.246 64Z","fill-rule":"evenodd"}))}};h.style=p;const y=':host{display:grid;color:var(--nylas-color-primary-900)}.editor{position:relative;display:block;max-height:300px;overflow:auto;padding:1rem;border:1px solid var(--nylas-color-primary-300)}.editor blockquote{visibility:hidden;overflow:hidden;position:relative;transition:height 0.3s ease;margin:0}.editor blockquote::before{content:"...";visibility:visible;opacity:1;position:absolute;top:0;left:0;background-color:var(--nylas-color-primary-300);width:20px;text-align:center;color:var(--nylas-color-primary-800);vertical-align:middle;display:flex;justify-content:center;align-items:center;align-self:center;cursor:pointer}.editor .collapsed{height:20px}.editor .expanded{visibility:visible;opacity:1;height:auto;margin:0px 0px 0px 0.8ex;border-left:1px solid var(--nylas-color-primary-300);padding-left:1rem}.editor .expanded::before{display:none;}.buttons{display:flex;margin-top:1rem;justify-content:space-between}.buttons sp-button{border-radius:var(--nylas-border-radius);background-color:var(--nylas-color-primary-400);color:var(--nylas-color-primary-900);fill:var(--nylas-color-primary-900)}.buttons sp-button:hover{background-color:var(--nylas-color-primary-500)}.buttons sp-button:disabled{background-color:var(--nylas-color-primary-200);color:var(--nylas-color-primary-600);cursor:not-allowed}.buttons sp-button chevron-icon{display:inline-block}.buttons .close{justify-self:end}.toolbar{position:absolute;display:none;background-color:var(--nylas-color-primary-200);border-radius:var(--nylas-border-radius);z-index:1}.toolbar sp-button{border:0}';const g=y;const b=class{constructor(t){e(this,t);this.close=n(this,"close",7);this.send=n(this,"send",7);this.closeComposer=e=>{this.close.emit(e)};this.sendComposer=e=>{if(!this.editorEl){s("no editor element");return}const t=this.editorEl.querySelector(".message-body");if(!t){s("no message body");return}if(this.message){this.send.emit({message:this.message,replyBody:t.querySelector(".message-body")?.innerHTML||""});this.close.emit(e);this.editorEl.innerHTML=""}};this.message=undefined;this.viewEmailElement=undefined}connectedCallback(){}disconnectedCallback(){if(this.editorEl){this.editorEl.innerHTML=""}}componentWillLoad(){}async componentDidLoad(){if(this.message){this.watchBody(this.message)}if(!this.editorEl){s("[connectedCallback] no editor element");return}if(!this.toolbarEl){s("[connectedCallback] no toolbar element");return}const e=this.editorEl;const t=this.toolbarEl;e.addEventListener("mouseup",(n=>{const o=this.host.shadowRoot?.getSelection();if(!o){s("no selection");return}const i=o.getRangeAt(0);const r=o.toString();if(!r){t.style.display="none";return}const a=e.querySelector(".message-body");if(!a){s("no message body");return}const l=i.commonAncestorContainer;const c=l.parentElement;if(!c){return}const f=a.getBoundingClientRect();s("messageBodyRect",{messageBodyRect:f});const u=c.getBoundingClientRect();s("foundRect",{foundRect:u});const d=c.childNodes[0];const m=d.textContent||"";const p=m.indexOf(r);const h=window.getComputedStyle(c).fontSize;const y=parseInt(h.replace("px",""),10);const g=u.top-f.top-t.clientHeight;const b=p*(1/y)*100;t.style.top=`${g}px`;t.style.left=`${b}px`;t.style.display="block"}))}watchBody(e){if(!this.editorEl){s("no editor element");return}this.editorEl.querySelectorAll(".message-body").forEach((e=>e.remove()));const t=document.createElement("div");t.classList.add("message-body");const n=document.createElement("p");n.innerHTML=" ";t.appendChild(n);const o=document.createElement("br");t.appendChild(o);const i=document.createElement("div");i.classList.add("reply-text");i.innerText=`On ${new Date(e.date*1e3).toLocaleDateString(undefined,{dateStyle:"full"})} <${e.from?.map((e=>e.name||e.email)).join(", ")}> wrote:`;t.appendChild(i);if(e.body){const n=document.createElement("html");n.innerHTML=e.body;const o=document.createElement("blockquote");o.classList.add("collapsed");o.classList.add("gmail_quote");o.innerHTML=n.innerHTML;t.appendChild(o);s("replyContainer",{replyContainer:o})}this.editorEl.appendChild(t);this.editorEl.querySelectorAll("blockquote.collapsed").forEach((e=>{e.addEventListener("click",(function(e){e.preventDefault();const t=e.target;t.classList.remove("collapsed");t.classList.add("expanded")}),{once:true})}));this.editorEl.focus()}render(){return t(o,{key:"7537b7c56a1e609f88189c2c4deed986827eb193"},t("sp-theme",{key:"efa28f8ed5585ec21b44ae5ec174aa10a9c92aba",scale:"medium",color:"dark"},t("div",{key:"c7932bcedcb2b3cfa4e0900578cf2b749000125d",class:"editor",contentEditable:true,ref:e=>this.editorEl=e},t("div",{key:"89c06c0e76d29ea6713dd44b2452e261d0d7d43b",class:"toolbar",ref:e=>this.toolbarEl=e,contentEditable:false},t("sp-button",{key:"beeb60448f03c8818925aeb13ab5231aa72f7526",quiet:true,onClick:()=>document.execCommand("bold")},t("div",{key:"4e37be81a28ac4355f9d0d6d6c71b7b78cf41456",slot:"icon"},t("bold-icon",{key:"56cf047799a6a5713310d5b095ca91e6004d6107"})),t("div",{key:"2fe47f8f364f7fb1016990f2aecec655e2e6eb30",slot:"label"},"Bold")),t("sp-button",{key:"0416d13b88ccefd5005f4b97f7dded2118d37f43",quiet:true,onClick:()=>document.execCommand("underline")},t("div",{key:"6d20e215eafbb91a17ce452a6b64295ab4ef2bb9",slot:"icon"},t("underline-icon",{key:"b8d988fa168047ed213fbcceb53b24bf3f766d7a"})),t("div",{key:"bd05639007b3ea849501b995137ceda70aed20da",slot:"label"},"Underline")),t("sp-button",{key:"9775c4787363cd4d21778f4c848c7f5a7564b507",quiet:true,onClick:()=>document.execCommand("italic")},t("div",{key:"ca9d557028981c0fe209045e5d1748b19bbb5069",slot:"icon"},t("italic-icon",{key:"1be5debba3572e83ab132a3e44d8fc1e799f6619"})),t("div",{key:"cccb70309840e20f558158e6ef9edf8fe0e52eed",slot:"label"},"Italic")))),t("div",{key:"502854e008886de49ec435c1ebd73b48f2cc4c70",class:"buttons"},t("sp-button",{key:"9663a709ca8794dc76dec379a39c52a6a754cb6e",onClick:this.sendComposer,class:"send"},"Send"),t("sp-button",{key:"b0c7637932f2659c9115e74f1244db04992a69aa",onClick:this.closeComposer,class:"close"},"Close"))))}get host(){return i(this)}static get watchers(){return{message:["watchBody"]}}};b.style=g;const w=":host{display:block}sp-button{padding:0;border:0;border-radius:var(--nylas-border-radius);min-block-size:50%;min-inline-size:2rem;background-color:var(--nylas-color-primary-300);fill:var(--nylas-color-primary-800)}sp-button:hover{background-color:var(--nylas-color-primary-400)}.summarize-button.stopped{animation:none}.summarize-button.playing{animation:pulse 2s infinite}.summarize-button.loading{display:flex;align-content:center;height:1.5rem;width:2rem;vertical-align:middle;animation:pulse 2s infinite;flex-wrap:wrap}.summarize-button.loading loading-icon{--dot-color:var(--nylas-color-primary-600)}@keyframes pulse{0%{transform:scale(1);box-shadow:0 0 0 0 var(--nylas-color-primary-300)}70%{transform:scale(1.05);box-shadow:0 0 0 10px rgba(255, 69, 0, 0)}100%{transform:scale(1);box-shadow:0 0 0 0 rgba(255, 69, 0, 0)}}@keyframes wave{0%{transform:translateX(0)}50%{transform:translateX(100%)}100%{transform:translateX(0)}}";const v=w;var k=undefined&&undefined.__decorate||function(e,t,n,o){var i=arguments.length,r=i<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,n):o,s;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;a>=0;a--)if(s=e[a])r=(i<3?s(r):i>3?s(t,n,r):s(t,n))||r;return i>3&&r&&Object.defineProperty(t,n,r),r};var x=undefined&&undefined.__metadata||function(e,t){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(e,t)};const T=class{constructor(t){e(this,t);this.summarize=n(this,"summarize",7);this.abortController=new AbortController;this.onClick=async e=>{e.preventDefault();e.stopPropagation();if(this.state==="stopped"){if(this.message){this.abortController=new AbortController;const e=this.summarize.emit({abortController:this.abortController,playAudio:this.playAudio,message:this.message,updateState:this.updateState});if(!e.defaultPrevented){s(`[nylas-summarize-message-button] Default event not prevented, summarizing message`);if(this.audioRef){await this.audioRef.play().then((()=>this.audioRef?.pause())).catch((e=>console.error("Error playing audio:",e)));await this.audioRef.play().catch((e=>console.error("Error playing audio:",e)))}}}}else if(this.state==="playing"){this.abortController?.abort();this.audioRef?.pause()}else{this.state="stopped"}};this.message=undefined;this.state="stopped";this.playAudio=this.playAudio.bind(this);this.updateState=this.updateState.bind(this)}connectedCallback(){}disconnectedCallback(){}async componentWillLoad(){s(`[nylas-summarize-message-button] Component will load`)}async componentDidLoad(){s(`[nylas-summarize-message-button] Component did load`)}async updateState(e){this.state=e}async playAudio(e){if(!this.audioRef){this.state="stopped";return}if(!e){this.state="stopped";return}const t=this.audioRef;if(!("MediaSource"in window)){const n=await e;if(n==null){throw new Error("ReadableStream not yet supported in this browser.")}const o=n.getReader();const i=[];await this.readChunk(o,i);const r=new Blob(i,{type:"audio/mpeg"});const s=URL.createObjectURL(r);t.src=s;return}const n=new MediaSource;let o;let i=false;t.src=URL.createObjectURL(n);n.addEventListener("sourceopen",r);async function r(){o=n.addSourceBuffer("audio/mpeg");o.addEventListener("updateend",a);const r=await e;if(r==null){throw new Error("ReadableStream not yet supported in this browser.")}const s=r.getReader();const l=()=>{s.read().then((({done:e,value:t})=>{if(e){i=true;return}if(!o.updating){o.appendBuffer(t)}l()})).catch((e=>{console.error("Error while fetching and appending chunks:",e)}))};l();if(t.paused){t.play().catch((e=>console.error("Error playing audio:",e)))}}function a(){if(i){n.endOfStream();n.removeEventListener("sourceopen",r);n.removeEventListener("sourceclose",(()=>{s(`[nylas-summarize-message-button] Source closed`)}));o.removeEventListener("updateend",a);return}}}async readChunk(e,t){return e.read().then((({done:n,value:o})=>{if(n){return t}t.push(o);return this.readChunk(e,t)}))}render(){return t(o,{key:"8c0687fd071081bfe39b324debeb165a966301c0"},t("sp-theme",{key:"30328464c09cb718c83ffa123018ea2ade596774",scale:"medium",color:"dark"},t("sp-button",{key:"b7f0095382095c2c69a664cfd848a7d44e3fee3a",label:"Summarize email","icon-only":true,onClickCapture:this.onClick,class:{"summarize-button":true,stopped:this.state==="stopped",loading:this.state==="loading",playing:this.state==="playing"}},this.state==="stopped"&&t("play-icon",null),this.state==="loading"&&t("loading-icon",null),this.state==="playing"&&t("stop-icon",null)),t("audio",{key:"a5595d5d2a40baa947eece71ee22110d9225c879",ref:e=>this.audioRef=e,autoPlay:true,onPlaying:()=>this.state="playing",onPause:()=>this.state="stopped",onEnded:()=>{this.state="stopped";s(`[nylas-summarize-message-button] Audio ended`)}})))}};k([u({name:"nylas-summarize-message-button",eventToProps:{summarize:async(e,t)=>{const{playAudio:n,updateState:o,abortController:i,message:r}=e.detail;const s=a(r.body||"");await o("loading");try{const e=await t.messages.summarizeText(s);const o=t.messages.textToSpeech(e,i);await n(o)}catch(e){await o("stopped");console.error("Error summarizing message:",e)}}},fireRegisterEvent:true}),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],T.prototype,"render",null);T.style=v;function E(e){if(!window.matchMedia("(prefers-color-scheme: dark)").matches){return e}if(!e){return e}if(e==="transparent"){return"color"}if(e.startsWith("#")){return S(e)}if(e.startsWith("rgb")){return R(e)}if(e.startsWith("hsl")){return A(e)}if(_(e)){return C(e)}return e}function S(e){if(e.length<7){e="#"+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]}const t=(255-parseInt(e.slice(1,3),16)).toString(16).padStart(2,"0");const n=(255-parseInt(e.slice(3,5),16)).toString(16).padStart(2,"0");const o=(255-parseInt(e.slice(5,7),16)).toString(16).padStart(2,"0");return`#${t}${n}${o}`}function R(e){const t=e.match(/\d+/g)?.map(Number);if(!t){return e}const[n,o,i]=t;return`rgb(${255-n}, ${255-o}, ${255-i})`}function A(e){const t=e.match(/\d+\.?\d*/g)?.map(Number);if(!t){return e}const[n,o,i]=t;return`hsl(${n}, ${o}%, ${100-i}%)`}function _(e){return/^[a-z]+$/i.test(e)}function C(e){return R(z(e))}function z(e){if(e.toLowerCase()==="red"){return"rgb(255, 0, 0)"}return"rgb(0, 0, 0)"}function L(e){if(e instanceof HTMLStyleElement){let t=e.textContent;if(t){t=t.replaceAll(/@media\s*\(prefers-color-scheme:\s*(dark|light)\)\s*\{([^}]+)\}/g,"");const n=t.matchAll(/border-color:\s*([^;]+)/g);if(n){for(const e of n){const[n,o]=e;const i=n.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&");t=t.replaceAll(i,n.replace(o,E(o)))}}const o=t.matchAll(/border:\s*([^;]+)/g);if(o){for(const e of o){const n=e[0].trim();const o=n.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&");const[i,r,s]=e[1].split(" ");t=t.replaceAll(o,n.replace(s,E(s)))}}const i=t.matchAll(/background-color:\s*([^;]+)/g);if(i){for(const e of i){const[n,o]=e;const i=n.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&");t=t.replaceAll(i,n.replace(o,E(o)));s("backgroundColor",{fullMatch:n,replace:n.replace(o,E(o)),color:o,invertColor:E(o)})}}const r=t.matchAll(/background:\s*([^;]+)/g);if(r){for(const e of r){const n=e[0].trim();const o=n.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&");const[i,r,s]=e[1].split(" ");t=t.replaceAll(o,n.replace(s,E(s)))}}const a=t.matchAll(/color:\s*([^;]+)/g);if(a){for(const e of a){const[n,o]=e;const i=n.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&");t=t.replaceAll(i,n.replace(o,E(o)))}}e.textContent=t}}if(e instanceof HTMLElement){const t=window.getComputedStyle(e);const n=t.color||e.style.color;const o=t.backgroundColor||e.style.backgroundColor;const i=t.borderColor||e.style.borderColor;if(n&&!o){e.style.color=""}else if(n&&o){e.style.color=E(n);e.style.backgroundColor=E(o);s("element",e);s("computedStyle.color",n);s("computedStyle.backgroundColor",o);s("invertColor(color)",E(n));s("invertColor(backgroundColor)",E(o))}else if(!n&&o){e.style.backgroundColor=""}if(i){s("borderColor",i);e.style.borderColor=E(i)}if(e.hasAttribute("bgcolor")){e.removeAttribute("bgcolor")}}}function M(e){L(e);const t=e.querySelectorAll("*");t.forEach((e=>L(e)))}var D={exports:{}};
|
|
2
|
-
/*! @license DOMPurify 3.0.8 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.8/LICENSE */(function(e,t){(function(t,n){e.exports=n()})(d,(function(){const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:o,getOwnPropertyDescriptor:i}=Object;let{freeze:r,seal:s,create:a}=Object;let{apply:l,construct:c}=typeof Reflect!=="undefined"&&Reflect;if(!r){r=function e(t){return t}}if(!s){s=function e(t){return t}}if(!l){l=function e(t,n,o){return t.apply(n,o)}}if(!c){c=function e(t,n){return new t(...n)}}const f=k(Array.prototype.forEach);const u=k(Array.prototype.pop);const d=k(Array.prototype.push);const m=k(String.prototype.toLowerCase);const p=k(String.prototype.toString);const h=k(String.prototype.match);const y=k(String.prototype.replace);const g=k(String.prototype.indexOf);const b=k(String.prototype.trim);const w=k(RegExp.prototype.test);const v=x(TypeError);function k(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++){o[i-1]=arguments[i]}return l(e,t,o)}}function x(e){return function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++){n[o]=arguments[o]}return c(e,n)}}function T(e,o){let i=arguments.length>2&&arguments[2]!==undefined?arguments[2]:m;if(t){t(e,null)}let r=o.length;while(r--){let t=o[r];if(typeof t==="string"){const e=i(t);if(e!==t){if(!n(o)){o[r]=e}t=e}}e[t]=true}return e}function E(e){for(let t=0;t<e.length;t++){if(i(e,t)===undefined){e[t]=null}}return e}function S(t){const n=a(null);for(const[o,r]of e(t)){if(i(t,o)!==undefined){if(Array.isArray(r)){n[o]=E(r)}else if(r&&typeof r==="object"&&r.constructor===Object){n[o]=S(r)}else{n[o]=r}}}return n}function R(e,t){while(e!==null){const n=i(e,t);if(n){if(n.get){return k(n.get)}if(typeof n.value==="function"){return k(n.value)}}e=o(e)}function n(e){console.warn("fallback value for",e);return null}return n}const A=r(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]);const _=r(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]);const C=r(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]);const z=r(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]);const L=r(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]);const M=r(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]);const D=r(["#text"]);const P=r(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]);const I=r(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]);const O=r(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]);const $=r(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]);const j=s(/\{\{[\w\W]*|[\w\W]*\}\}/gm);const F=s(/<%[\w\W]*|[\w\W]*%>/gm);const B=s(/\${[\w\W]*}/gm);const N=s(/^data-[\-\w.\u00B7-\uFFFF]/);const q=s(/^aria-[\-\w]+$/);const U=s(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i);const H=s(/^(?:\w+script|data):/i);const W=s(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g);const X=s(/^html$/i);var Y=Object.freeze({__proto__:null,MUSTACHE_EXPR:j,ERB_EXPR:F,TMPLIT_EXPR:B,DATA_ATTR:N,ARIA_ATTR:q,IS_ALLOWED_URI:U,IS_SCRIPT_OR_DATA:H,ATTR_WHITESPACE:W,DOCTYPE_NAME:X});const G=function e(){return typeof window==="undefined"?null:window};const Z=function e(t,n){if(typeof t!=="object"||typeof t.createPolicy!=="function"){return null}let o=null;const i="data-tt-policy-suffix";if(n&&n.hasAttribute(i)){o=n.getAttribute(i)}const r="dompurify"+(o?"#"+o:"");try{return t.createPolicy(r,{createHTML(e){return e},createScriptURL(e){return e}})}catch(e){console.warn("TrustedTypes policy "+r+" could not be created.");return null}};function V(){let t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:G();const n=e=>V(e);n.version="3.0.8";n.removed=[];if(!t||!t.document||t.document.nodeType!==9){n.isSupported=false;return n}let{document:o}=t;const i=o;const s=i.currentScript;const{DocumentFragment:l,HTMLTemplateElement:c,Node:k,Element:x,NodeFilter:E,NamedNodeMap:j=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:F,DOMParser:B,trustedTypes:N}=t;const q=x.prototype;const H=R(q,"cloneNode");const W=R(q,"nextSibling");const J=R(q,"childNodes");const K=R(q,"parentNode");if(typeof c==="function"){const e=o.createElement("template");if(e.content&&e.content.ownerDocument){o=e.content.ownerDocument}}let Q;let ee="";const{implementation:te,createNodeIterator:ne,createDocumentFragment:oe,getElementsByTagName:ie}=o;const{importNode:re}=i;let se={};n.isSupported=typeof e==="function"&&typeof K==="function"&&te&&te.createHTMLDocument!==undefined;const{MUSTACHE_EXPR:ae,ERB_EXPR:le,TMPLIT_EXPR:ce,DATA_ATTR:fe,ARIA_ATTR:ue,IS_SCRIPT_OR_DATA:de,ATTR_WHITESPACE:me}=Y;let{IS_ALLOWED_URI:pe}=Y;let he=null;const ye=T({},[...A,..._,...C,...L,...D]);let ge=null;const be=T({},[...P,...I,...O,...$]);let we=Object.seal(a(null,{tagNameCheck:{writable:true,configurable:false,enumerable:true,value:null},attributeNameCheck:{writable:true,configurable:false,enumerable:true,value:null},allowCustomizedBuiltInElements:{writable:true,configurable:false,enumerable:true,value:false}}));let ve=null;let ke=null;let xe=true;let Te=true;let Ee=false;let Se=true;let Re=false;let Ae=false;let _e=false;let Ce=false;let ze=false;let Le=false;let Me=false;let De=true;let Pe=false;const Ie="user-content-";let Oe=true;let $e=false;let je={};let Fe=null;const Be=T({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ne=null;const qe=T({},["audio","video","img","source","image","track"]);let Ue=null;const He=T({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]);const We="http://www.w3.org/1998/Math/MathML";const Xe="http://www.w3.org/2000/svg";const Ye="http://www.w3.org/1999/xhtml";let Ge=Ye;let Ze=false;let Ve=null;const Je=T({},[We,Xe,Ye],p);let Ke=null;const Qe=["application/xhtml+xml","text/html"];const et="text/html";let tt=null;let nt=null;const ot=o.createElement("form");const it=function e(t){return t instanceof RegExp||t instanceof Function};const rt=function e(){let t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};if(nt&&nt===t){return}if(!t||typeof t!=="object"){t={}}t=S(t);Ke=Qe.indexOf(t.PARSER_MEDIA_TYPE)===-1?et:t.PARSER_MEDIA_TYPE;tt=Ke==="application/xhtml+xml"?p:m;he="ALLOWED_TAGS"in t?T({},t.ALLOWED_TAGS,tt):ye;ge="ALLOWED_ATTR"in t?T({},t.ALLOWED_ATTR,tt):be;Ve="ALLOWED_NAMESPACES"in t?T({},t.ALLOWED_NAMESPACES,p):Je;Ue="ADD_URI_SAFE_ATTR"in t?T(S(He),t.ADD_URI_SAFE_ATTR,tt):He;Ne="ADD_DATA_URI_TAGS"in t?T(S(qe),t.ADD_DATA_URI_TAGS,tt):qe;Fe="FORBID_CONTENTS"in t?T({},t.FORBID_CONTENTS,tt):Be;ve="FORBID_TAGS"in t?T({},t.FORBID_TAGS,tt):{};ke="FORBID_ATTR"in t?T({},t.FORBID_ATTR,tt):{};je="USE_PROFILES"in t?t.USE_PROFILES:false;xe=t.ALLOW_ARIA_ATTR!==false;Te=t.ALLOW_DATA_ATTR!==false;Ee=t.ALLOW_UNKNOWN_PROTOCOLS||false;Se=t.ALLOW_SELF_CLOSE_IN_ATTR!==false;Re=t.SAFE_FOR_TEMPLATES||false;Ae=t.WHOLE_DOCUMENT||false;ze=t.RETURN_DOM||false;Le=t.RETURN_DOM_FRAGMENT||false;Me=t.RETURN_TRUSTED_TYPE||false;Ce=t.FORCE_BODY||false;De=t.SANITIZE_DOM!==false;Pe=t.SANITIZE_NAMED_PROPS||false;Oe=t.KEEP_CONTENT!==false;$e=t.IN_PLACE||false;pe=t.ALLOWED_URI_REGEXP||U;Ge=t.NAMESPACE||Ye;we=t.CUSTOM_ELEMENT_HANDLING||{};if(t.CUSTOM_ELEMENT_HANDLING&&it(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)){we.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck}if(t.CUSTOM_ELEMENT_HANDLING&&it(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)){we.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck}if(t.CUSTOM_ELEMENT_HANDLING&&typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements==="boolean"){we.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements}if(Re){Te=false}if(Le){ze=true}if(je){he=T({},D);ge=[];if(je.html===true){T(he,A);T(ge,P)}if(je.svg===true){T(he,_);T(ge,I);T(ge,$)}if(je.svgFilters===true){T(he,C);T(ge,I);T(ge,$)}if(je.mathMl===true){T(he,L);T(ge,O);T(ge,$)}}if(t.ADD_TAGS){if(he===ye){he=S(he)}T(he,t.ADD_TAGS,tt)}if(t.ADD_ATTR){if(ge===be){ge=S(ge)}T(ge,t.ADD_ATTR,tt)}if(t.ADD_URI_SAFE_ATTR){T(Ue,t.ADD_URI_SAFE_ATTR,tt)}if(t.FORBID_CONTENTS){if(Fe===Be){Fe=S(Fe)}T(Fe,t.FORBID_CONTENTS,tt)}if(Oe){he["#text"]=true}if(Ae){T(he,["html","head","body"])}if(he.table){T(he,["tbody"]);delete ve.tbody}if(t.TRUSTED_TYPES_POLICY){if(typeof t.TRUSTED_TYPES_POLICY.createHTML!=="function"){throw v('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.')}if(typeof t.TRUSTED_TYPES_POLICY.createScriptURL!=="function"){throw v('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.')}Q=t.TRUSTED_TYPES_POLICY;ee=Q.createHTML("")}else{if(Q===undefined){Q=Z(N,s)}if(Q!==null&&typeof ee==="string"){ee=Q.createHTML("")}}if(r){r(t)}nt=t};const st=T({},["mi","mo","mn","ms","mtext"]);const at=T({},["foreignobject","desc","title","annotation-xml"]);const lt=T({},["title","style","font","a","script"]);const ct=T({},[..._,...C,...z]);const ft=T({},[...L,...M]);const ut=function e(t){let n=K(t);if(!n||!n.tagName){n={namespaceURI:Ge,tagName:"template"}}const o=m(t.tagName);const i=m(n.tagName);if(!Ve[t.namespaceURI]){return false}if(t.namespaceURI===Xe){if(n.namespaceURI===Ye){return o==="svg"}if(n.namespaceURI===We){return o==="svg"&&(i==="annotation-xml"||st[i])}return Boolean(ct[o])}if(t.namespaceURI===We){if(n.namespaceURI===Ye){return o==="math"}if(n.namespaceURI===Xe){return o==="math"&&at[i]}return Boolean(ft[o])}if(t.namespaceURI===Ye){if(n.namespaceURI===Xe&&!at[i]){return false}if(n.namespaceURI===We&&!st[i]){return false}return!ft[o]&&(lt[o]||!ct[o])}if(Ke==="application/xhtml+xml"&&Ve[t.namespaceURI]){return true}return false};const dt=function e(t){d(n.removed,{element:t});try{t.parentNode.removeChild(t)}catch(e){t.remove()}};const mt=function e(t,o){try{d(n.removed,{attribute:o.getAttributeNode(t),from:o})}catch(e){d(n.removed,{attribute:null,from:o})}o.removeAttribute(t);if(t==="is"&&!ge[t]){if(ze||Le){try{dt(o)}catch(e){}}else{try{o.setAttribute(t,"")}catch(e){}}}};const pt=function e(t){let n=null;let i=null;if(Ce){t="<remove></remove>"+t}else{const e=h(t,/^[\r\n\t ]+/);i=e&&e[0]}if(Ke==="application/xhtml+xml"&&Ge===Ye){t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>"}const r=Q?Q.createHTML(t):t;if(Ge===Ye){try{n=(new B).parseFromString(r,Ke)}catch(e){}}if(!n||!n.documentElement){n=te.createDocument(Ge,"template",null);try{n.documentElement.innerHTML=Ze?ee:r}catch(e){}}const s=n.body||n.documentElement;if(t&&i){s.insertBefore(o.createTextNode(i),s.childNodes[0]||null)}if(Ge===Ye){return ie.call(n,Ae?"html":"body")[0]}return Ae?n.documentElement:s};const ht=function e(t){return ne.call(t.ownerDocument||t,t,E.SHOW_ELEMENT|E.SHOW_COMMENT|E.SHOW_TEXT,null)};const yt=function e(t){return t instanceof F&&(typeof t.nodeName!=="string"||typeof t.textContent!=="string"||typeof t.removeChild!=="function"||!(t.attributes instanceof j)||typeof t.removeAttribute!=="function"||typeof t.setAttribute!=="function"||typeof t.namespaceURI!=="string"||typeof t.insertBefore!=="function"||typeof t.hasChildNodes!=="function")};const gt=function e(t){return typeof k==="function"&&t instanceof k};const bt=function e(t,o,i){if(!se[t]){return}f(se[t],(e=>{e.call(n,o,i,nt)}))};const wt=function e(t){let o=null;bt("beforeSanitizeElements",t,null);if(yt(t)){dt(t);return true}const i=tt(t.nodeName);bt("uponSanitizeElement",t,{tagName:i,allowedTags:he});if(t.hasChildNodes()&&!gt(t.firstElementChild)&&w(/<[/\w]/g,t.innerHTML)&&w(/<[/\w]/g,t.textContent)){dt(t);return true}if(!he[i]||ve[i]){if(!ve[i]&&kt(i)){if(we.tagNameCheck instanceof RegExp&&w(we.tagNameCheck,i)){return false}if(we.tagNameCheck instanceof Function&&we.tagNameCheck(i)){return false}}if(Oe&&!Fe[i]){const e=K(t)||t.parentNode;const n=J(t)||t.childNodes;if(n&&e){const o=n.length;for(let i=o-1;i>=0;--i){e.insertBefore(H(n[i],true),W(t))}}}dt(t);return true}if(t instanceof x&&!ut(t)){dt(t);return true}if((i==="noscript"||i==="noembed"||i==="noframes")&&w(/<\/no(script|embed|frames)/i,t.innerHTML)){dt(t);return true}if(Re&&t.nodeType===3){o=t.textContent;f([ae,le,ce],(e=>{o=y(o,e," ")}));if(t.textContent!==o){d(n.removed,{element:t.cloneNode()});t.textContent=o}}bt("afterSanitizeElements",t,null);return false};const vt=function e(t,n,i){if(De&&(n==="id"||n==="name")&&(i in o||i in ot)){return false}if(Te&&!ke[n]&&w(fe,n));else if(xe&&w(ue,n));else if(!ge[n]||ke[n]){if(kt(t)&&(we.tagNameCheck instanceof RegExp&&w(we.tagNameCheck,t)||we.tagNameCheck instanceof Function&&we.tagNameCheck(t))&&(we.attributeNameCheck instanceof RegExp&&w(we.attributeNameCheck,n)||we.attributeNameCheck instanceof Function&&we.attributeNameCheck(n))||n==="is"&&we.allowCustomizedBuiltInElements&&(we.tagNameCheck instanceof RegExp&&w(we.tagNameCheck,i)||we.tagNameCheck instanceof Function&&we.tagNameCheck(i)));else{return false}}else if(Ue[n]);else if(w(pe,y(i,me,"")));else if((n==="src"||n==="xlink:href"||n==="href")&&t!=="script"&&g(i,"data:")===0&&Ne[t]);else if(Ee&&!w(de,y(i,me,"")));else if(i){return false}else;return true};const kt=function e(t){return t.indexOf("-")>0};const xt=function e(t){bt("beforeSanitizeAttributes",t,null);const{attributes:o}=t;if(!o){return}const i={attrName:"",attrValue:"",keepAttr:true,allowedAttributes:ge};let r=o.length;while(r--){const e=o[r];const{name:s,namespaceURI:a,value:l}=e;const c=tt(s);let d=s==="value"?l:b(l);i.attrName=c;i.attrValue=d;i.keepAttr=true;i.forceKeepAttr=undefined;bt("uponSanitizeAttribute",t,i);d=i.attrValue;if(i.forceKeepAttr){continue}mt(s,t);if(!i.keepAttr){continue}if(!Se&&w(/\/>/i,d)){mt(s,t);continue}if(Re){f([ae,le,ce],(e=>{d=y(d,e," ")}))}const m=tt(t.nodeName);if(!vt(m,c,d)){continue}if(Pe&&(c==="id"||c==="name")){mt(s,t);d=Ie+d}if(Q&&typeof N==="object"&&typeof N.getAttributeType==="function"){if(a);else{switch(N.getAttributeType(m,c)){case"TrustedHTML":{d=Q.createHTML(d);break}case"TrustedScriptURL":{d=Q.createScriptURL(d);break}}}}try{if(a){t.setAttributeNS(a,s,d)}else{t.setAttribute(s,d)}u(n.removed)}catch(e){}}bt("afterSanitizeAttributes",t,null)};const Tt=function e(t){let n=null;const o=ht(t);bt("beforeSanitizeShadowDOM",t,null);while(n=o.nextNode()){bt("uponSanitizeShadowNode",n,null);if(wt(n)){continue}if(n.content instanceof l){e(n.content)}xt(n)}bt("afterSanitizeShadowDOM",t,null)};n.sanitize=function(e){let t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};let o=null;let r=null;let s=null;let a=null;Ze=!e;if(Ze){e="\x3c!--\x3e"}if(typeof e!=="string"&&!gt(e)){if(typeof e.toString==="function"){e=e.toString();if(typeof e!=="string"){throw v("dirty is not a string, aborting")}}else{throw v("toString is not a function")}}if(!n.isSupported){return e}if(!_e){rt(t)}n.removed=[];if(typeof e==="string"){$e=false}if($e){if(e.nodeName){const t=tt(e.nodeName);if(!he[t]||ve[t]){throw v("root node is forbidden and cannot be sanitized in-place")}}}else if(e instanceof k){o=pt("\x3c!----\x3e");r=o.ownerDocument.importNode(e,true);if(r.nodeType===1&&r.nodeName==="BODY"){o=r}else if(r.nodeName==="HTML"){o=r}else{o.appendChild(r)}}else{if(!ze&&!Re&&!Ae&&e.indexOf("<")===-1){return Q&&Me?Q.createHTML(e):e}o=pt(e);if(!o){return ze?null:Me?ee:""}}if(o&&Ce){dt(o.firstChild)}const c=ht($e?e:o);while(s=c.nextNode()){if(wt(s)){continue}if(s.content instanceof l){Tt(s.content)}xt(s)}if($e){return e}if(ze){if(Le){a=oe.call(o.ownerDocument);while(o.firstChild){a.appendChild(o.firstChild)}}else{a=o}if(ge.shadowroot||ge.shadowrootmode){a=re.call(i,a,true)}return a}let u=Ae?o.outerHTML:o.innerHTML;if(Ae&&he["!doctype"]&&o.ownerDocument&&o.ownerDocument.doctype&&o.ownerDocument.doctype.name&&w(X,o.ownerDocument.doctype.name)){u="<!DOCTYPE "+o.ownerDocument.doctype.name+">\n"+u}if(Re){f([ae,le,ce],(e=>{u=y(u,e," ")}))}return Q&&Me?Q.createHTML(u):u};n.setConfig=function(){let e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};rt(e);_e=true};n.clearConfig=function(){nt=null;_e=false};n.isValidAttribute=function(e,t,n){if(!nt){rt({})}const o=tt(e);const i=tt(t);return vt(o,i,n)};n.addHook=function(e,t){if(typeof t!=="function"){return}se[e]=se[e]||[];d(se[e],t)};n.removeHook=function(e){if(se[e]){return u(se[e])}};n.removeHooks=function(e){if(se[e]){se[e]=[]}};n.removeAllHooks=function(){se={}};return n}var J=V();return J}))})(D);const P=D.exports;const I=":host{display:inline-grid;overflow:hidden;width:100%}.view-email{width:100%}.view-email div.gmail_quote{display:none;color:var(--nylas-color-primary-400)}.view-email div.gmail_quote.show{display:block}.view-email blockquote{border-color:var(--nylas-color-primary-500) !important}.view-email .nylas-view-email-toggle-button{display:flex;justify-content:center;align-items:center;cursor:pointer;background-color:var(--nylas-color-primary-200);color:var(--nylas-color-primary-600);border:0;border-radius:2px;font-size:14px;font-weight:500;line-height:1.5;transition:all 0.2s ease-in-out}.view-email .nylas-view-email-toggle-button:hover{background-color:var(--nylas-color-primary-200);color:var(--nylas-color-primary-600)}";const O=I;P.addHook("afterSanitizeAttributes",(function(e){if("target"in e){e.setAttribute("target","_blank");e.setAttribute("rel","noopener")}}));const $=class{constructor(t){e(this,t);this.htmlElement=document.createElement("html");this.setBody=e=>{this.state="loading";this.styles=[];this.hoistedFontURLs=new Map;this.sanitizedBody="";document.querySelectorAll(".nylas-view-email-font").forEach((e=>{e.remove()}));const t=this.message?l(this.message):c(e);if(!t){e=`<html><body>${f(e)}</body></html>`}this.htmlElement.innerHTML=e;if(this.detectDarkMode){M(this.htmlElement)}this.htmlElement.querySelectorAll("link").forEach((e=>{console.debug(`[nylas-view-email] Hoisting link: ${e.getAttribute("href")}`);if(e.getAttribute("rel")==="stylesheet"&&e.getAttribute("href")){const t=e.getAttribute("href");if(t){const e=new URL(t,window.location.href);if(e.protocol==="https:"||e.protocol==="http:"){this.hoistedFontURLs.set(e.href,e.href)}}}}));this.htmlElement.querySelectorAll("style").forEach((e=>{e.innerHTML.split("\n").forEach((e=>{const t=e.match(/@import url\((.*)\)/);if(t){const e=new URL(t[1],window.location.href);if(e.protocol==="https:"||e.protocol==="http:"){this.hoistedFontURLs.set(e.href,e.href)}}}));e.innerHTML=e.innerHTML.replace("body",":host");this.styles.push(e);e.remove()}));this.htmlElement.querySelectorAll("a").forEach((e=>{e.setAttribute("target","_blank")}));const n=this.htmlElement.querySelector(".gmail_quote");if(n){const e=document.createElement("button");e.classList.add("nylas-view-email-toggle-button");e.setAttribute("aria-label","Show quoted text");e.innerText="...";n.parentElement?.insertBefore(e,n)}this.sanitizedBody=P.sanitize(this.htmlElement.innerHTML);this.hoistedFontURLs.forEach(((e,t)=>{const n=document.createElement("link");n.setAttribute("rel","stylesheet");n.setAttribute("href",e);n.classList.add("nylas-view-email-font");document.head.appendChild(n)}));this.state="ready"};this.handleMobileSize=()=>{const e=Math.max(document.documentElement.clientWidth||0,window.innerWidth||0);if(e<=768){const t=this.viewEmailElement?.getBoundingClientRect();if(t&&this.viewEmailElement&&this.parent){if(t.width>e){const e=this.parent;const n=e?.getBoundingClientRect();s("Parent width:",n?.width,"Parent height:",n?.height);s("Parent client width:",e.clientWidth,"Parent client height:",e.clientHeight);const o=n.width/t.width;const i=n.height/t.height;const r=Math.min(o,i);s("Scale:",r);this.viewEmailElement.style.setProperty("transform",`scale(${r})`);this.viewEmailElement.style.setProperty("transform-origin",`top left`);this.viewEmailElement.style.setProperty("height",`${t.height*r}px`)}}}else{this.viewEmailElement?.style.removeProperty("transform");this.viewEmailElement?.style.removeProperty("transform-origin");this.viewEmailElement?.style.removeProperty("height")}};this.message=undefined;this.parent=undefined;this.attachments=[];this.detectDarkMode=true;this.state="loading";this.sanitizedBody="";this.styles=[];this.viewEmailElement=undefined;this.hoistedFontURLs=new Map}connectedCallback(){}disconnectedCallback(){s(`[nylas-view-email] Component disconnected`);this.state="loading";this.styles=[];this.hoistedFontURLs=new Map;this.sanitizedBody="";document.querySelectorAll(".nylas-view-email-font").forEach((e=>{e.remove()}))}async componentWillLoad(){s(`[nylas-view-email] component loaded`);this.setBody(this.message?.body??"")}async componentDidLoad(){s(`[nylas-view-thread] Component did load`);this.handleMobileSize()}async messageChanged(){s(`[nylas-view-thread] Message changed`,{message:this.message});this.setBody(this.message?.body??"")}handleScroll(){this.handleMobileSize()}viewEmailElementChanged(){const e=this.viewEmailElement?.querySelectorAll(".nylas-view-email-toggle-button");if(e){e.forEach((e=>{e.addEventListener("click",(()=>{const e=this.viewEmailElement?.querySelector(".gmail_quote");if(e){e.classList.toggle("show")}}))}))}}render(){console.debug(`[nylas-view-email] render`,{hoistedFontURLs:this.hoistedFontURLs});return t(o,{key:"4f0a1e688ae465d65943adc7dabac9cad6c62fe8"},this.state==="loading"&&t("div",null,"Loading..."),this.state==="ready"&&t(r,null,this.styles.map((e=>t("style",null,P.sanitize(e.innerHTML)))),t("div",{class:"view-email",part:"view-email",innerHTML:this.sanitizedBody,ref:e=>this.viewEmailElement=e})))}get host(){return i(this)}static get watchers(){return{message:["messageChanged"],viewEmailElement:["viewEmailElementChanged"]}}};$.style=O;const j=".sc-reply-all-icon-h{display:flex}";const F=j;const B=class{constructor(t){e(this,t);this.width="15";this.height="15"}render(){return t("svg",{key:"5473055eb158788f0e5c29e437f68bc42975f443",fill:"auto",width:this.width,height:this.height,viewBox:"0 0 1920 1920",xmlns:"http://www.w3.org/2000/svg"},t("path",{key:"8a27d6646e2807edce6b308ebfaa17e7e71c7ce7",d:"m1030.975 188 81.249 81.249-429.228 429.228h300.747c516.223 0 936.257 420.034 936.257 936.257v98.028h-114.92v-98.028c0-452.901-368.436-821.337-821.337-821.337H682.996l429.228 429.229-81.25 81.248-567.936-567.937L1030.975 188Zm-463.038.011 81.249 81.25-486.688 486.688 486.688 486.688-81.249 81.249L0 755.949 567.937 188.01Z","fill-rule":"evenodd"}))}};B.style=F;const N=".sc-reply-icon-h{display:flex}";const q=N;const U=class{constructor(t){e(this,t);this.width="15";this.height="15"}render(){return t("svg",{key:"fe3dcd629d521170b57ee467fc46c2cded6b74da",fill:"auto",width:this.width,height:this.height,viewBox:"0 0 1920 1920",xmlns:"http://www.w3.org/2000/svg"},t("path",{key:"8b71c92d370bd5038c286aeab7b145a9095f0f80",d:"M835.942 632.563H244.966l478.08-478.08-90.496-90.496L-.026 696.563 632.55 1329.14l90.496-90.496-478.08-478.08h590.976c504.448 0 914.816 410.368 914.816 914.816v109.184h128V1675.38c0-574.976-467.84-1042.816-1042.816-1042.816","fill-rule":"evenodd"}))}};U.style=q;export{h as forward_icon,b as nylas_composer,T as nylas_summarize_message_button,$ as nylas_view_email,B as reply_all_icon,U as reply_icon};
|
|
3
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as e,h as t,c as n,H as o,a as i,F as r}from"./p-68c2fadf.js";import{a as s,j as a,k as l,l as c,p as f}from"./p-ad7cf473.js";import{R as u}from"./p-f0f3f350.js";import{c as d}from"./p-cb65c223.js";const m=".sc-forward-icon-h{display:flex}";const p=m;const h=class{constructor(t){e(this,t);this.width="15";this.height="15"}render(){return t("svg",{key:"c3c406f225989a53006d7deef67a2dd8dd3d5d81",fill:"auto",width:this.width,height:this.height,viewBox:"0 0 1920 1920",xmlns:"http://www.w3.org/2000/svg"},t("path",{key:"be9eae8233d00a07dd1501d7daf45f51d6049908",d:"m1246.246 64-90.496 90.496 477.952 477.952h-590.848C467.878 632.448.038 1100.416.038 1675.392v109.056h128v-109.056c0-504.576 410.368-914.944 914.816-914.944h590.848l-477.952 478.08 90.496 90.496 632.448-632.576L1246.246 64Z","fill-rule":"evenodd"}))}};h.style=p;const y=':host{display:grid;color:var(--nylas-color-primary-900)}.editor{position:relative;display:block;max-height:300px;overflow:auto;padding:1rem;border:1px solid var(--nylas-color-primary-300)}.editor blockquote{visibility:hidden;overflow:hidden;position:relative;transition:height 0.3s ease;margin:0}.editor blockquote::before{content:"...";visibility:visible;opacity:1;position:absolute;top:0;left:0;background-color:var(--nylas-color-primary-300);width:20px;text-align:center;color:var(--nylas-color-primary-800);vertical-align:middle;display:flex;justify-content:center;align-items:center;align-self:center;cursor:pointer}.editor .collapsed{height:20px}.editor .expanded{visibility:visible;opacity:1;height:auto;margin:0px 0px 0px 0.8ex;border-left:1px solid var(--nylas-color-primary-300);padding-left:1rem}.editor .expanded::before{display:none;}.buttons{display:flex;margin-top:1rem;justify-content:space-between}.buttons sp-button{border-radius:var(--nylas-border-radius);background-color:var(--nylas-color-primary-400);color:var(--nylas-color-primary-900);fill:var(--nylas-color-primary-900)}.buttons sp-button:hover{background-color:var(--nylas-color-primary-500)}.buttons sp-button:disabled{background-color:var(--nylas-color-primary-200);color:var(--nylas-color-primary-600);cursor:not-allowed}.buttons sp-button chevron-icon{display:inline-block}.buttons .close{justify-self:end}.toolbar{position:absolute;display:none;background-color:var(--nylas-color-primary-200);border-radius:var(--nylas-border-radius);z-index:1}.toolbar sp-button{border:0}';const g=y;const b=class{constructor(t){e(this,t);this.close=n(this,"close",7);this.send=n(this,"send",7);this.closeComposer=e=>{this.close.emit(e)};this.sendComposer=e=>{if(!this.editorEl){s("no editor element");return}const t=this.editorEl.querySelector(".message-body");if(!t){s("no message body");return}if(this.message){this.send.emit({message:this.message,replyBody:t.querySelector(".message-body")?.innerHTML||""});this.close.emit(e);this.editorEl.innerHTML=""}};this.message=undefined;this.viewEmailElement=undefined}connectedCallback(){}disconnectedCallback(){if(this.editorEl){this.editorEl.innerHTML=""}}componentWillLoad(){}async componentDidLoad(){if(this.message){this.watchBody(this.message)}if(!this.editorEl){s("[connectedCallback] no editor element");return}if(!this.toolbarEl){s("[connectedCallback] no toolbar element");return}const e=this.editorEl;const t=this.toolbarEl;e.addEventListener("mouseup",(n=>{const o=this.host.shadowRoot?.getSelection();if(!o){s("no selection");return}const i=o.getRangeAt(0);const r=o.toString();if(!r){t.style.display="none";return}const a=e.querySelector(".message-body");if(!a){s("no message body");return}const l=i.commonAncestorContainer;const c=l.parentElement;if(!c){return}const f=a.getBoundingClientRect();s("messageBodyRect",{messageBodyRect:f});const u=c.getBoundingClientRect();s("foundRect",{foundRect:u});const d=c.childNodes[0];const m=d.textContent||"";const p=m.indexOf(r);const h=window.getComputedStyle(c).fontSize;const y=parseInt(h.replace("px",""),10);const g=u.top-f.top-t.clientHeight;const b=p*(1/y)*100;t.style.top=`${g}px`;t.style.left=`${b}px`;t.style.display="block"}))}watchBody(e){if(!this.editorEl){s("no editor element");return}this.editorEl.querySelectorAll(".message-body").forEach((e=>e.remove()));const t=document.createElement("div");t.classList.add("message-body");const n=document.createElement("p");n.innerHTML=" ";t.appendChild(n);const o=document.createElement("br");t.appendChild(o);const i=document.createElement("div");i.classList.add("reply-text");i.innerText=`On ${new Date(e.date*1e3).toLocaleDateString(undefined,{dateStyle:"full"})} <${e.from?.map((e=>e.name||e.email)).join(", ")}> wrote:`;t.appendChild(i);if(e.body){const n=document.createElement("html");n.innerHTML=e.body;const o=document.createElement("blockquote");o.classList.add("collapsed");o.classList.add("gmail_quote");o.innerHTML=n.innerHTML;t.appendChild(o);s("replyContainer",{replyContainer:o})}this.editorEl.appendChild(t);this.editorEl.querySelectorAll("blockquote.collapsed").forEach((e=>{e.addEventListener("click",(function(e){e.preventDefault();const t=e.target;t.classList.remove("collapsed");t.classList.add("expanded")}),{once:true})}));this.editorEl.focus()}render(){return t(o,{key:"8d7f9c145099757c2a8dc48f1d2a223831f82cda"},t("sp-theme",{key:"e92e457e86701838f55d97b3f2c1c0f70f14bf59",scale:"medium",color:"dark"},t("div",{key:"50eba2b6ee0c84d8eeb392385872604b74b11025",class:"editor",contentEditable:true,ref:e=>this.editorEl=e},t("div",{key:"38bdd2ec58e62699e2c604b1b2c586cb5ecf105a",class:"toolbar",ref:e=>this.toolbarEl=e,contentEditable:false},t("sp-button",{key:"6415e5f9910a2d9798e7c85162329f359e500aeb",quiet:true,onClick:()=>document.execCommand("bold")},t("div",{key:"e03cfe0f5736836f64aa350165fa519508e212f7",slot:"icon"},t("bold-icon",{key:"1ad03230cff2f0843d6da22153716c3818ed04f7"})),t("div",{key:"d90c50aff88b9ac7774d6792b91ea3ced21f4419",slot:"label"},"Bold")),t("sp-button",{key:"466621fcdf2e8e1e85b613bba82b948ed2177a88",quiet:true,onClick:()=>document.execCommand("underline")},t("div",{key:"6be0737cf685b02f3ee8ef7c34fd18674793af00",slot:"icon"},t("underline-icon",{key:"278b1b79d3aec25ab2c2181c3e5c631063b04e29"})),t("div",{key:"169d3039815082e208eb476b4490181f7eb54ee6",slot:"label"},"Underline")),t("sp-button",{key:"92c20b2d03b709f08c63af3a1e88b10e407243d7",quiet:true,onClick:()=>document.execCommand("italic")},t("div",{key:"67eb3d5b5a2118d90bfb81c7b51d52c41b5ab2a2",slot:"icon"},t("italic-icon",{key:"35ac96f9ff3f3f0c38c7e486092f42dc9451eb63"})),t("div",{key:"f29fe84363cca6e178a3651a1c8e56929ebb3e32",slot:"label"},"Italic")))),t("div",{key:"3d89b191642ab291fc338ffd66be16fe999950b1",class:"buttons"},t("sp-button",{key:"f78c122acf4c69c788d411d2dcfd49649c99919e",onClick:this.sendComposer,class:"send"},"Send"),t("sp-button",{key:"b46873c911cb796e9af22eb7d19bf6e1cd2cd1be",onClick:this.closeComposer,class:"close"},"Close"))))}get host(){return i(this)}static get watchers(){return{message:["watchBody"]}}};b.style=g;const w=":host{display:block}sp-button{padding:0;border:0;border-radius:var(--nylas-border-radius);min-block-size:50%;min-inline-size:2rem;background-color:var(--nylas-color-primary-300);fill:var(--nylas-color-primary-800)}sp-button:hover{background-color:var(--nylas-color-primary-400)}.summarize-button.stopped{animation:none}.summarize-button.playing{animation:pulse 2s infinite}.summarize-button.loading{display:flex;align-content:center;height:1.5rem;width:2rem;vertical-align:middle;animation:pulse 2s infinite;flex-wrap:wrap}.summarize-button.loading loading-icon{--dot-color:var(--nylas-color-primary-600)}@keyframes pulse{0%{transform:scale(1);box-shadow:0 0 0 0 var(--nylas-color-primary-300)}70%{transform:scale(1.05);box-shadow:0 0 0 10px rgba(255, 69, 0, 0)}100%{transform:scale(1);box-shadow:0 0 0 0 rgba(255, 69, 0, 0)}}@keyframes wave{0%{transform:translateX(0)}50%{transform:translateX(100%)}100%{transform:translateX(0)}}";const v=w;var k=undefined&&undefined.__decorate||function(e,t,n,o){var i=arguments.length,r=i<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,n):o,s;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;a>=0;a--)if(s=e[a])r=(i<3?s(r):i>3?s(t,n,r):s(t,n))||r;return i>3&&r&&Object.defineProperty(t,n,r),r};var x=undefined&&undefined.__metadata||function(e,t){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(e,t)};const T=class{constructor(t){e(this,t);this.summarize=n(this,"summarize",7);this.abortController=new AbortController;this.onClick=async e=>{e.preventDefault();e.stopPropagation();if(this.state==="stopped"){if(this.message){this.abortController=new AbortController;const e=this.summarize.emit({abortController:this.abortController,playAudio:this.playAudio,message:this.message,updateState:this.updateState});if(!e.defaultPrevented){s(`[nylas-summarize-message-button] Default event not prevented, summarizing message`);if(this.audioRef){await this.audioRef.play().then((()=>this.audioRef?.pause())).catch((e=>console.error("Error playing audio:",e)));await this.audioRef.play().catch((e=>console.error("Error playing audio:",e)))}}}}else if(this.state==="playing"){this.abortController?.abort();this.audioRef?.pause()}else{this.state="stopped"}};this.message=undefined;this.state="stopped";this.playAudio=this.playAudio.bind(this);this.updateState=this.updateState.bind(this)}connectedCallback(){}disconnectedCallback(){}async componentWillLoad(){s(`[nylas-summarize-message-button] Component will load`)}async componentDidLoad(){s(`[nylas-summarize-message-button] Component did load`)}async updateState(e){this.state=e}async playAudio(e){if(!this.audioRef){this.state="stopped";return}if(!e){this.state="stopped";return}const t=this.audioRef;if(!("MediaSource"in window)){const n=await e;if(n==null){throw new Error("ReadableStream not yet supported in this browser.")}const o=n.getReader();const i=[];await this.readChunk(o,i);const r=new Blob(i,{type:"audio/mpeg"});const s=URL.createObjectURL(r);t.src=s;return}const n=new MediaSource;let o;let i=false;t.src=URL.createObjectURL(n);n.addEventListener("sourceopen",r);async function r(){o=n.addSourceBuffer("audio/mpeg");o.addEventListener("updateend",a);const r=await e;if(r==null){throw new Error("ReadableStream not yet supported in this browser.")}const s=r.getReader();const l=()=>{s.read().then((({done:e,value:t})=>{if(e){i=true;return}if(!o.updating){o.appendBuffer(t)}l()})).catch((e=>{console.error("Error while fetching and appending chunks:",e)}))};l();if(t.paused){t.play().catch((e=>console.error("Error playing audio:",e)))}}function a(){if(i){n.endOfStream();n.removeEventListener("sourceopen",r);n.removeEventListener("sourceclose",(()=>{s(`[nylas-summarize-message-button] Source closed`)}));o.removeEventListener("updateend",a);return}}}async readChunk(e,t){return e.read().then((({done:n,value:o})=>{if(n){return t}t.push(o);return this.readChunk(e,t)}))}render(){return t(o,{key:"09d693158ce9480c000957afe31566d47f6fb5f2"},t("sp-theme",{key:"21f246783a3d5786c1cee8f438e89947ee5f574d",scale:"medium",color:"dark"},t("sp-button",{key:"7ef9c60895da162d3b521ddc7c070ff463e51094",label:"Summarize email","icon-only":true,onClickCapture:this.onClick,class:{"summarize-button":true,stopped:this.state==="stopped",loading:this.state==="loading",playing:this.state==="playing"}},this.state==="stopped"&&t("play-icon",null),this.state==="loading"&&t("loading-icon",null),this.state==="playing"&&t("stop-icon",null)),t("audio",{key:"7481ceeb62b6eb21c627d0e04be0e0e7a9e986ec",ref:e=>this.audioRef=e,autoPlay:true,onPlaying:()=>this.state="playing",onPause:()=>this.state="stopped",onEnded:()=>{this.state="stopped";s(`[nylas-summarize-message-button] Audio ended`)}})))}};k([u({name:"nylas-summarize-message-button",eventToProps:{summarize:async(e,t)=>{const{playAudio:n,updateState:o,abortController:i,message:r}=e.detail;const s=a(r.body||"");await o("loading");try{const e=await t.messages.summarizeText(s);const o=t.messages.textToSpeech(e,i);await n(o)}catch(e){await o("stopped");console.error("Error summarizing message:",e)}}},fireRegisterEvent:true}),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],T.prototype,"render",null);T.style=v;function E(e){if(!window.matchMedia("(prefers-color-scheme: dark)").matches){return e}if(!e){return e}if(e==="transparent"){return"color"}if(e.startsWith("#")){return S(e)}if(e.startsWith("rgb")){return R(e)}if(e.startsWith("hsl")){return A(e)}if(_(e)){return C(e)}return e}function S(e){if(e.length<7){e="#"+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]}const t=(255-parseInt(e.slice(1,3),16)).toString(16).padStart(2,"0");const n=(255-parseInt(e.slice(3,5),16)).toString(16).padStart(2,"0");const o=(255-parseInt(e.slice(5,7),16)).toString(16).padStart(2,"0");return`#${t}${n}${o}`}function R(e){const t=e.match(/\d+/g)?.map(Number);if(!t){return e}const[n,o,i]=t;return`rgb(${255-n}, ${255-o}, ${255-i})`}function A(e){const t=e.match(/\d+\.?\d*/g)?.map(Number);if(!t){return e}const[n,o,i]=t;return`hsl(${n}, ${o}%, ${100-i}%)`}function _(e){return/^[a-z]+$/i.test(e)}function C(e){return R(z(e))}function z(e){if(e.toLowerCase()==="red"){return"rgb(255, 0, 0)"}return"rgb(0, 0, 0)"}function L(e){if(e instanceof HTMLStyleElement){let t=e.textContent;if(t){t=t.replaceAll(/@media\s*\(prefers-color-scheme:\s*(dark|light)\)\s*\{([^}]+)\}/g,"");const n=t.matchAll(/border-color:\s*([^;]+)/g);if(n){for(const e of n){const[n,o]=e;const i=n.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&");t=t.replaceAll(i,n.replace(o,E(o)))}}const o=t.matchAll(/border:\s*([^;]+)/g);if(o){for(const e of o){const n=e[0].trim();const o=n.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&");const[i,r,s]=e[1].split(" ");t=t.replaceAll(o,n.replace(s,E(s)))}}const i=t.matchAll(/background-color:\s*([^;]+)/g);if(i){for(const e of i){const[n,o]=e;const i=n.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&");t=t.replaceAll(i,n.replace(o,E(o)));s("backgroundColor",{fullMatch:n,replace:n.replace(o,E(o)),color:o,invertColor:E(o)})}}const r=t.matchAll(/background:\s*([^;]+)/g);if(r){for(const e of r){const n=e[0].trim();const o=n.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&");const[i,r,s]=e[1].split(" ");t=t.replaceAll(o,n.replace(s,E(s)))}}const a=t.matchAll(/color:\s*([^;]+)/g);if(a){for(const e of a){const[n,o]=e;const i=n.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&");t=t.replaceAll(i,n.replace(o,E(o)))}}e.textContent=t}}if(e instanceof HTMLElement){const t=window.getComputedStyle(e);const n=t.color||e.style.color;const o=t.backgroundColor||e.style.backgroundColor;const i=t.borderColor||e.style.borderColor;if(n&&!o){e.style.color=""}else if(n&&o){e.style.color=E(n);e.style.backgroundColor=E(o);s("element",e);s("computedStyle.color",n);s("computedStyle.backgroundColor",o);s("invertColor(color)",E(n));s("invertColor(backgroundColor)",E(o))}else if(!n&&o){e.style.backgroundColor=""}if(i){s("borderColor",i);e.style.borderColor=E(i)}if(e.hasAttribute("bgcolor")){e.removeAttribute("bgcolor")}}}function M(e){L(e);const t=e.querySelectorAll("*");t.forEach((e=>L(e)))}var D={exports:{}};
|
|
2
|
+
/*! @license DOMPurify 3.0.8 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.8/LICENSE */(function(e,t){(function(t,n){e.exports=n()})(d,(function(){const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:o,getOwnPropertyDescriptor:i}=Object;let{freeze:r,seal:s,create:a}=Object;let{apply:l,construct:c}=typeof Reflect!=="undefined"&&Reflect;if(!r){r=function e(t){return t}}if(!s){s=function e(t){return t}}if(!l){l=function e(t,n,o){return t.apply(n,o)}}if(!c){c=function e(t,n){return new t(...n)}}const f=k(Array.prototype.forEach);const u=k(Array.prototype.pop);const d=k(Array.prototype.push);const m=k(String.prototype.toLowerCase);const p=k(String.prototype.toString);const h=k(String.prototype.match);const y=k(String.prototype.replace);const g=k(String.prototype.indexOf);const b=k(String.prototype.trim);const w=k(RegExp.prototype.test);const v=x(TypeError);function k(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++){o[i-1]=arguments[i]}return l(e,t,o)}}function x(e){return function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++){n[o]=arguments[o]}return c(e,n)}}function T(e,o){let i=arguments.length>2&&arguments[2]!==undefined?arguments[2]:m;if(t){t(e,null)}let r=o.length;while(r--){let t=o[r];if(typeof t==="string"){const e=i(t);if(e!==t){if(!n(o)){o[r]=e}t=e}}e[t]=true}return e}function E(e){for(let t=0;t<e.length;t++){if(i(e,t)===undefined){e[t]=null}}return e}function S(t){const n=a(null);for(const[o,r]of e(t)){if(i(t,o)!==undefined){if(Array.isArray(r)){n[o]=E(r)}else if(r&&typeof r==="object"&&r.constructor===Object){n[o]=S(r)}else{n[o]=r}}}return n}function R(e,t){while(e!==null){const n=i(e,t);if(n){if(n.get){return k(n.get)}if(typeof n.value==="function"){return k(n.value)}}e=o(e)}function n(e){console.warn("fallback value for",e);return null}return n}const A=r(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]);const _=r(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]);const C=r(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]);const z=r(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]);const L=r(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]);const M=r(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]);const D=r(["#text"]);const P=r(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]);const I=r(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]);const O=r(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]);const $=r(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]);const j=s(/\{\{[\w\W]*|[\w\W]*\}\}/gm);const F=s(/<%[\w\W]*|[\w\W]*%>/gm);const B=s(/\${[\w\W]*}/gm);const N=s(/^data-[\-\w.\u00B7-\uFFFF]/);const q=s(/^aria-[\-\w]+$/);const U=s(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i);const H=s(/^(?:\w+script|data):/i);const W=s(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g);const X=s(/^html$/i);var Y=Object.freeze({__proto__:null,MUSTACHE_EXPR:j,ERB_EXPR:F,TMPLIT_EXPR:B,DATA_ATTR:N,ARIA_ATTR:q,IS_ALLOWED_URI:U,IS_SCRIPT_OR_DATA:H,ATTR_WHITESPACE:W,DOCTYPE_NAME:X});const G=function e(){return typeof window==="undefined"?null:window};const Z=function e(t,n){if(typeof t!=="object"||typeof t.createPolicy!=="function"){return null}let o=null;const i="data-tt-policy-suffix";if(n&&n.hasAttribute(i)){o=n.getAttribute(i)}const r="dompurify"+(o?"#"+o:"");try{return t.createPolicy(r,{createHTML(e){return e},createScriptURL(e){return e}})}catch(e){console.warn("TrustedTypes policy "+r+" could not be created.");return null}};function V(){let t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:G();const n=e=>V(e);n.version="3.0.8";n.removed=[];if(!t||!t.document||t.document.nodeType!==9){n.isSupported=false;return n}let{document:o}=t;const i=o;const s=i.currentScript;const{DocumentFragment:l,HTMLTemplateElement:c,Node:k,Element:x,NodeFilter:E,NamedNodeMap:j=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:F,DOMParser:B,trustedTypes:N}=t;const q=x.prototype;const H=R(q,"cloneNode");const W=R(q,"nextSibling");const J=R(q,"childNodes");const K=R(q,"parentNode");if(typeof c==="function"){const e=o.createElement("template");if(e.content&&e.content.ownerDocument){o=e.content.ownerDocument}}let Q;let ee="";const{implementation:te,createNodeIterator:ne,createDocumentFragment:oe,getElementsByTagName:ie}=o;const{importNode:re}=i;let se={};n.isSupported=typeof e==="function"&&typeof K==="function"&&te&&te.createHTMLDocument!==undefined;const{MUSTACHE_EXPR:ae,ERB_EXPR:le,TMPLIT_EXPR:ce,DATA_ATTR:fe,ARIA_ATTR:ue,IS_SCRIPT_OR_DATA:de,ATTR_WHITESPACE:me}=Y;let{IS_ALLOWED_URI:pe}=Y;let he=null;const ye=T({},[...A,..._,...C,...L,...D]);let ge=null;const be=T({},[...P,...I,...O,...$]);let we=Object.seal(a(null,{tagNameCheck:{writable:true,configurable:false,enumerable:true,value:null},attributeNameCheck:{writable:true,configurable:false,enumerable:true,value:null},allowCustomizedBuiltInElements:{writable:true,configurable:false,enumerable:true,value:false}}));let ve=null;let ke=null;let xe=true;let Te=true;let Ee=false;let Se=true;let Re=false;let Ae=false;let _e=false;let Ce=false;let ze=false;let Le=false;let Me=false;let De=true;let Pe=false;const Ie="user-content-";let Oe=true;let $e=false;let je={};let Fe=null;const Be=T({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ne=null;const qe=T({},["audio","video","img","source","image","track"]);let Ue=null;const He=T({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]);const We="http://www.w3.org/1998/Math/MathML";const Xe="http://www.w3.org/2000/svg";const Ye="http://www.w3.org/1999/xhtml";let Ge=Ye;let Ze=false;let Ve=null;const Je=T({},[We,Xe,Ye],p);let Ke=null;const Qe=["application/xhtml+xml","text/html"];const et="text/html";let tt=null;let nt=null;const ot=o.createElement("form");const it=function e(t){return t instanceof RegExp||t instanceof Function};const rt=function e(){let t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};if(nt&&nt===t){return}if(!t||typeof t!=="object"){t={}}t=S(t);Ke=Qe.indexOf(t.PARSER_MEDIA_TYPE)===-1?et:t.PARSER_MEDIA_TYPE;tt=Ke==="application/xhtml+xml"?p:m;he="ALLOWED_TAGS"in t?T({},t.ALLOWED_TAGS,tt):ye;ge="ALLOWED_ATTR"in t?T({},t.ALLOWED_ATTR,tt):be;Ve="ALLOWED_NAMESPACES"in t?T({},t.ALLOWED_NAMESPACES,p):Je;Ue="ADD_URI_SAFE_ATTR"in t?T(S(He),t.ADD_URI_SAFE_ATTR,tt):He;Ne="ADD_DATA_URI_TAGS"in t?T(S(qe),t.ADD_DATA_URI_TAGS,tt):qe;Fe="FORBID_CONTENTS"in t?T({},t.FORBID_CONTENTS,tt):Be;ve="FORBID_TAGS"in t?T({},t.FORBID_TAGS,tt):{};ke="FORBID_ATTR"in t?T({},t.FORBID_ATTR,tt):{};je="USE_PROFILES"in t?t.USE_PROFILES:false;xe=t.ALLOW_ARIA_ATTR!==false;Te=t.ALLOW_DATA_ATTR!==false;Ee=t.ALLOW_UNKNOWN_PROTOCOLS||false;Se=t.ALLOW_SELF_CLOSE_IN_ATTR!==false;Re=t.SAFE_FOR_TEMPLATES||false;Ae=t.WHOLE_DOCUMENT||false;ze=t.RETURN_DOM||false;Le=t.RETURN_DOM_FRAGMENT||false;Me=t.RETURN_TRUSTED_TYPE||false;Ce=t.FORCE_BODY||false;De=t.SANITIZE_DOM!==false;Pe=t.SANITIZE_NAMED_PROPS||false;Oe=t.KEEP_CONTENT!==false;$e=t.IN_PLACE||false;pe=t.ALLOWED_URI_REGEXP||U;Ge=t.NAMESPACE||Ye;we=t.CUSTOM_ELEMENT_HANDLING||{};if(t.CUSTOM_ELEMENT_HANDLING&&it(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)){we.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck}if(t.CUSTOM_ELEMENT_HANDLING&&it(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)){we.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck}if(t.CUSTOM_ELEMENT_HANDLING&&typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements==="boolean"){we.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements}if(Re){Te=false}if(Le){ze=true}if(je){he=T({},D);ge=[];if(je.html===true){T(he,A);T(ge,P)}if(je.svg===true){T(he,_);T(ge,I);T(ge,$)}if(je.svgFilters===true){T(he,C);T(ge,I);T(ge,$)}if(je.mathMl===true){T(he,L);T(ge,O);T(ge,$)}}if(t.ADD_TAGS){if(he===ye){he=S(he)}T(he,t.ADD_TAGS,tt)}if(t.ADD_ATTR){if(ge===be){ge=S(ge)}T(ge,t.ADD_ATTR,tt)}if(t.ADD_URI_SAFE_ATTR){T(Ue,t.ADD_URI_SAFE_ATTR,tt)}if(t.FORBID_CONTENTS){if(Fe===Be){Fe=S(Fe)}T(Fe,t.FORBID_CONTENTS,tt)}if(Oe){he["#text"]=true}if(Ae){T(he,["html","head","body"])}if(he.table){T(he,["tbody"]);delete ve.tbody}if(t.TRUSTED_TYPES_POLICY){if(typeof t.TRUSTED_TYPES_POLICY.createHTML!=="function"){throw v('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.')}if(typeof t.TRUSTED_TYPES_POLICY.createScriptURL!=="function"){throw v('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.')}Q=t.TRUSTED_TYPES_POLICY;ee=Q.createHTML("")}else{if(Q===undefined){Q=Z(N,s)}if(Q!==null&&typeof ee==="string"){ee=Q.createHTML("")}}if(r){r(t)}nt=t};const st=T({},["mi","mo","mn","ms","mtext"]);const at=T({},["foreignobject","desc","title","annotation-xml"]);const lt=T({},["title","style","font","a","script"]);const ct=T({},[..._,...C,...z]);const ft=T({},[...L,...M]);const ut=function e(t){let n=K(t);if(!n||!n.tagName){n={namespaceURI:Ge,tagName:"template"}}const o=m(t.tagName);const i=m(n.tagName);if(!Ve[t.namespaceURI]){return false}if(t.namespaceURI===Xe){if(n.namespaceURI===Ye){return o==="svg"}if(n.namespaceURI===We){return o==="svg"&&(i==="annotation-xml"||st[i])}return Boolean(ct[o])}if(t.namespaceURI===We){if(n.namespaceURI===Ye){return o==="math"}if(n.namespaceURI===Xe){return o==="math"&&at[i]}return Boolean(ft[o])}if(t.namespaceURI===Ye){if(n.namespaceURI===Xe&&!at[i]){return false}if(n.namespaceURI===We&&!st[i]){return false}return!ft[o]&&(lt[o]||!ct[o])}if(Ke==="application/xhtml+xml"&&Ve[t.namespaceURI]){return true}return false};const dt=function e(t){d(n.removed,{element:t});try{t.parentNode.removeChild(t)}catch(e){t.remove()}};const mt=function e(t,o){try{d(n.removed,{attribute:o.getAttributeNode(t),from:o})}catch(e){d(n.removed,{attribute:null,from:o})}o.removeAttribute(t);if(t==="is"&&!ge[t]){if(ze||Le){try{dt(o)}catch(e){}}else{try{o.setAttribute(t,"")}catch(e){}}}};const pt=function e(t){let n=null;let i=null;if(Ce){t="<remove></remove>"+t}else{const e=h(t,/^[\r\n\t ]+/);i=e&&e[0]}if(Ke==="application/xhtml+xml"&&Ge===Ye){t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>"}const r=Q?Q.createHTML(t):t;if(Ge===Ye){try{n=(new B).parseFromString(r,Ke)}catch(e){}}if(!n||!n.documentElement){n=te.createDocument(Ge,"template",null);try{n.documentElement.innerHTML=Ze?ee:r}catch(e){}}const s=n.body||n.documentElement;if(t&&i){s.insertBefore(o.createTextNode(i),s.childNodes[0]||null)}if(Ge===Ye){return ie.call(n,Ae?"html":"body")[0]}return Ae?n.documentElement:s};const ht=function e(t){return ne.call(t.ownerDocument||t,t,E.SHOW_ELEMENT|E.SHOW_COMMENT|E.SHOW_TEXT,null)};const yt=function e(t){return t instanceof F&&(typeof t.nodeName!=="string"||typeof t.textContent!=="string"||typeof t.removeChild!=="function"||!(t.attributes instanceof j)||typeof t.removeAttribute!=="function"||typeof t.setAttribute!=="function"||typeof t.namespaceURI!=="string"||typeof t.insertBefore!=="function"||typeof t.hasChildNodes!=="function")};const gt=function e(t){return typeof k==="function"&&t instanceof k};const bt=function e(t,o,i){if(!se[t]){return}f(se[t],(e=>{e.call(n,o,i,nt)}))};const wt=function e(t){let o=null;bt("beforeSanitizeElements",t,null);if(yt(t)){dt(t);return true}const i=tt(t.nodeName);bt("uponSanitizeElement",t,{tagName:i,allowedTags:he});if(t.hasChildNodes()&&!gt(t.firstElementChild)&&w(/<[/\w]/g,t.innerHTML)&&w(/<[/\w]/g,t.textContent)){dt(t);return true}if(!he[i]||ve[i]){if(!ve[i]&&kt(i)){if(we.tagNameCheck instanceof RegExp&&w(we.tagNameCheck,i)){return false}if(we.tagNameCheck instanceof Function&&we.tagNameCheck(i)){return false}}if(Oe&&!Fe[i]){const e=K(t)||t.parentNode;const n=J(t)||t.childNodes;if(n&&e){const o=n.length;for(let i=o-1;i>=0;--i){e.insertBefore(H(n[i],true),W(t))}}}dt(t);return true}if(t instanceof x&&!ut(t)){dt(t);return true}if((i==="noscript"||i==="noembed"||i==="noframes")&&w(/<\/no(script|embed|frames)/i,t.innerHTML)){dt(t);return true}if(Re&&t.nodeType===3){o=t.textContent;f([ae,le,ce],(e=>{o=y(o,e," ")}));if(t.textContent!==o){d(n.removed,{element:t.cloneNode()});t.textContent=o}}bt("afterSanitizeElements",t,null);return false};const vt=function e(t,n,i){if(De&&(n==="id"||n==="name")&&(i in o||i in ot)){return false}if(Te&&!ke[n]&&w(fe,n));else if(xe&&w(ue,n));else if(!ge[n]||ke[n]){if(kt(t)&&(we.tagNameCheck instanceof RegExp&&w(we.tagNameCheck,t)||we.tagNameCheck instanceof Function&&we.tagNameCheck(t))&&(we.attributeNameCheck instanceof RegExp&&w(we.attributeNameCheck,n)||we.attributeNameCheck instanceof Function&&we.attributeNameCheck(n))||n==="is"&&we.allowCustomizedBuiltInElements&&(we.tagNameCheck instanceof RegExp&&w(we.tagNameCheck,i)||we.tagNameCheck instanceof Function&&we.tagNameCheck(i)));else{return false}}else if(Ue[n]);else if(w(pe,y(i,me,"")));else if((n==="src"||n==="xlink:href"||n==="href")&&t!=="script"&&g(i,"data:")===0&&Ne[t]);else if(Ee&&!w(de,y(i,me,"")));else if(i){return false}else;return true};const kt=function e(t){return t.indexOf("-")>0};const xt=function e(t){bt("beforeSanitizeAttributes",t,null);const{attributes:o}=t;if(!o){return}const i={attrName:"",attrValue:"",keepAttr:true,allowedAttributes:ge};let r=o.length;while(r--){const e=o[r];const{name:s,namespaceURI:a,value:l}=e;const c=tt(s);let d=s==="value"?l:b(l);i.attrName=c;i.attrValue=d;i.keepAttr=true;i.forceKeepAttr=undefined;bt("uponSanitizeAttribute",t,i);d=i.attrValue;if(i.forceKeepAttr){continue}mt(s,t);if(!i.keepAttr){continue}if(!Se&&w(/\/>/i,d)){mt(s,t);continue}if(Re){f([ae,le,ce],(e=>{d=y(d,e," ")}))}const m=tt(t.nodeName);if(!vt(m,c,d)){continue}if(Pe&&(c==="id"||c==="name")){mt(s,t);d=Ie+d}if(Q&&typeof N==="object"&&typeof N.getAttributeType==="function"){if(a);else{switch(N.getAttributeType(m,c)){case"TrustedHTML":{d=Q.createHTML(d);break}case"TrustedScriptURL":{d=Q.createScriptURL(d);break}}}}try{if(a){t.setAttributeNS(a,s,d)}else{t.setAttribute(s,d)}u(n.removed)}catch(e){}}bt("afterSanitizeAttributes",t,null)};const Tt=function e(t){let n=null;const o=ht(t);bt("beforeSanitizeShadowDOM",t,null);while(n=o.nextNode()){bt("uponSanitizeShadowNode",n,null);if(wt(n)){continue}if(n.content instanceof l){e(n.content)}xt(n)}bt("afterSanitizeShadowDOM",t,null)};n.sanitize=function(e){let t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};let o=null;let r=null;let s=null;let a=null;Ze=!e;if(Ze){e="\x3c!--\x3e"}if(typeof e!=="string"&&!gt(e)){if(typeof e.toString==="function"){e=e.toString();if(typeof e!=="string"){throw v("dirty is not a string, aborting")}}else{throw v("toString is not a function")}}if(!n.isSupported){return e}if(!_e){rt(t)}n.removed=[];if(typeof e==="string"){$e=false}if($e){if(e.nodeName){const t=tt(e.nodeName);if(!he[t]||ve[t]){throw v("root node is forbidden and cannot be sanitized in-place")}}}else if(e instanceof k){o=pt("\x3c!----\x3e");r=o.ownerDocument.importNode(e,true);if(r.nodeType===1&&r.nodeName==="BODY"){o=r}else if(r.nodeName==="HTML"){o=r}else{o.appendChild(r)}}else{if(!ze&&!Re&&!Ae&&e.indexOf("<")===-1){return Q&&Me?Q.createHTML(e):e}o=pt(e);if(!o){return ze?null:Me?ee:""}}if(o&&Ce){dt(o.firstChild)}const c=ht($e?e:o);while(s=c.nextNode()){if(wt(s)){continue}if(s.content instanceof l){Tt(s.content)}xt(s)}if($e){return e}if(ze){if(Le){a=oe.call(o.ownerDocument);while(o.firstChild){a.appendChild(o.firstChild)}}else{a=o}if(ge.shadowroot||ge.shadowrootmode){a=re.call(i,a,true)}return a}let u=Ae?o.outerHTML:o.innerHTML;if(Ae&&he["!doctype"]&&o.ownerDocument&&o.ownerDocument.doctype&&o.ownerDocument.doctype.name&&w(X,o.ownerDocument.doctype.name)){u="<!DOCTYPE "+o.ownerDocument.doctype.name+">\n"+u}if(Re){f([ae,le,ce],(e=>{u=y(u,e," ")}))}return Q&&Me?Q.createHTML(u):u};n.setConfig=function(){let e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};rt(e);_e=true};n.clearConfig=function(){nt=null;_e=false};n.isValidAttribute=function(e,t,n){if(!nt){rt({})}const o=tt(e);const i=tt(t);return vt(o,i,n)};n.addHook=function(e,t){if(typeof t!=="function"){return}se[e]=se[e]||[];d(se[e],t)};n.removeHook=function(e){if(se[e]){return u(se[e])}};n.removeHooks=function(e){if(se[e]){se[e]=[]}};n.removeAllHooks=function(){se={}};return n}var J=V();return J}))})(D);const P=D.exports;const I=":host{display:inline-grid;overflow:hidden;width:100%}.view-email{width:100%}.view-email div.gmail_quote{display:none;color:var(--nylas-color-primary-400)}.view-email div.gmail_quote.show{display:block}.view-email blockquote{border-color:var(--nylas-color-primary-500) !important}.view-email .nylas-view-email-toggle-button{display:flex;justify-content:center;align-items:center;cursor:pointer;background-color:var(--nylas-color-primary-200);color:var(--nylas-color-primary-600);border:0;border-radius:2px;font-size:14px;font-weight:500;line-height:1.5;transition:all 0.2s ease-in-out}.view-email .nylas-view-email-toggle-button:hover{background-color:var(--nylas-color-primary-200);color:var(--nylas-color-primary-600)}";const O=I;P.addHook("afterSanitizeAttributes",(function(e){if("target"in e){e.setAttribute("target","_blank");e.setAttribute("rel","noopener")}}));const $=class{constructor(t){e(this,t);this.htmlElement=document.createElement("html");this.setBody=e=>{this.state="loading";this.styles=[];this.hoistedFontURLs=new Map;this.sanitizedBody="";document.querySelectorAll(".nylas-view-email-font").forEach((e=>{e.remove()}));const t=this.message?l(this.message):c(e);if(!t){e=`<html><body>${f(e)}</body></html>`}this.htmlElement.innerHTML=e;if(this.detectDarkMode){M(this.htmlElement)}this.htmlElement.querySelectorAll("link").forEach((e=>{console.debug(`[nylas-view-email] Hoisting link: ${e.getAttribute("href")}`);if(e.getAttribute("rel")==="stylesheet"&&e.getAttribute("href")){const t=e.getAttribute("href");if(t){const e=new URL(t,window.location.href);if(e.protocol==="https:"||e.protocol==="http:"){this.hoistedFontURLs.set(e.href,e.href)}}}}));this.htmlElement.querySelectorAll("style").forEach((e=>{e.innerHTML.split("\n").forEach((e=>{const t=e.match(/@import url\((.*)\)/);if(t){const e=new URL(t[1],window.location.href);if(e.protocol==="https:"||e.protocol==="http:"){this.hoistedFontURLs.set(e.href,e.href)}}}));e.innerHTML=e.innerHTML.replace("body",":host");this.styles.push(e);e.remove()}));this.htmlElement.querySelectorAll("a").forEach((e=>{e.setAttribute("target","_blank")}));const n=this.htmlElement.querySelector(".gmail_quote");if(n){const e=document.createElement("button");e.classList.add("nylas-view-email-toggle-button");e.setAttribute("aria-label","Show quoted text");e.innerText="...";n.parentElement?.insertBefore(e,n)}this.sanitizedBody=P.sanitize(this.htmlElement.innerHTML);this.hoistedFontURLs.forEach(((e,t)=>{const n=document.createElement("link");n.setAttribute("rel","stylesheet");n.setAttribute("href",e);n.classList.add("nylas-view-email-font");document.head.appendChild(n)}));this.state="ready"};this.handleMobileSize=()=>{const e=Math.max(document.documentElement.clientWidth||0,window.innerWidth||0);if(e<=768){const t=this.viewEmailElement?.getBoundingClientRect();if(t&&this.viewEmailElement&&this.parent){if(t.width>e){const e=this.parent;const n=e?.getBoundingClientRect();s("Parent width:",n?.width,"Parent height:",n?.height);s("Parent client width:",e.clientWidth,"Parent client height:",e.clientHeight);const o=n.width/t.width;const i=n.height/t.height;const r=Math.min(o,i);s("Scale:",r);this.viewEmailElement.style.setProperty("transform",`scale(${r})`);this.viewEmailElement.style.setProperty("transform-origin",`top left`);this.viewEmailElement.style.setProperty("height",`${t.height*r}px`)}}}else{this.viewEmailElement?.style.removeProperty("transform");this.viewEmailElement?.style.removeProperty("transform-origin");this.viewEmailElement?.style.removeProperty("height")}};this.message=undefined;this.parent=undefined;this.attachments=[];this.detectDarkMode=true;this.state="loading";this.sanitizedBody="";this.styles=[];this.viewEmailElement=undefined;this.hoistedFontURLs=new Map}connectedCallback(){}disconnectedCallback(){s(`[nylas-view-email] Component disconnected`);this.state="loading";this.styles=[];this.hoistedFontURLs=new Map;this.sanitizedBody="";document.querySelectorAll(".nylas-view-email-font").forEach((e=>{e.remove()}))}async componentWillLoad(){s(`[nylas-view-email] component loaded`);this.setBody(this.message?.body??"")}async componentDidLoad(){s(`[nylas-view-thread] Component did load`);this.handleMobileSize()}async messageChanged(){s(`[nylas-view-thread] Message changed`,{message:this.message});this.setBody(this.message?.body??"")}handleScroll(){this.handleMobileSize()}viewEmailElementChanged(){const e=this.viewEmailElement?.querySelectorAll(".nylas-view-email-toggle-button");if(e){e.forEach((e=>{e.addEventListener("click",(()=>{const e=this.viewEmailElement?.querySelector(".gmail_quote");if(e){e.classList.toggle("show")}}))}))}}render(){console.debug(`[nylas-view-email] render`,{hoistedFontURLs:this.hoistedFontURLs});return t(o,{key:"fe606c06674789e63156056d8b71a5cb2202cf47"},this.state==="loading"&&t("div",null,"Loading..."),this.state==="ready"&&t(r,null,this.styles.map((e=>t("style",null,P.sanitize(e.innerHTML)))),t("div",{class:"view-email",part:"view-email",innerHTML:this.sanitizedBody,ref:e=>this.viewEmailElement=e})))}get host(){return i(this)}static get watchers(){return{message:["messageChanged"],viewEmailElement:["viewEmailElementChanged"]}}};$.style=O;const j=".sc-reply-all-icon-h{display:flex}";const F=j;const B=class{constructor(t){e(this,t);this.width="15";this.height="15"}render(){return t("svg",{key:"2baf5fdfb4309e039a9a4e66ecacbf4481c2d7ca",fill:"auto",width:this.width,height:this.height,viewBox:"0 0 1920 1920",xmlns:"http://www.w3.org/2000/svg"},t("path",{key:"d7f1586f9af096cb3a1876b681ba408387899788",d:"m1030.975 188 81.249 81.249-429.228 429.228h300.747c516.223 0 936.257 420.034 936.257 936.257v98.028h-114.92v-98.028c0-452.901-368.436-821.337-821.337-821.337H682.996l429.228 429.229-81.25 81.248-567.936-567.937L1030.975 188Zm-463.038.011 81.249 81.25-486.688 486.688 486.688 486.688-81.249 81.249L0 755.949 567.937 188.01Z","fill-rule":"evenodd"}))}};B.style=F;const N=".sc-reply-icon-h{display:flex}";const q=N;const U=class{constructor(t){e(this,t);this.width="15";this.height="15"}render(){return t("svg",{key:"07034b975afd3fa950dec8be4e28c16775b5a49e",fill:"auto",width:this.width,height:this.height,viewBox:"0 0 1920 1920",xmlns:"http://www.w3.org/2000/svg"},t("path",{key:"5601b12fa1dde6412985fa2f701eeb3f9e2b07b4",d:"M835.942 632.563H244.966l478.08-478.08-90.496-90.496L-.026 696.563 632.55 1329.14l90.496-90.496-478.08-478.08h590.976c504.448 0 914.816 410.368 914.816 914.816v109.184h128V1675.38c0-574.976-467.84-1042.816-1042.816-1042.816","fill-rule":"evenodd"}))}};U.style=q;export{h as forward_icon,b as nylas_composer,T as nylas_summarize_message_button,$ as nylas_view_email,B as reply_all_icon,U as reply_icon};
|
|
3
|
+
//# sourceMappingURL=p-980c32d9.entry.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as e,c as t,h as n,H as s}from"./p-68c2fadf.js";import{R as a}from"./p-
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as e,c as t,h as n,H as s}from"./p-68c2fadf.js";import{R as a}from"./p-f0f3f350.js";import{a as r}from"./p-ad7cf473.js";import"./p-cb65c223.js";const c=":host{display:block}sp-search{width:100%;border:0}";const o=c;var i=undefined&&undefined.__decorate||function(e,t,n,s){var a=arguments.length,r=a<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,c;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(e,t,n,s);else for(var o=e.length-1;o>=0;o--)if(c=e[o])r=(a<3?c(r):a>3?c(t,n,r):c(t,n))||r;return a>3&&r&&Object.defineProperty(t,n,r),r};var d=undefined&&undefined.__metadata||function(e,t){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(e,t)};const f=class{constructor(n){e(this,n);this.search=t(this,"search",7);this.onSearch=async e=>{e.preventDefault();e.stopPropagation();const t=e.target;const n=t.value;if(n===this.internalQuery){return}this.internalQuery=n;this.search.emit(this.internalQuery)};this.query="";this.internalQuery=""}connectedCallback(){}disconnectedCallback(){}async componentWillLoad(){r(`[nylas-threads-search] Component will load`)}async componentDidLoad(){r(`[nylas-threads-search] Component did load`)}onQueryChange(){this.internalQuery=this.query}render(){return n(s,{key:"9e91a330bea4dc84fa96070591e95926f52ee0bb"},n("sp-theme",{key:"6d1df81ced09a5b721d8f161e40450633ae2cd98",scale:"medium",color:"dark"},n("sp-search",{key:"cb81bba4b4f1d279f1fd48bda9a2fb003cb65fcd",quiet:true,onSubmit:this.onSearch,onBlur:this.onSearch,value:this.internalQuery})))}static get watchers(){return{query:["onQueryChange"]}}};i([a({name:"nylas-pagination",stateToProps:new Map([["mailbox.searchQuery","query"]]),eventToProps:{search:async(e,t)=>{await t.threads.getThreads({search_query_native:e.detail||undefined,page_token:undefined})}},fireRegisterEvent:true}),d("design:type",Function),d("design:paramtypes",[]),d("design:returntype",void 0)],f.prototype,"render",null);f.style=o;export{f as nylas_threads_search};
|
|
2
|
+
//# sourceMappingURL=p-a17f542c.entry.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{d as t}from"./p-ad7cf473.js";class e{constructor(t){this.defaultAuthArgs={};this.session=t}setActiveGrantId(t){this.activeGrantId=t}async request({method:e,path:s,body:n,headers:r}){try{const i=await this.session.fetch(`grants/me/${s}`,{method:e,headers:r?new Headers(r):undefined,body:n,...this.session.isMultiAccount()&&this.activeGrantId?{grant_id:this.activeGrantId}:{}});if(typeof i==="undefined"){throw new Error("Response is undefined")}return t(i)}catch(e){return t(null,{message:String(e)})}}async currentUser(){const t=this.session.isMultiAccount()?this.activeGrantId:undefined;const e=await this.session.getProfile(t);if(!e){return null}return{id:e.sub,email:e.email,name:e.name}}async authenticationUrl(t){let e=this.defaultAuthArgs||{};if(t){e={...e,...t}}return this.session.auth(e)}setDefaultAuthArgs(t){this.defaultAuthArgs=t}}export{e as N};
|
|
2
|
+
//# sourceMappingURL=p-a3b1a98c.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["NylasIdentityRequestWrapper","constructor","session","this","defaultAuthArgs","setActiveGrantId","grantId","activeGrantId","request","method","path","body","headers","response","fetch","Headers","undefined","isMultiAccount","grant_id","Error","dataResponse","error","message","String","currentUser","idToken","getProfile","id","sub","email","name","authenticationUrl","authArgs","args","auth","setDefaultAuthArgs"],"sources":["src/common/nylas-api-request.ts"],"sourcesContent":["import { dataResponse } from '@/utils/utils';\nimport type { NylasSessions } from '@nylas/identity';\nimport { DataResponseReturnType } from './types';\n\n/**\n * Arguments for making a request to the Nylas API.\n */\nexport type NylasRequestArgs = {\n method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';\n path: string;\n body?: any;\n headers?: Record<string, string>;\n};\n\n/**\n * A model representing a user in the Nylas Identity system.\n */\nexport type User = {\n id: string;\n email: string;\n name?: string;\n};\n\n/**\n * Arguments for authenticating a user with the Nylas Identity system.\n */\nexport type AuthArgs = {\n provider?: string;\n scope?: Array<string>;\n loginHint?: string;\n includeGrantScopes?: boolean;\n prompt?: string;\n metadata?: string;\n state?: string;\n};\n\n/**\n * Interface for making requests to the Nylas API.\n *\n * This is an abstract class that is meant to be implemented by customers to provide their own\n * implementation of making requests to the Nylas API. This allows customers to use their own\n * authentication mechanism, or to use a different HTTP client library.\n */\nexport abstract class NylasApiRequest {\n /**\n * This method should make an authenticated request to the Nylas API.\n * Note: It should not throw an error if the request fails, but should return an object with the error\n * information as part of the tuple returned.\n * @param args NylasRequestArgs\n */\n abstract request<T = any>(args: NylasRequestArgs): Promise<DataResponseReturnType<T>>;\n\n /**\n * This method should return the current user's information.\n */\n\n abstract currentUser(): Promise<User | null>;\n\n /**\n * This method should set the default authentication arguments to use when authenticating the user.\n */\n abstract setDefaultAuthArgs(authArgs: AuthArgs): void;\n\n /**\n * This method should return the URL to redirect the user to for authentication.\n */\n abstract authenticationUrl(authArgs?: AuthArgs): Promise<string | undefined>;\n}\n\n/**\n * A wrapper around the Nylas Identity session that implements the NylasApiRequest interface.\n * This class is used by the Nylas Web Elements to make requests to the Nylas API if no custom\n * implementation of NylasApiRequest is provided.\n */\nexport class NylasIdentityRequestWrapper implements NylasApiRequest {\n /**\n * The Nylas Identity session instance.\n */\n private session: NylasSessions;\n\n /**\n * The grant_id to use for requests, if there is multi-account support\n * enabled in the Nylas Identity settings.\n */\n private activeGrantId?: string;\n\n /**\n * The default authentication arguments to use when authenticating the user.\n */\n private defaultAuthArgs: AuthArgs = {};\n\n /**\n * Constructor for the NylasIdentityRequestWrapper class.\n * @param session The Nylas Identity session instance.\n */\n constructor(session: NylasSessions) {\n this.session = session;\n }\n\n /**\n * This method sets the grant_id to use for requests.\n * This is used when there is multi-account support enabled in the Nylas Identity settings.\n *\n * @param grantId\n */\n setActiveGrantId(grantId: string) {\n this.activeGrantId = grantId;\n }\n\n /**\n * This method makes a request to the Nylas API, using the Nylas Identity's fetch method.\n *\n * The `grants/me/` prefix is added because all requests made from the browser to the Nylas API\n * must be made on behalf of the currently logged in user with a valid access token.\n *\n * @param NylasRequestArgs\n * @returns Promise<[T | null, NylasErrorResponse['error'] | null]>\n */\n async request<T>({ method, path, body, headers }: NylasRequestArgs): Promise<DataResponseReturnType<T>> {\n try {\n const response = await this.session.fetch(`grants/me/${path}`, {\n method,\n headers: headers ? new Headers(headers) : undefined,\n body,\n ...(this.session.isMultiAccount() && this.activeGrantId ? { grant_id: this.activeGrantId } : {}),\n });\n\n // Sometimes the Nylas identity session fetch method returns undefined.\n // Possibly due to CORS issues. In this case, we throw an error.\n if (typeof response === 'undefined') {\n throw new Error('Response is undefined');\n }\n\n return dataResponse(response as T);\n } catch (error) {\n return dataResponse(null as T, {\n message: String(error),\n });\n }\n }\n\n /**\n * This method returns the current (logged in) user's information.\n * If the user is not logged in, it returns null.\n * @returns Promise<User | null>\n */\n async currentUser(): Promise<User | null> {\n const grantId = this.session.isMultiAccount() ? this.activeGrantId : undefined;\n const idToken = await this.session.getProfile(grantId);\n if (!idToken) {\n return null;\n }\n\n return {\n id: idToken.sub,\n email: idToken.email,\n name: idToken.name,\n };\n }\n\n /**\n * This method returns the URL to redirect the user to for authentication.\n * @param authConfig authArgs\n * @returns Promise<string | undefined>\n */\n async authenticationUrl(authArgs?: AuthArgs): Promise<string | undefined> {\n let args = this.defaultAuthArgs || {};\n if (authArgs) {\n args = { ...args, ...authArgs };\n }\n return this.session.auth(args);\n }\n\n /**\n * This method sets the default authentication arguments to use when authenticating the user.\n * @param authArgs authArgs\n */\n setDefaultAuthArgs(authArgs: AuthArgs) {\n this.defaultAuthArgs = authArgs;\n }\n}\n"],"mappings":"0CA0EaA,EAqBX,WAAAC,CAAYC,GANJC,KAAAC,gBAA4B,GAOlCD,KAAKD,QAAUA,C,CASjB,gBAAAG,CAAiBC,GACfH,KAAKI,cAAgBD,C,CAYvB,aAAME,EAAWC,OAAEA,EAAMC,KAAEA,EAAIC,KAAEA,EAAIC,QAAEA,IACrC,IACE,MAAMC,QAAiBV,KAAKD,QAAQY,MAAM,aAAaJ,IAAQ,CAC7DD,SACAG,QAASA,EAAU,IAAIG,QAAQH,GAAWI,UAC1CL,UACIR,KAAKD,QAAQe,kBAAoBd,KAAKI,cAAgB,CAAEW,SAAUf,KAAKI,eAAkB,KAK/F,UAAWM,IAAa,YAAa,CACnC,MAAM,IAAIM,MAAM,wB,CAGlB,OAAOC,EAAaP,E,CACpB,MAAOQ,GACP,OAAOD,EAAa,KAAW,CAC7BE,QAASC,OAAOF,I,EAUtB,iBAAMG,GACJ,MAAMlB,EAAUH,KAAKD,QAAQe,iBAAmBd,KAAKI,cAAgBS,UACrE,MAAMS,QAAgBtB,KAAKD,QAAQwB,WAAWpB,GAC9C,IAAKmB,EAAS,CACZ,OAAO,I,CAGT,MAAO,CACLE,GAAIF,EAAQG,IACZC,MAAOJ,EAAQI,MACfC,KAAML,EAAQK,K,CASlB,uBAAMC,CAAkBC,GACtB,IAAIC,EAAO9B,KAAKC,iBAAmB,GACnC,GAAI4B,EAAU,CACZC,EAAO,IAAKA,KAASD,E,CAEvB,OAAO7B,KAAKD,QAAQgC,KAAKD,E,CAO3B,kBAAAE,CAAmBH,GACjB7B,KAAKC,gBAAkB4B,C"}
|