@nylas/react 2.0.4 → 2.1.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/dist/add-circle-icon_2.entry-8c3bb0bb.cjs +1 -0
- package/dist/{add-circle-icon_2.entry-e59a5b4d.js → add-circle-icon_2.entry-a3daf6c4.js} +6 -4
- package/dist/archive-icon.entry-46ad0ff3.cjs +1 -0
- package/dist/{archive-icon.entry-ea5667df.js → archive-icon.entry-d5141486.js} +6 -4
- package/dist/{arrow-icon.entry-1f766862.js → arrow-icon.entry-1b89ce78.js} +6 -4
- package/dist/arrow-icon.entry-f696de4f.cjs +1 -0
- package/dist/bold-icon.entry-7827cd4e.cjs +1 -0
- package/dist/{bold-icon.entry-240950a6.js → bold-icon.entry-c117b4cf.js} +6 -4
- package/dist/button-component_2.entry-8cd4c5f3.cjs +1 -0
- package/dist/{button-component_2.entry-96785a34.js → button-component_2.entry-e68caa9b.js} +5 -3
- package/dist/{calendar-agenda-fill-icon_37.entry-e732ee2e.js → calendar-agenda-fill-icon_37.entry-52bdc8b3.js} +1478 -1210
- package/dist/calendar-agenda-fill-icon_37.entry-8c592cfa.cjs +6 -0
- package/dist/calendar-cancel-icon.entry-7facfa05.cjs +1 -0
- package/dist/{calendar-cancel-icon.entry-7543c684.js → calendar-cancel-icon.entry-f5f1d499.js} +8 -6
- package/dist/{calendar-check-icon.entry-aba54652.js → calendar-check-icon.entry-55320137.js} +6 -4
- package/dist/calendar-check-icon.entry-72108702.cjs +1 -0
- package/dist/{calendar-icon.entry-2cb3b7d1.js → calendar-icon.entry-afea361e.js} +9 -7
- package/dist/calendar-icon.entry-f5c6730f.cjs +1 -0
- package/dist/checkbox-component.entry-5722d263.cjs +1 -0
- package/dist/checkbox-component.entry-89fa6edd.js +54 -0
- package/dist/checkbox-group_4.entry-30e8af17.cjs +28 -0
- package/dist/{checkbox-group_4.entry-04561314.js → checkbox-group_4.entry-51f03009.js} +289 -245
- package/dist/checkmark-circle-icon.entry-ae11049d.cjs +1 -0
- package/dist/{checkmark-circle-icon.entry-1f788efc.js → checkmark-circle-icon.entry-dfe67e22.js} +8 -6
- package/dist/{checkmark-icon_15.entry-146c1cb0.js → checkmark-icon_15.entry-4c3979db.js} +408 -332
- package/dist/checkmark-icon_15.entry-e59c0f53.cjs +5 -0
- package/dist/{chevron-icon_3.entry-637338b5.js → chevron-icon_3.entry-1f3c3ca6.js} +21 -10
- package/dist/chevron-icon_3.entry-ea791750.cjs +1 -0
- package/dist/clock-icon_4.entry-172fed74.cjs +1 -0
- package/dist/{clock-icon_4.entry-e69395a2.js → clock-icon_4.entry-78878cb8.js} +3 -1
- package/dist/customParseFormat-b5d95b34-a6b6fcba.cjs +1 -0
- package/dist/{customParseFormat-8be9be1b-2464f2ba.js → customParseFormat-b5d95b34-ce80820c.js} +1 -1
- package/dist/delete-icon.entry-a8c0bf03.cjs +1 -0
- package/dist/{delete-icon.entry-8a956edd.js → delete-icon.entry-cebdc90f.js} +7 -5
- package/dist/document-refresh-icon.entry-2d9a529d.cjs +1 -0
- package/dist/{document-refresh-icon.entry-5f58f367.js → document-refresh-icon.entry-8780a2b8.js} +3 -1
- package/dist/{feedbackSync-3db3713c-701d2eb9.cjs → feedbackSync-92220b42-fbebe1f9.cjs} +1 -1
- package/dist/{feedbackSync-3db3713c-aadf336b.js → feedbackSync-92220b42-fd5f5610.js} +1 -1
- package/dist/folder-icon.entry-3e61ccca.cjs +1 -0
- package/dist/{folder-icon.entry-e5d7a651.js → folder-icon.entry-6ffd5191.js} +6 -4
- package/dist/forward-icon.entry-c7d88db8.cjs +1 -0
- package/dist/{forward-icon.entry-59be8165.js → forward-icon.entry-c9c4bf5b.js} +5 -3
- package/dist/globe-icon.entry-0b93cab8.cjs +1 -0
- package/dist/{globe-icon.entry-0fe4a4bb.js → globe-icon.entry-7c0dca7b.js} +5 -3
- package/dist/{google-logo-icon_6.entry-799511df.js → google-logo-icon_6.entry-deef91ee.js} +283 -237
- package/dist/google-logo-icon_6.entry-e25ce3e7.cjs +2 -0
- package/dist/google-meet-icon_5.entry-214347f0.cjs +1 -0
- package/dist/{google-meet-icon_5.entry-e753ba28.js → google-meet-icon_5.entry-f8b5a92a.js} +3 -1
- package/dist/{inbox-icon.entry-61132337.js → inbox-icon.entry-873062c3.js} +7 -5
- package/dist/inbox-icon.entry-f08f2fd5.cjs +1 -0
- package/dist/index-025be398.js +7187 -0
- package/dist/index-c510313d-1318f67a.js +289 -0
- package/dist/index-c510313d-b0508eee.cjs +1 -0
- package/dist/index-f42fe591.cjs +65 -0
- package/dist/{index.es-9e756df7-fa75b01e.cjs → index.es-488bc919-d02dd50a.cjs} +1 -1
- package/dist/{index.es-9e756df7-42d8a4cf.js → index.es-488bc919-ea63a7e9.js} +1 -1
- package/dist/info-icon_2.entry-442b9097.cjs +1 -0
- package/dist/{info-icon_2.entry-8d2750ce.js → info-icon_2.entry-60fb8648.js} +3 -1
- package/dist/{input-component.entry-2e134e2a.js → input-component.entry-5898a52e.js} +22 -10
- package/dist/input-component.entry-7274fd28.cjs +1 -0
- package/dist/{input-dropdown_2.entry-1a02e672.js → input-dropdown_2.entry-4534436c.js} +33 -9
- package/dist/input-dropdown_2.entry-9b72f637.cjs +1 -0
- package/dist/{italic-icon.entry-0ec2793b.js → italic-icon.entry-62052cd8.js} +6 -4
- package/dist/italic-icon.entry-9bdbbd37.cjs +1 -0
- package/dist/lib/connect/index.d.ts +6 -0
- package/dist/lib/connect/types.d.ts +2 -0
- package/dist/lib/connect/useNylasConnect.d.ts +28 -0
- package/dist/lib/connect/useNylasConnect.test.d.ts +1 -0
- package/dist/lib/elements/index.d.ts +1 -1
- package/dist/lib/index.d.ts +1 -0
- package/dist/lib/notetaker/SendNotetaker/SendNotetaker.d.ts +3 -2
- package/dist/lib/notetaker/VideoPlayer/VideoPlayer.d.ts +2 -0
- package/dist/multi-select-dropdown.entry-77752d46.cjs +1 -0
- package/dist/{multi-select-dropdown.entry-15e887be.js → multi-select-dropdown.entry-9c9d05c1.js} +42 -30
- package/dist/{nylas-booked-event-card_11.entry-98bcc904.js → nylas-booked-event-card_11.entry-32b2e9f1.js} +188 -185
- package/dist/nylas-booked-event-card_11.entry-4aba5146.cjs +1 -0
- package/dist/nylas-date-component_2.entry-6b058796.cjs +1 -0
- package/dist/{nylas-date-component_2.entry-6a98a5bf.js → nylas-date-component_2.entry-a869519f.js} +91 -70
- package/dist/nylas-form-card.entry-5390459f.js +75 -0
- package/dist/nylas-form-card.entry-c2f34d73.cjs +1 -0
- package/dist/nylas-notification_2.entry-054392cf.cjs +1 -0
- package/dist/{nylas-notification_2.entry-320a5a65.js → nylas-notification_2.entry-f46e88e5.js} +4 -1
- package/dist/{nylas-scheduler-editor.entry-aa62c689.js → nylas-scheduler-editor.entry-40a48f47.js} +129 -60
- package/dist/nylas-scheduler-editor.entry-e29fdf07.cjs +2 -0
- package/dist/{nylas-scheduling.entry-aec79de5.js → nylas-scheduling.entry-115b1752.js} +203 -190
- package/dist/nylas-scheduling.entry-79cb1d9c.cjs +1 -0
- package/dist/person-icon.entry-2cae306c.cjs +1 -0
- package/dist/{person-icon.entry-23cbe5dd.js → person-icon.entry-fd668b89.js} +6 -4
- package/dist/{play-icon.entry-4a529bd2.js → play-icon.entry-7fc3c0fd.js} +5 -3
- package/dist/play-icon.entry-9989a520.cjs +1 -0
- package/dist/radio-button-group.entry-03385b5f.cjs +1 -0
- package/dist/{radio-button-group.entry-04b7ff59.js → radio-button-group.entry-9df82cd0.js} +21 -10
- package/dist/react.cjs +1 -1
- package/dist/react.js +142 -127
- package/dist/refresh-icon.entry-310954ba.cjs +1 -0
- package/dist/{refresh-icon.entry-61ced881.js → refresh-icon.entry-c56e5623.js} +8 -6
- package/dist/register-component-3acd57e7-5a79a90a.cjs +1 -0
- package/dist/{register-component-8bbd6492-0d8737fd.js → register-component-3acd57e7-cb09c05e.js} +15 -14
- package/dist/{reply-all-icon.entry-83509aaf.js → reply-all-icon.entry-32e0e000.js} +7 -5
- package/dist/reply-all-icon.entry-68388f97.cjs +1 -0
- package/dist/{reply-icon.entry-131ade31.js → reply-icon.entry-3ac2e736.js} +6 -4
- package/dist/reply-icon.entry-e616a9a4.cjs +1 -0
- package/dist/{sent-icon.entry-72fd8f16.js → sent-icon.entry-0622ed04.js} +6 -4
- package/dist/sent-icon.entry-543eb3c4.cjs +1 -0
- package/dist/{spam-icon.entry-7594c792.js → spam-icon.entry-74bcfd4f.js} +3 -1
- package/dist/spam-icon.entry-e341ee3e.cjs +1 -0
- package/dist/{star-icon.entry-adbe1bb3.js → star-icon.entry-864d2bf9.js} +5 -3
- package/dist/star-icon.entry-c90d40f6.cjs +1 -0
- package/dist/{stop-icon.entry-e95993f2.js → stop-icon.entry-835908c5.js} +3 -1
- package/dist/stop-icon.entry-ffc46b42.cjs +1 -0
- package/dist/{textarea-component.entry-f5d74fb8.js → textarea-component.entry-6adcf6a6.js} +29 -10
- package/dist/textarea-component.entry-dae8eb5c.cjs +1 -0
- package/dist/toggle-switch.entry-5ee29867.cjs +1 -0
- package/dist/toggle-switch.entry-ff2ccb75.js +51 -0
- package/dist/{translate-icon.entry-01cbe664.js → translate-icon.entry-372dd808.js} +3 -1
- package/dist/translate-icon.entry-5606067d.cjs +1 -0
- package/dist/{trash-fill-icon.entry-b39ff771.js → trash-fill-icon.entry-01b4379e.js} +3 -1
- package/dist/trash-fill-icon.entry-daed6c0a.cjs +1 -0
- package/dist/underline-icon.entry-2020ee64.cjs +1 -0
- package/dist/{underline-icon.entry-39179a2e.js → underline-icon.entry-464b900d.js} +5 -3
- package/dist/utils-31933f5d-15041585.js +17878 -0
- package/dist/utils-31933f5d-1d4c81ab.cjs +54 -0
- package/package.json +4 -3
- package/dist/abstract-provider-97cdbfea-5837e17f.cjs +0 -1
- package/dist/abstract-provider-97cdbfea-6b0e3547.js +0 -187
- package/dist/add-circle-icon_2.entry-96ef4ded.cjs +0 -1
- package/dist/archive-icon.entry-49b4e0fd.cjs +0 -1
- package/dist/arrow-icon.entry-5aefd7de.cjs +0 -1
- package/dist/bold-icon.entry-1a4955df.cjs +0 -1
- package/dist/button-component_2.entry-357fa02a.cjs +0 -1
- package/dist/calendar-agenda-fill-icon_37.entry-5e405c00.cjs +0 -6
- package/dist/calendar-cancel-icon.entry-55d746cf.cjs +0 -1
- package/dist/calendar-check-icon.entry-63d33f23.cjs +0 -1
- package/dist/calendar-icon.entry-e13add9b.cjs +0 -1
- package/dist/checkbox-component.entry-8341a8d6.cjs +0 -1
- package/dist/checkbox-component.entry-da122544.js +0 -43
- package/dist/checkbox-group_4.entry-8854d522.cjs +0 -28
- package/dist/checkmark-circle-icon.entry-e637e20e.cjs +0 -1
- package/dist/checkmark-icon_15.entry-a265f687.cjs +0 -5
- package/dist/chevron-icon_3.entry-6c38b5e5.cjs +0 -1
- package/dist/clock-icon_4.entry-aa4117dc.cjs +0 -1
- package/dist/customParseFormat-8be9be1b-7ad95d87.cjs +0 -1
- package/dist/delete-icon.entry-af0cc45b.cjs +0 -1
- package/dist/document-refresh-icon.entry-45931416.cjs +0 -1
- package/dist/folder-icon.entry-cb80c172.cjs +0 -1
- package/dist/forward-icon.entry-c792734b.cjs +0 -1
- package/dist/globe-icon.entry-9ecf0255.cjs +0 -1
- package/dist/google-logo-icon_6.entry-60924f34.cjs +0 -2
- package/dist/google-meet-icon_5.entry-3841313d.cjs +0 -1
- package/dist/inbox-icon.entry-2b450378.cjs +0 -1
- package/dist/index-2084ffd9.js +0 -24884
- package/dist/index-e9dc7971.cjs +0 -118
- package/dist/info-icon_2.entry-c547775c.cjs +0 -1
- package/dist/input-component.entry-b1086460.cjs +0 -1
- package/dist/input-dropdown_2.entry-cb163dc3.cjs +0 -1
- package/dist/italic-icon.entry-6a3a5464.cjs +0 -1
- package/dist/multi-select-dropdown.entry-daccefd5.cjs +0 -1
- package/dist/nylas-booked-event-card_11.entry-3cdf8015.cjs +0 -1
- package/dist/nylas-date-component_2.entry-5d4f54fa.cjs +0 -1
- package/dist/nylas-form-card.entry-22851b77.cjs +0 -1
- package/dist/nylas-form-card.entry-a997084f.js +0 -58
- package/dist/nylas-notification_2.entry-4638126b.cjs +0 -1
- package/dist/nylas-scheduler-editor.entry-82e0f79e.cjs +0 -2
- package/dist/nylas-scheduling.entry-9cef581a.cjs +0 -1
- package/dist/person-icon.entry-01a6a976.cjs +0 -1
- package/dist/play-icon.entry-33443687.cjs +0 -1
- package/dist/radio-button-group.entry-65155787.cjs +0 -1
- package/dist/refresh-icon.entry-e4ea4811.cjs +0 -1
- package/dist/register-component-8bbd6492-d9a23f3c.cjs +0 -1
- package/dist/reply-all-icon.entry-c64d923b.cjs +0 -1
- package/dist/reply-icon.entry-4edfbb70.cjs +0 -1
- package/dist/sent-icon.entry-e4f6a3ef.cjs +0 -1
- package/dist/spam-icon.entry-c531c188.cjs +0 -1
- package/dist/star-icon.entry-a75255ff.cjs +0 -1
- package/dist/stop-icon.entry-079b28c6.cjs +0 -1
- package/dist/textarea-component.entry-920a81ac.cjs +0 -1
- package/dist/toggle-switch.entry-33273409.js +0 -34
- package/dist/toggle-switch.entry-ba6b4f33.cjs +0 -1
- package/dist/translate-icon.entry-f33632d6.cjs +0 -1
- package/dist/trash-fill-icon.entry-298eece8.cjs +0 -1
- package/dist/underline-icon.entry-3704187c.cjs +0 -1
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var ae=Object.defineProperty;var de=(r,t,n)=>t in r?ae(r,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[t]=n;var I=(r,t,n)=>(de(r,typeof t!="symbol"?t+"":t,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const index=require("./index-e9dc7971.cjs"),abstractProvider97cdbfea=require("./abstract-provider-97cdbfea-5837e17f.cjs"),index_es9e756df7=require("./index.es-9e756df7-fa75b01e.cjs"),constantsF51538ef=require("./constants-f51538ef-cd2a67c4.cjs");require("react");require("react/jsx-runtime");require("react-dom");index.dayjs.extend(index.utc);index.dayjs.extend(index.timezone);class NylasSchedulerConfigAPIConnector{constructor({nylasApiRequest:t,nylasSchedulerConfigStore:n}){this.groupEventsCache=new Map,this.CACHE_DURATION=1*60*1e3,this.nylasApiRequest=t,this.nylasSchedulerConfigStore=n}async currentUser(){return this.nylasApiRequest?this.nylasApiRequest.currentUser():(console.warn("Nylas API Request is not initialized"),null)}async getCalendars(){var a;if(!this.nylasApiRequest)return console.warn("Nylas API Request is not initialized"),index.dataResponse(null,{message:"Error fetching calendars: Nylas API Request is not initialized"});const t=[];let n=null;const s=50;do{const[d,c]=await this.nylasApiRequest.request({method:"GET",path:`calendars?limit=${s}${n?`&page_token=${n}`:""}`});if(c)return index.dataResponse(null,{message:"Error fetching calendars: "+c.message});if(index_es9e756df7.Xr(d))return index.dataResponse(null,{message:"Error fetching calendars: "+((a=d.error)==null?void 0:a.message)});t.push(...d.data),n=d.next_cursor||null}while(n);return this.nylasSchedulerConfigStore.state.calendars=t,index.dataResponse(t)}async getConfigurationById(t,n=!1){var d;if(!this.nylasApiRequest)return console.warn("Nylas API Request is not initialized"),index.dataResponse(null,{message:"Error fetching configuration: Nylas API Request is not initialized"});if(!n){const c=this.nylasSchedulerConfigStore.state.configurations.find(l=>l.id===t);if(c)return this.nylasSchedulerConfigStore.state.selectedConfiguration=c,index.dataResponse(c)}const[s,a]=await this.nylasApiRequest.request({method:"GET",path:`scheduling/configurations/${t}`});return a?index.dataResponse(null,{message:"Error fetching configuration: "+a.message}):index_es9e756df7.Xr(s)?index.dataResponse(null,{message:"Error fetching configuration: "+((d=s.error)==null?void 0:d.message)}):(this.nylasSchedulerConfigStore.state.selectedConfiguration=s.data,this.nylasSchedulerConfigStore.state.configurations.find(c=>c.id===t)?this.nylasSchedulerConfigStore.state.configurations=this.nylasSchedulerConfigStore.state.configurations.map(c=>c.id===t?s.data:c):this.nylasSchedulerConfigStore.state.configurations=[...this.nylasSchedulerConfigStore.state.configurations,s.data],index.dataResponse(s.data))}async getConfigurations(t){var d;if(!this.nylasApiRequest)return console.warn("Nylas API Request is not initialized"),index.dataResponse(null,{message:"Error fetching configurations: Nylas API Request is not initialized"});const n=50,[s,a]=await this.nylasApiRequest.request({method:"GET",path:`scheduling/configurations?limit=${n}${t?`&page_token=${t}`:""}`});return a?index.dataResponse(null,{message:"Error fetching configurations: "+a.message}):index_es9e756df7.Xr(s)?index.dataResponse(null,{message:"Error fetching configurations: "+((d=s.error)==null?void 0:d.message)}):(this.nylasSchedulerConfigStore.state.configurations=s.data,this.nylasSchedulerConfigStore.state.listConfigurationsNextCursor=s.next_cursor||null,index.dataResponse(s.data))}async getMasterEventById(t){var h,u;if(!this.nylasApiRequest)return console.warn("Nylas API Request is not initialized"),index.dataResponse(null,{message:"Error fetching master event: Nylas API Request is not initialized"});const n=this.nylasSchedulerConfigStore.state.selectedGroupEvent,s=(h=n==null?void 0:n.event)==null?void 0:h.calendar_id;if(!s)return console.warn("Calendar ID is not present"),index.dataResponse(null,{message:"Error fetching master event: Calendar ID is not present"});const a=new URLSearchParams;a.append("calendar_id",s);const[d,c]=await this.nylasApiRequest.request({method:"GET",path:`events/${t}?${a.toString()}`});if(c)return index.dataResponse(null,{message:"Error fetching master event: "+c.message});if(index_es9e756df7.Xr(d))return index.dataResponse(null,{message:"Error fetching master event: "+((u=d.error)==null?void 0:u.message)});const l=this.nylasSchedulerConfigStore.state.masterGroupEvents;return l[t]?this.nylasSchedulerConfigStore.state.masterGroupEvents[t]=d.data:this.nylasSchedulerConfigStore.state.masterGroupEvents={...l,[t]:d.data},index.dataResponse(d.data)}async createConfiguration(t){var a;if(!this.nylasApiRequest)return console.warn("Nylas API Request is not initialized"),index.dataResponse(null,{message:"Error creating configuration: Nylas API Request is not initialized"});const[n,s]=await this.nylasApiRequest.request({method:"POST",path:"scheduling/configurations",body:t});return s?index.dataResponse(null,{message:"Error creating configuration: "+s.message}):index_es9e756df7.Xr(n)?index.dataResponse(null,{message:"Error creating configuration: "+((a=n.error)==null?void 0:a.message)}):(this.nylasSchedulerConfigStore.state.selectedConfiguration=n.data,this.nylasSchedulerConfigStore.state.configurations=[...this.nylasSchedulerConfigStore.state.configurations,n.data],index.dataResponse(n.data))}async updateConfiguration(t){var a;if(!this.nylasApiRequest)return console.warn("Nylas API Request is not initialized"),index.dataResponse(null,{message:"Error updating configuration: Nylas API Request is not initialized"});const[n,s]=await this.nylasApiRequest.request({method:"PUT",path:`scheduling/configurations/${t.id}`,body:t});return s?index.dataResponse(null,{message:"Error updating configuration: "+s.message}):index_es9e756df7.Xr(n)?index.dataResponse(null,{message:"Error updating configuration: "+((a=n.error)==null?void 0:a.message)}):(this.nylasSchedulerConfigStore.state.selectedConfiguration=n.data,this.nylasSchedulerConfigStore.state.configurations.find(d=>d.id===t.id)?this.nylasSchedulerConfigStore.state.configurations=this.nylasSchedulerConfigStore.state.configurations.map(d=>d.id===t.id?n.data:d):this.nylasSchedulerConfigStore.state.configurations=[...this.nylasSchedulerConfigStore.state.configurations,n.data],index.dataResponse(n.data))}async deleteConfiguration(t){var a,d;if(!this.nylasApiRequest)return console.warn("Nylas API Request is not initialized"),index.dataResponse(null,{message:"Error deleting configuration: Nylas API Request is not initialized"});const[n,s]=await this.nylasApiRequest.request({method:"DELETE",path:`scheduling/configurations/${t}`});return s?index.dataResponse(null,{message:"Error deleting configuration: "+s.message}):index_es9e756df7.Xr(n)?index.dataResponse(null,{message:"Error deleting configuration: "+((a=n.error)==null?void 0:a.message)}):(this.nylasSchedulerConfigStore.state.configurations=this.nylasSchedulerConfigStore.state.configurations.filter(c=>c.id!==t),((d=this.nylasSchedulerConfigStore.state.selectedConfiguration)==null?void 0:d.id)===t&&this.nylasSchedulerConfigStore.resetSelectedConfiguration(),index.dataResponse(n.data))}async createGroupEvent(t,n){var d;if(this.nylasSchedulerConfigStore.state.isLoading=!0,!this.nylasApiRequest)return console.warn("Nylas API Request is not initialized"),index.dataResponse(null,{message:"Error creating group event: Nylas API Request is not initialized"});const[s,a]=await this.nylasApiRequest.request({method:"POST",path:`scheduling/configurations/${n}/group-events`,body:t});return a?(this.nylasSchedulerConfigStore.state.isLoading=!1,index.dataResponse(null,{message:"Error creating group event: "+a.message})):index_es9e756df7.Xr(s)?(this.nylasSchedulerConfigStore.state.isLoading=!1,index.dataResponse(null,{message:"Error creating group event: "+((d=s.error)==null?void 0:d.message)})):(this.nylasSchedulerConfigStore.state.selectedGroupEvent=s.data,await this.getGroupEvents(n,this.nylasSchedulerConfigStore.state.selectedConfiguration),this.nylasSchedulerConfigStore.state.isLoading=!1,index.dataResponse(s.data))}async getGroupEvents(t,n){var y,p;if(!this.nylasApiRequest)return console.warn("Nylas API Request is not initialized"),index.dataResponse(null,{message:"Error fetching group events: Nylas API Request is not initialized"});const s=new URLSearchParams;s.append("show_all","true");const a=this.nylasSchedulerConfigStore.state.calendarViewDateRange;let d,c;if(a)d=a.start_time,c=a.end_time;else{const m=index.getCalendarRange(new Date().toISOString(),"week");d=m.startTime.toString(),c=m.endTime.toString()}const l=`${t}-${d}-${c}`,h=this.groupEventsCache.get(l);if(h&&Date.now()-h.timestamp<this.CACHE_DURATION)return this.nylasSchedulerConfigStore.state.groupEvents=h.data,index.dataResponse(h.data);s.append("start_time",d),s.append("end_time",c);const u=(y=n==null?void 0:n.group_booking)==null?void 0:y.calendar_id;u&&s.append("calendar_id",u);const[f,g]=await this.nylasApiRequest.request({method:"GET",path:`scheduling/configurations/${t}/group-events?${s.toString()}`});return g?index.dataResponse(null,{message:"Error fetching group events: "+g.message}):index_es9e756df7.Xr(f)?index.dataResponse(null,{message:"Error fetching group events: "+((p=f.error)==null?void 0:p.message)}):(this.groupEventsCache.set(l,{data:f.data,timestamp:Date.now()}),this.cleanupExpiredCache(),this.nylasSchedulerConfigStore.state.groupEvents=f.data,index.dataResponse(f.data))}cleanupExpiredCache(){const t=Date.now();for(const[n,s]of this.groupEventsCache.entries())t-s.timestamp>this.CACHE_DURATION&&this.groupEventsCache.delete(n)}async updateGroupEventById(t,n){var c;if(this.nylasSchedulerConfigStore.state.isLoading=!0,!this.nylasApiRequest)return console.warn("Nylas API Request is not initialized"),index.dataResponse(null,{message:"Error updating group event: Nylas API Request is not initialized"});const s=t.id;delete t.id;const[a,d]=await this.nylasApiRequest.request({method:"PATCH",path:`scheduling/configurations/${n}/group-events/${s}`,body:t});return d?(this.nylasSchedulerConfigStore.state.isLoading=!1,index.dataResponse(null,{message:"Error updating group event: "+d.message})):index_es9e756df7.Xr(a)?(this.nylasSchedulerConfigStore.state.isLoading=!1,index.dataResponse(null,{message:"Error updating group event: "+((c=a.error)==null?void 0:c.message)})):(this.nylasSchedulerConfigStore.state.selectedGroupEvent=a.data,await this.getGroupEvents(n,this.nylasSchedulerConfigStore.state.selectedConfiguration),this.nylasSchedulerConfigStore.state.isLoading=!1,index.dataResponse(a.data))}async updateGroupEvent(t,n,s){var g,y,p,m,S,_,v,R,T,O,P,N,k,A;this.nylasSchedulerConfigStore.state.isLoading=!0;const a=this.nylasSchedulerConfigStore.state.selectedGroupEvent,d=(g=a==null?void 0:a.event)==null?void 0:g.master_event_id,c=(y=a==null?void 0:a.event)==null?void 0:y.id,l=(m=(p=a==null?void 0:a.event)==null?void 0:p.when)==null?void 0:m.start_time,h=(_=(S=a==null?void 0:a.group_event_info)==null?void 0:S.rrule)==null?void 0:_[0],u=h?h.split(";").filter(x=>!x.startsWith("UNTIL")).join(";"):"",f=l?index.dayjs(l*1e3).subtract(1,"minute").format("YYYYMMDDTHHmmss[Z]"):"";if(n==="this")return this.updateGroupEventById({...t,id:c,recurrence:d?void 0:t.recurrence},s);if(n==="future"&&d){const x=await this.createGroupEvent(t,s),b={location:(v=a==null?void 0:a.event)==null?void 0:v.location,conferencing:(R=a==null?void 0:a.event)==null?void 0:R.conferencing,title:(T=a==null?void 0:a.event)==null?void 0:T.title,description:(O=a==null?void 0:a.event)==null?void 0:O.description,capacity:(P=a==null?void 0:a.group_event_info)==null?void 0:P.capacity,calendar_id:(N=a==null?void 0:a.event)==null?void 0:N.calendar_id,recurrence:u?[u+";UNTIL="+f]:[`RRULE:FREQ=DAILY;UNTIL=${f}`]};return await this.updateGroupEventById({...b,id:d},s),[b,x]}else if(n==="all"){const x=t==null?void 0:t.when,b=(k=a==null?void 0:a.event)==null?void 0:k.when,U=(A=this.nylasSchedulerConfigStore.state.masterGroupEvents)==null?void 0:A[d];let w=U==null?void 0:U.when;return(x==null?void 0:x.start_time)!==(b==null?void 0:b.start_time)&&(w={...w,start_time:(x==null?void 0:x.start_time)||(w==null?void 0:w.start_time)}),(x==null?void 0:x.end_time)!==(b==null?void 0:b.end_time)&&(w={...w,end_time:(x==null?void 0:x.end_time)||(w==null?void 0:w.end_time)}),(x==null?void 0:x.start_timezone)!==(b==null?void 0:b.start_timezone)&&(w={...w,start_timezone:(x==null?void 0:x.start_timezone)||(w==null?void 0:w.start_timezone)}),(x==null?void 0:x.end_timezone)!==(b==null?void 0:b.end_timezone)&&(w={...w,end_timezone:(x==null?void 0:x.end_timezone)||(w==null?void 0:w.end_timezone)}),this.updateGroupEventById({...t,when:w,id:d},s)}throw this.nylasSchedulerConfigStore.state.isLoading=!1,new Error("Invalid option")}async deleteGroupEvent(t,n,s){var y,p,m,S,_,v,R,T,O,P,N,k;this.nylasSchedulerConfigStore.state.isLoading=!0;const a=this.nylasSchedulerConfigStore.state.selectedGroupEvent,d=(y=a==null?void 0:a.event)==null?void 0:y.master_event_id,c=(p=a==null?void 0:a.event)==null?void 0:p.id,l=(S=(m=a==null?void 0:a.event)==null?void 0:m.when)==null?void 0:S.start_time,h=(v=(_=a==null?void 0:a.group_event_info)==null?void 0:_.rrule)==null?void 0:v[0],u=h?h.split(";").filter(A=>!A.startsWith("UNTIL")).join(";"):"",f=l?index.dayjs(l*1e3).format("YYYYMMDDTHHmmss[Z]"):"",g={location:(R=a==null?void 0:a.event)==null?void 0:R.location,conferencing:(T=a==null?void 0:a.event)==null?void 0:T.conferencing,title:(O=a==null?void 0:a.event)==null?void 0:O.title,description:(P=a==null?void 0:a.event)==null?void 0:P.description,capacity:(N=a==null?void 0:a.group_event_info)==null?void 0:N.capacity,calendar_id:(k=a==null?void 0:a.event)==null?void 0:k.calendar_id,recurrence:u?[u+";UNTIL="+f]:[`RRULE:UNTIL=${f}`]};if(n==="this"&&c)return this.deleteGroupEventById(c,s);if(n==="future"&&d&&c)return await this.deleteGroupEventById(c,s),await this.updateGroupEventById({...g,id:d},s);if(n==="all"&&d)return this.deleteGroupEventById(d,s);throw this.nylasSchedulerConfigStore.state.isLoading=!1,new Error("Invalid option")}async deleteGroupEventById(t,n){var l,h,u;if(this.nylasSchedulerConfigStore.state.isLoading=!0,!this.nylasApiRequest)return console.warn("Nylas API Request is not initialized"),index.dataResponse(null,{message:"Error deleting group event: Nylas API Request is not initialized"});const s=new URLSearchParams,a=(h=(l=this.nylasSchedulerConfigStore.state.selectedConfiguration)==null?void 0:l.group_booking)==null?void 0:h.calendar_id;a&&s.append("calendar_id",a);const[d,c]=await this.nylasApiRequest.request({method:"DELETE",path:`scheduling/configurations/${n}/group-events/${t}?calendar_id=${a}`});return c?(this.nylasSchedulerConfigStore.state.isLoading=!1,index.dataResponse(null,{message:"Error deleting group event: "+c.message})):index_es9e756df7.Xr(d)?(this.nylasSchedulerConfigStore.state.isLoading=!1,index.dataResponse(null,{message:"Error deleting group event: "+((u=d.error)==null?void 0:u.message)})):(await this.getGroupEvents(n,this.nylasSchedulerConfigStore.state.selectedConfiguration),this.nylasSchedulerConfigStore.state.isLoading=!1,index.dataResponse(d.data))}async importGroupEvent(t,n){var l,h,u,f,g;if(this.nylasSchedulerConfigStore.state.isLoading=!0,!this.nylasApiRequest)return console.warn("Nylas API Request is not initialized"),index.dataResponse(null,{message:"Error importing group event: Nylas API Request is not initialized"});const s=new URLSearchParams,a=(h=(l=this.nylasSchedulerConfigStore.state.selectedConfiguration)==null?void 0:l.group_booking)==null?void 0:h.calendar_id;a&&s.append("calendar_id",a);const[d,c]=await this.nylasApiRequest.request({method:"POST",path:`scheduling/configurations/${n}/import-group-events?${s.toString()}`,body:t});return c?(this.nylasSchedulerConfigStore.state.isLoading=!1,index.dataResponse(null,{message:"Error importing group event: "+c.message})):index_es9e756df7.Xr(d)?(this.nylasSchedulerConfigStore.state.isLoading=!1,index.dataResponse(null,{message:"Error importing group event: "+((u=d.error)==null?void 0:u.message)})):(((g=(f=d.data)==null?void 0:f.imported_events)==null?void 0:g.length)>0&&await this.getGroupEvents(n,this.nylasSchedulerConfigStore.state.selectedConfiguration),this.nylasSchedulerConfigStore.state.isLoading=!1,index.dataResponse(d.data))}}class NylasSchedulerConfigConnector{constructor({nylasApiRequest:t,nylasSchedulerConfigStore:n}){this.nylasApiRequest=t,this.nylasSchedulerConfigStore=n}init(){index.debug("NylasSchedulerConfigConnector init")}get schedulerConfigStore(){return this.nylasSchedulerConfigStore}get schedulerConfig(){return this._schedulerConfigConnector?this._schedulerConfigConnector:(this._schedulerConfigConnector=new NylasSchedulerConfigAPIConnector({nylasApiRequest:this.nylasApiRequest,nylasSchedulerConfigStore:this.nylasSchedulerConfigStore}),this._schedulerConfigConnector)}resetStores(){index.debug("NylasSchedulerConfigConnector resetStores"),this.nylasSchedulerConfigStore.reset()}async logout(){index.debug("NylasSchedulerConfigConnector logout"),this.resetStores()}}function CreateNylasSchedulerConfigStore(r={}){const t={selectedConfiguration:{},configurations:[],groupEvents:[],listConfigurationsNextCursor:null,calendars:[],currentUser:null,action:null,additionalParticipants:[],requiresSlug:!1,masterGroupEvents:{},isLoading:!1,...r},n=index.createStore(t);function s(){n.set("selectedConfiguration",{...r.selectedConfiguration})}return n.onChange("action",async a=>{a||s()}),{...n,resetSelectedConfiguration:s}}class LocalStorage{get(t){return new Promise(n=>{const s=window.localStorage.getItem(t);n(s?JSON.parse(s):null)})}async remove(t){return window.localStorage.removeItem(t),new Promise(n=>{n(null)})}set(t,n){return window.localStorage.setItem(t,JSON.stringify(n)),new Promise(s=>{s(null)})}}const PKCE_KEY="pkce",GRANT_KEY="grant",USER_KEY="user";class Storage{constructor(t){I(this,"Storage",new LocalStorage);if(t){this.Storage=t;return}}setPKCE(t){const n=index.Buffer.from(t);this.Storage.set(PKCE_KEY,n.toString("base64"))}async getPKCE(){try{const t=await this.Storage.get(PKCE_KEY);if(t)return index.Buffer.from(t,"base64").toString("utf8")}catch{return null}return null}removePKCE(){this.Storage.remove(PKCE_KEY)}setGrant(t,n=!1){const{grant_id:s}=t;this.Storage.set(`${GRANT_KEY}${n?"-"+s:""}`,t)}removeGrant(t,n=!1){this.Storage.remove(`${GRANT_KEY}${n?"-"+t:""}`)}async getGrant(t,n=!1){const s=await this.Storage.get(`${GRANT_KEY}${n?"-"+t:""}`);return s||null}async setUserToken(t){const n=await this.getUserTokens();if(n)if(n.find(a=>a.sub===t.sub)){const a=n.map(d=>(d.sub===t.sub&&(d=t),d));this.Storage.set(USER_KEY,a)}else{const a=[...n,t];this.Storage.set(USER_KEY,a)}else this.Storage.set(USER_KEY,[t])}async getUserToken(t=""){const n=await this.Storage.get(USER_KEY);return n?t===""?n[0]:n.find(a=>a.sub===t):null}async getUserTokens(){const t=await this.Storage.get(USER_KEY);return t||null}removeUserTokens(){this.Storage.remove(USER_KEY)}async removeUserToken(t){const n=await this.getUserTokens(),s=n==null?void 0:n.filter(a=>a.sub!==t);this.Storage.set(USER_KEY,s)}async clearSession(){const t=await this.getUserTokens();t==null||t.forEach(n=>{this.removeGrant(n.sub)}),this.removePKCE(),this.removeUserTokens()}}class IndexedDBStorage{constructor(){I(this,"databaseName","identity-db");I(this,"storeName","identity")}get(t){const n=this;return new Promise((s,a)=>{n.openDatabase().then(function(d){const c=d.transaction(n.storeName,"readwrite"),h=c.objectStore(n.storeName).get(t);h.onsuccess=()=>{s(h.result)},h.onerror=()=>{a(h.error)},c.oncomplete=()=>{d.close()}})})}async remove(t){const n=this;return new Promise((s,a)=>{const d=indexedDB.open(this.databaseName);d.onupgradeneeded=function(c){c.target.result.createObjectStore(n.storeName)},d.onerror=()=>{a(d.error)},d.onsuccess=c=>{const l=c.target.result,h=l.transaction(this.storeName,"readwrite"),f=h.objectStore(this.storeName).delete(t);f.onsuccess=()=>{s(null)},f.onerror=()=>{a(f.error)},h.oncomplete=()=>{l.close()}}})}set(t,n){return new Promise((s,a)=>{const d=indexedDB.open(this.databaseName);d.onerror=()=>{a(d.error)},d.onupgradeneeded=c=>{c.target.result.createObjectStore(this.storeName)},d.onsuccess=c=>{const l=c.target.result,h=l.transaction(this.storeName,"readwrite"),f=h.objectStore(this.storeName).put(n,t);f.onsuccess=()=>{s(n)},f.onerror=()=>{a(f.error)},h.oncomplete=()=>{l.close()}}})}openDatabase(){const t=this;return new Promise(function(n,s){const a=indexedDB.open(t.databaseName,2);a.onupgradeneeded=function(d){d.target.result.createObjectStore(t.storeName)},a.onsuccess=function(d){n(d.target.result)},a.onerror=function(d){s(d.error)}})}}var sha256={exports:{}};(function(module){(function(){var ERROR="input is invalid type",WINDOW=typeof window=="object",root=WINDOW?window:{};root.JS_SHA256_NO_WINDOW&&(WINDOW=!1);var WEB_WORKER=!WINDOW&&typeof self=="object",NODE_JS=!root.JS_SHA256_NO_NODE_JS&&typeof index.process=="object"&&index.process.versions&&index.process.versions.node;NODE_JS?root=index.commonjsGlobal:WEB_WORKER&&(root=self);var COMMON_JS=!root.JS_SHA256_NO_COMMON_JS&&!0&&module.exports,ARRAY_BUFFER=!root.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",HEX_CHARS="0123456789abcdef".split(""),EXTRA=[-2147483648,8388608,32768,128],SHIFT=[24,16,8,0],K=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],OUTPUT_TYPES=["hex","array","digest","arrayBuffer"],blocks=[];(root.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(r){return Object.prototype.toString.call(r)==="[object Array]"}),ARRAY_BUFFER&&(root.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(r){return typeof r=="object"&&r.buffer&&r.buffer.constructor===ArrayBuffer});var createOutputMethod=function(r,t){return function(n){return new Sha256(t,!0).update(n)[r]()}},createMethod=function(r){var t=createOutputMethod("hex",r);NODE_JS&&(t=nodeWrap(t,r)),t.create=function(){return new Sha256(r)},t.update=function(a){return t.create().update(a)};for(var n=0;n<OUTPUT_TYPES.length;++n){var s=OUTPUT_TYPES[n];t[s]=createOutputMethod(s,r)}return t},nodeWrap=function(method,is224){var crypto=eval("require('crypto')"),Buffer=eval("require('buffer').Buffer"),algorithm=is224?"sha224":"sha256",nodeMethod=function(r){if(typeof r=="string")return crypto.createHash(algorithm).update(r,"utf8").digest("hex");if(r==null)throw new Error(ERROR);return r.constructor===ArrayBuffer&&(r=new Uint8Array(r)),Array.isArray(r)||ArrayBuffer.isView(r)||r.constructor===Buffer?crypto.createHash(algorithm).update(new Buffer(r)).digest("hex"):method(r)};return nodeMethod},createHmacOutputMethod=function(r,t){return function(n,s){return new HmacSha256(n,t,!0).update(s)[r]()}},createHmacMethod=function(r){var t=createHmacOutputMethod("hex",r);t.create=function(a){return new HmacSha256(a,r)},t.update=function(a,d){return t.create(a).update(d)};for(var n=0;n<OUTPUT_TYPES.length;++n){var s=OUTPUT_TYPES[n];t[s]=createHmacOutputMethod(s,r)}return t};function Sha256(r,t){t?(blocks[0]=blocks[16]=blocks[1]=blocks[2]=blocks[3]=blocks[4]=blocks[5]=blocks[6]=blocks[7]=blocks[8]=blocks[9]=blocks[10]=blocks[11]=blocks[12]=blocks[13]=blocks[14]=blocks[15]=0,this.blocks=blocks):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],r?(this.h0=3238371032,this.h1=914150663,this.h2=812702999,this.h3=4144912697,this.h4=4290775857,this.h5=1750603025,this.h6=1694076839,this.h7=3204075428):(this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=r}Sha256.prototype.update=function(r){if(!this.finalized){var t,n=typeof r;if(n!=="string"){if(n==="object"){if(r===null)throw new Error(ERROR);if(ARRAY_BUFFER&&r.constructor===ArrayBuffer)r=new Uint8Array(r);else if(!Array.isArray(r)&&(!ARRAY_BUFFER||!ArrayBuffer.isView(r)))throw new Error(ERROR)}else throw new Error(ERROR);t=!0}for(var s,a=0,d,c=r.length,l=this.blocks;a<c;){if(this.hashed&&(this.hashed=!1,l[0]=this.block,l[16]=l[1]=l[2]=l[3]=l[4]=l[5]=l[6]=l[7]=l[8]=l[9]=l[10]=l[11]=l[12]=l[13]=l[14]=l[15]=0),t)for(d=this.start;a<c&&d<64;++a)l[d>>2]|=r[a]<<SHIFT[d++&3];else for(d=this.start;a<c&&d<64;++a)s=r.charCodeAt(a),s<128?l[d>>2]|=s<<SHIFT[d++&3]:s<2048?(l[d>>2]|=(192|s>>6)<<SHIFT[d++&3],l[d>>2]|=(128|s&63)<<SHIFT[d++&3]):s<55296||s>=57344?(l[d>>2]|=(224|s>>12)<<SHIFT[d++&3],l[d>>2]|=(128|s>>6&63)<<SHIFT[d++&3],l[d>>2]|=(128|s&63)<<SHIFT[d++&3]):(s=65536+((s&1023)<<10|r.charCodeAt(++a)&1023),l[d>>2]|=(240|s>>18)<<SHIFT[d++&3],l[d>>2]|=(128|s>>12&63)<<SHIFT[d++&3],l[d>>2]|=(128|s>>6&63)<<SHIFT[d++&3],l[d>>2]|=(128|s&63)<<SHIFT[d++&3]);this.lastByteIndex=d,this.bytes+=d-this.start,d>=64?(this.block=l[16],this.start=d-64,this.hash(),this.hashed=!0):this.start=d}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},Sha256.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var r=this.blocks,t=this.lastByteIndex;r[16]=this.block,r[t>>2]|=EXTRA[t&3],this.block=r[16],t>=56&&(this.hashed||this.hash(),r[0]=this.block,r[16]=r[1]=r[2]=r[3]=r[4]=r[5]=r[6]=r[7]=r[8]=r[9]=r[10]=r[11]=r[12]=r[13]=r[14]=r[15]=0),r[14]=this.hBytes<<3|this.bytes>>>29,r[15]=this.bytes<<3,this.hash()}},Sha256.prototype.hash=function(){var r=this.h0,t=this.h1,n=this.h2,s=this.h3,a=this.h4,d=this.h5,c=this.h6,l=this.h7,h=this.blocks,u,f,g,y,p,m,S,_,v,R,T;for(u=16;u<64;++u)p=h[u-15],f=(p>>>7|p<<25)^(p>>>18|p<<14)^p>>>3,p=h[u-2],g=(p>>>17|p<<15)^(p>>>19|p<<13)^p>>>10,h[u]=h[u-16]+f+h[u-7]+g<<0;for(T=t&n,u=0;u<64;u+=4)this.first?(this.is224?(_=300032,p=h[0]-1413257819,l=p-150054599<<0,s=p+24177077<<0):(_=704751109,p=h[0]-210244248,l=p-1521486534<<0,s=p+143694565<<0),this.first=!1):(f=(r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10),g=(a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7),_=r&t,y=_^r&n^T,S=a&d^~a&c,p=l+g+S+K[u]+h[u],m=f+y,l=s+p<<0,s=p+m<<0),f=(s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10),g=(l>>>6|l<<26)^(l>>>11|l<<21)^(l>>>25|l<<7),v=s&r,y=v^s&t^_,S=l&a^~l&d,p=c+g+S+K[u+1]+h[u+1],m=f+y,c=n+p<<0,n=p+m<<0,f=(n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10),g=(c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7),R=n&s,y=R^n&r^v,S=c&l^~c&a,p=d+g+S+K[u+2]+h[u+2],m=f+y,d=t+p<<0,t=p+m<<0,f=(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10),g=(d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7),T=t&n,y=T^t&s^R,S=d&c^~d&l,p=a+g+S+K[u+3]+h[u+3],m=f+y,a=r+p<<0,r=p+m<<0;this.h0=this.h0+r<<0,this.h1=this.h1+t<<0,this.h2=this.h2+n<<0,this.h3=this.h3+s<<0,this.h4=this.h4+a<<0,this.h5=this.h5+d<<0,this.h6=this.h6+c<<0,this.h7=this.h7+l<<0},Sha256.prototype.hex=function(){this.finalize();var r=this.h0,t=this.h1,n=this.h2,s=this.h3,a=this.h4,d=this.h5,c=this.h6,l=this.h7,h=HEX_CHARS[r>>28&15]+HEX_CHARS[r>>24&15]+HEX_CHARS[r>>20&15]+HEX_CHARS[r>>16&15]+HEX_CHARS[r>>12&15]+HEX_CHARS[r>>8&15]+HEX_CHARS[r>>4&15]+HEX_CHARS[r&15]+HEX_CHARS[t>>28&15]+HEX_CHARS[t>>24&15]+HEX_CHARS[t>>20&15]+HEX_CHARS[t>>16&15]+HEX_CHARS[t>>12&15]+HEX_CHARS[t>>8&15]+HEX_CHARS[t>>4&15]+HEX_CHARS[t&15]+HEX_CHARS[n>>28&15]+HEX_CHARS[n>>24&15]+HEX_CHARS[n>>20&15]+HEX_CHARS[n>>16&15]+HEX_CHARS[n>>12&15]+HEX_CHARS[n>>8&15]+HEX_CHARS[n>>4&15]+HEX_CHARS[n&15]+HEX_CHARS[s>>28&15]+HEX_CHARS[s>>24&15]+HEX_CHARS[s>>20&15]+HEX_CHARS[s>>16&15]+HEX_CHARS[s>>12&15]+HEX_CHARS[s>>8&15]+HEX_CHARS[s>>4&15]+HEX_CHARS[s&15]+HEX_CHARS[a>>28&15]+HEX_CHARS[a>>24&15]+HEX_CHARS[a>>20&15]+HEX_CHARS[a>>16&15]+HEX_CHARS[a>>12&15]+HEX_CHARS[a>>8&15]+HEX_CHARS[a>>4&15]+HEX_CHARS[a&15]+HEX_CHARS[d>>28&15]+HEX_CHARS[d>>24&15]+HEX_CHARS[d>>20&15]+HEX_CHARS[d>>16&15]+HEX_CHARS[d>>12&15]+HEX_CHARS[d>>8&15]+HEX_CHARS[d>>4&15]+HEX_CHARS[d&15]+HEX_CHARS[c>>28&15]+HEX_CHARS[c>>24&15]+HEX_CHARS[c>>20&15]+HEX_CHARS[c>>16&15]+HEX_CHARS[c>>12&15]+HEX_CHARS[c>>8&15]+HEX_CHARS[c>>4&15]+HEX_CHARS[c&15];return this.is224||(h+=HEX_CHARS[l>>28&15]+HEX_CHARS[l>>24&15]+HEX_CHARS[l>>20&15]+HEX_CHARS[l>>16&15]+HEX_CHARS[l>>12&15]+HEX_CHARS[l>>8&15]+HEX_CHARS[l>>4&15]+HEX_CHARS[l&15]),h},Sha256.prototype.toString=Sha256.prototype.hex,Sha256.prototype.digest=function(){this.finalize();var r=this.h0,t=this.h1,n=this.h2,s=this.h3,a=this.h4,d=this.h5,c=this.h6,l=this.h7,h=[r>>24&255,r>>16&255,r>>8&255,r&255,t>>24&255,t>>16&255,t>>8&255,t&255,n>>24&255,n>>16&255,n>>8&255,n&255,s>>24&255,s>>16&255,s>>8&255,s&255,a>>24&255,a>>16&255,a>>8&255,a&255,d>>24&255,d>>16&255,d>>8&255,d&255,c>>24&255,c>>16&255,c>>8&255,c&255];return this.is224||h.push(l>>24&255,l>>16&255,l>>8&255,l&255),h},Sha256.prototype.array=Sha256.prototype.digest,Sha256.prototype.arrayBuffer=function(){this.finalize();var r=new ArrayBuffer(this.is224?28:32),t=new DataView(r);return t.setUint32(0,this.h0),t.setUint32(4,this.h1),t.setUint32(8,this.h2),t.setUint32(12,this.h3),t.setUint32(16,this.h4),t.setUint32(20,this.h5),t.setUint32(24,this.h6),this.is224||t.setUint32(28,this.h7),r};function HmacSha256(r,t,n){var s,a=typeof r;if(a==="string"){var d=[],c=r.length,l=0,h;for(s=0;s<c;++s)h=r.charCodeAt(s),h<128?d[l++]=h:h<2048?(d[l++]=192|h>>6,d[l++]=128|h&63):h<55296||h>=57344?(d[l++]=224|h>>12,d[l++]=128|h>>6&63,d[l++]=128|h&63):(h=65536+((h&1023)<<10|r.charCodeAt(++s)&1023),d[l++]=240|h>>18,d[l++]=128|h>>12&63,d[l++]=128|h>>6&63,d[l++]=128|h&63);r=d}else if(a==="object"){if(r===null)throw new Error(ERROR);if(ARRAY_BUFFER&&r.constructor===ArrayBuffer)r=new Uint8Array(r);else if(!Array.isArray(r)&&(!ARRAY_BUFFER||!ArrayBuffer.isView(r)))throw new Error(ERROR)}else throw new Error(ERROR);r.length>64&&(r=new Sha256(t,!0).update(r).array());var u=[],f=[];for(s=0;s<64;++s){var g=r[s]||0;u[s]=92^g,f[s]=54^g}Sha256.call(this,t,n),this.update(f),this.oKeyPad=u,this.inner=!0,this.sharedMemory=n}HmacSha256.prototype=new Sha256,HmacSha256.prototype.finalize=function(){if(Sha256.prototype.finalize.call(this),this.inner){this.inner=!1;var r=this.array();Sha256.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(r),Sha256.prototype.finalize.call(this)}};var exports=createMethod();exports.sha256=exports,exports.sha224=createMethod(!0),exports.sha256.hmac=createHmacMethod(),exports.sha224.hmac=createHmacMethod(!0),COMMON_JS?module.exports=exports:(root.sha256=exports.sha256,root.sha224=exports.sha224)})()})(sha256);var getRandomValues,rnds8=new Uint8Array(16);function rng(){if(!getRandomValues&&(getRandomValues=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!getRandomValues))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return getRandomValues(rnds8)}const REGEX=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function validate(r){return typeof r=="string"&®EX.test(r)}var byteToHex=[];for(var i=0;i<256;++i)byteToHex.push((i+256).toString(16).substr(1));function stringify(r){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=(byteToHex[r[t+0]]+byteToHex[r[t+1]]+byteToHex[r[t+2]]+byteToHex[r[t+3]]+"-"+byteToHex[r[t+4]]+byteToHex[r[t+5]]+"-"+byteToHex[r[t+6]]+byteToHex[r[t+7]]+"-"+byteToHex[r[t+8]]+byteToHex[r[t+9]]+"-"+byteToHex[r[t+10]]+byteToHex[r[t+11]]+byteToHex[r[t+12]]+byteToHex[r[t+13]]+byteToHex[r[t+14]]+byteToHex[r[t+15]]).toLowerCase();if(!validate(n))throw TypeError("Stringified UUID is invalid");return n}function v4(r,t,n){r=r||{};var s=r.random||(r.rng||rng)();if(s[6]=s[6]&15|64,s[8]=s[8]&63|128,t){n=n||0;for(var a=0;a<16;++a)t[n+a]=s[a];return t}return stringify(s)}async function getBytes(r,t){const n=r.getReader();let s;for(;!(s=await n.read()).done;)t(s.value)}function getLines(r){let t,n,s,a=!1;return function(c){t===void 0?(t=c,n=0,s=-1):t=concat(t,c);const l=t.length;let h=0;for(;n<l;){a&&(t[n]===10&&(h=++n),a=!1);let u=-1;for(;n<l&&u===-1;++n)switch(t[n]){case 58:s===-1&&(s=n-h);break;case 13:a=!0;case 10:u=n;break}if(u===-1)break;r(t.subarray(h,u),s),h=n,s=-1}h===l?t=void 0:h!==0&&(t=t.subarray(h),n-=h)}}function getMessages(r,t,n){let s=newMessage();const a=new TextDecoder;return function(c,l){if(c.length===0)n==null||n(s),s=newMessage();else if(l>0){const h=a.decode(c.subarray(0,l)),u=l+(c[l+1]===32?2:1),f=a.decode(c.subarray(u));switch(h){case"data":s.data=s.data?s.data+`
|
|
2
|
-
`+f:f;break;case"event":s.event=f;break;case"id":r(s.id=f);break;case"retry":const g=parseInt(f,10);isNaN(g)||t(s.retry=g);break}}}}function concat(r,t){const n=new Uint8Array(r.length+t.length);return n.set(r),n.set(t,r.length),n}function newMessage(){return{data:"",event:"",id:"",retry:void 0}}var __rest=function(r,t){var n={};for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&t.indexOf(s)<0&&(n[s]=r[s]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,s=Object.getOwnPropertySymbols(r);a<s.length;a++)t.indexOf(s[a])<0&&Object.prototype.propertyIsEnumerable.call(r,s[a])&&(n[s[a]]=r[s[a]]);return n};const EventStreamContentType="text/event-stream",DefaultRetryInterval=1e3,LastEventId="last-event-id";function fetchEventSource(r,t){var{signal:n,headers:s,onopen:a,onmessage:d,onclose:c,onerror:l,openWhenHidden:h,fetch:u}=t,f=__rest(t,["signal","headers","onopen","onmessage","onclose","onerror","openWhenHidden","fetch"]);return new Promise((g,y)=>{const p=Object.assign({},s);p.accept||(p.accept=EventStreamContentType);let m;function S(){m.abort(),document.hidden||P()}h||document.addEventListener("visibilitychange",S);let _=DefaultRetryInterval,v=0;function R(){document.removeEventListener("visibilitychange",S),window.clearTimeout(v),m.abort()}n==null||n.addEventListener("abort",()=>{R(),g()});const T=u??window.fetch,O=a??defaultOnOpen;async function P(){var N;m=new AbortController;try{const k=await T(r,Object.assign(Object.assign({},f),{headers:p,signal:m.signal}));await O(k),await getBytes(k.body,getLines(getMessages(A=>{A?p[LastEventId]=A:delete p[LastEventId]},A=>{_=A},d))),c==null||c(),R(),g()}catch(k){if(!m.signal.aborted)try{const A=(N=l==null?void 0:l(k))!==null&&N!==void 0?N:_;window.clearTimeout(v),v=window.setTimeout(P,A)}catch(A){R(),y(A)}}}P()})}function defaultOnOpen(r){const t=r.headers.get("content-type");if(!(t!=null&&t.startsWith(EventStreamContentType)))throw new Error(`Expected content-type to be ${EventStreamContentType}, Actual: ${t}`)}function Base64EncodeUrl(r){return r.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function getTimestamp(){return Math.floor(Date.now()/1e3)}function e(r){this.message=r}e.prototype=new Error,e.prototype.name="InvalidCharacterError";var r$1=typeof window<"u"&&window.atob&&window.atob.bind(window)||function(r){var t=String(r).replace(/=+$/,"");if(t.length%4==1)throw new e("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,s,a=0,d=0,c="";s=t.charAt(d++);~s&&(n=a%4?64*n+s:s,a++%4)?c+=String.fromCharCode(255&n>>(-2*a&6)):0)s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(s);return c};function t$1(r){var t=r.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return function(n){return decodeURIComponent(r$1(n).replace(/(.)/g,function(s,a){var d=a.charCodeAt(0).toString(16).toUpperCase();return d.length<2&&(d="0"+d),"%"+d}))}(t)}catch{return r$1(t)}}function n$1(r){this.message=r}function o(r,t){if(typeof r!="string")throw new n$1("Invalid token specified");var n=(t=t||{}).header===!0?0:1;try{return JSON.parse(t$1(r.split(".")[n]))}catch(s){throw new n$1("Invalid token specified: "+s.message)}}n$1.prototype=new Error,n$1.prototype.name="InvalidTokenError";class NylasSessions{constructor(t){I(this,"clientId");I(this,"redirectUri");I(this,"accessType","online");I(this,"domain","http://api.nylas.com");I(this,"versioned",!1);I(this,"Storage");I(this,"hosted",!1);I(this,"multiAccount",!1);I(this,"loginId","");if(this.clientId=t.clientId,this.redirectUri=t.redirectUri,t.domain&&(this.domain=t.domain,this.domain.substring(this.domain.length-3).includes("/v")&&(this.versioned=!0)),t.multiAccount&&(this.multiAccount=t.multiAccount),t.sw){const n=new IndexedDBStorage;this.Storage=new Storage(n)}else this.Storage=new Storage;t.accessType&&(this.accessType=t.accessType),t.loginId&&(this.loginId=t.loginId),t.hosted&&(this.hosted=t.hosted),t.disableInitCodeExchange!==!0&&this.codeExchange(null)}async validateAccessToken(t=""){const n=await this.Storage.getGrant(t,this.multiAccount);if(!n)return!1;const{access_token:s}=n;try{return!!(await(await fetch(`${this.domain}/connect/tokeninfo?access_token=${s}`,{method:"GET"})).json()).data}catch{return!1}}async validateIDToken(t=""){const n=await this.Storage.getGrant(t,this.multiAccount);if(!n)return!1;const{id_token:s}=n;try{const a=await fetch(`${this.domain}/connect/tokeninfo?id_token=${s}`,{method:"GET"});return!(a.status!==200||!(await a.json()).data)}catch{return!1}}getDomain(){return this.domain}async auth(t){this.hosted&&(this.domain===window.location.origin||this.versioned&&this.domain.includes(window.location.origin))&&await this.hostedSetCodeChallenge();const n=await this.generateAuthURL(t);if(t.popup){this.popUp(n);return}return n}async generateAuthURL(t){const n=await this.getCodeChallege();let s=`${this.domain}/connect/auth?client_id=${this.clientId}&redirect_uri=${this.redirectUri}&access_type=${this.accessType}&response_type=code`;return n&&(s+=`&code_challenge=${n}&code_challenge_method=S256&options=rotate_refresh_token`),t.provider&&(s+=`&provider=${t.provider}`),t.loginHint&&(s+=`&login_hint=${t.loginHint}`,t.includeGrantScopes&&(s+=`&include_grant_scopes=${t.includeGrantScopes}`)),t.scope&&(s+=`&scope=${t.scope.join(" ")}`),t.prompt&&(s+=`&prompt=${t.prompt}`),t.metadata&&(s+=`&metadata=${t.metadata}`),(t.state||this.loginId)&&(s+=`&state=${this.loginId?this.loginId:t.state}`),s}async generateReauthURL(t,n){if(!t)throw new Error("Grant ID is required");const s=await this.Storage.getUserToken(t),a=await this.getCodeChallege();let d=`${this.domain}/connect/auth?client_id=${this.clientId}&redirect_uri=${this.redirectUri}&access_type=${this.accessType}&response_type=code`;return a&&(d+=`&code_challenge=${a}&code_challenge_method=S256&options=rotate_refresh_token`),s!=null&&s.provider&&(d+=`&provider=${s.provider}`),s!=null&&s.email&&(d+=`&login_hint=${s.email}`),n&&(d+=`&scope=${n.join(" ")}`),d}async generateCodeChallenge(){if(await this.Storage.getPKCE())return;const n=v4();this.Storage.setPKCE(n)}async hostedSetCodeChallenge(){if(!this.hosted)throw console.error("Method only used with hosted flag enabled");const n=new URLSearchParams(window.location.search).get("code_challenge");if(!n){if(await this.Storage.getPKCE())return;console.warn("Code challenge is recomended");return}this.Storage.setPKCE(n)}async getCodeChallege(){if(this.hosted&&(this.domain===window.location.origin||this.versioned&&this.domain.includes(window.location.origin))){const s=new URLSearchParams(window.location.search).get("code_challenge");return s||(console.warn("Code challenge is recomended"),"")}const t=await this.Storage.getPKCE();if(t){const n=sha256.exports.sha256(t);let s=index.Buffer.from(n).toString("base64");return s=Base64EncodeUrl(s),s}return""}async isLoggedIn(){if(this.hosted&&(this.domain===window.location.origin||this.versioned&&this.domain.includes(window.location.origin)))return!1;const t=await this.Storage.getUserTokens();return t&&t.length>0?(this.multiAccount&&await this.generateCodeChallenge(),!0):(await this.generateCodeChallenge(),!1)}isMultiAccount(){return this.multiAccount}async logout(){const t=await this.getProfile();await this.Storage.clearSession();const n={detail:t};window.dispatchEvent(new CustomEvent("onLogoutSuccess",n))}async getProfile(t=""){let n;return t?n=await this.Storage.getUserToken(t):n=await this.Storage.getUserToken(),n||null}async getProfiles(){const t=await this.Storage.getUserTokens();return t||null}async removeProfile(t){return await this.Storage.removeUserToken(t),await this.Storage.removeGrant(t),null}async authIMAP(t){const n=await this.getCodeChallege(),s={imap_username:t.imap_username,imap_password:t.imap_password,imap_host:t.imap_host,imap_port:t.imap_port,type:t.type,smtp_host:t.smtp_host,smtp_port:t.smtp_port,provider:t.provider,redirect_uri:this.redirectUri,state:t.state,public_application_id:this.clientId,access_type:this.accessType};return this.loginId&&(s.id=this.loginId),t.smtp_username&&t.smtp_password&&(s.smtp_username=t.smtp_username,s.smtp_password=t.smtp_password),n!=""&&(s.code_challenge=n,s.code_challenge_method="S256"),await(await fetch(`${this.domain}/connect/login/imap`,{method:"POST",headers:new Headers({"content-type":"application/json"}),body:JSON.stringify(s)})).json()}async authEWS(t){const n=await this.getCodeChallege(),s={...t,provider:"ews",redirect_uri:this.redirectUri,public_application_id:this.clientId,access_type:this.accessType};return this.loginId&&(s.id=this.loginId),n!=""&&(s.code_challenge=n,s.code_challenge_method="S256"),await(await fetch(`${this.domain}/connect/login/ews`,{method:"POST",headers:new Headers({"content-type":"application/json"}),body:JSON.stringify(s)})).json()}async detectEmail(t){return await(await fetch(`${this.versioned?this.domain:this.domain+"/connect"}/providers/detect?client_id=${this.clientId}&email=${t}`,{method:"POST",headers:new Headers({"content-type":"application/json"})})).json()}async applicationInfo(){return(await(await fetch(`${this.versioned?this.domain:this.domain+"/connect"}/applications?client_id=${this.clientId}`,{method:"GET",headers:new Headers({"content-type":"application/json"})})).json()).data}async getAvailableProviders(){const t=await fetch(`${this.domain}/connect/providers/find?client_id=${this.clientId}`,{method:"GET",headers:new Headers({"content-type":"application/json"})});return t?(await t.json()).data:null}onLoginSuccess(t){window.addEventListener("onLoginSuccess",n=>t(n))}onLogoutSuccess(t){window.addEventListener("onLogoutSuccess",n=>t(n))}onLoginFail(t){window.addEventListener("onLoginFail",n=>t(n))}onTokenRefreshSuccess(t){window.addEventListener("onTokenRefreshSuccess",n=>t(n))}onTokenRefreshFail(t){window.addEventListener("onTokenRefreshFail",n=>t(n))}onSessionExpired(t){window.addEventListener("onSessionExpired",n=>t(n))}async codeExchange(t){let n=new URLSearchParams(window.location.search);t&&(n=new URLSearchParams(t));const s=n.get("code"),a=n.get("state"),d=n.get("error"),c=n.get("error_description"),l=n.get("error_code");if(d&&c&&l){const u={detail:{error:d,error_description:c,error_code:l}};return window.dispatchEvent(new CustomEvent("onLoginFail",u)),window.history.pushState({},document.title,window.location.pathname),!1}if(!s)return console.warn("No code found"),!1;if(window.opener&&window.name==="uas-popup")return console.warn("Popup window detected"),!1;const h=await this.Storage.getPKCE();if(!h)return console.warn("No code verifier found"),!1;try{const u={client_id:this.clientId,redirect_uri:this.redirectUri,code:s,grant_type:"authorization_code",code_verifier:h},g=await(await fetch(`${this.domain}/connect/token`,{method:"POST",headers:new Headers({"content-type":"application/json"}),body:JSON.stringify(u)})).json();if(g){if(g.error){const p={detail:g};return window.dispatchEvent(new CustomEvent("onLoginFail",p)),!0}const y=await this.handleCodeExchangeResponse(g);if(y.valid){a&&(y.data.state=a);const p={detail:y.data};window.dispatchEvent(new CustomEvent("onLoginSuccess",p)),window.history.pushState({},document.title,window.location.pathname)}else{const p={detail:y.data};return window.dispatchEvent(new CustomEvent("onLoginFail",p)),!0}}return this.Storage.removePKCE(),!0}catch(u){const f={detail:u};return window.dispatchEvent(new CustomEvent("onLoginFail",f)),window.history.pushState({},document.title,window.location.pathname),!1}}async tokenExchange(t=""){const n=await this.Storage.getGrant(t,this.multiAccount);if(!n)return!1;const s=n.refresh_token;try{const a={client_id:this.clientId,redirect_uri:this.redirectUri,refresh_token:s,grant_type:"refresh_token"},c=await(await fetch(`${this.domain}/connect/token`,{method:"POST",headers:new Headers({"content-type":"application/json"}),body:JSON.stringify(a)})).json();if(c){if(c.error){const f={detail:c};return window.dispatchEvent(new CustomEvent("onTokenRefreshFail",f)),!0}const l=getTimestamp();if(c.expires_in=l+c.expires_in,this.Storage.setGrant(c,this.multiAccount),!await this.validateIDToken(t)){const f={detail:c};return window.dispatchEvent(new CustomEvent("onTokenRefreshFail",f)),!0}const u={detail:c};return window.dispatchEvent(new CustomEvent("onTokenRefreshSuccess",u)),!0}this.Storage.removePKCE()}catch(a){const d={detail:a};return window.dispatchEvent(new CustomEvent("onTokenRefreshFail",d)),!1}}async handleCodeExchangeResponse(t){if(t.error)return{data:t,valid:!1};const s=getTimestamp();t.expires_in=s+t.expires_in,this.Storage.setGrant(t,this.multiAccount);const a=o(t.id_token);return a.status="authenticated",this.Storage.setUserToken(a),await this.validateIDToken(a.sub)?{data:t,valid:!0}:{data:t,valid:!1}}async popUp(t){const a=window.screenX+(window.outerWidth-500)/2,d=window.screenY+(window.outerHeight-600)/2.5,c="uas-popup",l=t,h=window.open(l,c,`width=500,height=600,left=${a},top=${d}`);if(!h)return;const u=setInterval(async()=>{if(h.closed){const f={detail:{error_description:"OAuth provider window closed"}};window.dispatchEvent(new CustomEvent("onLoginFail",f)),u&&clearInterval(u);return}try{const f=h.location.href.split("?");if(!f[0])return;const g=h.location.search;if(h.history.pushState({},document.title,window.location.pathname),f[0]===this.redirectUri&&f.length>1){const y=await this.codeExchange(g);h.close(),y&&location.reload(),u&&clearInterval(u);return}}catch{return}},1e3)}async getAccessToken(t=""){const n=getTimestamp(),s=await this.Storage.getGrant(t,this.multiAccount);if(!s)return null;const{access_token:a,expires_in:d}=s,c=a;return c&&d&&d>getTimestamp()&&d-n>30?c:(await this.tokenExchange(t),(await this.Storage.getGrant(t,this.multiAccount)).access_token)}async sse(t,n){const s=n.headers||{},a=s["Grant-ID"];let d="";if(this.multiAccount){if(!a)throw this.logout(),new Error("Grant ID is required for multi account calls");d=await this.getAccessToken(a)}else d=await this.getAccessToken();return delete s["Grant-ID"],s.Authorization=`Bearer ${d}`,s["content-type"]||(s["content-type"]="application/json"),fetchEventSource(`${this.domain}/${t}`,{...n,headers:s})}async fetch(t,n,s=!0,a){let d="",c=1;if(this.multiAccount){if(!n.grant_id)throw this.logout(),new Error("Grant ID is required for multi account calls");const h=await this.getProfiles();c=h?h.length:1,d=await this.getAccessToken(n.grant_id)}else d=await this.getAccessToken();if(!d)throw new Error("Access token not found");let l=n.headers;Headers.prototype.isPrototypeOf(l)?(l.append("Authorization",`Bearer ${d}`),l.has("content-type")||l.append("content-type","application/json")):l=new Headers({Authorization:`Bearer ${d}`,"content-type":"application/json"});try{n!=null&&n.body&&(n.body=JSON.stringify(n==null?void 0:n.body));const h=await fetch(`${a||this.domain}/${t}`,{...n,headers:l});if(!s)return h;const u=await(h==null?void 0:h.json());if(!await this.isAuthenticatedResponse(h.status,u)){if(c>1){const g=await this.getProfile(n.grant_id);if(g){g.status="unauthorized",await this.Storage.setUserToken(g);const y={detail:{user:g}};window.dispatchEvent(new CustomEvent("onSessionExpired",y))}}else{const y={detail:{user:await this.Storage.getUserToken()}};window.dispatchEvent(new CustomEvent("onSessionExpired",y))}this.logout();return}return u}catch(h){throw h}}async fetchRequest(t,n,s,a=!0,d,c){const l=await this.isLoggedIn(),h=new URL(t,d??this.domain),u=new Headers;if(u.append("Accept","application/json"),u.append("Content-Type","application/json"),u.append("User-Agent","nylas-identity"),l){const y=await this.getAccessToken();u.append("Authorization",`Bearer ${y}`)}const f=await fetch(h.toString(),{method:n||"GET",headers:u,mode:"cors",referrer:location.origin,body:s?JSON.stringify(s):void 0,...c||{}});return a?await f.json():f.body}async isAuthenticatedResponse(t,n){var s;return!(t==401&&((s=n==null?void 0:n.error)==null?void 0:s.type)=="token.unauthorized_access")}addAPIKey(t,n,s){this.Storage.setUserToken({aud:"https://api-staging.us.nylas.com/",exp:2e9,email_verified:!0,iat:getTimestamp(),iss:"",email:n,provider:"virtual-calendar",status:"authenticated",name:n,sub:t}),this.Storage.setGrant({grant_id:t,access_token:s,expires_in:2e9},this.multiAccount)}}var B={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,D={};function E(r,t,n){this.props=r,this.context=t,this.refs=D,this.updater=n||B}E.prototype.isReactComponent={};E.prototype.setState=function(r,t){if(typeof r!="object"&&typeof r!="function"&&r!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,r,t,"setState")};E.prototype.forceUpdate=function(r){this.updater.enqueueForceUpdate(this,r,"forceUpdate")};function F(){}F.prototype=E.prototype;function G(r,t,n){this.props=r,this.context=t,this.refs=D,this.updater=n||B}var H=G.prototype=new F;H.constructor=G;C(H,E.prototype);H.isPureReactComponent=!0;const LoginRequired=({authenticationUrl:r})=>index.h("div",{class:"login-required",part:"nse__login-required login-component"},index.h("div",{class:"card",part:"nse__login-required-card"},index.h("p",{part:"nse__login-required-text"},"Log into your account to use the Scheduler Editor."),index.h("button",{class:"google-button",part:"nse__login-required-google-button",onClick:async t=>{t.preventDefault();const n=await r("google");n?window.location.href=n:console.error("[nylas-scheduler-editor] Unable to get authentication URL.")}},index.h("span",{class:"icon"},index.h("google-logo-icon",{width:"15",height:"15"})),"Continue with Google"),index.h("button",{class:"microsoft-button",part:"nse__login-required-microsoft-button",onClick:async t=>{t.preventDefault();const n=await r("microsoft");n?window.location.href=n:console.error("[nylas-scheduler-editor] Unable to get authentication URL.")}},index.h("span",{class:"icon"},index.h("microsoft-logo-icon",{width:"15",height:"15"})),"Continue with Microsoft"),index.h("button",{class:"other-provider-button",part:"nse__login-required-other-provider-button",onClick:async t=>{t.preventDefault();const n=await r();n?window.location.href=n:console.error("[nylas-scheduler-editor] Unable to get authentication URL.")}},"View all providers ",index.h("chevron-icon",{width:"17",height:"17"})),index.h("small",{class:"disclaimer-text",part:"nse__login-required-disclaimer-text"},"* You will be redirected to authenticate your account.")));function ExpressFlow({currentUser:r,calendars:t,selectedEventType:n}){const s=(t==null?void 0:t.find(a=>a.is_primary))||(t==null?void 0:t[0]);switch(n){case constantsF51538ef.CONFIGURATION_EVENT_TYPE.one_on_one:case constantsF51538ef.CONFIGURATION_EVENT_TYPE.max_availability:case constantsF51538ef.CONFIGURATION_EVENT_TYPE.max_fairness:return index.h(index.Fragment,null,index.h("nylas-event-info",null,index.h("div",{slot:"inputs"},index.h("nylas-event-title",null),index.h("nylas-event-duration",null),index.h("nylas-event-location",{userProvider:r.provider}))),index.h("nylas-booking-calendar-picker",{exportparts:"nbcp, nbcp__header, nbcp__dropdown, nbcp__dropdown-button, nbcp__dropdown-content",expressFlow:!0,calendars:t,currentUser:r,defaultBookingCalendar:s==null?void 0:s.id}),index.h("nylas-custom-event-slug",{name:"custom-event-slug",exportparts:"nces, nces__body, nces__header, nces__drawer-toggle--container, nces__input-textfield"}));case constantsF51538ef.CONFIGURATION_EVENT_TYPE.collective:return index.h(index.Fragment,null,index.h("nylas-event-info",null,index.h("div",{slot:"inputs"},index.h("nylas-event-title",null),index.h("nylas-event-duration",null),index.h("nylas-event-location",{userProvider:r.provider}))),index.h("nylas-booking-calendar-picker",{exportparts:"nbcp, nbcp__header, nbcp__dropdown, nbcp__dropdown-button, nbcp__dropdown-content",expressFlow:!0,calendars:t,currentUser:r,defaultBookingCalendar:s==null?void 0:s.id}),index.h("nylas-custom-event-slug",{name:"custom-event-slug",exportparts:"nces, nces__body, nces__header, nces__drawer-toggle--container, nces__input-textfield"}),index.h("nylas-additional-participants",{name:"participants",eventParticipants:[{name:(r==null?void 0:r.name)||(r==null?void 0:r.email),email:(r==null?void 0:r.email)||"",is_organizer:!0}],exportparts:"nadtnlpart, nadtnlpart__title, nadtnlpart__subtitle, nadtnlpart__content, nadtnlpart__input_group, nadtnlpart__input_wrapper, nadtnlpart__input, nadtnlpart__remove-participant"}));case constantsF51538ef.CONFIGURATION_EVENT_TYPE.group:return index.h(index.Fragment,null,index.h("nylas-event-info",null,index.h("div",{slot:"inputs"},index.h("nylas-event-title",{noTemplates:!0}),index.h("nylas-event-description",{noTemplates:!0,hideAutoPopulateButton:!0}),index.h("nylas-event-location",{userProvider:r.provider}),index.h("nylas-event-timeslot",{name:"event-timeslot"}),index.h("nylas-event-capacity",null))),index.h("nylas-booking-calendar-picker",{exportparts:"nbcp, nbcp__header, nbcp__dropdown, nbcp__dropdown-button, nbcp__dropdown-content",expressFlow:!0,calendars:t,currentUser:r,defaultBookingCalendar:s==null?void 0:s.id}),index.h("nylas-additional-participants",{name:"participants",eventParticipants:[{name:(r==null?void 0:r.name)||(r==null?void 0:r.email),email:(r==null?void 0:r.email)||"",is_organizer:!0}],exportparts:"nadtnlpart, nadtnlpart__title, nadtnlpart__subtitle, nadtnlpart__content, nadtnlpart__input_group, nadtnlpart__input_wrapper, nadtnlpart__input, nadtnlpart__remove-participant"}),index.h("nylas-page-name",{requirePageName:!0,pageName:"Group events page"}),index.h("nylas-custom-event-slug",{name:"custom-event-slug",exportparts:"nces, nces__body, nces__header, nces__drawer-toggle--container, nces__input-textfield"}))}}const nylasSchedulerEditorCss=':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 0px 6px -2px rgba(0, 0, 0, 0.05), 0px 5px 15px -3px rgba(0, 0, 0, 0.1);--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}@media screen and (max-width: 768px){:host{width:-moz-available;width:-webkit-fill-available;width:fill-available;min-width:325px}}:host nylas-notification{position:absolute;top:0;right:0}div.scheduler-editor-content{height:800px}@media screen and (max-width: 768px){div.scheduler-editor-content{height:auto}}div.scheduler-editor-content--group{height:800px}@media screen and (max-width: 768px){div.scheduler-editor-content--group{height:auto}}div.scheduler-editor-header{display:grid;grid-template-columns:1fr auto auto;align-items:center;justify-content:space-between;padding:1rem;border-bottom:1px solid var(--nylas-base-200);color:var(--nylas-base-900);min-width:924px}@media screen and (max-width: 768px){div.scheduler-editor-header{width:auto;min-width:calc(325px - 1rem)}}div.scheduler-editor-header h1.scheduler-editor-title{display:flex;align-items:center;gap:0.5rem;margin:0;font-size:18px;line-height:24px;font-weight:600}div.scheduler-editor-header button{background:transparent;border:none;cursor:pointer}div.scheduler-editor-header button:hover,div.scheduler-editor-header button:active{color:var(--nylas-primary);background-color:transparent}div.scheduler-editor-header button:disabled{cursor:not-allowed}div.scheduler-editor-header div.language select-dropdown::part(sd_dropdown-button){border:none;padding:4px;margin-right:8px}div.scheduler-editor-header div.language select-dropdown::part(sd_dropdown-button):hover{outline:none;color:var(--nylas-primary)}div.scheduler-editor-header div.language select-dropdown::part(sd_dropdown-content){min-width:132px}@media screen and (max-width: 768px){div.scheduler-editor-header div.language select-dropdown::part(sd_dropdown-content){width:-webkit-fill-available;width:fill-available;width:-moz-available}}nylas-select-event-type{height:inherit;width:calc(924px + 2rem)}@media screen and (max-width: 768px){nylas-select-event-type{width:auto}}nylas-editor-tabs,nylas-editor-tabs-group{width:auto;height:inherit}nylas-editor-tabs .row,nylas-editor-tabs-group .row{display:flex;gap:1rem}nylas-editor-tabs .composable,nylas-editor-tabs-group .composable{height:inherit;overflow:auto}nylas-editor-tabs nylas-event-info div[slot=inputs],nylas-editor-tabs nylas-event-limits div[slot=inputs],nylas-editor-tabs-group nylas-event-info div[slot=inputs],nylas-editor-tabs-group nylas-event-limits div[slot=inputs]{display:flex;flex-direction:column;gap:1rem}.card{display:flex;flex-direction:column;padding:2rem;background-color:var(--nylas-base-0);border:1px solid var(--nylas-base-200);border-radius:5px;max-width:fit-content;align-self:center}.login-required{height:inherit;overflow-y:auto;display:flex;flex-direction:column;justify-content:center;padding:2rem 1rem;background-color:var(--nylas-base-25);border-radius:var(--nylas-border-radius-2x)}@media screen and (max-width: 768px){.login-required{height:auto}}.login-required p{margin:0 0 1rem}.login-required .microsoft-button,.login-required .google-button{height:48px;border:1px solid var(--nylas-base-300);border-radius:var(--nylas-border-radius-2x);font-size:16px;line-height:24px;padding:0 1rem;background-color:var(--nylas-base-0);font-weight:600;cursor:pointer;display:flex;margin-bottom:1rem;background-color:var(--nylas-base-0);border:1px solid var(--nylas-base-200);border-radius:5px;justify-content:center;gap:0.5rem;align-items:center}.login-required .microsoft-button:hover,.login-required .google-button:hover{background-color:var(--nylas-base-25)}.login-required .microsoft-button:hover,.login-required .google-button:hover{background-color:var(--nylas-base-25)}.login-required .other-provider-button{height:48px;border:1px solid var(--nylas-base-300);border-radius:var(--nylas-border-radius-2x);font-size:16px;line-height:24px;padding:0 1rem;background-color:var(--nylas-base-0);font-weight:600;cursor:pointer;display:flex;border:0;background-color:var(--nylas-base-0);height:48px;margin-bottom:1rem;font-size:0.95rem;justify-content:center;gap:0.25rem;align-items:center}.login-required .other-provider-button:hover{background-color:var(--nylas-base-25)}.login-required .other-provider-button svg{transform:rotate(180deg)}.login-required .other-provider-button:hover{background-color:var(--nylas-base-25)}.login-required .disclaimer-text{font-size:0.75rem;color:var(--nylas-base-600);align-self:center}.list-configurations{padding:2rem;height:inherit;background:var(--nylas-base-25);border-radius:var(--nylas-border-radius-2x)}@media screen and (max-width: 768px){.list-configurations{height:auto;padding:2rem 1rem}}.list-configurations nylas-list-configurations{height:inherit;display:flex;flex-direction:column}',NylasSchedulerEditorStyle0=nylasSchedulerEditorCss,NylasSchedulerEditor=class{constructor(r){index.registerInstance(this,r),this.init=index.createEvent(this,"init",7),this.loggedIn=index.createEvent(this,"loggedIn",7),this.loggedOut=index.createEvent(this,"loggedOut",7),this.schedulerConfigCloseClicked=index.createEvent(this,"schedulerConfigCloseClicked",7),this.handleSchedulerConfigCloseClicked=t=>{const n=this.schedulerConfigCloseClicked.emit(this.host);"schedulerConfigCloseClicked"in this.eventOverrides&&this.eventOverrides.schedulerConfigCloseClicked(n,this.nylasSchedulerConfigConnector),n.defaultPrevented||(localStorage.removeItem("grant"),localStorage.removeItem("user"),window.location.reload())},this.authenticationUrl=async t=>this.nylasApiRequest?await this.nylasApiRequest.authenticationUrl({provider:t})||"":(console.error("[nylas-scheduler-editor] Nylas API Request is not initialized."),""),this.configurationId=void 0,this.nylasApiRequest=void 0,this.nylasSessionsConfig=void 0,this.defaultAuthArgs=void 0,this.eventOverrides={},this.schedulerPreviewLink="",this.defaultSchedulerConfigState=void 0,this.mode="app",this.additionalParticipants=void 0,this.hideEditorTabs=[],this.conferenceProviders=void 0,this.requiresSlug=!1,this.enableUserFeedback=!0,this.defaultLanguage=void 0,this.localization=void 0,this.nylasBranding=!0,this.experimentalFeatures=void 0,this.enableEventTypes={one_on_one:!0,collective:!0,max_fairness:!0,max_availability:!0,group:!0},this.automaticComponentRegistration=!0,this.selectedLanguage=this.defaultLanguage||constantsF51538ef.LANGUAGE_CODE.en,this.langVersion=0,this.version="2.0.4"}connectedCallback(){index.debug("[nylas-scheduler-editor] connectedCallback")}async componentWillLoad(){var s,a,d,c,l,h,u,f;index.debug("[nylas-scheduler-editor] componentWillLoad");const r=(s=this.additionalParticipants)==null?void 0:s.filter(g=>{var p;const y=((p=g.calendars)==null?void 0:p.length)>0?g.calendars.filter(m=>m.id&&m.name):[];if(g.name&&g.email&&y.length>0)return{name:g.name,email:g.email,calendars:y}});if(this.stores={schedulerConfig:CreateNylasSchedulerConfigStore({...this.defaultSchedulerConfigState,additionalParticipants:r,conferenceProviders:this.conferenceProviders,requiresSlug:this.requiresSlug,selectedLanguage:this.defaultLanguage||constantsF51538ef.LANGUAGE_CODE.en,nylasBranding:this.nylasBranding,experimentalFeatures:this.experimentalFeatures,enableEventTypes:this.enableEventTypes})},!this.nylasApiRequest&&this.nylasSessionsConfig){const g=new NylasSessions(this.nylasSessionsConfig);await g.isLoggedIn(),g.onLoginSuccess(async()=>{var p,m;const y=await((m=(p=this.nylasSchedulerConfigConnector)==null?void 0:p.schedulerConfig)==null?void 0:m.currentUser());if(y){const S=this.loggedIn.emit(this.host);"loggedIn"in this.eventOverrides&&await this.eventOverrides.loggedIn(S,this.nylasSchedulerConfigConnector),S.defaultPrevented||await this.loggedInHandler(y)}}),g.onLoginFail(async()=>{var p,m;(m=(p=this.stores)==null?void 0:p.schedulerConfig)==null||m.set("currentUser",null);const y=this.loggedOut.emit(this.host);"loggedOut"in this.eventOverrides&&(await this.eventOverrides.loggedOut(y,this.nylasSchedulerConfigConnector),y.defaultPrevented)}),this.nylasApiRequest=new index.NylasIdentityRequestWrapper(g)}this.nylasApiRequest&&this.defaultAuthArgs&&this.nylasApiRequest.setDefaultAuthArgs(this.defaultAuthArgs),this.baseProvider=new abstractProvider97cdbfea.NylasBaseProvider(this.host,this.stores,this.automaticComponentRegistration,this.eventOverrides);const t=this.baseProvider.getStore("schedulerConfig");this.nylasSchedulerConfigConnector=new NylasSchedulerConfigConnector({nylasApiRequest:this.nylasApiRequest,nylasSchedulerConfigStore:t});const n=this.init.emit(this.host);if("init"in this.eventOverrides&&await this.eventOverrides.init(n,this.nylasSchedulerConfigConnector),!n.defaultPrevented){const g=await((d=(a=this.nylasSchedulerConfigConnector)==null?void 0:a.schedulerConfig)==null?void 0:d.currentUser());if(g){const y=this.loggedIn.emit(this.host);"loggedIn"in this.eventOverrides&&await this.eventOverrides.loggedIn(y,this.nylasSchedulerConfigConnector),y.defaultPrevented||await this.loggedInHandler(g)}else{(l=(c=this.stores)==null?void 0:c.schedulerConfig)==null||l.set("currentUser",null);const y=this.loggedOut.emit(this.host);if("loggedOut"in this.eventOverrides&&(await this.eventOverrides.loggedOut(y,this.nylasSchedulerConfigConnector),y.defaultPrevented))return}}(u=(h=this.stores)==null?void 0:h.schedulerConfig)==null||u.onChange("selectedConfiguration",async g=>{g&&g.id&&(this.configurationId=g.id)}),(f=this.baseProvider)==null||f.componentWillLoad(this.nylasSchedulerConfigConnector)}async componentDidLoad(){var r;index.debug("[nylas-scheduler-editor] componentDidLoad"),await((r=this.baseProvider)==null?void 0:r.componentDidLoad()),this.updateLocalization(this.localization),this.version="2.0.4"}async componentDisconnected(){var r;await((r=this.baseProvider)==null?void 0:r.componentDisconnected())}async configurationIdChanged(r){var t,n,s,a,d,c,l,h;r?(await((n=(t=this.nylasSchedulerConfigConnector)==null?void 0:t.schedulerConfig)==null?void 0:n.getConfigurationById(r)),(a=(s=this.stores)==null?void 0:s.schedulerConfig)==null||a.set("action","edit")):((c=(d=this.stores)==null?void 0:d.schedulerConfig)==null||c.set("selectedConfiguration",{}),(h=(l=this.stores)==null?void 0:l.schedulerConfig)==null||h.set("action",null))}updateLocalization(r){r&&(Object.keys(r).forEach(t=>{t in constantsF51538ef.LANGUAGE_CODE&&index.instance.addResourceBundle(t,"translation",r[t],!1,!0)}),this.langVersion++)}updateNylasBranding(r){var t,n;(n=(t=this.stores)==null?void 0:t.schedulerConfig)==null||n.set("nylasBranding",r)}updateExperimentalFeatures(r){var t,n;(n=(t=this.stores)==null?void 0:t.schedulerConfig)==null||n.set("experimentalFeatures",r)}updateEnableEventTypes(r){var t,n;(n=(t=this.stores)==null?void 0:t.schedulerConfig)==null||n.set("enableEventTypes",r)}async store(){var r;return(r=this.stores)==null?void 0:r.schedulerConfig}async schedulerConnector(){return this.nylasSchedulerConfigConnector}async registerComponentHandler(r){var t;(t=this.baseProvider)==null||t.registerComponent(r.detail)}async unregisterComponentHandler(r){var t;(t=this.baseProvider)==null||t.unregisterComponent(r.detail)}nylasFormDropdownChangedHandler(r){var s,a;const{name:t,value:n}=r.detail;t==="language"&&(this.selectedLanguage=constantsF51538ef.LANGUAGE_CODE[n],index.instance.changeLanguage(this.selectedLanguage),(a=(s=this.stores)==null?void 0:s.schedulerConfig)==null||a.set("selectedLanguage",this.selectedLanguage))}async loggedInHandler(r){var t,n,s,a,d,c,l;if((n=(t=this.stores)==null?void 0:t.schedulerConfig)==null||n.set("currentUser",r),!!this.nylasSchedulerConfigConnector&&(await((s=this.nylasSchedulerConfigConnector.schedulerConfig)==null?void 0:s.getCalendars()),this.configurationId)){const h=await((a=this.nylasSchedulerConfigConnector.schedulerConfig)==null?void 0:a.getConfigurationById(this.configurationId));h&&((d=h[0])!=null&&d.id)&&((l=(c=this.stores)==null?void 0:c.schedulerConfig)==null||l.set("action","edit"))}}render(){var a,d,c,l,h,u,f,g,y,p,m,S,_,v,R,T,O,P,N,k,A,x,b,U,w,L,$,X,j,z,Y,M,V,J,W,Z,Q,ee,te,ne,se,ie,re,oe;const r=this.host.querySelector('[slot="custom-page-style-inputs"]'),t=(c=(d=(a=this.stores)==null?void 0:a.schedulerConfig)==null?void 0:d.state.selectedConfiguration)==null?void 0:c.id,n=Object.keys(constantsF51538ef.LANGUAGE_MAP).map(q=>({label:constantsF51538ef.LANGUAGE_MAP[q],value:q})),s=((h=(l=this.stores)==null?void 0:l.schedulerConfig)==null?void 0:h.state.selectedEventType)===constantsF51538ef.CONFIGURATION_EVENT_TYPE.group||((g=(f=(u=this.stores)==null?void 0:u.schedulerConfig)==null?void 0:f.state.selectedConfiguration)==null?void 0:g.type)===constantsF51538ef.CONFIGURATION_EVENT_TYPE.group;return index.h(index.Host,{key:"f2ff98b69f59cf94f68e0a72750db304d5f5781c"},index.h("div",{key:"382bac7a0ba7735ce0c6704f825d8a18a3faf412",class:"scheduler-editor-header",part:"nse__header"},index.h("h1",{key:"eb011947ed70b8f7b2bd73a1d57c8de743782acd",class:"scheduler-editor-title",part:"nse__title"},index.h("calendar-icon",{key:"d6a3bdf5d3c7501e865c363a58cbfd78b9ee10b1",width:"18",height:"18"}),index.instance.t("schedulerEditorTitle"),index.h("tooltip-component",{key:"d2cde09b0b5ac91a306d81dba57838ce373cda92"},index.h("info-icon",{key:"af00e8fa6ca5ef8baaaf5a9abdf14a7138b030fd",slot:"tooltip-icon"}),index.h("span",{key:"24a185bac54f44abf7ffe9bf3cd2723dc363a12f",slot:"tooltip-content"},this.version))),index.h("div",{key:"6fdf10c991b049d0a96a09faddf056de7b80a1de",class:{language:!0},part:"nse__language"},index.h("select-dropdown",{key:"d733d65ad4fd639f94b5fde41ae32725949fe429",name:"language",searchPlaceholder:index.instance.t("search"),options:n,withChevron:!1,defaultSelectedOption:n.find(q=>q.value==this.selectedLanguage),exportparts:"sd_dropdown: nse__language-dropdown, sd_dropdown-button: nse__language-drop-button, sd_dropdown-content: nse__language-drop-content, sd_dropdown_label: nse__language-drop-label"},index.h("span",{key:"9ae3abafd8aa09ec54f70c9d950eb1569eff6870",slot:"select-icon"},index.h("translate-icon",{key:"e435ec08d11c784caca91cf97887e261409b559b",width:"20",height:"20"})))),index.h("button",{key:"2bd03fa6333f11f3da17f8ce1db6516a4f936a6f",class:"scheduler-editor-close",title:"logout",onClick:q=>this.handleSchedulerConfigCloseClicked(q),part:"nse__close-button"},index.h("close-icon",{key:"b7e1ab191b7bfd4c892e101c5662ebeb42ad67a2",width:"18",height:"18"}))),index.h("div",{key:"3a19a2dde27979aa7428a388e68b9eb8c8d266a2",class:{"scheduler-editor-content":!0,"scheduler-editor-content--group":s},part:"nse__content"},((p=(y=this.stores)==null?void 0:y.schedulerConfig)==null?void 0:p.state.currentUser)&&this.stores.schedulerConfig.state.action===null&&index.h("div",{class:"list-configurations",part:"nse__list-configurations"},index.h("nylas-list-configurations",{exportparts:"nlc__create-new-cta, actions__dropdown, actions__dropdown-button, actions__dropdown-content, actions-Copy, actions-Preview, actions-Delete"})),((S=(m=this.stores)==null?void 0:m.schedulerConfig)==null?void 0:S.state.currentUser)&&this.stores.schedulerConfig.state.action==="create-select"&&index.h("nylas-select-event-type",null),((v=(_=this.stores)==null?void 0:_.schedulerConfig)==null?void 0:v.state.currentUser)&&this.stores.schedulerConfig.state.action==="create"&&s&&index.h("nylas-editor-tabs-group",{mode:"composable"},index.h(ExpressFlow,{selectedEventType:((O=(T=(R=this.stores)==null?void 0:R.schedulerConfig)==null?void 0:T.state)==null?void 0:O.selectedEventType)||constantsF51538ef.CONFIGURATION_EVENT_TYPE.one_on_one,currentUser:(N=(P=this.stores)==null?void 0:P.schedulerConfig)==null?void 0:N.state.currentUser,calendars:(x=(A=(k=this.stores)==null?void 0:k.schedulerConfig)==null?void 0:A.state)==null?void 0:x.calendars,selectedConfiguration:(w=(U=(b=this.stores)==null?void 0:b.schedulerConfig)==null?void 0:U.state)==null?void 0:w.selectedConfiguration})),(($=(L=this.stores)==null?void 0:L.schedulerConfig)==null?void 0:$.state.currentUser)&&this.stores.schedulerConfig.state.action==="create"&&!s&&index.h("nylas-editor-tabs",{mode:"composable"},index.h(ExpressFlow,{selectedEventType:((z=(j=(X=this.stores)==null?void 0:X.schedulerConfig)==null?void 0:j.state)==null?void 0:z.selectedEventType)||constantsF51538ef.CONFIGURATION_EVENT_TYPE.one_on_one,currentUser:(M=(Y=this.stores)==null?void 0:Y.schedulerConfig)==null?void 0:M.state.currentUser,calendars:(W=(J=(V=this.stores)==null?void 0:V.schedulerConfig)==null?void 0:J.state)==null?void 0:W.calendars,selectedConfiguration:(ee=(Q=(Z=this.stores)==null?void 0:Z.schedulerConfig)==null?void 0:Q.state)==null?void 0:ee.selectedConfiguration})),((ne=(te=this.stores)==null?void 0:te.schedulerConfig)==null?void 0:ne.state.currentUser)&&this.stores.schedulerConfig.state.action==="edit"&&s&&index.h("nylas-editor-tabs-group",{key:t,mode:this.mode},this.mode==="composable"&&index.h("slot",null),this.mode==="app"&&r&&index.h("div",{style:{display:"none"},slot:"custom-page-style-inputs",key:t},index.h("slot",{name:"custom-page-style-inputs"}))),((ie=(se=this.stores)==null?void 0:se.schedulerConfig)==null?void 0:ie.state.currentUser)&&this.stores.schedulerConfig.state.action==="edit"&&!s&&index.h("nylas-editor-tabs",{key:t,mode:this.mode},this.mode==="composable"&&index.h("slot",null),this.mode==="app"&&r&&index.h("div",{style:{display:"none"},slot:"custom-page-style-inputs",key:t},index.h("slot",{name:"custom-page-style-inputs"}))),!((oe=(re=this.stores)==null?void 0:re.schedulerConfig)!=null&&oe.state.currentUser)&&index.h("slot",{name:"login-required"},index.h(LoginRequired,{authenticationUrl:this.authenticationUrl}))))}get host(){return index.getElement(this)}static get watchers(){return{configurationId:["configurationIdChanged"],localization:["updateLocalization"],nylasBranding:["updateNylasBranding"],experimentalFeatures:["updateExperimentalFeatures"],enableEventTypes:["updateEnableEventTypes"]}}};NylasSchedulerEditor.style=NylasSchedulerEditorStyle0;exports.nylas_scheduler_editor=NylasSchedulerEditor;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-e9dc7971.cjs"),X=require("./abstract-provider-97cdbfea-5837e17f.cjs"),x=require("./feedbackSync-3db3713c-701d2eb9.cjs"),U=require("./index.es-9e756df7-fa75b01e.cjs"),A=require("./constants-f51538ef-cd2a67c4.cjs");require("react");require("react/jsx-runtime");require("react-dom");class Z{constructor(){this.component=e=>{const n=x.ErrorCategory.Component,o=`${e} Error`;return{endtime_not_in_future:(i='"endtime" can not be in the future')=>({title:o,message:i,category:n}),no_booking_info:(i="No booking info provided")=>({title:o,message:i,category:n}),no_timeslot_selected:(i="No timeslot selected")=>({title:o,message:i,category:n}),no_timezone_selected:(i="No timezone selected")=>({title:o,message:i,category:n}),no_booking_id:(i="No booking id provided")=>({title:o,message:i,category:n}),no_salt:(i="No salt provided")=>({title:o,message:i,category:n}),invalid_start_time:(i="Invalid start time")=>({title:o,message:i,category:n}),invalid_end_time:(i="Invalid end time")=>({title:o,message:i,category:n}),invalid_timezone:(i="Invalid timezone")=>({title:o,message:i,category:n}),no_config_id:(i="No configuration id provided")=>({title:o,message:i,category:n})}},this.api=e=>{const n=x.ErrorCategory.Api,o=`${e} Error`;return{invalid_session:i=>({title:o,message:i,category:n}),general_error:i=>({title:o,message:i,category:n}),internal_error:i=>({title:o,message:i,category:n}),invalid_request_error:i=>({title:o,message:i,category:n}),timeslot_not_available:i=>({title:o,message:i,category:n}),provider_error:i=>({title:o,message:i,category:n}),not_found_error:i=>({title:o,message:i,category:n})}}}}class K{constructor({schedulerAPIURL:e,schedulerStore:n,sessionId:o,configId:i,slug:a,clientId:r}){this.errors=new Z,this.schedulerStore=n,this.schedulerAPIURL=e,this.sessionId=o,this.configId=i,this.slug=a,this.clientId=r}getHeaders(){return this.sessionId?{Authorization:`Bearer ${this.sessionId}`}:{}}async makeAPIRequest(e,n,o,i={}){try{const a=new URL(this.schedulerAPIURL),r="2.0.4";return a.pathname=e,await(await fetch(decodeURIComponent(a.toString()),{method:n,headers:{"Content-Type":"application/json",Origin:window.location.origin,"X-Source":"nylas-scheduling","X-Nylas-Web-Elements-Version":r,...this.clientId&&{"X-Nylas-Application-Public-Id":this.clientId},...i},body:o})).json()}catch(a){return{error:{message:a.message,title:"API request failed",type:"api"}}}}getErrorMessage(e){var o,i,a,r;let n=(e==null?void 0:e.message)||(e==null?void 0:e.title)||"Something went wrong";return(e==null?void 0:e.type)==="provider_error"&&(n=((i=(o=e==null?void 0:e.provider_error)==null?void 0:o.error)==null?void 0:i.message)||((r=(a=e==null?void 0:e.provider_error)==null?void 0:a.error)==null?void 0:r.title)||"Something went wrong"),n}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),t.instance.changeLanguage(e)}async toggleAdditionalData(e){e||await this.refetchAvailability(),this.schedulerStore.set("showBookingForm",e)}setParticipantName(e){const{bookingInfo:n}=this.schedulerStore.state;this.schedulerStore.set("bookingInfo",{...n,primaryParticipant:{...n==null?void 0:n.primaryParticipant,name:e}})}setParticipantEmail(e){const{bookingInfo:n}=this.schedulerStore.state;this.schedulerStore.set("bookingInfo",{...n,primaryParticipant:{...n==null?void 0:n.primaryParticipant,email:e}})}async refetchAvailability(){const e=new Date,n=new Date(e.getFullYear(),e.getMonth(),1).getTime()/1e3,o=n<e.getTime()/1e3?Math.floor(e.getTime()/1e3):n,i=new Date(e.getFullYear(),e.getMonth()+1,1).getTime()/1e3;return await this.getAvailability(o,i)}async resetStoreStateAndFetchAvailability(){const e=new Date,n=await this.refetchAvailability(),o=this.schedulerStore.get("availability").find(a=>new Date(a.start_time)>new Date);let i=e;return o&&(i=o.start_time),this.schedulerStore.set("selectedDate",i),this.schedulerStore.set("eventInfo",null),this.schedulerStore.set("showBookingForm",!1),this.schedulerStore.set("selectedTimeslot",null),n}async setReschedule(e){this.schedulerStore.set("isLoading",!0);const n=this.schedulerStore.state.eventInfo;return n&&this.schedulerStore.set("reschedulingEventInfo",n),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 E,I,B;this.schedulerStore.set("isLoading",!0);const{selectedTimeslot:n,selectedTimezone:o,bookingInfo:i,selectedLanguage:a}=this.schedulerStore.state;if(!e&&!i)return{error:this.errors.component(t.instance.t("createBookingErrorTitle")).no_booking_info()};const r=(e==null?void 0:e.timeslot)||n;if(!r)return{error:this.errors.component(t.instance.t("createBookingErrorTitle")).no_timeslot_selected()};const l=e&&(e!=null&&e.timezone)?e==null?void 0:e.timezone:o,d=a||"en-US";if(!l)return{error:this.errors.component(t.instance.t("createBookingErrorTitle")).no_timezone_selected()};const p=[...this.schedulerStore.get("availabilityOrderEmails")];let c="";const h=(r==null?void 0:r.emails)||[],u={};Object.entries((i==null?void 0:i.additionalFields)||{}).forEach(([_,L])=>{u[_]=L.value});const b=e?e==null?void 0:e.primaryParticipant:i==null?void 0:i.primaryParticipant,f=e?(e==null?void 0:e.guests)||[]:(i==null?void 0:i.guests)||[],y=e?e==null?void 0:e.additionalFields:u,m=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(p.length===0){const _=await this.makeAPIRequest(decodeURIComponent(k),"POST",JSON.stringify({additional_fields:y,additional_guests:f,guest:{...b},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(d)}),m);return this.schedulerStore.set("isLoading",!1),"data"in _?(this.schedulerStore.set("eventInfo",_.data),_):{error:_.error}}for(;p.length>0;){if(c=p.shift(),!h.includes(c))continue;const _=await this.makeAPIRequest(decodeURIComponent(k),"POST",JSON.stringify({participants:c?[{email:c}]:void 0,additional_fields:y,additional_guests:f,guest:{...b},start_time:r.start_time.getTime()/1e3,end_time:r.end_time.getTime()/1e3,timezone:l,email_language:this.getTwoLetterLanguageCode(d)}),m);if("data"in _)return this.schedulerStore.set("isLoading",!1),this.schedulerStore.set("eventInfo",_==null?void 0:_.data),_;if((I=(E=_.error)==null?void 0:E.message)!=null&&I.startsWith("The selected timeslot is unavailable"))continue;{this.schedulerStore.set("isLoading",!1);const L=(B=_.error)==null?void 0:B.type;let F=_.error;if(L&&L in this.errors.api(t.instance.t("createBookingErrorTitle"))){const R=this.getErrorMessage(F);F=this.errors.api(t.instance.t("createBookingErrorTitle"))[L](R)}return{error:F}}}return this.schedulerStore.set("isLoading",!1),{error:this.errors.api(t.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"),n=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 i=`/v3/scheduling/ui-settings${o}`,a=await this.makeAPIRequest(i,"GET",void 0,n);if("error"in a){this.schedulerStore.set("isLoading",!1);const l=(r=a.error)==null?void 0:r.type;let d=a.error;return l&&l in this.errors.api(t.instance.t("getUISettingErrorTitle"))&&(d=this.errors.api(t.instance.t("getUISettingErrorTitle"))[l]((d==null?void 0:d.message)||(d==null?void 0:d.title)||"Something went wrong")),{error:d}}return"data"in a&&(this.schedulerStore.set("configSettings",a.data),this.clientId=a.data.app_client_id||this.clientId),this.schedulerStore.set("isLoading",!1),a}getTwoLetterLanguageCode(e){return e.split("-")[0]}getStartTimeWithMinBookingNotice(e){var a;const n=(a=this.schedulerStore.get("configSettings"))==null?void 0:a.scheduler,o=n==null?void 0:n.min_booking_notice;if(!o)return e;const i=new Date().getTime();return e<(i+o*60*1e3)/1e3?Math.floor((i+o*60*1e3)/1e3):e}getEndTimeForAvailableDaysInFuture(e){var r,l;const n=new Date,o=(l=(r=this.schedulerStore.get("configSettings"))==null?void 0:r.scheduler)==null?void 0:l.available_days_in_future,i=Math.floor(t.addDaysToCurrentDate(n,o).getTime()/1e3);return Math.min(i,e)}async getAvailability(e=0,n=0){var u,b,f,y;this.schedulerStore.set("isLoading",!0);const o=new URLSearchParams,i=new Date,a=i.getTime();if(n&&n<a/1e3)return this.schedulerStore.set("isLoading",!1),{error:this.errors.component(t.instance.t("getAvailabilityErrorTitle")).endtime_not_in_future()};if(!e){const m=new Date(i.getFullYear(),i.getMonth(),1);e=Math.floor(m.getTime()/1e3)}if(!n){const m=new Date(i.getFullYear(),i.getMonth()+1,0);n=Math.floor(m.getTime()/1e3)}n=this.getEndTimeForAvailableDaysInFuture(n);const r=this.getStartTimeWithMinBookingNotice(e);e=r,n=r>n?r+1:n,o.append("start_time",encodeURIComponent(e.toString())),o.append("end_time",encodeURIComponent(n.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 d=o.toString(),p=`/v3/scheduling/availability${d?`?${d}`:""}`,c=this.getHeaders(),h=await this.makeAPIRequest(decodeURIComponent(p),"GET",void 0,c);if("error"in h){this.schedulerStore.set("availability",[]),this.schedulerStore.set("isLoading",!1);const m=(u=h.error)==null?void 0:u.type;let v=h.error;if(m&&m in this.errors.api(t.instance.t("getAvailabilityErrorTitle"))){const k=this.getErrorMessage(v);v=this.errors.api(t.instance.t("getAvailabilityErrorTitle"))[m](k)}return{error:v}}if("data"in h){const k=(((f=(b=h.data)==null?void 0:b.time_slots)==null?void 0:f.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 E=((y=h.data)==null?void 0:y.order)||[];this.schedulerStore.set("availabilityOrderEmails",E)}return this.schedulerStore.set("isLoading",!1),h}async cancelBooking(e,n){var l;if(this.schedulerStore.set("isLoading",!0),!e)return{error:this.errors.component(t.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}`:"",i=`/v3/scheduling/bookings/${e}${o}`,a=this.getHeaders(),r=await this.makeAPIRequest(decodeURIComponent(i),"DELETE",JSON.stringify({action:"cancel",cancellation_reason:n}),a);if("error"in r){this.schedulerStore.set("isLoading",!1);const d=(l=r.error)==null?void 0:l.type;let p=r.error;if(d&&d in this.errors.api(t.instance.t("cancelBookingErrorTitle"))){const c=this.getErrorMessage(p);p=this.errors.api(t.instance.t("cancelBookingErrorTitle"))[d](c)}return{error:p}}return this.schedulerStore.set("cancelledEventInfo",{booking_id:e}),this.schedulerStore.set("rescheduleBookingId",""),this.schedulerStore.set("isLoading",!1),r}async rescheduleBooking(e,n){var P;if(this.schedulerStore.set("isLoading",!0),!e)return{error:this.errors.component(t.instance.t("rescheduleBookingErrorTitle")).no_booking_id()};const o=this.errors.api(t.instance.t("rescheduleBookingErrorTitle")),i=this.errors.component(t.instance.t("rescheduleBookingErrorTitle")),{bookingInfo:a,selectedTimeslot:r,selectedTimezone:l,selectedLanguage:d}=this.schedulerStore.state,{startTime:p,endTime:c,timezone:h}=n,u=p||(r==null?void 0:r.start_time);if(!u)return{error:i.invalid_start_time('Please pass "startTime" in data or set "selectedTimeslot" in the defaultSchedulerState.')};const b=c||(r==null?void 0:r.end_time);if(!b)return{error:i.invalid_end_time('Please pass "endTime" in data or set "selectedTimeslot" in the defaultSchedulerState.')};const f=this.schedulerStore.get("availabilityOrderEmails");let y="";if(f.length>0){const S=(r==null?void 0:r.emails)||[];for(let w=0;w<f.length;w++)if(S.includes(f[w])){y=f[w];break}}const m=h||l;if(!m)return{error:i.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,E=(r==null?void 0:r.calendar_id)||void 0,I={};Object.entries((a==null?void 0:a.additionalFields)||{}).forEach(([S,w])=>{I[S]=w.value});const B=n?n==null?void 0:n.primaryParticipant:a==null?void 0:a.primaryParticipant,_=n?(n==null?void 0:n.guests)||[]:(a==null?void 0:a.guests)||[],L=n?n==null?void 0:n.additionalFields:I,F=!this.sessionId&&this.configId?`?configuration_id=${this.configId}`:!this.sessionId&&this.slug&&this.clientId?`?slug=${this.slug}&client_id=${this.clientId}`:"",R=`/v3/scheduling/bookings/${e}${F}`,M=this.getHeaders(),T=await this.makeAPIRequest(decodeURIComponent(R),"PATCH",JSON.stringify({start_time:u.getTime()/1e3,end_time:b.getTime()/1e3,timezone:m,additional_fields:L,guest:{...B},additional_guests:_,participants:y?[{email:y}]:void 0,email_language:this.getTwoLetterLanguageCode(d),event_id:v,master_id:k,calendar_id:E}),M);if("error"in T){this.schedulerStore.set("isLoading",!1);const S=(P=T.error)==null?void 0:P.type;let w=T.error;if(S&&S in o){const D=this.getErrorMessage(w);w=o[S](D)}return{error:w}}const g=this.schedulerStore.get("reschedulingEventInfo");if("data"in T)this.schedulerStore.set("eventInfo",T==null?void 0:T.data);else if(g)this.schedulerStore.set("eventInfo",g);else{const S={booking_id:e};this.schedulerStore.set("eventInfo",S)}return this.schedulerStore.set("isLoading",!1),T}async updateBooking(e){var h;this.schedulerStore.set("isLoading",!0);const{bookingId:n,status:o,reason:i}=e,a=this.schedulerStore.get("organizerConfirmationSalt"),r=o==="confirmed"?t.instance.t("confirmBookingErrorTitle"):t.instance.t("rejectBookingErrorTitle");if(!n)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}`:"",d=`/v3/scheduling/bookings/${n}${l}`,p=this.getHeaders(),c=await this.makeAPIRequest(decodeURIComponent(d),"PUT",JSON.stringify({status:o,cancellation_reason:i,salt:a}),p);if("error"in c){this.schedulerStore.set("isLoading",!1);const u=(h=c.error)==null?void 0:h.type;let b=c.error;if(u&&u in this.errors.api(r)){const f=this.getErrorMessage(b);b=this.errors.api(r)[u](f)}return{error:b}}return"data"in c&&o==="confirmed"?this.schedulerStore.set("confirmedEventInfo",c==null?void 0:c.data):"request_id"in c&&o==="cancelled"&&this.schedulerStore.set("cancelledEventInfo",{booking_id:n}),this.schedulerStore.set("organizerConfirmationBookingId",""),this.schedulerStore.set("isLoading",!1),c}async validateGroupEventTimeslot(e){var r,l;this.schedulerStore.set("isLoading",!0);const n=(r=this.schedulerStore.get("configSettings"))==null?void 0:r.configuration_id;if(!n)return{error:this.errors.component(t.instance.t("validateTimeslotErrorTitle")).no_config_id()};const o=this.getHeaders(),i=`/v3/scheduling/configurations/${n}/group-events/validate-timeslot`,a=await this.makeAPIRequest(decodeURIComponent(i),"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 d=(l=a.error)==null?void 0:l.type;let p=a.error;if(d&&d in this.errors.api(t.instance.t("validateTimeslotErrorTitle"))){const c=this.getErrorMessage(p);p=this.errors.api(t.instance.t("validateTimeslotErrorTitle"))[d](c)}return this.refetchAvailability(),{error:p}}return this.schedulerStore.set("selectedTimeslot",e),this.schedulerStore.set("showBookingForm",!0),this.schedulerStore.set("isLoading",!1),a}}class Q{constructor({schedulerAPIURL:e,nylasSchedulerStore:n,sessionId:o,configId:i,slug:a,clientId:r}){if(!e)throw new Error("schedulerAPIURL is required");if(!n)throw new Error("nylasSchedulerStore is required");if(!o&&!i&&!(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=i,this.sessionId=o,this.schedulerAPIURL=e,this.nylasSchedulerStore=n,this.slug=a,this.clientId=r}init(){t.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(s={}){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,...s};t.debug("[defaultNylasStoreState]: ",e);const n=t.createStore(e);return n.onChange("availability",o=>{t.debug("[availability]: ",o);const i=o.map(l=>l.start_time);t.debug("[selectableDates]: ",i),n.set("selectableDates",i);const a=o[0];if(!a)return;const r=Math.floor((a.end_time.getTime()-a.start_time.getTime())/6e4);t.debug("[durationMinutes]: ",r),n.set("eventDuration",r)}),n.reset=()=>{for(const o in e){const i=e[o];n.set(o,i)}},n}const O=(s,e)=>{const n=s.isLoading,o=s.showNotification,i=s.nylasBranding,a=s.version;return t.h(t.Fragment,null,o&&t.h("nylas-notification",null),n&&t.h("div",{class:"loading"},t.h("div",{class:"left"},t.h("div",{class:"skeleton"})),t.h("div",{class:"right"},t.h("div",{class:"skeleton"}),t.h("div",{class:"skeleton"}),t.h("div",{class:"skeleton"}),t.h("div",{class:"skeleton"}),t.h("div",{class:"skeleton"}))),!n&&e,t.h("div",{class:"footer"},i&&t.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 ",t.h("span",{class:"sr-only"},"Nylas"),t.h("nylas-logo",{"aria-hidden":!0})),t.h("tooltip-component",null,t.h("info-icon",{slot:"tooltip-icon"}),t.h("span",{slot:"tooltip-content"},a))))},W=(s,e)=>t.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-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;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;gap:8px;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}.language-feedback-container{width:auto;position:absolute;bottom:4px;left:16px;display:flex;gap:8px;align-items:center}.language-feedback-container button-component#report-issue{position:initial}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:t.instance.t("genericErrorTitle"),type:U.nr.Error,category:x.ErrorCategory.Component},J=class{constructor(s){t.registerInstance(this,s),this.init=t.createEvent(this,"init",7),this.schedulerWillLoad=t.createEvent(this,"schedulerWillLoad",7),this.schedulerDidLoad=t.createEvent(this,"schedulerDidLoad",7),this.nylasSchedulerError=t.createEvent(this,"nylasSchedulerError",7),this.nylasSchedulerInfo=t.createEvent(this,"nylasSchedulerInfo",7),this.configSettingsLoaded=t.createEvent(this,"configSettingsLoaded",7),this.bookingRefExtracted=t.createEvent(this,"bookingRefExtracted",7),this.bookedEventInfo=t.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.defaultLanguage=void 0,this.showNotification=!0,this.enableUserFeedback=!0,this.hour12=void 0,this.automaticComponentRegistration=!0,this.selectedDateLabel=new Date().toLocaleDateString(navigator.language,{dateStyle:"full"})||`${t.instance.t("noDateSelected")}`,this.refConfigId=void 0,this.language=navigator.language,this.showFeedbackModal=!1,this.bookingInfoConfirmed=null,this.version="2.0.4"}connectedCallback(){t.debug("[nylas-scheduler] connectedCallback")}async componentWillLoad(){var l,d,p;t.debug("[nylas-scheduler] Component will load"),this.version="2.0.4",this.enableUserFeedback&&!x.isInitialized()&&x.init({dsn:"https://9d5731f1c77ca84c9ed3fb9b3ccf7ee1@o74852.ingest.us.sentry.io/4507889638178816",release:this.version,integrations:c=>[...c.filter(h=>!1),x.feedbackSyncIntegration({colorScheme:"system",autoInject:!1})],autoSessionTracking:!1,beforeSend:()=>null});const s=this.schedulerWillLoad.emit(this.host);if("schedulerWillLoad"in this.eventOverrides&&(await this.eventOverrides.schedulerWillLoad(s,this.nylasSchedulerConnector),s.defaultPrevented))return;const n=new URLSearchParams(window.location.search).get("lang"),o=n&&Object.values(A.LANGUAGE_CODE).includes(n)?n:null;this.stores={scheduler:V({bookingInfo:this.bookingInfo,nylasBranding:this.nylasBranding,themeConfig:this.themeConfig,hour12:this.hour12,selectedLanguage:o||this.defaultLanguage||((l=this.bookingInfo)==null?void 0:l.language)||A.LANGUAGE_CODE.en,...this.defaultSchedulerState})},this.baseProvider=new X.NylasBaseProvider(this.host,this.stores,this.automaticComponentRegistration,this.eventOverrides),this.refConfigId=this.configurationId;let i;if(this.rescheduleBookingRef){const[c,h,u]=t.compactStringToUUIDs(this.rescheduleBookingRef);this.refConfigId=c,this.stores.scheduler.set("rescheduleBookingId",h),i=this.bookingRefExtracted.emit({configurationId:c,bookingId:h})}else if(this.cancelBookingRef){const[c,h,u]=t.compactStringToUUIDs(this.cancelBookingRef);this.refConfigId=c,this.stores.scheduler.set("cancelBookingId",h),i=this.bookingRefExtracted.emit({configurationId:c,bookingId:h})}else if(this.organizerConfirmationBookingRef){const[c,h,u]=t.compactStringToUUIDs(this.organizerConfirmationBookingRef);this.refConfigId=c,this.stores.scheduler.set("organizerConfirmationBookingId",h),this.stores.scheduler.set("organizerConfirmationSalt",u),i=this.bookingRefExtracted.emit({configurationId:c,bookingId:h,salt:u})}if("bookingRefExtracted"in this.eventOverrides&&(await this.eventOverrides.bookingRefExtracted(i,this.nylasSchedulerConnector),i.defaultPrevented)||!this.checkIfSessionIdOrConfigIdExists())return;const a=(d=this.baseProvider)==null?void 0:d.getStore("scheduler");this.nylasSchedulerConnector=new Q({schedulerAPIURL:this.schedulerApiUrl,sessionId:this.sessionId,configId:this.refConfigId,slug:this.slug,clientId:this.clientId,nylasSchedulerStore:a});const r=this.init.emit(this.host);"init"in this.eventOverrides&&(await this.eventOverrides.init(r,this.nylasSchedulerConnector),r.defaultPrevented)||((p=this.baseProvider)==null||p.componentWillLoad(this.nylasSchedulerConnector),this.applyThemeConfig(this.themeConfig))}async componentDidLoad(){var d,p,c,h,u,b,f,y;(d=this.baseProvider)==null||d.componentDidLoad();const s=this.schedulerDidLoad.emit(this.host);if("schedulerDidLoad"in this.eventOverrides&&(await this.eventOverrides.schedulerDidLoad(s,this.nylasSchedulerConnector),s.defaultPrevented)||!this.checkIfSessionIdOrConfigIdExists())return;this.localizationChanged(this.localization);const e=await((p=this.nylasSchedulerConnector)==null?void 0:p.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&&((c=e.data)!=null&&c.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 m=this.configSettingsLoaded.emit({settings:e});if("configSettingsLoaded"in this.eventOverrides&&(await this.eventOverrides.configSettingsLoaded(m,this.nylasSchedulerConnector),m.defaultPrevented))return}const n=(h=this.baseProvider)==null?void 0:h.getStore("scheduler"),o=(b=(u=n==null?void 0:n.get("configSettings"))==null?void 0:u.scheduler)==null?void 0:b.available_days_in_future,i=n==null?void 0:n.get("selectedTimeslot");if(i&&(i!=null&&i.start_time)){if(!this.isTimeslotValid(i))return;if(n!=null&&n.get("showBookingForm")){n==null||n.set("selectedDate",i.start_time);return}}const a=n==null?void 0:n.get("selectedDate"),r=n==null?void 0:n.get("availability");let l;if(!(r&&r.length>0)){if(a){const{startTime:m,endTime:v,endTimeForAvailableDaysInFuture:k}=this.validateAvailableDaysInFuture(a,o||30);a.getTime()<k*1e3&&(l=await((y=this.nylasSchedulerConnector)==null?void 0:y.scheduler.getAvailability(m,v)))}else{const m=new Date,{startTime:v,endTime:k,endTimeForAvailableDaysInFuture:E}=this.validateAvailableDaysInFuture(m,o||30);m.getTime()<E*1e3&&(l=await((f=this.nylasSchedulerConnector)==null?void 0:f.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 m=new Date;const v=n==null?void 0:n.get("availability").find(k=>new Date(k.start_time)>new Date);v&&(m=v.start_time),n==null||n.set("selectedDate",m)}}}componentDisconnected(){var s;(s=this.baseProvider)==null||s.componentDisconnected()}bookingInfoChanged(s){var e,n;(e=this.stores)==null||e.scheduler.set("bookingInfo",s),s!=null&&s.language&&!this.defaultLanguage&&((n=this.stores)==null||n.scheduler.set("selectedLanguage",s.language))}rescheduleBookingRefChanged(s){var e,n;if(s){const[o,i]=t.compactStringToUUIDs(s);(e=this.stores)==null||e.scheduler.set("rescheduleBookingId",i),this.refConfigId=o,(n=this.nylasSchedulerConnector)==null||n.scheduler.setConfigId(o)}}cancelBookingRefChanged(s){var e,n;if(s){const[o,i]=t.compactStringToUUIDs(s);(e=this.stores)==null||e.scheduler.set("cancelBookingId",i),this.refConfigId=o,(n=this.nylasSchedulerConnector)==null||n.scheduler.setConfigId(o)}}organizerConfirmationBookingRefChanged(s){var e,n;if(s){const[o,i]=t.compactStringToUUIDs(s);(e=this.stores)==null||e.scheduler.set("organizerConfirmationBookingId",i),this.refConfigId=o,(n=this.nylasSchedulerConnector)==null||n.scheduler.setConfigId(o)}}localizationChanged(s){s&&Object.keys(s).forEach(e=>{e in A.LANGUAGE_CODE&&t.instance.addResourceBundle(e,"translation",s[e],!1,!0)})}defaultLanguageChanged(s){var e;s&&((e=this.stores)==null||e.scheduler.set("selectedLanguage",s),t.instance.changeLanguage(s))}themeConfigChanged(s){var e,n;(n=(e=this.baseProvider)==null?void 0:e.getStore("scheduler"))==null||n.set("themeConfig",s),this.applyThemeConfig(s)}languageChanged(s){const e=s.detail;this.language=e,t.instance.changeLanguage(e)}async registerComponentHandler(s){var e;(e=this.baseProvider)==null||e.registerComponent(s.detail)}async unregisterComponentHandler(s){var e;(e=this.baseProvider)==null||e.unregisterComponent(s.detail)}async monthChangedHandler(s){var r,l,d,p,c,h,u;const e=s.detail,n=(p=(d=(l=(r=this.nylasSchedulerConnector)==null?void 0:r.schedulerStore)==null?void 0:l.get("configSettings"))==null?void 0:d.scheduler)==null?void 0:p.available_days_in_future,{startTime:o,endTime:i,endTimeForAvailableDaysInFuture:a}=this.validateAvailableDaysInFuture(e,n||30);if(!s.defaultPrevented&&o<a&&e.getTime()<a*1e3){const b=await((c=this.nylasSchedulerConnector)==null?void 0:c.scheduler.getAvailability(o,i));(!b||"error"in b)&&this.nylasSchedulerError.emit({notification:{...this.getErrorObject(b==null?void 0:b.error)},host:this.host});const f=(h=this.stores)==null?void 0:h.scheduler.get("selectableDates");f&&f.length>0&&((u=this.stores)==null||u.scheduler.set("selectedDate",f[0]))}}mapToBookingData(s){var r,l,d;const e=(r=this.stores)==null?void 0:r.scheduler.get("selectedTimeslot"),n=(l=this.stores)==null?void 0:l.scheduler.get("selectedLanguage"),o=(d=this.stores)==null?void 0:d.scheduler.get("selectedTimezone"),i=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:s.guests,guest:{...s.primaryParticipant},additional_fields:{...s.additionalFields},start_time:i,end_time:a,email_language:n,timezone:o}}async bookButtonClickedHandler(s){var d,p,c,h;if(s.defaultPrevented)return;const e=s.detail,n=this.mapToBookingData(e);this.bookingInfoConfirmed=e;const i=(p=(d=this.nylasSchedulerConnector)==null?void 0:d.schedulerStore)==null?void 0:p.get("rescheduleBookingId");if(i){const u=await((c=this.nylasSchedulerConnector)==null?void 0:c.scheduler.rescheduleBooking(i,e));(!u||"error"in u)&&this.nylasSchedulerError.emit({notification:{...this.getErrorObject(u==null?void 0:u.error)},host:this.host});const b=u==null?void 0:u.data,f=this.bookedEventInfo.emit({...u,data:{...b,...n}});this.bookingInfoConfirmed={...this.bookingInfoConfirmed,...b},"bookedEventInfo"in this.eventOverrides&&await this.eventOverrides.bookedEventInfo(f,this.nylasSchedulerConnector);return}const a=await((h=this.nylasSchedulerConnector)==null?void 0:h.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,...n}});this.bookingInfoConfirmed={...this.bookingInfoConfirmed,...r},"bookedEventInfo"in this.eventOverrides&&await this.eventOverrides.bookedEventInfo(l,this.nylasSchedulerConnector)}dateSelectedHandler(s){const e=s.detail;this.selectedDateLabel=e?e.toLocaleDateString(this.language,{dateStyle:"full"}):`${t.instance.t("noDateSelected")}`}cancelBookedEventErrorHandler(s){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(s.detail.error)},host:this.host})}cancelBookedEventValidationErrorHandler(s){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(s.detail.error)},host:this.host})}rescheduleBookedEventErrorHandler(s){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(s.detail.error)},host:this.host})}confirmBookingErrorHandler(s){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(s.detail.error)},host:this.host})}feedbackModalClosedHandler(){this.showFeedbackModal=!1}eventIsFullHandler(s){const e=s.detail.error;s.detail.type==="error"?this.nylasSchedulerError.emit({notification:{...this.getErrorObject({message:e})},host:this.host}):this.nylasSchedulerInfo.emit({notification:{title:"Event is full",category:x.ErrorCategory.Component,type:U.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(s){const n={eventId:x.captureMessage("Scheduling Page User Feedback",{extra:{configId:this.configurationId,slug:this.slug}}),message:s.detail.feedback};x.captureFeedback(n,{includeReplay:!0,captureContext:{tags:{"nylas-web-element":"nylas-scheduling","nylas-web-element-version":this.version,"nylas-config-id":this.configurationId,"nylas-slug":this.slug,"host-url":window.location.href},extra:{configId:this.configurationId,slug:this.slug,version:this.version}}}),this.showFeedbackModal=!1}async getNylasSchedulerStore(){var s;return(s=this.baseProvider)==null?void 0:s.getStore("scheduler")}async getNylasSchedulerConnector(){return this.nylasSchedulerConnector}async getRef(){return this.host}getErrorObject(s){return{title:(s==null?void 0:s.title)||G.title,category:(s==null?void 0:s.category)||G.category,type:U.nr.Error,description:(s==null?void 0:s.message)||"",id:new Date().getTime().toString(),ttl:"none"}}checkIfSessionIdOrConfigIdExists(){if(!this.sessionId&&!this.refConfigId&&!(this.slug&&this.clientId)){let s="";return this.sessionId||(s+=t.instance.t("sessionIdRequiredErrorMessage")),!this.sessionId&&!this.refConfigId&&!(this.slug&&this.clientId)&&(s=t.instance.t("sessionIdRequiredErrorMessage")+" "+t.instance.t("publicConfigErrorMessage")),this.nylasSchedulerError.emit({notification:{title:t.instance.t("schedulingComponentErrorTitle"),category:x.ErrorCategory.Component,type:U.nr.Error,description:s,id:new Date().getTime().toString(),ttl:"none"},host:this.host}),!1}return!0}isTimeslotValid(s){return new Date(s.start_time)<new Date?(this.nylasSchedulerError.emit({notification:{title:t.instance.t("invalidTimeslotErrorTitle"),category:x.ErrorCategory.Component,type:U.nr.Error,description:t.instance.t("invalidTimeslotErrorMessage"),id:new Date().getTime().toString(),ttl:"none"},host:this.host}),!1):!0}validateAvailableDaysInFuture(s,e){const n=new Date,o=new Date(s.getFullYear(),s.getMonth(),1).getTime()/1e3,i=new Date(s.getFullYear(),s.getMonth()+1,1).getTime()/1e3,a=Math.floor(t.addDaysToCurrentDate(n,e).getTime()/1e3),r=Math.min(a,i);return{startTime:o<n.getTime()/1e3?Math.floor(n.getTime()/1e3):o,endTime:r,endTimeForAvailableDaysInFuture:a}}applyThemeConfig(s){if(s)for(const[e,n]of Object.entries(s))this.host.style.setProperty(`${e}`,n)}onFeedbackClick(s){s.preventDefault(),this.showFeedbackModal=!0}redirectToCustomUrl(s){window.location.assign(s)}nylasFormDropdownChangedHandler(s){var o,i;const{name:e,value:n}=s.detail;if(e==="language"){const a=A.LANGUAGE_CODE[n];t.instance.changeLanguage(a),(i=(o=this.stores)==null?void 0:o.scheduler)==null||i.set("selectedLanguage",a)}}render(){var m,v,k,E,I,B,_,L,F,R,M,T;const s=this.mode==="app",e=(m=this.baseProvider)==null?void 0:m.getStore("scheduler"),n=e==null?void 0:e.get("eventInfo"),o=e==null?void 0:e.get("showBookingForm"),i=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"),d=e==null?void 0:e.get("organizerConfirmationBookingId"),p=e==null?void 0:e.get("rejectBookingId"),c=e==null?void 0:e.get("confirmedEventInfo"),h=(e==null?void 0:e.get("nylasBranding"))||this.nylasBranding,u=e==null?void 0:e.get("selectedDate"),b=(k=(v=e==null?void 0:e.get("configSettings"))==null?void 0:v.scheduler)==null?void 0:k.confirmation_redirect_url;this.selectedDateLabel=u&&this.language?t.capitalizeFirstLetter(u.toLocaleDateString(this.language,{dateStyle:"full"})):`${t.instance.t("noDateSelected")}`;const f=Object.keys(A.LANGUAGE_MAP).map(g=>({label:A.LANGUAGE_MAP[g],value:g})),y=(e==null?void 0:e.get("selectedLanguage"))||this.defaultLanguage||navigator.language||A.LANGUAGE_CODE.en;if(s&&(a||p)&&!i)return t.h(t.Host,null,t.h(O,{version:this.version,nylasBranding:h,isLoading:this.isLoading,showNotification:this.showNotification},t.h("div",{class:"cancel-flow-page",part:"cancel-flow-page"},t.h("nylas-cancel-booking-form",{selectedTimeslot:r,cancelBookingId:a,rejectBookingId:p,exportparts:"ncbf, ncbf__icon, ncbf__title, ncbf__description, ncbf__reason-textarea, ncbf__button-cta, ncbf__button-outline, ncbf__card"}))),t.h("div",{class:"language-feedback-container"},this.enableUserFeedback&&t.h("button-component",{id:"report-issue",variant:"basic",onClick:g=>this.onFeedbackClick(g)},t.h("feedback-icon",null)),t.h("select-dropdown",{name:"language",searchPlaceholder:t.instance.t("search"),options:f,withChevron:!1,defaultSelectedOption:f.find(g=>g.value==y),exportparts:"sd_dropdown: nse__language-dropdown, sd_dropdown-button: nse__language-drop-button, sd_dropdown-content: nse__language-drop-content, sd_dropdown_label: nse__language-drop-label"},t.h("span",{slot:"select-icon"},t.h("translate-icon",{width:"20",height:"20"})))),this.showFeedbackModal&&t.h("nylas-feedback-form",null));if(s&&d)return t.h(t.Host,null,t.h(O,null,t.h("div",{class:"manual-confirmation-page",part:"manual-confirmation-page"},t.h("nylas-organizer-confirmation-card",{organizerConfirmationBookingId:d,exportparts:"nmcc, nmcc__title, nmcc__description, nmcc__button-cta, nmcc__button-outline"}))),t.h("div",{class:"language-feedback-container"},this.enableUserFeedback&&t.h("button-component",{id:"report-issue",variant:"basic",onClick:g=>this.onFeedbackClick(g)},t.h("feedback-icon",null)),t.h("select-dropdown",{name:"language",searchPlaceholder:t.instance.t("search"),options:f,withChevron:!1,defaultSelectedOption:f.find(g=>g.value==y),exportparts:"sd_dropdown: nse__language-dropdown, sd_dropdown-button: nse__language-drop-button, sd_dropdown-content: nse__language-drop-content, sd_dropdown_label: nse__language-drop-label"},t.h("span",{slot:"select-icon"},t.h("translate-icon",{width:"20",height:"20"})))),this.showFeedbackModal&&t.h("nylas-feedback-form",null));if(s&&i)return t.h(t.Host,null,t.h(O,{version:this.version,nylasBranding:h,isLoading:this.isLoading,showNotification:this.showNotification},t.h("div",{class:"cancelled-event-page",part:"cancelled-event-page"},t.h("nylas-cancelled-event-card",{cancelledEventInfo:i,exportparts:"ncec, ncec__icon, ncec__title, ncec__description, ncec__button-outline, ncec__card"}))),t.h("div",{class:"language-feedback-container"},this.enableUserFeedback&&t.h("button-component",{id:"report-issue",variant:"basic",onClick:g=>this.onFeedbackClick(g)},t.h("feedback-icon",null)),t.h("select-dropdown",{name:"language",searchPlaceholder:t.instance.t("search"),options:f,withChevron:!1,defaultSelectedOption:f.find(g=>g.value==y),exportparts:"sd_dropdown: nse__language-dropdown, sd_dropdown-button: nse__language-drop-button, sd_dropdown-content: nse__language-drop-content, sd_dropdown_label: nse__language-drop-label"},t.h("span",{slot:"select-icon"},t.h("translate-icon",{width:"20",height:"20"})))),this.showFeedbackModal&&t.h("nylas-feedback-form",null));if(s&&c)return t.h(t.Host,null,t.h(O,{version:this.version,nylasBranding:h,isLoading:this.isLoading,showNotification:this.showNotification},t.h("div",{class:"cancelled-event-page",part:"confirmed-event-page"},t.h("nylas-confirmed-event-card",{confirmedEventInfo:c,exportparts:"ncec, ncec__icon, ncec__title, ncec__description, ncec__button-outline, ncec__card"}))),t.h("div",{class:"language-feedback-container"},this.enableUserFeedback&&t.h("button-component",{id:"report-issue",variant:"basic",onClick:g=>this.onFeedbackClick(g)},t.h("feedback-icon",null)),t.h("select-dropdown",{name:"language",searchPlaceholder:t.instance.t("search"),options:f,withChevron:!1,defaultSelectedOption:f.find(g=>g.value==y),exportparts:"sd_dropdown: nse__language-dropdown, sd_dropdown-button: nse__language-drop-button, sd_dropdown-content: nse__language-drop-content, sd_dropdown_label: nse__language-drop-label"},t.h("span",{slot:"select-icon"},t.h("translate-icon",{width:"20",height:"20"})))),this.showFeedbackModal&&t.h("nylas-feedback-form",null));if(s&&n&&b){const g=(E=this.bookingInfoConfirmed)==null?void 0:E.primaryParticipant,P=(I=this.bookingInfoConfirmed)==null?void 0:I.location,S=(B=this.bookingInfoConfirmed)==null?void 0:B.booking_ref,w=((_=this.bookingInfoConfirmed)==null?void 0:_.additionalFields)||{};if(this.bookingInfo&&typeof((L=this.bookingInfo)==null?void 0:L.additionalFields)<"u"){const z=this.bookingInfo.additionalFields;Object.keys(z).forEach(N=>{!w[N]&&(z!=null&&z[N])&&(w[N]=z[N].value)})}const D=(F=this.stores)==null?void 0:F.scheduler.get("selectedTimeslot"),j=(R=this.stores)==null?void 0:R.scheduler.get("selectedTimezone"),H=(M=this.stores)==null?void 0:M.scheduler.get("selectedLanguage"),$=(T=this.stores)==null?void 0:T.scheduler.get("configSettings"),q=this.configurationId?this.configurationId:$==null?void 0:$.configuration_id,Y=window.location.search,C=new URLSearchParams(Y);C.set("booking_id",n.booking_id),g!=null&&g.name&&C.set("name",g.name),g!=null&&g.email&&C.set("email",g.email),D!=null&&D.start_time&&C.set("start_time",(new Date(D.start_time).getTime()/1e3).toString()),D!=null&&D.end_time&&C.set("end_time",(new Date(D.end_time).getTime()/1e3).toString()),j&&C.set("tz",j),H&&C.set("language",H),w&&C.set("additional_values",JSON.stringify(w)),this.slug&&C.set("page_slug",this.slug),q&&C.set("config_id",q),P&&C.set("location",P),S&&C.set("booking_ref",S),this.redirectToCustomUrl(`${b}?${C.toString()}`);return}if(s&&n)return t.h(t.Host,null,t.h(O,{version:this.version,nylasBranding:h,isLoading:this.isLoading,showNotification:this.showNotification},t.h("div",{class:"booked-event-page",part:"booked-event-page ns_booked-event-page"},t.h("nylas-booked-event-card",{selectedTimeslot:r,eventInfo:n,exportparts:"nbec, nbec__title, nbec__card, nbec__description, nbec__button-outline, nbec__cancel-cta, nbec__reschedule-cta"}))),t.h("div",{class:"language-feedback-container"},this.enableUserFeedback&&t.h("button-component",{id:"report-issue",variant:"basic",onClick:g=>this.onFeedbackClick(g)},t.h("feedback-icon",null)),t.h("select-dropdown",{name:"language",searchPlaceholder:t.instance.t("search"),options:f,withChevron:!1,defaultSelectedOption:f.find(g=>g.value==y),exportparts:"sd_dropdown: nse__language-dropdown, sd_dropdown-button: nse__language-drop-button, sd_dropdown-content: nse__language-drop-content, sd_dropdown_label: nse__language-drop-label"},t.h("span",{slot:"select-icon"},t.h("translate-icon",{width:"20",height:"20"})))),this.showFeedbackModal&&t.h("nylas-feedback-form",null));if(s&&(!n||l)&&!o){const g=this.host.querySelector('[slot="timeslot-picker-cta-label"]');return t.h(t.Host,null,t.h(O,{version:this.version,nylasBranding:h,isLoading:this.isLoading,showNotification:this.showNotification},l&&t.h(W,null,`${t.instance.t("rescheduleTitle")}`),t.h("div",{class:"select-date-page",part:"select-date-page ns_select-date-page"},t.h("div",{class:"left-panel",part:"ns_left-panel"},t.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"}),t.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"})),t.h("div",{class:`right-panel ${l?"reschedule":""}`,part:`ns_right-panel ${l?"ns_reschedule":""}`},t.h("h2",{part:"ns_right-panel__title"},t.h("calendar-icon",{part:"ns_right-panel__calendar-icon"}),t.h("span",{id:"selectedDate",part:"ns_right-panel__selected-date"},this.selectedDateLabel)),t.h("nylas-timeslot-picker",{exportparts:"ntp, ntp__time-picker-wrapper, ntp__timeslots, ntp__timeslot, ntp__timeslot--selected, ntp__button-primary"},g&&t.h("span",{slot:"timeslot-picker-cta-label"},t.h("slot",{name:"timeslot-picker-cta-label"})))))),this.enableUserFeedback&&t.h("button-component",{id:"report-issue",variant:"basic",onClick:P=>this.onFeedbackClick(P)},t.h("feedback-icon",null)),this.showFeedbackModal&&t.h("nylas-feedback-form",null))}return s&&!n&&o?t.h(t.Host,null,t.h(O,{version:this.version,nylasBranding:h,isLoading:this.isLoading,showNotification:this.showNotification},l&&t.h(W,null,`${t.instance.t("rescheduleTitle")}`),t.h("div",{class:"additional-data-page",part:"additional-data-page ns_additional-data-page"},t.h("div",{class:"left-panel ns_left-panel",part:"ns_left-panel"},t.h("div",{class:"wrapper",part:"ns_left-panel__wrapper"},t.h("nylas-selected-event-card",{exportparts:"nsec, nsec__card, nsec__icon, nsec__date, nsec__time, nsec__timezone"}))),t.h("div",{class:`right-panel ${l?"reschedule":""}`,part:`ns_right-panel ${l?"ns_reschedule":""}`},t.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"})))),t.h("div",{class:"language-feedback-container"},this.enableUserFeedback&&t.h("button-component",{id:"report-issue",variant:"basic",onClick:g=>this.onFeedbackClick(g)},t.h("feedback-icon",null)),t.h("select-dropdown",{name:"language",searchPlaceholder:t.instance.t("search"),options:f,withChevron:!1,defaultSelectedOption:f.find(g=>g.value==y),exportparts:"sd_dropdown: nse__language-dropdown, sd_dropdown-button: nse__language-drop-button, sd_dropdown-content: nse__language-drop-content, sd_dropdown_label: nse__language-drop-label"},t.h("span",{slot:"select-icon"},t.h("translate-icon",{width:"20",height:"20"})))),this.showFeedbackModal&&t.h("nylas-feedback-form",null)):t.h(t.Host,null,t.h("slot",null))}get host(){return t.getElement(this)}static get watchers(){return{bookingInfo:["bookingInfoChanged"],rescheduleBookingRef:["rescheduleBookingRefChanged"],cancelBookingRef:["cancelBookingRefChanged"],organizerConfirmationBookingRef:["organizerConfirmationBookingRefChanged"],localization:["localizationChanged"],defaultLanguage:["defaultLanguageChanged"],themeConfig:["themeConfigChanged"]}}};J.style=te;exports.nylas_scheduling=J;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-e9dc7971.cjs");require("react");require("react/jsx-runtime");require("react-dom");const s=".sc-person-icon-h{display:flex}",i=s,t=class{constructor(r){e.registerInstance(this,r),this.width="14",this.height="16"}render(){return e.h("svg",{key:"67c72253df839c3d7b5b72ae85e9e86f7663b3e0",width:this.width,height:this.height,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"779bc3c0def7b6781ce745bc1c4abc57d355866d",d:"M7 0C4.79086 0 3 1.79086 3 4C3 6.20914 4.79086 8 7 8C9.20914 8 11 6.20914 11 4C11 1.79086 9.20914 0 7 0ZM4 4C4 2.34315 5.34315 1 7 1C8.65685 1 10 2.34315 10 4C10 5.65685 8.65685 7 7 7C5.34315 7 4 5.65685 4 4ZM2.00873 9C0.903151 9 0 9.88687 0 11C0 12.6912 0.83281 13.9663 2.13499 14.7966C3.41697 15.614 5.14526 16 7 16C8.85474 16 10.583 15.614 11.865 14.7966C13.1672 13.9663 14 12.6912 14 11C14 9.89557 13.1045 9.00001 12 9.00001L2.00873 9ZM1 11C1 10.4467 1.44786 10 2.00873 10L12 10C12.5522 10 13 10.4478 13 11C13 12.3088 12.3777 13.2837 11.3274 13.9534C10.2568 14.636 8.73511 15 7 15C5.26489 15 3.74318 14.636 2.67262 13.9534C1.62226 13.2837 1 12.3088 1 11Z",fill:"currentColor"}))}};t.style=i;exports.person_icon=t;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-e9dc7971.cjs");require("react");require("react/jsx-runtime");require("react-dom");const s=".sc-play-icon-h{display:flex}",r=s,t=class{constructor(i){e.registerInstance(this,i),this.width="15",this.height="15"}render(){return e.h("svg",{key:"0be83196ef8fbead9f7086dbafd33ccea90ef637",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"d2c346fe88da1566360c9ad3a49144cc8e11634a",d:"M21 12L3 21V3L21 12Z",stroke:"auto","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))}};t.style=r;exports.play_icon=t;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-e9dc7971.cjs");require("react");require("react/jsx-runtime");require("react-dom");const r=':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:100%}.radio-group{display:flex;flex-direction:column;gap:0.5rem}.radio-group slot[name=label]{display:flex;color:var(--nylas-base-800, #293056);font-size:14px;font-style:normal;font-weight:400;line-height:150%;font-size:16px}.radio-group slot[name=label].error{color:var(--nylas-error)}.radio-group slot[name=label] span.required{color:var(--nylas-error);padding:0 0.25rem}.radio-group slot[name=label] p{margin:0}.radio-group slot[name=label] p.error{color:var(--nylas-error)}.radio-group slot[name=label] .error{color:var(--nylas-error)}.radio-group span.error{color:var(--nylas-error);font-size:14px;font-weight:400;line-height:20px;font-family:var(--nylas-font-family)}.radio-group label{display:flex;font-family:var(--nylas-font-family);cursor:pointer}.radio-group label .radio-option{display:flex;align-items:flex-start;gap:0.5rem}.radio-group label .radio-option input[type=radio]{cursor:pointer}.radio-group label .radio-option input[type=radio i]{width:20px;height:20px;color:var(--nylas-primary)}.radio-group label .radio-option p{display:flex;flex-direction:column;gap:0.5rem;margin:0}.radio-group label .radio-option p .title{font-size:16px;font-weight:500;line-height:20px;color:var(--nylas-base-800)}.radio-group label .radio-option p .description{font-size:14px;font-weight:400;line-height:20px;color:var(--nylas-base-600)}',o=r,a=class{constructor(l){e.registerInstance(this,l),this.nylasFormRadioChanged=e.createEvent(this,"nylasFormRadioChanged",7),this.componentType="radio-group",this.name="radio-group",this.options=[],this.defaultSelectedValue="",this.label=void 0,this.required=!1,this.readOnly=!1,this.selectedValue=void 0,this.error=""}handleDefaultSelectedValueChange(l){this.selectedValue=l}componentDidLoad(){this.selectedValue=this.defaultSelectedValue}handleBookingFormSubmitted(l){if(this.required&&!this.selectedValue){this.error=`${this.label} is required.`;return}this.error&&l.preventDefault()}componentWillLoad(){this.el.setAttribute("component-type",this.componentType)}handleChange(l){this.error="",this.selectedValue=l,this.nylasFormRadioChanged.emit({value:l,name:this.name,label:this.label})}render(){return e.h("div",{key:"fbba0552c128bca3f6dab87ac5253129abbc6fdb",class:"radio-group"},e.h("slot",{key:"a7f22a36e69876ae1b0f0d3fe1ca3df18877607d",name:"label"},this.label&&e.h("p",{class:{error:!!this.error}},e.h("span",{class:"label"},this.label),this.required&&e.h("span",{class:"required"},"*"))),this.options.map(l=>e.h("label",null,e.h("div",{class:"radio-option"},e.h("input",{type:"radio",disabled:this.readOnly,readOnly:this.readOnly,title:this.readOnly?"read-only field":void 0,name:this.name,value:l.value,checked:this.selectedValue===l.value,onChange:()=>this.handleChange(l.value)}),e.h("p",null,e.h("span",{class:"title"},l.label),e.h("span",{class:"description"},l.description))))),this.error&&e.h("span",{class:"error help-text"},this.error))}get el(){return e.getElement(this)}static get watchers(){return{defaultSelectedValue:["handleDefaultSelectedValueChange"]}}};a.style=o;exports.radio_button_group=a;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index-e9dc7971.cjs");require("react");require("react/jsx-runtime");require("react-dom");const t=".sc-refresh-icon-h{display:flex}",r=t,e=class{constructor(s){c.registerInstance(this,s),this.width="15",this.height="15"}render(){return c.h("svg",{key:"a9dbb422768797850a82bc75293ccd95d12d2943",fill:"auto",width:this.width,height:this.height,viewBox:"0 0 32 32",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},c.h("path",{key:"ed3f88703da4059083cfd1c5c9aedfaedfdaca0d",d:"M15.544 28.080c-0.002-0.006-0.008-0.010-0.012-0.015l-2.873-4.489c-0.204-0.335-0.646-0.454-0.992-0.266l-0.256 0.157c-0.344 0.188-0.337 0.673-0.133 1.008l1.841 2.857c-0.157-0.035-0.316-0.063-0.471-0.103-3.224-0.843-5.953-3.026-7.485-5.988-1.448-2.797-1.72-5.99-0.766-8.992s3.118-5.452 5.915-6.899c0.476-0.247 0.662-0.832 0.416-1.308-0.246-0.477-0.832-0.663-1.308-0.416-3.258 1.686-5.763 4.54-6.874 8.036s-0.794 7.215 0.892 10.473c1.786 3.448 4.963 5.989 8.72 6.973 0.043 0.011 0.087 0.017 0.13 0.028l-2.541 1.288c-0.344 0.189-0.458 0.613-0.254 0.948l0.098 0.256c0.205 0.335 0.557 0.454 0.9 0.266l4.651-2.381c0.006-0.004 0.012-0.003 0.018-0.007l0.312-0.171c0.172-0.095 0.287-0.249 0.332-0.422 0.047-0.172 0.025-0.364-0.076-0.531zM28.559 10.025c-1.783-3.447-4.862-5.988-8.618-6.972-0.267-0.070-0.541-0.124-0.814-0.179l2.494-1.265c0.344-0.189 0.549-0.614 0.345-0.949l-0.099-0.255c-0.205-0.336-0.648-0.454-0.991-0.267l-4.651 2.381c-0.006 0.003-0.012 0.002-0.018 0.006l-0.312 0.171c-0.173 0.095-0.287 0.249-0.332 0.422-0.047 0.172-0.025 0.364 0.077 0.53l0.185 0.304c0.003 0.006 0.008 0.010 0.012 0.016l2.873 4.489c0.203 0.335 0.646 0.454 0.991 0.266l0.226-0.157c0.344-0.188 0.366-0.673 0.163-1.008l-1.85-2.87c0.407 0.063 0.811 0.138 1.207 0.242 3.226 0.845 5.856 3.027 7.387 5.986 1.448 2.797 1.72 5.99 0.765 8.991s-3.020 5.451-5.818 6.901c-0.476 0.247-0.662 0.831-0.415 1.308 0.172 0.332 0.511 0.524 0.863 0.524 0.15 0 0.302-0.035 0.446-0.109 3.259-1.686 5.664-4.54 6.776-8.035 1.111-3.497 0.794-7.217-0.893-10.473z"}))}};e.style=r;exports.refresh_icon=e;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const s=require("./index-e9dc7971.cjs");function m(e,o,i="registerComponent"){return new CustomEvent(i,{bubbles:!0,composed:!0,detail:o})}function P(e,o,i="unregisterComponent"){return new CustomEvent(i,{bubbles:!0,composed:!0,detail:o})}function b(e){return(o,i)=>{const r=e.name;s.debug(`[${r}] Registering component ${r} being called on ${i}`);const l=o.componentWillLoad;if(!l){s.error(`[${r}] componentWillLoad lifecycle method in ${r} missing. Required for RegisterComponent decorator.`);return}const p=o.connectedCallback;if(!p){s.error(`[${r}] connectedCallback lifecycle method in ${r} missing. Required for RegisterComponent decorator.`);return}const a=o.disconnectedCallback;if(!a){s.error(`[${r}] disconnectedCallback lifecycle method in ${r} missing. Required for RegisterComponent decorator.`);return}if(e.storeToProps&&e.stateToProps){const n=Array.from(e.storeToProps.values()),t=Array.from(e.stateToProps.values()),u=n.filter(c=>t.includes(c));if(u.length>0){s.error(`[${r}] Overlapping prop keys detected in ${r} for storeToProps and stateToProps. Make sure to only define them once. Overlapping keys: ${u.join(", ")}`);return}}const d=new Map;e.eventToProps&&Object.keys(e.eventToProps).forEach(n=>{var t;d.set(n,(t=e.eventToProps)==null?void 0:t[n])}),o.connectedCallback=function(){s.debug(`[~${r}] connectedCallback called`);const n=p==null?void 0:p.call(this),t=s.getElement(this);return t.dataset.nylasId||(Object.defineProperty(t,"registerNylasComponent",{get(){return!0},enumerable:!0}),Object.defineProperty(t,"stateToProps",{get(){return e.stateToProps},enumerable:!0}),Object.defineProperty(t,"getStoresToProp",{get(){return e.getStoresToProp},enumerable:!0}),Object.defineProperty(t,"storeToProps",{get(){return e.storeToProps},enumerable:!0}),Object.defineProperty(t,"eventToProps",{get(){return d},enumerable:!0}),Object.defineProperty(t,"authToProp",{get(){return e.authToProp},enumerable:!0}),Object.defineProperty(t,"connectorToProp",{get(){return e.connectorToProp},enumerable:!0}),Object.defineProperty(t,"localPropsToProp",{get(){return e.localPropsToProp},enumerable:!0})),n},e.fireRegisterEvent&&(o.componentWillLoad=function(){const n=l==null?void 0:l.call(this),t=s.getElement(this),u={element:t,...e,eventToProps:d},c=m(o,u,e.registrationEventName);return t.dispatchEvent(c)&&s.debug(`[${r}] Component ${r} successfully fired registration event`),n},o.disconnectedCallback=function(){const n=a==null?void 0:a.call(this),t=s.getElement(this),u={element:t,...e,eventToProps:d},c=P(o,u,e.unregistrationEventName);return t.dispatchEvent(c)&&s.debug(`[${r}] Component ${r} successfully fired unregistration event`),n})}}exports.RegisterComponent=b;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-e9dc7971.cjs");require("react");require("react/jsx-runtime");require("react-dom");const l=".sc-reply-all-icon-h{display:flex}",r=l,t=class{constructor(i){e.registerInstance(this,i),this.width="15",this.height="15"}render(){return e.h("svg",{key:"82c4f58408a549b7eefe0bab7888526fb55bcf6d",fill:"auto",width:this.width,height:this.height,viewBox:"0 0 1920 1920",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"5281a79eaed7366b4415ce0bf2a250da9646b963",d:"m1030.975 188 81.249 81.249-429.228 429.228h300.747c516.223 0 936.257 420.034 936.257 936.257v98.028h-114.92v-98.028c0-452.901-368.436-821.337-821.337-821.337H682.996l429.228 429.229-81.25 81.248-567.936-567.937L1030.975 188Zm-463.038.011 81.249 81.25-486.688 486.688 486.688 486.688-81.249 81.249L0 755.949 567.937 188.01Z","fill-rule":"evenodd"}))}};t.style=r;exports.reply_all_icon=t;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-e9dc7971.cjs");require("react");require("react/jsx-runtime");require("react-dom");const c=".sc-reply-icon-h{display:flex}",r=c,t=class{constructor(i){e.registerInstance(this,i),this.width="15",this.height="15"}render(){return e.h("svg",{key:"e059d502b1bd07278f3f60b1c4fe9c4b52bbcb61",fill:"auto",width:this.width,height:this.height,viewBox:"0 0 1920 1920",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"b6c07ce3e80475b42264491d4ce2856b45ad848b",d:"M835.942 632.563H244.966l478.08-478.08-90.496-90.496L-.026 696.563 632.55 1329.14l90.496-90.496-478.08-478.08h590.976c504.448 0 914.816 410.368 914.816 914.816v109.184h128V1675.38c0-574.976-467.84-1042.816-1042.816-1042.816","fill-rule":"evenodd"}))}};t.style=r;exports.reply_icon=t;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-e9dc7971.cjs");require("react");require("react/jsx-runtime");require("react-dom");const i=".sc-sent-icon-h{display:flex}",c=i,t=class{constructor(s){e.registerInstance(this,s),this.width="15",this.height="15"}render(){return e.h("svg",{key:"af8457ffa4427dfe04e95d571db14f0256ae4e1f",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"e72a685b39021ffc6ca8a30a69c123835b528f94",d:"M21.5 12L3.5 3.5L3.5 20.5L21.5 12Z",stroke:"auto","stroke-width":"1.5"}),e.h("path",{key:"adf23567c6b6d85a9e162c39b58ca6f8ed5cbc91",d:"M3.5 3.5L12 10.5",stroke:"auto","stroke-width":"1.5"}),e.h("path",{key:"10bd3d6f36c572ff8b8f8905bc923abac142f15a",d:"M3.5 20.5L12 13.5",stroke:"auto","stroke-width":"1.5"}))}};t.style=c;exports.sent_icon=t;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-e9dc7971.cjs");require("react");require("react/jsx-runtime");require("react-dom");const i=".sc-spam-icon-h{display:flex}",d=i,t=class{constructor(s){e.registerInstance(this,s),this.width="15",this.height="15"}render(){return e.h("svg",{key:"93ff5ee3d6d594e1e901e47de4d0766386efe76f",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"2f333ba9e71dbfdd79d369cac07216361a39cdb6",d:"M20 3H4C2.89543 3 2 3.89543 2 5V19C2 20.1046 2.89543 21 4 21H20C21.1046 21 22 20.1046 22 19V5C22 3.89543 21.1046 3 20 3Z",stroke:"auto","stroke-width":"1.5"}),e.h("path",{key:"afd35317c261a436d8980687a22ed161bfde61ff",d:"M2 5L12 12.5L22 5",stroke:"auto","stroke-width":"1.5"}))}};t.style=d;exports.spam_icon=t;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-e9dc7971.cjs");require("react");require("react/jsx-runtime");require("react-dom");const i=".sc-star-icon-h{display:flex}",r=i,e=class{constructor(s){t.registerInstance(this,s),this.width="15",this.height="15"}render(){return t.h("svg",{key:"9d92e75a297c8e3be072fb593a7a85127e2e4f3f",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},t.h("path",{key:"6f7b9c97f134a9b5671e9f0b4b232c6f45b981df",d:"M9.15316 5.40838C10.4198 3.13613 11.0531 2 12 2C12.9469 2 13.5802 3.13612 14.8468 5.40837L15.1745 5.99623C15.5345 6.64193 15.7144 6.96479 15.9951 7.17781C16.2757 7.39083 16.6251 7.4699 17.3241 7.62805L17.9605 7.77203C20.4201 8.32856 21.65 8.60682 21.9426 9.54773C22.2352 10.4886 21.3968 11.4691 19.7199 13.4299L19.2861 13.9372C18.8096 14.4944 18.5713 14.773 18.4641 15.1177C18.357 15.4624 18.393 15.8341 18.465 16.5776L18.5306 17.2544C18.7841 19.8706 18.9109 21.1787 18.1449 21.7602C17.3788 22.3417 16.2273 21.8115 13.9243 20.7512L13.3285 20.4768C12.6741 20.1755 12.3469 20.0248 12 20.0248C11.6531 20.0248 11.3259 20.1755 10.6715 20.4768L10.0757 20.7512C7.77268 21.8115 6.62118 22.3417 5.85515 21.7602C5.08912 21.1787 5.21588 19.8706 5.4694 17.2544L5.53498 16.5776C5.60703 15.8341 5.64305 15.4624 5.53586 15.1177C5.42868 14.773 5.19043 14.4944 4.71392 13.9372L4.2801 13.4299C2.60325 11.4691 1.76482 10.4886 2.05742 9.54773C2.35002 8.60682 3.57986 8.32856 6.03954 7.77203L6.67589 7.62805C7.37485 7.4699 7.72433 7.39083 8.00494 7.17781C8.28555 6.96479 8.46553 6.64194 8.82547 5.99623L9.15316 5.40838Z",stroke:"auto","stroke-width":"1.5"}))}};e.style=r;exports.star_icon=e;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-e9dc7971.cjs");require("react");require("react/jsx-runtime");require("react-dom");const o=".sc-stop-icon-h{display:flex}",s=o,t=class{constructor(i){e.registerInstance(this,i),this.width="15",this.height="15"}render(){return e.h("svg",{key:"b1dcb0ee13d6725610e1980f223b3679b3336201",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"48af200cfd31cd7acdbc1d7ade5c2bc6e5dfd3e3",d:"M4 4H20V20H4V4Z",stroke:"auto","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))}};t.style=s;exports.stop_icon=t;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-e9dc7971.cjs");require("react");require("react/jsx-runtime");require("react-dom");const o=':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:100%}label{display:flex;color:var(--nylas-base-800, #293056);font-size:14px;font-style:normal;font-weight:400;line-height:150%;flex-direction:column;gap:4px;font-family:var(--nylas-font-family);font-size:16px;color:var(--nylas-base-800)}label.error{color:var(--nylas-error)}label span.required{color:var(--nylas-error);padding:0 0.25rem}label p{margin:0;display:flex;gap:4px;align-items:center}label .error{color:var(--nylas-error)}textarea{display:flex;height:48px;padding-left:16px;align-items:center;gap:8px;align-self:stretch;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-300);background:var(--nylas-base-0);width:-webkit-fill-available;color:var(--nylas-base-900);font-size:16px;font-style:normal;font-weight:400;line-height:150%;padding:12px 16px;border-width:1;resize:vertical;border-radius:8px;font-family:var(--nylas-font-family);font-size:16px;line-height:24px}textarea:focus{outline-color:var(--nylas-primary)}textarea.error{border-radius:var(--nylas-border-radius-2x);font-weight:600;border-color:var(--nylas-error);border-width:2px}textarea.error::placeholder{font-weight:400}textarea::placeholder{color:var(--nylas-base-300)}textarea::-webkit-resizer{display:none}textarea:read-only{background-color:var(--nylas-base-100);cursor:not-allowed}',s=o,r=class{constructor(a){e.registerInstance(this,a),this.nylasFormInputChanged=e.createEvent(this,"nylasFormInputChanged",7),this.name="textarea",this.defaultValue=void 0,this.label="",this.placeholder="",this.required=!1,this.readOnly=!1,this.autoFocus=!1,this.maxLength=255,this.type="multi_line_text",this.tooltip="",this.value="",this.error=""}componentDidLoad(){this.value=e.sanitize(this.defaultValue||"")}handleBookingFormSubmitted(a){this.validate(this.value),this.error&&a.preventDefault()}handletriggerValidation(a){this.validate(this.value),this.error&&a.preventDefault()}handleInput(a){this.error="";const l=a.target;this.value=e.sanitize(l.value),this.nylasFormInputChanged.emit({value:this.value,name:this.name,error:this.error,label:this.label,type:this.type})}validate(a){this.required&&!a?this.error=`${this.label} is required.`:a.length>this.maxLength?this.error=`${this.label} cannot exceed ${this.maxLength} characters.`:this.error=""}render(){return e.h("label",{key:"ef3eb6b971e8314affa363e69db63910dda65441",part:"tc__label",class:{error:!!this.error}},e.h("p",{key:"004a62ae6947d59b0f9737283d236844810e1ab5"},e.h("span",{key:"4ea2e4427021d0907405a893a4a6072cc5d3a59f",class:"label"},this.label),this.required&&e.h("span",{class:"required"},"*"),this.tooltip&&e.h("tooltip-component",null,e.h("info-icon",{slot:"tooltip-icon"}),e.h("span",{slot:"tooltip-content"},this.tooltip))),e.h("textarea",{key:"751dc58e9baa8b28e565045f31c0300b6eb26cfc",name:this.name,title:this.readOnly?"read-only field":void 0,placeholder:this.placeholder,readOnly:this.readOnly,autoFocus:this.autoFocus,value:this.value,maxLength:this.maxLength,onInput:a=>this.handleInput(a),class:{error:!!this.error},part:"tc__textarea"}),this.error&&e.h("span",{class:"error help-text"},this.error))}};r.style=s;exports.textarea_component=r;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { r as s, a, h as l } from "./index-2084ffd9.js";
|
|
2
|
-
import "react";
|
|
3
|
-
import "react/jsx-runtime";
|
|
4
|
-
import "react-dom";
|
|
5
|
-
const o = '.switch{--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;display:inline-block;height:34px;position:relative;width:60px}.switch input{display:none}.slider{background-color:var(--nylas-base-300);bottom:0;cursor:pointer;left:0;position:absolute;right:0;top:0;transition:0.4s}.slider:before{background-color:var(--nylas-base-0);bottom:4px;content:"";height:32px;left:4px;position:absolute;transition:0.4s;width:32px}input:checked+.slider{background-color:var(--nylas-success)}input:checked+.slider:before{transform:translateX(32px)}.slider.round{border-radius:35px;width:72px;height:40px}.slider.round:before{border-radius:50%}', r = o, c = class {
|
|
6
|
-
constructor(e) {
|
|
7
|
-
s(this, e), this.nylasFormSwitchToggled = a(this, "nylasFormSwitchToggled", 7), this.name = "toggle-switch", this.checked = !1, this.label = "", this.isChecked = this.checked;
|
|
8
|
-
}
|
|
9
|
-
checkedChanged(e) {
|
|
10
|
-
this.isChecked = e;
|
|
11
|
-
}
|
|
12
|
-
componentWillLoad() {
|
|
13
|
-
this.isChecked = this.checked;
|
|
14
|
-
}
|
|
15
|
-
toggleCheck() {
|
|
16
|
-
this.isChecked = !this.isChecked, this.nylasFormSwitchToggled.emit({
|
|
17
|
-
checked: this.isChecked,
|
|
18
|
-
name: this.name,
|
|
19
|
-
label: this.label
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
render() {
|
|
23
|
-
return l("label", { key: "65632395ac0a2cbc73846dd50bbca8c5a6b35495", class: "switch", part: "ts_label" }, l("input", { key: "809e3371aae47a7c9eefff96132b9a805daae86e", type: "checkbox", part: "ts_input", name: this.name, checked: this.isChecked, onChange: () => this.toggleCheck() }), l("div", { key: "85bb7bb0eb9a43fef2a5a4ebb3695355829ea3a2", class: "slider round", part: `ts_slider ${this.isChecked ? "ts_slider_checked" : ""}` }));
|
|
24
|
-
}
|
|
25
|
-
static get watchers() {
|
|
26
|
-
return {
|
|
27
|
-
checked: ["checkedChanged"]
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
c.style = r;
|
|
32
|
-
export {
|
|
33
|
-
c as toggle_switch
|
|
34
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-e9dc7971.cjs");require("react");require("react/jsx-runtime");require("react-dom");const a='.switch{--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;display:inline-block;height:34px;position:relative;width:60px}.switch input{display:none}.slider{background-color:var(--nylas-base-300);bottom:0;cursor:pointer;left:0;position:absolute;right:0;top:0;transition:0.4s}.slider:before{background-color:var(--nylas-base-0);bottom:4px;content:"";height:32px;left:4px;position:absolute;transition:0.4s;width:32px}input:checked+.slider{background-color:var(--nylas-success)}input:checked+.slider:before{transform:translateX(32px)}.slider.round{border-radius:35px;width:72px;height:40px}.slider.round:before{border-radius:50%}',o=a,s=class{constructor(l){e.registerInstance(this,l),this.nylasFormSwitchToggled=e.createEvent(this,"nylasFormSwitchToggled",7),this.name="toggle-switch",this.checked=!1,this.label="",this.isChecked=this.checked}checkedChanged(l){this.isChecked=l}componentWillLoad(){this.isChecked=this.checked}toggleCheck(){this.isChecked=!this.isChecked,this.nylasFormSwitchToggled.emit({checked:this.isChecked,name:this.name,label:this.label})}render(){return e.h("label",{key:"65632395ac0a2cbc73846dd50bbca8c5a6b35495",class:"switch",part:"ts_label"},e.h("input",{key:"809e3371aae47a7c9eefff96132b9a805daae86e",type:"checkbox",part:"ts_input",name:this.name,checked:this.isChecked,onChange:()=>this.toggleCheck()}),e.h("div",{key:"85bb7bb0eb9a43fef2a5a4ebb3695355829ea3a2",class:"slider round",part:`ts_slider ${this.isChecked?"ts_slider_checked":""}`}))}static get watchers(){return{checked:["checkedChanged"]}}};s.style=o;exports.toggle_switch=s;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("./index-e9dc7971.cjs");require("react");require("react/jsx-runtime");require("react-dom");const i=".sc-translate-icon-h{display:flex}",r=i,e=class{constructor(t){C.registerInstance(this,t),this.width="16",this.height="16"}render(){return C.h("svg",{key:"a3a970b623885825526a8531efc2fa6b61f1e9e7",xmlns:"http://www.w3.org/2000/svg",width:this.width,height:this.height,viewBox:"0 0 20 20",fill:"none"},C.h("path",{key:"b6789bfce9afcaa691cb81a864a4596f9c8dc3c6",fill:"currentColor",d:"M14.1663 4.02867C14.4267 4.12081 14.563 4.40654 14.4709 4.66685C14.3501 5.00788 14.2182 5.4771 14.1178 5.86047C14.6877 5.77587 15.2665 5.65653 15.8867 5.51288C16.1557 5.45058 16.4243 5.61815 16.4866 5.88717C16.5489 6.15619 16.3814 6.42479 16.1123 6.4871C15.339 6.66621 14.6101 6.81289 13.8717 6.90283C13.7759 7.35654 13.7014 7.77084 13.6451 8.15021C14.1202 8.04599 14.5738 8.00553 14.9996 8.02075L14.9996 8C14.9996 7.72386 15.2235 7.5 15.4996 7.5C15.7758 7.5 15.9996 7.72386 15.9996 8C15.9996 8.05657 15.9991 8.11281 15.9979 8.16871C17.1392 8.47838 17.9781 9.23987 18.3435 10.2263C18.9579 11.8853 18.1287 13.8787 15.7027 14.9569C15.4504 15.069 15.1549 14.9554 15.0427 14.7031C14.9306 14.4507 15.0442 14.1552 15.2966 14.0431C17.3705 13.1213 17.7913 11.6147 17.4057 10.5737C17.1874 9.984 16.6776 9.44916 15.9129 9.18633C15.6829 10.7237 15.021 11.9466 14.229 12.7925C14.3126 12.9656 14.3958 13.1436 14.4641 13.3151C14.5662 13.5717 14.441 13.8625 14.1844 13.9646C13.9278 14.0667 13.637 13.9415 13.5349 13.6849C13.5066 13.6137 13.4777 13.5463 13.448 13.4802C13.028 13.7794 12.5905 13.9869 12.1705 14.0835C11.5942 14.2161 10.963 14.1517 10.534 13.6942C9.88917 13.0053 9.84361 11.8611 10.2855 10.8412C10.6652 9.96479 11.4186 9.11781 12.5848 8.54034C12.6387 8.07338 12.7199 7.55894 12.8332 6.98891C12.3926 7.00755 11.9403 7.00326 11.4659 6.97127C11.1904 6.95269 10.9821 6.71428 11.0007 6.43876C11.0192 6.16325 11.2577 5.95496 11.5332 5.97353C12.0633 6.00928 12.5641 6.00772 13.0566 5.97553C13.1605 5.55444 13.3512 4.8331 13.5282 4.33317C13.6203 4.07286 13.906 3.93653 14.1663 4.02867ZM12.501 9.74109C11.8436 10.1821 11.427 10.7219 11.2031 11.2387C10.8542 12.0439 10.9881 12.716 11.2638 13.0105C11.2637 13.0104 11.2639 13.0106 11.2638 13.0105C11.3573 13.11 11.5624 13.1973 11.9463 13.109C12.2578 13.0373 12.6311 12.8571 13.0121 12.5576C12.8658 12.22 12.7272 11.8324 12.6313 11.353C12.5405 10.8996 12.4899 10.3743 12.501 9.74109ZM13.7808 11.7797C14.316 11.0956 14.759 10.1665 14.9271 9.01632C14.539 9.00681 14.1111 9.05601 13.6457 9.17854C13.605 9.19274 13.5647 9.20726 13.525 9.22209C13.4663 10.0545 13.5146 10.671 13.6118 11.1568C13.6578 11.3868 13.7156 11.5913 13.7808 11.7797ZM6.92028 5.2159C5.77942 4.88398 4.78409 5.00841 4.07616 5.21575C3.72264 5.3193 3.439 5.44393 3.24121 5.5443C3.14215 5.59457 3.0641 5.63901 3.00903 5.67212C2.98147 5.68868 2.95962 5.70244 2.9437 5.71271L2.92429 5.72542L2.91797 5.72966L2.91566 5.73123L2.91393 5.73241C2.91384 5.73249 2.91436 5.73325 2.94925 5.78397C3.23698 6.20225 3.1703 6.10548 2.91393 5.73241C2.68634 5.88881 2.62863 6.20009 2.78502 6.42767C2.94134 6.65514 3.25207 6.71313 3.47963 6.55703L3.4788 6.5576L3.48576 6.55305C3.49318 6.54826 3.50608 6.5401 3.52423 6.52919C3.56057 6.50735 3.6177 6.47463 3.69373 6.43605C3.84612 6.35872 4.07228 6.2589 4.35724 6.17544C4.92619 6.0088 5.72242 5.90898 6.64043 6.17595C7.35305 6.38517 7.66747 6.76919 7.82692 7.16112C7.98173 7.54163 8.0026 7.95751 8.00531 8.33243C7.46199 8.18407 6.79336 8.03682 6.08385 8.00744C5.04808 7.96456 3.8874 8.17096 2.87738 9.01102C1.98877 9.75011 1.78345 10.8818 2.07014 11.853C2.35713 12.8252 3.14925 13.692 4.31803 13.9348C5.22351 14.123 6.18016 13.8639 6.9599 13.5212C7.3403 13.354 7.69572 13.1594 8.0057 12.9665V13.5C8.0057 13.7761 8.22956 14 8.5057 14C8.78184 14 9.0057 13.7754 9.0057 13.4993L9.0057 8.44586C9.0058 8.05404 9.00595 7.40554 8.7532 6.78428C8.48142 6.11625 7.93342 5.51313 6.92136 5.21622L6.92028 5.2159ZM6.04249 9.00659C6.76366 9.03645 7.44769 9.209 8.0057 9.37205V11.757C7.65814 12.0182 7.13927 12.35 6.55757 12.6057C5.85264 12.9155 5.12729 13.0816 4.52148 12.9557C3.75127 12.7957 3.22322 12.2271 3.02922 11.5699C2.83491 10.9116 2.98777 10.2199 3.51683 9.77985C4.27958 9.14545 5.16917 8.97043 6.04249 9.00659Z"}))}};e.style=r;exports.translate_icon=e;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-e9dc7971.cjs");require("react");require("react/jsx-runtime");require("react-dom");const s=".sc-trash-fill-icon-h{display:flex}",a=s,t=class{constructor(d){e.registerInstance(this,d),this.width="15",this.height="15"}render(){return e.h("svg",{key:"d91a0b4a4fe83f9e8eda0f0925ddfa4de2e0ba78",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"6129e4dcceb4fba9571a9f499fdb0fd36b09a86e",d:"M3 6H5H21",stroke:"auto","stroke-width":"1.5"}),e.h("path",{key:"6d06dc26a0f98d8afde40f2c4de69ca8c8d9cc92",d:"M8 6V4C8 3.46957 8.21071 2.96086 8.58579 2.58579C8.96086 2.21071 9.46957 2 10 2H14C14.5304 2 15.0391 2.21071 15.4142 2.58579C15.7893 2.96086 16 3.46957 16 4V6M19 6V20C19 20.5304 18.7893 21.0391 18.4142 21.4142C18.0391 21.7893 17.5304 22 17 22H7C6.46957 22 5.96086 21.7893 5.58579 21.4142C5.21071 21.0391 5 20.5304 5 20V6H19Z",stroke:"auto","stroke-width":"1.5"}),e.h("path",{key:"e5bd2116bb19b79d84ab67139adfac56bd3f3740",d:"M10 11V17",stroke:"auto","stroke-width":"1.5"}),e.h("path",{key:"bc014f02ebd86b4fd85ae744bfc47fed60ab0fe6",d:"M14 11V17",stroke:"auto","stroke-width":"1.5"}))}};t.style=a;exports.trash_fill_icon=t;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-e9dc7971.cjs");require("react");require("react/jsx-runtime");require("react-dom");const n=".sc-underline-icon-h{display:flex}",r=n,t=class{constructor(i){e.registerInstance(this,i),this.width="15",this.height="15"}render(){return e.h("svg",{key:"96ed32bea9de1ea04ec4f8d5d8ccab5b01f65401",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"e37b2de78c212e7dd46583ad3fc6fc17c7a510a3",d:"M19 4V10C19 13.866 15.866 17 12 17C8.13401 17 5 13.866 5 10V4M8.5 4V10C8.5 13.2218 10.6766 15.9352 13.6395 16.7501M4 21H20M3 4L10.5 4M17 4L21 4",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))}};t.style=r;exports.underline_icon=t;
|