@nylas/react 1.4.4 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -0
- package/dist/add-circle-icon_2.entry-8a1c55bc.cjs +1 -0
- package/dist/{add-circle-icon_2.entry-615fc101.js → add-circle-icon_2.entry-b4bbcfee.js} +3 -3
- package/dist/archive-icon.entry-a2492cf3.js +16 -0
- package/dist/archive-icon.entry-e48d2356.cjs +1 -0
- package/dist/{arrow-icon.entry-da152ec2.js → arrow-icon.entry-9414299f.js} +5 -5
- package/dist/arrow-icon.entry-b1ecb2aa.cjs +1 -0
- package/dist/{bold-icon.entry-61046c15.js → bold-icon.entry-b72aed9f.js} +4 -4
- package/dist/{bold-icon.entry-58679992.cjs → bold-icon.entry-c781e9c1.cjs} +1 -1
- package/dist/{button-component_2.entry-db53e00a.js → button-component_2.entry-36e49459.js} +9 -9
- package/dist/{button-component_2.entry-53bfdc19.cjs → button-component_2.entry-73f76545.cjs} +1 -1
- package/dist/calendar-agenda-fill-icon_36.entry-e9b92e0e.cjs +6 -0
- package/dist/{calendar-agenda-fill-icon_36.entry-76796ea7.js → calendar-agenda-fill-icon_36.entry-efa7ad26.js} +100 -100
- package/dist/{calendar-cancel-icon.entry-e5032d71.cjs → calendar-cancel-icon.entry-01c388eb.cjs} +1 -1
- package/dist/{calendar-cancel-icon.entry-f3b8ae99.js → calendar-cancel-icon.entry-0f739a8a.js} +4 -4
- package/dist/{calendar-check-icon_2.entry-7303362a.cjs → calendar-check-icon_2.entry-5febbadf.cjs} +1 -1
- package/dist/{calendar-check-icon_2.entry-27dc91f7.js → calendar-check-icon_2.entry-dfb0036d.js} +3 -3
- package/dist/{calendar-icon.entry-4f432baf.cjs → calendar-icon.entry-9743e0b7.cjs} +1 -1
- package/dist/{calendar-icon.entry-48fc45d6.js → calendar-icon.entry-f197396d.js} +2 -2
- package/dist/{checkbox-component.entry-8fad4faf.cjs → checkbox-component.entry-1aa5782f.cjs} +1 -1
- package/dist/{checkbox-component.entry-a15ffc4c.js → checkbox-component.entry-72a6aa72.js} +4 -4
- package/dist/checkmark-icon_15.entry-35dd97b7.cjs +5 -0
- package/dist/{checkmark-icon_15.entry-9f926a70.js → checkmark-icon_15.entry-5c09cff5.js} +225 -223
- package/dist/{chevron-icon_3.entry-5130fbba.js → chevron-icon_3.entry-4a72f211.js} +6 -6
- package/dist/chevron-icon_3.entry-e0608b7c.cjs +1 -0
- package/dist/{clock-icon_4.entry-40a393c9.js → clock-icon_4.entry-0afe79c2.js} +8 -8
- package/dist/{clock-icon_4.entry-ac65deae.cjs → clock-icon_4.entry-202ce025.cjs} +1 -1
- package/dist/constants-f51538ef-cd2a67c4.cjs +1 -0
- package/dist/{constants-3d8016e3-3c080f00.js → constants-f51538ef-e0a5f026.js} +27 -32
- package/dist/{customParseFormat-a4d9ea69-763f219e.cjs → customParseFormat-d1de5ed0-65a0bba3.cjs} +1 -1
- package/dist/{customParseFormat-a4d9ea69-7caebeb2.js → customParseFormat-d1de5ed0-c0ef002d.js} +1 -1
- package/dist/{delete-icon.entry-78e44eba.js → delete-icon.entry-580bfcc9.js} +4 -4
- package/dist/{delete-icon.entry-770dac8c.cjs → delete-icon.entry-762ac892.cjs} +1 -1
- package/dist/{document-refresh-icon.entry-d331f844.cjs → document-refresh-icon.entry-4e0f0c61.cjs} +1 -1
- package/dist/document-refresh-icon.entry-e500b4e3.js +16 -0
- package/dist/elements/index.d.ts +0 -8
- package/dist/{feedbackSync-57bb471a-ee800a95.js → feedbackSync-172f942c-42124493.js} +1 -1
- package/dist/{feedbackSync-57bb471a-5afb7715.cjs → feedbackSync-172f942c-62f72bd2.cjs} +1 -1
- package/dist/{folder-icon.entry-163e0aee.cjs → folder-icon.entry-2694e253.cjs} +1 -1
- package/dist/{folder-icon.entry-42650400.js → folder-icon.entry-54c3cc66.js} +2 -2
- package/dist/{forward-icon.entry-d60b6e31.js → forward-icon.entry-5e540f05.js} +5 -5
- package/dist/{forward-icon.entry-0a499b38.cjs → forward-icon.entry-f07102d8.cjs} +1 -1
- package/dist/{globe-icon_2.entry-19359092.cjs → globe-icon_2.entry-14a4c168.cjs} +1 -1
- package/dist/{globe-icon_2.entry-5afa8049.js → globe-icon_2.entry-aaceb196.js} +90 -80
- package/dist/{google-logo-icon_6.entry-d2febb78.js → google-logo-icon_6.entry-00d40db2.js} +473 -439
- package/dist/google-logo-icon_6.entry-fa76ffe3.cjs +2 -0
- package/dist/{google-meet-icon_5.entry-4a94137f.cjs → google-meet-icon_5.entry-6c20e149.cjs} +1 -1
- package/dist/{google-meet-icon_5.entry-7b1b36f2.js → google-meet-icon_5.entry-f1f05903.js} +12 -12
- package/dist/inbox-icon.entry-9a4628f2.cjs +1 -0
- package/dist/inbox-icon.entry-aa78ba8c.js +16 -0
- package/dist/index-1e75512f.cjs +57 -0
- package/dist/{index-9243e481.js → index-e8380973.js} +5687 -4802
- package/dist/{index.es-13ff6710-0f748bd2.cjs → index.es-fc8588de-034ead51.cjs} +6 -6
- package/dist/{index.es-13ff6710-73fa05e6.js → index.es-fc8588de-c943eef6.js} +827 -1065
- package/dist/{info-icon_2.entry-ba869bab.js → info-icon_2.entry-b3b313ab.js} +3 -3
- package/dist/{info-icon_2.entry-6667923a.cjs → info-icon_2.entry-bbcefb9a.cjs} +1 -1
- package/dist/{input-component.entry-7396acf1.js → input-component.entry-401b9ba5.js} +9 -9
- package/dist/{input-component.entry-db84f917.cjs → input-component.entry-ec8e8e7c.cjs} +1 -1
- package/dist/input-dropdown_2.entry-8cb11601.cjs +1 -0
- package/dist/{input-dropdown_2.entry-20f2031b.js → input-dropdown_2.entry-c37f392c.js} +6 -6
- package/dist/italic-icon.entry-0e85d0d9.js +16 -0
- package/dist/italic-icon.entry-6675558a.cjs +1 -0
- package/dist/{multi-select-dropdown_2.entry-81740b34.js → multi-select-dropdown_2.entry-3eecf18a.js} +22 -16
- package/dist/{multi-select-dropdown_2.entry-8e07b42b.cjs → multi-select-dropdown_2.entry-e37c501d.cjs} +1 -1
- package/dist/{nylas-booked-event-card_12.entry-e56c8e92.js → nylas-booked-event-card_12.entry-e7464ae7.js} +226 -224
- package/dist/nylas-booked-event-card_12.entry-fddc9ab8.cjs +1 -0
- package/dist/{nylas-event-calendar_3.entry-2504c7c0.js → nylas-event-calendar_3.entry-9abd46c2.js} +2360 -2238
- package/dist/nylas-event-calendar_3.entry-e6669bbf.cjs +11 -0
- package/dist/{nylas-form-card.entry-98903549.js → nylas-form-card.entry-a3186807.js} +3 -3
- package/dist/{nylas-form-card.entry-c406e3d3.cjs → nylas-form-card.entry-cbb00fba.cjs} +1 -1
- package/dist/nylas-scheduler-editor.entry-5c92901a.cjs +2 -0
- package/dist/{nylas-scheduler-editor.entry-670cc0b8.js → nylas-scheduler-editor.entry-7b188a38.js} +83 -50
- package/dist/nylas-scheduling.entry-970240f6.cjs +1 -0
- package/dist/nylas-scheduling.entry-e9929b03.js +968 -0
- package/dist/{person-icon.entry-bdaa899b.cjs → person-icon.entry-8998fdb8.cjs} +1 -1
- package/dist/{person-icon.entry-3bca6e51.js → person-icon.entry-d2856f08.js} +4 -4
- package/dist/{play-icon.entry-ecc86e85.cjs → play-icon.entry-99eb969b.cjs} +1 -1
- package/dist/play-icon.entry-f949a80f.js +16 -0
- package/dist/{radio-button-group.entry-9851076c.js → radio-button-group.entry-bc3b12fd.js} +2 -2
- package/dist/{radio-button-group.entry-6965ad34.cjs → radio-button-group.entry-d66edd04.cjs} +1 -1
- package/dist/react.cjs +1 -1
- package/dist/react.js +96 -104
- package/dist/{refresh-icon.entry-90d52ab3.cjs → refresh-icon.entry-99d1982d.cjs} +1 -1
- package/dist/{refresh-icon.entry-d776c4a7.js → refresh-icon.entry-d6df8b1c.js} +2 -2
- package/dist/{register-component-02a05665-2e992621.js → register-component-62d792d4-448b6a43.js} +1 -1
- package/dist/{register-component-02a05665-75652287.cjs → register-component-62d792d4-c6e7d129.cjs} +1 -1
- package/dist/{reply-all-icon.entry-24f7c0fe.js → reply-all-icon.entry-7ebf01a0.js} +2 -2
- package/dist/{reply-all-icon.entry-6e49eb03.cjs → reply-all-icon.entry-d7c44139.cjs} +1 -1
- package/dist/{reply-icon.entry-7fff25c9.cjs → reply-icon.entry-058c00e8.cjs} +1 -1
- package/dist/{reply-icon.entry-d5d26d65.js → reply-icon.entry-d1622d85.js} +5 -5
- package/dist/sent-icon.entry-6c604512.cjs +1 -0
- package/dist/sent-icon.entry-fe12bc2f.js +16 -0
- package/dist/spam-icon.entry-45e5292e.cjs +1 -0
- package/dist/spam-icon.entry-b97c7709.js +16 -0
- package/dist/{star-icon.entry-3c57a35c.cjs → star-icon.entry-4db13fdb.cjs} +1 -1
- package/dist/{star-icon.entry-c2e743a9.js → star-icon.entry-98b80645.js} +6 -6
- package/dist/{stop-icon.entry-0b9563d5.js → stop-icon.entry-0290fd30.js} +2 -2
- package/dist/{stop-icon.entry-cf4c4e63.cjs → stop-icon.entry-9d7b53fd.cjs} +1 -1
- package/dist/{textarea-component.entry-2eccc173.cjs → textarea-component.entry-9b474ab5.cjs} +1 -1
- package/dist/{textarea-component.entry-60e7a4d0.js → textarea-component.entry-a62c257b.js} +2 -2
- package/dist/{toggle-switch.entry-612744fd.cjs → toggle-switch.entry-5dbfcd48.cjs} +1 -1
- package/dist/{toggle-switch.entry-0a6b01e6.js → toggle-switch.entry-e423b793.js} +2 -2
- package/dist/{translate-icon.entry-ede5f77d.js → translate-icon.entry-60c55a2e.js} +4 -4
- package/dist/{translate-icon.entry-8adc4146.cjs → translate-icon.entry-f82fa6fc.cjs} +1 -1
- package/dist/trash-fill-icon.entry-095caae3.cjs +1 -0
- package/dist/trash-fill-icon.entry-825055fd.js +16 -0
- package/dist/{underline-icon.entry-d2fe2da6.cjs → underline-icon.entry-0807a43d.cjs} +1 -1
- package/dist/{underline-icon.entry-b2b43ba2.js → underline-icon.entry-40028bc6.js} +2 -2
- package/dist/{warning-icon.entry-0a5c7337.js → warning-icon.entry-24e37759.js} +2 -2
- package/dist/{warning-icon.entry-85822f4d.cjs → warning-icon.entry-fce7c14f.cjs} +1 -1
- package/package.json +2 -2
- package/dist/add-circle-icon_2.entry-e616ece6.cjs +0 -1
- package/dist/archive-icon.entry-41938a61.cjs +0 -1
- package/dist/archive-icon.entry-bd81d2d9.js +0 -16
- package/dist/arrow-icon.entry-4103be57.cjs +0 -1
- package/dist/calendar-agenda-fill-icon_36.entry-917e4a9d.cjs +0 -6
- package/dist/checkmark-icon_15.entry-08c8b107.cjs +0 -5
- package/dist/chevron-icon_3.entry-2f75c3c4.cjs +0 -1
- package/dist/constants-3d8016e3-fd6c3848.cjs +0 -1
- package/dist/document-refresh-icon.entry-f6dfe744.js +0 -16
- package/dist/google-logo-icon_6.entry-896a10a5.cjs +0 -2
- package/dist/inbox-icon.entry-24ec450f.cjs +0 -1
- package/dist/inbox-icon.entry-b71acde0.js +0 -16
- package/dist/index-efb6db79.cjs +0 -57
- package/dist/input-dropdown_2.entry-0c219620.cjs +0 -1
- package/dist/italic-icon.entry-a9324a8a.cjs +0 -1
- package/dist/italic-icon.entry-c42f8112.js +0 -16
- package/dist/notebook-store-b61693cd-5657061b.js +0 -14
- package/dist/notebook-store-b61693cd-6515d345.cjs +0 -5
- package/dist/nylas-booked-event-card_12.entry-7c7afae5.cjs +0 -1
- package/dist/nylas-call-summary.entry-4bf7284f.cjs +0 -1
- package/dist/nylas-call-summary.entry-ad6fb46a.js +0 -16
- package/dist/nylas-event-calendar_3.entry-f747f6a8.cjs +0 -6
- package/dist/nylas-if-state.entry-6b071705.cjs +0 -1
- package/dist/nylas-if-state.entry-7468854a.js +0 -95
- package/dist/nylas-key-points.entry-7af8da1a.cjs +0 -1
- package/dist/nylas-key-points.entry-c186445e.js +0 -29
- package/dist/nylas-login.entry-171bd025.cjs +0 -1
- package/dist/nylas-login.entry-d85c1473.js +0 -74
- package/dist/nylas-provider.entry-ab1f6886.js +0 -265
- package/dist/nylas-provider.entry-e4231b93.cjs +0 -1
- package/dist/nylas-scheduler-editor.entry-d522ca98.cjs +0 -2
- package/dist/nylas-scheduling.entry-9e81c6fc.js +0 -439
- package/dist/nylas-scheduling.entry-c52edb14.cjs +0 -1
- package/dist/nylas-transcript.entry-a1fa7e17.cjs +0 -6
- package/dist/nylas-transcript.entry-fb39b5af.js +0 -128
- package/dist/nylas-video-player.entry-25e8cd9a.js +0 -39
- package/dist/nylas-video-player.entry-89842545.cjs +0 -1
- package/dist/nylas-video-preview.entry-28a0bd60.cjs +0 -1
- package/dist/nylas-video-preview.entry-80171531.js +0 -16
- package/dist/play-icon.entry-d548464e.js +0 -16
- package/dist/scheduler-config-store-d6729d8d-50920e8c.js +0 -29
- package/dist/scheduler-config-store-d6729d8d-a0bdda83.cjs +0 -1
- package/dist/scheduler-store-fe9e85a4-1dcfddfa.js +0 -533
- package/dist/scheduler-store-fe9e85a4-baabf78a.cjs +0 -1
- package/dist/sent-icon.entry-42ce5bcb.cjs +0 -1
- package/dist/sent-icon.entry-858fe83e.js +0 -16
- package/dist/spam-icon.entry-0827144e.js +0 -16
- package/dist/spam-icon.entry-bf1a48b6.cjs +0 -1
- package/dist/trash-fill-icon.entry-b6456ec8.cjs +0 -1
- package/dist/trash-fill-icon.entry-d48f72c5.js +0 -16
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-1e75512f.cjs"),R=require("./index.es-fc8588de-034ead51.cjs"),X=require("./constants-f51538ef-cd2a67c4.cjs"),M=require("./feedbackSync-172f942c-62f72bd2.cjs");require("react");require("react/jsx-runtime");require("react-dom");var H;(function(n){n.Error="error",n.Warning="warning",n.Info="info",n.Success="success"})(H||(H={}));var L;(function(n){n.Component="component",n.Api="api",n.Auth="auth"})(L||(L={}));var q;(function(n){n.endtime_not_in_future="endtime_not_in_future",n.no_booking_info="no_booking_info",n.no_timeslot_selected="no_timeslot_selected",n.no_timezone_selected="no_timezone_selected",n.no_booking_id="no_booking_id",n.no_salt="no_salt",n.invalid_start_time="invalid_start_time",n.invalid_end_time="invalid_end_time",n.invalid_timezone="invalid_timezone",n.no_config_id="no_config_id"})(q||(q={}));class Z{constructor(){this.component=e=>{const t=L.Component,o=`${e} Error`;return{endtime_not_in_future:(s='"endtime" can not be in the future')=>({title:o,message:s,category:t}),no_booking_info:(s="No booking info provided")=>({title:o,message:s,category:t}),no_timeslot_selected:(s="No timeslot selected")=>({title:o,message:s,category:t}),no_timezone_selected:(s="No timezone selected")=>({title:o,message:s,category:t}),no_booking_id:(s="No booking id provided")=>({title:o,message:s,category:t}),no_salt:(s="No salt provided")=>({title:o,message:s,category:t}),invalid_start_time:(s="Invalid start time")=>({title:o,message:s,category:t}),invalid_end_time:(s="Invalid end time")=>({title:o,message:s,category:t}),invalid_timezone:(s="Invalid timezone")=>({title:o,message:s,category:t}),no_config_id:(s="No configuration id provided")=>({title:o,message:s,category:t})}},this.api=e=>{const t=L.Api,o=`${e} Error`;return{invalid_session:s=>({title:o,message:s,category:t}),general_error:s=>({title:o,message:s,category:t}),internal_error:s=>({title:o,message:s,category:t}),invalid_request_error:s=>({title:o,message:s,category:t}),timeslot_not_available:s=>({title:o,message:s,category:t}),provider_error:s=>({title:o,message:s,category:t}),not_found_error:s=>({title:o,message:s,category:t})}}}}class K{constructor({schedulerAPIURL:e,schedulerStore:t,sessionId:o,configId:s,slug:a,clientId:r}){this.errors=new Z,this.schedulerStore=t,this.schedulerAPIURL=e,this.sessionId=o,this.configId=s,this.slug=a,this.clientId=r}getHeaders(){return this.sessionId?{Authorization:`Bearer ${this.sessionId}`}:{}}async makeAPIRequest(e,t,o,s={}){try{const a=new URL(this.schedulerAPIURL),r="2.0.0";return a.pathname=e,await(await fetch(decodeURIComponent(a.toString()),{method:t,headers:{"Content-Type":"application/json",Origin:window.location.origin,"X-Source":"nylas-scheduling","X-Nylas-Web-Elements-Version":r,...s},body:o})).json()}catch(a){return{error:{message:a.message,title:"API request failed",type:"api"}}}}getErrorMessage(e){var o,s,a,r;let t=(e==null?void 0:e.message)||(e==null?void 0:e.title)||"Something went wrong";return(e==null?void 0:e.type)==="provider_error"&&(t=((s=(o=e==null?void 0:e.provider_error)==null?void 0:o.error)==null?void 0:s.message)||((r=(a=e==null?void 0:e.provider_error)==null?void 0:a.error)==null?void 0:r.title)||"Something went wrong"),t}setConfigId(e){this.configId=e}selectDate(e){this.schedulerStore.set("selectedDate",e),this.schedulerStore.set("selectedTimeslot",null)}selectTime(e){this.schedulerStore.set("selectedTimeslot",e)}selectTimezone(e){this.schedulerStore.set("selectedTimezone",e)}selectLanguage(e){this.schedulerStore.set("selectedLanguage",e),i.instance.changeLanguage(e)}async toggleAdditionalData(e){e||await this.refetchAvailability(),this.schedulerStore.set("showBookingForm",e)}setParticipantName(e){const{bookingInfo:t}=this.schedulerStore.state;this.schedulerStore.set("bookingInfo",{...t,primaryParticipant:{...t==null?void 0:t.primaryParticipant,name:e}})}setParticipantEmail(e){const{bookingInfo:t}=this.schedulerStore.state;this.schedulerStore.set("bookingInfo",{...t,primaryParticipant:{...t==null?void 0:t.primaryParticipant,email:e}})}async refetchAvailability(){const e=new Date,t=new Date(e.getFullYear(),e.getMonth(),1).getTime()/1e3,o=t<e.getTime()/1e3?Math.floor(e.getTime()/1e3):t,s=new Date(e.getFullYear(),e.getMonth()+1,1).getTime()/1e3;return await this.getAvailability(o,s)}async resetStoreStateAndFetchAvailability(){const e=new Date,t=await this.refetchAvailability(),o=this.schedulerStore.get("availability").find(a=>new Date(a.start_time)>new Date);let s=e;return o&&(s=o.start_time),this.schedulerStore.set("selectedDate",s),this.schedulerStore.set("eventInfo",null),this.schedulerStore.set("showBookingForm",!1),this.schedulerStore.set("selectedTimeslot",null),t}async setReschedule(e){this.schedulerStore.set("isLoading",!0);const t=this.schedulerStore.state.eventInfo;return t&&this.schedulerStore.set("reschedulingEventInfo",t),this.schedulerStore.set("rescheduleBookingId",e),await this.getUISettings(),await this.resetStoreStateAndFetchAvailability().finally(()=>{this.schedulerStore.set("isLoading",!1)})}async setCancel(e){this.schedulerStore.set("cancelBookingId",e)}async setReject(e){this.schedulerStore.set("rejectBookingId",e)}async resetCancel(){const e=await this.resetStoreStateAndFetchAvailability();return this.schedulerStore.set("cancelBookingId",""),this.schedulerStore.set("rejectBookingId",""),this.schedulerStore.set("cancelledEventInfo",null),e}async goBack(){this.schedulerStore.set("cancelBookingId","")}async resetConfirm(){const e=await this.resetStoreStateAndFetchAvailability();return this.schedulerStore.set("organizerConfirmationBookingId",""),this.schedulerStore.set("confirmedEventInfo",void 0),e}async bookTimeslot(e){var T,I,B;this.schedulerStore.set("isLoading",!0);const{selectedTimeslot:t,selectedTimezone:o,bookingInfo:s,selectedLanguage:a}=this.schedulerStore.state;if(!e&&!s)return{error:this.errors.component(i.instance.t("createBookingErrorTitle")).no_booking_info()};const r=(e==null?void 0:e.timeslot)||t;if(!r)return{error:this.errors.component(i.instance.t("createBookingErrorTitle")).no_timeslot_selected()};const l=e&&(e!=null&&e.timezone)?e==null?void 0:e.timezone:o,c=a||"en-US";if(!l)return{error:this.errors.component(i.instance.t("createBookingErrorTitle")).no_timezone_selected()};const u=[...this.schedulerStore.get("availabilityOrderEmails")];let d="";const g=(r==null?void 0:r.emails)||[],h={};Object.entries((s==null?void 0:s.additionalFields)||{}).forEach(([_,x])=>{h[_]=x.value});const m=e?e==null?void 0:e.primaryParticipant:s==null?void 0:s.primaryParticipant,p=e?(e==null?void 0:e.guests)||[]:(s==null?void 0:s.guests)||[],w=e?e==null?void 0:e.additionalFields:h,f=this.getHeaders(),k=`/v3/scheduling/bookings${!this.sessionId&&this.configId?`?configuration_id=${this.configId}`:!this.sessionId&&this.slug&&this.clientId?`?slug=${this.slug}&client_id=${this.clientId}`:""}`;if(u.length===0){const _=await this.makeAPIRequest(decodeURIComponent(k),"POST",JSON.stringify({additional_fields:w,additional_guests:p,guest:{...m},start_time:r.start_time.getTime()/1e3,end_time:r.end_time.getTime()/1e3,timezone:l,event_id:(r==null?void 0:r.event_id)||void 0,master_id:(r==null?void 0:r.master_id)||void 0,calendar_id:(r==null?void 0:r.calendar_id)||void 0,email_language:this.getTwoLetterLanguageCode(c)}),f);return this.schedulerStore.set("isLoading",!1),"data"in _?(this.schedulerStore.set("eventInfo",_.data),_):{error:_.error}}for(;u.length>0;){if(d=u.shift(),!g.includes(d))continue;const _=await this.makeAPIRequest(decodeURIComponent(k),"POST",JSON.stringify({participants:d?[{email:d}]:void 0,additional_fields:w,additional_guests:p,guest:{...m},start_time:r.start_time.getTime()/1e3,end_time:r.end_time.getTime()/1e3,timezone:l,email_language:this.getTwoLetterLanguageCode(c)}),f);if("data"in _)return this.schedulerStore.set("isLoading",!1),this.schedulerStore.set("eventInfo",_==null?void 0:_.data),_;if((I=(T=_.error)==null?void 0:T.message)!=null&&I.startsWith("The selected timeslot is unavailable"))continue;{this.schedulerStore.set("isLoading",!1);const x=(B=_.error)==null?void 0:B.type;let D=_.error;if(x&&x in this.errors.api(i.instance.t("createBookingErrorTitle"))){const z=this.getErrorMessage(D);D=this.errors.api(i.instance.t("createBookingErrorTitle"))[x](z)}return{error:D}}}return this.schedulerStore.set("isLoading",!1),{error:this.errors.api(i.instance.t("createBookingErrorTitle")).timeslot_not_available("The selected timeslot is unavailable")}}async getUISettings(){var r;this.schedulerStore.set("isLoading",!0);const e=this.schedulerStore.get("rescheduleBookingId"),t=this.getHeaders();let o=!this.sessionId&&this.configId?`?configuration_id=${this.configId}`:!this.sessionId&&this.slug&&this.clientId?`?slug=${this.slug}&client_id=${this.clientId}`:"";e&&o?o+=`&booking_id=${e}`:e&&(o+=`?booking_id=${e}`);const s=`/v3/scheduling/ui-settings${o}`,a=await this.makeAPIRequest(s,"GET",void 0,t);if("error"in a){this.schedulerStore.set("isLoading",!1);const l=(r=a.error)==null?void 0:r.type;let c=a.error;return l&&l in this.errors.api(i.instance.t("getUISettingErrorTitle"))&&(c=this.errors.api(i.instance.t("getUISettingErrorTitle"))[l]((c==null?void 0:c.message)||(c==null?void 0:c.title)||"Something went wrong")),{error:c}}return"data"in a&&this.schedulerStore.set("configSettings",a.data),this.schedulerStore.set("isLoading",!1),a}getTwoLetterLanguageCode(e){return e.split("-")[0]}getStartTimeWithMinBookingNotice(e){var a;const t=(a=this.schedulerStore.get("configSettings"))==null?void 0:a.scheduler,o=t==null?void 0:t.min_booking_notice;if(!o)return e;const s=new Date().getTime();return e<(s+o*60*1e3)/1e3?Math.floor((s+o*60*1e3)/1e3):e}getEndTimeForAvailableDaysInFuture(e){var r,l;const t=new Date,o=(l=(r=this.schedulerStore.get("configSettings"))==null?void 0:r.scheduler)==null?void 0:l.available_days_in_future,s=Math.floor(i.addDaysToCurrentDate(t,o).getTime()/1e3);return Math.min(s,e)}async getAvailability(e=0,t=0){var h,m,p,w;this.schedulerStore.set("isLoading",!0);const o=new URLSearchParams,s=new Date,a=s.getTime();if(t&&t<a/1e3)return this.schedulerStore.set("isLoading",!1),{error:this.errors.component(i.instance.t("getAvailabilityErrorTitle")).endtime_not_in_future()};if(!e){const f=new Date(s.getFullYear(),s.getMonth(),1);e=Math.floor(f.getTime()/1e3)}if(!t){const f=new Date(s.getFullYear(),s.getMonth()+1,0);t=Math.floor(f.getTime()/1e3)}t=this.getEndTimeForAvailableDaysInFuture(t);const r=this.getStartTimeWithMinBookingNotice(e);e=r,t=r>t?r+1:t,o.append("start_time",encodeURIComponent(e.toString())),o.append("end_time",encodeURIComponent(t.toString())),this.configId&&!this.sessionId?o.append("configuration_id",encodeURIComponent(this.configId)):this.slug&&this.clientId&&!this.sessionId&&(o.append("slug",encodeURIComponent(this.slug)),o.append("client_id",encodeURIComponent(this.clientId)));const l=this.schedulerStore.get("rescheduleBookingId");l&&o.append("booking_id",encodeURIComponent(l));const c=o.toString(),u=`/v3/scheduling/availability${c?`?${c}`:""}`,d=this.getHeaders(),g=await this.makeAPIRequest(decodeURIComponent(u),"GET",void 0,d);if("error"in g){this.schedulerStore.set("availability",[]),this.schedulerStore.set("isLoading",!1);const f=(h=g.error)==null?void 0:h.type;let v=g.error;if(f&&f in this.errors.api(i.instance.t("getAvailabilityErrorTitle"))){const k=this.getErrorMessage(v);v=this.errors.api(i.instance.t("getAvailabilityErrorTitle"))[f](k)}return{error:v}}if("data"in g){const k=(((p=(m=g.data)==null?void 0:m.time_slots)==null?void 0:p.map(I=>({...I,start_time:new Date(I.start_time*1e3),end_time:new Date(I.end_time*1e3)})))||[]).filter(I=>I.start_time.getTime()>a).sort((I,B)=>I.start_time.getTime()-B.start_time.getTime());this.schedulerStore.set("availability",k);const T=((w=g.data)==null?void 0:w.order)||[];this.schedulerStore.set("availabilityOrderEmails",T)}return this.schedulerStore.set("isLoading",!1),g}async cancelBooking(e,t){var l;if(this.schedulerStore.set("isLoading",!0),!e)return{error:this.errors.component(i.instance.t("cancelBookingErrorTitle")).no_booking_id()};const o=!this.sessionId&&this.configId?`?configuration_id=${this.configId}`:!this.sessionId&&this.slug&&this.clientId?`?slug=${this.slug}&client_id=${this.clientId}`:"",s=`/v3/scheduling/bookings/${e}${o}`,a=this.getHeaders(),r=await this.makeAPIRequest(decodeURIComponent(s),"DELETE",JSON.stringify({action:"cancel",cancellation_reason:t}),a);if("error"in r){this.schedulerStore.set("isLoading",!1);const c=(l=r.error)==null?void 0:l.type;let u=r.error;if(c&&c in this.errors.api(i.instance.t("cancelBookingErrorTitle"))){const d=this.getErrorMessage(u);u=this.errors.api(i.instance.t("cancelBookingErrorTitle"))[c](d)}return{error:u}}return this.schedulerStore.set("cancelledEventInfo",{booking_id:e}),this.schedulerStore.set("rescheduleBookingId",""),this.schedulerStore.set("isLoading",!1),r}async rescheduleBooking(e,t){var F;if(this.schedulerStore.set("isLoading",!0),!e)return{error:this.errors.component(i.instance.t("rescheduleBookingErrorTitle")).no_booking_id()};const o=this.errors.api(i.instance.t("rescheduleBookingErrorTitle")),s=this.errors.component(i.instance.t("rescheduleBookingErrorTitle")),{bookingInfo:a,selectedTimeslot:r,selectedTimezone:l,selectedLanguage:c}=this.schedulerStore.state,{startTime:u,endTime:d,timezone:g}=t,h=u||(r==null?void 0:r.start_time);if(!h)return{error:s.invalid_start_time('Please pass "startTime" in data or set "selectedTimeslot" in the defaultSchedulerState.')};const m=d||(r==null?void 0:r.end_time);if(!m)return{error:s.invalid_end_time('Please pass "endTime" in data or set "selectedTimeslot" in the defaultSchedulerState.')};const p=this.schedulerStore.get("availabilityOrderEmails");let w="";if(p.length>0){const y=(r==null?void 0:r.emails)||[];for(let C=0;C<p.length;C++)if(y.includes(p[C])){w=p[C];break}}const f=g||l;if(!f)return{error:s.invalid_timezone('Please pass "timezone" in data or set "selectedTimezone" in the defaultSchedulerState.')};const v=(r==null?void 0:r.event_id)||void 0,k=(r==null?void 0:r.master_id)||void 0,T=(r==null?void 0:r.calendar_id)||void 0,I={};Object.entries((a==null?void 0:a.additionalFields)||{}).forEach(([y,C])=>{I[y]=C.value});const B=t?t==null?void 0:t.primaryParticipant:a==null?void 0:a.primaryParticipant,_=t?(t==null?void 0:t.guests)||[]:(a==null?void 0:a.guests)||[],x=t?t==null?void 0:t.additionalFields:I,D=!this.sessionId&&this.configId?`?configuration_id=${this.configId}`:!this.sessionId&&this.slug&&this.clientId?`?slug=${this.slug}&client_id=${this.clientId}`:"",z=`/v3/scheduling/bookings/${e}${D}`,b=this.getHeaders(),S=await this.makeAPIRequest(decodeURIComponent(z),"PATCH",JSON.stringify({start_time:h.getTime()/1e3,end_time:m.getTime()/1e3,timezone:f,additional_fields:x,guest:{...B},additional_guests:_,participants:w?[{email:w}]:void 0,email_language:this.getTwoLetterLanguageCode(c),event_id:v,master_id:k,calendar_id:T}),b);if("error"in S){this.schedulerStore.set("isLoading",!1);const y=(F=S.error)==null?void 0:F.type;let C=S.error;if(y&&y in o){const U=this.getErrorMessage(C);C=o[y](U)}return{error:C}}const A=this.schedulerStore.get("reschedulingEventInfo");if("data"in S)this.schedulerStore.set("eventInfo",S==null?void 0:S.data);else if(A)this.schedulerStore.set("eventInfo",A);else{const y={booking_id:e};this.schedulerStore.set("eventInfo",y)}return this.schedulerStore.set("isLoading",!1),S}async updateBooking(e){var g;this.schedulerStore.set("isLoading",!0);const{bookingId:t,status:o,reason:s}=e,a=this.schedulerStore.get("organizerConfirmationSalt"),r=o==="confirmed"?i.instance.t("confirmBookingErrorTitle"):i.instance.t("rejectBookingErrorTitle");if(!t)return{error:this.errors.component(r).no_booking_id()};if(!a)return{error:this.errors.component(r).no_salt()};const l=!this.sessionId&&this.configId?`?configuration_id=${this.configId}`:!this.sessionId&&this.slug&&this.clientId?`?slug=${this.slug}&client_id=${this.clientId}`:"",c=`/v3/scheduling/bookings/${t}${l}`,u=this.getHeaders(),d=await this.makeAPIRequest(decodeURIComponent(c),"PUT",JSON.stringify({status:o,cancellation_reason:s,salt:a}),u);if("error"in d){this.schedulerStore.set("isLoading",!1);const h=(g=d.error)==null?void 0:g.type;let m=d.error;if(h&&h in this.errors.api(r)){const p=this.getErrorMessage(m);m=this.errors.api(r)[h](p)}return{error:m}}return"data"in d&&o==="confirmed"?this.schedulerStore.set("confirmedEventInfo",d==null?void 0:d.data):"request_id"in d&&o==="cancelled"&&this.schedulerStore.set("cancelledEventInfo",{booking_id:t}),this.schedulerStore.set("organizerConfirmationBookingId",""),this.schedulerStore.set("isLoading",!1),d}async validateGroupEventTimeslot(e){var r,l;this.schedulerStore.set("isLoading",!0);const t=(r=this.schedulerStore.get("configSettings"))==null?void 0:r.configuration_id;if(!t)return{error:this.errors.component(i.instance.t("validateTimeslotErrorTitle")).no_config_id()};const o=this.getHeaders(),s=`/v3/scheduling/configurations/${t}/group-events/validate-timeslot`,a=await this.makeAPIRequest(decodeURIComponent(s),"POST",JSON.stringify({...e,start_time:e.start_time.getTime()/1e3,end_time:e.end_time.getTime()/1e3}),o);if("error"in a){this.schedulerStore.set("isLoading",!1);const c=(l=a.error)==null?void 0:l.type;let u=a.error;if(c&&c in this.errors.api(i.instance.t("validateTimeslotErrorTitle"))){const d=this.getErrorMessage(u);u=this.errors.api(i.instance.t("validateTimeslotErrorTitle"))[c](d)}return this.refetchAvailability(),{error:u}}return this.schedulerStore.set("selectedTimeslot",e),this.schedulerStore.set("showBookingForm",!0),this.schedulerStore.set("isLoading",!1),a}}class Q{constructor({schedulerAPIURL:e,nylasSchedulerStore:t,sessionId:o,configId:s,slug:a,clientId:r}){if(!e)throw new Error("schedulerAPIURL is required");if(!t)throw new Error("nylasSchedulerStore is required");if(!o&&!s&&!(a||r))throw new Error("sessionId is required for private configs. If using public config either pass a configurationId or a combination of slug and clientId.");e==="/"&&(e=new URL(window.location.href).origin),this.configId=s,this.sessionId=o,this.schedulerAPIURL=e,this.nylasSchedulerStore=t,this.slug=a,this.clientId=r}init(){i.debug("NylasConnector init")}get schedulerStore(){return this.nylasSchedulerStore}get scheduler(){return this._schedulerAPIConnector?this._schedulerAPIConnector:(this._schedulerAPIConnector=new K({schedulerAPIURL:this.schedulerAPIURL,schedulerStore:this.schedulerStore,sessionId:this.sessionId,configId:this.configId,slug:this.slug,clientId:this.clientId}),this._schedulerAPIConnector)}resetStores(){this.nylasSchedulerStore.reset()}}function V(n={}){const e={selectedDate:null,selectedLanguage:navigator.language,selectedTimezone:Intl.DateTimeFormat().resolvedOptions().timeZone,selectedTimeslot:null,showBookingForm:!1,availabilityOrderEmails:[],selectableDates:null,availability:[],eventDuration:0,state:"ready",eventInfo:null,cancelledEventInfo:null,isLoading:!1,nylasBranding:!0,...n};i.debug("[defaultNylasStoreState]: ",e);const t=i.createStore(e);return t.onChange("availability",o=>{i.debug("[availability]: ",o);const s=o.map(l=>l.start_time);i.debug("[selectableDates]: ",s),t.set("selectableDates",s);const a=o[0];if(!a)return;const r=Math.floor((a.end_time.getTime()-a.start_time.getTime())/6e4);i.debug("[durationMinutes]: ",r),t.set("eventDuration",r)}),t.reset=()=>{for(const o in e){const s=e[o];t.set(o,s)}},t}const P=(n,e)=>{const t=n.isLoading,o=n.showNotification,s=n.nylasBranding;return i.h(i.Fragment,null,o&&i.h("nylas-notification",null),t&&i.h("div",{class:"loading"},i.h("div",{class:"left"},i.h("div",{class:"skeleton"})),i.h("div",{class:"right"},i.h("div",{class:"skeleton"}),i.h("div",{class:"skeleton"}),i.h("div",{class:"skeleton"}),i.h("div",{class:"skeleton"}),i.h("div",{class:"skeleton"}))),!t&&e,i.h("div",{class:"footer"},s&&i.h("a",{href:"https://scheduler.nylas.com?utm_source=powered-by-nylas-logoutm_medium=link&utm_campaign=get-scheduler&utm_id=get-scheduler",class:"powered-by-nylas",target:"_blank",rel:"noreferrer noopener"},"Powered by ",i.h("span",{class:"sr-only"},"Nylas"),i.h("nylas-logo",{"aria-hidden":!0}))))},W=(n,e)=>i.h("div",{class:"message-banner"},e),ee=':host{display:flex;flex-direction:column;overflow:visible;border-radius:var(--nylas-border-radius-2x);width:fit-content;background:var(--nylas-base-0);position:relative;box-shadow:0px 4px 8px 2px rgba(0, 0, 0, 0.05), 0px 8px 16px -2px rgba(0, 0, 0, 0.1);--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff;font-family:var(--nylas-font-family);font-optical-sizing:auto;font-style:normal;font-variation-settings:"slnt" 0}@media screen and (max-width: 768px){:host{width:auto;min-width:325px}}:root{font-family:inherit}.error{padding:8rem 12rem;color:var(--nylas-base-0);background-color:var(--nylas-error);margin:1.5rem;border-radius:var(--nylas-border-radius-2x)}.message-banner{text-align:right;color:var(--nylas-base-800);padding:1rem;border-bottom:1px solid var(--nylas-color-primary-200);margin:0}.loading{margin:1.5rem;display:flex;gap:1rem}.loading .skeleton{border-radius:var(--nylas-border-radius-2x);animation:pulsate 1.5s infinite}.loading .skeleton:nth-child(2){animation-delay:-100ms}.loading .skeleton:nth-child(3){animation-delay:-200ms}.loading .skeleton:nth-child(4){animation-delay:-300ms}.loading .skeleton:nth-child(5){animation-delay:-400ms}.loading .left .skeleton{height:100%;width:400px}.loading .right .skeleton{height:5rem;width:300px;margin-bottom:1rem}.loading .right .skeleton:last-child{margin-bottom:0}@keyframes pulsate{0%{background-color:var(--nylas-base-50)}50%{background-color:var(--nylas-base-100)}100%{background-color:var(--nylas-base-50)}}.select-date-page,.additional-data-page,.booked-event-page,.manual-confirmation-page,.cancelled-event-page,.cancel-flow-page{border-top-left-radius:var(--nylas-border-radius-2x);border-top-right-radius:var(--nylas-border-radius-2x)}.select-date-page,.additional-data-page{display:flex}@media screen and (max-width: 768px){.select-date-page,.additional-data-page{flex-direction:column}}.booked-event-page,.manual-confirmation-page{background-color:var(--nylas-base-50)}.cancelled-event-page,.manual-confirmation-page,.cancel-flow-page{padding:1rem;height:496px;display:flex;justify-content:center;align-items:center}.booked-event-page,.manual-confirmation-page,.cancelled-event-page,.cancel-flow-page{min-width:784px;background:var(--nylas-base-50)}@media screen and (max-width: 768px){.booked-event-page,.manual-confirmation-page,.cancelled-event-page,.cancel-flow-page{min-width:90%}}.left-panel{display:flex;flex-direction:column;min-width:424px;border-top-left-radius:inherit;background:var(--nylas-base-0);position:relative;padding:1rem 0 0 0;height:624px}@media screen and (max-width: 768px){.left-panel{border-top-right-radius:inherit;min-width:unset;height:auto}}@media screen and (max-width: 768px){.select-date-page .left-panel{height:624px}}.border{margin-left:-20px;margin-right:-20px;border-top-width:1px;height:0.5px;background-color:var(--nylas-base-200)}@media screen and (max-width: 768px){.border{display:none}}.right-panel{min-width:360px;width:360px;background-color:var(--nylas-base-50);height:624px;padding-top:16px;border-left:1px solid var(--nylas-base-200);border-top-right-radius:inherit}.right-panel.reschedule{border-top-right-radius:0px}@media screen and (max-width: 768px){.right-panel{border-top-right-radius:0px;width:inherit;min-width:unset;height:auto;border-left:none}}.right-panel h2{display:flex;margin:0;height:48px;gap:0.5rem;justify-content:center;align-items:center;width:auto;font-size:1.125rem;line-height:1.5rem;font-weight:500;text-align:center;color:var(--nylas-base-800)}.additional-data-page .left-panel{background-color:var(--nylas-base-50)}.additional-data-page .right-panel{background-color:var(--nylas-base-0)}nylas-selected-event-card{height:604px;padding:0 1rem}@media screen and (max-width: 768px){nylas-selected-event-card{height:250px}}.footer{display:flex;justify-content:flex-end;align-items:center;padding:16px;font-size:14px;font-weight:300;color:var(--nylas-base-500);border-top:1px solid var(--nylas-base-200);min-height:24px}.footer .powered-by-nylas{display:flex;align-items:center;text-decoration:none;color:var(--nylas-base-500)}.footer .powered-by-nylas:hover{color:var(--nylas-base-800)}.footer svg{fill:var(--nylas-base-500)}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0}.footer svg{margin-top:1px}nylas-selected-event-card::part(nsec__timezone){position:absolute;bottom:0}nylas-notification{margin:1.5rem;width:-webkit-fill-available;width:-moz-available;position:absolute}nylas-locale-switch{position:absolute;padding:18px 20px;bottom:0;width:-webkit-fill-available;width:-moz-available;border-top:1px solid var(--nylas-base-200)}@media screen and (max-width: 768px){nylas-locale-switch{height:auto}}nylas-date-picker{padding:0 20px}button-component#report-issue{width:auto;position:absolute;bottom:4px;left:16px}nylas-feedback-form{position:absolute;top:0;height:100%;width:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;background:rgba(0, 0, 0, 0.6);z-index:2;border-radius:inherit}',te=ee,G={title:i.instance.t("genericErrorTitle"),type:R.nr.Error,category:L.Component},J=class{constructor(n){i.registerInstance(this,n),this.init=i.createEvent(this,"init",7),this.schedulerWillLoad=i.createEvent(this,"schedulerWillLoad",7),this.schedulerDidLoad=i.createEvent(this,"schedulerDidLoad",7),this.nylasSchedulerError=i.createEvent(this,"nylasSchedulerError",7),this.nylasSchedulerInfo=i.createEvent(this,"nylasSchedulerInfo",7),this.configSettingsLoaded=i.createEvent(this,"configSettingsLoaded",7),this.bookingRefExtracted=i.createEvent(this,"bookingRefExtracted",7),this.bookedEventInfo=i.createEvent(this,"bookedEventInfo",7),this.mode="app",this.defaultSchedulerState=void 0,this.sessionId=void 0,this.schedulerApiUrl="https://api.us.nylas.com",this.bookingInfo=void 0,this.rescheduleBookingRef=void 0,this.cancelBookingRef=void 0,this.organizerConfirmationBookingRef=void 0,this.configurationId=void 0,this.slug=void 0,this.clientId=void 0,this.nylasBranding=!0,this.eventOverrides={},this.isLoading=void 0,this.themeConfig=void 0,this.localization=void 0,this.showNotification=!0,this.enableUserFeedback=!0,this.hour12=void 0,this.automaticComponentRegistration=!0,this.selectedDateLabel=new Date().toLocaleDateString(navigator.language,{dateStyle:"full"})||`${i.instance.t("noDateSelected")}`,this.refConfigId=void 0,this.language=navigator.language,this.showFeedbackModal=!1,this.bookingInfoConfirmed=null}connectedCallback(){i.debug("[nylas-scheduler] connectedCallback")}async componentWillLoad(){var s,a;i.debug("[nylas-scheduler] Component will load"),this.enableUserFeedback&&!M.isInitialized()&&M.init({dsn:"https://9d5731f1c77ca84c9ed3fb9b3ccf7ee1@o74852.ingest.us.sentry.io/4507889638178816",release:"2.0.0",integrations:r=>[...r.filter(l=>!1),M.feedbackSyncIntegration({colorScheme:"system",autoInject:!1})],autoSessionTracking:!1,beforeSend:()=>null});const n=this.schedulerWillLoad.emit(this.host);if("schedulerWillLoad"in this.eventOverrides&&(await this.eventOverrides.schedulerWillLoad(n,this.nylasSchedulerConnector),n.defaultPrevented))return;this.stores={scheduler:V({bookingInfo:this.bookingInfo,nylasBranding:this.nylasBranding,themeConfig:this.themeConfig,hour12:this.hour12,...this.defaultSchedulerState})},this.baseProvider=new R.NylasBaseProvider(this.host,this.stores,this.automaticComponentRegistration,this.eventOverrides),this.refConfigId=this.configurationId;let e;if(this.rescheduleBookingRef){const[r,l,c]=i.compactStringToUUIDs(this.rescheduleBookingRef);this.refConfigId=r,this.stores.scheduler.set("rescheduleBookingId",l),e=this.bookingRefExtracted.emit({configurationId:r,bookingId:l})}else if(this.cancelBookingRef){const[r,l,c]=i.compactStringToUUIDs(this.cancelBookingRef);this.refConfigId=r,this.stores.scheduler.set("cancelBookingId",l),e=this.bookingRefExtracted.emit({configurationId:r,bookingId:l})}else if(this.organizerConfirmationBookingRef){const[r,l,c]=i.compactStringToUUIDs(this.organizerConfirmationBookingRef);this.refConfigId=r,this.stores.scheduler.set("organizerConfirmationBookingId",l),this.stores.scheduler.set("organizerConfirmationSalt",c),e=this.bookingRefExtracted.emit({configurationId:r,bookingId:l,salt:c})}if("bookingRefExtracted"in this.eventOverrides&&(await this.eventOverrides.bookingRefExtracted(e,this.nylasSchedulerConnector),e.defaultPrevented)||!this.checkIfSessionIdOrConfigIdExists())return;const t=(s=this.baseProvider)==null?void 0:s.getStore("scheduler");this.nylasSchedulerConnector=new Q({schedulerAPIURL:this.schedulerApiUrl,sessionId:this.sessionId,configId:this.refConfigId,slug:this.slug,clientId:this.clientId,nylasSchedulerStore:t});const o=this.init.emit(this.host);"init"in this.eventOverrides&&(await this.eventOverrides.init(o,this.nylasSchedulerConnector),o.defaultPrevented)||((a=this.baseProvider)==null||a.componentWillLoad(this.nylasSchedulerConnector),this.applyThemeConfig(this.themeConfig))}async componentDidLoad(){var c,u,d,g,h,m,p,w;(c=this.baseProvider)==null||c.componentDidLoad();const n=this.schedulerDidLoad.emit(this.host);if("schedulerDidLoad"in this.eventOverrides&&(await this.eventOverrides.schedulerDidLoad(n,this.nylasSchedulerConnector),n.defaultPrevented)||!this.checkIfSessionIdOrConfigIdExists())return;this.localizationChanged(this.localization);const e=await((u=this.nylasSchedulerConnector)==null?void 0:u.scheduler.getUISettings());if(!e||"error"in e){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(e==null?void 0:e.error)},host:this.host});return}else{"data"in e&&((d=e.data)!=null&&d.appearance)&&console.info("Appearance settings have been returned from the configuration used byt his scheduling page; please remember to grab them from the configSettingsLoaded event and apply them as desired.");const f=this.configSettingsLoaded.emit({settings:e});if("configSettingsLoaded"in this.eventOverrides&&(await this.eventOverrides.configSettingsLoaded(f,this.nylasSchedulerConnector),f.defaultPrevented))return}const t=(g=this.baseProvider)==null?void 0:g.getStore("scheduler"),o=(m=(h=t==null?void 0:t.get("configSettings"))==null?void 0:h.scheduler)==null?void 0:m.available_days_in_future,s=t==null?void 0:t.get("selectedTimeslot");if(s&&(s!=null&&s.start_time)){if(!this.isTimeslotValid(s))return;if(t!=null&&t.get("showBookingForm")){t==null||t.set("selectedDate",s.start_time);return}}const a=t==null?void 0:t.get("selectedDate"),r=t==null?void 0:t.get("availability");let l;if(!(r&&r.length>0)){if(a){const{startTime:f,endTime:v,endTimeForAvailableDaysInFuture:k}=this.validateAvailableDaysInFuture(a,o||30);a.getTime()<k*1e3&&(l=await((w=this.nylasSchedulerConnector)==null?void 0:w.scheduler.getAvailability(f,v)))}else{const f=new Date,{startTime:v,endTime:k,endTimeForAvailableDaysInFuture:T}=this.validateAvailableDaysInFuture(f,o||30);f.getTime()<T*1e3&&(l=await((p=this.nylasSchedulerConnector)==null?void 0:p.scheduler.getAvailability(v,k)))}if((!l||"error"in l)&&this.nylasSchedulerError.emit({notification:{...this.getErrorObject(l==null?void 0:l.error)},host:this.host}),!a){let f=new Date;const v=t==null?void 0:t.get("availability").find(k=>new Date(k.start_time)>new Date);v&&(f=v.start_time),t==null||t.set("selectedDate",f)}}}componentDisconnected(){var n;(n=this.baseProvider)==null||n.componentDisconnected()}bookingInfoChanged(n){var e;(e=this.stores)==null||e.scheduler.set("bookingInfo",n)}rescheduleBookingRefChanged(n){var e,t;if(n){const[o,s]=i.compactStringToUUIDs(n);(e=this.stores)==null||e.scheduler.set("rescheduleBookingId",s),this.refConfigId=o,(t=this.nylasSchedulerConnector)==null||t.scheduler.setConfigId(o)}}cancelBookingRefChanged(n){var e,t;if(n){const[o,s]=i.compactStringToUUIDs(n);(e=this.stores)==null||e.scheduler.set("cancelBookingId",s),this.refConfigId=o,(t=this.nylasSchedulerConnector)==null||t.scheduler.setConfigId(o)}}organizerConfirmationBookingRefChanged(n){var e,t;if(n){const[o,s]=i.compactStringToUUIDs(n);(e=this.stores)==null||e.scheduler.set("organizerConfirmationBookingId",s),this.refConfigId=o,(t=this.nylasSchedulerConnector)==null||t.scheduler.setConfigId(o)}}localizationChanged(n){n&&Object.keys(n).forEach(e=>{e in X.LANGUAGE_CODE&&i.instance.addResourceBundle(e,"translation",n[e],!1,!0)})}themeConfigChanged(n){var e,t;(t=(e=this.baseProvider)==null?void 0:e.getStore("scheduler"))==null||t.set("themeConfig",n),this.applyThemeConfig(n)}languageChanged(n){const e=n.detail;this.language=e,i.instance.changeLanguage(e)}async registerComponentHandler(n){var e;(e=this.baseProvider)==null||e.registerComponent(n.detail)}async unregisterComponentHandler(n){var e;(e=this.baseProvider)==null||e.unregisterComponent(n.detail)}async monthChangedHandler(n){var r,l,c,u,d,g,h;const e=n.detail,t=(u=(c=(l=(r=this.nylasSchedulerConnector)==null?void 0:r.schedulerStore)==null?void 0:l.get("configSettings"))==null?void 0:c.scheduler)==null?void 0:u.available_days_in_future,{startTime:o,endTime:s,endTimeForAvailableDaysInFuture:a}=this.validateAvailableDaysInFuture(e,t||30);if(!n.defaultPrevented&&o<a&&e.getTime()<a*1e3){const m=await((d=this.nylasSchedulerConnector)==null?void 0:d.scheduler.getAvailability(o,s));(!m||"error"in m)&&this.nylasSchedulerError.emit({notification:{...this.getErrorObject(m==null?void 0:m.error)},host:this.host});const p=(g=this.stores)==null?void 0:g.scheduler.get("selectableDates");p&&p.length>0&&((h=this.stores)==null||h.scheduler.set("selectedDate",p[0]))}}mapToBookingData(n){var r,l,c;const e=(r=this.stores)==null?void 0:r.scheduler.get("selectedTimeslot"),t=(l=this.stores)==null?void 0:l.scheduler.get("selectedLanguage"),o=(c=this.stores)==null?void 0:c.scheduler.get("selectedTimezone"),s=e!=null&&e.start_time?new Date(e==null?void 0:e.start_time).getTime()/1e3:"",a=e!=null&&e.end_time?new Date(e==null?void 0:e.end_time).getTime()/1e3:"";return{additional_guests:n.guests,guest:{...n.primaryParticipant},additional_fields:{...n.additionalFields},start_time:s,end_time:a,email_language:t,timezone:o}}async bookButtonClickedHandler(n){var c,u,d,g;if(n.defaultPrevented)return;const e=n.detail,t=this.mapToBookingData(e);this.bookingInfoConfirmed=e;const s=(u=(c=this.nylasSchedulerConnector)==null?void 0:c.schedulerStore)==null?void 0:u.get("rescheduleBookingId");if(s){const h=await((d=this.nylasSchedulerConnector)==null?void 0:d.scheduler.rescheduleBooking(s,e));(!h||"error"in h)&&this.nylasSchedulerError.emit({notification:{...this.getErrorObject(h==null?void 0:h.error)},host:this.host});const m=h==null?void 0:h.data,p=this.bookedEventInfo.emit({...h,data:{...m,...t}});this.bookingInfoConfirmed={...this.bookingInfoConfirmed,...m},"bookedEventInfo"in this.eventOverrides&&await this.eventOverrides.bookedEventInfo(p,this.nylasSchedulerConnector);return}const a=await((g=this.nylasSchedulerConnector)==null?void 0:g.scheduler.bookTimeslot(e));(!a||"error"in a)&&this.nylasSchedulerError.emit({notification:{...this.getErrorObject(a==null?void 0:a.error)},host:this.host});const r=a==null?void 0:a.data,l=this.bookedEventInfo.emit({...a,data:{...r,...t}});this.bookingInfoConfirmed={...this.bookingInfoConfirmed,...r},"bookedEventInfo"in this.eventOverrides&&await this.eventOverrides.bookedEventInfo(l,this.nylasSchedulerConnector)}dateSelectedHandler(n){const e=n.detail;this.selectedDateLabel=e?e.toLocaleDateString(this.language,{dateStyle:"full"}):`${i.instance.t("noDateSelected")}`}cancelBookedEventErrorHandler(n){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(n.detail.error)},host:this.host})}cancelBookedEventValidationErrorHandler(n){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(n.detail.error)},host:this.host})}rescheduleBookedEventErrorHandler(n){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(n.detail.error)},host:this.host})}confirmBookingErrorHandler(n){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(n.detail.error)},host:this.host})}feedbackModalClosedHandler(){this.showFeedbackModal=!1}eventIsFullHandler(n){const e=n.detail.error;n.detail.type==="error"?this.nylasSchedulerError.emit({notification:{...this.getErrorObject({message:e})},host:this.host}):this.nylasSchedulerInfo.emit({notification:{title:"Event is full",category:L.Component,type:R.nr.Info,description:"The event you selected is full. Please try a different time.",id:new Date().getTime().toString(),ttl:3e3},host:this.host})}feedbackSubmittedHandler(n){const t={eventId:M.captureMessage("Scheduling Page User Feedback",{extra:{configId:this.configurationId,slug:this.slug}}),message:n.detail.feedback};M.captureFeedback(t,{includeReplay:!0,captureContext:{tags:{"nylas-web-element":"nylas-scheduling","nylas-web-element-version":"2.0.0","nylas-config-id":this.configurationId,"nylas-slug":this.slug,"host-url":window.location.href},extra:{configId:this.configurationId,slug:this.slug}}}),this.showFeedbackModal=!1}async getNylasSchedulerStore(){var n;return(n=this.baseProvider)==null?void 0:n.getStore("scheduler")}async getNylasSchedulerConnector(){return this.nylasSchedulerConnector}async getRef(){return this.host}getErrorObject(n){return{title:(n==null?void 0:n.title)||G.title,category:(n==null?void 0:n.category)||G.category,type:R.nr.Error,description:(n==null?void 0:n.message)||"",id:new Date().getTime().toString(),ttl:"none"}}checkIfSessionIdOrConfigIdExists(){if(!this.sessionId&&!this.refConfigId&&!(this.slug&&this.clientId)){let n="";return this.sessionId||(n+=i.instance.t("sessionIdRequiredErrorMessage")),!this.sessionId&&!this.refConfigId&&!(this.slug&&this.clientId)&&(n=i.instance.t("sessionIdRequiredErrorMessage")+" "+i.instance.t("publicConfigErrorMessage")),this.nylasSchedulerError.emit({notification:{title:i.instance.t("schedulingComponentErrorTitle"),category:L.Component,type:R.nr.Error,description:n,id:new Date().getTime().toString(),ttl:"none"},host:this.host}),!1}return!0}isTimeslotValid(n){return new Date(n.start_time)<new Date?(this.nylasSchedulerError.emit({notification:{title:i.instance.t("invalidTimeslotErrorTitle"),category:L.Component,type:R.nr.Error,description:i.instance.t("invalidTimeslotErrorMessage"),id:new Date().getTime().toString(),ttl:"none"},host:this.host}),!1):!0}validateAvailableDaysInFuture(n,e){const t=new Date,o=new Date(n.getFullYear(),n.getMonth(),1).getTime()/1e3,s=new Date(n.getFullYear(),n.getMonth()+1,1).getTime()/1e3,a=Math.floor(i.addDaysToCurrentDate(t,e).getTime()/1e3),r=Math.min(a,s);return{startTime:o<t.getTime()/1e3?Math.floor(t.getTime()/1e3):o,endTime:r,endTimeForAvailableDaysInFuture:a}}applyThemeConfig(n){if(n)for(const[e,t]of Object.entries(n))this.host.style.setProperty(`${e}`,t)}onFeedbackClick(n){n.preventDefault(),this.showFeedbackModal=!0}redirectToCustomUrl(n){window.location.assign(n)}render(){var p,w,f,v,k,T,I,B,_,x,D,z;const n=this.mode==="app",e=(p=this.baseProvider)==null?void 0:p.getStore("scheduler"),t=e==null?void 0:e.get("eventInfo"),o=e==null?void 0:e.get("showBookingForm"),s=e==null?void 0:e.get("cancelledEventInfo"),a=e==null?void 0:e.get("cancelBookingId"),r=e==null?void 0:e.get("selectedTimeslot"),l=e==null?void 0:e.get("rescheduleBookingId"),c=e==null?void 0:e.get("organizerConfirmationBookingId"),u=e==null?void 0:e.get("rejectBookingId"),d=e==null?void 0:e.get("confirmedEventInfo"),g=(e==null?void 0:e.get("nylasBranding"))||this.nylasBranding,h=e==null?void 0:e.get("selectedDate"),m=(f=(w=e==null?void 0:e.get("configSettings"))==null?void 0:w.scheduler)==null?void 0:f.confirmation_redirect_url;if(this.selectedDateLabel=h&&this.language?i.capitalizeFirstLetter(h.toLocaleDateString(this.language,{dateStyle:"full"})):`${i.instance.t("noDateSelected")}`,n&&(a||u)&&!s)return i.h(i.Host,null,i.h(P,{nylasBranding:g,isLoading:this.isLoading,showNotification:this.showNotification},i.h("div",{class:"cancel-flow-page",part:"cancel-flow-page"},i.h("nylas-cancel-booking-form",{selectedTimeslot:r,cancelBookingId:a,rejectBookingId:u,exportparts:"ncbf, ncbf__icon, ncbf__title, ncbf__description, ncbf__reason-textarea, ncbf__button-cta, ncbf__button-outline, ncbf__card"}))),this.enableUserFeedback&&i.h("button-component",{id:"report-issue",variant:"basic",onClick:b=>this.onFeedbackClick(b)},i.h("feedback-icon",null)),this.showFeedbackModal&&i.h("nylas-feedback-form",null));if(n&&c)return i.h(i.Host,null,i.h(P,null,i.h("div",{class:"manual-confirmation-page",part:"manual-confirmation-page"},i.h("nylas-organizer-confirmation-card",{organizerConfirmationBookingId:c,exportparts:"nmcc, nmcc__title, nmcc__description, nmcc__button-cta, nmcc__button-outline"}))),this.enableUserFeedback&&i.h("button-component",{id:"report-issue",variant:"basic",onClick:b=>this.onFeedbackClick(b)},i.h("feedback-icon",null)),this.showFeedbackModal&&i.h("nylas-feedback-form",null));if(n&&s)return i.h(i.Host,null,i.h(P,{nylasBranding:g,isLoading:this.isLoading,showNotification:this.showNotification},i.h("div",{class:"cancelled-event-page",part:"cancelled-event-page"},i.h("nylas-cancelled-event-card",{cancelledEventInfo:s,exportparts:"ncec, ncec__icon, ncec__title, ncec__description, ncec__button-outline, ncec__card"}))),this.enableUserFeedback&&i.h("button-component",{id:"report-issue",variant:"basic",onClick:b=>this.onFeedbackClick(b)},i.h("feedback-icon",null)),this.showFeedbackModal&&i.h("nylas-feedback-form",null));if(n&&d)return i.h(i.Host,null,i.h(P,{nylasBranding:g,isLoading:this.isLoading,showNotification:this.showNotification},i.h("div",{class:"cancelled-event-page",part:"confirmed-event-page"},i.h("nylas-confirmed-event-card",{confirmedEventInfo:d,exportparts:"ncec, ncec__icon, ncec__title, ncec__description, ncec__button-outline, ncec__card"}))),this.enableUserFeedback&&i.h("button-component",{id:"report-issue",variant:"basic",onClick:b=>this.onFeedbackClick(b)},i.h("feedback-icon",null)),this.showFeedbackModal&&i.h("nylas-feedback-form",null));if(n&&t&&m){const b=(v=this.bookingInfoConfirmed)==null?void 0:v.primaryParticipant,S=(k=this.bookingInfoConfirmed)==null?void 0:k.location,A=(T=this.bookingInfoConfirmed)==null?void 0:T.booking_ref,F=((I=this.bookingInfoConfirmed)==null?void 0:I.additionalFields)||{};if(this.bookingInfo&&typeof((B=this.bookingInfo)==null?void 0:B.additionalFields)<"u"){const O=this.bookingInfo.additionalFields;Object.keys(O).forEach(N=>{!F[N]&&(O!=null&&O[N])&&(F[N]=O[N].value)})}const y=(_=this.stores)==null?void 0:_.scheduler.get("selectedTimeslot"),C=(x=this.stores)==null?void 0:x.scheduler.get("selectedTimezone"),U=(D=this.stores)==null?void 0:D.scheduler.get("selectedLanguage"),$=(z=this.stores)==null?void 0:z.scheduler.get("configSettings"),j=this.configurationId?this.configurationId:$==null?void 0:$.configuration_id,Y=window.location.search,E=new URLSearchParams(Y);E.set("booking_id",t.booking_id),b!=null&&b.name&&E.set("name",b.name),b!=null&&b.email&&E.set("email",b.email),y!=null&&y.start_time&&E.set("start_time",(new Date(y.start_time).getTime()/1e3).toString()),y!=null&&y.end_time&&E.set("end_time",(new Date(y.end_time).getTime()/1e3).toString()),C&&E.set("tz",C),U&&E.set("language",U),F&&E.set("additional_values",JSON.stringify(F)),this.slug&&E.set("page_slug",this.slug),j&&E.set("config_id",j),S&&E.set("location",S),A&&E.set("booking_ref",A),this.redirectToCustomUrl(`${m}?${E.toString()}`);return}if(n&&t)return i.h(i.Host,null,i.h(P,{nylasBranding:g,isLoading:this.isLoading,showNotification:this.showNotification},i.h("div",{class:"booked-event-page",part:"booked-event-page ns_booked-event-page"},i.h("nylas-booked-event-card",{selectedTimeslot:r,eventInfo:t,exportparts:"nbec, nbec__title, nbec__card, nbec__description, nbec__button-outline, nbec__cancel-cta, nbec__reschedule-cta"}))),this.enableUserFeedback&&i.h("button-component",{id:"report-issue",variant:"basic",onClick:b=>this.onFeedbackClick(b)},i.h("feedback-icon",null)),this.showFeedbackModal&&i.h("nylas-feedback-form",null));if(n&&(!t||l)&&!o){const b=this.host.querySelector('[slot="timeslot-picker-cta-label"]');return i.h(i.Host,null,i.h(P,{nylasBranding:g,isLoading:this.isLoading,showNotification:this.showNotification},l&&i.h(W,null,`${i.instance.t("rescheduleTitle")}`),i.h("div",{class:"select-date-page",part:"select-date-page ns_select-date-page"},i.h("div",{class:"left-panel",part:"ns_left-panel"},i.h("nylas-date-picker",{exportparts:"ndp, ndp__title, ndp__month-header, ndp__month-button, ndp__day, ndp__date, ndp__date--disabled, ndp__date--selected, ndp__date--current-day, ndp__date--current-month"}),i.h("nylas-locale-switch",{exportparts:"nls, nls__timezone, nls__timezone-dropdown, nls__timezone-drop-button, nls__timezone-drop-button-selected-label, nls__timezone-drop-content, nls__timezone-drop-label, nls__language, nls__language-dropdown, nls__language-drop-button, nls__language-drop-content, nls__language-drop-label"})),i.h("div",{class:`right-panel ${l?"reschedule":""}`,part:`ns_right-panel ${l?"ns_reschedule":""}`},i.h("h2",{part:"ns_right-panel__title"},i.h("calendar-icon",{part:"ns_right-panel__calendar-icon"}),i.h("span",{id:"selectedDate",part:"ns_right-panel__selected-date"},this.selectedDateLabel)),i.h("nylas-timeslot-picker",{exportparts:"ntp, ntp__time-picker-wrapper, ntp__timeslots, ntp__timeslot, ntp__timeslot--selected, ntp__button-primary"},b&&i.h("span",{slot:"timeslot-picker-cta-label"},i.h("slot",{name:"timeslot-picker-cta-label"})))))),this.enableUserFeedback&&i.h("button-component",{id:"report-issue",variant:"basic",onClick:S=>this.onFeedbackClick(S)},i.h("feedback-icon",null)),this.showFeedbackModal&&i.h("nylas-feedback-form",null))}return n&&!t&&o?i.h(i.Host,null,i.h(P,{nylasBranding:g,isLoading:this.isLoading,showNotification:this.showNotification},l&&i.h(W,null,`${i.instance.t("rescheduleTitle")}`),i.h("div",{class:"additional-data-page",part:"additional-data-page ns_additional-data-page"},i.h("div",{class:"left-panel ns_left-panel",part:"ns_left-panel"},i.h("div",{class:"wrapper",part:"ns_left-panel__wrapper"},i.h("nylas-selected-event-card",{exportparts:"nsec, nsec__card, nsec__icon, nsec__date, nsec__time, nsec__timezone"}))),i.h("div",{class:`right-panel ${l?"reschedule":""}`,part:`ns_right-panel ${l?"ns_reschedule":""}`},i.h("nylas-booking-form",{exportparts:"nbf, nbf__input-textfield, nbf__button-ghost, nbf__button-outline, nbf__button-primary, nbf__input-wrapper, nbf__checkbox-component, nbf__radio-button-group, nbf__textarea-component, nbf__dropdown, nbf__dropdown-button, nbf__dropdown-content"})))),this.enableUserFeedback&&i.h("button-component",{id:"report-issue",variant:"basic",onClick:b=>this.onFeedbackClick(b)},i.h("feedback-icon",null)),this.showFeedbackModal&&i.h("nylas-feedback-form",null)):i.h(i.Host,null,i.h("slot",null))}get host(){return i.getElement(this)}static get watchers(){return{bookingInfo:["bookingInfoChanged"],rescheduleBookingRef:["rescheduleBookingRefChanged"],cancelBookingRef:["cancelBookingRefChanged"],organizerConfirmationBookingRef:["organizerConfirmationBookingRefChanged"],localization:["localizationChanged"],themeConfig:["themeConfigChanged"]}}};J.style=te;exports.nylas_scheduling=J;
|