1try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="54c660d9-bfdc-4082-a2a4-6b1419c5e72b",e._sentryDebugIdIdentifier="sentry-dbid-54c660d9-bfdc-4082-a2a4-6b1419c5e72b")}()}catch(e){}"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[38817],{61198:(e,t,i)=>{i.d(t,{G:()=>j,g:()=>S});var l=i(86739),a=i(50979),n=i(46479),r=i.n(n),o=i(25963),s=i(50844),d=i(61062),u=i(92954),c=i(93593),b=i(60263),p=i(369),v=i(31606),x=i(60507),f=i(69695);function h(){let e=(0,l._)(["\n query PartnerProductPackageQueryEnterpriseBookingFlowTime(\n $id: UUID!\n $virtualTourType: VirtualTourProductType!\n $spaceSize: Int\n $virtualTourTier: VirtualTourProductTier!\n $addons: [GetProductForRealEstateAddonInput]\n $productId: ID\n ) {\n partner: partnerById(uid: $id) {\n uid\n getProductForRealEstate(\n virtualTourType: $virtualTourType\n spaceSize: $spaceSize\n virtualTourTier: $virtualTourTier\n addons: $addons\n productId: $productId\n ) {\n realEstatePackage {\n uid\n shootType {\n category\n displayName\n }\n duration\n price\n virtualTourProductType\n virtualTourProductTier\n }\n }\n }\n }\n "]);return h=function(){return e},e}function m(){let e=(0,l._)(["\n query PackageShortNoticeAddonQueryEnterpriseBookingFlowTime(\n $partnerId: UUID!\n ) {\n partner: partnerById(uid: $partnerId) {\n uid\n strictMode\n shortNoticeSettings {\n enabled\n upperLimitMinutes\n addon {\n uid\n price\n }\n }\n }\n }\n "]);return m=function(){return e},e}let g=e=>{let{timeSlot:{availableProvidersUids:t,availableOnDemandProvidersUids:i,availableOnDemandRelatedSpecialistProvidersUids:l,filteredAvailableProvidersUids:a},shortNoticeBookingsEnabled:n,strictMode:r}=e;return!0===n&&(!0===r?0===t.length&&(null!=l?l:[]).length>0:0===t.length&&(null!=i?i:[]).length>0)},y=e=>{let{style:t={}}=e;return(0,a.jsx)("div",{style:{position:"absolute",right:7,justifyContent:"flex-end",backgroundColor:u.Gh,height:10,width:10,borderRadius:10,...t}})},j=e=>{let{startDate:t,classesButton:i,marginRight:l=0,flexMode:n=!1,noSideMargin:o=!1,isShortNotice:s=!1,...d}=e;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("button",{"data-test":"time-slot",style:{width:!0===n?void 0:150,marginRight:l,marginTop:8.5,marginLeft:o?void 0:8.5,justifyContent:"center",alignItems:"center",display:"flex",position:"relative"},...d,className:"jsx-44a0756026ec37a4 "+(d&&null!=d.className&&d.className||i||""),children:[(0,a.jsx)("p",{className:"jsx-44a0756026ec37a4 button-content-text",children:t}),!0===s&&(0,a.jsx)(y,{})]}),(0,a.jsx)(r(),{id:"44a0756026ec37a4",children:"button.jsx-44a0756026ec37a4{background-color:transparent;border:none;border:1px solid#e8edf5;border-bottom:1px solid#e8edf5;padding-top:5px;padding-bottom:5px;border-radius:2px;margin-left:0px;transition:color.15s ease-in-out,background-color.15s ease-in-out,border-color.15s ease-in-out,box-shadow.15s ease-in-out}button.jsx-44a0756026ec37a4:disabled{cursor:not-allowed}button.jsx-44a0756026ec37a4:focus{outline:none}button.jsx-44a0756026ec37a4:not(:disabled):focus,button.jsx-44a0756026ec37a4:not(:disabled):active{box-shadow:0 0 0px 4px rgba(20,27,36,.2)}.button-content-text.jsx-44a0756026ec37a4{color:#71767e;font-size:13px;font-weight:bold;margin:0px}button.jsx-44a0756026ec37a4:disabled p.jsx-44a0756026ec37a4{color:#e0e0e0}.button-hour-item-disabled.jsx-44a0756026ec37a4{color:#e0e0e0;background:#f5f7f9;border:1px solid#f5f7f9}"})]})},D=e=>{var t,i,l,n,s,b,p;let{moment:v,context:f,booking:h,onSelect:m,calculatedProduct:D,shortNotice:S,strictMode:T,preselectedProviderId:N,serviceType:P}=e,[k,_]=o.useState(),[z]=o.useState(()=>v.tz.guess()),w=null!=(n=null==h?void 0:h.timezone)?n:z,I=o.useCallback(e=>{let{selectedDate:t,providersAvailability:i}=e,l=v(t).tz(w).startOf("day"),a=v(t).tz(w).endOf("day"),n=v(t).tz(w).startOf("day").add(6,"hour"),r=v(t).tz(w).startOf("day").add(11.5,"hour"),o=v(t).tz(w).startOf("day").add(17.5,"hour"),s=v(t).tz(w).startOf("day").add(23.5,"hour"),d=i.filter(e=>{let{startDate:t}=e;return t>l&&t<a}),u=d.filter(e=>{let{startDate:t}=e;return t>=n&&t<=r});return{leftDatesAvailability:u,middleDatesAvailability:d.filter(e=>{let{startDate:t}=e;return t>r&&t<=o}),rightDatesAvailability:d.filter(e=>{let{startDate:t}=e;return t>o&&t<=s}),currentDayAvailability:d}},[v,w]),A=o.useRef({divideProvidersAvailability:I});o.useEffect(()=>{A.current.divideProvidersAvailability=I});let{isPending:E,result:B}=(0,c.s)({urlToFetch:"/api/v2/partners/".concat(f.partner.uid,"/provider-availability"),token:f.token,queryToFetch:(()=>{var e,t,i,l;let a=null!=(e=null==h?void 0:h.timezone)?e:z;if(h&&h.lat&&h.lng)return{days:1,lat:h.lat,lng:h.lng,timezone:a,addons:(h.addons||[]).join(","),booking_duration:null!=(t=null==D?void 0:D.duration)?t:h.booking_duration,shoottype:null!=(i=h.shoottype)?i:null==D?void 0:D.shootType.category,start_at:v(h.startDate).tz(a).startOf("day").format(),virtual_tour_product_type:null==D?void 0:D.virtualTourProductType,virtual_tour_product_tier:null==D?void 0:D.virtualTourProductTier,auto_360_product_type:null==h?void 0:h.auto360Type,ecommerce_product_style:null==h?void 0:h.productStyle,ecommerce_product_size:null==h?void 0:h.productSize,extraDistance:null==h?void 0:h.extraDistance,provider_id:N,new_addons:(null!=(l=null==h?void 0:h.newAddons)?l:[]).map(e=>JSON.stringify({uid:e})),service_type:P}})()}),M=e=>{var t,i;let{isShortNotice:l,strictMode:a,item:n,extraDistance:r}=e;return!0===l&&null!=r||(!0===l?!0===a?0===(null!=(t=n.availableOnDemandRelatedSpecialistProvidersUids)?t:[]).length:0===(null!=(i=n.availableOnDemandProvi
1dersUids)?i:[]).length:0===n.filteredAvailableProvidersUids.length)},O=null==N&&"videography"!==P&&(null==S||null==(t=S.settings)?void 0:t.enabled)===!0,U=!0===O&&null!=(null!=(s=null==k?void 0:k.currentDayAvailability)?s:[]).find(e=>{var t,i;return!0===g({timeSlot:e,shortNoticeBookingsEnabled:null!=(i=null==S||null==(t=S.settings)?void 0:t.enabled)&&i,strictMode:T})});return o.useEffect(()=>{if(!E&&B){var e;let t=null!=(e=null==h?void 0:h.timezone)?e:z,i=B.results.map(e=>{var i;let{time_range:[l,a],available_providers_uids:n,available_specialist_providers_uids:r,available_related_specialist_providers_uids:o,available_short_notice_providers_uids:s,available_short_notice_related_specialist_providers_uids:d}=e,u=v(l).tz(t),c=(null==(i=f.partner)?void 0:i.strictMode)===!0?o:n;return{startDate:u,availableProvidersUids:n,availableSpecialistProvidersUids:r,availableRelatedSpecialistProvidersUids:o,availableOnDemandProvidersUids:s,availableOnDemandRelatedSpecialistProvidersUids:d,filteredAvailableProvidersUids:c}});_(A.current.divideProvidersAvailability({selectedDate:v(null==h?void 0:h.startDate),providersAvailability:i}))}},[E,B,h,v,I,f.partner,z]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{style:{display:"flex",flexDirection:"column",flex:1,border:"1.07095px solid #E8EDF5",borderRadius:2,paddingBottom:8.5},className:"jsx-5b9934fab621b733",children:[h&&h.startDate&&(0,a.jsxs)("div",{style:{position:"relative",color:"#141B24",fontSize:14,fontWeight:"bold",padding:16,textAlign:"center"},className:"jsx-5b9934fab621b733",children:[(0,a.jsx)("h5",{style:{margin:0},className:"jsx-5b9934fab621b733 date-title",children:v(h.startDate).tz(w).format("DD MMM YYYY")}),!0===U&&null!=S&&(0,a.jsxs)("div",{style:{display:"flex",alignItems:"center",position:"absolute",right:16,top:0,height:"100%"},className:"jsx-5b9934fab621b733",children:[(0,a.jsx)(y,{style:{position:"relative",alignSelf:"center"}}),(0,a.jsxs)("div",{style:{display:"flex",flexDirection:"column",alignItems:"start"},className:"jsx-5b9934fab621b733",children:[(0,a.jsx)("small",{style:{color:u.Gh},className:"jsx-5b9934fab621b733",children:(0,a.jsxs)("strong",{className:"jsx-5b9934fab621b733",children:["Short notice (","<",(null!=(b=null==S||null==(i=S.settings)?void 0:i.upperLimitMinutes)?b:0)/60," ","hrs)"]})}),(0,a.jsx)("small",{style:{color:"#6c757d",fontWeight:"normal"},className:"jsx-5b9934fab621b733",children:"".concat((0,x.Ql)({value:null!=(p=null==(l=S.addon)?void 0:l.price)?p:0})," credits fee applies")})]})]})]}),k?(0,a.jsxs)("div",{style:{display:"flex",flexDirection:"row"},className:"jsx-5b9934fab621b733",children:[(0,a.jsxs)("div",{style:{display:"flex",flexDirection:"column",flex:1,textAlign:"center"},className:"jsx-5b9934fab621b733",children:[(0,a.jsx)("div",{className:"jsx-5b9934fab621b733 section-header",children:"Morning"}),k&&((null==k?void 0:k.leftDatesAvailability)||[]).map((e,t)=>(0,a.jsx)(j,{onClick:()=>m({...e,isShortNotice:g({timeSlot:e,shortNoticeBookingsEnabled:O,strictMode:T})}),flexMode:!0,disabled:M({isShortNotice:g({timeSlot:e,shortNoticeBookingsEnabled:O,strictMode:T}
1),strictMode:T,item:e,extraDistance:null==h?void 0:h.extraDistance}),startDate:e.startDate.format("h:mm A"),isShortNotice:g({timeSlot:e,shortNoticeBookingsEnabled:O,strictMode:T}),classesButton:"button-hour-item".concat(!0===M({isShortNotice:g({timeSlot:e,shortNoticeBookingsEnabled:O,strictMode:T}),strictMode:T,item:e,extraDistance:null==h?void 0:h.extraDistance})?" button-hour-item-disabled":"")},t))]}),(0,a.jsxs)("div",{style:{display:"flex",flexDirection:"column",flex:1,textAlign:"center"},className:"jsx-5b9934fab621b733",children:[(0,a.jsx)("div",{className:"jsx-5b9934fab621b733 section-header",children:"Afternoon"}),k&&((null==k?void 0:k.middleDatesAvailability)||[]).map((e,t)=>(0,a.jsx)(j,{onClick:()=>m({...e,isShortNotice:g({timeSlot:e,shortNoticeBookingsEnabled:O,strictMode:T})}),flexMode:!0,disabled:M({isShortNotice:g({timeSlot:e,shortNoticeBookingsEnabled:O,strictMode:T}),strictMode:T,item:e,extraDistance:null==h?void 0:h.extraDistance}),startDate:e.startDate.format("h:mm A"),isShortNotice:g({timeSlot:e,shortNoticeBookingsEnabled:O,strictMode:T}),classesButton:"button-hour-item".concat(!0===M({isShortNotice:g({timeSlot:e,shortNoticeBookingsEnabled:O,strictMode:T}
1),strictMode:T,item:e,extraDistance:null==h?void 0:h.extraDistance})?" button-hour-item-disabled":"")},t))]}),(0,a.jsxs)("div",{style:{display:"flex",flexDirection:"column",flex:1,textAlign:"center"},className:"jsx-5b9934fab621b733",children:[(0,a.jsx)("div",{className:"jsx-5b9934fab621b733 section-header",children:"Evening"}),k&&(k.rightDatesAvailability||[]).map((e,t)=>(0,a.jsx)(j,{onClick:()=>m({...e,isShortNotice:g({timeSlot:e,shortNoticeBookingsEnabled:O,strictMode:T})}),disabled:M({isShortNotice:g({timeSlot:e,shortNoticeBookingsEnabled:O,strictMode:T}),strictMode:T,item:e,extraDistance:null==h?void 0:h.extraDistance}),flexMode:!0,startDate:e.startDate.format("h:mm A"),marginRight:8.5,isShortNotice:g({timeSlot:e,shortNoticeBookingsEnabled:O,strictMode:T}),classesButton:"button-hour-item".concat(!0===M({isShortNotice:g({timeSlot:e,shortNoticeBookingsEnabled:O,strictMode:T}),strictMode:T,item:e,extraDistance:null==h?void 0:h.extraDistance})?" button-hour-item-disabled":"")},t))]})]}):(0,a.jsx)("div",{style:{height:511,display:"flex"},className:"jsx-5b9934fab621b733",children:(0,a.jsx)(d.c,{})})]}),(0,a.jsx)(r(),{id:"5b9934fab621b733",children:".section-header.jsx-5b9934fab621b733{color:#c1c8d4;font-size:12px;padding-top:8.5px;padding-bottom:8.5px;border-top:1px solid#e8edf5;border-bottom:1px solid#e8edf5}.button-hour-item.jsx-5b9934fab621b733{color:#71767e;font-size:13px;padding-top:5px;padding-bottom:5px;border:1px solid#e8edf5;border-bottom:1px solid#e8edf5;margin-left:8.5px;margin-top:8.5px;font-weight:bold;border-radius:2px}.button-hour-item-last.jsx-5b9934fab621b733{margin-right:8.5px}.button-hour-item-disabled.jsx-5b9934fab621b733{color:#e0e0e0;background:#f5f7f9;border:none}"})]})},S=e=>{var t,i,l,n,r,o,c,x;let{booking:g,context:y,serviceType:j,onDismiss:S,preselectedProvider:T}=e,N=(0,b.s)(),P=(0,p.p1)({step:p.mz.times}),k=(0,v.IT)((0,v.J1)(h()),{variables:{id:y.partner.uid,virtualTourType:null==g?void 0:g.virtualTourType,spaceSize:null==g?void 0:g.spaceSize,virtualTourTier:null==g?void 0:g.virtualTourTier,addons:(null==g?void 0:g.newAddons)!=null?null==g?void 0:g.newAddons.map(e=>({id:e})):[],productId:!0===y.partner.realEstateBookingByDurationEnabled?null==g?void 0:g.product_uid:void 0},fetchPolicy:"cache-and-network",skip:!(null==g?void 0:g.virtualTourType)||!(null==g?void 0:g.spaceSize)&&!1===y.partner.realEstateBookingByDurationEnabled||!(null==g?void 0:g.virtualTourTier)||!(null==g?void 0:g.product_uid)&&!0===y.partner.realEstateBookingByDurationEnabled}),_=(0,v.IT)((0,v.J1)(m()),{variables:{partnerId:y.partner.uid},fetchPolicy:"cache-and-network"}),z=null==(l=k.data)||null==(i=l.partner)||null==(t=i.getProductForRealEstate)?void 0:t.realEstatePackage,w=null==(r=_.data)||null==(n=r.partner)?void 0:n.shortNoticeSettings,I=(null==w?void 0:w.addon)!=null?{...null==w?void 0:w.addon}:void 0,A=null!=(x=null==(c=_.data)||null==(o=c.partner)?void 0:o.strictMode)&&x;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(p.z2,{progress:P.progress,prev:async()=>{var e;return null==(e=P.onPrev)?void 0:e.call(P)},hasPrevStep:P.hasPrevStep,onDismiss:()=>S({step:p.mz.times,booking:g})}),null!=T&&(0,a.jsx)(f.y,{preselectedProvider:T}),(null==g?void 0:g.endCustomerSchedule)===!0||(null==g?void 0:g.hasLongDistanceCoverage)===!1?(0,a.jsxs)("div",{style:{display:"flex",flexDirection:"row",flex:1},children:[(0,a.jsx)(d.c,{}),(0,a.jsx)(s.A,{didMount:()=>P.onNext({extraQuery:{booking:g},skipMe:!0})})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{style:{paddingRight:16,paddingBottom:16,paddingLeft:16},children:[(0,a.jsx)("div",{style:{height:32}}),(0,a.jsx)(u.vt,{title:"What time would you like to start your ".concat("videography"===j?"videoshoot":"shoot","?")}),null!=T?(0,a.jsx)(u.zd,{"data-test":"rebook-time-subtitle",subtitle:"Only showing times when ".concat(null==T?void 0:T.firstName," is available.")}):null,N.isPending||null==N.result||k.loading?(0,a.jsx)(d.c,{}):(0,a.jsx)(D,{calculatedProduct:z,context:y,booking:g,moment:N.result,shortNotice:{settings:w,addon:I},preselectedProviderId:null==T?void 0:T.id,strictMode:null!=A&&A,serviceType:j,onSelect:e=>{P.onNext({extraQuery:{booking:{...g,startDate:e.startDate.toISOString(),availableProvidersUids:e.filteredAvailableProvidersUids.slice(0,p.zc),isShortNotice:e.isShortNotice}}})}})]}),(0,a.jsx)("div",{style:{flex:1}})," "]})]})}}}]);
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.