1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7360],{77360:function(e,t,i){i.d(t,{dh:function(){return C},iB:function(){return O},lq:function(){return I},rc:function(){return T},v9:function(){return f}});var o=i(85893),r=i(67294),l=i(29525),a=i(66856),n=i(22318),c=i(282),d=i(52663),s=i(80343),u=i(67421),R=i(11476),E=i(8920),v=i(83651),h=i(95644),_=i(13742),p=i(11163),m=i(56819),k=i(13733);let T=(0,R.Z)("div")(e=>{let{theme:t}=e;return{display:"flex",alignItems:"center",columnGap:t.spacing(1.5),padding:t.spacing(3,3,2),color:"#0e0e14"}}),O=(0,R.Z)(l.Z)(e=>{let{theme:t}=e;return{padding:t.spacing(0,3),color:"#0e0e14"}}),I=(0,R.Z)(a.Z)(e=>{let{theme:t}=e;return{color:"#0e0e14",display:"flex",alignItems:"stretch",flexDirection:"column",gap:t.spacing(1.5),padding:t.spacing(3),"& > :not(:first-child)":{marginLeft:0}}}),C=(0,R.Z)("div")(e=>{let{theme:t}=e;return{display:"flex",flexDirection:"column",gap:t.spacing(3),padding:t.spacing(2.5),backgroundColor:"#FAFAFA",borderRadius:16}}),f=(0,R.Z)(n.Z)(e=>{let{theme:t}=e;return{fontSize:t.typography.pxToRem(16),lineHeight:1.5}}),x=(0,R.Z)("div")(e=>{let{theme:t}=e;return{fontSize:t.typography.pxToRem(12),lineHeight:1.22,color:"#696969"}});t.ZP=e=>{var t,i,l;let{open:a,errors:R,validationMode:y,handleClose:g}=e,{t:M}=(0,u.$G)(),{cart:S,setCartStore:A}=(0,v.x)(),L=(0,p.useRouter)(),D=(0,E.Z)(),N=!!k.K.getItem("isClyx"),b=(0,r.useCallback)(()=>{N?window.location.href="".concat(window.location.protocol,"//").concat(window.location.host,"/clyx/checkout/failed"):g()},[N]),handleLeaveCheckout=()=>{let e=N?"/clyx/checkout/failed":k.K.getItem("beforeCheckoutUrl")?k.K.getItem("beforeCheckoutUrl").replace("?proceedCheckout=1",""):"/";setTimeout(()=>{window.location.href=e||"/",k.K.removeItem("beforeCheckoutUrl"),k.K.removeItem("isClyx")},100)},U=null==S?void 0:S.filter(e=>{var t;return null==R?void 0:null===(t=R.availabilityErrors)||void 0===t?void 0:t.map(e=>e.ticketId).includes(e.ticketId)}).map(e=>{var t;return{...e,problemType:_.MY.AVAILABILITY,errorData:null==R?void 0:null===(t=R.availabilityErrors)||void 0===t?void 0:t.filter(t=>t.ticketId===e.ticketId).shift()}}),j=null==S?void 0:S.filter(e=>{var t;return null==R?void 0:null===(t=R.bannedErrors)||void 0===t?void 0:t.map(e=>e.ticketId).includes(e.ticketId)}).map(e=>{var t;return{...e,problemType:_.MY.BANNED,errorData:null==R?void 0:null===(t=R.bannedErrors)||void 0===t?void 0:t.filter(t=>t.ticketId===e.ticketId).shift()}}),P=null==S?void 0:S.filter(e=>{var t;return null==R?void 0:null===(t=R.requiredErrors)||void 0===t?void 0:t.map(e=>e.ticketId).includes(e.ticketId)}).map(e=>{var t;return{...e,problemType:_.MY.REQUIREMENTS,errorData:null==R?void 0:null===(t=R.requiredErrors)||void 0===t?void 0:t.filter(t=>t.ticketId===e.ticketId).shift()}}),Z=null==R?void 0:R.otherCodesErrors,F=(((null==U?void 0:U.map(e=>e.ticketId))||[]).concat(null===(t=j||[])||void 0===t?void 0:t.map(e=>e.ticketId))||[]).concat(null===(i=P||[])||void 0===i?void 0:i.map(e=>e.ticketId)),w=null==S?void 0:S.filter(e=>!F.includes(e.ticketId)),generateRequirementHint=(e,t)=>{switch(e){case h.Lb.ACCESS_COURSE:return M("checkout.validationModal.accessTypeCourse").replace(":name",t);case h.Lb.ACCESS_MEMBERSHIP:return M("checkout.validationModal.accessTypeMembership").replace(":name",t);case h.Lb.ACCESS_PROMOTER_GROUP:return M("checkout.validationModal.accessTypePromoterGroup").replace(":name",t);case h.Lb.ACCESS_PROMO_CODE:return M("checkout.validationModal.accessTypePromoCode").replace(":name",t);case h.Lb.ACCESS_STUDENT:return M("checkout.validationModal.accessTypeStudent").replace(":name",t);case h.Lb.ACCESS_WRISTBAND:return M("checkout.validationModal.accessTypeWristband").replace(":name",t);case h.Lb.ACCESS_REQUIREMENT:return M("checkout.validationModal.accessTypeRequirement").replace(":name",t);default:return""}},K=!!(U&&U.filter(e=>{var t;return(null===(t=e.errorData)||void 0===t?void 0:t.errorCode)!==_.yQ.ERROR_SOLD_OUT_RULE}).filter(e=>{var t;return(null===(t=e.errorData)||void 0===t?void 0:t.stillAvailable)===null}).length>0),B="validate"!==y,H=(null==U?void 0:U.find(e=>null!==e.errorData.stillAvailable))||w&&(null==w?void 0:w.length)>0,prepareNewCartWithoutError=e=>{let t=[...e].filter(e=>{var t;if((null==j?void 0:j.map(e=>e.ticketId).includes(e.ticketId))||(null==P?void 0:P.map(e=>e.ticketId).includes(e.ticketId)))return!1;let i=null==U?void 0:U.find(t=>t.ticketId===e.ticketId);return(null==i?void 0:null===(t=i.errorData)||void 0===t?void 0:t.stillAvailable)!==null}).map(e=>{var t,i;let o=null==U?void 0:U.find(t=>t.ticketId===e.ticketId);return(null==o?void 0:null===(t=o.errorData)||void 0===t?void 0:t.stillAvailable)?{...e,quantity:null==o?void 0:null===(i=o.errorData)||void 0===i?void 0:i.stillAvailable}:{...e}});return t};return(0,o.jsxs)(d.Z,{maxWidth:"xs",fullWidth:!0,open:a,onClose:b,
1id:"validation-modal",children:[(0,o.jsxs)(T,{children:[(0,o.jsx)(s.Z,{sx:{color:D.palette.success.main,width:24,height:24},children:(0,o.jsx)(m.go,{name:"camera",color:"inherit"})}),(0,o.jsx)(n.Z,{color:"inherit",variant:"h4",component:"div",children:M("checkout.validationModal.header")})]}),(0,o.jsx)(O,{children:(0,o.jsxs)(s.Z,{sx:{display:"flex",flexDirection:"column",gridRowGap:32},children:[U&&(null==U?void 0:U.length)>0&&(0,o.jsxs)(s.Z,{sx:{display:"flex",flexDirection:"column",gridRowGap:12},children:[(0,o.jsx)(f,{children:H?M("checkout.validationModal.availabiltyProblemHintSome"):M("checkout.validationModal.availabiltyProblemHintAll")}),R&&R.availabilityEventErrors&&(null==R?void 0:null===(l=R.availabilityEventErrors)||void 0===l?void 0:l.map((e,t)=>(0,o.jsx)(_.gE,{color:"error",children:(0,o.jsx)("b",{children:M("checkout.validationModal.eventAvailabilityError"+e.errorCode).replace(":param",e.param||"").replace(":ticketName",e.ticketName||"")})},t))),(0,o.jsx)(C,{children:null==U?void 0:U.map(e=>(0,o.jsx)(_.ZP,{ticket:e,variant:_.MY.AVAILABILITY},e.ticketId))}),K&&(0,o.jsx)(x,{children:M("checkout.validationModal.availabiltyProblemHint2")})]}),j&&(null==j?void 0:j.length)>0&&(0,o.jsxs)(s.Z,{sx:{display:"flex",flexDirection:"column",gridRowGap:12},children:[(0,o.jsx)(f,{children:M("checkout.validationModal.banProblemHint")}),(0,o.jsx)(C,{children:null==j?void 0:j.map(e=>(0,o.jsx)(_.ZP,{ticket:e,variant:_.MY.BANNED},e.ticketId))})]}),P&&(null==P?void 0:P.length)>0&&(0,o.jsx)(s.Z,{sx:{display:"flex",flexDirection:"column",gridRowGap:12},children:h.lt.map(e=>(0,o.jsx)(o.Fragment,{children:null==P?void 0:P.filter(t=>{var i;return(null===(i=t.errorData)||void 0===i?void 0:i.accessType)===e}).map(t=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(f,{children:generateRequirementHint(e,t.errorData.name)}),(0,o.jsx)(C,{children:(0,o.jsx)(_.ZP,{ticket:t,variant:_.MY.REQUIREMENTS},t.ticketId)})]}))}))}),(!Z||Z&&0===Object.keys(Z).length)&&w&&(null==w?void 0:w.length)>0&&(0,o.jsxs)(s.Z,{sx:{display:"flex",flexDirection:"column",gridRowGap:12},children:[(0,o.jsx)(f,{children:M("checkout.validationModal.unaffectedHint")}),(0,o.jsx)(C,{children:null==w?void 0:w.map(e=>(0,o.jsx)(_.ZP,{ticket:e,variant:_.MY.VALID},e.ticketId))})]}),Z&&Object.keys(Z).length>0&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s.Z,{children:(0,o.jsx)(n.Z,{children:M("checkout.validationModal.otherErrors")})}),Object.keys(Z).map(e=>(0,o.jsx)(s.Z,{marginBottom:0,children:M("checkout.validationModal.otherErrors"+e)},e))]})]})}),(0,o.jsx)(I,{children:w&&((null==w?void 0:w.length)>0||(null==w?void 0:w.length)===0&&(null==U?void 0:U.find(e=>null!==e.errorData.stillAvailable)))?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(c.Z,{className:"validation-action-btn",variant:"contained",color:"primary",onClick:()=>{if(S){let e=prepareNewCartWithoutError(S);e.length>0&&(setTimeout(()=>{A(e)},200),L.push("/checkout/loading")),g()}},onKeyDown:e=>{if(("Enter"===e.key||" "===e.key)&&(e.preventDefault(),S)){let e=prepareNewCartWithoutError(S);e.length>0&&(setTimeout(()=>{A(e)},200),L.push("/checkout/loading")),g()}},children:B?M("checkout.validationModal.acceptContinue"):M("checkout.validationModal.proceedToCheckout")}),(0,o.jsx)(c.Z,{variant:"outlined",color:"primary",className:"validation-action-btn",onClick:B?()=>handleLeaveCheckout():()=>b(),onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),B?handleLeaveCheckout():b())},children:B?M("checkout.validationModal.cancelLeaveCheckout"):M("checkout.validationModal.continueShopping")})]}):P&&P.length>0&&P.find(e=>"promoCode"===e.errorData.accessType)?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(c.Z,{variant:"contained",color:"primary",onClick:()=>b(),onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),b())},className:"validation-action-btn",children:M("checkout.validationModal.continueCheckout")}),(0,o.jsx)(c.Z,{variant:"contained",color:"primary",className:"validation-action-btn",onClick:B?()=>handleLeaveCheckout():()=>b(),onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),B?handleLeaveCheckout():b())},children:B?M("checkout.validationModal.cancelLeaveCheckout"):M("checkout.validationModal.closeModal")})]}):(0,o.jsx)(c.Z,{variant:"contained",color:"primary",onClick:B?()=>handleLeaveCheckout():()=>b(),onKeyDown:e=>
1{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),B?handleLeaveCheckout():b())},className:"validation-action-btn",children:B?M("checkout.validationModal.cancelLeaveCheckout"):M("checkout.validationModal.closeModal")})})]})}},13742:function(e,t,i){i.d(t,{MY:function(){return l},gE:function(){return p},yQ:function(){return a}});var o,r,l,a,n=i(85893);i(67294);var c=i(22318),d=i(80343),s=i(11476),u=i(36609),R=i(83651);let E=(0,s.Z)(c.Z)(e=>{let{theme:t}=e;return{color:"inherit",fontSize:t.typography.pxToRem(18),lineHeight:1.5}}),v=(0,s.Z)("span")(e=>{let{theme:t}=e;return{color:"inherit",fontFamily:t.typography.fontFamily,fontSize:t.typography.pxToRem(16),fontWeight:700,lineHeight:1.5}}),h=(0,s.Z)("span")(e=>{let{theme:t}=e;return{color:"inherit",fontFamily:t.typography.fontFamily,fontSize:t.typography.pxToRem(12),fontWeight:400,lineHeight:1.5}}),_=(0,s.Z)("span")(e=>{let{theme:t,color:i}=e;return{fontFamily:t.typography.fontFamily,fontSize:t.typography.pxToRem(16),fontStyle:"success"===i||"error"===i?"normal":"italic",fontWeight:700,lineHeight:1.2,color:"success"===i?t.palette.success.main:"error"===i?t.palette.error.main:"inherit"}}),p=(0,s.Z)("span")(e=>{let{theme:t,color:i="default"}=e;return{fontFamily:t.typography.fontFamily,fontSize:t.typography.pxToRem(10),fontWeight:400,lineHeight:1.2,textTransform:"uppercase",color:"error"===i?t.palette.error.main:"#c3bfbf"}});(o=l||(l={})).VALID="valid",o.AVAILABILITY="availability",o.BANNED="banned",o.REQUIREMENTS="required",o.OTHER="other",o.SSO="sso",(r=a||(a={})).ERROR_PROMO_CODE_CANNOT_BE_EMPTY="061",r.ERROR_PROMO_CODE_NOT_EXISTS="062",r.ERROR_PROMO_CODE_IS_NOT_ACTIVE="063",r.ERROR_PROMO_CODE_HAS_ALREADY_BEEN_USED="064",r.ERROR_PROMO_CODE_DOES_NOT_BELONG_TO_USER="065",r.ERROR_PROMO_CODE_IS_NOT_ASSOCIATED_WITH_TICKETS="066",r.ERROR_PROMO_CODE_LLOYDS_ONLY_IN_POUNDS="067",r.ERROR_TICKET_REQUIRE_PROMO_CODE="068",r.ERROR_PAYMENT_PLAN_SINGLE_ITEM="071",r.ERROR_PAYMENT_PLAN_CANNOT_HAVE_MULTIPLE_PLANS="072",r.ERROR_PAYMENT_PLAN_NOT_SUPPORTED="073",r.ERROR_BANNER_USER_RULE="012",r.ERROR_BANNED_USER_EXTERNAL_API_RULE="014",r.ERROR_TICKET_NOT_EXISTS="021",r.ERROR_CURRENCY_CODE_RULE="022",r.ERROR_TICKET_TYPE_DIGITAL_EVENT_RULE="023",r.ERROR_TICKET_TYPE_WRISTBAND_RULE="024",r.ERROR_TICKET_TYPE_MEMBERSHIP_RULE="025",r.ERROR_TICKET_PRICE_RULE="026",r.ERROR_BOOKING_FEE_RULE="027",r.ERROR_SOLD_OUT_RULE="028",r.ERROR_TICKET_MIN_PER_ORDER_RULE="029",r.ERROR_MAX_EVENT_CAPACITY_RULE="030",r.ERROR_MAX_TICKET_PER_EVENT_RULE="031",r.ERROR_TICKET_DATE_RULE="032",r.ERROR_TICKET_LIMIT_PER_ORDER_RULE="033",r.ERROR_PARENT_TICKET_RULE="034",r.ERROR_ONE_GOLDEN_TICKET_RULE="035",r.ERROR_REF_CODE_RULE="036",r.ERROR_REMAINING_QUANTITY_RULE="037",r.ERROR_TICKET_LOCK_RULE="038",r.ERROR_LIMITED_USER_NOT_AVAILABLE_RULE="039",r.ERROR_LIMITED_USER_RULE="040",r.ERROR_REQUIRE_PROMO_CODE="051",r.ERROR_REQUIRE_MEMBERSHIP_RULE="052",r.ERROR_REQUIRE_WRISTBAND_RULE="053",r.ERROR_REQUIRE_PROMOTER_GROUP_IMPORTED_RULE="054",r.ERROR_REQUIRE_COURSE_RULE="055",r.ERROR_REQUIRE_STUDENT_INTERNAL_RULE="056",r.ERROR_REQUIRE_STUDENT_EXTERNAL_RULE="057",t.ZP=e=>{let{ticket:t,variant:i}=e,{cart:o}=(0,R.x)();return(0,n.jsxs)(d.Z,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",gridColumnGap:24},children:[(0,n.jsxs)(d.Z,{children:[(0,n.jsxs)(E,{variant:"h4",component:"div",children:[t.name," x",t.quantity]}),(0,n.jsx)(d.Z,{children:0===t.price?(0,n.jsx)(v,{children:(0,u.t)("generic.labels.free")}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(v,{children:[t.currency.format,parseFloat("".concat(t.price*t.quantity)).toFixed(2)]}),(0,n.jsxs)(h,{children:[" ","+ ",t.currency.format,(t.bookingFee*t.quantity).toFixed(2)," bf"]})]})})]}),(0,n.jsx)(d.Z,{className:"validation-status",sx:{display:"flex",flexDirection:"column",textAlign:"right"},children:"availability"===i?((e,i)=>{var r,l;if((null==i?void 0:i.errorCode)==="028")return(0,n.jsx)(_,{color:"error",children:(0,u.t)("checkout.validationModal.soldOut")});if((null==i?void 0:i.stillAvailable)!==null){let r=null==o?void 0:o.find(t=>t.ticketId===e);if(r)return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(_,{children:[parseInt("".concat(r.quantity))-parseInt("".concat(i.stillAvailable))," ",(0,u.t)("checkout.validationModal.removed")]}),(0,n.jsx)(_,{color:"success",children:(0,u.t)("checkout.validationModal.remainingQuantity").replace(":removed","".concat(parseInt(i.stillAvailable)))}),(0,n.jsxs)(p,{className:"validation-error-code",children:[(0,u.t)("checkout.validationModal.error")," ",null===(l=t.errorData)||void 0===l?void 0:l.errorCode]})]})}return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(_,{color:"error",children:(0,u.t)("checkout.validationModal.notAvailable")})," ",(0,n.jsxs)(p,{children:[(0,u.t)("checkout.validationModal.error")," ",null===(r=t.errorData)||void 0===r?void 0:r.errorCode]})]})})(t.ticketId,null==t?void 0:t.errorData):"sso"===i?(0,n.jsx)(_,{color:"error",children:(0,u.t)("checkout.validationModal.restricted")}):"banned"===i?(0,n.jsx)(_,{color:"error",children:(0,u.t)("checkout.validationModal.notAllowed")}):"required"===i?(0,n.jsx)(_,{color:"error",children:(0,u.t)("checkout.validationModal.restricted")}):(0,n.jsx)(_,{color:"success",children:(0,u.t)("checkout.validationModal.available")})})]})}},95644:function(e,t,i){i.d(t,{Gl:function(){return convertTicketToRequestItem},Lb:function(){return r},bC:function(){return useValidateBasketMutation},lt:function(){return n}});var o,r,l=i(3725),a=i(98029);(o=r||(r={})).ACCESS_PROMO_CODE="promoCode",o.ACCESS_MEMBERSHIP="membership",o.ACCESS_WRISTBAND="wristband",o.ACCESS_PROMOTER_GROUP="promoterGroup",o.ACCESS_COURSE="course",o.ACCESS_STUDENT="student",o.ACCESS_REQUIREMENT="requirement";let n=["course","membership","wristband","promoterGroup","promoCode","student","requirement"],
1convertTicketToRequestItem=e=>({ticketId:e.ticketId,quantity:e.quantity,price:e.price.toFixed(2),bookingFee:e.bookingFee.toFixed(2),bookingFeeType:"".concat(e.bookingFeeType),currency:e.currency.code,refCode:e.refCode||"",upsell:e.upsell||!1}),apiValidate=async(e,t,i)=>await l.Z.post("api/user/basket/validate/?mode=".concat(t).concat(i?"&lockHash="+i:""),{...e,mode:void 0,lockHash:void 0}).then(e=>e.data),useValidateBasketMutation=(e,t)=>(0,a.D)({mutationFn:e=>apiValidate(e,e.mode,e.lockHash),onSuccess:t=>{e&&e(t)},onError:e=>{var i,o;t&&e.status&&![409,429].includes(e.status)&&(null==e?void 0:null===(i=e.response)||void 0===i?void 0:i.data)&&t(null==e?void 0:null===(o=e.response)||void 0===o?void 0:o.data)}})}}]);
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.