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]="5fc84ea5-8a96-4110-8b10-ce387d9031da",e._sentryDebugIdIdentifier="sentry-dbid-5fc84ea5-8a96-4110-8b10-ce387d9031da")}()}catch(e){}"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9890,8840],{48747:function(e,t,a){a.d(t,{B:function(){return s}});var r=a(57437);a(2265);let s=e=>{let{className:t,width:a=24,height:s=24,...i}=e;return(0,r.jsx)("svg",{width:a,height:s,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,...i,children:(0,r.jsx)("path",{d:"M8 4V16C8 17.1046 8.89543 18 10 18H18C19.1046 18 20 17.1046 20 16V7.24264C20 6.97756 19.8946 6.72338 19.7071 6.53584L16.4645 3.29326C16.2769 3.10572 16.0228 3.00036 15.7577 3H10C8.89543 3 8 3.89543 8 5V4ZM8 4H6C4.89543 4 4 4.89543 4 6V18C4 19.1046 4.89543 20 6 20H14C15.1046 20 16 19.1046 16 18",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}},28959:function(e,t,a){a.d(t,{W:function(){return s}});var r=a(57437);a(2265);let s=e=>{let{className:t,width:a=24,height:s=24,...i}=e;return(0,r.jsx)("svg",{width:a,height:s,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,...i,children:(0,r.jsx)("path",{d:"M10.5 3.75a6.75 6.75 0 1 0 0 13.5 6.75 6.75 0 0 0 0-13.5ZM2.25 10.5a8.25 8.25 0 1 1 14.59 5.28l4.69 4.69a.75.75 0 1 1-1.06 1.06l-4.69-4.69A8.25 8.25 0 0 1 2.25 10.5Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}},29327:function(e,t,a){a.d(t,{HL:function(){return r},U2:function(){return n},_H:function(){return i},g$:function(){return s}});let r={DUPLICATE_BOOKING_CONTINUE:"duplicate_booking_continue",RESV_TERMS_CONTINUE:"resv_terms_continue",RESV_TERMS_REJECT:"resv_terms_reject",FLOW_DOLLAR_TOP_UP:"flow_dollar_top_up",REFUND_BOOKING:"refund_booking",NON_FLOW_DOLLAR_CHECKOUT:"non_flow_dollar_checkout",PREVIOUS_PAGE:"previous_page",LOGIN_POP_UP:"login_pop_up",HOME_PAGE:"home_page",PW_LENGTH_SUPPORT:"pw_length_support",BACK_TO_CHECKOUT:"back_to_checkout",BACK_TO_DETAILS:"back_to_details"},s="flow-dollar-topped-up",i={CANCEL:"cancel"},n={GENERIC:"GENERIC",HTML:"HTML",LOADING:"LOADING"}},26382:function(e,t,a){a.d(t,{Z:function(){return s}});var r=a(57437);function s(e){let{className:t,size:a=22}=e;return(0,r.jsxs)("svg",{className:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",height:`${a}px`,width:`${a}px`,fill:"currentColor",children:[(0,r.jsx)("path",{d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})]})}},95859:function(e,t,a){a.d(t,{Z:function(){return v}});var r=a(57437),s=a(11082),i=a(2265),n=a(72301),l=a(30490),o=a(6473),c=a(43951),d=a(81856),u=a(91812),w=a(98668),m=a(58005),p=a(89595);let f=i.forwardRef((e,t)=>{let{className:a,...s}=e;return(0,r.jsx)(m.mY,{ref:t,className:(0,p.cn)("tw-flex tw-h-full tw-w-full tw-flex-col tw-gap-3 tw-overflow-hidden tw-rounded-md tw-bg-flow-background tw-text-flow-foreground",a),...s})});f.displayName=m.mY.displayName;let h=i.forwardRef((e,t)=>{let{className:a,...s}=e;return(0,r.jsx)(m.mY.Input,{ref:t,className:(0,p.cn)("tw-flex tw-h-14 tw-w-full tw-rounded-lg tw-border tw-border-flow-border tw-bg-[var(--flow-background)] tw-px-3 tw-py-2 tw-text-base tw-font-medium tw-text-[var(--flow-foreground)] placeholder:tw-text-sm placeholder:tw-font-medium placeholder:tw-text-[var(--themes-text-body-subtle)] focus-visible:tw-outline-none disabled:tw-cursor-not-allowed disabled:tw-opacity-50 md:placeholder:tw-text-base",a),...s})});h.displayName=m.mY.Input.displayName;let g=i.forwardRef((e,t)=>{let{className:a,...s}=e;return(0,r.jsx)(m.mY.List,{ref:t,className:(0,p.cn)("tw-max-h-[300px] tw-overflow-y-auto tw-overflow-x-hidden",a),...s})});g.displayName=m.mY.List.displayName;let x=i.forwardRef((e,t)=>(0,r.jsx)(m.mY.Empty,{ref:t,className:"tw-py-6 tw-text-center tw-text-sm",...e}));x.displayName=m.mY.Empty.displayName,i.forwardRef((e,t)=>
1{let{className:a,...s}=e;return(0,r.jsx)(m.mY.Group,{ref:t,className:(0,p.cn)("tw-overflow-hidden tw-p-1 tw-text-flow-foreground [&_[cmdk-group-heading]]:tw-px-2 [&_[cmdk-group-heading]]:tw-py-1.5 [&_[cmdk-group-heading]]:tw-text-xs [&_[cmdk-group-heading]]:tw-font-medium [&_[cmdk-group-heading]]:tw-text-flow-muted-foreground",a),...s})}).displayName=m.mY.Group.displayName,i.forwardRef((e,t)=>{let{className:a,...s}=e;return(0,r.jsx)(m.mY.Separator,{ref:t,className:(0,p.cn)("tw--mx-1 tw-h-px tw-bg-flow-border",a),...s})}).displayName=m.mY.Separator.displayName;let _=i.forwardRef((e,t)=>{let{className:a,...s}=e;return(0,r.jsx)(m.mY.Item,{ref:t,className:(0,p.cn)("tw-relative tw-flex tw-cursor-pointer tw-select-none tw-items-center tw-rounded-sm tw-px-2 tw-py-2 tw-text-sm md:tw-text-base tw-outline-none data-[selected=true]:tw-bg-flow-muted data-[selected=true]:tw-text-flow-foreground data-[disabled=true]:tw-pointer-events-none data-[disabled=true]:tw-opacity-50",a),...s})});_.displayName=m.mY.Item.displayName;var b=a(46542),E=a(26141),v=e=>{let{phoneCode:t,onInputChange:a,isDisabled:m,buttonClassName:v="",showCaret:N=!1,paperClassName:y="",a7Style:A=!1}=e,{region:j,lang:C}=(0,n.useParams)(),[I,D]=(0,i.useState)(!1),k=(0,l.T)(),{data:L,error:P}=(0,o.ZP)(["/index/dialing",j,C],async e=>{let[,t,a]=e;try{let e=await (0,c.A)({region:t,lang:a});if(e.Success&&e.Data?.list?.length>0)return e.Data.list;return[]}catch(e){return[]}});(0,i.useEffect)(()=>{let e=L?.find(e=>j.toUpperCase()===e.country_code);!t&&e?.code&&a({type:"phoneCode",value:e.code})},[L]);let O=e=>{a({type:"phoneCode",value:e}),D(!1)},T=k("select")+" "+k("input.country_code"),M=(0,r.jsxs)(f,{className:"tw-h-full",children:[(0,r.jsx)(h,{placeholder:k("input.country_code"),className:(0,p.cn)("tw-w-full",A&&"tw-h-12 tw-rounded-2xl tw-border-[1.5px] tw-px-4 tw-text-[15px] tw-font-normal tw-transition-[border-color,box-shadow] placeholder:tw-text-[15px] placeholder:tw-font-normal placeholder:tw-text-[#9A988F] focus-visible:tw-border-[#FEDC01] focus-visible:tw-ring-[3px] focus-visible:tw-ring-[rgba(254,220,1,0.14)] md:placeholder:tw-text-[15px] dark:placeholder:tw-text-[#6C7077]")}),(0,r.jsxs)(g,{className:A?"tw-max-h-none tw-px-3 tw-pt-2 tw-pb-4":"",children:[(0,r.jsx)(x,{children:k("booking.noResultTitle")}),L?.map(e=>{let a=[e.code,e.name?.en??"",e.name?.ms??"",e.name?.sc??"",e.name?.tc??""].join(" "),s=t===e.code;return r.jsx(_,{value:a,onSelect:()=>O(e.code),className:A?p.cn("tw-rounded-[10px] tw-px-3 tw-py-[13px] tw-text-[15px] md:tw-text-[15px]",s?"tw-font-semibold tw-bg-[#FFFBE4] data-[selected=true]:tw-bg-[#FFFBE4] dark:tw-bg-gold-subtle dark:data-[selected=true]:tw-bg-gold-subtle":"data-[selected=true]:tw-bg-[#F7F6F2] dark:data-[selected=true]:tw-bg-[#121316]"):"",children:r.jsxs("div",{className:"between-content tw-w-full tw-whitespace-pre-line",children:[r.jsx("div",{children:e.name[E.VD(j,C)]}),r.jsx("div",{className:A?p.cn("tw-font-semibold tw-tabular-nums",s?"tw-text-[#1E1E1E] dark:tw-text-[#F4F5F7]":"tw-text-[#6E6C66] dark:tw-text-[#979BA2]"):"",children:e.code})]})},e.country_code)})]})]});return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(w.z,{type:"button",variant:"outline",onClick:()=>{m||D(!0)}
1,disabled:m,className:(0,p.cn)("tw-mr-4 tw-w-[100px] tw-shrink-0 tw-h-14 tw-rounded-lg tw-border-flow-border tw-bg-transparent tw-px-3 tw-justify-start tw-text-base tw-font-medium tw-text-flow-foreground hover:tw-bg-transparent disabled:tw-opacity-50",v),children:[t,N&&(0,r.jsx)(s.Z,{"aria-hidden":!0,className:"tw-h-4 tw-w-4 tw-shrink-0 tw-text-body-subtle"})]}),A?(0,r.jsx)(u.Z,{isOpen:I,onClose:()=>D(!1),modalTitle:T,closeButton:!0,isFullScreen:!0,scrollFade:!0,contentClassName:y,customMobileStyle:b.WU,customDesktopStyle:b.CE,isHighPriority:!0,modalContent:M}):(0,r.jsx)(d.Z,{isOpen:I,onClose:()=>D(!1),content:M,modalTitle:T,anchorType:"bottom",customDesktopStyle:b.CE,paperClassName:y,isHighPriority:!0})]})}},49890:function(e,t,a){a.r(t),a.d(t,{default:function(){return eg}});var r=a(57437),s=a(30490),i=a(2265),n=a(22109),l=a(2301),o=a(11362),c=a(72301),d=a(26348),u=a(23841),w=a(3113),m=a(43493),p=a(97316);let f=e=>{let{social:t}=e;return t.key===w.Bp.PROVIDER_APPLE?(0,r.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,className:"tw-block tw-text-title",children:(0,r.jsx)("path",{d:"M16.36 12.72c.02 2.6 2.28 3.46 2.3 3.47-.02.06-.36 1.24-1.2 2.45-.72 1.05-1.47 2.1-2.66 2.12-1.16.02-1.54-.69-2.87-.69-1.33 0-1.75.67-2.85.71-1.14.04-2.01-1.13-2.74-2.18-1.5-2.16-2.64-6.1-1.1-8.76.76-1.32 2.13-2.16 3.61-2.18 1.12-.02 2.18.75 2.87.75.68 0 1.97-.93 3.32-.79.56.02 2.14.23 3.16 1.71-.08.05-1.88 1.1-1.86 3.28M14.2 5.4c.61-.74 1.02-1.76.9-2.78-.88.04-1.94.59-2.57 1.32-.56.65-1.06 1.69-.92 2.69.98.08 1.98-.5 2.59-1.23"})}):t.key===w.Bp.PROVIDER_GOOGLE?(0,r.jsxs)("svg",{width:"22",height:"22",viewBox:"0 0 24 24","aria-hidden":!0,className:"tw-block",children:[(0,r.jsx)("path",{fill:"#4285F4",d:"M21.6 12.23c0-.7-.06-1.37-.18-2.02H12v3.82h5.38a4.6 4.6 0 0 1-2 3.02v2.5h3.24c1.89-1.74 2.98-4.3 2.98-7.32z"}),(0,r.jsx)("path",{fill:"#34A853",d:"M12 22c2.7 0 4.96-.9 6.62-2.43l-3.24-2.51c-.9.6-2.04.96-3.38.96-2.6 0-4.8-1.76-5.59-4.12H3.06v2.59A10 10 0 0 0 12 22z"}),(0,r.jsx)("path",{fill:"#FBBC05",d:"M6.41 13.9a6 6 0 0 1 0-3.8V7.51H3.06a10 10 0 0 0 0 8.98l3.35-2.6z"}),(0,r.jsx)("path",{fill:"#EA4335",d:"M12 5.98c1.47 0 2.79.5 3.83 1.5l2.87-2.87C16.95 2.99 14.7 2 12 2A10 10 0 0 0 3.06 7.51l3.35 2.6C7.2 7.74 9.4 5.98 12 5.98z"})]}):(0,r.jsx)(u.Z,{src:t.icon,alt:t.key,width:22,height:22})};var h=e=>{let{socialMethods:t}=e,a=(0,c.usePathname)(),[s]=(0,o.KO)(m.jA),[i]=(0,o.KO)(p.rT),u=async e=>{try{let t,r;e===w.Bp.PROVIDER_APPLE?(t=l.O4.Apple,r=w.Bp.PROVIDER_APPLE):e===w.Bp.PROVIDER_GOOGLE&&(t=l.O4.Google,r=w.Bp.PROVIDER_GOOGLE);let n={[w.Bp.PARAM_METHOD]:"oauth2",[w.Bp.PARAM_CHANNEL_KEY]:r},o=window.location.search,c=`${o.length>0?o+"&":"?"}${w.Bp.PARAM_OAUTH_RESULT}=true&${w.Bp.PARAM_OAUTH_DATA}=${encodeURIComponent(JSON.stringify(n))}`,u=`${o.length>0?o+"&":"?"}${w.Bp.PARAM_OAUTH_RESULT}=false`;if(a.includes("order-checkout")&&(s||i)){let e={currReservation:s,spaceType:i,timestamp:Date.now()};sessionStorage.setItem("FLOW_CHECKOUT_RECOVERY",JSON.stringify(e))}if(t)try{await d.appwriteAccount.deleteSession("current"),await d.appwriteAccount.createOAuth2Token(t,`${window.location.origin}${a}${c}`,`${window.location.origin}${a}${u}`,[])}catch(e){await d.appwriteAccount.createOAuth2Token(t,`${window.location.origin}${a}${c}`,`${window.location.origin}${a}${u}`,[])}}catch(e){throw(0,n.T)(e),e}};return(0,r.jsx)("div",{className:"tw-flex tw-items-center tw-justify-center tw-gap-5",children:t?.map(e=>r.jsx("button",{type:"button",onClick:()=>u(e.key),"aria-label":e.key,className:"tw-flex tw-items-center tw-justify-center tw-size-[58px] tw-shrink-0 tw-rounded-full tw-border tw-border-solid tw-border-default tw-bg-white tw-p-0 tw-cursor-pointer tw-transition-colors hover:tw-bg-gray-secondary",children:r.jsx(f,{social:e})},`social-${e.key}`))})},g=a(20176),x=a(40967),_=a(52566),b=a(96294),E=a(66707),v=a(48747),N=a(63049),y=a(85145),A=a(33259),j=a(26382),C=e=>{let{children:t,title:a,desc:s,remarks:i,handleBackBtnClick:n,handleContinueBtnClick:l,handleTextBtnClick:o,actionBtnTitle:c,actionTextTitle:d,isShowBackButton:u,isContinueButtonDisabled:w}=e;return(0,r.jsxs)("div",{className:"tw-flex tw-flex-col tw-justify-between tw-h-full",children:[(0,r.jsxs)("div",{className:"tw-flex tw-items-center tw-justify-start",children:[u&&(0,r.jsx)("button",{type:"button",onClick:n,className:"tw-inline-flex tw-items-center tw-justify-center tw-p-2 tw-rounded-full tw-cursor-pointer hover:tw-bg-black/5","aria-label":"back",children:(0,r.jsx)(j.Z,{className:"tw-rotate-[90deg]",
1size:32})}),(0,r.jsx)("div",{className:`typography-heading-6${u?" tw-ml-2":""}`,children:a})]}),(0,r.jsx)("div",{className:"tw-text-xs lg:tw-text-sm tw-text-info tw-pt-4",children:s}),t,(0,r.jsx)(()=>(0,r.jsx)("div",{className:"tw-pt-4 tw-text-xs lg:tw-text-sm",children:i}),{}),(0,r.jsxs)("div",{className:"tw-flex tw-flex-col tw-justify-center",children:[(0,r.jsx)(()=>c?(0,r.jsx)(b.default,{onClick:l,className:`tw-mt-6 action-btn ${w?"disabled-btn":"sunshine-btn"}`,disabled:w,disableRipple:!0,disableHover:!0,children:c}):null,{}),(0,r.jsx)(()=>d?(0,r.jsx)(b.default,{onClick:o,className:"tw-mt-4",children:(0,r.jsx)(x.Z,{className:"tw-text-info",underline:!0,children:d})}):null,{})]})]})},I=a(3042),D=e=>{let{type:t,title:a,desc:n,remarks:l,isVerifying:o,handleBackBtnClick:c,onCodeFulfill:d,onResendCodeRequest:m,loginMethod:p,classicMethod:f}=e,h=(0,s.T)(),{copyToClipboard:j,isCopied:D}=(0,N.Z)(),k="123456",L=(0,y.D)(),[P,O]=(0,i.useState)(void 0),T=(0,i.useMemo)(()=>p===w.Ev.PHONE?f?.phone?.captcha_require===1:f?.email?.captcha_require===1,[f?.email?.captcha_require,f?.phone?.captcha_require,p]);return(0,r.jsx)(C,{handleBackBtnClick:c,title:a,desc:n,remarks:"read"===t?"":l,actionBtnTitle:"read"===t?h("continue"):"",isShowBackButton:!1,children:"read"===t?!L&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(()=>(0,r.jsx)("div",{className:"centered-content-col tw-py-8",children:(0,r.jsx)(u.Z,{src:"https://cdns.flowtheroom.com/qOh2lp-0AGWeBP68yRH5aQ/5cf829b1-c16f-4e2b-6537-d02f22d03600/public",alt:"whatsapp qr code",width:150,height:150})}),{}),(0,r.jsx)(()=>(0,r.jsx)("div",{className:"action-btn tw-bg-grey-100 tw-text-black-ground",children:(0,r.jsxs)("div",{className:"tw-px-4 lg:tw-px-8 tw-flex tw-justify-between",children:[(0,r.jsx)("div",{className:"tw-flex tw-space-x-2",children:k.split("").map((e,t)=>(0,r.jsx)("span",{className:"typography-heading-5",children:e},t))}),(0,r.jsx)(b.default,{onClick:()=>j(k),className:"tw-text-black-ground",children:(0,r.jsx)(E.Z,{icon:(0,r.jsx)(v.B,{width:20,height:20}),text:(0,r.jsx)(x.Z,{className:"tw-text-base tw-font-normal",underline:!0,children:h(D?"Copied!":"copy")})})})]})}),{})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(_.Z,{onCodeFulfill:d}),(0,r.jsx)(A.Z,{retryText:h("auth.retry"),onResendCodeRequest:()=>{m(P)}}),o&&(0,r.jsx)(g.Z,{className:"tw-mt-4 tw-mx-auto tw-animate-spin tw-h-9 tw-w-9"}),T&&(0,r.jsx)(I.Z,{onTokenReady:e=>{O(e)}})]})})},k=a(22590),L=a(491);let P=(e,t)=>{let a=L.KH+"/validation/email";return L.hM.post(a,e,{...t,os:""},!0)},O=(e,t)=>{let a=L.KH+"/validation/phone";return L.hM.post(a,e,{...t,os:""},!0)},T=(e,t)=>{let a=L.KH+"/otp/email";return L.hM.post(a,e,{...t,os:""},!0)},M=(e,t,a)=>{let r=L.KH+`/otp/phone/${a}`;return L.hM.post(r,e,{...t,os:""},!0)},R=(e,t)=>{let a=L.KH+"/otp/verify";return L.hM.post(a,e,{...t,os:""},!0)},S=(e,t,a)=>{let r=L._n+`/member/auth/${a}/continue`;return L.hM.post(r,e,{...t,os:""},!0)},F=e=>{let t=L.KH+"/config/welcome";return L.hM.get(t,{...e,os:""})},H=e=>{let t=L.KH+"/config";return L.hM.get(t,{...e,os:""})},B=(e,t)=>{let a=L._n+"/member/refer_code";return L.hM.put(a,e,t,!0)};var W=a(92756),$=a(95859),U=a(22442),G=a(47466),K=a(48653),Z=a(56920);let V={FREE:0,EMAIL_PW:1,EMAIL_UPDATE:2,PHONE:3},q={EMAIL:"email",PHONE:"phone"},Y="tw-rounded-[16px] tw-text-[15px] tw-font-normal placeholder:tw-text-[15px] placeholder:tw-font-normal";var z=e=>{let t=(0,s.T)(),{region:a,lang:n}=(0,c.useParams)(),{defaultEmail:l,defaultPhoneCode:o,defaultPhoneNumber:d,onContinueClick:u,isLoading:m,inputMode:p=V.FREE,classicMethod:f}=e,[h,x]=(0,i.useState)(p===V.EMAIL_PW||p===V.EMAIL_UPDATE?l:p===V.PHONE?d:""),[_,E]=(0,i.useState)(""),[v,N]=(0,i.useState)(p===V.EMAIL_UPDATE||p===V.FREE),[y,A]=(0,i.useState)(V.PHONE&&o?o:""),[j,C]=(0,i.useState)(""),[D,k]=(0,i.useState)(void 0),[L,T]=(0,i.useState)(q.EMAIL),M=(0,i.useMemo)(()=>L===q.EMAIL||p===V.EMAIL_PW||p===V.EMAIL_UPDATE?f?.email?.captcha_require===1:L===q.PHONE?f?.phone?.captcha_require===1:void 0,[f?.email?.captcha_require,f?.phone?.captcha_require,L,p]),[R,S]=(0,i.useState)(!1),[F,H]=(0,i.useState)(!1),[B,z]=(0,i.useState)(!1),J=(0,i.useMemo)(()=>(0,W.D)(async e=>{if(S(!1),v){let t=await P({email:e},{region:a,lang:n});S(t?.Data?.email_validation==="valid"||t?.Data?.member_validation==="valid"),H(t?.Data?.email_validation==="valid"),z(!1)}else{let t=await O({phone:e,dial_code:y},{region:a,lang:n});S(t?.Data?.phone_validation==="valid"),z(!1)}},500),[v,n,y,a]),[Q,X]=(0,i.useState)(!1),ee=e=>{X(!0);let t=e.target.value;(0,Z.E_)(t)||x(e.target.value)},et=(0,i.useMemo)(()=>
1{if(!Q)return{};let e=(0,K.uP)(v,h,!0);return Object.keys(e).length>0?e:(z(!0),J(h),{})},[Q,v,p,_,h,J]),ea=(0,i.useMemo)(()=>Object.keys(et).length>0,[et]),[er,es]=(0,i.useState)(!1),ei=(0,i.useMemo)(()=>er?(0,K.LM)(j):{},[j,er]),[en,el]=(0,i.useState)(!1),eo=(0,i.useMemo)(()=>{if(!en)return{};let e=(0,K.uP)(!0,_,void 0);return Object.keys(e).length>0?e:(z(!0),J(_),{})},[J,en,_]);(0,i.useEffect)(()=>{p===V.EMAIL_PW||p===V.EMAIL_UPDATE||p===V.FREE?T(q.EMAIL):T(q.PHONE)},[p]),function(e,t,a){let r=(0,i.useRef)(t);(0,i.useEffect)(()=>{r.current=t},[t]),(0,i.useEffect)(()=>{let t=void 0===a?window:a,s=e=>r.current(e);return t?.addEventListener(e,s),()=>{t?.removeEventListener(e,s)}},[e,a])}("keydown",e=>ec(e),document.getElementById("email-password-input"));let ec=e=>{("Enter"===e.key||"Return"===e.key)&&ed()},ed=()=>{u(p===V.EMAIL_UPDATE?w.Ev.EMAIL_UPDATE:p===V.EMAIL_PW?w.Ev.PASSWORD:v?w.Ev.EMAIL:w.Ev.PHONE,p===V.EMAIL_UPDATE?_:h,y,j,F,D)},eu=(0,i.useMemo)(()=>{if(p===V.FREE);else if(p===V.EMAIL_PW)return ea||Object.keys(ei).length>0;return ea||!R},[p,R,ea,ei]);return(0,r.jsxs)("div",{className:"tw-flex tw-flex-col tw-gap-6",children:[(0,r.jsxs)("div",{children:[(0,r.jsxs)(G.mQ,{value:L,onValueChange:e=>{T(e),x(""),N(e===q.EMAIL)},className:"tw-flex tw-flex-col tw-gap-6",children:[p===V.FREE&&(0,r.jsxs)(G.dr,{"aria-label":"auth method tab",variant:"section",children:[(0,r.jsx)(G.SP,{value:q.EMAIL,className:"tw-py-3 tw-text-[15px] tw-font-semibold tw-border-flow-border",children:t("auth.email")}),(0,r.jsx)(G.SP,{value:q.PHONE,className:"tw-py-3 tw-text-[15px] tw-font-semibold tw-border-flow-border",children:t("auth.phone_number")})]}),(0,r.jsx)(G.nU,{value:q.PHONE,className:"tw-mt-0",children:(0,r.jsxs)("div",{className:"tw-flex tw-items-center tw-w-full tw-relative",children:[(0,r.jsx)($.Z,{phoneCode:y,onInputChange:e=>{"phoneCode"===e.type&&A(e.value)},isDisabled:p===V.PHONE,a7Style:!0,showCaret:!0,buttonClassName:"tw-justify-between tw-gap-1.5 tw-rounded-[16px] tw-text-[15px] tw-font-semibold"}),(0,r.jsx)(U.I,{id:"phone-input",type:"text",className:`tw-w-full ${Y} focus-visible:tw-ring-offset-0 focus-visible:tw-ring-[3px] ${ea?"tw-border-red-400 focus-visible:tw-border-red-400 focus-visible:tw-ring-red-400/15":"focus-visible:tw-border-flow-primary focus-visible:tw-ring-flow-primary/10"}`,"aria-invalid":ea||void 0,placeholder:t("auth.enter_phone_number"),onChange:ee,value:h,autoComplete:"off",inputMode:"numeric",onKeyDown:e=>{"Backspace"===e.key||"Tab"===e.key||/[0-9]/.test(e.key)||e.preventDefault()},disabled:p===V.PHONE,required:!0})]})}),(0,r.jsx)(G.nU,{value:q.EMAIL,className:"tw-mt-0",children:(0,r.jsx)(U.I,{id:"email-input",type:"text",className:`tw-w-full ${Y} focus-visible:tw-ring-offset-0 focus-visible:tw-ring-[3px] ${ea?"tw-border-red-400 focus-visible:tw-border-red-400 focus-visible:tw-ring-red-400/15":"focus-visible:tw-border-flow-primary focus-visible:tw-ring-flow-primary/10"}`,"aria-invalid":ea||void 0,placeholder:t("auth.enter_email"),onChange:ee,value:h,spellCheck:"false",autoComplete:"off",disabled:p===V.EMAIL_UPDATE||p===V.EMAIL_PW,required:!0})})]}),Object.values(et).map((e,a)=>(0,r.jsxs)("p",{className:"tw-text-xs tw-font-medium tw-text-red-500 tw-mt-2",children:["* ",t(e)]},`input-error-${a}`)),Q&&!ea&&!B&&!R&&!!h&&(0,r.jsxs)("p",{className:"tw-text-xs tw-font-medium tw-text-red-500 tw-mt-2",children:["* ",t(v?"auth.invalid_email":"validate.alert_phone")]}),p===V.EMAIL_PW&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(U.I,{id:"email-password-input",type:"password",className:`tw-w-full tw-mt-3 ${Y}`,placeholder:t("self_check_in.password"),onChange:e=>{es(!0),C(e.target.value)},value:j,spellCheck:"false",autoComplete:"new-password",required:!0}),Object.values(ei).map((e,a)=>(0,r.jsxs)("p",{className:"tw-text-xs tw-font-medium tw-text-red-500 tw-mt-2",children:["* ",t(e)]},`password-error-${a}`))]}),p===V.EMAIL_UPDATE&&(0,r.jsxs)("div",{className:"tw-mt-4",children:[(0,r.jsx)(U.I,{id:"email-phone-input",type:"text",className:`tw-w-full ${Y} ${ea?"tw-border-red-400":""}`,"aria-invalid":ea||void 0,placeholder:t("auth.enter_email"),onChange:e=>{el(!0),E(e.target.value)},value:_,spellCheck:"false",autoComplete:"off",required:!0}),Object.values(eo).map((e,a)=>(0,r.jsxs)("p",{className:"tw-text-xs tw-font-medium tw-text-red-500 tw-mt-2",children:["* ",t(e)]},`update-email-error-${a}`))]})]}),M&&(0,r.jsx)(I.Z,{onTokenReady:e=>{k(e)}}),p!==V.PHONE&&(0,r.jsx)(b.default,{className:`tw-w-full tw-py-[15px] tw-rounded-[16px] tw-text-[15px] tw-font-bold disabled:!tw-bg-[#EFEDE6] dark:disabled:!tw-bg-[#23262D] disabled:!tw-text-[#9A988F] dark:disabled:!tw-text-[#6C7077] disabled:!tw-opacity-100 ${eu||M&&!D?"":"sunshine-btn"}`,onClick:ed,disabled:eu||!!M&&!D,isLoading:m,children:B&&p!==V.EMAIL_PW?(0,r.jsx)(g.Z,{className:"tw-animate-spin tw-h-6 tw-w-6 tw-text-[var(--color-white-ground-hex)]"}):p===V.EMAIL_UPDATE?t("update"):t("auth.continue")})]})},J=a(28959),Q=e=>{let{onButtonClick:t}=e,a=(0,s.T)();return(0,r.jsxs)("div",{className:"tw-flex tw-flex-col tw-items-center tw-gap-3",children:[(0,r.jsx)("button",{type:"button",onClick:t,"aria-label":a("retrieve_booking.guest_button_hint"),className:"tw-flex tw-items-center tw-justify-center tw-size-[58px] tw-shrink-0 tw-rounded-full tw-border tw-border-solid tw-border-default tw-bg-white tw-p-0 tw-cursor-pointer tw-transition-colors hover:tw-bg-gray-secondary",children:(0,r.jsx)(J.W,{})}),(0,r.jsx)("div",{className:"tw-text-center tw-text-sm tw-w-3/4 tw-m-auto tw-text-info",children:a("retrieve_booking.guest_button_hint")})]})},X=e=>{let{onReferCodeContinue:t,onSkipContinue:a}=e,n=(0,s.T)(),[l,o]=(0,i.useState)("");return(0,r.jsx)(C,{title:n("auth.got_referral_code"),desc:n("auth.referral_code_enter"),actionBtnTitle:n("apply"),actionTextTitle:n("skip"),handleContinueBtnClick:()=>t(l),handleTextBtnClick:a,isShowBackButton:!1,isContinueButtonDisabled:l.length<=3,children:(0,r.jsx)("div",{className:"tw-mt-4",children:(0,r.jsx)(U.I,{placeholder:n("member.referral_popup.input_placeholder"),className:"tw-w-full",onCh
1ange:e=>{o(e.target.value)},value:l,spellCheck:"false",autoComplete:"off",required:!0})})})},ee=a(95203),et=e=>{let{title:t,desc:a}=e;return(0,r.jsxs)("div",{className:"tw-flex tw-flex-col tw-gap-1",children:[(0,r.jsx)("div",{className:"tw-text-[20px] tw-font-bold tw-tracking-[-0.02em] tw-text-title",children:t}),a&&(0,r.jsx)("div",{className:"tw-text-sm tw-font-normal tw-text-info",children:a})]})},ea=a(21467),er=a(6473),es=a(16635),ei=a(29327),en=a(87897),el=a(49609),eo=a(29561),ec=a(66349),ed=a(59864),eu=a(53644),ew=a(87223),em=a(37054),ep=a(26141);let ef=e=>{let{t,onBack:a}=e;return(0,r.jsx)(b.default,{variant:"text",onClick:a,className:"tw-self-start -tw-ml-2",children:(0,r.jsxs)("div",{className:"tw-flex tw-items-center",children:[(0,r.jsx)(j.Z,{className:"tw-rotate-[90deg]",size:32}),(0,r.jsx)("p",{className:"typography-body-2 tw-text-black tw-text-base",children:t("back")})]})})},eh=e=>{let{label:t,onBack:a}=e;return(0,r.jsx)("button",{type:"button",onClick:a,"aria-label":t,className:"tw-flex tw-self-start tw-items-center tw-justify-center tw-size-9 -tw-ml-2 tw-rounded-full tw-bg-transparent tw-border-0 tw-p-0 tw-cursor-pointer tw-text-title",children:(0,r.jsxs)("svg",{width:"23",height:"23",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",className:"tw-block",children:[(0,r.jsx)("path",{d:"M19 12H5"}),(0,r.jsx)("path",{d:"M11 18l-6-6 6-6"})]})})};var eg=(0,es.z)(e=>{let{hideRetrieveBooking:t=!1,footerSlot:a,onBack:n,onAuthSuccess:l}=e,m=(0,s.T)(),p=(0,c.usePathname)(),{region:f,lang:_}=(0,c.useParams)(),E=(0,c.useRouter)(),v=(0,o.b9)(ea.HQ),N=(0,o.b9)(ea.VH),y=(0,o.b9)(ea.QI),[A]=(0,o.KO)(ea.KY),[j,C]=(0,o.KO)(en.Lt),{view:I,setVie
1w:L,phoneCode:P,phoneNumber:O,email:W,loginMethod:$,isLoadingEmailSignIn:U,isAllowPwLogin:G,isPwLoginSuccess:K,isVerifyingOtp:Z,handleChannelBtnClick:q,handleContinueClicked:Y,handlePasswordLoginClicked:J,handleEmailNotAvailClicked:es,handleVerifyCodeFulfilled:eg,handleResendCodeRequested:ex,handleReferCodeContinue:e_}=function(){let{onAuthSuccess:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,s.T)(),{region:a,lang:r}=(0,c.useParams)(),{fetchFingerprintData:n}=(0,eu.i)(),l=(0,ew.Z)({t}),[,u]=(0,o.KO)(ec.b),[m,p]=(0,o.KO)(ea.VH),[f,h]=(0,o.KO)(ea.QI),[,g]=(0,o.KO)(ea.KY),[x,_]=(0,i.useState)(f??el.d.LANDING),[b,E]=(0,i.useState)(""),[v,N]=(0,i.useState)(""),[y,A]=(0,i.useState)(""),[j,C]=(0,i.useState)(""),[I,D]=(0,i.useState)(""),[k,L]=(0,i.useState)(""),[P,O]=(0,i.useState)(!1),[F,H]=(0,i.useState)(!1),[W,$]=(0,i.useState)(!1),[U,G]=(0,i.useState)(!1),[K,Z]=(0,i.useState)(void 0);(0,i.useEffect)(()=>{m&&f!==el.d.WELCOME&&g(void 0)},[m]);let V=async e=>{if(D(e),e===w.iU.WHATSAPP)_(el.d.WHATSAPP_VERIFY);else if(e===w.iU.SMS||e===w.iU.CALL)try{let s=await S({phone:v,dial_code:b},{region:a,lang:r},"phone");if(s.Success&&s?.Data?.auth?.includes("otp")){let s=await n();_(el.d.REQ_VERIFY_CODE);let i={phone:v,dial_code:b,cf_turnstile_response:K,...s&&{fingerprint:s.visitorId,fingerprint_visitorId:s.visitorId,fingerprint_requestId:s.requestId}},o=window.location.hostname,c={region:a,lang:r};o.includes("staging")&&(c.is_staging=1);let d=await M(i,c,e);d.Success||(l.setErrorDialog({title:t("err"),message:d?.Data?.message??""}),_(el.d.LANDING))}else l.setErrorDialog({title:t("err"),message:s?.Data?.message??""})}catch(e){l.setErrorDialog({title:t("err"),message:e?.message??""}),_(el.d.LANDING)}},q=async(e,s,i,n,o,c)=>{if(c&&Z(c),e===w.Ev.PHONE)E(i),N(s),_(el.d.PHONE_CHANNEL);else if(e===w.Ev.EMAIL){O(!0),A(s);try{let e=await S({email:s,email_validation:o?"valid":"invalid"},{region:a,lang:r},"email");if(e.Success){if(e?.Data?.auth?.length===1&&e?.Data?.auth?.includes("password"))_(el.d.PW_LOGIN);else{e?.Data?.auth?.includes("password")&&H(!0),_(el.d.REQ_VERIFY_CODE);let i=window.location.hostname,n={region:a,lang:r};i.includes("staging")&&(n.is_staging=1);let o=await T({email:s,cf_turnstile_response:c},n);o.Success||(l.setErrorDialog({title:t("err"),message:o?.Data?.message??""}),_(el.d.LANDING))}}else l.setErrorDialog({title:t("err"),message:e?.Data?.message??""})}catch(e){l.setErrorDialog({title:t("err"),message:e?.message??""}),_(el.d.LANDING)}finally{O(!1)}}else if(e===w.Ev.PASSWORD)await Y(s,n??"");else if(e===w.Ev.EMAIL_UPDATE)try{let e=await (0,eo.Id)({email:s,region:a,lang:r});if(e.Success&&e.Data?.state===null){$(!1),H(!1),C(y),A(s),_(el.d.REQ_VERIFY_CODE);let e=window.location.hostname,i={region:a,lang:r};e.includes("staging")&&(i.is_staging=1);let n=await T({email:s,previous_email:y,cf_turnstile_response:c},i);n.Success||(l.setErrorDialog({title:t("err"),message:n?.Data?.message??""}),_(el.d.LANDING))}else l.setErrorDialog({title:t("err"),message:e?.Data?.message??""})}catch(e){l.setErrorDialog({title:t("err"),message:e?.message??""}),_(el.d.LANDING)}L(e)},Y=async(e,s)=>{try{if(O(!0),s.length<8)throw Error("appwrite_pw_length");try{await d.appwriteAccount.deleteSession("current")}catch(e){}await d.appwriteAccount.createEmailPasswordSession(e,s);try{_(el.d.REQ_VERIFY_CODE),L(w.Ev.EMAIL),$(!0);let s=window.location.hostname,i={region:a,lang:r};s.includes("staging")&&(i.is_staging=1);let n=await T({email:e,cf_turnstile_response:K},i);n.Success||(l.setErrorDialog({title:t("err"),message:n?.Data?.message??""}),_(el.d.LANDING))}catch(e){l.setErrorDialog({title:t("err"),message:e?.message??""})}}catch(a){let e={title:t("err"),message:a?.message};if(a?.type==="general_unauthorized_scope"||a?.type==="user_invalid_credentials"){try{await d.appwriteAccount.deleteSession("current")}catch(e){}await d.appwriteAccount.createAnonymousSession();let a=await d.appwriteAccount.createJWT();localStorage.setItem(ed.Jr.AW_TOKEN,a.jwt),e.message=t("error.appwrite_err_pw_invalid")}else if(a?.type==="user_session_already_exists"){try{await d.appwriteAccount.deleteSession("current")}catch(e){}try{await d.appwriteAccount.createAnonymousSession();
1let e=await d.appwriteAccount.createJWT();localStorage.setItem(ed.Jr.AW_TOKEN,e.jwt)}catch(e){}e.message=t("error.appwrite_err_pw_invalid")}else a?.message==="appwrite_pw_length"&&(e.title=t("error.appwrite_err_email_acct_pw_length_title"),e.message=t("error.appwrite_err_email_acct_pw_length_desc"),e.buttons=[{action:ei.HL.PW_LENGTH_SUPPORT,text:t("confirm")}]);l.setErrorDialog(e)}finally{O(!1)}},z=async s=>{try{let i=await n();G(!0);let o=(0,ep.Er)(ed.FW.C_PARAM_VALUE),c={};o&&(c.c_param_value=o);let m={otp:s,acq_track:c,...i&&{fingerprint:i.visitorId,fingerprint_visitorId:i.visitorId,fingerprint_requestId:i.requestId}};k===w.Ev.EMAIL_UPDATE&&(m.previous_email=j);let f=await R(m,{region:a,lang:r});f.Data?.member_id&&f.Data?.secret&&(await (0,d.zF)(f.Data.member_id,f.Data.secret),u(!0)),f.Success?f.Data?.new_member?(g(f.Data?.is_abuse??0),f.Data?.is_abuse===1?_(el.d.WELCOME):_(el.d.REFER_CODE),(0,em.sV)(k===w.Ev.PHONE?"phone":"email",k===w.Ev.PHONE?{fullPhoneNumber:`${b} ${v}`}:{email:y})):((0,em.tQ)(k===w.Ev.PHONE?"phone":"email"),p(!1),h(el.d.LANDING),e?.()):l.setErrorDialog({title:t("err"),message:f?.Data?.message??""})}catch(e){l.setErrorDialog({title:t("err"),message:e?.message??""})}finally{G(!1)}},J=async e=>{if(k===w.Ev.EMAIL||k===w.Ev.EMAIL_UPDATE){let s={email:y,cf_turnstile_response:e},i=window.location.hostname,n={region:a,lang:r};i.includes("staging")&&(n.is_staging=1),k===w.Ev.EMAIL_UPDATE&&(s.previous_email=j);try{let e=await T(s,n);e.Success||(l.setErrorDialog({title:t("err"),message:e?.Data?.message??""}),_(el.d.LANDING))}catch(e){l.setErrorDialog({title:t("err"),message:e?.message??""}),_(el.d.LANDING)}}else if(k===w.Ev.PHONE)try{let s=await n(),i={phone:v,dial_code:b,cf_turnstile_response:e,...s&&{fingerprint:s.visitorId,fingerprint_visitorId:s.visitorId,fingerprint_requestId:s.requestId}},o=window.location.hostname,c={region:a,lang:r};o.includes("staging")&&(c.is_staging=1);let d=await M(i,c,I);d.Success||(l.setErrorDialog({title:t("err"),message:d?.Data?.message??""}),_(el.d.LANDING))}catch(e){l.setErrorDialog({title:t("err"),message:e?.message??""}),_(el.d.LANDING)}},Q=async e=>{try{let s=await d.appwriteAccount.get(),i=await B({refer_code:e,profile_id:s.$id},{region:a,lang:r});i.Success?_(el.d.WELCOME):l.setErrorDialog({title:t("err"),message:i?.Data?.message??""})}catch(e){l.setErrorDialog({title:t("err"),message:e?.message??""})}finally{h(el.d.LANDING)}};return{view:x,setView:_,phoneCode:b,phoneNumber:v,email:y,loginMethod:k,isLoadingEmailSignIn:P,isAllowPwLogin:F,isPwLoginSuccess:W,isVerifyingOtp:U,handleChannelBtnClick:V,handleContinueClicked:q,handlePasswordLoginClicked:()=>{_(el.d.PW_LOGIN)},handleEmailNotAvailClicked:()=>{_(el.d.EMAIL_UPDATE)},handleVerifyCodeFulfilled:z,handleResendCodeRequested:J,handleReferCodeContinue:Q}}({onAuthSuccess:l}),{data:eb,error:eE}=(0,er.ZP)(I===el.d.LANDING||I===el.d.PW_LOGIN||I===el.d.EMAIL_UPDATE||I===el.d.REQ_VERIFY_CODE?["/config",f,_]:null,async e=>{let[,t,a]=e,r=await H({region:t,lang:a});if(r.Success)return r.Data;throw Error("Fetch auth config failed")}),{data:ev,error:eN}=(0,er.ZP)(I===el.d.WELCOME&&void 0!==A?["/config/welcome",f,_,A]:null,async e=>{let[,t,a,r]=e,s=await F({region:t,lang:a,is_abuse:r});if(s.Success)return s.Data;throw Error("Fetch welcome config failed")});return(0,i.useEffect)(()=>{if(j){if(j===ei.HL.PW_LENGTH_SUPPORT){let e=eb?.sign_in_support?.article_id;e?E.push(`/${f}/${_}/help-center?help_article_id=${e}`):E.push(`/${f}/${_}/help-center`),N(!1)}C(void 0)}},[j,eb,f,_,E,N,C]),(0,r.jsxs)(r.Fragment,{children:[I===el.d.LANDING&&(0,r.jsxs)(r.Fragment,{children:[n&&(0,r.jsx)(eh,{label:m("back"),onBack:n}),(0,r.jsx)(et,{title:m("auth.welcome"),desc:m("auth.sign_in_or_register")}),(0,r.jsx)(z,{onContinueClick:Y,isLoading:U,classicMethod:eb?.classic_methods}),(0,r.jsx)(ee.Z,{text:m("auth.login_register_with")}),(0,r.jsx)(h,{handleSocialSignUp:()=>L(el.d.LANDING),socialMethods:eb?.social_methods}),!t&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(ee.Z,{text:m("or")}),(0,r.jsx)(Q,{onButtonClick:()=>{p.includes("retrieve-booking")?v(!0):E.push(`/${f}/${_}
1/retrieve-booking`),N(!1),y(el.d.LANDING)}})]}),a]}),I===el.d.REQ_VERIFY_CODE&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(ef,{t:m,onBack:()=>L(el.d.LANDING)}),(0,r.jsx)(D,{type:"input",title:m("auth.enter_code"),desc:m("auth.verify_code_desc",{recipient:$===w.Ev.PHONE?`${P} ${O}`:W}),remarks:m("auth.dont_share"),isVerifying:Z,handleBackBtnClick:()=>L(el.d.LANDING),onCodeFulfill:eg,onResendCodeRequest:ex,classicMethod:eb?.classic_methods,loginMethod:$}),K?(0,r.jsx)(b.default,{variant:"text",onClick:es,className:"tw-text-black-ground tw-py-2",children:(0,r.jsx)(x.Z,{className:"tw-text-black tw-font-normal",underline:!0,children:m("auth.could_not_reach_inbox")})}):G?(0,r.jsx)(b.default,{variant:"text",onClick:J,className:"tw-text-black-ground tw-py-2",children:(0,r.jsx)(x.Z,{className:"tw-text-black tw-font-normal",underline:!0,children:m("auth.fallback_to_pw_login")})}):null]}),I===el.d.PW_LOGIN&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(ef,{t:m,onBack:()=>L(el.d.LANDING)}),(0,r.jsx)(et,{title:m("auth.welcome"),desc:m("auth.pw_login_desc")}),(0,r.jsx)(z,{onContinueClick:Y,isLoading:U,inputMode:V.EMAIL_PW,classicMethod:eb?.classic_methods,defaultEmail:W})]}),I===el.d.EMAIL_UPDATE&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(ef,{t:m,onBack:()=>L(el.d.LANDING)}),(0,r.jsx)(et,{title:m("auth.update_email"),desc:m("auth.update_email_desc")}),(0,r.jsx)(z,{onContinueClick:Y,isLoading:U,inputMode:V.EMAIL_UPDATE,classicMethod:eb?.classic_methods,defaultEmail:W})]}),I===el.d.WHATSAPP_VERIFY&&(0,r.jsx)(D,{type:"read",title:m("input.verify_code"),desc:"Message us on WhatsApp with your own unique verification code. Return to this page after.",remarks:"Donât Share this code with anyone; our employees will never ask for the code.",isVerifying:!1,handleBackBtnClick:()=>L(el.d.LANDING),onCodeFulfill:eg,onResendCodeRequest:ex,classicMethod:eb?.classic_methods}),I===el.d.REFER_CODE&&(0,r.jsx)(X,{onReferCodeContinue:e_,onSkipContinue:()=>
1{L(el.d.WELCOME),y(el.d.LANDING)}}),I===el.d.PHONE_CHANNEL&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(ef,{t:m,onBack:()=>L(el.d.LANDING)}),(0,r.jsx)(et,{title:m("auth.welcome"),desc:m("auth.sign_in_or_register")}),(0,r.jsx)(z,{onContinueClick:Y,isLoading:U,inputMode:V.PHONE,defaultPhoneNumber:O,defaultPhoneCode:P}),(0,r.jsx)(ee.Z,{text:m("input.verify_channel")}),(0,r.jsx)(k.Z,{onClick:e=>q(e)})]}),I===el.d.WELCOME&&(0,r.jsx)("div",{className:"tw-flex tw-flex-col tw-items-center",children:ev?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{className:"typography-heading-5 tw-text-black",children:ev.title}),(0,r.jsx)(u.Z,{width:280,height:0,src:ev.image,alt:ev.title,className:"tw-mt-4"}),(0,r.jsx)("p",{className:"typography-body-2 tw-text-info tw-mt-4",children:ev.description}),(0,r.jsx)(b.default,{variant:"contained",onClick:()=>{N(!1),l?.()},className:"tw-mt-4 tw-py-4 tw-bg-brand",fullWidth:!0,disableHover:!0,disableRipple:!0,children:(0,r.jsx)("p",{className:"typography-body-1 tw-text-black-ground",children:ev.btn?.text})})]}):(0,r.jsx)(g.Z,{className:"tw-animate-spin tw-h-9 tw-w-9"})})]})})},22442:function(e,t,a){a.d(t,{I:function(){return n}});var r=a(57437),s=a(2265),i=a(89595);let n=s.forwardRef((e,t)=>{let{className:a,type:s,...n}=e;return(0,r.jsx)("input",{type:s,className:(0,i.cn)("tw-flex tw-h-14 tw-w-full tw-rounded-xl tw-border tw-border-flow-border tw-bg-[var(--flow-background)] tw-px-3 tw-py-2 tw-text-base tw-font-medium tw-text-[var(--flow-foreground)] tw-ring-offset-background file:tw-border-0 file:tw-bg-transparent file:tw-text-sm file:tw-font-medium placeholder:tw-text-[var(--themes-text-body-subtle)] placeholder:tw-font-medium focus-visible:tw-outline-none focus-visible:tw-ring-2 focus-visible:tw-ring-flow-ring focus-visible:tw-ring-offset-2 focus-visible:tw-ring-offset-flow-background disabled:tw-cursor-not-allowed disabled:tw-opacity-50",a),ref:t,...n})});n.displayName="Input"},47466:function(e,t,a){a.d(t,{SP:function(){return w},dr:function(){return u},mQ:function(){return d},nU:function(){return m}});var r=a(57437),s=a(2265),i=a(75777),n=a(89595);let l=s.createContext("default"),o={default:"tw-inline-flex tw-h-14 tw-w-full tw-items-center tw-justify-center tw-rounded-none tw-border-b tw-border-flow-border tw-bg-transparent tw-p-0 tw-text-flow-muted-foreground",section:"tw-flex tw-h-auto tw-w-full tw-items-center tw-justify-center tw-rounded-none tw-bg-transparent tw-p-0 tw-text-flow-muted-foreground",editorial:"tw-flex tw-h-auto tw-w-auto tw-items-center tw-justify-start tw-gap-6 sm:tw-gap-10 tw-rounded-none tw-border-0 tw-bg-transparent tw-p-0"},c={default:"tw-inline-flex tw-h-full tw-flex-1 tw-items-center tw-justify-center tw-whitespace-nowrap tw-border-b-2 tw-border-transparent tw-px-3 tw-text-sm tw-font-medium tw-text-flow-muted-foreground tw-ring-offset-background tw-transition-all focus-visible:tw-outline-none focus-visible:tw-ring-2 focus-visible:tw-ring-flow-ring focus-visible:tw-ring-offset-2 focus-visible:tw-ring-offset-flow-background disabled:tw-pointer-events-none disabled:tw-opacity-50 data-[state=active]:tw-border-flow-primary data-[state=active]:tw-text-flow-primary",section:"tw-inline-flex tw-flex-1 tw-items-center tw-justify-center tw-whitespace-nowrap tw-border-b-2 tw-border-transparent tw-px-3 tw-py-4 tw-text-sm tw-font-medium tw-text-flow-muted-foreground tw-ring-offset-background tw-transition-all focus-visible:tw-outline-none focus-visible:tw-ring-2 focus-visible:tw-ring-flow-ring focus-visible:tw-ring-offset-2 focus-visible:tw-ring-offset-flow-background disabled:tw-pointer-events-none disabled:tw-opacity-50 data-[state=active]:tw-border-brand-default data-[state=active]:tw-text-flow-foreground",editorial:"tw-inline-flex tw-items-center tw-justify-center tw-whitespace-nowrap tw-border-b-[3px] tw-border-transparent tw-pb-3 tw-text-sm lg:tw-text-base tw-font-medium tw-text-[var(--themes-text-title)] tw-ring-offset-background tw-transition-colors focus-visible:tw-outline-none disabled:tw-pointer-events-none disabled:tw-opacity-50 data-[state=active]:tw-text-[var(--themes-text-gold)]"},d=i.fC,u=s.forwardRef((e,t)=>
1{let{className:a,variant:s="default",...c}=e;return(0,r.jsx)(l.Provider,{value:s,children:(0,r.jsx)(i.aV,{ref:t,className:(0,n.cn)(o[s],a),...c})})});u.displayName=i.aV.displayName;let w=s.forwardRef((e,t)=>{let{className:a,variant:o,...d}=e,u=s.useContext(l);return(0,r.jsx)(i.xz,{ref:t,className:(0,n.cn)(c[o??u],a),...d})});w.displayName=i.xz.displayName;let m=s.forwardRef((e,t)=>{let{className:a,...s}=e;return(0,r.jsx)(i.VY,{ref:t,className:(0,n.cn)("tw-mt-2 tw-ring-offset-background focus-visible:tw-outline-none focus-visible:tw-ring-2 focus-visible:tw-ring-flow-ring focus-visible:tw-ring-offset-2 focus-visible:tw-ring-offset-flow-background",a),...s})});m.displayName=i.VY.displayName},26348:function(e,t,a){a.d(t,{appwriteAccount:function(){return d},getAppwriteToken:function(){return h},zF:function(){return p},H0:function(){return f}});var r=a(2301),s=a(82435),i=a(59864);class n{constructor(e){this.counter=0,this.waiting=[],this.max=e}take(){if(this.waiting.length>0&&this.counter<this.max){this.counter+=1;let e=this.waiting.shift();e&&e.resolve(void 0)}}acquire(){return this.counter<this.max?(this.counter+=1,new Promise(e=>{e(void 0)})):new Promise((e,t)=>{this.waiting.push({resolve:e,err:t})})}release(){this.counter-=1,this.take()}purge(){let e=this.waiting.length;for(let t=0;t<e;t+=1)this.waiting[t].err("Task has been purged.");return this.counter=0,this.waiting=[],e}}var l=a(53702);let o=new n(1),c=new r.KU().setEndpoint("https://auth.flowtheroom.com/v1").setProject("67e3ceec002f9190319e"),d=new r.mR(c),u={TOKEN_EXPIRED:"TOKEN_EXPIRED",TOKEN_NOT_FOUND:"TOKEN_NOT_FOUND"};class w{constructor(e="",t=null){this.name="TokenExpiredError",this.code=t,this.message=e,Error.captureStackTrace&&Error.captureStackTrace(this,w)}}class m{constructor(e="",t=null){this.name="TokenNotFoundError",this.code=t,this.message=e,Error.captureStackTrace&&Error.captureStackTrace(this,m)}}let p=async(e,t)=>{await o.acquire();try{try{await d.deleteSession("current")}catch(e){}await d.createSession(e,t);let a=await d.createJWT();l.Z.setItem(i.Jr.AW_TOKEN,a.jwt)}catch(r){try{await d.deleteSession("current")}catch(e){}await d.createSession(e,t);let a=await d.createJWT();l.Z.setItem(i.Jr.AW_TOKEN,a.jwt)}finally{await o.release()}},f=async()=>{await o.acquire(),await d.deleteSession("current"),await d.createAnonymousSession();let e=await d.createJWT();l.Z.setItem(i.Jr.AW_TOKEN,e.jwt),await o.release()},h=async()=>{await o.acquire();let e=l.Z.getItem(i.Jr.AW_TOKEN),t=!1;try{if(e){let t=(0,s.o)(e);if(!(!t.exp||1e3*t.exp<Date.now()))return e;throw new w("",u.TOKEN_EXPIRED)}throw t=!0,new m("",u.TOKEN_NOT_FOUND)}catch(e){try{if(t)try{await d.createAnonymousSession()}catch(e){if(e?.type!=="user_session_already_exists")throw e}let e=await d.createJWT();return l.Z.setItem(i.Jr.AW_TOKEN,e.jwt),e.jwt}catch(e){try{await d.createAnonymousSession();let e=await d.createJWT();return l.Z.setItem(i.Jr.AW_TOKEN,e.jwt),e.jwt}catch(e){return console.error("getAppwriteToken: failed to create anonymous session",e),null}}}finally{await o.release()}}},87897:function(e,t,a){a.d(t,{KH:function(){return n},Lt:function(){return l},_l:function(){return i}});var r=a(39959),s=a(29327);let i=(0,r.cn)(!1),n=(0,r.cn)({title:"",message:"",buttons:[],contentType:s.U2.GENERIC,type:"",additionalBtnText:"",id:0}),l=(0,r.cn)("")},97316:function(e,t,a){a.d(t,{Q6:function(){return d},Rt:function(){return u},_t:function(){return o},h_:function(){return w},mx:function(){return m},nc:function(){return c},rT:function(){return l},sg:function(){return n},zF:function(){return p}});var r=a(39959),s=a(26141),i=a(81244);let n=(0,r.cn)({isPaymentLoading:!0,spaceType:void 0,paymentMethods:[],cardGateways:[],checkoutDetails:{},venueRateDetails:{name:"",info:{features:[{icon:"",text:""}],spec:"",views:""},amenities:[],instructions:{checkin:"",checkout:""},images:{list:[]}},isVoucherDialogOpen:!1,isSaveCard:!1}),l=(0,r.cn)(e=>e(n).spaceType);(0,r.cn)(e=>e(n).isPaymentLoading),(0,r.cn)(e=>e(n).paymentMethods.filter(e=>-1===e.active)),(0,r.cn)(e=>e(n).paymentMethods.filter(e=>0===e.active));let o=(0,r.cn)(!1),c=(0,r.cn)(!1),d=(0,r.cn)(e=>e(n).venueRateDetails),u=(0,r.cn)(e=>e(n).checkoutDetails),w=(0,i.w0)({isCardNumberCompleted:!1,isCvcCompleted:!1,isExpiryCompleted:!1,isAllowedBrand:!1,isAdyenInfoFilled:!1},(e,t)=>{let a={};return(0,s.l$)(t,"isCardNumberCompleted")&&(a.isCardNumberCompleted=t.isCardNumberCompleted),(0,s.l$)(t,"isCvcCompleted")&&(a.isCvcCompleted=t.isCvcCompleted),(0,s.l$)(t,"isExpiryCompleted")&&(a.isExpiryCompleted=t.isExpiryCompleted),(0,s.l$)(t,"isAllowedBrand")&&(a.isAllowedBrand=t.isAllowedBrand),(0,s.l$)(t,"isAdyenInfoFilled")&&(a.isAdyenInfoFilled=t.isAdyenInfoFilled),{...e,...a}});w.debugLabel="Card Info";let m=(0,r.cn)(e=>e(w).isCardNumberCompleted&&e(w).isCvcCompleted&&e(w).isExpiryCompleted&&e(w).isAllowedBrand),p=(0,r.cn)(e=>e(w).isAdyenInfoFilled)},63049:function(e,t,a){var r=a(2265);t.Z=()=>{let[e,t]=(0,r.useState)(!1);return{copyToClipboard:(0,r.useCallback)(e=>{e&&navigator.clipboard.writeText(e).then(function(){t(!0),setTimeout(()=>t(!1),1500)},function(e){console.error("Could not copy text: ",e)})},[]),isCopied:e}}},87223:function(e,t,a){var r=a(11362),s=a(87897),i=a(29327);t.Z=e=>{let{t}=e,[,a]=(0,r.KO)(s._l),[,n]=(0,r.KO)(s.KH);return{setErrorDialog:e=>{a(!0),n({title:e.title||t("err"),message:e.message,contentType:e.contentType??i.U2.GENERIC,...e.buttons&&{buttons:e.buttons}})},closeDialog:()=>{a(!1)}}}},48653:function(e,t,a){a.d(t,{FR:function(){return l},LM:function(){return d},d4:function(){return o},fu:function(){return i},uP:function(){return c},yj:function(){return n}});var r=a(3113),s=a(56920);let i=e=>{let t={};return(e?.firstName===""||e?.firstName===void 0||e?.firstName===null||!e.isNameValidationPassed)&&e.isRequiredName&&(t.firstName="validate.alert_given_name"),(e?.lastName===""||e?.lastName===void 0||e?.lastName===null||!e.isNameValidationPassed)&&e.isRequiredName&&(t.lastName="validate.alert_surname"),(e?.phoneNumber===""||e?.phoneNumber===void 0||e?.phoneNumber?.startsWith("+"))&&(t.phoneNumber="validate.alert_phone"),e?.email!==""&&e?.email!==void 0&&(0,s.Ju)(e?.email)||(t.email="validate.alert_email"),t},n=e=>{let{field:t,isInputDisabled:a,shouldValidate:r,isValid:s=!0,isCheckoutForm:i=!1,isNameValidationPassed:n=!0,isRequiredName:o=!0}=e;return i?!n||!!o&&l(t):!a&&!!r&&(l(t)||!s)},l=e=>""===e||void 0===e,o=(e,t,a,s,n)=>{let o=i(e),c=t.appPaymentMethodId===r.hL.UNDEFINED?{paymentMethod:"validate.alert_payment_method"}:{};if(t.appPaymentMethodId===r.hL.ADYEN_CREDIT_CARD||t.appPaymentMethodId===r.hL.TAP_N_GO||t.appPaymentMethodId===r.hL.WEWA||t.appPaymentMethodId===r.hL.SG_TRUSTBANK||t.appPaymentMethodId===r.hL.MY_HSBC)return{...o,...a?{}:{creditCard:"validate.alert_credit_card"}};if(t.appPaymentMethodId===r.hL.ADYEN_SAVED_CARD)return{...o};if(t.appPaymentMethodId===r.hL.FPX){let e=l(n)?{bankName:"validate.alert_bank_name"}:{};return{...o,...e}}return t.appPaymentMethodId===r.hL.AIRWALLEX_CREDIT_CARD?{...o,...s?{}:{creditCard:"validate.alert_credit_card"}}:t.appPaymentMethodId===r.hL.AIRWALLEX_SAVED_CARD?{...o}:{...o,...c}},c=(e,t,a)=>{let r={};return""===t||void 0===t||t.length<=0?r.empty=e?"auth.enter_email":"auth.enter_phone_number":!e&&(t.length<=6||a?.length<=0||void 0===a)?r.phoneNumber="validate.alert_phone":e&&!(0,s.Ju)(t)&&(r.email="validate.alert_email"),r},d=e=>{let t={};return(""===e||void 0===e||e.length<6)&&(t.empty="validate.alert_password"),t}},92756:function(e,t,a){a.d(t,{D:function(){return r}});function r(e,t){let a=null;return function(){for(var r=arguments.length,s=Array(r),i=0;i<r;i++)s[i]=arguments[i];a&&clearTimeout(a),a=setTimeout(()=>e(...s),t)}}},56920:function(e,t,a){a.d(t,{E_:function(){return c},Ju:function(){return n},Pz:function(){return i},Xv:function(){return l},g9:function(){return o}});let r={email:"email",english:"english",numeric:"numeric",symbols:"symbols",checkNull:"checkNull",password:"password",space
1:"space"},s=(e,t)=>{switch(e){case r.email:return/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(t);case r.english:return/^[a-z A-Z]{1,}$/.test(t);case r.numeric:return/^\d+$/.test(t);case r.symbols:return/[-!$%^&*()_+|~=`{}\[\]:";'<>?,.\/]/.test(t);case r.password:return/^.{6,24}$/.test(t);case r.checkNull:return/^.{1,}$/.test(t);case r.space:return/\s+/g.test(t);default:return!1}},i=(e,t)=>s(r.english,t),n=e=>s(r.email,e),l=e=>s(r.numeric,e),o=e=>s(r.english,e),c=e=>s(r.space,e)}}]);
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.