1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4882],{48695:function(e,l,t){"use strict";var i,a,s=t(52983);function n(){return(n=Object.assign?Object.assign.bind():function(e){for(var l=1;l<arguments.length;l++){var t=arguments[l];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e}).apply(this,arguments)}l.Z=function(e){return s.createElement("svg",n({width:11,height:11,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),i||(i=s.createElement("g",{clipPath:"url(#icon-promo-tag_svg__a)"},s.createElement("path",{d:"M10.1.5 6 .3l-6 6 4.2 4.2 6-6-.1-4ZM6.7 3.9c-.5-.5-.5-1.2 0-1.7s1.2-.5 1.7 0 .5 1.2 0 1.7-1.3.5-1.7 0Z",fill:"currentColor"}))),a||(a=s.createElement("defs",null,s.createElement("clipPath",{id:"icon-promo-tag_svg__a"},s.createElement("path",{fill:"#fff",d:"M0 0h11v11H0z"})))))}},83848:function(e,l,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/booking",function(){return t(80667)}])},17481:function(e,l,t){"use strict";t.d(l,{Z:function(){return f}});var i=t(97458),a=t(52983),s=t(49588),n=t(98680),r=t(47411),o=t(55462),c=t(25527),d=t(49122),u=t(15783),x=t(61954),m=t(35031),p=t(14517),h=t(85494),v=t(59328);function f(e){var l;let{primaryColor:t,secondaryColor:f}=e,b=(0,c.useStripe)(),j=(0,c.useElements)(),{register:g,handleSubmit:y,watch:N,formState:w,reset:C}=(0,n.cI)(),{errors:k}=w,{closeModal:M}=(0,s.ws)(),{defaultPaymentMethod:S}=(0,s.S9)(),[Z,{loading:E}]=(0,d.oCe)({refetchQueries:["GetCustomerPaymentsMethods"]}),[I,T]=(0,a.useState)(),[_,P]=(0,a.useState)(!1),A=N("isDefault"),D=async e=>{if(P(!0),T(null),!b||!j)return;let l=await b.createToken(j.getElement(c.CardNumberElement),{name:e.cardHolder});if(l.error){T(l.error.message),P(!1),C();return}Z({variables:{input:{sourceId:l.token.id,nickname:(null==e?void 0:e.cardName)||void 0,setDefault:A||!1}}}),M(),P(!1),C()};return(0,i.jsx)(v.k,{modalId:s.Ti.AddCard,title:"Add a Card",saveButtonBackgroundColor:t||u.bG.Navy,saveButtonTextColor:t?(0,h._)(t):u.bG.White,cancelButtonTextColor:t,onSaveClickRaw:y(D),afterClose:()=>{C()},saveButtonLoading:_||E,className:t&&(0,m.M)("text",t),children:(0,i.jsxs)("form",{className:"grid grid-cols-2 gap-x-14 gap-y-6 pb-6 md:gap-y-10 md:pb-8",children:[(0,i.jsx)(x.j,{containerClassName:"col-span-2",label:"Payment Method Nickname (Optional)",variant:"underlined",...g("cardName"),primaryColor:t}),(0,i.jsx)(x.j,{containerClassName:"col-span-2",label:"Name on Card",variant:"underlined",error:null===(l=k.cardHolder)||void 0===l?void 0:l.message.toString(),...g("cardHolder",{required:"Name on Card is required"}),primaryColor:t}),(0,i.jsxs)("div",{className:"col-span-2",children:[(0,i.jsx)("span",{className:"helvetica-10-400 block",children:"Credit Card Number"}),(0,i.jsx)(c.CardNumberElement,{className:(0,p.Z)("border-b border-opacity-40 pb-2.5 pt-1",(0,m.M)("border",t||u.bG.CulinistaBlack))})]}),(0,i.jsxs)("div",{className:"col-span-2 md:col-span-1",children:[(0,i.jsx)("span",{className:"helvetica-10-400 block",children:"Exp. Date"}),(0,i.jsx)(c.CardExpiryElement,{className:(0,p.Z)("border-b border-opacity-40 pb-2.5 pt-1",(0,m.M)("border",t||u.bG.CulinistaBlack))})]}),(0,i.jsxs)("div",{className:"col-span-2 md:col-span-1",children:[(0,i.jsx)("span",{className:"helvetica-10-400 block",children:"CVC"}),(0,i.jsx)(c.CardCvcElement,{className:(0,p.Z)("border-b border-opacity-40 pb-2.5 pt-1",(0,m.M)("border",t||u.bG.CulinistaBlack))})]}),(0,i.jsxs)("div",{className:"col-span-2 flex flex-col gap-y-2 pt-2 md:gap-y-4 md:pt-0",children:[(0,i.jsx)(r.W,{variant:"customer-panel",label:"Make this my default payment method.",labelClassName:(0,o.cn)('before:content-[""] before:inline-block before:w-[18px] before:h-[18px] before:mr-2 before:border before:p-[3px] before:bg-clip-content',(0,m.M)("before:border",t||u.bG.CulinistaBlack),{"opacity-70 before:border-opacity-40":!A,[(0,m.M)("before:bg",t||u.bG.CulinistaBlack)]:A}),className:"hidden cursor-pointer",...g("isDefault")}),S&&(0,i.jsxs)("p",{className:(0,o.cn)("helvetica-14-400 p-2 text-ar-culinista-black transition-opacity",(0,m.M)("bg",f?(0,h._)(f):u.bG.NavyLight),{"opacity-100":A,"opacity-0":!A}),children:[(0,i.jsx)("span",{className:"helvetica-14-500",children:"Please note:"}
1)," ","Your current default card is ".concat(null==S?void 0:S.brand," ending in ").concat(null==S?void 0:S.last4,".\n Checking this option will change your default card.")]})]}),I?(0,i.jsx)("p",{className:"col-span-2 text-center text-ar-red",children:I}):null]})})}},80667:function(e,l,t){"use strict";t.r(l),t.d(l,{__N_SSP:function(){return eE},default:function(){return eI}});var i=t(97458),a=t(52983),s=t(26155),n=t(14517),r=t(92156),o=t(39957),c=t(11158),d=t(85517),u=t(42424),x=t.n(u),m=t(79096),p=t(49658);function h(e){let{children:l,className:t,goToStep:a}=e,{goToNextStep:s,goToPreviousStep:n,goToStepIndex:r}=(0,p.V)();return(0,i.jsx)("button",{type:"button",onClick:()=>{"next"===a&&s(),"prev"===a&&n(),"number"==typeof a&&r(a)},className:t,children:l})}var v=t(7279),f=t(35031),b=t(30361),j=t(34376),g=t(21967);function y(e){let l,{children:t,index:a,isClickable:s,isActive:r,isLastOne:d}=e;return l=s&&!r?(0,i.jsx)(h,{goToStep:a,children:(0,i.jsx)("div",{children:t})}):!s&&r?(0,i.jsx)("div",{children:t}):(0,i.jsx)("div",{className:"opacity-40",children:t}),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:"helvetica-12-500 md:helvetica-14-500 whitespace-nowrap",children:l}),(0,i.jsx)(o.k,{icon:(0,i.jsx)(c.Z,{}),size:8,className:(0,n.Z)("shrink-0",{hidden:d})})]})}function N(e){let{steps:l}=e,{getSettings:t}=(0,m.b)(),{getService:a}=(0,v.o)(),{activeStep:s}=t(),{user:c}=(0,g.jJ)(),{primaryColor:u,primaryColorAlternative:p}=a(),h=(0,j.useRouter)(),{isLoggedIn:N}=c,w=l[s-1],C=l.filter(e=>e.id!==b.$e.Confirmation&&e.id!==b.$e.MealPrepConfirmation&&e.id!==b.$e.MealPrepConfirmationLoggedIn).map((e,l)=>({index:l+1,title:e.dictionary.title}));return(0,i.jsxs)("div",{className:(0,n.Z)("sticky top-0 z-20 flex w-full select-none flex-col 2xl:flex-row",(0,f.M)("bg",u),(0,f.M)("text",p)),children:[(0,i.jsxs)("div",{className:"flex h-14 w-full",children:[(0,i.jsx)(x(),{href:r.y.home(),children:(0,i.jsx)("div",{className:(0,n.Z)("flex h-full w-14 items-center justify-center border-r border-opacity-40 md:w-28",(0,f.M)("border",p)),children:(0,i.jsx)(o.k,{icon:(0,i.jsx)(d.Z,{}),size:30})})}),(0,i.jsx)("div",{className:"flex flex-1 items-center gap-x-3 overflow-auto px-3 md:gap-x-4 md:px-8",children:C.map(e=>{let l=e.index<s,t=e.index===s,a=C.length===e.index;return(0,i.jsx)(y,{index:e.index,isClickable:l,isActive:t,isLastOne:a,children:e.title},e.index)})})]}),!N&&!w.hideLoginButton&&(0,i.jsxs)("button",{type:"button",className:(0,n.Z)("helvetica-14-500 h-14 w-full 2xl:hidden 2xl:max-w-[382px]",(0,f.M)("text",u),(0,f.M)("bg",p)),onClick:()=>{h.push(r.y.signIn({backToOrder:"true"}))},children:["Already a Culinista? ",(0,i.jsx)("span",{className:"underline",children:"Log in"})]})]})}var w=t(13966),C=t(1137),k=t(46464);function M(e){let{steps:l}=e,{getSettings:t}=(0,m.b)(),{activeStep:a}=t(),{getDictionaryValue:s}=(0,k.f)(),n=l[a-1];if(!n)throw Error("Step ".concat(a," not found"));return(0,i.jsx)(C.M,{initial:!1,mode:"wait",children:(0,i.jsx)(w.J,{heading:s(n.dictionary.heading),description:s(n.dictionary.description),layout:n.layout,children:n.component({stepConfig:n})},n.id)})}var S=t(67410),Z=t(2059),E=t(6597),I=t(10846),T=t(98680),_=t(13916),P=t(49122),A=t(76102),D=t(8431),B=t(48695),O=t(93427);function G(e){let{note:l,handleRemoveClick:t}=e,{getService:a}=(0,v.o)(),{primaryColor:s,primaryColorAlternative:r}=a();return(0,i.jsxs)("div",{className:(0,n.Z)((0,f.M)("text",s),(0,f.M)("bg",r),"mb-2 flex w-fit items-center pl-2"),children:[(0,i.jsx)(o.k,{size:11,icon:(0,i.jsx)(B.Z,{})}),(0,i.jsx)("p",{role:"alert",className:(0,n.Z)("helvetica-12-400 ml-2 py-1.5",!t&&"pr-2"),children:l}),t&&(0,i.jsx)("button",{type:"button",onClick:t,className:"p-2",children:(0,i.jsx)(o.k,{width:8,height:8,icon:(0,i.jsx)(O.Z,{})})})]})}function L(e){let{isComponentVisible:l,isAlwaysVisibleOnMobile:t=!1,children:a}=e;return(0,i.jsx)("div",{className:(0,n.Z)("grid transition-all duration-300 [&>div]:overflow-hidden",{"grid-rows-[1fr] opacity-100":l,"grid-rows-[0fr] opacity-0":!l&&!t,"xl:grid-rows-[0fr] xl:opacity-0":!l&&t}),children:a})}function F(){var e;let l=[{title:"Service",id:"serviceCost"},{title:"Groceries Estimate",id:"groceryCost"},{title:"Tip",id:"tips"},{title:"Travel",id:"travelCost"},{title:"Tax",id:"tax"}],{getFormatted:t}=(0,E._)(),{getService:s}=(0,v.o)(),{setSettings:r,getSettings:c}=(0,m.b)(),{getSelectedItems:d}=(0,D.p)(),{primaryColor:u,primaryColorAlternative:x,type:p}=s(),[h,b]=(0,a.useState)(!1),{register:j,watch:y,setError:N,formState:w}=(0,T.cI)({defaultValues:{promoCode:c().promoCodeValue||""}}),{promoCodeValue:C,creditsToApply:k}=c(),M=t(),{referralValue:S}=(0,g.jJ)(),{data:B}=(0,P.cW_)({skip:!C,variables:{code:C},fetchPolicy:"no-cache",onError:e=>{N("promoCode",{message:(0,A.i)(e)})}}),O=null==B?void 0:B.promoCode,F=async()=>{r({promoCodeValue:y("promoCode")})};
1M.referralCredits&&0!==Number(M.referralCredits.replace(/[^0-9.-]+/g,""))&&l.push({title:"Referral Credits",id:"referralCredits"}),M.serviceCostOffAmount&&0!==Number(M.serviceCostOffAmount.replace(/[^0-9.-]+/g,""))&&l.push({title:"Promo",id:"serviceCostOffAmount",isMinus:!0}),M.appliedPromoCodeAmount&&0!==Number(M.appliedPromoCodeAmount.replace(/[^0-9.-]+/g,""))&&l.push({title:"Promo",id:"appliedPromoCodeAmount",isMinus:!0});let R=p===P.UW4.MealPrep&&0===d().length;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("button",{className:"helvetica-14-500 hidden items-center justify-between py-4 xl:flex",type:"button",onClick:()=>{b(e=>!e)},children:[(0,i.jsx)("p",{children:"Estimated Total"}),(0,i.jsxs)("div",{className:"flex items-center gap-x-2",children:[(0,i.jsx)("p",{className:(0,n.Z)("transition-opacity duration-300",{"opacity-0":h,"opacity-100":!h}),children:M.total}),(0,i.jsx)(o.k,{icon:(0,i.jsx)(Z.Z,{}),width:9,height:6,className:(0,n.Z)("transition-transform duration-300",{"rotate-180":!h})})]})]}),(0,i.jsx)("p",{className:"helvetica-14-500 mb-4 flex xl:hidden",children:"Estimated Total"}),(0,i.jsx)(L,{isComponentVisible:h,isAlwaysVisibleOnMobile:!0,children:(0,i.jsxs)("div",{children:[(0,i.jsxs)("div",{className:"flex flex-col justify-between gap-y-2",children:[l.map(e=>(0,i.jsxs)("div",{className:"helvetica-12-400 flex justify-between",children:[(0,i.jsx)("p",{children:e.title}),(0,i.jsx)("p",{children:"groceryCost"===e.id&&R?"TBD":(e.isMinus?"-":"")+M[e.id]})]},e.id)),(0,i.jsxs)("p",{className:"helvetica-12-400",children:[(0,i.jsx)("span",{className:"helvetica-12-500",children:"Please note:"})," If your booking includes waitstaff, we will confirm the hourly cost before your service."]}),(0,i.jsx)(L,{isComponentVisible:!!k,children:(0,i.jsxs)("div",{className:"helvetica-12-400 flex h-auto justify-between transition-all duration-1000",children:[(0,i.jsx)("p",{children:"Credits"}),(0,i.jsx)("p",{children:k&&(0,_.T)(-100*k)})]})})]}),(0,i.jsx)(L,{isComponentVisible:!O,children:(0,i.jsx)(I.V,{...j("promoCode",{onChange:()=>{N("promoCode",{message:""})}}),variant:"underlined",placeholder:"Promo Code",inputClassName:(0,n.Z)("py-3",(0,f.M)("placeholder:text",u)),inputBorderColorClassName:(0,n.Z)("border-opacity-40",(0,f.M)("border",u)),actionClassName:(0,n.Z)("helvetica-10-500 !px-2.5 py-1.5 disabled:opacity-40 disabled:text-opacity-100",(0,f.M)("bg",x),(0,f.M)("text",u)),actionDisabled:!y("promoCode"),containerClassName:"mt-2",actionText:"Apply",onActionClick:F,error:null===(e=w.errors.promoCode)||void 0===e?void 0:e.message})}),(0,i.jsxs)("div",{className:"helvetica-14-500 my-4 flex justify-between",children:[(0,i.jsx)("p",{children:"Total"}),(0,i.jsx)("p",{children:M.total})]}),R&&(0,i.jsx)("p",{className:"helvetica-12-400 my-3",children:"Your payment estimate will update once you select dishes."})]})}),(0,i.jsx)(L,{isComponentVisible:!!O||!!S,children:(0,i.jsxs)("div",{className:"flex flex-wrap gap-x-2",children:[S&&(0,i.jsx)(G,{note:"Referrals"}),(null==O?void 0:O.description)&&(0,i.jsx)(G,{note:null==O?void 0:O.description,handleRemoveClick:()=>{r({promoCodeValue:void 0})}})]})})]})}var R=t(18844),U=t(1834);function q(e){let{className:l,formId:t,title:a,onClick:s}=e,{getFormState:r}=(0,U.P)(),{getService:o}=(0,v.o)(),{getSettings:c}=(0,m.b)(),{disableSubmitFormButton:d}=c(),{primaryColor:u,primaryColorAlternative:x}=o(),{isLoading:p,isValid:h,isSubmitting:f,isValidating:b,isSubmitted:j}=r();return(0,i.jsx)(R.k,{className:(0,n.Z)(l,"w-full !min-w-0 max-w-[163px] xs:max-w-full",{"bg-opacity-40 text-opacity-40 ":!h&&j||d,"!bg-opacity-100 !text-opacity-100 ":h&&!d,"cursor-not-allowed":d}),backgroundColor:x,textColor:u,loading:p||f||b,type:"submit",form:t,onClick:()=>{null==s||s()},variant:R.$.BookingOrder,disabled:d,children:a})}var z=t(54100),V=t.n(z),W=t(13641);function H(e){var l,t,s,r,c;let{title:d,isInitialExpanded:u=!1,hideBorderWhenExpanded:x=!1,menuItem:m,children:p}=e,{getService:h}=(0,v.o)(),{primaryColor:b}=h(),j=(0,a.useRef)(null),g=(0,W.I)((null==m?void 0:m.title)||"",j,40),[y,N]=(0,a.useState)(u),w=(0,f.M)("text",b),C=(0,f.M)("border",b);return(0,i.jsxs)("div",{className:(0,n.Z)("mx-[30px] border-opacity-40",w,C,{"border-b":!(x&&y),"border-b-0":x&&y}),children:[(0,i.jsxs)("button",{type:"button",onClick:()=>{N(e=>!e)},className:(0,n.Z)("flex w-full items-center justify-between",{"py-5":!(m&&y),"py-[30px] lg:py-5":m&&y}),children:[(!m||!y)&&(0,i.jsx)("p",{className:"helvetica-14-500",children:d}),m&&y&&(0,i.jsxs)("div",{className:"flex items-center gap-x-2.5",children:[m.image&&(0,i.jsx)("div",{className:"relative hidden h-16 w-[86px] overflow-hidden lg:block",children:(0,i.jsx)(V(),{src:null===(t=m.image.image)||void 0===t?void 0:null===(l=t.asset)||void 0===l?void 0:l.url,alt:m.image.alt,blurDataURL:null===(c=m.image.image)||void 0===c?void 0:null===(r=c.asset)||void 0===r?void 0:null===(s=r.metadata)||void 0===s?void 0:s.lqip,placeholder:"blur",fill:!0,className:"object-cover"})}),m.title&&(0,i.jsx)("div",{className:"editorial-18 text-left uppercase",ref:j,children:g})]}),(0,i.jsx)(o.k,{icon:(0,i.jsx)(Z.Z,{}),width:9,height:6,className:(0,n.Z)("transition-transform duration-300",{"rotate-180":y})})]}),(0,i.jsx)("div",{className:(0,n.Z)("grid transition-all duration-300 [&>div]:overflow-hidden",{"grid-rows-[1fr] opacity-100":y,"grid-rows-[0fr] opacity-0":!y}),children:(0,i.jsx)("div",{children:p})})]})}let J=e=>{if(!e)return null;let l=new Date(e),t=l.getHours(),i=l.getMinutes();
1return"".concat(t%12==0?12:t%12,":").concat(i<10?"0".concat(i):i).concat(t>=12?"pm":"am")};function Y(){let{getSettings:e,getAddress:l}=(0,m.b)(),{numberOfPeople:t,date:a,arrivalTime:s,dinnerTime:n}=e(),{streetAddress:r,streetAddress2:o,city:c,state:d,zipCode:u,additionalComments:x}=l(),p=[{label:"Number of Guests",value:t||"Not provided"},{label:"Date",value:a?new Date(a).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):"Not provided"},{label:"Guest Arrival Time",value:J(s)||"Not provided"},{label:"Table Time",value:J(n)||"Not provided"},{label:"Address",value:r?"".concat(r?"".concat(r,", "):"").concat(o?"".concat(o,", "):"").concat(c?"".concat(c,", "):"").concat(d?"".concat(d,", "):"").concat(u||""):"Not provided"},{label:"Your Gathering",value:x||"Not provided"}];return(0,i.jsxs)(H,{title:"Service Details",children:[(0,i.jsx)("div",{className:"helvetica-12-400 mb-2.5 flex flex-col gap-y-2.5",children:p.map(e=>(0,i.jsxs)("div",{className:"flex justify-between",children:[(0,i.jsx)("p",{className:"opacity-60",children:e.label}),(0,i.jsx)("p",{className:"w-52 text-right",children:e.value})]},e.label))}),(0,i.jsx)("div",{className:"flex justify-end",children:(0,i.jsx)(h,{className:"helvetica-12-500 -mr-2.5 p-2.5",goToStep:3,children:"edit"})})]})}var $=t(55462),Q=t(34737);function X(){let{getServiceAndHouseholdSettings:e,getSettings:l}=(0,m.b)(),{culinaryPreferences:t,culinaryPreferencesNote:a,ingredientFlags:s,householdRules:n}=e(),{activeStep:r}=l(),o=null==n?void 0:n.filter(e=>"string"==typeof e),c=null==n?void 0:n.filter(e=>"string"!=typeof e),d=[{label:"Culinary Settings",value:t&&t.length>0?t.map(e=>Q.e[e]).join(" | "):!a&&"Not provided",notes:a},{label:"Ingredient Flags",value:s&&s.length>0?s.map(e=>e.title).join(", "):"Not provided"},{label:"Household Settings",value:o&&o.length>0?o.map(e=>Q.c[e]).join(" | "):!(c&&c.length>0)&&"Not provided"}];return(0,i.jsxs)(H,{title:"Service Settings",children:[(0,i.jsx)("div",{className:(0,$.cn)("helvetica-12-400 flex flex-col gap-y-2.5",{"mb-2.5":3!==r,"mb-5":3===r}),children:d.map(e=>(0,i.jsxs)("div",{className:"flex justify-between",children:[(0,i.jsx)("p",{className:"opacity-60",children:e.label}),(0,i.jsxs)("div",{className:"flex w-52 flex-col gap-y-2 text-right",children:[e.value&&(0,i.jsx)("p",{children:e.value}),e.notes&&(0,i.jsx)("p",{children:"Notes: ".concat(e.notes)}),"Household Settings"===e.label&&c&&c.length>0&&(0,i.jsx)(i.Fragment,{children:c.map(e=>(0,i.jsx)("p",{children:"".concat(Q.c[e.rule],": ").concat(e.note)},e.rule))})]})]},e.label))}),3!==r&&(0,i.jsx)("div",{className:"flex justify-end",children:(0,i.jsx)(h,{className:"helvetica-12-500 -mr-2.5 p-2.5",goToStep:4,children:"edit"})})]})}var K=t(71977);function ee(){let{getSettings:e,getAddress:l}=(0,m.b)(),{day:t,time:a,startDate:s}=e(),{streetAddress:n,streetAddress2:r,city:o,state:c,zipCode:d}=l(),u=[{label:"Day",value:t?(0,K.$G)(+t):"Not provided"},{label:"Time",value:a?(0,K.Os)(+a):"Not provided"},{label:"Date",value:s?new Date(s).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):"Not provided"},{label:"Address",value:n?"".concat(n?"".concat(n,", "):"").concat(r?"".concat(r,", "):"").concat(o?"".concat(o,", "):"").concat(c?"".concat(c,", "):"").concat(d||""):"Not provided"},{label:"Household Settings",value:"Not provided"}];return(0,i.jsxs)(H,{title:"Details",children:[(0,i.jsx)("div",{className:"helvetica-12-400 my-2.5 flex flex-col gap-y-2.5",children:u.map(e=>(0,i.jsxs)("div",{className:"flex justify-between",children:[(0,i.jsx)("p",{className:"opacity-60",children:e.label}),(0,i.jsx)("p",{className:"w-52 text-right",children:e.value})]},e.label))}),(0,i.jsx)("div",{className:"flex justify-end",children:(0,i.jsx)(h,{className:"helvetica-12-500 -mr-5 p-5",goToStep:3,children:"edit"})})]})}var el=t(51023);function et(){var e;let{getServiceAndHouseholdSettings:l,getSettings:t}=(0,m.b)(),{serviceUsage:a,culinaryPreferences:s,culinaryPreferencesNote:n,portion:r,ingredientFlags:o}=l(),{activeStep:c}=t(),d=[{label:"Service",value:(null===(e=(0,el.R8)().serviceUsage.find(e=>e.value===a))||void 0===e?void 0:e.label)||"Not provided"},{label:"Culinary Settings",value:s&&s.length>0?s.map(e=>Q.e[e]).join(" | "):!n&&"Not provided",notes:n},{label:"Size",value:r?r.charAt(0).toUpperCase()+r.slice(1).toLowerCase():"Not provided"},{label:"Ingredient Flags",value:o&&o.length>0?o.map(e=>e.title).join(", "):"Not provided"}];return(0,i.jsxs)(H,{title:"Service Settings",children:[(0,i.jsx)("div",{className:(0,$.cn)("helvetica-12-400 mt-2.5 flex flex-col gap-y-2.5",{"mb-2.5":2===c,"mb-5":2!==c}),children:d.map(e=>(0,i.jsxs)("div",{className:"flex justify-between",children:[(0,i.jsx)("p",{className:"opacity-60",children:e.label}),(0,i.jsxs)("div",{className:"flex w-52 flex-col gap-y-2 text-right",children:[e.value&&(0,i.jsx)("p",{children:e.value}),e.notes&&(0,i.jsx)("p",{children:"Notes: ".concat(e.notes)})]})]},e.label))}),2===c&&(0,i.jsx)("div",{className:"flex justify-end",children:(0,i.jsx)(h,{className:"helvetica-12-500 -mr-5 p-5",goToStep:1,children:"edit"})})]})}function ei(e){let{item:l,title:t,menuReferenceId:a}=e,{getService:s}=(0,v.o)(),{setSettings:n,getServiceAndHouseholdSettings:r}=(0,m.b)(),{removeItem:c}=(0,D.p)(),{type:d,primaryColor:u}=s(),{portion:x}=r();return(0,i.jsxs)("div",{className:(0,$.cn)((0,f.M)("border",u),"editorial-16 flex flex-col gap-y-2.5 border-b-2 border-dotted border-opacity-40 py-4",{"text-opacity-60":!l}),children:[(0,i.jsxs)("div",{className:"flex justify-between gap-x-5",children:[(0,i.jsx)("p",{children:t}),l&&(0,i.jsxs)("div",{className:"flex gap-x-2.5",children:[(0,i.jsx)("button",{className:"helvetica-12-500 -m-1 p-1",type:"button",onClick:()=>{n({itemToEditId:null==l?void 0:l.referenceId})},children:"edit"}),(0,i.jsx)("button",{title:"Remove dish",className:"-m-1 p-1",type:"button",onClick:()=>{c(null==l?void 0:l.referenceId,a)},children:(0,i.jsx)(o.k,{size:8,icon:(0,i.jsx)(O.Z,{})})})]})]}),l&&(l.portion&&l.portion!==x||l.modifyNote)&&(0,i.jsxs)("div",{className:"helvetica-12-400 flex flex-col gap-y-1.5 opacity-60",children:[d===P.UW4.MealPrep&&l.portion&&l.portion!==x&&(0,i.jsx)("p",{children:"Portion: ".concat(l.portion.charAt(0).toUpperCase()+l.portion.slice(1).toLowerCase())}),l.modifyNote&&(0,i.jsx)("p",{children:l.modifyNote})]})]})}function ea(){let{getSelectedItemsLimit:e,getSelectedItems:l}=(0,D.p)(),t=l(),a=Array.from({length:e()-(t?t.length:0)},(e,l)=>l+1+(t?t.length:0));return(0,i.jsx)(H,{title:"Your dishes",isInitialExpanded:!0,hideBorderWhenExpanded:!0,children:(0,i.jsxs)("div",{className:"mb-5 flex flex-col",children:[null==t?void 0:t.map(e=>(0,i.jsx)(ei,{item:e,title:e.title},e.referenceId)),null==a?void 0:a.map(e=>(0,i.jsx)(ei,{title:"Dish ".concat(e)},e))]})})}var es=t(48095);function en(){let{getSelectedMenus:e,getSelectedItems:l,getSelectedItemsLimit:t,getActiveMenuData:a}=(0,D.p)(),s=e(),n=a(),r=t(),o=Array.from(s.values())[0],c=null==o?void 0:o.referenceId,d=l(),u=e=>{let l=null==d?void 0:d.filter(l=>l.courseName===e.title),t=Array.from({length:("object"==typeof r?r[e.title]:0)-(l?l.length:0)},(e,t)=>t+1+(l?l.length:0));return(0,i.jsxs)("div",{className:"mb-10 flex flex-col",children:[null==l?void 0:l.map(e=>(0,i.jsx)(ei,{item:e,title:e.title,menuReferenceId:c},e.referenceId)),null==t?void 0:t.map(e=>(0,i.jsx)(ei,{title:"Dish ".concat(e)},e))]})},x=(()=>
1{if((null==n?void 0:n.__typename)==="Menu"){var e;return null==n?void 0:null===(e=n.courses)||void 0===e?void 0:e.filter(e=>{var l;return!(null==e?void 0:e.isOptional)||(null==d?void 0:null===(l=d.filter(l=>l.courseName===e.title))||void 0===l?void 0:l.length)>0})}if((null==n?void 0:n.__typename)==="CookingClass")return null==n?void 0:n.sections})();return n?(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(H,{title:"Menu & Dishes",isInitialExpanded:!0,hideBorderWhenExpanded:!0,menuItem:{title:n.title,image:n.mainImage},children:null==x?void 0:x.map(e=>(0,i.jsxs)("div",{className:"flex flex-col gap-y-3",children:[(0,i.jsx)("p",{className:"helvetica-9-400 uppercase tracking-widest",children:e.title}),u(e)]},null==e?void 0:e._key))})}):(0,i.jsx)("div",{className:"my-5 flex justify-center overflow-hidden",children:(0,i.jsx)(es.U,{className:"opacity-20"})})}function er(e){let{components:l}=e;return(0,i.jsx)(i.Fragment,{children:l&&l.length>0&&l.map(e=>{switch(e){case b.Bq.MealPrepServiceSettings:return(0,i.jsx)(et,{},e);case b.Bq.MealPrepDishes:return(0,i.jsx)(ea,{},e);case b.Bq.MealPrepServiceDetails:return(0,i.jsx)(ee,{},e);case b.Bq.GatheringMenuAndDishes:return(0,i.jsx)(en,{},e);case b.Bq.GatheringServiceDetails:return(0,i.jsx)(Y,{},e);case b.Bq.GatheringServiceSettings:return(0,i.jsx)(X,{},e);default:return null}})})}var eo=t(87054);function ec(){var e,l,t,a,s,r,c,d;let{getService:u}=(0,v.o)(),{getSettings:x,setSettings:p}=(0,m.b)(),{getFormatted:h}=(0,E._)(),{getSelectedItems:b,getActiveMenuData:j}=(0,D.p)(),g=j(),{isSidebarOpen:y}=x(),{type:N,primaryColor:w}=u(),C=b(),k=h();return(0,i.jsxs)("button",{type:"button",className:(0,n.Z)((0,f.M)("text",w),"helvetica-12-500 flex flex-1 items-center justify-between gap-x-2 py-3 pl-3"),onClick:()=>{p({isSidebarOpen:!y})},children:[N===P.UW4.MealPrep?(0,i.jsxs)("div",{className:"flex flex-col items-start",children:[(0,i.jsx)("p",{children:"".concat(C.length," of 6 dishes selected")}),(0,i.jsxs)("p",{children:[(0,i.jsx)("span",{className:"font-normal",children:"est. "}),(0,i.jsx)("span",{children:k.total})]})]}):(0,i.jsx)(i.Fragment,{children:g&&(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[(null==g?void 0:g.mainImage)&&(0,i.jsx)("div",{className:"relative h-9 w-9",children:(0,i.jsx)(V(),{src:null==g?void 0:null===(t=g.mainImage)||void 0===t?void 0:null===(l=t.image)||void 0===l?void 0:null===(e=l.asset)||void 0===e?void 0:e.url,alt:null==g?void 0:null===(a=g.mainImage)||void 0===a?void 0:a.alt,blurDataURL:null==g?void 0:null===(d=g.mainImage)||void 0===d?void 0:null===(c=d.image)||void 0===c?void 0:null===(r=c.asset)||void 0===r?void 0:null===(s=r.metadata)||void 0===s?void 0:s.lqip,placeholder:"blur",fill:!0,className:"object-cover"})}),(0,i.jsxs)("div",{className:"flex flex-col items-start",children:[(0,i.jsx)("p",{children:"Your Menu"}),(0,i.jsxs)("p",{children:[(0,i.jsx)("span",{className:"helvetica-12-400",children:"Starting at: "}),(0,i.jsx)("span",{children:k.total})]})]})]})}),(0,i.jsx)(o.k,{icon:(0,i.jsx)(Z.Z,{}),width:9,height:6,className:(0,n.Z)("transition-transform duration-300",{"rotate-180":y})})]})}function ed(e){var l;let{steps:t}=e,{getService:s}=(0,v.o)(),{getSettings:o}=(0,m.b)(),{getFormState:c}=(0,U.P)(),{user:d}=(0,g.jJ)(),u=(0,j.useRouter)(),{isLoggedIn:x}=d,p=(0,a.useRef)(null),{isSidebarOpen:h,activeStep:b}=o(),{primaryColor:y,primaryColorAlternative:N}=s(),w=(0,f.M)("text",y),C=t[b-1],k=(0,a.useMemo)(()=>{let e=c().errors||{};return Object.keys(e).map(l=>{var t;return(null==e?void 0:null===(t=e[l])||void 0===t?void 0:t.message)||""})},[c]);(0,a.useEffect)(()=>{let e=window.requestAnimationFrame;return h?(window.requestAnimationFrame=()=>0,(0,eo.Qp)(p.current),window.requestAnimationFrame=e):(0,eo.tG)(p.current),()=>{(0,eo.tP)()}},[h]);let M=(null==C?void 0:null===(l=C.dictionary)||void 0===l?void 0:l.submitBtnTitle)||"Book This Menu";return(0,i.jsxs)("aside",{className:(0,n.Z)((0,f.M)("border-l",y),(0,f.M)("border-t",y),"fixed bottom-0 flex h-[60px] w-full flex-col border-t border-opacity-40 bg-white transition-all duration-1000 xl:border-t-0","z-50 xl:sticky xl:top-0 xl:z-30 xl:h-screen xl:w-[383px] xl:border-l xl:bg-ar-beige-light xl:transition-none",{"h-full":h,hidden:C.hideSidebar}),children:[!x&&!C.hideLoginButton&&(0,i.jsxs)("button",{type:"button",className:(0,n.Z)("helvetica-14-500 hidden h-14 w-full 2xl:block 2xl:max-w-[382px]",(0,f.M)("text",y),(0,f.M)("bg",N)),onClick:()=>
1{u.push(r.y.signIn({backToOrder:"true"}))},children:["Already a Culinista? ",(0,i.jsx)("span",{className:"underline",children:"Log in"})]}),(0,i.jsxs)("div",{className:"flex h-[60px] shrink-0 bg-ar-beige-light xl:hidden",children:[(0,i.jsx)(ec,{}),(0,i.jsx)(q,{className:"m-3 max-h-9 flex-1",formId:C.id,title:M})]}),(0,i.jsxs)("div",{className:(0,n.Z)(w,"flex flex-1 flex-col justify-between overflow-y-auto xl:h-full"),children:[(0,i.jsx)("div",{ref:p,className:"mb-10 overflow-y-auto",children:(0,i.jsx)(er,{components:null==C?void 0:C.sidebarComponents})}),(0,i.jsxs)("div",{className:"flex flex-col px-[30px] pb-3 pt-1 xl:sticky xl:bottom-0 xl:bg-ar-beige-light xl:shadow-[2px_-1px_6px_rgba(0,0,0,0.12)]",children:[(0,i.jsx)(F,{}),(0,i.jsx)(q,{formId:C.id,title:M}),k[0]&&(0,i.jsx)("p",{className:"helvetica-12-500 mt-2 text-ar-red-warning",children:k[0]})]})]})]})}var eu=t(17481),ex=t(48887);function em(){let{getService:e}=(0,v.o)(),{primaryColor:l,secondaryColor:t}=e();return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(ex.U,{primaryColor:l}),(0,i.jsx)(eu.Z,{primaryColor:l,secondaryColor:t})]})}var ep=t(89663),eh=t(878),ev=t(19563),ef=t(15913),eb=t(78778),ej=t(9703),eg=t(27623),ey=t(78807);function eN(e){var l;let{itemToEditId:t}=e,{getService:s}
1=(0,v.o)(),{setSettings:r,getServiceAndHouseholdSettings:c,getSettings:d}=(0,m.b)(),{findItemById:u,updateItem:x}=(0,D.p)(),{ingredientFlags:p,portion:h}=c(),{primaryColor:b,primaryColorAlternative:j,type:g}=s(),{isItemToEditForced:y}=d(),N=u(t),w=(0,a.useRef)(null),k=(0,a.useRef)(null),[M,S]=(0,a.useState)(()=>{let e=null==N?void 0:N.portion,l=ej.t4.findIndex(l=>l.value===(e||h));return -1!==l?l:1}),{handleSubmit:Z,register:E,setValue:I,reset:_,watch:A}=(0,T.cI)({defaultValues:{portion:ej.t4[M].value,"allergens-confirmation":(null==N?void 0:N.modifyNote)?"modify":"as-is","dish-modify-text":(null==N?void 0:N.modifyNote)||""}}),B=p||[],O=(null==N?void 0:null===(l=N.allergens)||void 0===l?void 0:l.filter(e=>e&&B.find(l=>l.id===e.id)))||[],G=O.length>0,L=()=>{y||(_(),S(1),r({itemToEditId:void 0}))};(0,eg.t)(w,()=>{L()}),(0,a.useEffect)(()=>{I("portion",ej.t4[M].value)},[M,I]),(0,a.useEffect)(()=>((0,eo.Qp)(k.current),()=>{(0,eo.tP)()}),[]);let F="modify"===A("allergens-confirmation")||!O.length,U=(0,f.M)("bg",j),q=(0,f.M)("text",b),z=(0,f.M)("border",b);return(0,i.jsx)(eb.E.div,{ref:k,className:"fixed inset-0 z-[60] flex justify-end bg-black bg-opacity-20",initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},children:(0,i.jsxs)("div",{className:"h-full w-full bg-ar-beige-light shadow-sm md:w-[382px]",ref:w,children:[(0,i.jsxs)("header",{className:(0,n.Z)("p-7",U,q),children:[(0,i.jsx)("button",{type:"button",title:"Close",className:"-ml-3 mb-11 p-3",onClick:L,disabled:y,children:(0,i.jsx)(o.k,{width:14,height:14,icon:(0,i.jsx)(ep.Z,{})})}),(null==N?void 0:N.title)&&(0,i.jsx)("h2",{className:"editorial-32 mb-2.5",children:N.title}),(null==N?void 0:N.subtitle)&&(0,i.jsx)("p",{className:"garamond-16",children:N.subtitle})]}),!!O.length&&(0,i.jsxs)("div",{className:"flex h-14 items-center gap-1.5 border-b border-ar-red-warning px-7 text-ar-red-warning",children:[(0,i.jsx)(o.k,{icon:(0,i.jsx)(ef.Z,{}),size:14,className:"-translate-y-0.5"}),(0,i.jsx)("p",{className:"garamond-14 md:garamond-16",children:O.map(e=>{let{title:l}=e;return l}).join(", ")})]}),(0,i.jsxs)("form",{onSubmit:Z(e=>{let l="as-is"===e["allergens-confirmation"],i=G&&l?"":e["dish-modify-text"];g===P.UW4.MealPrep?x(t,{modifyNote:i,portion:h===e.portion?null:e.portion}):x(t,{modifyNote:i}),_(),S(1),r({itemToEditId:void 0,isItemToEditForced:!1})}),className:(0,n.Z)("flex flex-col p-7",q),children:[G&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(ey.E,{id:"as-is",type:"radio",label:"I want this dish as is (with ".concat(O.map(e=>{let{title:l}=e;return l}).join(", "),")."),primaryColor:b,value:"as-is",className:"mb-5",...E("allergens-confirmation",{})}),(0,i.jsx)(ey.E,{id:"modify",type:"radio",label:"I want to modify this dish",primaryColor:b,value:"modify",className:"mb-5",...E("allergens-confirmation",{})})]}),!G&&(0,i.jsx)("span",{className:"helvetica-14-500 mb-5",children:"I want to modify this dish"}),(0,i.jsx)(C.M,{children:F&&(0,i.jsx)(eb.E.div,{className:"w-full overflow-hidden",initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},children:(0,i.jsx)("label",{htmlFor:"dish-modify-textarea",className:"flex flex-col gap-5",children:(0,i.jsx)("textarea",{id:"dish-modify-textarea",className:(0,n.Z)(z,"helvetica-14-400 mb-5 min-h-[122px] w-full resize-none border border-opacity-40 bg-transparent p-5"),placeholder:"Let us know if you would like to substitute an ingredient, add an ingredient, or put an ingredient (sauce, nuts, cheese) on the side.",...E("dish-modify-text")})})})}),g===P.UW4.MealPrep&&(0,i.jsxs)("div",{className:"helvetica-14-500 mb-5 flex items-center justify-between gap-3",children:[(0,i.jsx)("input",{type:"hidden",...E("portion")}),(0,i.jsx)("p",{className:"flex-1",children:"Size"}),(0,i.jsx)("button",{type:"button",title:"Minus",onClick:()=>{S(e=>e-1)},disabled:0===M,className:"flex h-5 w-5 items-center justify-center disabled:opacity-40",children:(0,i.jsx)(o.k,{width:10,height:2,icon:(0,i.jsx)(eh.Z,{})})}),(0,i.jsx)("span",{children:ej.t4[M].label}),(0,i.jsx)("button",{type:"button",title:"Plus",onClick:()=>{S(e=>e+1)},disabled:M===ej.t4.length-1,className:"flex h-5 w-5 items-center justify-center disabled:opacity-40",children:(0,i.jsx)(o.k,{width:10,height:10,icon:(0,i.jsx)(ev.Z,{})})})]}),(0,i.jsx)(R.k,{type:"submit",backgroundColor:b,textColor:j,children:"Save"})]})]})})}var ew=t(20683),eC=t(74870),ek=t(77413),eM=t(79904),eS=t(74297);function eZ(e){let l=(0,ek.useRouter)(),t=(0,j.useSearchParams)(),{user:s}=(0,g.jJ)(),{getService:o}=(0,v.o)(),{getSettings:c}=(0,m.b)(),d=t.get("orderId")||void 0,u=t.get("reorderId")||void 0,{updateBookingOrderSteps:x}=(0,eM.FP)(),{itemToEditId:p}=c(),{type:h}=o(),{isLoggedIn:f,isAccountCreated:b}=s.isLoggedIn?s:{isLoggedIn:!1,isAccountCreated:!1},[y,w]=(0,a.useState)((0,S.s)({serviceType:h,isAccountCreated:f&&b,orderId:d,reorderId:u}));return x.current=()=>{w((0,S.s)({serviceType:h,isAccountCreated:f&&b,orderId:d,reorderId:u}))},(0,a.useEffect)(()=>{async function e(e){e.includes("backToOrder")||e.includes(r.y.bookingOrder())||(sessionStorage.setItem(eC.CZ,JSON.stringify({...ew.BOOKING_ORDER_DEFAULT_STATE})),f&&!b&&await (0,eS.nW)())}return l.events.on("routeChangeStart",e),()=>{l.events.off("routeChangeStart",e)}},[l.events,b,f]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(C.M,{children:p&&(0,i.jsx)(eN,{itemToEditId:p})}),(0,i.jsxs)("div",{className:(0,n.Z)("flex min-h-screen w-full flex-col bg-ar-beige-light pb-[60px] md:flex-row md:pb-0"),children:[(0,i.jsxs)("main",{className:"relative flex flex-1 flex-col",children:[(0,i.jsx)(N,{steps:y}),(0,i.jsx)(M,{steps:y})]}),(0,i.jsx)(ed,{steps:y})]}),(0,i.jsx)(em,{})]})}eZ.Layout=s.Y;var eE=!0,eI=eZ}},function(e){e.O(0,[1185,356,8156,4314,1844,2888,9774,179],function(){return e(e.s=83848)}),_N_E=e.O()}]);
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.