1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,196268,e=>{"use strict";let t=(e,t=!0)=>{let a=new URL(window.location.href);a.searchParams.get(e)&&(a.searchParams.delete(e),t?window.history.replaceState({...window.history.state,as:a.href},"",a.href):window.history.pushState({...window.history.state,as:a.href},"",a.href))};e.s(["getQueryParam",0,e=>new URLSearchParams(window.location.search).get(e),"removeQueryParam",0,t,"updateQueryParam",0,(e,a,r=!0)=>{let n=new URL(window.location.href);if(n.searchParams.get(e)!==a){if(""===a||"null"===a)return void t(e,r);n.searchParams.set(e,`${a}`),r?window.history.replaceState({...window.history.state,as:n.href},"",n.href):window.history.pushState({...window.history.state,as:n.href},"",n.href)}}])},118540,166748,e=>{"use strict";var t=e.i(271645),a=e.i(179849),r=e.i(408155);let{useDebugValue:n}=t.default,{useSyncExternalStoreWithSelector:l}=a.default,o=(e,t)=>{let a=(0,r.createStore)(e),o=(e,r=t)=>(function(e,t=e=>e,a){let r=l(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,a);return n(r),r})(a,e,r);return Object.assign(o,a),o},i=(e,t)=>e?o(e,t):o;e.s(["createWithEqualityFn",()=>i],166748);var s=e.i(623101),d=e.i(24509),u=e.i(865420),m=e.i(196268);let f=()=>i((e,t)=>({state:"loading",setState:t=>e({state:t}),layout:u.BookerLayouts.MONTH_VIEW,setLayout:a=>(["week_view","column_view"].includes(a)&&!t().selectedDate&&e({selectedDate:(0,s.default)().format("YYYY-MM-DD")}),(!t().isPlatform||t().allowUpdatingUrlParams)&&(0,m.updateQueryParam)("layout",a),e({layout:a})),selectedDate:(0,m.getQueryParam)("date")||null,setSelectedDate:({date:a,omitUpdatingParams:r=!1,preventMonthSwitching:n=!1})=>{if(!a)return void(0,m.removeQueryParam)("date");let l=(0,s.default)(t().selectedDate),o=(0,s.default)(a);e({selectedDate:a}),r||t().isPlatform&&!t().allowUpdatingUrlParams||(0,m.updateQueryParam)("date",a??""),!n&&o.month()!==l.month()&&(e({month:o.format("YYYY-MM")}),r||t().isPlatform&&!t().allowUpdatingUrlParams||(0,m.updateQueryParam)("month",o.format("YYYY-MM")))},selectedDatesAndTimes:null,setSelectedDatesAndTimes:t=>{e({selectedDatesAndTimes:t})},addToSelectedDate:a=>{let r=(0,s.default)(t().selectedDate),n=r.add(a,"day");n.isBefore((0,s.default)(),"day")&&(n=(0,s.default)());let l=n.format("YYYY-MM-DD");n.month()!==r.month()&&(e({month:n.format("YYYY-MM")}),(!t().isPlatform||t().allowUpdatingUrlParams)&&(0,m.updateQueryParam)("month",n.format("YYYY-MM"))),e({selectedDate:l}),(!t().isPlatform||t().allowUpdatingUrlParams)&&(0,m.updateQueryParam)("date",l)},username:null,eventSlug:null,eventId:null,rescheduledBy:null,verifiedEmail:null,setVerifiedEmail:t=>{e({verifiedEmail:t})},verificationCode:null,setVerificationCode:t=>{e({verificationCode:t})},month:(0,m.getQueryParam)("month")||((0,m.getQueryParam)("date")&&(0,s.default)((0,m.getQueryParam)("date")).isValid()?(0,s.default)((0,m.getQueryParam)("date")).format("YYYY-MM"):null)||(0,s.default)().format("YYYY-MM"),setMonth:a=>{a?(e({month:a,selectedTimeslot:null}),(!t().isPlatform||t().allowUpdatingUrlParams)&&(0,m.updateQueryParam)("month",a??""),t().setSelectedDate({date:null})):(0,m.removeQueryParam)("month")},dayCount:d.BOOKER_NUMBER_OF_DAYS_TO_LOAD>0?d.BOOKER_NUMBER_OF_DAYS_TO_LOAD:null,setDayCount:t=>{e({dayCount:t})},isTeamEvent:!1,seatedEventData:{seatsPerTimeSlot:void 0,attendees:void 0,bookingUid:void 0,showAvailableSeatsCount:!0},setSeatedEventData:a=>{e({seatedEventData:a}),(!t().isPlatform||t().allowUpdatingUrlParams)&&(0,m.updateQueryParam)("bookingUid",a.bookingUid??"null")},timezone:(0,m.getQueryParam)("cal.tz")??null,setTimezone:t=>{e({timezone:t})},initialize:({username:a,eventSlug:r,month:n,eventId:l,rescheduleUid:o=null,rescheduledBy:i=null,bookingUid:d=null,bookingData:f=null,layout:c,isTeamEvent:y,durationConfig:g,org:h,isInstantMeeting:D,timezone:p=null,teamMemberEmail:b,crmOwnerRecordType:v,crmAppSlug:w,crmRecordId:x,isPlatform:S=!1,allowUpdatingUrlParams:O=!0,defaultPhoneCountry:P})=>{let T=t().selectedDate;if((t().username!==a||t().eventSlug!==r||t().month!==n||t().eventId!==l||t().rescheduleUid!==o||t().bookingUid!==d||t().bookingData?.responses.email!==f?.responses.email||t().layout!==c||t().timezone!==p||t().rescheduledBy!==i||t().teamMemberEmail!==b||t().crmOwnerRecordType!==v||t().crmAppSlug!==w||t().crmRecordId!==x)&&(e({username:a,eventSlug:r,eventId:l,org:h,rescheduleUid:o,rescheduledBy:i,bookingUid:d,bookingData:f,layout:c||u.BookerL
1ayouts.MONTH_VIEW,isTeamEvent:y||!1,durationConfig:g,timezone:p,selectedDate:T||(["week_view","column_view"].includes(c)?(0,s.default)().format("YYYY-MM-DD"):null),teamMemberEmail:b,crmOwnerRecordType:v,crmAppSlug:w,crmRecordId:x,isPlatform:S,allowUpdatingUrlParams:O,defaultPhoneCountry:P}),g?.includes(Number((0,m.getQueryParam)("duration")))?e({selectedDuration:Number((0,m.getQueryParam)("duration"))}):(0,m.removeQueryParam)("duration"),o&&f&&e({selectedTimeslot:null}),n&&e({month:n}),D)){let t=(0,s.default)().format("YYYY-MM"),a=(0,s.default)().format("YYYY-MM-DD"),r=new Date().toISOString();e({month:t,selectedDate:a,selectedTimeslot:r,isInstantMeeting:D}),(!S||O)&&((0,m.updateQueryParam)("month",t),(0,m.updateQueryParam)("date",a??""),(0,m.updateQueryParam)("slot",r??"",!1))}},durationConfig:null,selectedDuration:null,setSelectedDuration:a=>{e({selectedDuration:a}),(!t().isPlatform||t().allowUpdatingUrlParams)&&(0,m.updateQueryParam)("duration",a??"")},setBookingData:t=>{e({bookingData:t??null})},setRescheduleUid:t=>{e({rescheduleUid:t})},recurringEventCount:null,setRecurringEventCount:t=>e({recurringEventCount:t}),recurringEventCountQueryParam:Number((0,m.getQueryParam)("recurringEventCount"))||null,setRecurringEventCountQueryParam:a=>{null===a||isNaN(a)||(e({recurringEventCountQueryParam:a}),(!t().isPlatform||t().allowUpdatingUrlParams)&&(0,m.updateQueryParam)("recurringEventCount",a))},rescheduleUid:null,bookingData:null,bookingUid:null,selectedTimeslot:(0,m.getQueryParam)("slot")||null,tentativeSelectedTimeslots:[],setTentativeSelectedTimeslots:t=>{e({tentativeSelectedTimeslots:t})},setSelectedTimeslot:a=>{e({selectedTimeslot:a}),(!t().isPlatform||t().allowUpdatingUrlParams)&&(0,m.updateQueryParam)("slot",a??"",!1)},formValues:{},setFormValues:t=>{e({formValues:t})},org:null,setOrg:t=>{e({org:t})},isPlatform:!1,allowUpdatingUrlParams:!0,defaultPhoneCountry:null,isSlotSelectionModalVisible:!1,setIsSlotSelectionModalVisible:t=>{e({isSlotSelectionModalVisible:t})}})),c=f();e.s(["createBookerStore",0,f,"useBookerStore",0,c,"useInitializeBookerStore",0,({username:e,eventSlug:a,month:r,eventId:n,rescheduleUid:l=null,rescheduledBy:o=null,bookingData:i=null,verifiedEmail:s=null,layout:d,isTeamEvent:u,durationConfig:m,org:f,isInstantMeeting:y,timezone:g=null,teamMemberEmail:h,crmOwnerRecordType:D,crmAppSlug:p,crmRecordId:b,isPlatform:v=!1,allowUpdatingUrlParams:w=!0,defaultPhoneCountry:x})=>{let S=c(e=>e.initialize);(0,t.useEffect)(()=>{S({username:e,eventSlug:a,month:r,eventId:n,rescheduleUid:l,rescheduledBy:o,bookingData:i,layout:d,isTeamEvent:u,org:f,verifiedEmail:s,durationConfig:m,isInstantMeeting:y,timezone:g,teamMemberEmail:h,crmOwnerRecordType:D,crmAppSlug:p,crmRecordId:b,isPlatform:v,allowUpdatingUrlParams:w,defaultPhoneCountry:x})},[S,f,e,a,r,n,l,o,i,d,u,s,m,y,g,h,D,p,b,v,w,x])}],118540)},875744,e=>{"use strict";var t=e.i(843476),a=e.i(271645),r=e.i(806344),n=e.i(118540);let l=(0,a.createContext)(null);e.s(["BookerStoreProvider",0,({children:e})=>{let r=(0,a.useRef)();return r.current||(r.current=(0,n.createBookerStore)()),(0,t.jsx)(l.Provider,{value:r.current,children:e})},"useBookerStoreContext",0,(e,t)=>{let n=(0,a.useContext)(l);if(!n)throw Error("useBookerStoreContext must be used within BookerStoreProvider");return(0,r.useStore)(n,e,t)},"useInitializeBookerStoreContext",0,({username:e,eventSlug:t,month:n,eventId:o,rescheduleUid:i=null,rescheduledBy:s=null,bookingData:d=null,verifiedEmail:u=null,layout:m,isTeamEvent:f,durationConfig:c,org:y,isInstantMeeting:g,timezone:h=null,teamMemberEmail:D,crmOwnerRecordType:p,crmAppSlug:b,crmRecordId:v,isPlatform:w=!1,allowUpdatingUrlParams:x=!0})=>{let S=(0,a.useContext)(l);if(!S)throw Error("useInitializeBookerStoreContext must be used within BookerStoreProvider");let O=(0,r.useStore)(S,e=>e.initialize);(0,a.useEffect)(()=>{O({username:e,eventSlug:t,month:n,eventId:o,rescheduleUid:i,rescheduledBy:s,bookingData:d,layout:m,isTeamEvent:f,org:y,verifiedEmail:u,durationConfig:c,isInstantMeeting:g,timezone:h,teamMemberEmail:D,crmOwnerRecordType:p,crmAppSlug:b,crmRecordId:v,isPlatform:w,allowUpdatingUrlParams:x})},[O,y,e,t,n,o,i,s,d,m,f,u,c,g,h,D,p,b,v,w,x])}])},900802,e=>{"use strict";function t(e){try{if(e instanceof Error)return JSON.stringify(e.stack??e.message);return JSON.stringify(e)}catch(t){return e}}e.s(["safeStringify",()=>t])},574153,e=>{"use strict";var t=e.i(50270),a=e.i(623101);let r=(e,t,r)=>
1r?(0,a.default)(e).tz(r).format(12===t?"h:mma":"HH:mm"):(0,a.default)(e).format(12===t?"h:mma":"HH:mm"),n=(e,t={},r)=>{let n=e instanceof a.default?e.toDate():e;return Intl.DateTimeFormat(r,t).format(n)},l=(e,t)=>{let r=a.default.utc().tz(e).utcOffset(),n=a.default.utc().tz(t).utcOffset();return r===n?0:r<n?-1:1},o=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];t.z.string().transform(e=>{let t=e.match(/([+-]\d{2}:\d{2})$/),r=t?t[1]:"+00:00";return(0,a.default)(e).utcOffset(r)}),e.s(["daysInMonth",0,e=>{let[t,a]=e instanceof Date?[e.getFullYear(),e.getMonth()]:[e.year(),e.month()];return new Date(t,a+1,0).getDate()},"formatLocalizedDateTime",0,n,"formatTime",0,r,"formatToLocalizedDate",0,(e,t,a="long",r)=>n(e,{dateStyle:a,timeZone:r},t),"formatToLocalizedTime",0,({date:e,locale:t,timeStyle:a="short",hour12:r,timeZone:l})=>n(e,{timeStyle:a,hour12:r,timeZone:l},t),"formatToLocalizedTimezone",0,(e,t,r,n="long")=>{let l=e instanceof a.default?e.toDate():e;return Intl.DateTimeFormat(t,{timeZoneName:n,timeZone:r}).formatToParts(l).find(e=>"timeZoneName"==e.type)?.value},"getTimeZone",0,e=>e.$x.$timezone,"isNextDayInTimezone",0,(e,t,a)=>{let n=r(e,24,t),o=r(e,24,a);if(e===o)return!1;let i=-1===o.localeCompare(n),s=-1===l(t,a);return i&&s},"isPreviousDayInTimezone",0,(e,t,a)=>{let n=r(e,24,t),o=r(e,24,a);if(e===o)return!1;let i=1===o.localeCompare(n),s=1===l(t,a);return i&&s},"isSupportedTimeZone",0,e=>{try{return(0,a.default)().tz(e),!0}catch(e){return!1}},"sortByTimezone",0,l,"weekdayToWeekIndex",0,e=>void 0===e?0:"number"==typeof e?e>=0&&e>=6?e:0:o.indexOf(e)||0,"yyyymmdd",0,e=>e instanceof Date?(0,a.default)(e).format("YYYY-MM-DD"):e.format("YYYY-MM-DD")])},450608,e=>{"use strict";function t(e,t){if(Object.is(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(let[a,r]of e)if(!Object.is(r,t.get(a)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let a of e)if(!t.has(a))return!1;return!0}let a=Object.keys(e);if(a.length!==Object.keys(t).length)return!1;for(let r of a)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}e.s(["shallow",()=>t])},986263,e=>{"use strict";var t=e.i(843476),a=e.i(271645),r=e.i(450608),n=e.i(623101);e.i(262202);var l=e.i(730589),o=e.i(875744),i=e.i(574153),s=e.i(12346),d=e.i(338688),u=e.i(255889),m=e.i(857739),f=e.i(451698),c=e.i(50929),y=e.i(331597),g=e.i(24509),h=e.i(294951),D=e.i(900802),p=e.i(676468);let b=({month:e,nextMonthButton:r,browsingDate:l,periodData:o})=>{let{t:i}=(0,s.useLocale)(),[d,u]=(0,a.useState)(!0),f=((e,t)=>{let{periodDays:a,periodType:r,periodCountCalendarDays:l,periodEndDate:o,periodStartDate:i}=t,s=function({periodType:e,periodDays:t,periodCountCalendarDays:a,periodStartDate:r,periodEndDate:l,allDatesWithBookabilityStatusInBookerTz:o,eventUtcOffset:i,bookerUtcOffset:s,_skipRollingWindowCheck:d}){let u=(0,n.default)(),m=u.utcOffset(i),f=u.utcOffset(s);switch(t=t||0,h.default.getSubLogger({prefix:["calculatePeriodLimits"]}).debug((0,D.safeStringify)({periodType:e,periodDays:t,periodCountCalendarDays:a,periodStartDate:r,periodEndDate:l,currentTime:m.format()})),e){case y.PeriodType.ROLLING:return{endOfRollingPeriodEndDayInBookerTz:(a?f.add(t,"days"):f.businessDaysAdd(t)).endOf("day"),startOfRangeStartDayInEventTz:null,endOfRangeEndDayInEventTz:null};case y.PeriodType.ROLLING_WINDOW:if(d)break;if(!o)throw Error("`allDatesWithBookabilityStatus` is required");return{endOfRollingPeriodEndDayInBookerTz:function({startDateInBookerTz:e,daysNeeded:t,allDatesWithBookabilityStatusInBookerTz:a,countNonBusinessDays:r}){let n,l=h.default.getSubLogger({prefix:["getRollingWindowEndDate"]});l.debug("called:",(0,D.safeStringify)({startDay:e.format(),daysNeeded:t}));let o=1,i=e.startOf("day"),s=g.ROLLING_WINDOW_PERIOD_MAX_DAYS_TO_CHECK,d=0,u=i;for(;d<t&&!(o>s);){let e=u.format("YYYY-MM-DD"),t=!!a[e]?.isBookable;t&&(d++,n=u),l.silly(`Loop Iteration: ${o}`,(0,D.safeStringify)({iterationDayBeginning:u.format(),isBookable:t,bookableDaysCount:d,rollingEndDay:n?.format(),allDatesWithBookabilityStatusInBookerTz:a})),u=r?u.add(1,"days"):u.businessDaysAdd(1),o++}let m=(n??u).endOf("day");return l.debug("Returning rollingEndDay",m.format()),m}({startDateInBookerTz:f,daysNeeded:t,allDatesWithBookabilityStatusInBookerTz:o,countNonBusinessDays:a}),startOfRangeStartDayInEventTz:null,endOfRangeEndDayInEventTz:null};case y.PeriodType.RANGE:{let e,t,a=n.default.utc(r),o=n.default.utc(l),s=e=>0===e.hour()&&0===e.minute()&&0===e.second()&&0===e.millisecond();if(s(a)&&s(o)){let r=a.format("YYYY-MM-DD"),l=o.format("YYYY-MM-DD");e=n.default.utc(`${r}T00:00:00Z`).subtract(i,"minute").utcOffset(i),t=n.default.utc(`${l}T00:00:00Z`).subtract(i,"minute").utcOffset(i).endOf("day")}else e=(0,n.default)(r).utcOffset(i).startOf("day"),t=(0,n.default)(l).utcOffset(i).endOf("day");return{endOfRollingPeriodEndDayInBookerTz:null,startOfRangeStartDayInEventTz:e,endOfRangeEndDayInEventTz:t}}}return{endOfRollingPeriodEndDayInBookerTz:null,startOfRangeStartDayInEventTz:null,endOfRangeEndDayInEventTz:null}}({periodType:r,periodDays:a,periodCountCalendarDays:l,periodStartDate:i,periodEndDate:o,allDatesWithBookabilityStatusInBookerTz:null,_skipRollingWindowCheck:!0,eventUtcOffset:0,bookerUtcOffset:0});return function({time:e,periodLimits:t}){let a=h.default.getSubLogger({prefix:["isTimeViolatingFutureLimit"]}),r=new Date(e);if(t.endOfRollingPeriodEndDayInBookerTz){let e=r.valueOf()>t.endOfRollingPeriodEndDayInBookerTz.valueOf();return e&&a.warn("Booking is out of bounds due to rolling period end day.",(0,D.safeStringify)({formattedDate:r.toISOString(),isAfterRollingEndDay:e,endOfRollingPeriodEndDayTs:t.endOfRollingPeriodEndDayInBookerTz.valueOf()})),e}if(t.startOfRangeStartDayInEventTz&&t.endOfRangeEndDayInEventTz){let e=r.valueOf()<t.startOfRangeStartDayInEventTz.valueOf(),n=r.valueOf()>t.endOfRangeEndDayInEventTz.valueOf();return(e||n)&&a.warn("Booking is out of bounds due to range start and end.",(0,D.safeStringify)({formattedDate:r.toISOString(),isBeforeRangeStart:e,isAfterRangeEnd:n,startOfRangeStartDayInEventTz:t.startOfRangeStartDayInEventTz.toDate().toISOString(),endOfRangeEndDayInEventTz:t.endOfRangeEndDayInEventTz.toDate().toISOString()})),e||n}return!1}({time:e.add(1,"month").startOf("month").toDate(),periodLimits:s})})(l,o),c=((e,t)=>{let{t:a}=(0,s.useLocale)();if(!e)return"";if("ROLLING"===t.periodType){let e=a(t.periodCountCalendarDays?"calendar_days":"business_days");return a("no_availability_rolling",{days:`${t.periodDays} ${e}`})}return"RANGE"===t.periodType?a("no_availability_range",{date:(0,n.default)(t.periodEndDate).format("MMMM D YYYY")}):""})(f,o);return(0,t.jsx)(p.Dialog,{open:d,onOpenChange:e=>{u(e)},children:(0,t.jsx)(p.DialogContent,{title:i("no_availability_in_month",{month:e}),type:"creation",description:c,preventCloseOnOutsideClick:!1,children:(0,t.jsxs)(p.DialogFooter,{children:[(0,t.jsx)(p.DialogClose,{color:f?"primary":"secondary",onClick:()=>{u(!1)},"data-testid":"close_dialog_button",children:i("close")}),!f&&(0,t.jsx)(m.Button,{color:"primary",onClick:r,"data-testid":"view_next_month",EndIcon:"arrow-right",children:i("view_next_month")})]})})})},v=({date:e,active:a,disabled:r,away:n,emoji:o,customClassName:i,showMonthTooltip:d,isFirstDayOfNextMonth:m,...f})=>{let{t:y}=(0,s.useLocale)(),g=(0,l.useEmbedStyles)("enabledDateButton"),h=(0,l.useEmbedStyles)("disabledDateButton"),D=(0,t.jsxs)("button",{type:"button",style:r?{...h}:{...g},className:(0,u.default)("disabled:text-bookinglighter absolute bottom-0 left-0 right-0 top-0 mx-auto w-full rounded-md border-2 border-transparent text-center text-sm font-medium transition disabled:cursor-default disabled:border-transparent disabled:font-light ",a?"bg-brand-default text-brand":r?`${i?"":" text-mute"}`:`${!i?.dayActive?"hover:border-brand-default text-emphasis bg-emphasis":`hover:border-brand-default ${i.dayActive}`}`),"data-testid":"day","data-disabled":r,disabled:r,...f,children:[n&&(0,t.jsx)("span",{"data-testid":"away-emoji",children:o}),!n&&e.date(),e.isToday()&&(0,t.jsx)("span",{className:(0,u.default)("bg-brand-default absolute left-1/2 top-1/2 flex h-[5px] w-[5px] -translate-x-1/2 translate-y-[8px] items-center justify-center rounded-full align-middle sm:translate-y-[12px]",a&&"bg-brand-accent"),children:(0,t.jsx)("span",{className:"sr-only",children:y("today")})})]}),p=d?(0,t.jsx)(c.Tooltip,{content:e.format("MMMM"),children:D}):D;return(0,t.jsxs)(t.Fragment,{children:[m&&(0,t.jsx)("div",{className:(0,u.default)("absolute top-0 z-10 mx-auto w-fit roun
1ded-full font-semibold uppercase tracking-wide",a?"text-white":"text-default",r&&"bg-emphasis"),style:{fontSize:"10px",lineHeight:"13px",padding:r?"0 3px":"3px 3px 3px 4px"},children:e.format("MMM")}),p]})},w=({minDate:e,excludedDates:s=[],browsingDate:d,weekStart:u,DayComponent:m=v,selected:c,month:y,nextMonthButton:g,eventSlug:h,slots:D,customClassName:p,isBookingInPast:w,periodData:x,isCompact:S,showNoAvailabilityDialog:O=!0,...P})=>{let T=(0,l.useSlotsViewOnSmallScreen)();(0,o.useBookerStoreContext)(e=>e.layout);let k=function({browsingDate:e,minDate:t=new Date,includedDates:a}){let r=[],l=new Date(e.getFullYear(),e.getMonth(),(0,i.daysInMonth)(e));for(let o=e>t?e:t;o<l||(0,n.default)(o).isSame(l,"day");o=new Date(o.getFullYear(),o.getMonth(),o.getDate()+1))(!a||a.includes((0,i.yyyymmdd)(o)))&&r.push((0,i.yyyymmdd)(o));return r}({browsingDate:d.toDate(),minDate:e,includedDates:P.includedDates}),Y=(0,n.default)(),E=d.startOf("month"),M=Y.isAfter(E.add(2,"week")),I=[],j=e=>(d.set("date",e).day()-u+7)%7,z=(0,i.daysInMonth)(d),C=M&&!S;if(C){I=Array(j(8)).fill(null);for(let e=8;e<=z;e++)I.push(d.set("date",e));let e=I.length%7,t=(e>0?7-e:0)+7,a=d.add(1,"month");for(let e=0;e<t;e++)I.push(a.set("date",1+e))}else{I=Array(j(1)).fill(null);for(let e=1;e<=z;e++)I.push(d.set("date",e))}let[B]=(0,o.useBookerStoreContext)(e=>[e.selectedDatesAndTimes],r.shallow),N=I.map(e=>{if(!e)return{day:null,disabled:!0};let t=(0,i.yyyymmdd)(e),a=D?.[t]||[],r=a.find(e=>e.away)||null,n=e.month()!==d.month(),l=M&&!S&&n&&1===e.date(),o=k?.includes(t),u=s.includes(t),m=a.some(e=>!e.away),f=a.length>0&&a.every(e=>e.away),c=r?.toUser||r?.showNotePublicly;return{day:e,disabled:f?!c:n?!m:!o||u,away:f,emoji:r?.emoji,isFirstDayOfNextMonth:l}});return(0,a.useEffect)(()=>{if(T||c instanceof Array)return;let e=N.find(e=>!e.disabled)?.day,t=!!c&&N.some(({day:e,disabled:t})=>{if(e&&(0,i.yyyymmdd)(e)===(0,i.yyyymmdd)(c)&&!t)return!0});if(!t&&e){let t=!c?.isValid();P.onChange(e,t)}t&&P.onChange((0,n.default)(c),!0),e||P.onChange(null)}),(0,t.jsxs)(t.Fragment,{children:[N.map(({day:e,disabled:a,away:r,emoji:l,isFirstDayOfNextMonth:o},s)=>(0,t.jsx)("div",{className:"relative w-full pt-[100%]",children:null===e?(0,t.jsx)("div",{},`e-${s}`):P.isLoading?(0,t.jsx)("button",{className:"bg-cal-muted text-muted absolute bottom-0 left-0 right-0 top-0 mx-auto flex w-full items-center justify-center rounded-sm border-transparent text-center font-medium opacity-90 transition",disabled:!0,children:(0,t.jsx)(f.SkeletonText,{className:"h-8 w-9"})},`e-${s}`):(0,t.jsx)(m,{customClassName:{dayContainer:p?.datePickerDate,dayActive:p?.datePickerDateActive},date:e,onClick:()=>{P.onChange(e),P?.scrollToTimeSlots?.()},disabled:a,active:Array.isArray(c)?Array.isArray(c)&&c?.some(t=>(0,i.yyyymmdd)(t)===(0,i.yyyymmdd)(e)):!!c&&(0,i.yyyymmdd)(c)===(0,i.yyyymmdd)(e)||!!h&&!!B&&!!B[h]&&Object.keys(B[h]).length>0&&Object.keys(B[h]).some(t=>(0,i.yyyymmdd)((0,n.default)(t))===(0,i.yyyymmdd)(e)),away:r,emoji:l,showMonthTooltip:C&&!a&&e.month()!==d.month(),isFirstDayOfNextMonth:o})},null===e?`e-${s}`:`day-${e.format()}`)),!P.isLoading&&!w&&k&&k?.length===0&&O&&(0,t.jsx)(b,{month:y,nextMonthButton:g,browsingDate:d,periodData:x})]})},x=({weekStart:e=0,className:a,locale:r,selected:l,onMonthChange:i,slots:c,customClassNames:y,includedDates:g,periodData:h={periodStartDate:null,periodEndDate:null,periodCountCalendarDays:null,periodDays:null,periodType:"UNLIMITED"},isCompact:D,showNoAvailabilityDialog:p,...b})=>{let v=b.minDate,x=b.browsingDate||(0,n.default)().startOf("month"),S=v&&x.valueOf()<v.valueOf()?(0,n.default)(v):x,{i18n:O,t:P}=(0,s.useLocale)(),T=(0,o.useBookerStoreContext)(e=>e.bookingData),k=!!T&&new Date(T.endTime)<new Date,Y=e=>{i&&i(S.add(e,"month"))},E=S?new Intl.DateTimeFormat(O.language,{month:"long"}).format(new Date(S.year(),S.month())):null;return(0,t.jsxs)("div",{className:a,children:[(0,t.jsxs)("div",{className:"mb-1 flex items-center justify-between text-xl",children:[(0,t.jsx)("span",{className:"text-default w-1/2 text-base",children:S?(0,t.jsxs)("time",{dateTime:S.format("YYYY-MM"),"data-testid":"selected-month-label",children:[(0,t.jsx)("strong",{className:(0,u.default)("text-emphasis font-semibold",y?.datePickerTitle),children:E})," ",(0,t.jsx)("span",{className:(0,u.default)("text-subtle font-medium",y?.datePickerTitle),children:S.format("YYYY")})]}):(0,t.jsx)(f.SkeletonText,{className:"h-8 w-24"})}),(0,t.jsx)("div",{className:"text-emphasis",children:(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)(m.Button,{className:(0,u.default)("group p-1 opacity-70 transition hover:opacity-100 rtl:rotate-180",!S.isAfter((0,n.default)())&&"disabled:text-bookinglighter hover:bg-background hover:opacity-70",y?.datePickerToggle),onClick:()=>Y(-1),disabled:!S.isAfter((0,n.default)()),"data-testid":"decrementMonth",color:"minimal",variant:"icon",StartIcon:"chevron-left","aria-label":P("view_previous_month")}),(0,t.jsx)(m.Button,{className:(0,u.default)("group p-1 opacity-70 transition hover:opacity-100 rtl:rotate-180",`${y?.datePickerToggle}`),onClick:()=>Y(1),"data-testid":"incrementMonth",color:"minimal",variant:"icon",StartIcon:"chevron-right","aria-label":P("view_next_month")})]})})]}),(0,t.jsx)("div",{className:"border-subtle mb-2 grid grid-cols-7 gap-4 border-b border-t text-center md:mb-0 md:border-0",children:(0,d.weekdayNames)(r,e,"short").map(e=>(0,t.jsx)("div",{className:(0,u.default)("text-emphasis my-4 text-xs font-medium uppercase tracking-widest",y?.datePickerDays),children:e},e))}),(0,t.jsx)("div",{className:"relative grid grid-cols-7 grid-rows-6 gap-1 text-center",children:(0,t.jsx)(w,{customClassName:{datePickerDate:y?.datePickersDates,datePickerDateActive:y?.datePickerDatesActive},weekStart:e,selected:l,...b,browsingDate:S,month:E,nextMonthButton:()=>
1Y(1),slots:c,includedDates:g,isBookingInPast:k,periodData:h,isCompact:D,showNoAvailabilityDialog:p})})]})};e.s(["DatePicker",()=>x,"default",0,x],986263)}]); 2 3//# sourceMappingURL=621153548137ddf8.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.