@nylas/web-elements 2.5.7 → 2.5.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/dist/cdn/nylas-scheduler-editor/nylas-scheduler-editor.es.js +1315 -1313
  2. package/dist/cdn/nylas-scheduling/nylas-scheduling.es.js +309 -308
  3. package/dist/cjs/checkmark-icon_14.cjs.entry.js +5 -3
  4. package/dist/cjs/checkmark-icon_14.cjs.entry.js.map +1 -1
  5. package/dist/cjs/google-logo-icon.microsoft-logo-icon.nylas-editor-tabs.nylas-editor-tabs-group.nylas-list-configurations.nylas-select-event-type.entry.cjs.js.map +1 -1
  6. package/dist/cjs/google-logo-icon_6.cjs.entry.js +8 -7
  7. package/dist/cjs/google-logo-icon_6.cjs.entry.js.map +1 -1
  8. package/dist/cjs/nylas-scheduler-editor.cjs.entry.js +1 -1
  9. package/dist/cjs/nylas-scheduling.cjs.entry.js +11 -6
  10. package/dist/cjs/nylas-scheduling.cjs.entry.js.map +1 -1
  11. package/dist/cjs/nylas-scheduling.entry.cjs.js.map +1 -1
  12. package/dist/cjs/{version-C5rRjTHU.js → version-CN5nqWgI.js} +3 -3
  13. package/dist/cjs/{version-C5rRjTHU.js.map → version-CN5nqWgI.js.map} +1 -1
  14. package/dist/collection/components/scheduler/nylas-scheduling/nylas-scheduling.js +10 -5
  15. package/dist/collection/components/scheduler/nylas-scheduling/nylas-scheduling.js.map +1 -1
  16. package/dist/collection/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.js +7 -6
  17. package/dist/collection/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.js.map +1 -1
  18. package/dist/collection/components/scheduler-editor/nylas-event-description/nylas-event-description.js +2 -1
  19. package/dist/collection/components/scheduler-editor/nylas-event-description/nylas-event-description.js.map +1 -1
  20. package/dist/collection/components/scheduler-editor/nylas-event-title/nylas-event-title.js +3 -2
  21. package/dist/collection/components/scheduler-editor/nylas-event-title/nylas-event-title.js.map +1 -1
  22. package/dist/collection/version.js +1 -1
  23. package/dist/collection/version.js.map +1 -1
  24. package/dist/components/nylas-editor-tabs-group.js +1 -1
  25. package/dist/components/nylas-editor-tabs.js +1 -1
  26. package/dist/components/nylas-event-calendar.js +1 -1
  27. package/dist/components/nylas-event-description.js +1 -1
  28. package/dist/components/nylas-event-title.js +1 -1
  29. package/dist/components/nylas-scheduler-editor.js +6 -6
  30. package/dist/components/nylas-scheduling.js +11 -6
  31. package/dist/components/nylas-scheduling.js.map +1 -1
  32. package/dist/components/{p-HJ5amhvq.js → p-2vIl9-lT.js} +12 -11
  33. package/dist/components/p-2vIl9-lT.js.map +1 -0
  34. package/dist/components/{p-y15sKy8D.js → p-B9G8DJJr.js} +4 -3
  35. package/dist/components/p-B9G8DJJr.js.map +1 -0
  36. package/dist/components/{p-BRszp61A.js → p-BfwqDqHx.js} +3 -3
  37. package/dist/components/{p-BRszp61A.js.map → p-BfwqDqHx.js.map} +1 -1
  38. package/dist/components/{p-CJ7rVNTy.js → p-BlxYpYrq.js} +5 -4
  39. package/dist/components/p-BlxYpYrq.js.map +1 -0
  40. package/dist/components/{p-lV8W1_93.js → p-CiJgH0CI.js} +4 -4
  41. package/dist/components/{p-lV8W1_93.js.map → p-CiJgH0CI.js.map} +1 -1
  42. package/dist/components/{p-DqVU9VaM.js → p-DwzjmWk7.js} +6 -6
  43. package/dist/components/{p-DqVU9VaM.js.map → p-DwzjmWk7.js.map} +1 -1
  44. package/dist/esm/checkmark-icon.copy-icon.dragable-icon.eye-icon.feedback-icon.input-color-picker.nylas-additional-participants.nylas-event-description.nylas-event-info.nylas-event-location.nylas-event-title.nylas-feedback-form.nylas-reminder-time.trash-icon.entry.js.map +1 -1
  45. package/dist/esm/checkmark-icon_14.entry.js +5 -3
  46. package/dist/esm/checkmark-icon_14.entry.js.map +1 -1
  47. package/dist/esm/google-logo-icon.microsoft-logo-icon.nylas-editor-tabs.nylas-editor-tabs-group.nylas-list-configurations.nylas-select-event-type.entry.js.map +1 -1
  48. package/dist/esm/google-logo-icon_6.entry.js +8 -7
  49. package/dist/esm/google-logo-icon_6.entry.js.map +1 -1
  50. package/dist/esm/nylas-scheduler-editor.entry.js +1 -1
  51. package/dist/esm/nylas-scheduling.entry.js +11 -6
  52. package/dist/esm/nylas-scheduling.entry.js.map +1 -1
  53. package/dist/esm/{version-C5BO7xwe.js → version-zgIeli_M.js} +3 -3
  54. package/dist/esm/{version-C5BO7xwe.js.map → version-zgIeli_M.js.map} +1 -1
  55. package/dist/nylas-web-elements/google-logo-icon.microsoft-logo-icon.nylas-editor-tabs.nylas-editor-tabs-group.nylas-list-configurations.nylas-select-event-type.entry.esm.js.map +1 -1
  56. package/dist/nylas-web-elements/nylas-scheduling.entry.esm.js.map +1 -1
  57. package/dist/nylas-web-elements/nylas-web-elements.esm.js +1 -1
  58. package/dist/nylas-web-elements/{p-85955466.entry.js → p-6aa41c34.entry.js} +2 -2
  59. package/dist/nylas-web-elements/p-6aa41c34.entry.js.map +1 -0
  60. package/dist/nylas-web-elements/p-acd75a32.entry.js +2 -0
  61. package/dist/nylas-web-elements/p-acd75a32.entry.js.map +1 -0
  62. package/dist/nylas-web-elements/{p-ae86e7c6.entry.js → p-ec243a08.entry.js} +2 -2
  63. package/dist/nylas-web-elements/p-f5cf565f.entry.js +2 -0
  64. package/dist/nylas-web-elements/p-f5cf565f.entry.js.map +1 -0
  65. package/dist/nylas-web-elements/{p-C5BO7xwe.js → p-zgIeli_M.js} +2 -2
  66. package/dist/nylas-web-elements/{p-C5BO7xwe.js.map → p-zgIeli_M.js.map} +1 -1
  67. package/dist/types/version.d.ts +1 -1
  68. package/package.json +3 -3
  69. package/dist/components/p-CJ7rVNTy.js.map +0 -1
  70. package/dist/components/p-HJ5amhvq.js.map +0 -1
  71. package/dist/components/p-y15sKy8D.js.map +0 -1
  72. package/dist/nylas-web-elements/p-083268de.entry.js +0 -2
  73. package/dist/nylas-web-elements/p-083268de.entry.js.map +0 -1
  74. package/dist/nylas-web-elements/p-85955466.entry.js.map +0 -1
  75. package/dist/nylas-web-elements/p-e240fd68.entry.js +0 -2
  76. package/dist/nylas-web-elements/p-e240fd68.entry.js.map +0 -1
  77. /package/dist/nylas-web-elements/{p-ae86e7c6.entry.js.map → p-ec243a08.entry.js.map} +0 -0
@@ -1 +0,0 @@
1
- {"file":"p-y15sKy8D.js","mappings":";;;;;;;;;AAAA,MAAM,wBAAwB,GAAG,2lOAA2lO;;;;;;;;;;;;;;;;MC+B/mO,qBAAqB,GAAAA,kBAAA,CAAA,MAAA,qBAAA,SAAAC,CAAA,CAAA;AANlC,IAAA,WAAA,GAAA;;;;;;QAqBU,IAAgB,CAAA,gBAAA,GAAY,IAAI,CAAC,qBAAqB,EAAE,aAAa,EAAE,WAAW;AAMlF,QAAA,IAAI,CAAA,IAAA,GAAW,aAAa;AAU5B,QAAA,IAAsB,CAAA,sBAAA,GAAY,KAAK;AAKvC,QAAA,IAAW,CAAA,WAAA,GAAY,KAAK;AAU3B,QAAA,IAAA,CAAA,WAAW,GAAW,IAAI,CAAC,gBAAgB,IAAI,IAAI,CAAC,qBAAqB,EAAE,aAAa,EAAE,WAAW,IAAI,EAAE;AAC3G,QAAA,IAAU,CAAA,UAAA,GAAY,KAAK;QAI3B,IAAe,CAAA,eAAA,GAAyDC,kBAAsB,CAAC,GAAG,CAAC,KAAK,KAAK;YACpH,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,KAAK,EAAE,KAAK,CAAC,KAAK;AAClB,YAAA,SAAS,EAAE,KAAK;AACjB,SAAA,CAAC,CAAC;AAIM,QAAA,IAAA,CAAA,cAAc,GAAyD,IAAI,CAAC,eAAe;AAK3F,QAAA,IAAoB,CAAA,oBAAA,GAAW,EAAE;QAMjC,IAAW,CAAA,WAAA,GAKhB,EAAE,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE;AAEnD,QAAA,IAAe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A,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EACE,CAAW,CAAA,WAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,cAAc,EAAG,CAAA,EACjC,CAAM,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,iBAAiB,EAAA,EACzBA,QAAO,CAAC,CAAC,CAAC,wDAAwD,CAAC,OAAE,CAAO,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EAAA,YAAY,CAAQ,CAC5F,CACW,CACf,CACF,CACR,CACG,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAxEX,UAAA,CAAA;AAVC,IAAA,iBAAiB,CAA2G;AAC3H,QAAA,IAAI,EAAE,yBAAyB;QAC/B,YAAY,EAAE,IAAI,GAAG,CAAC;YACpB,CAAC,uCAAuC,EAAE,uBAAuB,CAAC;YAClE,CAAC,kCAAkC,EAAE,kBAAkB,CAAC;YACxD,CAAC,6BAA6B,EAAE,aAAa,CAAC;SAC/C,CAAC;AACF,QAAA,YAAY,EAAE,EAAE;AAChB,QAAA,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;CA2ED,EAAA,qBAAA,CAAA,SAAA,EAAA,QAAA,EAAA,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement","eventDescriptionTokens","i18next"],"sources":["src/components/scheduler-editor/nylas-event-description/nylas-event-description.scss?tag=nylas-event-description&encapsulation=shadow","src/components/scheduler-editor/nylas-event-description/nylas-event-description.tsx"],"sourcesContent":["@use '../../../common/styles/variables' as *;\n@use '../../../common/mixins/inputs' as *;\n\n:host {\n display: block;\n height: auto;\n @include default-css-variables;\n width: 100%;\n}\n\n.nylas-event-description {\n display: flex;\n flex-direction: column;\n gap: 4px;\n position: relative;\n color: var(--nylas-base-900);\n\n label {\n @include input-label;\n flex-direction: column;\n gap: 4px;\n font-family: var(--nylas-font-family);\n\n p {\n margin: 0;\n display: flex;\n align-items: center;\n }\n\n span.label-icon {\n margin-left: 4px;\n\n tooltip-component {\n display: flex;\n }\n }\n }\n\n textarea {\n padding: 12px 16px;\n border-width: 1;\n resize: vertical;\n border-radius: 8px;\n font-family: var(--nylas-font-family);\n font-size: 16px;\n line-height: 24px;\n border: 1px solid var(--nylas-base-200);\n\n &::-webkit-resizer {\n display: none;\n }\n }\n\n div.event-description {\n // Apply textfield styles but override display and alignment for contentEditable\n border-radius: var(--nylas-border-radius-2x);\n border: 1px solid var(--nylas-base-300);\n background: var(--nylas-base-0);\n width: -webkit-fill-available;\n min-height: 50px;\n padding: 12px 16px;\n overflow-y: auto;\n white-space: pre-wrap;\n line-height: 1.5;\n scrollbar-width: thin;\n color: var(--nylas-base-900);\n font-family: var(--nylas-font-family);\n font-size: 16px;\n font-style: normal;\n font-weight: 400;\n -webkit-text-fill-color: var(--nylas-base-900);\n display: block;\n /* Preserves line breaks */\n &::-webkit-scrollbar {\n width: 6px;\n height: 6px;\n }\n\n &:focus {\n color: var(--nylas-base-900);\n -webkit-text-fill-color: var(--nylas-base-900);\n outline: 2px solid var(--nylas-primary);\n outline-offset: 2px;\n }\n\n &:focus-visible {\n color: var(--nylas-base-900);\n -webkit-text-fill-color: var(--nylas-base-900);\n outline: 2px solid var(--nylas-primary);\n outline-offset: 2px;\n }\n\n &.error {\n border-color: var(--nylas-error);\n border-width: 2px;\n }\n }\n\n span.add-additional-fields {\n display: flex;\n align-items: center;\n gap: 8px;\n\n button-component {\n button {\n height: 35px;\n background-color: var(--nylas-base-0);\n }\n }\n }\n\n span.help-text {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n color: var(--nylas-base-500);\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 21px;\n position: relative;\n\n span.label-icon {\n display: inline-flex;\n align-items: center;\n flex-shrink: 0;\n\n tooltip-component {\n display: flex;\n &::part(tc__container) {\n position: unset;\n }\n\n &::part(tc__content) {\n position: absolute;\n top: 4px;\n left: 50%;\n transform: translateX(-50%);\n }\n }\n }\n }\n\n .highlighted-tag {\n background-color: var(--nylas-base-200);\n border-radius: var(--nylas-border-radius);\n padding: 2px 5px;\n margin-left: 4px;\n margin-bottom: 4px;\n display: inline-block;\n vertical-align: baseline;\n }\n\n .token-options {\n display: block;\n background-color: var(--nylas-base-0);\n width: 100%;\n max-height: 336px;\n margin-top: 28px;\n overflow: auto;\n z-index: 1;\n border-radius: 4px;\n position: absolute;\n bottom: 108px;\n\n box-shadow: 0px 4px 6px -2px #0000000d;\n box-shadow: 0px 10px 15px -3px #0000001a;\n\n @media #{$mobile} {\n right: 0;\n width: 325px;\n max-width: unset;\n }\n\n ul {\n padding: 0;\n list-style-type: none;\n color: var(--nylas-base-900);\n max-height: 336px;\n margin: 0;\n\n li {\n padding: 16px, 12px, 16px, 12px;\n color: var(--nylas-base-900);\n padding: 12px 16px;\n text-decoration: none;\n display: block;\n font-family: inherit;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n letter-spacing: 0px;\n text-align: left;\n cursor: pointer;\n\n .token-label {\n display: flex;\n flex-direction: column;\n font-weight: 400;\n\n .token {\n color: var(--nylas-abse-900);\n font-size: 16px;\n line-height: 24px;\n }\n\n .description {\n color: var(--nylas-base-600);\n font-size: 14px;\n line-height: 21px;\n }\n }\n\n &:hover,\n &:focus,\n &:active,\n &.active {\n background-color: var(--nylas-base-100);\n\n .token-label {\n .token {\n color: var(--nylas-primary);\n }\n }\n }\n }\n }\n\n .selected {\n background-color: var(--nylas-base-100);\n }\n }\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug, getBrowser, isNonPrintableKey, sanitize } from '@/utils/utils';\nimport { AttachInternals, Component, Host, State, h, Element, Prop, Watch, Event, EventEmitter, Listen } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { Configuration } from '@nylas/core';\nimport i18next from '@/utils/i18n';\nimport { LANGUAGE_CODE } from '@/common/constants';\nimport { EVENT_TITLE_TOKENS as eventDescriptionTokens } from '@/common/constants';\nimport { ThemeConfig } from '@nylas/core';\ninterface CustomShadowRoot extends ShadowRoot {\n getSelection: () => Selection | null;\n}\n\ntype Token = {\n token: string;\n value: string;\n description: string;\n};\n\n/**\n * The `nylas-event-description` component is a form input for the description of an event.\n * @part nedesc - The event description container\n * @part nedesc__textarea - The event description textarea\n */\n@Component({\n tag: 'nylas-event-description',\n styleUrl: 'nylas-event-description.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasEventDescription {\n /**\n * The host element <nylas-event-description>\n */\n @Element() host!: HTMLElement;\n /**\n * @standalone\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n\n /**\n * @standalone\n * The event description stored in the configuration\n */\n @Prop() eventDescription?: string = this.selectedConfiguration?.event_booking?.description;\n\n /**\n * @standalone\n * The name of the event description input.\n */\n @Prop() name: string = 'description';\n\n /**\n * The selected language.\n */\n @Prop() selectedLanguage?: LANGUAGE_CODE;\n\n /**\n * Hide the auto popolate button\n */\n @Prop() hideAutoPopulateButton: boolean = false;\n\n /**\n * Whether to show the tokens dropdown.\n */\n @Prop() noTemplates: boolean = false;\n /**\n * @standalone\n * The theme configuration.\n */\n @Prop({ attribute: 'theme-config' }) readonly themeConfig?: ThemeConfig;\n\n /**\n * The selected event description state. This defaults to the event description from the configuration or an empty string.\n */\n @State() description: string = this.eventDescription || this.selectedConfiguration?.event_booking?.description || '';\n @State() showTokens: boolean = false;\n /**\n * The available token options for the dropdown.\n */\n @State() availableTokens: { label: string; value: string; labelHTML: Token }[] = eventDescriptionTokens.map(token => ({\n label: token.token,\n value: token.value,\n labelHTML: token,\n }));\n /**\n * The filtered token options for the dropdown based on the current query.\n */\n @State() filteredTokens: { label: string; value: string; labelHTML: Token }[] = this.availableTokens;\n /**\n * The aria-activedescendant attribute value. This is used to indicate the\n * currently active descendant in the tokens dropdown.\n */\n @State() ariaActivedescendant: string = '';\n /**\n * Stores the reference to the current word being typed.\n * This is used to update the event description with the selected token tag when\n * an option is selected from the dropdown by clicking on it.\n */\n @State() currentWord: {\n $value: string;\n fullText: string;\n index: number;\n focusOffset: number;\n } = { $value: '', fullText: '', index: -1, focusOffset: -1 };\n\n @State() validationError: string = '';\n\n @State() additionalFieldTokens: Token[] = [];\n // Reference to the description textarea element\n private descriptionRef!: HTMLDivElement;\n\n /**\n * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\n\n /**\n * When a name prop is passed, stencil does not automatically set the name attribute on the host element.\n * Since this component is form-associated, the name attribute is required for form submission.\n * This is a workaround to ensure that the name attribute is set on the host element.\n */\n @Watch('name')\n elementNameChangedHandler(newValue: string) {\n debug('nylas-event-description', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('selectedConfiguration')\n selectedConfigurationChangedHandler(newValue: Configuration) {\n debug('nylas-custom-booking-flow', 'selectedConfigurationChangedHandler', newValue);\n const description = newValue?.event_booking?.description || this.eventDescription || '';\n const additionalFields = newValue?.scheduler?.additional_fields || {};\n const newKeys = Object.keys(additionalFields) || [];\n const newTokens = newKeys.map(key => {\n return {\n token: `$${key}`,\n value: `\\${${key}}`,\n description: additionalFields[key].label || '',\n };\n });\n this.additionalFieldTokens = [...newTokens];\n this.availableTokens = [...eventDescriptionTokens, ...newTokens].map(token => ({\n label: token.token,\n value: token.value,\n labelHTML: token,\n }));\n this.filteredTokens = [...this.availableTokens];\n this.description = description;\n if (description) {\n this.updateEventDescriptionFromProp(description);\n }\n }\n\n @Watch('selectedLanguage')\n selectedLanguageChangedHandler(newVal: LANGUAGE_CODE, oldVal: LANGUAGE_CODE) {\n if (newVal === oldVal) return;\n i18next.changeLanguage(newVal);\n const titleTokens = {\n $invitee: 'invitee',\n $invitee_email: 'inviteeEmail',\n $duration: 'duration',\n };\n this.availableTokens = this.availableTokens.map(token => {\n if (titleTokens[token.label]) {\n token.labelHTML.description = i18next.t(`nylasEventTitle.eventTitleTokenDescription.${titleTokens[token.label]}`);\n }\n return token;\n });\n this.filteredTokens = [...this.availableTokens];\n }\n\n @Watch('themeConfig')\n themeConfigChangedHandler(newVal: ThemeConfig, oldVal: ThemeConfig) {\n if (newVal === oldVal) return;\n this.applyThemeConfig(newVal);\n }\n\n applyThemeConfig(themeConfig?: ThemeConfig) {\n if (themeConfig) {\n for (const [key, value] of Object.entries(themeConfig)) {\n this.host.style.setProperty(`${key}`, value);\n }\n }\n }\n\n /**\n * Event emitted when the event description changes.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n connectedCallback() {\n debug('nylas-event-description', 'connectedCallback');\n // Use queueMicrotask to defer theme application until after React has set props.\n // This fixes the timing issue where connectedCallback fires before React sets themeConfig.\n queueMicrotask(() => {\n if (this.themeConfig) {\n this.applyThemeConfig(this.themeConfig);\n this.host.setAttribute('data-themed', '');\n }\n });\n }\n\n componentWillLoad() {\n debug('nylas-event-description', 'componentWillLoad');\n this.host.setAttribute('name', this.name);\n // Theme already applied in connectedCallback via queueMicrotask\n }\n\n componentDidLoad() {\n debug('nylas-event-description', 'componentDidLoad');\n if (this.selectedConfiguration) {\n this.selectedConfigurationChangedHandler(this.selectedConfiguration);\n } else {\n this.description = this.eventDescription || '';\n this.updateEventDescriptionFromProp(this.description);\n }\n }\n\n disconnectedCallback() {\n debug('nylas-event-description', 'disconnectedCallback');\n }\n\n @Listen('valueChanged', { target: 'document' })\n valueChangedHandler(event: CustomEvent<{ value: string; name: string }>) {\n const { name, value } = event.detail;\n if (name === 'additional-fields') {\n const additionalFields = JSON.parse(value.toString());\n const newKeys = Object.keys(additionalFields) || [];\n const newTokens = newKeys.map(key => {\n return {\n token: `$${key}`,\n value: `\\${${key}}`,\n description: additionalFields[key].label || '',\n };\n });\n this.additionalFieldTokens = [...newTokens];\n this.availableTokens = [...eventDescriptionTokens, ...newTokens].map(token => ({\n label: token.token,\n value: token.value,\n labelHTML: token,\n }));\n this.filteredTokens = [...this.availableTokens];\n }\n }\n\n updateEventDescriptionFromProp(newValue: string) {\n debug('nylas-event-description', 'updateEventDescriptionFromProp', newValue);\n const description = newValue || this.description;\n if (this.descriptionRef) {\n this.descriptionRef.innerHTML = this.highlightTokens(description);\n }\n }\n\n highlightTokens(description: string) {\n let outputHtml = description;\n [...eventDescriptionTokens, ...this.additionalFieldTokens].forEach(tokenObj => {\n const token = tokenObj.value;\n // Create a regular expression that matches the token as a whole word\n const regex = new RegExp(`(\\\\${token})(?!\\\\w)`, 'g');\n // Replace the token with a span element\n outputHtml = outputHtml?.replace(regex, '<span class=\"highlighted-tag\">$1</span>') || '';\n });\n return outputHtml;\n }\n\n getCurrentSelectionForBrowser() {\n const getSelectionTextData = (nodeValue, offset, node, allSelected) => {\n // Remove zero-width space characters from the text, because they are not visible and cause issues with the selection\n const text = nodeValue.replace(/[\\u200B-\\u200D\\uFEFF]/g, '');\n const dollarIndex = text.lastIndexOf('$');\n const lastWord = text.substring(dollarIndex).split(' ')[0];\n return {\n focusOffset: offset,\n dollarIndex,\n lastWord,\n currentText: text,\n node,\n allSelected,\n };\n };\n\n // Check if the selection has selected all the text in the node, we need this to handle the case where the user selects all the text and then types or deletes\n const isAllSelected = (selection: Selection) => selection.anchorOffset === 0 && selection.focusOffset === selection.focusNode?.nodeValue?.length;\n\n const currentBrowser = getBrowser();\n switch (currentBrowser) {\n case 'Chrome': {\n const shadowRootSelection = (this.host.shadowRoot as CustomShadowRoot)?.getSelection();\n const focusNode = shadowRootSelection?.focusNode;\n const focusNodeValue = focusNode?.nodeValue || '';\n const allSelected = shadowRootSelection && isAllSelected(shadowRootSelection);\n return getSelectionTextData(focusNodeValue, shadowRootSelection?.focusOffset || -1, focusNode, allSelected);\n }\n case 'Firefox': {\n const selection = document.getSelection();\n const anchorNodeValue = selection?.anchorNode?.nodeValue || '';\n const allSelectedFirefox = selection && isAllSelected(selection);\n return getSelectionTextData(anchorNodeValue, selection?.focusOffset || -1, selection?.anchorNode, allSelectedFirefox);\n }\n case 'Safari': {\n const windowSelection = window.getSelection();\n const anchorNode = (windowSelection as any)?.getComposedRanges(this.host.shadowRoot as CustomShadowRoot)[0];\n const currentText = anchorNode?.startContainer?.nodeValue || '';\n const allSelectedSafari = windowSelection && isAllSelected(windowSelection);\n return getSelectionTextData(currentText, anchorNode?.endOffset || -1, anchorNode?.startContainer, allSelectedSafari);\n }\n default: {\n debug('Browser not supported');\n return null;\n }\n }\n }\n\n handleChange(event: Event) {\n let textContent = (event.target as HTMLDivElement).textContent || '';\n textContent = sanitize(textContent);\n // All browsers handle Selection within Shadow DOM differently, so get the current selection based on the browser\n const currentSelection = this.getCurrentSelectionForBrowser();\n if (!currentSelection) {\n this.updateEventDescription(textContent);\n this.resetDropdown();\n return;\n }\n const { focusOffset, dollarIndex, lastWord, currentText } = currentSelection;\n\n if (dollarIndex === -1 || focusOffset < dollarIndex) {\n this.updateEventDescription(textContent);\n this.resetDropdown();\n return;\n }\n if (lastWord.startsWith('$')) {\n this.showTokens = true;\n // Update the current word being typed, we need this reference to update the event description with the selected token\n // because the user can select an option from the dropdown by clicking on it, which will not trigger the input event.\n this.currentWord = {\n $value: lastWord,\n fullText: currentText,\n index: dollarIndex,\n focusOffset,\n };\n this.populateSuggestionsDropdown(lastWord);\n } else {\n this.resetDropdown();\n }\n this.updateEventDescription(textContent);\n }\n\n handleInputKeyDown(event) {\n const selection = this.getCurrentSelectionForBrowser();\n\n // If no text is remaining in the description, reset the description to an empty string\n if (selection?.allSelected && !isNonPrintableKey(event)) {\n this.descriptionRef.innerHTML = '';\n }\n\n if (event.key === 'Enter') {\n event.preventDefault();\n const activeOption = this.host.shadowRoot?.getElementById(this.ariaActivedescendant);\n if (activeOption) {\n activeOption.click();\n this.ariaActivedescendant = '';\n } else {\n const textNode = selection?.node;\n const offset = selection?.focusOffset || 0;\n\n if (!textNode || offset === -1 || this.descriptionRef.childNodes.length === 0) {\n // If no text node exists or invalid selection, create new line at start\n const newTextNode = document.createTextNode('\\n');\n this.descriptionRef.insertBefore(newTextNode, this.descriptionRef.firstChild);\n\n // Set cursor after newline\n const range = document.createRange();\n range.setStart(newTextNode, 1);\n range.collapse(true);\n const sel = window.getSelection();\n sel?.removeAllRanges();\n sel?.addRange(range);\n } else if (textNode.nodeType === Node.TEXT_NODE) {\n const text = textNode.nodeValue || '';\n // Insert newline at cursor position\n const newText = text.slice(0, offset) + '\\n' + text.slice(offset);\n textNode.nodeValue = newText;\n\n // Move cursor after the newline\n const range = document.createRange();\n range.setStart(textNode, offset + 1);\n range.collapse(true);\n const sel = window.getSelection();\n sel?.removeAllRanges();\n sel?.addRange(range);\n }\n this.descriptionRef.focus();\n }\n } else if (event.key === 'ArrowDown') {\n if (this.showTokens) {\n event.preventDefault();\n }\n const activeOption = this.host.shadowRoot?.getElementById(this.ariaActivedescendant);\n if (activeOption) {\n const nextOption = activeOption.nextElementSibling;\n if (nextOption) {\n this.ariaActivedescendant = nextOption.id;\n } else {\n this.ariaActivedescendant = this.filteredTokens[0].label;\n }\n } else {\n this.ariaActivedescendant = this.filteredTokens[0].label;\n }\n } else if (event.key === 'ArrowUp') {\n if (this.showTokens) {\n event.preventDefault();\n }\n const activeOption = this.host.shadowRoot?.getElementById(this.ariaActivedescendant);\n if (activeOption) {\n const prevOption = activeOption.previousElementSibling;\n if (prevOption) {\n this.ariaActivedescendant = prevOption.id;\n } else {\n this.ariaActivedescendant = this.filteredTokens[this.filteredTokens.length - 1].label;\n }\n } else {\n this.ariaActivedescendant = this.filteredTokens[this.filteredTokens.length - 1].label;\n }\n } else if (event.key === 'Escape') {\n event.preventDefault();\n this.resetDropdown();\n } else if (event.key === 'Backspace' || event.key === 'Delete') {\n const parentNode = selection?.node?.parentNode;\n if (selection?.currentText.startsWith('${') && parentNode && parentNode.nodeName === 'SPAN') {\n event.preventDefault();\n parentNode.removeChild(selection.node);\n parentNode.remove();\n this.resetDropdown();\n }\n if (this.descriptionRef.textContent === '' || selection?.allSelected) {\n this.descriptionRef.innerHTML = '';\n this.updateEventDescription('');\n }\n }\n }\n\n selectOption(e: Event, option: { label: string; value: string; labelHTML: Token }) {\n e.preventDefault();\n const word = this.currentWord.fullText;\n const dollarWord = this.currentWord.$value;\n\n // Traverse the DOM to find the text node that contains the current word fullText\n let currentNode = this.descriptionRef.firstChild;\n let textNode: ChildNode | null = null;\n\n while (currentNode) {\n if (currentNode.nodeType === 3) {\n const currentNodeText = currentNode.textContent?.replace(/[\\u200B-\\u200D\\uFEFF]/g, '') || '';\n const wordText = word.replace(/[\\u200B-\\u200D\\uFEFF]/g, '');\n if (currentNodeText.includes(wordText)) {\n textNode = currentNode;\n break;\n }\n }\n currentNode = currentNode.nextSibling;\n }\n\n if (!textNode) {\n return;\n }\n // Split the text node into three parts: text before the token, the token, and text after the token\n const text = textNode.textContent || '';\n const index = text.indexOf(dollarWord);\n const textBefore = text.substring(0, index);\n const textAfter = text.substring(index + dollarWord.length);\n const newTextNode = document.createTextNode(textBefore);\n const newRange = document.createRange();\n\n // Create a new span element to replace the text node\n const tagSpan = document.createElement('span');\n tagSpan.classList.add('highlighted-tag');\n tagSpan.textContent = `${option.value}`;\n const newTextNodeAfter = document.createTextNode(textAfter);\n\n if (textAfter !== '') {\n // If there is text after the token, add it to the new span element\n textNode.replaceWith(newTextNode, tagSpan, newTextNodeAfter);\n newRange.setStart(newTextNodeAfter, 1);\n } else {\n // If there is no text after the token, add a zero-width space character (Without this, the cursor will not move outside the highlighted span element)\n const afterNode = document.createTextNode('\\u200B');\n textNode.replaceWith(newTextNode, tagSpan, afterNode);\n newRange.setStart(afterNode, 1);\n }\n\n // Hide the dropdown\n this.resetDropdown();\n this.descriptionRef.focus();\n\n // Set the focus to the new span element\n const sel = window.getSelection();\n newRange.collapse(true);\n sel?.removeAllRanges();\n sel?.addRange(newRange);\n\n // Update the event description with the selected token\n this.updateEventDescription(this.descriptionRef.textContent || '');\n }\n\n populateSuggestionsDropdown(query: string = '') {\n this.filteredTokens = this.availableTokens.filter(obj => {\n return obj.label.startsWith(query.toString()) || obj.value.startsWith(query.toString());\n });\n\n // Set the first option as the active descendant\n if (this.filteredTokens.length > 0) {\n this.ariaActivedescendant = this.filteredTokens[0].label;\n }\n }\n\n get isInternalsAvailable() {\n return typeof this.internals !== 'undefined' && typeof this.internals.setValidity === 'function' && typeof this.internals.setFormValue === 'function';\n }\n\n updateEventDescription(text: string) {\n const value = text.replace(/ +/g, ' ');\n this.isInternalsAvailable && this.internals?.setFormValue(value, this.name);\n this.valueChanged.emit({ value: value, name: this.name });\n }\n\n resetDropdown() {\n this.showTokens = false;\n this.ariaActivedescendant = '';\n }\n\n getLabelHTML(token: { token: string; description: string }) {\n return (\n <div class=\"token-label\">\n <span class=\"token\">{token.token}</span>\n <span class=\"description\">{token.description}</span>\n </div>\n );\n }\n\n handleAddAdditionalFields() {\n if (this.additionalFieldTokens.length === 0) {\n return;\n }\n\n // Remove any existing additional fields section while preserving content before and after\n const baseDescription = this.descriptionRef.innerHTML;\n const startMarker = '--- Additional Fields ---';\n const endMarker = '--- End Additional Fields ---';\n\n const startIndex = baseDescription.indexOf(startMarker);\n const endIndex = baseDescription.indexOf(endMarker);\n\n // Add the additional fields block with start and end markers\n let additionalFieldsBlock = startMarker + '\\n';\n this.additionalFieldTokens.forEach(token => {\n additionalFieldsBlock += `${token.description}: ${token.value}\\n`;\n });\n additionalFieldsBlock += endMarker;\n\n let description;\n if (startIndex !== -1 && endIndex !== -1) {\n // Replace existing block while maintaining text positions\n description = baseDescription.substring(0, startIndex) + additionalFieldsBlock + baseDescription.substring(endIndex + endMarker.length);\n } else {\n // First time adding the block\n description = baseDescription + additionalFieldsBlock;\n }\n\n this.updateEventDescriptionFromProp(description);\n this.updateEventDescription(description);\n }\n\n @RegisterComponent<NylasEventDescription, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-event-description',\n stateToProps: new Map([\n ['schedulerConfig.selectedConfiguration', 'selectedConfiguration'],\n ['schedulerConfig.selectedLanguage', 'selectedLanguage'],\n ['schedulerConfig.themeConfig', 'themeConfig'],\n ]),\n eventToProps: {},\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host>\n <div class=\"nylas-event-description\" part=\"nedesc\">\n <label htmlFor=\"description\">\n <p>\n {i18next.t('nylasEventDescription.headerTitle')}\n <span class=\"label-icon\">\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">{i18next.t('nylasEventDescription.tooltip.desc')}</span>\n </tooltip-component>\n </span>\n </p>\n </label>\n <div\n id=\"event-description\"\n class={{ 'event-description': true }}\n part=\"nedesc__textarea\"\n contentEditable=\"true\"\n onInput={e => this.handleChange(e)}\n onKeyDown={event => this.handleInputKeyDown(event)}\n ref={el => (this.descriptionRef = el as HTMLDivElement)}\n ></div>\n {!this.noTemplates && this.showTokens && this.filteredTokens?.length > 0 && (\n <div class=\"token-options\" part=\"nedesc__dropdown-content\">\n <ul tabindex=\"-1\" role=\"listbox\" aria-label={this.name} aria-activedescendant={this.ariaActivedescendant}>\n {this.filteredTokens.map(option => (\n <li\n tabindex=\"0\"\n key={option.label}\n id={option.label}\n class={{ active: this.ariaActivedescendant === option.label }}\n onClick={e => this.selectOption(e, option)}\n role=\"option\"\n >\n {this.getLabelHTML(option.labelHTML)}\n </li>\n ))}\n </ul>\n </div>\n )}\n {!this.noTemplates && (\n <span class=\"help-text\">\n {i18next.t('nylasEventTitle.helpText', { context: 'start', field: i18next.t('nylasEventTitle.description') })} <code>$</code>{' '}\n {i18next.t('nylasEventTitle.helpText', { context: 'end' })}\n <span class=\"label-icon\">\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" width=\"13\" height=\"13\" />\n <span slot=\"tooltip-content\">\n {i18next.t('nylasEventTitle.tooltip.desc')} <code>{'${invitee}'}</code>\n </span>\n </tooltip-component>\n </span>\n </span>\n )}\n {!this.noTemplates && !this.hideAutoPopulateButton && (\n <span class=\"add-additional-fields\">\n <button-component variant=\"basic\" onClick={() => this.handleAddAdditionalFields()}>\n {i18next.t('nylasEventDescription.addAdditionalFields.buttonText')}\n </button-component>\n <span class=\"label-icon\">\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">\n {i18next.t('nylasEventDescription.addAdditionalFields.tooltip.desc')} <code>{'${invitee}'}</code>\n </span>\n </tooltip-component>\n </span>\n </span>\n )}\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -1,2 +0,0 @@
1
- import{r as e,h as t,F as n,c as a,H as s,a as o}from"./p-0EQQA0nE.js";import{R as i}from"./p-D8VJgipo.js";import{a as r,i as l,r as c,s as d,v as b,D as p,w as f,C as y,x as h,g as u}from"./p-OpKyWV8q.js";import{E as g,u as m,v as _}from"./p-C5BO7xwe.js";import{i as v,a as w,c as k,b as x,f as C}from"./p-B8tfyAQm.js";const E=".sc-google-logo-icon-h{display:flex}";const T=class{constructor(t){e(this,t);this.width="24";this.height="24"}render(){return t("svg",{key:"33a9865778f760760ebf770633523215edf516c3",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("g",{key:"7f9bd4b06f1b97de60c01c37c5c509e776b8d6e1","clip-path":"url(#clip0_959_12452)"},t("path",{key:"dbc7d5ff82edffd7b35da27fefe16ae304f42130",d:"M23.745 12.27C23.745 11.48 23.675 10.73 23.555 10H12.255V14.51H18.725C18.435 15.99 17.585 17.24 16.325 18.09V21.09H20.185C22.445 19 23.745 15.92 23.745 12.27Z",fill:"#4285F4"}),t("path",{key:"d1bf2e40b91f0fb9e0f3deb52fe0d33bc595ccd1",d:"M12.255 24C15.495 24 18.205 22.92 20.185 21.09L16.325 18.09C15.245 18.81 13.875 19.25 12.255 19.25C9.12504 19.25 6.47505 17.14 5.52505 14.29H1.54504V17.38C3.51504 21.3 7.56504 24 12.255 24Z",fill:"#34A853"}),t("path",{key:"d87d93140cf0e41444fb1a7d84b6e47fc861765e",d:"M5.52501 14.2901C5.27501 13.5701 5.145 12.8001 5.145 12.0001C5.145 11.2001 5.28501 10.4301 5.52501 9.71012V6.62012H1.545C0.725004 8.24012 0.255005 10.0601 0.255005 12.0001C0.255005 13.9401 0.725004 15.7601 1.545 17.3801L5.52501 14.2901Z",fill:"#FBBC05"}),t("path",{key:"6eb01c2c48e94e3c817afc121931de67bde47f90",d:"M12.255 4.75C14.025 4.75 15.605 5.36 16.855 6.55L20.275 3.13C18.205 1.19 15.495 0 12.255 0C7.56504 0 3.51504 2.7 1.54504 6.62L5.52505 9.71C6.47505 6.86 9.12504 4.75 12.255 4.75Z",fill:"#EA4335"})),t("defs",{key:"d8e80696c6090b414e6a5c42c31f3ec620bd65e0"},t("clipPath",{key:"deb809cb1b5ceda12780385926828c0c60cbe4db",id:"clip0_959_12452"},t("rect",{key:"ad65b33032861fcadb6ae9bd90938647cbc0e3b7",width:24,height:24,fill:"white"}))))}};T.style=E;const S=".sc-microsoft-logo-icon-h{display:flex}";const O=class{constructor(t){e(this,t);this.width="22";this.height="22"}render(){return t("svg",{key:"0452012e39d88b7e92b3607ea38d303844addb7b",width:this.width,height:this.height,viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("path",{key:"2de410b921afe31ade8481f5b9c0379b3d7192e2",d:"M0.043457 0.043457H10.4782V10.4782H0.043457V0.043457Z",fill:"#F35325"}),t("path",{key:"9075a7a167fc9ab45e8430ccf7abcc90ea4f5130",d:"M11.5217 0.043457H21.9565V10.4782H11.5217V0.043457Z",fill:"#81BC06"}),t("path",{key:"20a99dda14586e9dccf6992c67ed5f6dd467099b",d:"M0.043457 11.5217H10.4782V21.9565H0.043457V11.5217Z",fill:"#05A6F0"}),t("path",{key:"0a9b9823f799591953e2cd972341b6bfe0a88eea",d:"M11.5217 11.5217H21.9565V21.9565H11.5217V11.5217Z",fill:"#FFBA08"}))}};O.style=S;var H;(function(e){e["EventInfo"]="eventInfo";e["Availability"]="availability";e["BookingOptions"]="bookingOptions";e["Communications"]="communications";e["Participants"]="participants";e["BookingForm"]="bookingForm";e["PageStyles"]="pageStyles"})(H||(H={}));function L({id:e,formState:a,activeTab:s,enableNotetaker:o,themeConfig:i},r){return t(n,null,t("div",{key:`event-info-${e}`,class:{hide:s!==H.EventInfo}},t("nylas-event-info",null,t("div",{slot:"inputs"},t("nylas-event-title",{name:"title",themeConfig:i,exportparts:"net, net__title, net__dropdown-content"}),t("nylas-event-duration",{name:"duration",themeConfig:i,exportparts:"ned, ned__error, ned__dropdown, ned__dropdown-button, ned__dropdown-content, ned__input_dropdown, ned__input_dropdown-input, ned__input_dropdown-content"}),t("nylas-event-location",{name:"location",themeConfig:i,exportparts:"nel, nel__location, nel__dropdown, nel__dropdown-button, nel__dropdown-content"}),t("nylas-event-description",{name:"description",themeConfig:i,exportparts:"nedesc, nedesc__textarea"}))),o&&t("nylas-notetaker-config",{name:"notetaker",conferencing:a.conferencing,themeConfig:i,exportparts:"nntc, nntc__header, nntc__section, nntc__section-title, nntc__content, nntc__input, nntc__textarea, nntc__checkbox"})),t("div",{key:`availability-${e}`,class:{hide:s!==H.Availability}},t("nylas-participant-booking-calendars",{participants:a.participants,name:"participant-booking-calendars",exportparts:"npbc, npbc__header, npbc__content, npbc__participant-container, npbc__participant-title"}),t("nylas-connected-calendars",{participants:a.participants,name:"connected-calendars",exportparts:"nccals, nccals__header, nccals__content, nccals__container, nccals__title, nccals__toggle-container, npbc__participant-toggle-container"}),t("nylas-only-specific-time-availability",{onlySpecificTimeAvailability:a.onlySpecificTimeAvailability,name:"only-specific-time-availability",exportparts:"osta, osta__header, osta__header-content, osta__header-title, osta__header-description, osta__toggle"}),a.onlySpecificTimeAvailability?null:t("nylas-availability-picker",{openHours:a.availability?.openHours,name:"availability",themeConfig:i,exportparts:"nap, nap__header, nap__select-timezone, nap__select-timezone-button, nap__select-timezone-dropdown-content, nap__availability, nap__day, nap__time-ranges, nap__time-range, nap__add-time-range, nap__time-picker-container, nap__time-picker-input, nap__time-picker-times"}),t("nylas-specific-time-availability-picker",{specificTimesAvailability:a.specificTimeAvailability,name:"specific-time-availability",themeConfig:i,exportparts:"nstap, nstap__header, nstap__content, nstap__availability, nstap__day, nstap__time-ranges, nstap__time-range, nstap__add-time-range, nstap__time-picker-container, nstap__time-picker-input, nstap__time-picker-times"})),t("div",{key:`booking-options-${e}`,class:{hide:s!==H.BookingOptions}},t("nylas-scheduling-method",{name:"availability-method",readOnly:true,themeConfig:i,exportparts:"nsm, nsm__header, nsm__input-label, nsm__dropdown, nsm__dropdown-button, nsm__dropdown-content"}),t("nylas-custom-booking-flow",{exportparts:"ncbflow, ncbflow__header, ncbflow__title, ncbflow__content"},t("div",{slot:"inputs"},t("nylas-booking-confirmation-type",{name:"confirmation-type",themeConfig:i,exportparts:"nbct, nbct__header, nbct__dropdown, nbct__dropdown-button, nbct__dropdown-content"}),t("nylas-booking-confirmation-redirect",{name:"confirmation-redirect",redirectUrl:a.redirectUrl,themeConfig:i,exportparts:"nbcr, nbcr__header, nbcr__dropdown, nbcr__dropdown-button, nbcr__dropdown-content, nbcr__input-textfield"}))),t("nylas-buffer-time",{name:"buffer-time",themeConfig:i,exportparts:"nbt, nbt__header, nbt__body, nbt__dropdown-before, nbt__dropdown-button-before, nbt__dropdown-content-before, nbt__dropdown-after, nbt__dropdown-button-after, nbt__dropdown-content-after, nbt__preview"}),t("nylas-event-limits",null,t("div",{slot:"inputs"},t("nylas-min-booking-notice",{name:"min-booking-notice",themeConfig:i,exportparts:"nmbn, nmbn__number-dropdown, nmbn__number-dropdown-button, nmbn__number-dropdown-content, nmbn__period-dropdown, nmbn__period-dropdown-button, nmbn__period-dropdown-content"}),t("nylas-limit-future-bookings",{name:"limit-future-bookings",themeConfig:i,exportparts:"nlfb, nlfb__number-dropdown, nlfb__number-dropdown-button, nlfb__number-dropdown-content, nlfb__period-dropdown, nlfb__period-dropdown-button, nlfb__period-dropdown-content"}),t("nylas-min-cancellation-notice",{name:"min-cancellation-notice",themeConfig:i,exportparts:"nmcn, nmcn__number-dropdown, nmcn__number-dropdown-button, nmcn__number-dropdown-content, nmcn__period-dropdown, nmcn__period-dropdown-button, nmcn__period-dropdown-content"}),t("nylas-cancellation-policy",{name:"cancellation-policy",exportparts:"ncpolicy, ncpolicy__textarea"}))),t("nylas-timeslot-interval",{name:"timeslot-interval",themeConfig:i,exportparts:"nti, nti__header, nti__input-label, nti__dropdown, nti__dropdown-button, nti__dropdown-content"}),t("nylas-customize-booking-settings",{name:"customize-booking-settings",themeConfig:i,exportparts:"ncbs, ncbs__header, ncbs__settings, ncbs__settings-div, ncbs__additional_guests, ncbs__cancellation_options, ncbs__rescheduling_options"})),t("div",{key:`communications-${e}`,class:{hide:s!==H.Communications}},t("nylas-disable-emails",{name:"disable-emails",themeConfig:i,exportparts:"nde, nde__toggle-label, nde_toggle-input, nde_toggle-slider"}),!a?.disableEmails&&t(n,null,t("nylas-confirmation-email",{name:"confirmation-email-template",themeConfig:i,exportparts:"nce, nce__tab-heading, nce__header, nce__body, nce__confirmation-email-toggle--container, nce__summary, nce__reminder-input_dropdown, nce__reminder-input_dropdown-input, nce__reminder-input_dropdown-content"}),t("nylas-reminder-emails",{name:"reminder-overrides",themeConfig:i,exportparts:"nre, nre__tab-heading, nre__header, nre__body, nre__confirmation-email-toggle--container, nre__summary, nrt, nrt__number-dropdown, nrt__number-dropdown-button, nrt__number-dropdown-content, nrt__period-dropdown, nrt__period-dropdown-button, nrt__period-dropdown-content, nrt__time-period-selector"}))),t("div",{key:`participants-${e}`,class:{hide:s!==H.Participants}},t("nylas-additional-participants",{name:"participants",themeConfig:i,exportparts:"nadtnlpart, nadtnlpart__title, nadtnlpart__subtitle, nadtnlpart__content, nadtnlpart__input_group, nadtnlpart__input_wrapper, nadtnlpart__input, nadtnlpart__remove-participant"}),t("nylas-participants-custom-availability",{participants:a.participants,name:"participant-custom-availability",themeConfig:i,exportparts:"npca, npca__header, npca__content, npca__participant-container, npca__participant-title, npca__participant-toggle--container, npca__toggle-label, npca__toggle-input, npca__toggle-slider"})),t("div",{key:`page-styles-${e}`,class:{hide:s!==H.PageStyles}},t("nylas-custom-event-slug",{name:"custom-event-slug",themeConfig:i,exportparts:"nces, nces__body, nces__header, nces__drawer-toggle--container, nces__input-textfield"}),t("nylas-page-name",{name:"page-name",themeConfig:i,exportparts:"npn, npn__body, npn__header, npn__drawer-toggle--container, npn__input-textfield"}),t("nylas-page-styling",{name:"page-styling",themeConfig:i,exportparts:"nps, nps__header, nps__drawer-toggle--container, nps__body, nps__title-input-textfield, nps__company-logo-input-textfield, nps__color-picker, nps__color-picker-button, nps__color-picker-button-label, nps__color-picker-selected-label, nps__submit-button-label-input-textfield, nps__message-textarea"},r)),t("div",{key:`booking-form-${e}`,class:{hide:s!==H.BookingForm}},t("nylas-booking-form-config",{name:"additional-fields",themeConfig:i,exportparts:"nbfc, nbfc__header, nbfc__add_field, nbfc__add_field-button, nbfc__add_field-content, nbfc__static_fields, nbfc__additional_fields, nbfc__form-field, nbfc__form-field-header, nbfc__form-field-content"})))}const z='.sc-nylas-editor-tabs-h{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-50:#ffeae8;--nylas-error-100:#ffc5bf;--nylas-error-200:#fecaca;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff}.scheduler-editor.sc-nylas-editor-tabs{display:flex;flex-direction:column;height:inherit}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs{height:calc(100% - 80px);display:grid;grid-template-columns:minmax(224px, 25%) 1fr}@media screen and (max-width: 768px){.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs{display:table-column-group;height:auto}}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs{display:flex;flex-direction:column;border-right:1px solid var(--nylas-base-200);background-color:var(--nylas-base-25)}@media screen and (max-width: 768px){.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs{border-right:none}}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.sc-nylas-editor-tabs{display:flex;align-items:center;text-align:left;gap:0.5rem;padding:0.5rem 1rem;color:var(--nylas-base-900);background:var(--nylas-base-0);border:none;height:56px;font-family:var(--nylas-font-family);font-size:16px;font-weight:500;line-height:24px;cursor:pointer}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.sc-nylas-editor-tabs:not(:first-of-type){margin-top:0.25rem}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.sc-nylas-editor-tabs:last-of-type{margin-bottom:0.25rem}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.active.sc-nylas-editor-tabs{font-weight:600;background:var(--nylas-base-0);color:var(--nylas-primary);border-left:4px solid var(--nylas-primary);box-shadow:0px 1px 2px 0px rgba(0, 0, 0, 0.0588235294);box-shadow:0px 1px 3px 0px rgba(0, 0, 0, 0.1019607843)}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.hide.sc-nylas-editor-tabs{display:none}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs{max-width:692px;overflow-y:auto;overflow-x:hidden;transition:opacity 0.05s ease-in;opacity:0}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.fadeIn.sc-nylas-editor-tabs{opacity:1}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs .hide.sc-nylas-editor-tabs{display:none}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-info.sc-nylas-editor-tabs,.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-limits.sc-nylas-editor-tabs{width:inherit}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-info.sc-nylas-editor-tabs div[slot=inputs].sc-nylas-editor-tabs,.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-limits.sc-nylas-editor-tabs div[slot=inputs].sc-nylas-editor-tabs{display:flex;flex-direction:column;gap:1rem}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs .tab-header.sc-nylas-editor-tabs{display:flex;flex-direction:column;margin:1rem 1rem 0.5rem;row-gap:4px}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs .tab-header.sc-nylas-editor-tabs h3.sc-nylas-editor-tabs{margin:0;font-size:16px;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs .tab-header.sc-nylas-editor-tabs p.sc-nylas-editor-tabs{margin:0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.footer.sc-nylas-editor-tabs{display:flex;justify-content:space-between;align-items:center;gap:1rem;min-height:80px;padding:0 1rem;border-top:1px solid var(--nylas-base-200)}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs{flex-direction:column;height:auto}}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs .preview.sc-nylas-editor-tabs{margin-top:1rem;width:100%}}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs{display:flex;justify-content:flex-end;align-items:center;justify-self:flex-end;gap:1rem}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs{flex-direction:column-reverse;width:100%}}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.sc-nylas-editor-tabs{max-width:524px}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.unsaved-changes.sc-nylas-editor-tabs{color:var(--nylas-base-600)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.saved-changes.sc-nylas-editor-tabs{color:var(--nylas-success)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.error.sc-nylas-editor-tabs{color:var(--nylas-error)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.error-full-width.sc-nylas-editor-tabs{max-width:660px}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button-component.sc-nylas-editor-tabs{width:100%}}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs{background:var(--nylas-primary);color:var(--nylas-base-0);height:48px;border:none;border-radius:var(--nylas-border-radius-2x);font-size:16px;line-height:24px;padding:0 1rem;cursor:pointer;width:148px}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs:hover{background:var(--nylas-base-600)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs:active{background:var(--nylas-base-800)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs:disabled{background:var(--nylas-base-300);cursor:not-allowed}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs span.sc-nylas-editor-tabs{display:flex;align-items:center;justify-content:center;gap:0.5rem}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button-component.save-changes.sc-nylas-editor-tabs{min-width:140px}button-component#report-issue.sc-nylas-editor-tabs{width:auto}nylas-feedback-form.sc-nylas-editor-tabs{position:absolute;top:0;height:100%;width:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;background:rgba(0, 0, 0, 0.6);z-index:2;border-radius:inherit}';var F=undefined&&undefined.__decorate||function(e,t,n,a){var s=arguments.length,o=s<3?t:a===null?a=Object.getOwnPropertyDescriptor(t,n):a,i;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,n,a);else for(var r=e.length-1;r>=0;r--)if(i=e[r])o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o;return s>3&&o&&Object.defineProperty(t,n,o),o};var N=undefined&&undefined.__metadata||function(e,t){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(e,t)};const j=class{constructor(t){e(this,t);this.schedulerConfigChanged=a(this,"schedulerConfigChanged",7);this.schedulerConfigCreated=a(this,"schedulerConfigCreated",7);this.cancelButtonClick=a(this,"cancelButtonClick",7);this.formSubmitted=a(this,"formSubmitted",7);this.previewButtonClicked=a(this,"previewButtonClicked",7);this.schedulerEditorFormUpdated=a(this,"schedulerEditorFormUpdated",7);this.nylasSchedulerError=a(this,"nylasSchedulerError",6);this.dismissNotification=a(this,"dismissNotification",7);this.schedulerPreviewLink="";this.mode="app";this.hideEditorTabs=[];this.enableUserFeedback=true;this.enableNotetaker=false;this.action="create";this.showFeedbackModal=false;this.activeTab=H.EventInfo;this.isLoading=false;this.hasUnsavedChanges=false;this.changesSaved=false;this.loaded=false;this.formState={};this.error={message:"",type:m.Error,category:g.Component,title:""};this.formSubmissionHandler=async e=>{e.preventDefault();const t=await this.formSubmitted.emit();r("[nylas-editor-tabs]","formSubmissionHandler",t);const n=this.formRef.checkValidity();if(!n||t.defaultPrevented){this.setError({message:this.formRef.validationMessage||l.t("fixFormErrors"),type:m.Error,category:g.Component,title:l.t("nylasEditorTabs.formErrorTitle")});return}this.isLoading=true;this.hasUnsavedChanges=false;const a=this.updateFormState();r("[nylas-editor-tabs]","formState",a);const{title:s,description:o,duration:i,availability:b,specificTimeAvailability:f,onlySpecificTimeAvailability:h,bookingCalendar:u,location:_,bookingType:v,buffer:w,availableDaysInFuture:k,minCancellationNotice:x,minBookingNotice:C,cancellationPolicy:E,timeslotInterval:T,additionalGuestsHidden:S,hideCancellationOptions:O,hideReschedulingOptions:H,participants:L,participantOpenHours:z,participantSpecificTimeAvailability:F,participantOnlySpecificTimeAvailability:N,additionalFields:j,participantCalendars:B,conferencing:P,participantBookingCalendars:I,reminders:R,emailTemplate:G,redirectUrl:$,availabilityMethod:J,slug:M,appearance:U,name:D,disableEmails:A,organizerLocale:V,notetaker:q}=a;const W=this.selectedConfiguration?.participants?.find((e=>e.is_organizer))||L?.find((e=>e.is_organizer));const Z=B&&W?.email?B[W?.email]:[];const Q=W?.booking?.calendar_id||u;const K=i?parseInt(i):30;const X=L&&L?.length>0?L:[{name:W?.name??this.currentUser?.name??"",email:W?.email??this.currentUser?.email??"",is_organizer:true,...W?.grant_id||this.selectedConfiguration?.participants?.find((e=>e.is_organizer))?.grant_id?{grant_id:W?.grant_id||this.selectedConfiguration?.participants?.find((e=>e.is_organizer))?.grant_id}:{},timezone:b?.timezone??Intl.DateTimeFormat().resolvedOptions().timeZone,availability:{calendar_ids:u&&u!==""?[u]:["primary"],open_hours:[]},booking:{calendar_id:u&&u!==""?u:"primary"}}];let Y=J?J:this.selectedConfiguration?.availability?.availability_rules?.availability_method??"collective";if(this.selectedEventType&&this.selectedEventType!==y.group){Y=this.selectedEventType===y.one_on_one?y.collective:this.selectedEventType}const ee={...this.selectedConfiguration?.id&&{id:this.selectedConfiguration.id},version:this.selectedConfiguration?.version??"1.0.0",slug:M,name:D,availability:{duration_minutes:K,interval_minutes:T?.interval??K,round_to:T?.roundTo,availability_rules:{default_specific_time_availability:f??[],only_specific_time_availability:h??false,availability_method:Y,buffer:w||{before:0,after:0},default_open_hours:b?.openHours??this.selectedConfiguration?.availability?.availability_rules?.default_open_hours??p,round_robin_group_id:this.selectedConfiguration?.availability?.availability_rules?.round_robin_group_id??""}},participants:[...X?X.map((e=>{const t=F?.[e.email]??e.specific_time_availability??[];let n=b?.timezone??Intl.DateTimeFormat().resolvedOptions().timeZone;if(z?.[e.email]?.length){n=z?.[e.email]?.[0]?.timezone}else if(t.length>0){const e=t.find((e=>e.timezone))?.timezone;if(e){n=e}}const a=t.map((e=>({...e,timezone:n})));if(e.is_organizer){const t=I?.[e.email]?I?.[e.email]:Q?Q:"primary";const s=B?.[e.email]?B?.[e.email]:Z?.length?Z:["primary"];const o=s.length===1&&s[0]==="primary";const i=e.grant_id||this.selectedConfiguration?.participants?.find((t=>t.email===e.email))?.grant_id;return{name:e.name??"",email:e.email,is_organizer:true,...i?{grant_id:i}:{},timezone:n,availability:{calendar_ids:o?[t]:s,open_hours:z?.[e.email]??e.availability?.open_hours??[]},specific_time_availability:a,only_specific_time_availability:N?.[e.email]??e.only_specific_time_availability??false,booking:{calendar_id:t}}}const s=I?.[e.email]?{calendar_id:I?.[e.email]}:e?.booking??undefined;const o=B?.[e.email]??e.availability?.calendar_ids??["primary"];const i=o.length===1&&o[0]==="primary";const r=e.grant_id||this.selectedConfiguration?.participants?.find((t=>t.email===e.email))?.grant_id;return{...e,...r?{grant_id:r}:{},timezone:n,availability:e.availability?{calendar_ids:i&&typeof s!=="undefined"?[s?.calendar_id]:o,open_hours:z?.[e.email]??e.availability?.open_hours??[]}:undefined,booking:s,specific_time_availability:a,only_specific_time_availability:N?.[e.email]??e.only_specific_time_availability??false}})):[]],event_booking:{title:s?.toString()??"",description:o?.toString()??"",location:_?.toString()??"",booking_type:v?.toString()??"booking",timezone:b?.timezone??Intl.DateTimeFormat().resolvedOptions().timeZone,conferencing:P,reminders:R,disable_emails:typeof A==="boolean"?A:false},scheduler:{cancellation_policy:E??"",available_days_in_future:k??30,min_cancellation_notice:x??0,min_booking_notice:C??60,hide_additional_guests:S??false,hide_cancellation_options:O??false,hide_rescheduling_options:H??false,additional_fields:j,email_template:G?{...G,organizer_locale:V||"en",logo:G.logo||""}:undefined,confirmation_redirect_url:$,notetaker_settings:q},appearance:U};const te=c(this.selectedConfiguration,d(ee||{}));const ne=te;if(this.isConfigRoundRobin(ne)){ne.participants=ne.participants.map((e=>({...e,is_organizer:undefined})))}const ae=e=>{this.isLoading=false;this.changesSaved=true;setTimeout((()=>{this.changesSaved=false}),5e3)};const se=this.checkForBookingFormErrors(ne);const oe=this.configurations?.find((e=>e.id===this.selectedConfiguration?.id))||{};const ie=this.checkForOrganizerConfirmationError(c(ne,oe));if(se||ie){return}this.schedulerConfigChanged.emit({config:ne,resetLoadingState:ae,action:this.action,host:this.host})};this.isConfigRoundRobin=e=>e?.availability?.availability_rules?.availability_method==="max-availability"||e.availability?.availability_rules?.availability_method==="max-fairness";this.checkForOrganizerConfirmationError=e=>{let t=false;let n="";const a=e.event_booking?.booking_type==="organizer-confirmation";const s=e.scheduler?.organizer_confirmation_url;if(a&&!s){n+="Organizer confirmation URL is required when using organizer confirmation booking type.";t=true}if(t){this.isLoading=false;this.host.setError({message:n,type:m.Error,category:g.Component,title:"Error:"})}return t};this.checkForBookingFormErrors=e=>{let t=false;let n="";const a=e.scheduler?.additional_fields;if(a){n="";Object.entries(a).forEach((e=>{const a=e[1];if(a.label===""){n+=l.t("nylasEditorTabs.bookingFormError_label",{type:a.type});t=true;return}if(a.options){for(const e of a.options){if(e.trim()===""){n+=l.t("nylasEditorTabs.bookingFormError_option",{label:a.label,type:a.type});t=true;break}}}}))}if(t){this.isLoading=false;this.host.setError({message:n,type:m.Error,category:g.Component,title:l.t("nylasEditorTabs.bookingFormError")})}return t}}configChangedHandler(e){r("[nylas-editor-tabs]","configChangedHandler",e,this.selectedConfiguration);this.formState={...this.getFormStateFromConfig(e)};if(e?.id){this.action="edit"}else{this.action="create"}}userChangedHandler(e){r("[nylas-editor-tabs]","userChangedHandler",e);if(e){this.formState={...this.getFormStateFromConfig(this.selectedConfiguration)}}}selectedLanguageChangedHandler(e,t){if(e===t)return;l.changeLanguage(e);if(this.error&&this.error.message){this.error={...this.error,message:l.t("fixFormErrors")};this.showErrorNotification(this.error)}}themeConfigChangedHandler(e,t){if(e===t)return;this.applyThemeConfig(e)}applyThemeConfig(e){if(e){for(const[t,n]of Object.entries(e)){this.host.style.setProperty(`${t}`,n)}}}async schedulerConfigCreatedEventHandler(e){const t=this.schedulerConfigCreated.emit(e);return t}async setError(e){this.error={message:e.message,type:e.type,category:e.category,title:e.title||l.t("genericErrorTitle")};if(this.error?.message){this.showErrorNotification(this.error)}}async resetError(){if(this.error?.message){this.dismissNotification.emit({id:this.error?.message.split(" ").join("-"),host:this.host})}this.error={message:"",type:m.Error,category:g.Component,title:""}}connectedCallback(){r("[nylas-editor-tabs]","connectedCallback");queueMicrotask((()=>{if(this.themeConfig){this.applyThemeConfig(this.themeConfig);this.host.setAttribute("data-themed","")}}))}componentWillLoad(){r("[nylas-editor-tabs]","componentWillLoad");this.formState=this.getFormStateFromConfig(this.selectedConfiguration)}componentDidLoad(){r("[nylas-editor-tabs]","componentDidLoad");if(this.enableUserFeedback&&!v()){w({dsn:"https://9d5731f1c77ca84c9ed3fb9b3ccf7ee1@o74852.ingest.us.sentry.io/4507889638178816",release:_,integrations:e=>[...e.filter((e=>false)),C({colorScheme:"system",autoInject:false})],autoSessionTracking:false,beforeSend:()=>null})}if(this.selectedConfiguration?.id){this.configChangedHandler(this.selectedConfiguration)}const e=this.host.querySelector("button.tab:not(.hide)")?.name;if(e){this.activeTab=e}this.loaded=true}disconnectedCallback(){r("[nylas-editor-tabs]","disconnectedCallback")}handleValueChanged(e){r("[nylas-editor-tabs]","handleValueChanged",e);const{name:t,value:n}=e.detail;r("name",t,"value",n);this.setFormState(n,t);this.formState={...this.formState};this.resetError();if(b.includes(t)){this.hasUnsavedChanges=true}this.schedulerEditorFormUpdated.emit({value:e.detail.value,name:e.detail.name})}feedbackModalClosedHandler(){this.showFeedbackModal=false}feedbackSubmittedHandler(e){k("Scheduler Editor User Feedback",{extra:{configId:this.selectedConfiguration?.id,slug:this.selectedConfiguration?.slug}});const t={message:e.detail.feedback};x(t,{includeReplay:true,captureContext:{tags:{"nylas-web-element":"nylas-scheduler-editor","nylas-web-element-version":_,"nylas-config-id":this.selectedConfiguration?.id,"nylas-slug":this.selectedConfiguration?.slug,"host-url":window.location.href},extra:{configId:this.selectedConfiguration?.id,slug:this.selectedConfiguration?.slug}}});this.showFeedbackModal=false}showErrorNotification(e){if(e.message){this.nylasSchedulerError.emit({notification:{title:e.title,category:e.category||g.Component,type:e.type||m.Error,description:e.message,id:e.message.split(" ").join("-"),ttl:"none"},host:this.host})}}getFormStateFromConfig(e){let t=e?.participants?.find((e=>e.is_organizer));if(!t&&e?.availability?.availability_rules?.availability_method!=="collective"){const n=e?.participants?.find((e=>e.email===this.currentUser?.email));if(n){t={...n,is_organizer:true}}}if(e?.appearance){r("[nylas-editor-tabs]","getFormStateFromConfig","Appearance settings have been returned from the given configuration; please remember to grab them from the configSettingsLoaded event and apply them as desired.")}return{title:e?.event_booking?.title??"",description:e?.event_booking?.description??"",duration:e?.availability?.duration_minutes?.toString()??"30",availability:{timezone:e?.event_booking?.timezone??Intl.DateTimeFormat().resolvedOptions().timeZone,openHours:e?.availability?.availability_rules?.default_open_hours??p},specificTimeAvailability:e?.availability?.availability_rules?.default_specific_time_availability??[],onlySpecificTimeAvailability:e?.availability?.availability_rules?.only_specific_time_availability??false,additionalFields:e?.scheduler?.additional_fields??{},conferencing:e?.event_booking?.conferencing??{},calendarIds:t?.availability?.calendar_ids??[],participants:t?(e?.participants??[]).map((e=>e.email===t.email?{...e,is_organizer:true}:e)):e?.participants??[],bookingCalendar:t?.booking?.calendar_id??t?.email??"",location:e?.event_booking?.location??"",bookingType:e?.event_booking?.booking_type??"booking",buffer:e?.availability?.availability_rules?.buffer??{before:0,after:0},cancellationPolicy:e?.scheduler?.cancellation_policy??"",availableDaysInFuture:e?.scheduler?.available_days_in_future??30,minCancellationNotice:e?.scheduler?.min_cancellation_notice??0,minBookingNotice:e?.scheduler?.min_booking_notice??60,timeslotInterval:{interval:e?.availability?.interval_minutes??e?.availability?.duration_minutes,roundTo:e?.availability?.round_to},additionalGuestsHidden:e?.scheduler?.hide_additional_guests??false,hideCancellationOptions:e?.scheduler?.hide_cancellation_options??false,hideReschedulingOptions:e?.scheduler?.hide_rescheduling_options??false,participantBookingCalendars:(e?.participants??[]).reduce(((e,t)=>{if(t.booking?.calendar_id){e[t.email]=t.booking.calendar_id}return e}),{}),participantCalendars:e?.participants?.reduce(((e,t)=>{e[t.email]=t.availability?.calendar_ids;return e}),{})??{},reminders:e?.event_booking?.reminders,emailTemplate:e?.scheduler?.email_template,redirectUrl:e?.scheduler?.confirmation_redirect_url,slug:e?.slug,appearance:e?.appearance,name:e?.name,disableEmails:e?.event_booking?.disable_emails,organizerLocale:e?.scheduler?.email_template?.organizer_locale,notetaker:e?.scheduler?.notetaker_settings?e.event_booking?.conferencing?.provider?e.scheduler.notetaker_settings:{...e.scheduler.notetaker_settings,enabled:false}:undefined}}setFormState(e,t){switch(t){case"title":this.formState.title=e.toString();break;case"description":this.formState.description=e.toString();break;case"duration":this.formState.duration=e.toString();break;case"availability":this.formState.availability=JSON.parse(e.toString());break;case"specific-time-availability":this.formState.specificTimeAvailability=JSON.parse(e.toString());break;case"only-specific-time-availability":{const{enableSpecificTimeAvailability:t}=JSON.parse(e.toString());this.formState.onlySpecificTimeAvailability=t;break}case"participants":this.formState.participants=JSON.parse(e.toString());break;case"booking-calendar":this.formState.bookingCalendar=e.toString();break;case"participant-booking-calendars":this.formState.participantBookingCalendars=JSON.parse(e.toString());break;case"location":this.formState.location=e.toString();break;case"conference":{const t=JSON.parse(e.toString());this.formState.conferencing=t;if(!t||!t.provider){const e=this.formState.notetaker?{...this.formState.notetaker,enabled:false}:{enabled:false};this.formState.notetaker=e;this.formState={...this.formState};this.schedulerEditorFormUpdated.emit({value:JSON.stringify(e),name:"notetaker"})}break}case"confirmation-type":this.formState.bookingType=e.toString();break;case"buffer-time":this.formState.buffer=JSON.parse(e.toString());break;case"limit-future-bookings":this.formState.availableDaysInFuture=parseInt(e.toString());break;case"min-cancellation-notice":this.formState.minCancellationNotice=parseInt(e.toString());break;case"min-booking-notice":this.formState.minBookingNotice=parseInt(e.toString());break;case"cancellation-policy":this.formState.cancellationPolicy=e.toString();break;case"timeslot-interval":this.formState.timeslotInterval=JSON.parse(e.toString());break;case"customize-booking-settings":{const t=JSON.parse(e.toString());this.formState.additionalGuestsHidden=t.additionalGuestsHidden;this.formState.hideCancellationOptions=t.hideCancellationOptions;this.formState.hideReschedulingOptions=t.hideReschedulingOptions;break}case"participant-custom-availability":{const t=JSON.parse(e.toString());this.formState.participantOpenHours=t;break}case"participant-custom-availability-specific-time":{const t=JSON.parse(e.toString());this.formState.participantSpecificTimeAvailability=t;break}case"participant-custom-availability-only-specific-time":{const t=JSON.parse(e.toString());this.formState.participantOnlySpecificTimeAvailability=t;break}case"additional-fields":this.formState.additionalFields=JSON.parse(e.toString());break;case"connected-calendars":this.formState.participantCalendars=JSON.parse(e.toString());break;case"confirmation-email-template":this.formState.emailTemplate=JSON.parse(e.toString());break;case"disable-emails":{const{disableEmails:t,organizerLocale:n}=JSON.parse(e.toString());this.formState.disableEmails=t;this.formState.organizerLocale=n;break}case"reminder-overrides":this.formState.reminders=JSON.parse(e.toString());break;case"confirmation-redirect":this.formState.redirectUrl=e.toString();break;case"availability-method":this.formState.availabilityMethod=e.toString();break;case"custom-event-slug":this.formState.slug=JSON.parse(e.toString());break;case"page-styling":this.formState.appearance=JSON.parse(e.toString());break;case"page-name":this.formState.name=JSON.parse(e.toString());break;case"notetaker":{const t=e.toString();if(t==="null"||t===""){this.formState.notetaker=undefined}else{this.formState.notetaker=JSON.parse(t)}break}}this.schedulerEditorFormUpdated.emit({value:e,name:t})}updateFormState(){const e=new FormData(this.formRef);e.forEach(((e,t)=>{this.setFormState(e,t)}));this.formState={...this.formState};return this.formState}setActiveTab(e,t){e.preventDefault();this.updateFormState();this.activeTab=t}hideTab(e){return this.hideEditorTabs?.includes(e)||false}onFeedbackClick(e){e.preventDefault();this.showFeedbackModal=true}render(){r("[nylas-editor-tabs]","render",this.formState);return t(s,{key:"53e8f207370316a20260e8c9d5a62546efa70c22"},t("nylas-notification",{key:"3dba6d5e4d6549d7c7afc84543a7de36b5e9565a"}),t("form",{key:"b159d7794cdd2b4747df5b1eb971cc949599d56f",onSubmit:this.formSubmissionHandler,class:"scheduler-editor",ref:e=>this.formRef=e,noValidate:true},this.mode==="app"?t("div",{class:"form-contents",part:"editor__form-contents net__form-contents"},t("div",{class:"tabs",part:"editor__tabs net__tabs"},t("button",{name:H.EventInfo,class:{tab:true,active:this.activeTab==H.EventInfo,hide:this.hideTab(H.EventInfo)},part:"editortab__event-info net__tab-event-info",onClick:e=>this.setActiveTab(e,H.EventInfo)},t("calendar-info-icon",{width:"16",height:"16"}),l.t("eventInfoTab")),t("button",{name:H.Availability,class:{tab:true,active:this.activeTab==H.Availability,hide:this.hideTab(H.Availability)},part:"editortab__availability net__tab-availability",onClick:e=>this.setActiveTab(e,H.Availability)},t("calendar-patterns-icon",{width:"16",height:"16"}),l.t("availabilityTab")),t("button",{name:H.Participants,class:{tab:true,active:this.activeTab==H.Participants,hide:this.hideTab(H.Participants)},part:"editortab__participants net__tab-participants",onClick:e=>this.setActiveTab(e,H.Participants)},t("people-icon",{width:"16",height:"16"}),l.t("participantsTab")),t("button",{name:H.BookingOptions,class:{tab:true,active:this.activeTab==H.BookingOptions,hide:this.hideTab(H.BookingOptions)},part:"editortab__booking-options net__tab-booking-options",onClick:e=>this.setActiveTab(e,H.BookingOptions)},t("flow-icon",{width:"16",height:"16"}),l.t("bookingOptionsTab")),t("button",{name:H.BookingForm,class:{tab:true,active:this.activeTab=="bookingForm",hide:this.hideTab(H.BookingForm)},part:"editortab__booking-form net__tab-booking-form",onClick:e=>this.setActiveTab(e,H.BookingForm)},this.activeTab==H.BookingForm?t("calendar-agenda-fill-icon",{width:"16",height:"16"}):t("calendar-agenda-icon",{width:"16",height:"16"}),l.t("bookingFormTab")),t("button",{name:H.Communications,class:{tab:true,active:this.activeTab=="communications",hide:this.hideTab(H.Communications)},onClick:e=>this.setActiveTab(e,H.Communications),part:"editortab__communications net__tab-communications"},this.activeTab==H.Communications?t("envelope-fill-icon",{width:"16",height:"16"}):t("envelope-icon",{width:"16",height:"16"}),l.t("communicationsTab")),t("button",{name:H.PageStyles,class:{tab:true,active:this.activeTab=="pageStyles",hide:this.hideTab(H.PageStyles)},onClick:e=>this.setActiveTab(e,H.PageStyles),part:"editortab__page-styles net__tab-page-styles"},this.activeTab==H.PageStyles?t("paintbrush-fill-icon",{width:"16",height:"16"}):t("paintbrush-icon",{width:"16",height:"16"}),l.t("pageStylesTab"))),t("div",{class:{"tab-content":true,fadeIn:this.loaded},part:"editor__tab-content net__tab-content"},t(L,{formState:this.formState,activeTab:this.activeTab,currentUser:this.currentUser,calendars:this.calendars,id:this.selectedConfiguration?.id??"new",i18next:l,enableNotetaker:this.enableNotetaker,themeConfig:this.themeConfig}))):t("div",{class:"composable",key:this.selectedConfiguration?.id},t("slot",null)),t("div",{key:"89c5898f878016e7f948d163abe29ca754009ecd",class:"footer",part:"editor__footer net__footer"},t("div",{key:"f03899ff4f65cc1d3ca1eccc741721e64b14f5b7",class:"preview",part:"editor__footer-preview net__footer-preview"},this.enableUserFeedback&&t("button-component",{key:"f16d904cb742a131095fa70c2348bec8c81e1f29",title:"Share your feedback",id:"report-issue",variant:"basic",onClick:e=>this.onFeedbackClick(e)},t("feedback-icon",{key:"06e12b85432d63d275687a69dbd8c507d66408b6"}))),t("div",{key:"d0f09f33a68578be3541cbd71f92f9f710701858",class:"buttons",part:"editor__footer-buttons net__footer-buttons"},t("p",{key:"628ccfdddad773509ac6e73613c8e4879d627553",class:{"unsaved-changes":this.hasUnsavedChanges&&!this.changesSaved,"saved-changes":this.changesSaved,error:this.error?.message!=="","error-full-width":this.error?.message!==""&&this.action==="create"}},this.error?.message==""&&this.hasUnsavedChanges&&!this.changesSaved?l.t("unsavedChangesLabel"):this.error?.message==""&&this.changesSaved?`${l.t("changesSavedLabel")}!`:""),this.schedulerPreviewLink!==""&&this.action==="edit"&&t("button-component",{key:"cf3a48e6fd19209a8a87e30a7ab5639d439dbbc9",title:"Preview",type:"button",disabled:this.isLoading,clickHandler:e=>{e.preventDefault();const t=this.previewButtonClicked.emit(this.host);if(!t.defaultPrevented){window.open(f(this.schedulerPreviewLink,this.selectedConfiguration),"_blank")}},variant:"basic"},t("eye-icon",{key:"88a8aeafbefc9d21c5e2f10ebe43fd7308b7f2f0"})),t("button-component",{key:"8377521f43f7050fd5b06fbee24e0c434d80bccc",type:"button",disabled:this.isLoading,clickHandler:e=>{e.preventDefault();this.cancelButtonClick.emit();this.host.resetError()},variant:"basic",part:"editor__footer-cancel net__footer-cancel"},l.t("cancelButton")),t("button-component",{key:"5f3393800e9a0499cc538fffdee07005aa15bdba",class:{"save-changes":this.action==="edit"},type:"submit",disabled:this.isLoading,part:"editor__footer-cta, net__footer-cta"},this.isLoading?t("span",null,l.t("savingButtonText"),t("loading-icon",null)," "):this.action==="create"?`${l.t("createButtonText")}`:`${l.t("saveChangesButtonText")}`)))),this.showFeedbackModal&&t("nylas-feedback-form",{key:"4abad08be25f4ff177f564d54d701d53cce8bba3"}))}get host(){return o(this)}static get watchers(){return{selectedConfiguration:["configChangedHandler"],currentUser:["userChangedHandler"],selectedLanguage:["selectedLanguageChangedHandler"],themeConfig:["themeConfigChangedHandler"]}}};F([i({name:"nylas-editor-tabs",stateToProps:new Map([["schedulerConfig.calendars","calendars"],["schedulerConfig.selectedConfiguration","selectedConfiguration"],["schedulerConfig.currentUser","currentUser"],["schedulerConfig.configurations","configurations"],["schedulerConfig.selectedLanguage","selectedLanguage"],["schedulerConfig.selectedEventType","selectedEventType"],["schedulerConfig.themeConfig","themeConfig"]]),eventToProps:{schedulerConfigChanged:async(e,t)=>{const{resetLoadingState:n,host:a,action:s,config:o}=e.detail;const i=(o,i)=>{const[r,c]=o;if(!r&&c){a.setError({message:c.message||l.t("genericErrorTitle"),type:m.Error,category:g.Component,title:i})}else if(r&&!c&&s==="create"){a.schedulerConfigCreatedEventHandler({config:r,action:s,host:a});t.schedulerConfigStore.set("selectedEventType",undefined)}if(n){n(e)}};if(s==="edit"){const e=await t.schedulerConfig.updateConfiguration(o);i(e,l.t("nylasEditorTabs.updateConfigError"))}else{const e=await t.schedulerConfig.createConfiguration(o);i(e,l.t("nylasEditorTabs.createConfigError"))}},cancelButtonClick:async(e,t)=>{t.schedulerConfigStore.state.action=null;t.schedulerConfigStore.set("selectedEventType",undefined)},previewButtonClicked:async(e,t)=>{r("[nylas-editor-tabs]","previewButtonClicked",t)},formSubmitted:async(e,t)=>{r("[nylas-editor-tabs]","formSubmitted",t)},schedulerEditorFormUpdated:async(e,t)=>{r("[nylas-editor-tabs]","schedulerEditorFormUpdated",e)},schedulerConfigCreated:async(e,t)=>{r("[nylas-editor-tabs]","schedulerConfigCreated",e)}},localPropsToProp:new Map([["schedulerPreviewLink","schedulerPreviewLink"],["enableUserFeedback","enableUserFeedback"],["hideEditorTabs","hideEditorTabs"],["enableNotetaker","enableNotetaker"]]),fireRegisterEvent:true}),N("design:type",Function),N("design:paramtypes",[]),N("design:returntype",void 0)],j.prototype,"render",null);j.style=z;var B;(function(e){e["BookingOptions"]="bookingOptions";e["Communications"]="communications";e["BookingForm"]="bookingForm";e["PageStyles"]="pageStyles";e["CalendarView"]="calendarView"})(B||(B={}));function P({id:e,formState:a,activeTab:s},o){return t(n,null,s===B.CalendarView&&t("div",{key:`calendar-view-${e}`,class:{hide:s!==B.CalendarView,"calendar-view":true}},t("nylas-event-calendar",null)),t("div",{key:`booking-options-${e}`,class:{hide:s!==B.BookingOptions}},t("nylas-scheduling-method",{name:"availability-method",readOnly:true,exportparts:"nsm, nsm__header, nsm__input-label, nsm__dropdown, nsm__dropdown-button, nsm__dropdown-content"}),t("nylas-custom-booking-flow",{exportparts:"ncbflow, ncbflow__header, ncbflow__title, ncbflow__content"},t("div",{slot:"inputs"},t("nylas-booking-confirmation-type",{name:"confirmation-type",showComponent:false,exportparts:"nbct, nbct__header, nbct__dropdown, nbct__dropdown-button, nbct__dropdown-content"}),t("nylas-booking-confirmation-redirect",{name:"confirmation-redirect",redirectUrl:a.redirectUrl,exportparts:"nbcr, nbcr__header, nbcr__dropdown, nbcr__dropdown-button, nbcr__dropdown-content, nbcr__input-textfield"}))),t("nylas-event-limits",null,t("div",{slot:"inputs"},t("nylas-min-booking-notice",{name:"min-booking-notice",exportparts:"nmbn, nmbn__number-dropdown, nmbn__number-dropdown-button, nmbn__number-dropdown-content, nmbn__period-dropdown, nmbn__period-dropdown-button, nmbn__period-dropdown-content"}),t("nylas-min-cancellation-notice",{name:"min-cancellation-notice",exportparts:"nmcn, nmcn__number-dropdown, nmcn__number-dropdown-button, nmcn__number-dropdown-content, nmcn__period-dropdown, nmcn__period-dropdown-button, nmcn__period-dropdown-content"}),t("nylas-cancellation-policy",{name:"cancellation-policy",exportparts:"ncpolicy, ncpolicy__textarea"}))),t("nylas-customize-booking-settings",{showSettings:["hideCancellationOptions","hideReschedulingOptions"],name:"customize-booking-settings",exportparts:"ncbs, ncbs__header, ncbs__settings, ncbs__settings-div, ncbs__additional_guests, ncbs__cancellation_options, ncbs__rescheduling_options"})),t("div",{key:`communications-${e}`,class:{hide:s!==B.Communications}},t("nylas-disable-emails",{name:"disable-emails",exportparts:"nde, nde__toggle-label, nde_toggle-input, nde_toggle-slider"}),!a?.disableEmails&&t(n,null,t("nylas-confirmation-email",{name:"confirmation-email-template",exportparts:"nce, nce__tab-heading, nce__header, nce__body, nce__confirmation-email-toggle--container, nce__summary, nce__reminder-input_dropdown, nce__reminder-input_dropdown-input, nce__reminder-input_dropdown-content"}),t("nylas-reminder-emails",{name:"reminder-overrides",exportparts:"nre, nre__tab-heading, nre__header, nre__body, nre__confirmation-email-toggle--container, nre__summary, nrt, nrt__number-dropdown, nrt__number-dropdown-button, nrt__number-dropdown-content, nrt__period-dropdown, nrt__period-dropdown-button, nrt__period-dropdown-content, nrt__time-period-selector"}))),t("div",{key:`page-styles-${e}`,class:{hide:s!==B.PageStyles}},t("nylas-custom-event-slug",{name:"custom-event-slug",exportparts:"nces, nces__body, nces__header, nces__drawer-toggle--container, nces__input-textfield"}),t("nylas-page-name",{name:"page-name",requirePageName:true,exportparts:"npn, npn__body, npn__header, npn__drawer-toggle--container, npn__input-textfield"}),t("nylas-page-styling",{name:"page-styling",exportparts:"nps, nps__header, nps__drawer-toggle--container, nps__body, nps__title-input-textfield, nps__company-logo-input-textfield, nps__color-picker, nps__color-picker-button, nps__color-picker-button-label, nps__color-picker-selected-label, nps__submit-button-label-input-textfield, nps__message-textarea"},o)),t("div",{key:`booking-form-${e}`,class:{hide:s!==B.BookingForm}},t("nylas-booking-form-config",{name:"additional-fields",exportparts:"nbfc, nbfc__header, nbfc__add_field, nbfc__add_field-button, nbfc__add_field-content, nbfc__static_fields, nbfc__additional_fields, nbfc__form-field, nbfc__form-field-header, nbfc__form-field-content"})))}const I='.sc-nylas-editor-tabs-group-h{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-50:#ffeae8;--nylas-error-100:#ffc5bf;--nylas-error-200:#fecaca;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff}.scheduler-editor.sc-nylas-editor-tabs-group{display:flex;flex-direction:column;height:inherit;position:relative}.scheduler-editor.sc-nylas-editor-tabs-group div.return-to-calendar-view.sc-nylas-editor-tabs-group{display:flex;border-bottom:1px solid var(--nylas-base-200)}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group{display:grid;grid-template-columns:minmax(224px, 25%) 1fr;height:auto;overflow-y:auto;min-height:calc(100% - 80px - 48px)}@media screen and (max-width: 768px){.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group{display:table-column-group;height:auto;min-height:calc(100% - 80px - 196px - 48px)}}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tabs.sc-nylas-editor-tabs-group{display:flex;flex-direction:column;border-right:1px solid var(--nylas-base-200);background-color:var(--nylas-base-25)}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tabs.sc-nylas-editor-tabs-group .tab.sc-nylas-editor-tabs-group{display:flex;align-items:center;text-align:left;gap:0.5rem;padding:0.5rem 1rem;color:var(--nylas-base-900);background:var(--nylas-base-0);border:none;height:56px;font-family:var(--nylas-font-family);font-size:16px;font-weight:500;line-height:24px;cursor:pointer}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tabs.sc-nylas-editor-tabs-group .tab.sc-nylas-editor-tabs-group:not(:first-of-type){margin-top:0.25rem}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tabs.sc-nylas-editor-tabs-group .tab.sc-nylas-editor-tabs-group:last-of-type{margin-bottom:0.25rem}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tabs.sc-nylas-editor-tabs-group .tab.active.sc-nylas-editor-tabs-group{font-weight:600;background:var(--nylas-base-0);color:var(--nylas-primary);border-left:4px solid var(--nylas-primary);box-shadow:0px 1px 2px 0px rgba(0, 0, 0, 0.0588235294);box-shadow:0px 1px 3px 0px rgba(0, 0, 0, 0.1019607843)}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tabs.sc-nylas-editor-tabs-group .tab.hide.sc-nylas-editor-tabs-group{display:none}@media screen and (max-width: 768px){.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tabs.sc-nylas-editor-tabs-group{border-right:none}}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tab-content.sc-nylas-editor-tabs-group{max-width:692px;overflow-y:auto;overflow-x:hidden}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tab-content.sc-nylas-editor-tabs-group .hide.sc-nylas-editor-tabs-group{display:none}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tab-content.sc-nylas-editor-tabs-group .calendar-view.sc-nylas-editor-tabs-group{position:absolute;top:0;left:0;height:calc(100% - 80px);width:-webkit-fill-available;background:var(--nylas-base-0)}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tab-content.sc-nylas-editor-tabs-group nylas-event-info.sc-nylas-editor-tabs-group,.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tab-content.sc-nylas-editor-tabs-group nylas-event-limits.sc-nylas-editor-tabs-group{width:inherit}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tab-content.sc-nylas-editor-tabs-group nylas-event-info.sc-nylas-editor-tabs-group div[slot=inputs].sc-nylas-editor-tabs-group,.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tab-content.sc-nylas-editor-tabs-group nylas-event-limits.sc-nylas-editor-tabs-group div[slot=inputs].sc-nylas-editor-tabs-group{display:flex;flex-direction:column;gap:1rem}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tab-content.sc-nylas-editor-tabs-group .tab-header.sc-nylas-editor-tabs-group{display:flex;flex-direction:column;margin:1rem 1rem 0.5rem;row-gap:4px}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tab-content.sc-nylas-editor-tabs-group .tab-header.sc-nylas-editor-tabs-group h3.sc-nylas-editor-tabs-group{margin:0;font-size:16px;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tab-content.sc-nylas-editor-tabs-group .tab-header.sc-nylas-editor-tabs-group p.sc-nylas-editor-tabs-group{margin:0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.footer.sc-nylas-editor-tabs-group{display:flex;justify-content:space-between;align-items:center;gap:1rem;min-height:80px;padding:0 1rem;border-top:1px solid var(--nylas-base-200)}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs-group{flex-direction:column;height:auto;z-index:2}}.footer.sc-nylas-editor-tabs-group .preview.sc-nylas-editor-tabs-group{display:flex;gap:16px}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs-group .preview.sc-nylas-editor-tabs-group{margin-top:1rem;width:100%}}.footer.sc-nylas-editor-tabs-group .preview.sc-nylas-editor-tabs-group button-component.page-settings-button.sc-nylas-editor-tabs-group{min-width:140px}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group{display:flex;justify-content:flex-end;align-items:center;justify-self:flex-end;gap:1rem}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group{flex-direction:column-reverse;width:100%}}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group .footer-buttons__row.sc-nylas-editor-tabs-group{display:flex;gap:16px}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group .footer-buttons__row.sc-nylas-editor-tabs-group{width:100%}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group .footer-buttons__row.sc-nylas-editor-tabs-group button-component[title=Preview].sc-nylas-editor-tabs-group{width:48px}}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group p.sc-nylas-editor-tabs-group{max-width:524px}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group p.unsaved-changes.sc-nylas-editor-tabs-group{color:var(--nylas-base-600)}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group p.saved-changes.sc-nylas-editor-tabs-group{color:var(--nylas-success)}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group p.error.sc-nylas-editor-tabs-group{color:var(--nylas-error)}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group p.error-full-width.sc-nylas-editor-tabs-group{max-width:660px}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group button-component.sc-nylas-editor-tabs-group{width:100%}}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group button.sc-nylas-editor-tabs-group{background:var(--nylas-primary);color:var(--nylas-base-0);height:48px;border:none;border-radius:var(--nylas-border-radius-2x);font-size:16px;line-height:24px;padding:0 1rem;cursor:pointer;width:148px}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group button.sc-nylas-editor-tabs-group:hover{background:var(--nylas-base-600)}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group button.sc-nylas-editor-tabs-group:active{background:var(--nylas-base-800)}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group button.sc-nylas-editor-tabs-group:disabled{background:var(--nylas-base-300);cursor:not-allowed}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group button.sc-nylas-editor-tabs-group span.sc-nylas-editor-tabs-group{display:flex;align-items:center;justify-content:center;gap:0.5rem}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group button-component.save-changes.sc-nylas-editor-tabs-group{min-width:140px}button-component#report-issue.sc-nylas-editor-tabs-group{width:auto}nylas-feedback-form.sc-nylas-editor-tabs-group{position:absolute;top:0;height:100%;width:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;background:rgba(0, 0, 0, 0.6);z-index:2;border-radius:inherit}';var R=undefined&&undefined.__decorate||function(e,t,n,a){var s=arguments.length,o=s<3?t:a===null?a=Object.getOwnPropertyDescriptor(t,n):a,i;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,n,a);else for(var r=e.length-1;r>=0;r--)if(i=e[r])o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o;return s>3&&o&&Object.defineProperty(t,n,o),o};var G=undefined&&undefined.__metadata||function(e,t){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(e,t)};const $=class{constructor(t){e(this,t);this.schedulerConfigChanged=a(this,"schedulerConfigChanged",7);this.schedulerConfigCreated=a(this,"schedulerConfigCreated",7);this.cancelButtonClick=a(this,"cancelButtonClick",7);this.formSubmitted=a(this,"formSubmitted",7);this.previewButtonClicked=a(this,"previewButtonClicked",7);this.schedulerEditorFormUpdated=a(this,"schedulerEditorFormUpdated",7);this.groupEventCreateTriggered=a(this,"groupEventCreateTriggered",7);this.groupEventUpdateTriggered=a(this,"groupEventUpdateTriggered",7);this.groupEventDeleteTriggered=a(this,"groupEventDeleteTriggered",7);this.groupEventImportTriggered=a(this,"groupEventImportTriggered",7);this.saveGroupEventChangesError=a(this,"saveGroupEventChangesError",7);this.nylasSchedulerError=a(this,"nylasSchedulerError",6);this.dismissNotification=a(this,"dismissNotification",6);this.schedulerPreviewLink="";this.mode="app";this.hideEditorTabs=[];this.enableUserFeedback=true;this.action="create";this.showFeedbackModal=false;this.activeTab=B.CalendarView;this.isLoading=false;this.componentLoaded=false;this.hasUnsavedChanges=false;this.changesSaved=false;this.formState={};this.error={message:"",type:m.Error,category:g.Component,title:""};this.formSubmissionHandler=async e=>{e.preventDefault();const t=await this.formSubmitted.emit();r("[nylas-editor-tabs-group]","formSubmissionHandler",t);const n=this.formRef.checkValidity();if(!n||t.defaultPrevented){await this.host.setError({message:this.formRef.validationMessage||l.t("fixFormErrors"),type:m.Error,category:g.Component,title:l.t("nylasEditorTabs.formErrorTitle")});return}this.isLoading=true;this.hasUnsavedChanges=false;const a=this.updateFormState();r("[nylas-editor-tabs-group]","formState",a);const{title:s,description:o,bookingCalendar:i,location:b,bookingType:p,minCancellationNotice:f,minBookingNotice:h,cancellationPolicy:u,hideCancellationOptions:_,hideReschedulingOptions:v,additionalFields:w,conferencing:k,reminders:x,emailTemplate:C,redirectUrl:E,slug:T,appearance:S,name:O,eventCapacity:H,eventTimeslot:L,participants:z,disableEmails:F,organizerLocale:N}=a;const j={...this.selectedConfiguration?.id&&{id:this.selectedConfiguration.id},slug:T,name:O,type:this.selectedEventType===y.group?y.group:undefined,scheduler:{cancellation_policy:u??"",min_cancellation_notice:f??0,min_booking_notice:h??60,hide_cancellation_options:_??false,hide_rescheduling_options:v??false,additional_fields:w,email_template:C?{...C,organizer_locale:N||"en",logo:C.logo||""}:undefined,confirmation_redirect_url:E},appearance:S,group_booking:{booking_type:p?p:"booking",disable_emails:typeof F==="boolean"?F:false,reminders:x,conferencing:k,calendar_id:i||"primary",default_capacity:H||10}};const B=c(this.selectedConfiguration,d(j||{}));const P=B;delete P.availability;delete P.participants;delete P.event_booking;const I=e=>{this.isLoading=false;this.changesSaved=true;setTimeout((()=>{this.changesSaved=false}),3e3)};const R=this.checkForBookingFormErrors(P);if(R){return}const G={name:this.currentUser?.name??this.currentUser?.email??"",email:this.currentUser?.email??""};const $=this.calendars?.find((e=>e.is_primary))??this.calendars?.[0];const J=[{...G,is_organizer:true}];const M=!this.selectedConfiguration?.id?{title:s,description:o,location:!k?b:undefined,conferencing:!b?k:undefined,when:{start_time:L?.when?.start_time??0,end_time:L?.when?.end_time??0,start_timezone:L?.when?.start_timezone??"",end_timezone:L?.when?.end_timezone??""},recurrence:L?.recurrence??[],calendar_id:i||$?.id||"primary",participants:z?.length?z:J,organizer:G,capacity:H||10}:undefined;this.schedulerConfigChanged.emit({groupEvent:M||undefined,config:P,resetLoadingState:I,action:this.action,host:this.host})};this.checkForBookingFormErrors=e=>{let t=false;let n="";const a=e.scheduler?.additional_fields;if(a){n="";Object.entries(a).forEach((e=>{const a=e[1];if(a.label===""){n+=l.t("nylasEditorTabs.bookingFormError_label",{type:a.type});t=true;return}if(a.options){for(const e of a.options){if(e.trim()===""){n+=l.t("nylasEditorTabs.bookingFormError_option",{label:a.label,type:a.type});t=true;break}}}}))}if(t){this.isLoading=false;this.host.setError({message:n,type:m.Error,category:g.Component,title:l.t("nylasEditorTabs.bookingFormError")})}return t}}configChangedHandler(e){r("[nylas-editor-tabs-group]","configChangedHandler",e,this.selectedConfiguration);this.formState={...this.getFormStateFromConfig(e)};if(e?.id){this.action="edit"}else{this.action="create"}}selectedGroupEventChangedHandler(e){r("[nylas-editor-tabs-group]","selectedGroupEventChangedHandler",e,this.selectedConfiguration);this.formState={...this.formState,title:this.selectedGroupEvent?.event?.title,description:this.selectedGroupEvent?.event?.description,location:this.selectedGroupEvent?.event?.location,conferencing:this.selectedGroupEvent?.event?.conferencing,eventCapacity:this.selectedGroupEvent?.group_event_info?.capacity,participants:this.selectedGroupEvent?.group_event_info?.participants?.map((e=>({name:e.name,email:e.email,is_organizer:!!e.is_organizer}))),eventTimeslot:this.selectedGroupEvent?.event?.when?{when:{start_time:this.selectedGroupEvent?.event?.when?.start_time,end_time:this.selectedGroupEvent?.event?.when?.end_time,start_timezone:this.selectedGroupEvent?.event?.when?.start_timezone,end_timezone:this.selectedGroupEvent?.event?.when?.end_timezone},recurrence:this.selectedGroupEvent?.group_event_info?.rrule?this.selectedGroupEvent?.group_event_info?.rrule:[]}:undefined}}userChangedHandler(e){r("[nylas-editor-tabs-group]","userChangedHandler",e);if(e){this.formState={...this.getFormStateFromConfig(this.selectedConfiguration)}}}selectedLanguageChangedHandler(e,t){if(e===t)return;l.changeLanguage(e);if(this.error&&this.error.message){this.error={...this.error,message:l.t("fixFormErrors")};this.showErrorNotification(this.error)}}themeConfigChangedHandler(e,t){if(e===t)return;this.applyThemeConfig(e)}applyThemeConfig(e){if(e){for(const[t,n]of Object.entries(e)){this.host.style.setProperty(`${t}`,n)}}}async schedulerConfigCreatedEventHandler(e){const t=this.schedulerConfigCreated.emit(e);return t}async setError(e){this.error={message:e.message,type:e.type,category:e.category,title:e.title||l.t("genericErrorTitle")};if(this.error?.message){this.showErrorNotification(this.error)}}async resetError(){if(this.error?.message){this.dismissNotification.emit({id:this.error?.message.split(" ").join("-"),host:this.host})}this.error={message:"",type:m.Error,category:g.Component,title:""}}connectedCallback(){r("[nylas-editor-tabs-group]","connectedCallback");queueMicrotask((()=>{if(this.themeConfig){this.applyThemeConfig(this.themeConfig);this.host.setAttribute("data-themed","")}}))}componentWillLoad(){r("[nylas-editor-tabs-group]","componentWillLoad");this.formState=this.getFormStateFromConfig(this.selectedConfiguration)}componentDidLoad(){r("[nylas-editor-tabs-group]","componentDidLoad");if(this.enableUserFeedback&&!v()){w({dsn:"https://9d5731f1c77ca84c9ed3fb9b3ccf7ee1@o74852.ingest.us.sentry.io/4507889638178816",release:_,integrations:e=>[...e.filter((e=>false)),C({colorScheme:"system",autoInject:false})],autoSessionTracking:false,beforeSend:()=>null})}if(this.selectedConfiguration?.id){this.configChangedHandler(this.selectedConfiguration)}const e=this.host.querySelector("button.tab:not(.hide)")?.name;if(e&&this.hideEditorTabs?.includes(this.activeTab)){this.activeTab=e}this.updateFormState();this.componentLoaded=true}disconnectedCallback(){r("[nylas-editor-tabs-group]","disconnectedCallback")}handleValueChanged(e){r("[nylas-editor-tabs-group]","handleValueChanged",e);const{name:t,value:n}=e.detail;r("name",t,"value",n);this.setFormState(n,t);this.formState={...this.formState};if(h.includes(t)){this.hasUnsavedChanges=true}this.host.resetError();this.schedulerEditorFormUpdated.emit({value:e.detail.value,name:e.detail.name})}feedbackModalClosedHandler(){this.showFeedbackModal=false}feedbackSubmittedHandler(e){k("Scheduler Editor User Feedback");const t={message:e.detail.feedback};x(t,{includeReplay:true,captureContext:{tags:{"nylas-web-element":"nylas-scheduler-editor","nylas-web-element-version":_},extra:{configId:this.selectedConfiguration?.id,slug:this.selectedConfiguration?.slug}}});this.showFeedbackModal=false}importGroupEventHandler(e){this.groupEventImportTriggered.emit({groupEvent:e.detail,configId:this.selectedConfiguration?.id??"",host:this.host})}saveGroupEventChangesHandler(e){r("saveGroupEventChangesHandler",e.detail,this.selectedGroupEvent);const t=this.formRef.checkValidity();const n=this.getGroupEventDetailsFromFormState();this.resetError();if(!n.title){this.setError({message:l.t("nylasEditorTabsGroup.eventTitleRequired"),type:m.Error,category:g.Component,title:l.t("nylasEditorTabs.formErrorTitle")})}if(!n.when?.start_time||!n.when?.end_time){this.setError({message:l.t("nylasEditorTabsGroup.eventTimeRequired"),type:m.Error,category:g.Component,title:l.t("nylasEditorTabs.formErrorTitle")})}if(!n.participants?.length){this.setError({message:l.t("nylasEditorTabsGroup.participantsRequired"),type:m.Error,category:g.Component,title:l.t("nylasEditorTabs.formErrorTitle")})}if(n.participants?.length&&n.participants?.some((e=>!e.email))){this.setError({message:l.t("nylasEditorTabsGroup.participantEmailRequired"),type:m.Error,category:g.Component,title:l.t("nylasEditorTabs.formErrorTitle")})}if(this.error?.message!==""||!t){this.saveGroupEventChangesError.emit({error:this.error?.message??l.t("nylasEditorTabsGroup.errorOccured"),configId:this.selectedConfiguration?.id??"",host:this.host});return}this.groupEventUpdateTriggered.emit({groupEvent:n,chosenOption:e.detail.action,configId:this.selectedConfiguration?.id??"",host:this.host})}deleteGroupEventHandler(e){r("deleteGroupEventHandler",e.detail);const t=this.getGroupEventDetailsFromFormState();this.groupEventDeleteTriggered.emit({groupEvent:t,chosenOption:e.detail.action,configId:this.selectedConfiguration?.id??"",host:this.host})}createGroupEventHandler(e){const t=e.detail;const n={name:this.currentUser?.name??this.currentUser?.email??"",email:this.currentUser?.email??""};const a=this.calendars?.find((e=>e.is_primary))??this.calendars?.[0];const s=this.formState?.conferencing||t.conferencing;const o={title:t.title,description:t.description,location:!s?t.location:undefined,participants:t.participants,organizer:n,conferencing:!t.location?s:undefined,when:t.eventTimeslot.when,recurrence:t.eventTimeslot.recurrence,calendar_id:a?.id||"primary",capacity:t.eventCapacity};this.groupEventCreateTriggered.emit({groupEvent:o,configId:this.selectedConfiguration?.id??"",host:this.host})}showErrorNotification(e){this.nylasSchedulerError.emit({notification:{title:e.title,category:e.category||g.Component,type:e.type||m.Error,description:e.message,id:e.message.split(" ").join("-"),ttl:"none"},host:this.host})}getGroupEventDetailsFromFormState(){const e=this.calendars?.find((e=>e.is_primary))??this.calendars?.[0];const t={name:this.currentUser?.name??this.currentUser?.email??"",email:this.currentUser?.email??""};const n=[{...t,is_organizer:true}];const{title:a,description:s,bookingCalendar:o,location:i,conferencing:r,eventCapacity:l,eventTimeslot:c,participants:d}=this.formState;return{title:a,description:s,location:!r?i:undefined,conferencing:!i?r:undefined,when:{start_time:c?.when?.start_time??0,end_time:c?.when?.end_time??0,start_timezone:c?.when?.start_timezone??"",end_timezone:c?.when?.end_timezone??""},recurrence:c?.recurrence??[],calendar_id:o||e?.id||"primary",participants:d?.length?d:n,organizer:t,capacity:l||10}}getFormStateFromConfig(e){if(e?.appearance){r("Appearance settings have been returned from the given configuration; please remember to grab them from the configSettingsLoaded event and apply them as desired.")}return{additionalFields:e?.scheduler?.additional_fields??{},bookingType:e?.group_booking?.booking_type??"booking",cancellationPolicy:e?.scheduler?.cancellation_policy??"",minCancellationNotice:e?.scheduler?.min_cancellation_notice??0,minBookingNotice:e?.scheduler?.min_booking_notice??60,hideCancellationOptions:e?.scheduler?.hide_cancellation_options??false,hideReschedulingOptions:e?.scheduler?.hide_rescheduling_options??false,reminders:e?.group_booking?.reminders,emailTemplate:e?.scheduler?.email_template,redirectUrl:e?.scheduler?.confirmation_redirect_url,slug:e?.slug,appearance:e?.appearance,name:e?.name,bookingCalendar:e?.group_booking?.calendar_id,disableEmails:e?.group_booking?.disable_emails,organizerLocale:e?.scheduler?.email_template?.organizer_locale}}setFormState(e,t){switch(t){case"title":this.formState.title=e.toString();break;case"description":this.formState.description=e.toString();break;case"location":this.formState.location=e.toString();break;case"conference":this.formState.conferencing=JSON.parse(e.toString());break;case"confirmation-type":this.formState.bookingType=e.toString();break;case"min-cancellation-notice":this.formState.minCancellationNotice=parseInt(e.toString());break;case"min-booking-notice":this.formState.minBookingNotice=parseInt(e.toString());break;case"cancellation-policy":this.formState.cancellationPolicy=e.toString();break;case"customize-booking-settings":{const t=JSON.parse(e.toString());this.formState.hideCancellationOptions=t.hideCancellationOptions;this.formState.hideReschedulingOptions=t.hideReschedulingOptions;break}case"booking-calendar":this.formState.bookingCalendar=e.toString();break;case"event-capacity":this.formState.eventCapacity=parseInt(String(e));break;case"additional-fields":this.formState.additionalFields=JSON.parse(e.toString());break;case"confirmation-email-template":this.formState.emailTemplate=JSON.parse(e.toString());break;case"reminder-overrides":this.formState.reminders=JSON.parse(e.toString());break;case"confirmation-redirect":this.formState.redirectUrl=e.toString();break;case"custom-event-slug":r("custom-event-slug",e);this.formState.slug=JSON.parse(e.toString());break;case"page-styling":this.formState.appearance=JSON.parse(e.toString());break;case"page-name":this.formState.name=JSON.parse(e.toString());break;case"participants":{const t=JSON.parse(e.toString());this.formState.participants=t.map((e=>({name:e.name,email:e.email,is_organizer:e.is_organizer,...e.grant_id?{grant_id:e.grant_id}:{}})));break}case"event-timeslot":this.formState.eventTimeslot=JSON.parse(e.toString());break;case"disable-emails":{const{disableEmails:t,organizerLocale:n}=JSON.parse(e.toString());this.formState.disableEmails=t;this.formState.organizerLocale=n;break}}this.schedulerEditorFormUpdated.emit({value:e,name:t})}updateFormState(){const e=new FormData(this.formRef);e.forEach(((e,t)=>{this.setFormState(e,t)}));this.formState={...this.formState};return this.formState}setActiveTab(e,t){e.preventDefault();this.updateFormState();this.activeTab=t}hideTab(e){return this.hideEditorTabs?.includes(e)||false}onFeedbackClick(e){e.preventDefault();this.showFeedbackModal=true}render(){r("[nylas-editor-tabs-group]","render",this.formState);return t(s,{key:"5c43ab9753d143dc7106e2610d859018f16d7c8a"},t("nylas-notification",{key:"aad4b319b5a15d071c50104f5e5143e20a46a242"}),t("form",{key:"6be0f7f3f455c7fd3c238dabca0b28d2c8720470",onSubmit:this.formSubmissionHandler,class:"scheduler-editor",ref:e=>this.formRef=e,noValidate:true},this.mode==="app"?t("div",{class:"return-to-calendar-view",part:"editor__return-to-calendar-view net__return-to-calendar-view"},t("button-component",{id:"return-to-calendar-view-button",variant:"invisible",part:"nset__header__back-button",type:"button",onClick:e=>{this.setActiveTab(e,B.CalendarView)}},t("chevron-icon",{width:"16",height:"16"}),t("span",null,l.t("returnToCalendarView")))):null,this.mode==="app"?t("div",{class:"form-contents",part:"editor__form-contents net__form-contents"},t("div",{class:"tabs",part:"editor__tabs net__tabs"},t("button",{name:B.BookingOptions,class:{tab:true,active:this.activeTab==B.BookingOptions,hide:this.hideTab(B.BookingOptions)},part:"editortab__booking-options net__tab-booking-options",onClick:e=>this.setActiveTab(e,B.BookingOptions)},t("flow-icon",{width:"16",height:"16"}),l.t("bookingOptionsTab")),t("button",{name:B.BookingForm,class:{tab:true,active:this.activeTab==B.BookingForm,hide:this.hideTab(B.BookingForm)},part:"editortab__booking-form net__tab-booking-form",onClick:e=>this.setActiveTab(e,B.BookingForm)},this.activeTab==B.BookingForm?t("calendar-agenda-fill-icon",{width:"16",height:"16"}):t("calendar-agenda-icon",{width:"16",height:"16"}),l.t("bookingFormTab")),t("button",{name:B.Communications,class:{tab:true,active:this.activeTab==B.Communications,hide:this.hideTab(B.Communications)},onClick:e=>this.setActiveTab(e,B.Communications),part:"editortab__communications net__tab-communications"},this.activeTab==B.Communications?t("envelope-fill-icon",{width:"16",height:"16"}):t("envelope-icon",{width:"16",height:"16"}),l.t("communicationsTab")),t("button",{name:B.PageStyles,class:{tab:true,active:this.activeTab==B.PageStyles,hide:this.hideTab(B.PageStyles)},onClick:e=>this.setActiveTab(e,B.PageStyles),part:"editortab__page-styles net__tab-page-styles"},this.activeTab==B.PageStyles?t("paintbrush-fill-icon",{width:"16",height:"16"}):t("paintbrush-icon",{width:"16",height:"16"}),l.t("pageStylesTab"))),t("div",{class:"tab-content",part:"editor__tab-content net__tab-content"},t(P,{formState:this.formState,activeTab:this.activeTab,currentUser:this.currentUser,calendars:this.calendars,id:this.selectedConfiguration?.id??"new",i18next:l}))):t("div",{class:"composable",key:this.selectedConfiguration?.id},t("slot",null)),t("div",{key:"a33beeedc56376b9a421af7e996e478aca42de84",class:"footer",part:"editor__footer net__footer"},t("div",{key:"4fa919de1796a541b34dcfd8a835249b7613b5e4",class:"preview",part:"editor__footer-preview net__footer-preview"},this.enableUserFeedback&&t("button-component",{key:"a89bef04b5f00a893d0ce536889d27e691348a87",title:"Share your feedback",id:"report-issue",variant:"basic",onClick:e=>this.onFeedbackClick(e)},t("feedback-icon",{key:"3bd71fd8df54e8a322831fa920f8da73c4649a64"})),this.activeTab===B.CalendarView&&t("button-component",{key:"a2c9fa658b4ab9bec066702df7be4a98682bf148",class:"page-settings-button",title:"Go to page settings",id:"page-settings",variant:"basic",onClick:e=>this.setActiveTab(e,B.BookingOptions)},l.t("pageSettingsButton"))),t("div",{key:"685c81809fbe5a28e86f93a8a3b357148a72fd76",class:"buttons",part:"editor__footer-buttons net__footer-buttons"},t("p",{key:"a59e3c5f92c2b2a404c659cb5b2b5ce01362bb30",class:{"unsaved-changes":this.hasUnsavedChanges&&!this.changesSaved,"saved-changes":this.changesSaved,error:this.error?.message!=="","error-full-width":this.error?.message!==""&&this.action==="create"}},this.error?.message==""&&this.hasUnsavedChanges&&!this.changesSaved&&this.activeTab!==B.CalendarView?l.t("unsavedChangesLabel"):this.error?.message==""&&this.changesSaved?`${l.t("changesSavedLabel")}!`:""),t("div",{key:"932230c2a5f60e19abd0db90a55b3b251252b1bd",class:"footer-buttons__row"},this.schedulerPreviewLink!==""&&this.action==="edit"&&t("button-component",{key:"c875383a9d26d1695cc20b1d4c9676a070c3608f",title:"Preview",type:"button",disabled:this.isLoading,clickHandler:e=>{e.preventDefault();const t=this.previewButtonClicked.emit(this.host);if(!t.defaultPrevented){window.open(f(this.schedulerPreviewLink,this.selectedConfiguration),"_blank")}},variant:"basic"},t("eye-icon",{key:"1485e9f9ade7fd205cfab8195197b0d597e9c4bf"})),t("button-component",{key:"62167206c6a8bde1cbfae44c7d54cfb6ed0692ac",type:"button",disabled:this.isLoading,clickHandler:e=>{e.preventDefault();this.cancelButtonClick.emit();this.host.resetError()},variant:"basic",part:"editor__footer-cancel net__footer-cancel"},l.t("cancelButton")),t("button-component",{key:"e6ecfe240142f787ec5ac4ca5a1ff680b2ff3d3f",class:{"save-changes":this.action==="edit"},type:"submit",disabled:this.isLoading,part:"editor__footer-cta, net__footer-cta"},!this.componentLoaded?t("span",null,t("loading-icon",null)," "):this.isLoading?t("span",null,l.t("savingButtonText"),t("loading-icon",null)," "):this.action==="create"?`${l.t("createButtonText")}`:`${l.t("saveChangesButtonText")}`))))),this.showFeedbackModal&&t("nylas-feedback-form",{key:"449cab0589ff40203a33ed2bbee0e4a55458d557"}))}get host(){return o(this)}static get watchers(){return{selectedConfiguration:["configChangedHandler"],selectedGroupEvent:["selectedGroupEventChangedHandler"],currentUser:["userChangedHandler"],selectedLanguage:["selectedLanguageChangedHandler"],themeConfig:["themeConfigChangedHandler"]}}};R([i({name:"nylas-editor-tabs-group",stateToProps:new Map([["schedulerConfig.calendars","calendars"],["schedulerConfig.selectedConfiguration","selectedConfiguration"],["schedulerConfig.currentUser","currentUser"],["schedulerConfig.configurations","configurations"],["schedulerConfig.selectedLanguage","selectedLanguage"],["schedulerConfig.selectedEventType","selectedEventType"],["schedulerConfig.selectedGroupEvent","selectedGroupEvent"],["schedulerConfig.themeConfig","themeConfig"]]),eventToProps:{schedulerConfigChanged:async(e,t)=>{const{resetLoadingState:n,host:a,action:s,config:o,groupEvent:i}=e.detail;const r=(e,t)=>{const[n,o]=e;if(!n&&o){a.setError({message:o.message||l.t("genericErrorTitle"),type:m.Error,category:g.Component,title:t})}else if(n&&!o&&s==="create"){a.schedulerConfigCreatedEventHandler({config:n,action:s,host:a})}};if(s==="edit"){const a=await t.schedulerConfig.updateConfiguration(o);r(a,l.t("nylasEditorTabs.updateConfigError"));if(n){n(e)}}else{const a=await t.schedulerConfig.createConfiguration(o);r(a,l.t("nylasEditorTabs.createConfigError"));const[s,c]=a;const d=s?.id;if(d&&i){const e=await t.schedulerConfig.createGroupEvent(i,d);r(e,l.t("nylasEditorTabsGroup.createGroupEventError"))}if(n){n(e)}}},cancelButtonClick:async(e,t)=>{t.schedulerConfigStore.state.action=null;t.schedulerConfigStore.set("selectedEventType",undefined);t.schedulerConfigStore.set("selectedGroupEvent",undefined);t.schedulerConfigStore.set("groupEvents",[])},previewButtonClicked:async(e,t)=>{r("[nylas-editor-tabs-group]","previewButtonClicked",t)},formSubmitted:async(e,t)=>{r("[nylas-editor-tabs-group]","formSubmitted",t)},schedulerEditorFormUpdated:async(e,t)=>{r("[nylas-editor-tabs-group]","schedulerEditorFormUpdated",e)},schedulerConfigCreated:async(e,t)=>{r("[nylas-editor-tabs-group]","schedulerConfigCreated",e)},groupEventUpdateTriggered:async(e,t)=>{const{groupEvent:n,host:a,chosenOption:s,configId:o}=e.detail;const i=await t.schedulerConfig.updateGroupEvent(n,s,o);const[r,c]=i;if(!r&&c){a.setError({message:c.message||l.t("genericErrorTitle"),type:m.Error,category:g.Component,title:l.t("nylasEditorTabsGroup.updateGroupEventError")})}},groupEventDeleteTriggered:async(e,t)=>{const{groupEvent:n,chosenOption:a,configId:s,host:o}=e.detail;const i=await t.schedulerConfig.deleteGroupEvent(n,a,s);const[r,c]=i;if(!r&&c){o.setError({message:c.message||l.t("genericErrorTitle"),type:m.Error,category:g.Component,title:l.t("nylasEditorTabsGroup.deleteGroupEventError")})}},groupEventCreateTriggered:async(e,t)=>{const{groupEvent:n,configId:a,host:s}=e.detail;const o=await t.schedulerConfig.createGroupEvent(n,a);const[i,r]=o;if(!i&&r){s.setError({message:r.message||l.t("genericErrorTitle"),type:m.Error,category:g.Component,title:l.t("nylasEditorTabsGroup.createGroupEventError")})}},groupEventImportTriggered:async(e,t)=>{const{groupEvent:n,configId:a,host:s}=e.detail;const o=await t.schedulerConfig.importGroupEvent([n],a);const[i,r]=o;if(!i&&r){s.setError({message:r.message||l.t("genericErrorTitle"),type:m.Error,category:g.Component,title:l.t("nylasEditorTabsGroup.importGroupEventError")})}if(i&&i.import_failed&&i.import_failed.length>0){const e=i.import_failed.map((e=>e.reason)).join("\n");s.setError({message:e,type:m.Error,category:g.Component,title:l.t("nylasEditorTabsGroup.importGroupEventError")});setTimeout((()=>{s.resetError()}),5e3)}},saveGroupEventChangesError:async(e,t)=>{const{error:n,host:a}=e.detail;r("[nylas-editor-tabs-group]","saveGroupEventChangesError",n,a)}},localPropsToProp:new Map([["schedulerPreviewLink","schedulerPreviewLink"],["enableUserFeedback","enableUserFeedback"],["hideEditorTabs","hideEditorTabs"]]),fireRegisterEvent:true}),G("design:type",Function),G("design:paramtypes",[]),G("design:returntype",void 0)],$.prototype,"render",null);$.style=I;const J=':host{display:grid;grid-auto-flow:row;width:100%;font-family:inherit;font-optical-sizing:auto;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-50:#ffeae8;--nylas-error-100:#ffc5bf;--nylas-error-200:#fecaca;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff}.header{display:flex;align-items:center;justify-content:space-between;margin-bottom:1rem;gap:1rem}@media screen and (max-width: 768px){.header{flex-direction:column;gap:0.5rem;align-items:unset}}.header h2{margin:0;font-size:1.25rem;color:var(--nylas-base-900);font-weight:600}.header p{margin:0;font-size:16px;color:var(--nylas-base-700)}.header .actions{justify-self:end}@media screen and (max-width: 768px){.header .actions{width:100%}}.configurations{border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);background:var(--nylas-base-0);height:100%;display:flex;flex-direction:column;position:relative;overflow-y:hidden}.configurations .table-container{overflow-y:auto;flex:1}@media screen and (max-width: 768px){.configurations .table-container{min-height:624px}}.configurations .table-container table{width:100%;border-spacing:0;border-collapse:collapse;font-family:inherit;height:max-content}.configurations .table-container table.no-configurations{height:100%}.configurations .table-container table tr{color:var(--nylas-base-800);border-bottom:1px solid var(--nylas-base-200);font-family:inherit}.configurations .table-container table tr.hide{display:none}.configurations .table-container table th{font-weight:600;text-transform:uppercase;font-size:14px;line-height:20px}.configurations .table-container table tr.no-configurations td>div{display:flex;height:100%;justify-content:center;align-items:center;flex-direction:column;padding:var(--nylas-border-radius-3x)}.configurations .table-container table tr.no-configurations td>div h3{margin:0 0 1rem 0;color:var(--nylas-base-700)}.configurations .table-container table tr.no-configurations td>div p{margin:0 0 1rem 0;color:var(--nylas-base-600)}.configurations .table-container table tr.no-configurations td>div calendar-icon{margin-bottom:1rem;color:var(--nylas-base-200)}.configurations .table-container table th,.configurations .table-container table td{text-align:left;padding:1rem;font-family:inherit}.configurations .table-container table .actions{display:flex;justify-content:flex-end;gap:1rem;text-align:right}.configurations .table-container table .actions button-component.edit-button{min-width:98px}@media screen and (max-width: 768px){.configurations .table-container table .actions{flex-direction:column;gap:0.5rem}}.configurations .table-container table .actions select-dropdown.last::part(sd_dropdown-content){bottom:54px}.configurations .table-container table .title{width:100%;max-width:300px}@media screen and (max-width: 768px){.configurations .table-container table .title{max-width:96px}}.configurations .table-container table .title div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.configurations .table-container table .title div.config-event-title{font-weight:600}.configurations .table-container table .title div.config-event-description{font-size:0.75rem}.configurations .pagination{padding:1rem;position:sticky;top:100%;display:flex;justify-content:flex-end;gap:0.5rem;background:var(--nylas-base-0);width:calc(100% - 2rem);z-index:2}.configurations .pagination td.arrows{display:flex;justify-content:flex-end;gap:0.5rem}.configurations .pagination button{display:flex;flex-direction:row;justify-content:center;align-items:center;height:3vh;width:3vh;min-width:3em;min-height:3em;cursor:pointer;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-300);background-color:transparent;color:var(--nylas-base-800);cursor:pointer}.configurations .pagination button:hover:not(:disabled){border:1px solid var(--nylas-primary)}.configurations .pagination button:active{border:1px solid var(--nylas-base-800)}.configurations .pagination button:disabled{border:1px solid var(--nylas-base-100);background-color:transparent;color:var(--nylas-base-300);cursor:not-allowed}.configurations .pagination button.right{transform:rotate(180deg)}.error-container{margin-top:1.5rem}.error-container .error{color:var(--nylas-error);padding:0.5rem 0;margin:1rem 0 0}button-component#copy button{width:108px}select-dropdown{width:auto;color:inherit}select-dropdown::part(sd_dropdown-button){display:block;height:48px;padding:0px 16px 8px}@media screen and (max-width: 768px){select-dropdown::part(sd_dropdown-button){width:92px}}select-dropdown::part(sd_dropdown-content){width:120px;right:0}select-dropdown::part(sd_dropdown-labelhtml){display:flex;gap:0.5rem;align-items:center;color:var(--nylas-base-900)}select-dropdown::part(sd_dropdown-labelhtml):hover{color:var(--nylas-primary)}.card-wrapper{position:absolute;top:0;left:0;height:calc(100% + 4rem);width:-webkit-fill-available;width:-moz-available;width:fill-available;display:flex;flex-direction:column;justify-content:center;align-items:center;background:rgba(0, 0, 0, 0.6);z-index:2;border-radius:var(--nylas-border-radius-2x)}@media screen and (max-width: 768px){.card-wrapper{justify-content:start;height:100%}}.card-modal{background:var(--nylas-base-0);display:flex;flex-direction:column;font-family:var(--nylas-font-family);background-color:var(--nylas-base-0);color:var(--nylas-base-900);border-radius:var(--nylas-border-radius-3x);padding:32px;width:562px;box-shadow:0px 1px 4px rgba(0, 0, 0, 0.1), 0px 3px 6px rgba(0, 0, 0, 0.06)}@media screen and (max-width: 768px){.card-modal{width:auto;border-radius:0px}}.description.title-desc{margin-bottom:2rem}.description p{margin:0;font-size:18px;color:var(--nylas-base-600)}.footer{margin-top:1rem;padding-top:1rem;display:flex;justify-content:flex-end;gap:0.5rem;box-sizing:border-box;background-color:var(--nylas-base-25);width:100%;border-radius:0 0 var(--nylas-border-radius-2x) var(--nylas-border-radius-2x)}.close-button{width:100%;display:flex;justify-content:flex-end}.close-button button-component button{padding:0;height:auto}.close-button button-component button:hover{background-color:transparent !important}button-component{--dot-color:var(--nylas-base-700)}';var M=undefined&&undefined.__decorate||function(e,t,n,a){var s=arguments.length,o=s<3?t:a===null?a=Object.getOwnPropertyDescriptor(t,n):a,i;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,n,a);else for(var r=e.length-1;r>=0;r--)if(i=e[r])o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o;return s>3&&o&&Object.defineProperty(t,n,o),o};var U=undefined&&undefined.__metadata||function(e,t){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(e,t)};const D=class{constructor(t){e(this,t);this.initListConfigurations=a(this,"initListConfigurations",7);this.createButtonClick=a(this,"createButtonClick",7);this.editButtonClick=a(this,"editButtonClick",7);this.deleteButtonClick=a(this,"deleteButtonClick",7);this.nylasSchedulerError=a(this,"nylasSchedulerError",6);this.dismissNotification=a(this,"dismissNotification",6);this.configurations=[];this.schedulerPreviewLink="";this.state="loading";this.error={message:"",type:m.Error,category:g.Component,title:""};this.currentCursor=null;this.previousCursors=[];this.disableNextPageButton=false;this.deleteConfigurationId="";this.showDeleteButtonLoading=false;this.editButtonLoadingId=""}listConfigurationsNextCursorChangedHandler(e,t){if(!e||e===t){if(e===null){this.disableNextPageButton=true}return}this.disableNextPageButton=false;this.currentCursor=e}selectedLanguageChangedHandler(e,t){if(e===t)return;l.changeLanguage(e)}themeConfigChangedHandler(e,t){if(e===t)return;this.applyThemeConfig(e)}connectedCallback(){r("[nylas-list-configurations]","connectedCallback");queueMicrotask((()=>{if(this.themeConfig){this.applyThemeConfig(this.themeConfig);this.host.setAttribute("data-themed","")}}))}componentWillLoad(){r("[nylas-list-configurations]","componentWillLoad");if(this.configurations&&this.configurations.length>0){this.state="loaded"}}componentDidLoad(){r("[nylas-list-configurations]","componentDidLoad");this.initListConfigurations.emit({host:this.host})}disconnectedCallback(){r("[nylas-list-configurations]","disconnectedCallback")}applyThemeConfig(e){if(e){for(const[t,n]of Object.entries(e)){this.host.style.setProperty(`${t}`,n)}}}async handleNylasFormDropdownChanged(e){r("[nylas-list-configurations]","handleNylasFormDropdownChanged",e.detail);const{value:t}=e.detail;const[n,a]=t.split("-");e.preventDefault();switch(n){case"delete":this.deleteConfigurationId=this.configurations[a]?.id;break;case"preview":window.open(f(this.schedulerPreviewLink,this.configurations[a]),"_blank");break;case"copy":await navigator.clipboard.writeText(f(this.schedulerPreviewLink,this.configurations[a]));break}}async registerCallback(){this.initListConfigurations.emit({host:this.host})}async getState(){return this.state}async setState(e){this.state=e}async setError(e){this.error={message:e.message,type:e.type,category:e.category,title:e.title||l.t("genericErrorTitle")};if(this.error?.message){this.showErrorNotification(this.error)}}async hideDeleteConfirmation(){this.deleteConfigurationId="";this.showDeleteButtonLoading=false}async hideEditButtonLoading(){this.editButtonLoadingId=""}showErrorNotification(e){this.nylasSchedulerError.emit({notification:{id:e.message.split(" ").join("-"),type:e.type||m.Error,title:e.title,category:e.category||g.Component,description:e.message,ttl:"none"},host:this.host})}closeModal(e){e.preventDefault();this.deleteConfigurationId=""}handleConfirmDeleteButtonClicked(e){e.preventDefault();this.showDeleteButtonLoading=true;const t=this.configurations.find((e=>e.id===this.deleteConfigurationId));if(t&&t?.id){this.deleteButtonClick.emit({host:this.host,configuration:t})}}getDurationString(e){if(!e)return"—";const t=Math.floor(e/60);const n=e%60;return`${t?t:""} ${t?`${t>1?"hours":"hour"}`:""} ${n?n:""} ${n?`${n>1?"mins":"min"}`:""}`}getActionLabelHTML(e){const n={display:"inline-flex",alignItems:"center",gap:"0.5rem"};const a={color:"var(--nylas-error)"};switch(e){case"preview":return t("span",{style:n},t("eye-icon",{width:"16",height:"16"}),l.t("nylasListConfigurations.previewButtonText"));case"copy":return t("span",{style:n},t("copy-icon",{width:"16",height:"16"}),l.t("nylasListConfigurations.copyLinkButtonText"));case"delete":return t("span",{style:{...n,...a}},t("delete-icon",{width:"15",height:"17"}),l.t("nylasListConfigurations.deleteButtonText"));default:return""}}previousPageClickedHandler(){if(this.previousCursors.length===0)return;this.currentCursor=this.previousCursors.pop()||null;const e=this.previousCursors[this.previousCursors.length-1]||undefined;this.initListConfigurations.emit({host:this.host,cursor:e})}nextPageClickedHandler(){if(!this.currentCursor)return;this.previousCursors=[...this.previousCursors,this.currentCursor];this.initListConfigurations.emit({host:this.host,cursor:this.currentCursor})}render(){return t(s,null,t("nylas-notification",null),t("div",{class:"header"},t("div",{class:"description"},t("h2",null,l.t("allSchedulingPages")),t("p",null,l.t("createAndManageSchedulingPages"))),this.configurations&&this.configurations.length>0&&t("div",{class:"actions"},t("button-component",{part:"nlc__create-new-cta",clickHandler:()=>{this.createButtonClick.emit(this.host)}},l.t("createNewSchedulingPageButtonText")))),t("div",{class:"configurations"},t("div",{class:"table-container"},t("table",{class:{"no-configurations":this.state!=="loading"&&(!this.configurations||this.configurations.length===0)}},t("tr",{class:{hide:this.state==="loading"||this.configurations&&this.configurations.length===0}},t("th",null,l.t("pageTitle")),t("th",null,l.t("durationTitle")),t("th",null)),this.state==="loading"&&t("tr",{class:"no-configurations"},t("td",{colSpan:3},t("div",null,t("h3",null,l.t("loading"),"..."),t("p",null,l.t("loadingPagesDescription"))))),this.state!=="loading"&&(!this.configurations||this.configurations.length===0)&&t("tr",{class:"no-configurations"},t("td",{colSpan:3},t("div",null,t("calendar-icon",{width:"48",height:"48"}),t("h3",null,l.t("noSchedulingPages")),t("p",null,l.t("createFirstSchedulingPage")),t("button-component",{part:"nlc__create-new-cta",clickHandler:()=>{this.createButtonClick.emit(this.host)}},l.t("createNewSchedulingPageButtonText"))))),this.state!=="loading"&&this.configurations?.map(((e,n)=>{const a=(n===this.configurations.length-1||n===this.configurations.length-2)&&this.configurations.length>3;const s=e;const o=e;return t("tr",{key:e?.id},t("td",null,t("div",{class:"title"},t("div",{class:"config-event-title",title:o?.event_booking?.title},o?.event_booking?.title||s?.name),t("div",{class:"config-event-description"},o?.event_booking?.description))),t("td",null,t("div",{class:"duration"},this.getDurationString(o?.availability?.duration_minutes))),t("td",null,t("div",{class:"actions"},t("button-component",{class:"edit-button",variant:"basic",key:`edit-${n}`,disabled:this.editButtonLoadingId===`edit-${n}`,isLoading:this.editButtonLoadingId===`edit-${n}`,clickHandler:t=>{t.preventDefault();this.editButtonLoadingId=`edit-${n}`;this.editButtonClick.emit({host:this.host,configuration:e})}},this.editButtonLoadingId===`edit-${n}`?null:t("edit-icon",{width:"16",height:"16"}),l.t("editSchedulingPageButtonText")),t("select-dropdown",{class:{last:a},name:"actions",options:[{value:`preview-${n}`,label:"Preview",labelHTML:this.getActionLabelHTML("preview")},{value:`copy-${n}`,label:"Copy link",labelHTML:this.getActionLabelHTML("copy")},{value:`delete-${n}`,label:"Delete",labelHTML:this.getActionLabelHTML("delete")}],defaultSelectedOption:{value:"",label:""},dropdownButtonText:"...",withSearch:false,withChevron:false,themeConfig:this.themeConfig,exportparts:"sd_dropdown: actions__dropdown, sd_dropdown-button: actions__dropdown-button, sd_dropdown-content: actions__dropdown-content, actions-Copy, actions-Preview, actions-Delete"}))))})))),t("div",{class:"pagination"},t("button",{class:"arrow left",onClick:()=>this.previousPageClickedHandler(),disabled:this.previousCursors.length<=0},t("chevron-icon",null)),t("button",{class:"arrow right",onClick:()=>this.nextPageClickedHandler(),disabled:this.disableNextPageButton},t("chevron-icon",null)))),!!this.deleteConfigurationId&&t("div",{class:"card-wrapper"},t("div",{class:"card-modal"},t("div",{class:"close-button"},t("button-component",{tooltip:"Close",id:"close",variant:"invisible",onClick:e=>this.closeModal(e),part:"nfbf__close-button"},t("close-icon",null))),t("div",{class:"header"},t("h2",{slot:"card-title",part:"nfbf__title"},l.t("deleteSchedulingPageTitle"))),t("div",{class:"description title-desc"},t("p",null,l.t("deleteSchedulingPageDescription"))),t("div",{class:{footer:true}},t("button-component",{variant:"basic",onClick:e=>this.closeModal(e),part:"nfbf__button-outline nfbf__cancel-cta"},`${l.t("deleteSchedulingPageCancelButton")}`),t("button-component",{variant:"destructive",onClick:e=>this.handleConfirmDeleteButtonClicked(e),disabled:this.showDeleteButtonLoading,isLoading:this.showDeleteButtonLoading,part:"nfbf__button-outline nfbf__reschedule-cta"},`${l.t("deleteSchedulingPageConfirmButton")}`)))))}get host(){return o(this)}static get watchers(){return{listConfigurationsNextCursor:["listConfigurationsNextCursorChangedHandler"],selectedLanguage:["selectedLanguageChangedHandler"],themeConfig:["themeConfigChangedHandler"]}}};M([i({name:"nylas-list-configurations",stateToProps:new Map([["schedulerConfig.configurations","configurations"],["schedulerConfig.listConfigurationsNextCursor","listConfigurationsNextCursor"],["schedulerConfig.selectedLanguage","selectedLanguage"],["schedulerConfig.themeConfig","themeConfig"]]),localPropsToProp:new Map([["schedulerPreviewLink","schedulerPreviewLink"]]),eventToProps:{initListConfigurations:async(e,t)=>{const{host:n,cursor:a}=e.detail;await n.setState("loading");const[s,o]=await t.schedulerConfig.getConfigurations(a);if(!s&&o&&o.message){await n.setState("error");await n.setError({message:o.message,type:m.Error,category:g.Component,title:l.t("nylasEditorTabs.getConfigsError")});return}await n.setState("loaded")},createButtonClick:async(e,t)=>{t.schedulerConfigStore.resetSelectedConfiguration();const n=Object.entries(t.schedulerConfigStore.state.enableEventTypes||{}).filter((([e,t])=>t));if(n.length===1){t.schedulerConfigStore.state.action="create";t.schedulerConfigStore.state.selectedEventType=y[n[0][0]]}else{t.schedulerConfigStore.state.action="create-select"}},deleteButtonClick:async(e,t)=>{const{host:n,configuration:a}=e.detail;const[s,o]=await t.schedulerConfig.deleteConfiguration(a.id);if(!s&&o&&o.message){await n.setState("error");await n.setError({message:o.message,type:m.Error,category:g.Component,title:l.t("nylasEditorTabs.deleteConfigError")})}await n.hideDeleteConfirmation()},editButtonClick:async(e,t)=>{const{host:n,configuration:a}=e.detail;const[s,o]=await t.schedulerConfig.getConfigurationById(a.id,true);if(!s&&o?.message){await n.setError({message:o.message,type:m.Error,category:g.Component,title:l.t("nylasEditorTabs.getConfigsError")});n.hideEditButtonLoading();return}const i=s||a;if(i.type==="group"){const{startTime:e,endTime:a}=u((new Date).toISOString(),"week");t.schedulerConfigStore.state.calendarViewDateRange={start_time:e.toString(),end_time:a.toString()};const[s,o]=await t.schedulerConfig.getGroupEvents(i.id,i);if(!s&&o&&o.message){await n.setError({message:o.message,type:m.Error,category:g.Component,title:l.t("nylasEditorTabsGroup.getGroupEventsError")});n.hideEditButtonLoading();return}}t.schedulerConfigStore.state.action="edit";t.schedulerConfigStore.state.selectedConfiguration=i;n.hideEditButtonLoading()}},fireRegisterEvent:true}),U("design:type",Function),U("design:paramtypes",[]),U("design:returntype",void 0)],D.prototype,"render",null);D.style=J;const A=':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-50:#ffeae8;--nylas-error-100:#ffc5bf;--nylas-error-200:#fecaca;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff;width:inherit}.nylas-select-event-type{height:inherit;overflow-y:auto}.nylas-select-event-type div.header{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--nylas-base-200)}.nylas-select-event-type div.header h2{font-size:18px;padding:0 24px;line-height:24px;margin:0;font-weight:600;color:var(--nylas-base-800)}.nylas-select-event-type div.header button-component button{background:transparent;border:none;cursor:pointer}.nylas-select-event-type div.header button-component button:hover,.nylas-select-event-type div.header button-component button:active{color:var(--nylas-primary);background-color:transparent}.nylas-select-event-type div.header button-component button:disabled{cursor:not-allowed}.nylas-select-event-type div.content{padding:40px}.nylas-select-event-type div.content h3{margin:0 0 32px 0;font-size:18px;line-height:24px;font-weight:600}.nylas-select-event-type div.content div.event-type{display:flex;flex-direction:column;gap:8px}.nylas-select-event-type div.content div.event-type div.event-type-option{padding:16px;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-3x);width:inherit;cursor:pointer;display:flex;flex-direction:column;gap:8px}.nylas-select-event-type div.content div.event-type div.event-type-option h4{margin:0;font-size:16px;line-height:24px;font-weight:600;color:var(--nylas-base-900)}.nylas-select-event-type div.content div.event-type div.event-type-option p{margin:0;font-size:14px;line-height:21px;font-weight:400;color:var(--nylas-base-800)}';var V=undefined&&undefined.__decorate||function(e,t,n,a){var s=arguments.length,o=s<3?t:a===null?a=Object.getOwnPropertyDescriptor(t,n):a,i;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,n,a);else for(var r=e.length-1;r>=0;r--)if(i=e[r])o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o;return s>3&&o&&Object.defineProperty(t,n,o),o};var q=undefined&&undefined.__metadata||function(e,t){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(e,t)};const W=class{constructor(t){e(this,t);this.returnToAllSchedulingPagesEvent=a(this,"returnToAllSchedulingPagesEvent",7);this.createEventTypeSelected=a(this,"createEventTypeSelected",7);this.name="select-event-type";this.enableEventTypes={one_on_one:true,collective:true,max_fairness:true,max_availability:true,group:true}}connectedCallback(){r("nylas-select-event-type","connectedCallback");queueMicrotask((()=>{if(this.themeConfig){this.applyThemeConfig(this.themeConfig);this.host.setAttribute("data-themed","")}}))}disconnectedCallback(){r("nylas-select-event-type","disconnectedCallback")}componentWillLoad(){r("nylas-select-event-type","componentWillLoad");this.host.setAttribute("name",this.name)}componentDidLoad(){r("nylas-select-event-type","componentDidLoad")}elementNameChangedHandler(e){r("nylas-select-event-type","elementNameChangedHandler",e);this.host.setAttribute("name",e)}selectedLanguageChangedHandler(e,t){if(e===t)return;l.changeLanguage(e)}themeConfigChangedHandler(e,t){if(e===t)return;this.applyThemeConfig(e)}applyThemeConfig(e){if(e){for(const[t,n]of Object.entries(e)){this.host.style.setProperty(`${t}`,n)}}}render(){const e={"one-on-one":"one_on_one",collective:"collective","max-fairness":"max_fairness","max-availability":"max_availability",group:"group"};const n=[{label:l.t("nylasSelectEventType.eventTypeOptions.oneOnOne.label"),value:y.one_on_one,description:l.t("nylasSelectEventType.eventTypeOptions.oneOnOne.desc")},{label:l.t("nylasSelectEventType.eventTypeOptions.collective.label"),value:y.collective,description:l.t("nylasSelectEventType.eventTypeOptions.collective.desc")},{label:l.t("nylasSelectEventType.eventTypeOptions.maxFairness.label"),value:y.max_fairness,description:l.t("nylasSelectEventType.eventTypeOptions.maxFairness.desc")},{label:l.t("nylasSelectEventType.eventTypeOptions.maxAvailability.label"),value:y.max_availability,description:l.t("nylasSelectEventType.eventTypeOptions.maxAvailability.desc")},{label:l.t("nylasSelectEventType.eventTypeOptions.group.label"),value:y.group,description:l.t("nylasSelectEventType.eventTypeOptions.group.desc")}];const a=[y.collective,y.max_availability,y.max_fairness];const o=this.participantOptions&&this.participantOptions?.length>0&&!!this.participantOptions[0].email&&!!this.participantOptions[0].name&&!!this.participantOptions[0].calendars&&this.participantOptions[0].calendars.length>0;const i=this.enableEventTypes?n.filter((t=>{const n=t.value;const s=e[n];r("key",n,this.enableEventTypes?this.enableEventTypes[s]:"no enableEventTypes");if(a.includes(n)&&!o){return false}return this.enableEventTypes&&this.enableEventTypes[s]})):n;return t(s,null,t("div",{class:"nylas-select-event-type",part:"nset"},t("div",{class:"header",part:"nset__header"},t("h2",null,l.t("nylasSelectEventType.createEventHeaderTitle")),t("button-component",{variant:"invisible",part:"nset__header__back-button",onClick:e=>{this.returnToAllSchedulingPagesEvent.emit()}},t("chevron-icon",{width:"16",height:"16"}),t("span",null,l.t("nylasSelectEventType.returnToAllSchedulingPages")))),t("div",{class:"content",part:"nset__content"},t("h3",null,l.t("nylasSelectEventType.eventTypeHeaderTitle")),t("div",{class:"event-type",part:"nset__content__event-type"},i.length===0&&t("p",null,l.t("nylasSelectEventType.noEventTypesEnabled")),i.map((e=>t("div",{class:"event-type-option",onClick:t=>{this.createEventTypeSelected.emit({eventType:e.value})},part:`nset__content__event-type-option-${e.value}`},t("h4",null,e.label),t("p",null,e.description))))))))}get host(){return o(this)}static get watchers(){return{name:["elementNameChangedHandler"],selectedLanguage:["selectedLanguageChangedHandler"],themeConfig:["themeConfigChangedHandler"]}}};V([i({name:"nylas-select-event-type",stateToProps:new Map([["schedulerConfig.selectedLanguage","selectedLanguage"],["schedulerConfig.additionalParticipants","participantOptions"],["schedulerConfig.enableEventTypes","enableEventTypes"],["schedulerConfig.themeConfig","themeConfig"]]),eventToProps:{returnToAllSchedulingPagesEvent:async(e,t)=>{t.schedulerConfigStore.state.action=null;t.schedulerConfigStore.set("selectedEventType",undefined)},createEventTypeSelected:async(e,t)=>{const{eventType:n}=e.detail;t.schedulerConfigStore.state.action="create";t.schedulerConfigStore.state.selectedEventType=n}},fireRegisterEvent:true}),q("design:type",Function),q("design:paramtypes",[]),q("design:returntype",void 0)],W.prototype,"render",null);W.style=A;export{T as google_logo_icon,O as microsoft_logo_icon,j as nylas_editor_tabs,$ as nylas_editor_tabs_group,D as nylas_list_configurations,W as nylas_select_event_type};
2
- //# sourceMappingURL=p-083268de.entry.js.map