1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5402,6395],{11488:(e,t,n)=>{"use strict";n.d(t,{f:()=>x});var i=n(14232),r=n(56557),l=n.n(r),o=n(13566),a=n.n(o),s=n(60565),c=n.n(s),d=n(14874),u=n(84059),p=n(15498);function x(){let[e,t]=(0,i.useState)(!1),[n,r]=(0,i.useState)(""),[o,a]=(0,i.useState)(""),[s,c]=(0,i.useState)(!0),[x,m]=(0,i.useState)(null),h=(0,i.useCallback)((e,t)=>{try{if(!e||!t)return!1;let n=l()(),i=l()(e),r=l()(t);if(!i.isValid()||!r.isValid())return(0,u.ll)("Invalid date format in banner config"),!1;return n.isSameOrAfter(i)&&n.isSameOrBefore(r)}catch(e){return(0,u.ll)("Error checking date range: ".concat(null==e?void 0:e.message)),!1}},[]),_=(0,i.useCallback)(async()=>{try{if(c(!0),m(null),!await (0,d.ho)())throw Error("Remote Config initialization timeout - not initialized after 2 seconds");await (0,d.dL)();let e=(0,d.HT)(p.L.FLOATING_BANNER_DATA,null);if(!e||!1===e.enabled){t(!1),c(!1);return}if(void 0!==e.enabled&&!0!==e.enabled||"string"!=typeof e.title||!e.title.trim()||"string"!=typeof e.description||!e.description.trim()||"string"!=typeof e.valid_from||!e.valid_from.trim()||"string"!=typeof e.valid_until||!e.valid_until.trim()){(0,u.ll)("Missing required fields in banner config"),t(!1),c(!1);return}r(e.title),a(e.description);let n=h(e.valid_from,e.valid_until);return t(n),c(!1),e}catch(n){let e="Error fetching maintenance banner: ".concat(null==n?void 0:n.message);return(0,u.ll)(e),m(Error(e)),t(!1),c(!1),null}},[h]);return(0,i.useEffect)(()=>{(async()=>{await _()})()},[]),{maintenanceBanner:{show:e,title:n,message:o,loading:s,error:x}}}l().extend(a()),l().extend(c())},13009:(e,t,n)=>{"use strict";n.d(t,{A:()=>_,x:()=>h});var i=n(37876),r=n(14232),l=n(30566),o=n(11772),a=n(28151),s=n(63593),c=n(20430),d=n(34797),u=n(83705),p=n(61626),x=n(82451),m=n(34846);function h(e){var t;let n=(0,l.A)();return(0,i.jsx)(u.A,{sx:{backgroundColor:n.palette.background.tertiery,borderRadius:"6px",padding:"12px",cursor:"pointer"},onClick:()=>{window.open(e.link)},"data-testid":"b-event-ticket-".concat(e.itemId),id:"".concat(e.itemId)||null,children:(0,i.jsxs)(p.A,{direction:"row",spacing:1,children:[(0,i.jsx)(u.A,{children:(0,i.jsx)(o.A,{sx:{color:n.colors.lighterPrimary}})}),(0,i.jsxs)(p.A,{flexGrow:1,children:[(0,i.jsx)(u.A,{children:(0,i.jsx)(x.A,{sx:{color:n.palette.text.primary,fontWeight:"bold",fontSize:"14px"},id:"".concat(e.itemId,"-booking-code"),children:(null==(t=e.bookingCode)?void 0:t.toUpperCase())||""})}),(0,i.jsxs)(p.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,i.jsxs)(x.A,{sx:{fontSize:"12px",color:n.palette.text.secondary,wordBreak:"break-word"},"data-testid":"".concat(e.itemId,"-name"),id:"".concat(e.itemId,"-name"),children:[e.name||""," "]}),(0,i.jsx)(s.A,{sx:{color:n.palette.text.primary,fontSize:"4px"}}),(0,i.jsx)(x.A,{sx:{fontSize:"12px",color:n.palette.text.secondary},"data-testid":"".concat(e.itemId,"-purchase-date"),id:"".concat(e.itemId,"-purchase-date"),children:(0,d.Ay)({date:e.purchasedDate,format:"DD MMMM YYYY, HH:mm"})})]})]}),(0,i.jsx)(p.A,{justifyContent:"center",children:(0,i.jsx)(a.A,{})})]})})}function _(e){let{tickets:t,showDrawer:n,onClose:l,...o}=e,{t:a}=(0,m.Bd)();return t?(0,i.jsx)(c.A,{title:a("eventDetailsSeeTicketButton"),showDrawer:n,hideButtonRequest:!0,onCloseAction:l,closeButtonId:"b-event-close-multiple-ticket-drawer",drawerWrapperId:"c-event-drawer-multiple-event",content:(0,i.jsx)(p.A,{spacing:1,sx:{marginLeft:"-16px",marginRight:"-16px",marginBottom:2},children:t.map((e,t)=>(0,r.createElement)(h,{...e,itemId:"c-event-multiple-ticket-".concat(t+1),key:t}))}),...o}):null}},19360:(e,t,n)=>{"use strict";n.r(t),n.d(t,{__N_SSP:()=>lF,default:()=>lL});var i,r,l,o,a,s,c,d,u,p,x,m,h,_,v,g,y=n(37876),f=n(14232),b=n(56557),A=n.n(b),k=n(7957),j=n(58865),w=n(21826),C=n(21544),S=n(13009),I=n(88803),E=n(30566),T=n(34846),D=n(37644),B=n(82451),F=n(83705),L=n(62790),O=n(33435),R=n(13635);let M=[{icon:"".concat(O.A.assetBaseUrl,"/webp/icon/ic_venue.webp"),desc:"eventDetailsAboutFirstLine"},{icon:"".concat(O.A.assetBaseUrl,"/webp/icon/ic_event_payment.webp"),desc:"eventDetailsAboutSecondLine"},{icon:"".concat(O.A.assetBaseUrl,"/webp/icon/ic_event_ticket.webp"),desc:"eventDetailsAboutThirdLine"}],P=[{icon:"".concat(O.A.assetBaseUrl,"/webp/icon/ic_venue.webp"),desc:"key_attraction_footer_1"},{icon:"".concat(O.A.assetBaseUrl,"/webp/icon/ic_event_payment.webp"),desc:"key_attraction_footer_2"},{icon:"".concat(O.A.assetBaseUrl,"/webp/icon/ic_event_ticket.webp"),desc:"key_attraction_footer_3"}];function N(e){let{isAttraction:t}=e,n=(0,E.A)(),{t:i}=(0,T.Bd)();return(0,y.jsx)(F.A,{sx:{backgroundColor:n.palette.background.primary,marginBottom:(0,R.bN)()&&"64px"},children:(0,y.jsxs)(F.A,{maxWidth:1152,marginLeft:"auto",marginRight:"auto",width:"100%",padding:{xs:"32px 16px",sm:"32px 48px",md:"32px 24px",lg:"32px 24px"},children:[(0,y.jsx)(B.A,{component:"h2",sx:{...n.typography.h4,color:n.palette.text.primary,marginBottom:"24px",[n.breakpoints.up("lg")]:{...n.typography.h4Desk}},children:t?i("key_attraction_footer_title"):i("eventDetailsAboutTitle")}),(0,y.jsx)(D.A,{container:!0,display:"flex",spacing:4,children:(t?P:M).map((e,t)=>(0,y.jsxs)(D.A,{item:!0,sm:4,display:"flex",alignItems:"center",children:[(0,y.jsx)(L.A,{sx:{marginRight:"18px",[n.breakpoints.up("lg")]:{marginRight:"16px"},[n.breakpoints.up("md")]:{width:"48px",height:"64px"},width:"36px",height:"48px"},src:e.icon}),(0,y.jsx)(B.A,{sx:{...n.typography.normalRegular,color:n.palette.text.primary},children:i(e.desc)})]},t))})]})})}var V=n(2673),z=n(34071),q=n(48504),U=n(86084),W=n(63261),H=n(24944),G=n(62828);function Y(e){let{data:t}=e,[n,i]=(0,f.useState)(!1),r=(0,E.A)(),l=(0,V.A)(r.breakpoints.up("sm")),{t:o}=(0,T.Bd)();return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(F.A,{mt:"4px",children:(0,y.jsxs)(G.A,{id:"b-product-event-tnc",onClick:()=>i(!0),sx:{borderRadius:"18px",paddingX:"16px"}
1,buttonVariant:"outlined",children:[(0,y.jsx)(U.A,{sx:{mr:"8px"}}),o("eventDetailTncTitle")]})}),l?(0,y.jsx)(z.Ay,{open:n,onClose:()=>i(!1),closeButtonIcon:(0,y.jsx)(q.A,{sx:{color:r.palette.tiptip[500]}}),renderTitle:!0,title:"Syarat dan Ketentuan",children:(0,y.jsx)(F.A,{sx:{color:"".concat(r.palette.text.primary,"!important"),maxHeight:"50vh"},children:t&&(0,W.Ay)(t)})}):(0,y.jsx)(H.A,{open:n,onClose:()=>i(!1),title:"Syarat dan Ketentuan",sx:{".MuiDrawer-paper":{overflow:"hidden !important",maxHeight:"75vh"},"div:first-child":{"& ::-webkit-scrollbar":{display:"none"}}},children:(0,y.jsx)(F.A,{sx:{color:"".concat(r.palette.text.primary,"!important"),overflow:"auto",maxHeight:"65vh"},children:t&&(0,W.Ay)(t)})})]})}var K=n(54773),Q=n(47468),X=n(3103);let Z=(0,K.Ay)(F.A)({padding:"16%",textAlign:"center",color:"white",justifyContent:"center",flexDirection:"column",alignItems:"center",display:"flex"}),$=(0,K.Ay)(X.A)({borderRadius:"18px",marginTop:12}),J=function(){let{t:e}=(0,T.Bd)();return(0,y.jsx)(C.A,{children:(0,y.jsxs)(Z,{children:[(0,y.jsx)(L.A,{src:"".concat(O.A.assetBaseUrl,"/webp/state_calendar.webp")}),(0,y.jsx)(B.A,{fontSize:"20px",fontWeight:"700",mt:"8px",children:e("eventUnpublishedTitle")}),(0,y.jsx)(B.A,{color:"text.secondary",fontSize:"14px",fontWeight:"400",my:"8px",maxWidth:"300px",children:e("eventUnpublishedDescription")}),(0,y.jsx)($,{id:"b-event-search-other-event",variant:"contained",onClick:()=>(0,Q.A)("/"),children:e("eventUnpublishedButtonLabel")})]})})};var ee=n(52355),et=n(63037),en=n(46946),ei=n(18573),er=n(96390),el=n(94760),eo=n(50554),ea=n(58862),es=n(61626),ec=n(34797),ed=n(71199),eu=n(56560),ep=n(29468);let ex=(0,K.Ay)(B.A)(e=>{let{theme:t}=e;return{...t.typography.smallRegular,color:t.palette.text.secondary,display:"flex",alignItems:"center",padding:"2px 0",columnGap:"4px",svg:{fontSize:"16px"}}}),em=(0,K.Ay)(el.A)(e=>{let{theme:t}=e;return{color:t.palette.text.primary,fontSize:"14px",overflow:"hidden",textOverflow:"ellipsis",textDecoration:"none",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",":hover":{cursor:"pointer",textDecoration:"none"}}}),eh=(0,K.Ay)(B.A)(e=>{let{theme:t}=e;return{color:t.palette.text.primary,fontSize:"14px",overflow:"hidden",textOverflow:"ellipsis",textDecoration:"none",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical"}}),e_=(0,K.Ay)(F.A)(e=>{let{theme:t}=e;return{background:t.palette.background.tertiery,padding:"8px",borderRadius:"8px",height:"100%",[t.breakpoints.up("sm")]:{padding:"8px 16px"},whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",display:"flex",flexDirection:"column",gap:"2px"}}),ev=(0,K.Ay)(B.A)(e=>{let{theme:t}=e;return{...t.typography.mediumBold,color:t.palette.text.primary,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}});function eg(e){let{label:t,value:n,...i}=e;return(0,y.jsx)(D.A,{item:!0,md:4,xs:6,...i,children:(0,y.jsxs)(e_,{children:[t,n]})})}function ey(e){let{eventLocationCity:t,eventLocationVenue:n,eventLocationAddress:i,eventStartDate:r,eventEndDate:l,eventTypeName:o,eventMapURL:a,eventTimezone:s,isEnabledClick:c,isAttraction:d,hideDateTime:u=!1}=e,p=(0,ec.xb)(r,l,s),[x,m]=(0,f.useState)(!1),h=()=>m(!1),{t:_}=(0,T.Bd)();return(0,y.jsx)(D.A,{container:!0,children:(0,y.jsxs)(D.A,{item:!0,width:"100%",children:[(0,y.jsxs)(D.A,{container:!0,sx:{mb:2*!d},children:[(0,y.jsx)(D.A,{item:!0,md:3,xs:12,mb:{xs:2,md:0},children:(0,y.jsxs)(es.A,{direction:"row",spacing:1,sx:e=>({color:e.palette.primary.main}),children:[(0,y.jsx)(eu.A,{}),(0,y.jsx)(eh,{id:"c-event-location-city",children:t})]})}),(0,y.jsx)(D.A,{item:!0,md:9,xs:12,children:(0,y.jsxs)(es.A,{direction:"row",spacing:1,sx:e=>({color:e.palette.primary.main}),children:[(0,y.jsx)(ed.A,{}),a?(0,y.jsx)(eo.A,{title:"Lihat lokasi di map",placement:"top",children:(0,y.jsx)(em,{id:"c-event-location-address",href:c&&a,target:"_blank",children:"".concat(n,". ").concat(i)})}):(0,y.jsx)(eh,{id:"c-event-location-address",children:"".concat(n,". ").concat(i)})]})})]}
1),!d&&(0,y.jsxs)(D.A,{"data-testid":"c-event-info-date-container",container:!0,spacing:{xs:1},children:[!u&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(eg,{label:(0,y.jsx)(ex,{children:_("dateLabel")}),xs:12,value:(0,y.jsxs)(ev,{id:"c-event-date",children:[(0,ec.Ay)({date:r,format:"DD MMM YYYY",timezone:s}),p&&" - ".concat((0,ec.Ay)({date:l,format:"DD MMM YYYY",timezone:s}))]})}),(0,y.jsx)(eg,{label:(0,y.jsxs)(ex,{children:[_("time"),(0,y.jsx)(ea.x,{onClickAway:h,children:(0,y.jsx)(eo.A,{PopperProps:{disablePortal:!0},onClose:h,open:x,disableFocusListener:!0,disableHoverListener:!0,disableTouchListener:!0,title:null==s?void 0:s.short_offset,placement:"top",sx:{cursor:"pointer"},children:(0,y.jsx)(ep.A,{id:"b-event-tooltip-info-timezone",onClick:()=>m(!0)})})})]}),value:(0,y.jsx)(ev,{id:"c-event-time",children:"".concat((0,ec.Ay)({date:r,format:"HH:mm",timezone:s})," - ").concat((0,ec.Ay)({date:l,format:"HH:mm",timezone:s})," ").concat(null==s?void 0:s.abbreviation)})})]}),(0,y.jsx)(eg,{label:(0,y.jsx)(ex,{children:_("eventDetailsInfoType")}),value:(0,y.jsx)(ev,{id:"c-event-type",children:o})})]})]})})}var ef=n(12601),eb=n(3657),eA=n(20642),ek=n(86090),ej=n.n(ek);A().extend(ej());let ew=n(66315);function eC(e){let{saleEndTime:t,saleStartTime:n=null,isTicketOption:i}=e;A().extend(ew);let{t:r}=(0,T.Bd)(),[l,o]=(0,f.useState)(void 0),[a,s]=(0,f.useState)(!1),c=(0,E.A)(),d=(0,V.A)(c.breakpoints.up("sm")),u=()=>{let e,i=new Date;n&&n>i?(e=n,s(!0)):(e=t,s(!1));let r=A()(e),l=r.diff(i.toString(),"day");if(l>0&&o(l),0===l){let e=r.unix()-A()().unix(),t=A().duration(1e3*e,"milliseconds");o("".concat(10>t.hours()?"0".concat(t.hours()):t.hours(),":").concat(10>t.minutes()?"0".concat(t.minutes()):t.minutes(),":").concat(10>t.seconds()?"0".concat(t.seconds()):t.seconds()))}};return((0,f.useEffect)(()=>{u();let e=setInterval(()=>{u()},1e3);return()=>clearInterval(e)},[]),!l||!t||new Date(t)<=new Date)?i?(0,y.jsxs)(es.A,{direction:"row",alignItems:"center",spacing:.5,children:[(0,y.jsx)(eA.A,{fontSize:"small",sx:{color:"#919EAB"}}),(0,y.jsx)(B.A,{sx:{...c.typography.smallRegular,color:c.palette.text.secondary},children:"Penjualan telah berakhir, silakan pilih tiket lainnya."})]}):null:(0,y.jsxs)(es.A,{direction:"row",alignItems:"center",spacing:.5,sx:!i&&{justifyContent:d?"left":"center"},children:[a&&(0,y.jsx)(eb.A,{color:"success",fontSize:"small"}),i&&(0,y.jsx)(eA.A,{fontSize:"small",sx:{color:"#919EAB"}}),(0,y.jsx)(B.A,{sx:{...c.typography.smallRegular,color:c.palette.text.secondary},children:function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2?arguments[2]:void 0;if(t)if("string"==typeof e)return"".concat(n("eventDetailsSaleStartText")," ").concat(e);else return"".concat(n("eventDetailsSaleStartText")," ").concat(e," ").concat(n("day"));return"number"==typeof e&&e>30?"".concat(n("eventTicketAvailable")):"string"==typeof e?"".concat(n("eventTicketSaleEndedAt")," ").concat(e):"".concat(n("eventTicketSaleEndedAt")," ").concat(e," ").concat(n("day"))}(l,a,r)})]})}var eS=n(14493),eI=n(99306);let eE=(0,K.Ay)(B.A)(e=>{let{theme:t}=e;return{...t.typography.smallRegular,color:t.palette.text.secondary}}),eT=(0,K.Ay)(B.A)(e=>{let{theme:t,disabled:n}=e;return{...t.typography.h4,[t.breakpoints.up("sm")]:{...t.typography.h4Desk},color:n?t.palette.text.tertiery:t.palette.text.primary}}),eD=(0,K.Ay)(B.A)(e=>{let{theme:t}=e;return{...t.typography.mediumBold,textAlign:"left",color:t.palette.text.tertiery,textDecoration:"line-through"}}),eB=e=>{let{priceId:t="c-event-price-label",salePriceId:n="c-event-sale-price-label",showTitle:i=!0,hideCurrency:r=!0,salePrice:l,price:o,disabled:a=!1,isMultipleTicketOptions:s=!1,isSeatSelection:c=!1,minPurchasableQuota:d=1}=e,{t:u}=(0,T.Bd)(),p=(0,E.A)();return(0,y.jsxs)(es.A,{children:[i&&(0,y.jsxs)(eE,{sx:{marginBottom:"2px"},children:[u("eventDetailsTicketPriceLabel")," ",s&&!r&&u("start")]}),(0,y.jsxs)(es.A,{direction:"row",spacing:1,alignItems:"center",children:[(0,y.jsx)(eT,{id:t,disabled:a,children:0===l&&r?u("digitalContentListItemFreeLabel"):(0,eI.A)(l)}),o>l&&(0,y.jsx)(eD,{id:n,children:(0,eI.A)(o)})]}),!s&&!c&&d>1&&(0,y.jsxs)(es.A,{direction:"row",alignItems:"center",spacing:{xs:.5,md:1},marginTop:{xs:.5,md:1},children:[(0,y.jsx)(ep.A,{sx:{color:p.palette.info.main,fontSize:"16px"}}),(0,y.jsx)(B.A,{color:p.palette.text.primary,variant:"smallRegular",children:u("key_minimum_ticket_purchase_info",{qty:d})})]})]})};var eF=n(11772);let eL=e=>{let{eventStatus:t,sx:n}=e,{t:i}=(0,T.Bd)(),r=(0,E.A)(),l=(0,V.A)(r.breakpoints.up("sm")),o=e=>{let{children:t}=e;return(0,y.jsx)(es.A,{direction:"row",spacing:.5,alignItems:"center",justifyContent:l?"left"
1:"center",children:t})};return"fully_booked"===t?(0,y.jsx)(F.A,{sx:{...n},children:(0,y.jsxs)(o,{children:[(0,y.jsx)(eb.A,{sx:{color:r.palette.info.main}}),(0,y.jsx)(B.A,{color:r.palette.text.secondary,fontSize:"12px",children:i("eventTicketFullyBookedMessage")})]})}):"run_out_soon"===t?(0,y.jsx)(F.A,{sx:{...n},children:(0,y.jsxs)(o,{children:[(0,y.jsx)(eF.A,{sx:{color:r.palette.success.main,fontSize:"18px"}}),(0,y.jsx)(B.A,{color:r.palette.text.secondary,fontSize:l?"14px":"12px",children:i("eventTicketRunOutSoon")})]})}):null};var eO=n(70946),eR=n(95339),eM=n(536);let eP=e=>{let{showTitle:t=!0,numTicketsSelected:n,maxPurchaseableQuota:i,disableBuyButton:r,setNumTicketsSelected:l,eventStatus:o,isSeatSelection:a,isCreator:s,minPurchasableQuota:c=1,setIsCounterShown:d=e=>{}}=e,{t:u}=(0,T.Bd)(),p=(0,E.A)(),x=(0,V.A)(p.breakpoints.up("sm")),m=n===c||r,h=n===i||r;return("available"!==o||a)&&("run_out_soon"!==o||a)&&("coming_soon"!==o||a||!s)?null:(0,y.jsx)(es.A,{direction:"row",alignItems:"center",spacing:1,children:(0,y.jsxs)(es.A,{direction:"row",alignItems:"center",spacing:x?2:1,children:[t&&(0,y.jsx)(B.A,{sx:e=>({...e.typography.smallRegular,color:e.palette.text.secondary}),children:u("key_number_of_tickets")}),(0,y.jsxs)(es.A,{direction:"row",alignItems:"center",spacing:.5,children:[(0,y.jsx)(eO.A,{id:"b-event-ticket-quantity-decrease",disabled:x?m:r,size:"small",sx:e=>({width:"32px",height:"32px",borderRadius:"8px",border:"1px solid ".concat(e.palette.tiptip[500]),[e.breakpoints.up("sm")]:{border:"1px solid ".concat(m?e.palette.text.tertiery:e.palette.tiptip[500])}}),onClick:()=>{n!==c||x?l(n-1):d(!1)},children:(0,y.jsx)(eM.A,{fontSize:"small",sx:e=>({color:m?e.palette.text.tertiery:e.palette.text.primary})})}),(0,y.jsx)(F.A,{sx:e=>({...e.typography.mediumRegular,width:x?"40px":"32px",color:e.palette.text.primary,textAlign:"center"}),id:"c-event-multiple-ticket-qty",children:n}),(0,y.jsx)(eO.A,{id:"b-event-ticket-quantity-increase",size:"small",disabled:h,sx:e=>({width:"32px",height:"32px",borderRadius:"8px",background:e.palette.background.secondary,color:"white",border:"1px solid ".concat(h?e.palette.text.tertiery:e.palette.tiptip[500])}),onClick:()=>l(n+1),children:(0,y.jsx)(eR.A,{fontSize:"small",sx:e=>({color:e.palette.text.primary})})})]})]})})},eN=e=>{let{numTicketsSelected:t,maxPurchaseableQuota:n,multiStepPurchase:i}=e,{t:r}=(0,T.Bd)(),l=(0,E.A)(),o=(0,V.A)(l.breakpoints.up("sm"));return t!==n||i?null:(0,y.jsxs)(es.A,{direction:"row",spacing:.5,alignItems:"center",justifyContent:"center",mt:!o&&"8px",mr:o&&"32px",children:[(0,y.jsx)(ep.A,{sx:e=>({color:e.palette.info.main,fontSize:"16px",mt:"-2px"})}),(0,y.jsx)(B.A,{sx:e=>({...e.typography.smallRegular,color:e.palette.text.secondary}),children:r("eventTicketSelectionLimitedQuota",{quota:n})})]})};var eV=n(14628),ez=n(63593),eq=n(28151),eU=n(22032);let eW=e=>{let{isBought:t,onViewTicket:n}=e,{t:i}=(0,T.Bd)(),r=(0,E.A)(),l=(0,V.A)(r.breakpoints.up("sm"));return t?l?(0,y.jsxs)(es.A,{direction:"row",alignItems:"center",children:[(0,y.jsx)(eU.A,{sx:{color:r.palette.tiptip[500],fontSize:"16px",mr:"4px"}}),(0,y.jsx)(B.A,{sx:{...r.typography.normalBold,color:r.palette.text.secondary,mr:"12px"},children:i("accessSourceDirectPurchaseLabel")}),(0,y.jsx)(es.A,{children:(0,y.jsx)(G.A,{id:"b-event-hasboughtticket-view-ticket",sx:{marginRight:"12px",height:"44px",backgroundColor:r.palette.background.tertiery},buttonVariant:"outlined",onClick:n,children:i("eventDetailsSeeTicketButton")})})]}):(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(es.A,{direction:"row",spacing:1,alignItems:"center",justifyContent:"center",children:[(0,y.jsx)(eV.A,{sx:{color:r.palette.tiptip[500]},fontSize:"medium"}),(0,y.jsx)(B.A,{sx:{...r.typography.normalBold,color:r.palette.text.secondary},children:i("accessSourceDirectPurchaseLabel")}),(0,y.jsx)(ez.A,{sx:{fontSize:"6px",color:r.palette.text.secondary}}),(0,y.jsx)(es.A,{direction:"row",alignItems:"center",spacing:.5,children:(0,y.jsxs)(G.A,{id:"b-event-hasboughtticket-view-ticket",sx:{...r.typography.normalBold,padding:"0",height:"22px"},buttonVariant:"nude",onClick:n,children:[i("eventDetailsSeeTicketButton"),(0,y.jsx)(eq.A,{sx:{color:r.palette.tiptip[500]}})]})})]}),(0,y.jsx)(eS.A,{sx:e=>({borderColor:e.palette.border.bold,m:"12px 0px"})})]}):null};var eH=n(71874);let eG=(0,K.Ay)(eH.A)(e=>{let{theme:t}=e;return{...t.typography.normalBold,[t.breakpoints.up("sm")]:{minWidth:"210px",padding:"12px 16px"},height:"44px"}}),eY=e=>{let{isSalePeriod:t,isBought:n,setIsCounterShown:i,onBuyTicket:r,isCounterShown:l,eventStatus:o,isSaleEnded:a,isCreator:s,salePrice:c,disableBuyButton:d,numTicketsSelected:u,isMultipleTicketOptions:p,isSeatSelection:x,isEventAttraction:m}=e,{t:h}=(0,T.Bd)(),_=(0,E.A)(),v=(0,V.A)(_.breakpoints.up("sm")),g=p||x,[b,A]=(0,f.useState)(!1),k=async()=>{v||l||g||m?(A(!0),await r(),A(!1)):i(!0)};return(0,y.jsx)(eG,{disabled:d,buttonVariant:"filled",loading:b,id:"b-content-action-buy-button","data-testid":"b-event-action-buy-button",onClick:k,sx:{":disabled":{backgroundColor:_.palette.grey[300]},minWidth:"164px"},children:!t||!v&&!l&&"fully_booked"!==o&&"sold_out"!==o&&"sale_ended"!==o&&"event_ended"!==o||"coming_soon"===o||"available"===o&&g||"available"===o&&n||"run_out_soon"===o&&g||"run_out_soon"===o&&n||m&&!p&&("available"===o||"run_out_soon"===o)?h(s?"key_preview_mode":"key_buy_ticket"):"available"===o||"run_out_soon"===o?"".concat(h("buyNow")," - ").concat(0===c?h("free"):(0,eI.A)(c*u)):("fully_booked"===o&&p&&h("key_buy_ticket"),"fully_booked"===o)?h("eventDetailsBuyTicketFullyBooked"):"sold_out"===o?h("eventLabelSoldOut"):"sale_ended"===o||a&&"event_ended"!==o?h("eventLabelSalesEnded"):"event_ended"===o?h("eventLabelEventEnded"):void 0})},eK=e=>{let{eventStatus:t,salesEndedAt:n,salesStartAt:i,numTicketsSelected:r,setNumTicketsSelected:l,maxPurchaseableQuota:o,disableBuyButton:a,salePrice:s,totalSalePrice:c,price:d,isBought:u,onViewTicket:p,isSalePeriod:x,isSaleEnded:m,isCounterShown:h,setIsCounterShown:_,onBuyTicket:v,isSeatSelection:g,isMultipleTicketOptions:f,isCreator:b,isEventAttraction:A,minPurchasableQuota:k=1}=e,{t:j}
1=(0,T.Bd)(),w=(0,E.A)(),C="coming_soon"===t||"sold_out"===t&&!f||"run_out_soon"===t&&!f||"fully_booked"===t&&!f||"available"===t&&!f,S=30>=Math.round((new Date(n).getTime()-Date.now())/864e5),I=i>new Date;return(0,y.jsxs)(F.A,{sx:e=>({backgroundColor:e.palette.background.tertiery,borderRadius:"8px",padding:"12px 16px",width:"100%"}),children:[C&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(es.A,{direction:"row",sx:{justifyContent:"space-between",py:A?0:"8px"},children:[(0,y.jsxs)(es.A,{justifyContent:"center",children:[o>0&&(I||S)&&(0,y.jsx)(eC,{saleEndTime:n,saleStartTime:i||null}),(0,y.jsx)(eL,{eventStatus:t})]}),!A&&(0,y.jsxs)(es.A,{"data-testid":"c-event-info-bar-price-section",direction:"row",alignItems:"center",children:[(0,y.jsx)(eN,{numTicketsSelected:r,maxPurchaseableQuota:o,multiStepPurchase:f||g}),(0,y.jsx)(eP,{numTicketsSelected:r,maxPurchaseableQuota:o,disableBuyButton:a,setNumTicketsSelected:l,eventStatus:t,isSeatSelection:g,isCreator:b,minPurchasableQuota:k,setIsCounterShown:_})]})]}),o>0&&(I||S)&&(0,y.jsx)(eS.A,{sx:e=>({borderColor:e.palette.border.bold,margin:"12px 0px"})})]}),(0,y.jsxs)(es.A,{direction:"row",sx:{justifyContent:"space-between",alignItems:"center"},children:[(0,y.jsx)(es.A,{children:(0,y.jsx)(eB,{salePrice:s,hideCurrency:0===c,price:d,isMultipleTicketOptions:f})}),(0,y.jsxs)(es.A,{direction:"row",children:[(0,y.jsx)(eW,{isBought:u,onViewTicket:p}),(0,y.jsx)(eY,{isSalePeriod:x,isBought:u,setIsCounterShown:_,onBuyTicket:v,isCounterShown:h,eventStatus:t,isSaleEnded:m,salePrice:s,disableBuyButton:a,numTicketsSelected:r,isSeatSelection:g,isMultipleTicketOptions:f,isCreator:b,isEventAttraction:A})]})]}),!f&&!g&&k>1&&(0,y.jsxs)(es.A,{direction:"row",alignItems:"center",spacing:{xs:.5,md:1},marginTop:{xs:.5,md:1},children:[(0,y.jsx)(ep.A,{sx:{color:w.palette.info.main,fontSize:"16px"}}),(0,y.jsx)(B.A,{color:w.palette.text.primary,variant:"smallRegular",children:j("key_minimum_ticket_purchase_info",{qty:k})})]})]})};var eQ=n(5560);let eX=e=>{let{eventStatus:t,salesEndedAt:n,salesStartAt:i,numTicketsSelected:r,setNumTicketsSelected:l,maxPurchaseableQuota:o,disableBuyButton:a,totalSalePrice:s,salePrice:c,price:d,isBought:u,onViewTicket:p,isSalePeriod:x,isSaleEnded:m,isCounterShown:h,setIsCounterShown:_,onBuyTicket:v,isSeatSelection:g,isMultipleTicketOptions:f,isCreator:b,creatorName:A,isEventAttraction:k,minPurchasableQuota:j}=e,w=(0,E.A)(),{t:C}=(0,T.Bd)(),S=(0,eQ.XI)(),I=30>=Math.round((new Date(n).getTime()-Date.now())/864e5),D=i>new Date;return h?(0,y.jsxs)(es.A,{"data-testid":"c-event-counter-ticket",justifyContent:"center",sx:{width:"100%"},children:[(0,y.jsx)(eW,{isBought:u,onViewTicket:p}),(0,y.jsx)(eL,{eventStatus:t}),(0,y.jsxs)(es.A,{direction:"row",sx:{justifyContent:"space-between",alignItems:"center"},children:[(0,y.jsx)(F.A,{sx:{mb:"16px"},children:(0,y.jsx)(eB,{salePrice:c,hideCurrency:0===s,price:d,isMultipleTicketOptions:f,isSeatSelection:g,minPurchasableQuota:j})}),(0,y.jsxs)(es.A,{justifyContent:r===o?"flex-start":"center",height:"100%",children:[(0,y.jsx)(eP,{numTicketsSelected:r,maxPurchaseableQuota:o,disableBuyButton:a,setNumTicketsSelected:l,eventStatus:t,isSeatSelection:g,isCreator:b,minPurchasableQuota:j,setIsCounterShown:_}),(0,y.jsx)(eN,{numTicketsSelected:r,maxPurchaseableQuota:o,multiStepPurchase:f||g})]})]}),(0,y.jsx)(es.A,{children:(0,y.jsx)(eY,{isSalePeriod:x,isBought:u,setIsCounterShown:_,onBuyTicket:v,isCounterShown:h,eventStatus:t,isSaleEnded:m,salePrice:c,disableBuyButton:a,numTicketsSelected:r,isMultipleTicketOptions:f,isSeatSelection:g,isCreator:b,isEventAttraction:k})}),(0,y.jsx)(es.A,{mt:"12px",children:o>0&&(D||I)&&(0,y.jsx)(eC,{saleEndTime:n,saleStartTime:i||null})}),("fully_booked"===t||"run_out_soon"===t)&&(0,y.jsx)(eS.A,{sx:e=>({borderColor:e.palette.border.bold,margin:"12px 0px"})})]}):(0,y.jsxs)(es.A,{justifyContent:"center",sx:{width:"100%"},children:[(0,y.jsx)(eW,{isBought:u,onViewTicket:p}),(0,y.jsx)(eL,{eventStatus:t}),("fully_booked"===t||"run_out_soon"===t)&&(0,y.jsx)(eS.A,{sx:e=>({borderColor:e.palette.border.bold,margin:"12px 0px"})}),(0,y.jsxs)(es.A,{direction:"row",sx:{justifyContent:"space-between",alignItems:"center"},children:[(0,y.jsx)(eB,{salePrice:c,hideCurrency:0===s,price:d,isMultipleTicketOptions:f,isSeatSelection:g,minPurchasableQuota:j}),(0,y.jsx)(eY,{isSalePeriod:x,isBought:u,setIsCounterShown:_,onBuyTicket:v,isCounterShown:h,eventStatus:t,isSaleEnded:m,salePrice:c,disableBuyButton:a,numTicketsSelected:r,isMultipleTicketOptions:f,isSeatSelection:g,isCreator:b,isEventAttraction:k})]}),(0,y.jsx)(es.A,{mt:"12px",children:(I||D)&&(0,y.jsx)(eC,{saleEndTime:n,saleStartTime:i||null})}),(null==S?void 0:S.tncRedirect)&&(0,y.jsx)(es.A,{sx:{margin:"12px 0px"},children:(0,y.jsxs)(B.A,{sx:{textAlign:"center",fontSize:"12px"},children:[C("key_these_products_or_services",{creatorName:A})," ",(0,y.jsx)(el.A,{href:null==S?void 0:S.tncRedirect,color:w.palette.tiptip[500],target:"_blank",children:C("here")})]})})]})};var eZ=n(28398),e$=n(20700),eJ=n(59679),e0=n(13379);let e1=e=>Object.keys(e).reduce((t,n)=>{var i;let r=e[n];return(null==(i=r.ticket_bundling)?void 0:i.length)>0?t+r.ticket_bundling.reduce((e,t)=>
1e+t.qty,0)*r.qty:t+r.qty},0),e2=e=>Object.keys(e).reduce((t,n)=>t+e[n].qty,0),e5=e=>Object.keys(e).reduce((t,n)=>t+e[n].qty*e[n].price,0),e6=e=>{let t=[];return Object.keys(e).map(n=>{let i=e[n];i.qty&&t.push(i)}),t},e3=e=>{let t=[];return Object.keys(e).map(n=>{let{ticket_schedule_uid:i,qty:r,visit_time:l}=e[n];r&&t.push({ticket_schedule_uid:i,qty:r,visit_time:l})}),t},e4=(e,t,n)=>{if((0,e$.A)(e))return[...Array(t?n:1)];{let n=[];return t?(e6(e).map(e=>{var t;(null==(t=e.ticket_bundling)?void 0:t.length)>0?[...Array(e.qty)].map(()=>e.ticket_bundling.map(e=>{[...Array(e.qty)].map(()=>n.push({title:e.name}))})):[...Array(e.qty)].map(()=>n.push({title:e.title,visit_time:e.visit_time}))}),n):[void 0]}},e8=function(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=(0,eJ.pu)(t);return 1===n.length&&(null==(e=n[0])?void 0:e.ticket_type.id)===e0.a2.BUNDLING},e7=(0,K.Ay)(F.A)(e=>{let{theme:t}=e;return{bottom:0,left:0,width:"100%",zIndex:10,justifyContent:"space-between",boxShadow:"0px 0px 24px 0px ".concat(t.palette.border.subtitle),background:t.palette.background.primary,[t.breakpoints.up("xs")]:{position:"fixed",padding:"16px"},[t.breakpoints.up("sm")]:{background:"transparent",position:"relative",marginTop:"24px",boxShadow:"none",padding:"0px"},display:"flex"}}),e9=e=>{var t,n,i,r,l,o,a,s,c,d,u,p,x,m;let{isBought:h=!1,onBuyTicket:_,isCreator:v,isSeatSelection:g,numTicketsSelected:b,setNumTicketsSelected:A,onViewTicket:k=()=>{},isLoading:j=!1,productEventDetail:w,attractionSchedules:C,isPendingTransaction:S}=e,[I,T]=(0,f.useState)(!1),[D,B]=(0,f.useState)(!1),[F,L]=(0,f.useState)(!1),O=(0,E.A)(),R=(0,V.A)(O.breakpoints.up("sm")),M=null==w||null==(t=w.event_summary)?void 0:t.max_purchasable_quota,P=new Date((null==w||null==(n=w.event_summary)?void 0:n.sales_started_at)||null),N=(null==w||null==(i=w.event_summary)?void 0:i.sales_ended_at)?new Date(w.event_summary.sales_ended_at):null,z=null==w||null==(r=w.event_summary)?void 0:r.status,q=null==w||null==(l=w.event_summary)?void 0:l.min_price,U=null==w||null==(o=w.event_summary)?void 0:o.min_sale_price,W=(0,eJ.pu)(null==w?void 0:w.ticket_options),H=W.length?W.reduce((e,t)=>e.sale_price+t.sale_price):void 0,G=W.length>1||e8(null==w?void 0:w.ticket_options)||!!(null==w||null==(a=w.event_summary)?void 0:a.is_enable_ticket_section),Y=null==w||null==(s=w.creator)?void 0:s.name,K=(null==w||null==(d=w.event_summary)||null==(c=d.event_type)?void 0:c.id)===eZ.Ho,Q=K&&(null==C||null==(u=C.dates)?void 0:u.length)===0&&"available"===z,X=(null==(m=W[0])||null==(x=m.ticket_schedules)||null==(p=x[0])?void 0:p.min_purchasable_quota)||1,Z=()=>{var e;return!G&&0===M||!I&&!v||j||S||D||!I&&"coming_soon"===z&&!v||"sold_out"===z||!G&&"fully_booked"===z||K&&(null==C||null==(e=C.dates)?void 0:e.length)===0};return((0,f.useEffect)(()=>{let e=new Date;T(e>P),B(e>N);let t=setInterval(()=>{let e=new Date;T(e>P),B(N&&e>N)},1e3);return()=>clearInterval(t)},[]),R)?(0,y.jsx)(e7,{children:(0,y.jsx)(eK,{eventStatus:Q?"sold_out":z,salesEndedAt:N,salesStartAt:P,numTicketsSelected:b,setNumTicketsSelected:A,maxPurchaseableQuota:M,disableBuyButton:Z(),salePrice:U,totalSalePrice:H,price:q,isBought:h,onViewTicket:k,isSalePeriod:I,isSaleEnded:D,isCounterShown:F,setIsCounterShown:L,onBuyTicket:_,isSeatSelection:g,isMultipleTicketOptions:G,isCreator:v,isEventAttraction:K,minPurchasableQuota:X})}):(0,y.jsx)(e7,{children:(0,y.jsx)(eX,{eventStatus:Q?"sold_out":z,salesEndedAt:N,salesStartAt:P,numTicketsSelected:b,setNumTicketsSelected:A,maxPurchaseableQuota:M,disableBuyButton:Z(),totalSalePrice:H,salePrice:U,price:q,isBought:h,onViewTicket:k,isSalePeriod:I,isSaleEnded:D,isCounterShown:F,setIsCounterShown:L,onBuyTicket:_,isSeatSelection:g,isMultipleTicketOptions:G,isCreator:v,creatorName:Y,isEventAttraction:K,minPurchasableQuota:X})})};var te=n(98352),tt=n(31077),tn=n(37224),ti=n(86062);function tr(e){let{isBannerOpen:t,setBannerOpen:n,message:i}=e;return(0,y.jsx)(tn.A,{in:t,children:(0,y.jsx)(F.A,{padding:{xs:"0px 16px",sm:"0px 48px",md:"0px 24px"},sx:{margin:"32px auto 0px auto",width:"100%",maxWidth:1152},children:(0,y.jsx)(j.A,{variant:"outlined",severity:"error",sx:{color:ti.Ay.palette.text.primary,width:"100%",padding:1,"& .MuiAlert-message":{marginTop:"2px"},"& .MuiAlert-action":{paddingTop:"0px"}},icon:(0,y.jsx)(ep.A,{}),action:(0,y.jsx)(G.A,{id:"b-content-errorbanner-close",size:"small",sx:{margin:"auto",padding:0,minWidth:50,backgroundColor:"transparent"},onClick:()=>n(!1),children:(0,y.jsx)(q.A,{style:{color:ti.Ay.palette.text.primary}})}),children:i})})})}var tl=n(51224),to=n(68327);function ta(e){return(0,y.jsxs)(es.A,{width:"100%",sx:e.sx,spacing:{xs:1,sm:3},children:[(0,y.jsx)(to.A,{sx:{backgroundColor:"lightgray"},height:50,variant:"rounded","data-testid":"skeleton"}),(0,y.jsxs)(es.A,{direction:"row",spacing:1,children:[(0,y.jsx)(to.A,{width:"100%",height:56,sx:{backgroundColor:"lightgray"},variant:"rounded"}),(0,y.jsx)(to.A,{width:"100%",height:56,sx:{backgroundColor:"lightgray"},variant:"rounded"}),(0,y.jsx)(to.A,{width:"100%",height:56,sx:{backgroundColor:"lightgray"},variant:"rounded"})]}),(0,y.jsx)(to.A,{sx:{backgroundColor:"lightgray"},height:68,variant:"rounded"})]})}
1var ts=n(21547),tc=n(45490);function td(e){let{onClick:t}=e;return(0,y.jsx)(F.A,{sx:e=>({position:"absolute",top:"16px",left:"16px",boxShadow:"0px 0px 8px 0px ".concat(e.palette.border.minimal),border:"1px solid ".concat(e.palette.border.subtitle),borderRadius:"8px",backgroundColor:"white"}),children:(0,y.jsx)(X.A,{id:"b-event-seat-selection-back",buttonVariant:"nude",onClick:t,sx:e=>({padding:"8px !important",borderRadius:"8px",":hover":{backgroundColor:e.palette.tiptip[100],color:e.palette.primary.main},minWidth:0}),children:(0,y.jsx)(tc.A,{})})})}let tu=function(){let e=(0,f.useRef)(null),[t,n]=(0,f.useState)(0),[i,r]=(0,f.useState)(0);return(0,f.useEffect)(()=>{setTimeout(()=>{t()},0);let t=()=>{if(e.current){let{width:t,height:i}=e.current.getBoundingClientRect();n(t),r(i)}};return window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[]),{width:t,height:i,containerRef:e}},tp=e=>{let{children:t,onBack:n,sx:i}=e,r=(0,E.A)(),{width:l,height:o,containerRef:a}=tu(),s=Math.floor(o/46),c=Math.floor(l/46);return(0,y.jsx)(es.A,{ref:a,id:"c-seat-selection-loading-seat-map",sx:{height:(0,R.bN)()?"calc(100vh - 88px)":"calc(100vh - 194px)",overflowY:"scroll",justifyContent:"center","::-webkit-scrollbar ":{display:"none"},"@media (max-width:480px)":{width:"100vw",marginLeft:"0px"},...i},children:(0,y.jsxs)(es.A,{width:"100%",direction:"row",justifyContent:"center",alignContent:"flex-start",position:"relative",height:"100%",sx:{background:r.palette.grey[200],padding:"24px",flexWrap:"wrap",width:"fit-content"},children:[[...Array(s)].map(e=>(0,y.jsx)(es.A,{direction:"row",sx:{mb:"16px",":last-of-type":{mb:"0px"}},children:[...Array(c)].map(e=>(0,y.jsx)(F.A,{height:"28px",width:"28px",sx:{borderRadius:"28px",background:r.palette.grey[300],mr:"16px",":last-of-type":{mr:"0px"}}},e))},e)),(0,y.jsx)(es.A,{height:"100%",width:"100%",justifyContent:"center",alignItems:"center",sx:{top:"-4px",position:"absolute"},children:(0,y.jsx)(es.A,{height:"64px",width:"64px",alignItems:"center",justifyContent:"center",sx:{background:r.palette.background.primary,borderRadius:"6px"},children:t})}),!(0,R.bN)()&&(0,y.jsx)(td,{onClick:n})]})})};function tx(e){let{onBack:t}=e,n=(0,E.A)(),i=e=>{let{width:t,sx:i}=e;return(0,y.jsx)(to.A,{variant:"rectangular",height:"100%",width:t||"100%",sx:{backgroundColor:n.palette.background.secondary,borderRadius:"12px",...i}})};return(0,y.jsxs)(es.A,{height:"100%",sx:{padding:{xs:"0px 8px",sm:"0px"}},children:[(0,y.jsx)(es.A,{height:"24px",m:"16px",children:(0,y.jsx)(i,{})}),(0,y.jsxs)(es.A,{height:"16px",direction:"row",mx:"16px",mb:"16px",justifyContent:"space-between",children:[(0,y.jsx)(i,{width:"15%"}),(0,y.jsx)(i,{width:"15%"})]}),(0,y.jsx)(tp,{onBack:t,sx:{"@media (max-width:480px)":{width:"100vw",marginLeft:"-8px"}},children:(0,y.jsx)(k.A,{size:18})})]})}function tm(){let e=e=>{let{width:t,sx:n}=e,i=(0,E.A)();return(0,y.jsx)(to.A,{variant:"rectangular",height:"100%",width:t||"100%",sx:{backgroundColor:i.palette.text.tertiery,borderRadius:"12px",...n}})};return(0,y.jsxs)(es.A,{sx:e=>({width:"100%",aspectRatio:"344/192",background:e.palette.background.secondary,borderRadius:"8px",padding:"16px",mt:"16px"}),children:[(0,y.jsx)(es.A,{height:"100%",mb:"24px",children:(0,y.jsx)(e,{width:"71%"})}),(0,y.jsxs)(es.A,{mb:"10px",direction:"row",justifyContent:"space-between",height:"100%",children:[(0,y.jsx)(e,{width:"32%"}),(0,y.jsx)(e,{width:"32%"})]}),(0,y.jsxs)(es.A,{mb:"24px",direction:"row",height:"100%",children:[(0,y.jsx)(e,{width:"14%",sx:{mr:"8px"}}),(0,y.jsx)(e,{width:"14%",sx:{mr:"8px"}}),(0,y.jsx)(e,{width:"14%",sx:{mr:"8px"}})]}),(0,y.jsx)(es.A,{height:"100%",children:(0,y.jsx)(e,{})})]})}let th=()=>(0,y.jsx)(es.A,{sx:e=>({width:"100%",aspectRatio:"344/311",background:e.palette.background.secondary,borderRadius:"8px",padding:"16px"})});var t_=n(73454);function tv(e){let{dataUpdatedAt:t,isLoading:n,refetch:i,throttleDuration:r=1e4}=e,{t:l}=(0,T.Bd)(),[o,a]=(0,f.useState)(!1),s=n||o,c=(0,E.A)();return(0,f.useEffect)(()=>{a(!0),setTimeout(()=>{a(!1)},r)},[]),(0,y.jsxs)(es.A,{direction:"row",alignItems:"center",gap:2,children:[!!t&&(0,y.jsx)(B.A,{id:"c-seat-selection-last-updated",variant:"normalRegular",sx:{color:c.palette.text.secondary,display:{xs:"none",sm:"block"}},children:"".concat(l("key_last_update")," ").concat(A()(t).format("HH:mm"))}),(0,y.jsx)(eS.A,{orientation:"vertical",variant:"middle",flexItem:!0,sx:{borderColor:c.palette.background.tertiery,display:{xs:"none",sm:"block"}}}),(0,y.jsx)(es.A,{direction:"row",alignItems:"center",children:(0,y.jsx)(eO.A,{id:"b-seat-selection-refresh-button",sx:{padding:"8px 0px"},onClick:()=>{i(),a(!0),setTimeout(()=>{a(!1)},r)},disabled:s,children:(0,y.jsx)(t_.A,{sx:{fontSize:"18px",color:s?c.palette.text.tertiery:c.palette.tiptip[500],marginLeft:"6px"}})})})]})}let tg=(0,K.Ay)(F.A)({overflow:"hidden",position:"relative",textAlign:"center",touchAction:"none",height:"100%",width:"100%"});var ty=n(66741);let tf=(0,K.Ay)(X.A)(e=>{let{theme:t}=e;return{padding:"8px !important",borderRadius:"8px",":hover":{backgroundColor:t.palette.tiptip[100],c
1olor:t.palette.primary.main},minWidth:0}}),tb=(0,K.Ay)(es.A)(e=>{let{theme:t}=e;return{flexDirection:"row",alignItems:"center",justifyContent:"center",borderRadius:"8px",backgroundColor:t.palette.secondary.main,boxShadow:"0px 0px 8px 0px ".concat(t.palette.border.minimal),border:"1px solid ".concat(t.palette.border.subtitle),pointerEvents:"auto",[t.breakpoints.down("sm")]:{height:"100%"}}});function tA(e){let{scale:t,onZoomIn:n,onZoomOut:i}=e,r=(0,E.A)(),l=(0,V.A)(r.breakpoints.up("sm"));return(0,y.jsx)(tb,{children:(0,y.jsxs)(ty.A,{children:[(0,y.jsx)(tf,{id:"b-event-seat-map-zoom-out",buttonVariant:"nude",onClick:i,children:(0,y.jsx)(eM.A,{})}),(0,y.jsx)(eS.A,{orientation:"vertical",flexItem:!0,sx:{borderColor:r.palette.background.tertiery,my:"8px"}}),l&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(B.A,{variant:"normalBold",color:r.palette.text.secondary,mx:"8px",my:"auto",children:[Math.floor(100*t),"%"]}),(0,y.jsx)(eS.A,{orientation:"vertical",flexItem:!0,sx:{borderColor:r.palette.background.tertiery,my:"8px"}})]}),(0,y.jsx)(tf,{id:"b-event-seat-map-zoom-in",buttonVariant:"nude",onClick:n,children:(0,y.jsx)(eR.A,{})})]})})}var tk=n(57034);function tj(e){let{top:t,left:n,seat:i,handleSelectSeat:r}=e,l=(0,E.A)(),{t:o}=(0,T.Bd)(),a=(0,V.A)(l.breakpoints.up("sm")),s={[e0.G1.BOOKED]:o("key_booked"),[e0.G1.SOLD_OUT]:o("key_sold"),[e0.G1.UNAVAILABLE]:o("key_unavailable")},c=i.status===e0.G1.AVAILABLE?"white":l.palette.background.tertiery,d=i.status===e0.G1.AVAILABLE?l.palette.text.secondary:l.palette.text.tertiery,u=i.status===e0.G1.AVAILABLE?l.palette.text.primary:l.palette.text.secondary;return(0,y.jsx)(tk.A,{top:t,left:n,applyPositionStyle:!0,style:{borderRadius:"12px",padding:"8px 16px",border:"1px solid ".concat(l.palette.border.subtitle),textAlign:"left",backgroundColor:c,pointerEvents:a?"none":"auto"},children:(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(es.A,{direction:"row",children:[(0,y.jsxs)(es.A,{mr:"16px",maxWidth:"198px",children:[(0,y.jsx)(B.A,{variant:"normalRegular",color:d,textTransform:"uppercase",children:o("category")}),(0,y.jsx)(B.A,{variant:"h4Desk",color:u,sx:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box","-webkit-line-clamp":"2","-webkit-box-orient":"vertical"},children:i.ticket.title})]}),(0,y.jsxs)(es.A,{children:[(0,y.jsx)(B.A,{variant:"normalRegular",color:d,textTransform:"uppercase",children:"Seat"}),(0,y.jsx)(B.A,{variant:"h4Desk",color:u,children:i.label})]})]}),(0,y.jsx)(eS.A,{sx:{my:"8px"}}),i.status===e0.G1.AVAILABLE?(0,y.jsxs)(es.A,{gap:"8px",children:[(0,y.jsx)(B.A,{variant:"mediumBold",color:u,children:(0,eI.A)(i.ticket.sale_price)}),!a&&(0,y.jsx)(G.A,{id:"b-seat-selection-tooltip-select-seat",onClick:()=>r(i),children:o("key_choose_seat")})]}):(0,y.jsx)(B.A,{variant:"normalBold",color:u,children:s[i.status]})]})},Math.random())}var tw=n(7881),tC=n(88326),tS=n(37746),tI=n(20869);function tE(e,t){(e=String(e).replace(/[^0-9a-f]/gi,"")).length<6&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),t=t||0;var n,i,r="#";for(i=0;i<3;i++)r+=("00"+(n=Math.round(Math.min(Math.max(0,(n=parseInt(e.substr(2*i,2),16))+n*t),255)).toString(16))).substr(n.length);return r}function tT(e){return"string"==typeof e&&tI.EZ.test(e)}let tD=e=>{let{x:t,y:n,width:i,height:r,...l}=e;return(0,y.jsxs)("svg",{x:t,y:n,width:i,height:r,viewBox:"0 0 16 16",fill:"none","data-testid":"SoldSeat",...l,children:[(0,y.jsx)("circle",{cx:"8",cy:"8",r:"8",fill:ti.Ay.palette.icon.tertiery}),(0,y.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4.25895 5.50555C3.91457 5.16114 3.91457 4.60273 4.25895 4.25831C4.60334 3.9139 5.16169 3.9139 5.50608 4.25831L8.0001 6.75257L10.4939 4.25853C10.8383 3.91411 11.3966 3.91411 11.741 4.25853C12.0854 4.60294 12.0854 5.16135 11.741 5.50577L9.24722 7.9998L11.7417 10.4945C12.0861 10.8389 12.0861 11.3973 11.7417 11.7417C11.3973 12.0862 10.839 12.0862 10.4946 11.7417L8.0001 9.24704L5.50541 11.742C5.16103 12.0864 4.60267 12.0864 4.25829 11.742C3.9139 11.3975 3.9139 10.8391 4.25829 10.4947L6.75297 7.9998L4.25895 5.50555Z",fill:"white"})]})},tB=e=>{let{x:t,y:n,width:i,height:r,fill:l="#fff",...o}=e;return(0,y.jsxs)("svg",{x:t,y:n,width:i,height:r,viewBox:"0 0 16 16",fill:"none","data-testid":"BookedSeat",...o,children:[(0,y.jsx)("circle",{cx:"8",cy:"8",r:"8",f
1ill:l}),(0,y.jsx)("path",{d:"M6 3C5.45 3 5 3.45 5 4L5.005 5.59C5.005 5.855 5.11 6.105 5.295 6.295L7 8L5.295 9.715C5.11 9.9 5.005 10.155 5.005 10.42L5 12C5 12.55 5.45 13 6 13H10C10.55 13 11 12.55 11 12V10.42C11 10.155 10.895 9.9 10.71 9.715L9 8L10.705 6.3C10.895 6.11 11 5.855 11 5.59V4C11 3.45 10.55 3 10 3H6ZM10 10.455V11.5C10 11.775 9.775 12 9.5 12H6.5C6.225 12 6 11.775 6 11.5V10.455C6 10.32 6.055 10.195 6.145 10.1L8 8.25L9.855 10.105C9.945 10.195 10 10.325 10 10.455Z",fill:tE(l,.9)})]})},tF=e=>{let{x:t,y:n,width:i,height:r,fill:l=ti.Ay.palette.icon.tertiery,...o}=e;return(0,y.jsxs)("svg",{x:t,y:n,width:i,height:r,viewBox:"0 0 10 10",fill:"none","data-testid":"UnavailableSeat",...o,children:[(0,y.jsx)("path",{d:"M0 5C0 2.23858 2.23858 0 5 0C7.76142 0 10 2.23858 10 5C10 7.76142 7.76142 10 5 10C2.23858 10 0 7.76142 0 5Z",fill:l}),(0,y.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5 2C6.65685 2 8 3.34315 8 5C8 6.65685 6.65685 8 5 8C3.34315 8 2 6.65685 2 5C2 3.34315 3.34315 2 5 2ZM3.69727 6.83203C4.06513 7.09409 4.51393 7.25 5 7.25C6.24264 7.25 7.25 6.24264 7.25 5C7.25 4.51393 7.09409 4.06513 6.83203 3.69727L3.69727 6.83203ZM5 2.75C3.75736 2.75 2.75 3.75736 2.75 5C2.75 5.48558 2.90542 5.9341 3.16699 6.30176L6.30176 3.16699C5.9341 2.90542 5.48558 2.75 5 2.75Z",fill:tE(l,.9)})]})},tL=e=>{let{x:t,y:n,width:i,height:r,fill:l="#fff",...o}=e;return(0,y.jsxs)("svg",{x:t,y:n,width:i,height:r,viewBox:"0 0 16 16",fill:"none","data-testid":"SelectedSeat",...o,children:[(0,y.jsx)("circle",{cx:"8",cy:"8",r:"8",fill:l}),(0,y.jsx)("path",{d:"M10.8456 4.25796L6.40263 8.63724L5.15431 7.40681C4.80532 7.06281 4.23708 7.06281 3.88809 7.40681L3.26169 8.02423C2.9127 8.36822 2.9127 8.92831 3.26169 9.2723L5.76729 11.742C6.11628 12.086 6.68451 12.086 7.0335 11.742L12.7382 6.12345C13.0872 5.77946 13.0872 5.21937 12.7382 4.87538L12.1118 4.25796C11.7583 3.91397 11.1946 3.91397 10.8456 4.25796Z",fill:"white"})]})};var tO=n(87505);function tR(e){let{ticketOptions:t}=e,n=(0,E.A)(),{t:i}=(0,T.Bd)(),r=(0,V.A)(n.breakpoints.up("sm"));return(0,y.jsx)(F.A,{sx:e=>({borderRadius:"8px",backgroundColor:e.palette.secondary.main,boxShadow:"0px 0px 8px 0px ".concat(e.palette.border.minimal),border:"1px solid ".concat(e.palette.border.subtitle),pointerEvents:"auto"}),children:(0,y.jsxs)(tw.A,{disableGutters:!0,defaultExpanded:r,square:!0,sx:{borderRadius:"8px",boxShadow:"none"},children:[(0,y.jsx)(tC.A,{expandIcon:(0,y.jsx)(tO.A,{sx:{transform:{sm:"rotate(180deg)"}}}),sx:{minHeight:"unset"},children:(0,y.jsx)(B.A,{variant:"normalBold",mr:"8px",children:i("key_seat_info")})}),(0,y.jsxs)(tS.A,{sx:{p:"0px 12px 12px 12px"},children:[(0,y.jsxs)(es.A,{spacing:"8px",sx:{maxHeight:"364px",overflow:"scroll"},children:[(0,y.jsx)(eS.A,{sx:{mb:"8px"}}),(0,y.jsx)(B.A,{variant:"smallRegular",color:n.palette.text.secondary,textAlign:"start",children:i("category")}),(0,eJ.pu)(t).map((e,t)=>{var r;return(0,y.jsxs)(es.A,{direction:"row",alignItems:"start",justifyContent:"start",children:[(0,y.jsx)(F.A,{sx:{backgroundColor:(null==(r=e.seating_plan)?void 0:r.color)||n.palette.seat.category4.main,minWidth:"16px",minHeight:"16px",borderRadius:"16px",mt:"2px"}}),(0,y.jsxs)(es.A,{alignItems:"start",ml:"8px",children:[(0,y.jsx)(B.A,{variant:"normalBold",textAlign:"left",sx:{lineBreak:"anywhere"},children:e.title}),(0,y.jsx)(B.A,{variant:"normalRegular",color:n.palette.text.secondary,children:(0,eI.A)(e.sale_price)}),e.status===e0.yB.SOLD_OUT&&(0,y.jsx)(es.A,{sx:{backgroundColor:n.palette.info.main,borderRadius:"4px",padding:"2px 4px"},children:(0,y.jsx)(B.A,{variant:"smallBold",color:"white",m:"0px",pt:"1px",children:i("eventLabelSoldOut")})})]})]},t)})]}),(0,y.jsx)(eS.A,{sx:{mb:"8px",mt:"10px"}}),(0,y.jsxs)(es.A,{spacing:"8px",children:[(0,y.jsx)(B.A,{variant:"smallRegular",color:n.palette.text.secondary,textAlign:"start",children:i("key_status")}),(0,y.jsxs)(es.A,{direction:"row",alignItems:"center",children:[(0,y.jsx)(tL,{x:0,y:0,width:16,height:16,fill:n.palette.icon.tertiery}),(0,y.jsx)(B.A,{variant:"normalRegular",ml:"8px",children:i("key_selected")})]}),(0,y.jsxs)(es.A,{direction:"row",alignItems:"center",children:[(0,y.jsx)(tB,{x:0,y:0,width:16,height:16,fill:n.palette.icon.tertiery}),(0,y.jsx)(B.A,{variant:"normalRegular",ml:"8px",children:i("key_booked")})]}),(0,y.jsxs)(es.A,{direction:"row",alignItems:"center",children:[(0,y.jsx)(tD,{x:0,y:0,width:16,height:16}),(0,y.jsx)(B.A,{variant:"normalRegular",ml:"8px",children:i("key_sold")})]}),(0,y.jsxs)(es.A,{direction:"row",alignItems:"center",children:[(0,y.jsx)(tF,{x:0,y:0,width:16,height:16}),(0,y.jsx)(B.A,{variant:"normalRegular",ml:"8px",children:i("key_unavailable")})]})]})]})]})})}var tM=n(36540);let tP=function(e){let t=(0,f.useRef)(e);return t.current=e,t};function tN(e,t,n,i,r){let l=t.scale;if(l<=0)return null;
1let o=(i-t.x)/l,a=(r-t.y)/l;for(let t=0;t<e.zones.length;t++){let i=n[t];if(!i||o<i.minX||o>i.maxX||a<i.minY||a>i.maxY)continue;let r=e.zones[t],l=o-r.position.y,s=a-r.position.x;for(let e=0;e<r.rows.length;e++){let t=r.rows[e];if(t.seats)for(let e=0;e<t.seats.length;e++){let n=t.seats[e],i=n.position.x+t.position.x,r=n.position.y+t.position.y,o=n.style.radius||10,a=l-i,c=s-r;if(a*a+c*c<=o*o)return{seat:n,rowId:t.id,seatIndex:e}}}}return null}let tV=null;function tz(e,t){return e.width&&e.height&&t.width&&t.height?Math.min(e.width/t.width,e.height/t.height):1}function tq(e,t){let n=tz(e,t);return{scale:n,x:(e.width-t.width*n)/2,y:(e.height-t.height*n)/2}}function tU(e,t,n){let i=n.width*e.scale,r=n.height*e.scale,l=e.x,o=e.y;return l=i<=t.width?(t.width-i)/2:Math.max(t.width-i,Math.min(0,l)),o=r<=t.height?(t.height-r)/2:Math.max(t.height-r,Math.min(0,o)),{scale:e.scale,x:l,y:o}}function tW(e,t,n){return e<t?t:e>n?n:e}let tH=e=>1-Math.pow(1-e,3),tG=e=>({x:e.offsetX,y:e.offsetY}),tY=(0,f.forwardRef)(function(e,t){var n,i;let{width:r,height:l,data:o,selectedSeats:a,activeSeatStore:s,isDesktopResolution:c,hideSeatNumber:d,onSelectSeat:u,onRemoveSeat:p,onMouseEnter:x,onMouseLeave:m,onDisabledClick:h,onBackgroundTap:_,onGestureStart:v,onGestureEnd:g}=e,b=(0,E.A)(),A=(0,f.useRef)(null),k=(0,f.useRef)(1),j=(0,f.useRef)({scale:1,x:0,y:0}),w=(0,f.useRef)(null),C=(0,f.useRef)(1),S=(0,f.useRef)(null),I=(0,f.useRef)(!1),T=(0,f.useRef)(null),D=(0,f.useMemo)(()=>({width:o.canvas_width,height:o.canvas_height}),[o.canvas_width,o.canvas_height]),B=tP({width:r,height:l,contentWidth:D.width,contentHeight:D.height}),F=tP((0,f.useMemo)(()=>o.zones.map(e=>{let t=1/0,n=1/0,i=-1/0,r=-1/0;for(let l of e.rows)if(l.seats)for(let e of l.seats){let o=e.style.radius||10,a=e.position.x+l.position.x,s=e.position.y+l.position.y;a-o<t&&(t=a-o),a+o>i&&(i=a+o),s-o<n&&(n=s-o),s+o>r&&(r=s+o)}return t===1/0?null:{minX:t+e.position.y,minY:n+e.position.x,maxX:i+e.position.y,maxY:r+e.position.x}}),[o])),L=tP(o),O=(0,f.useMemo)(()=>new Set(a.map(e=>e.id)),[a]),R=tP(O),M=tP(!!d),P=tP(c),N=(0,f.useRef)(!1),V=tP(u),z=tP(p),q=tP(x),U=tP(m),W=tP(h),H=tP(_),G=tP(v),Y=tP(g),K=(0,f.useMemo)(()=>({defaultSeatColor:b.palette.seat.category4.main,disabledFill:b.palette.icon.tertiery,soldFill:b.palette.icon.tertiery,textColor:b.palette.action.disabled,background:b.palette.action.disabled}),[b]),Q=tP(K),X=tP(null!=(i=null==(n=b.typography)?void 0:n.fontFamily)?i:"system-ui, sans-serif"),Z=(0,f.useRef)(new Set),$=(0,f.useCallback)(()=>{let e=Z.current;if(0===e.size)return;let t=j.current;e.forEach(e=>e(t))},[]),J=(0,f.useRef)(()=>void 0);J.current=()=>{let e=A.current;if(!e)return;let t=e.getContext("2d");if(!t)return;let n=B.current;!function(e){let{ctx:t,data:n,view:i,dpr:r,canvasWidth:l,canvasHeight:o,selectedSeatIds:a,activeSeatId:s,zoneBBoxes:c,colors:d,fontFamily:u,hideSeatNumber:p,suppressLabels:x}=e;t.setTransform(1,0,0,1,0,0),d.background?(t.fillStyle=d.background,t.fillRect(0,0,l*r,o*r)):t.clearRect(0,0,l*r,o*r),t.setTransform(r*i.scale,0,0,r*i.scale,r*i.x,r*i.y);let m=1/i.scale,h=.1*l*m,_=.1*o*m,v=-i.x*m-h,g=-i.y*m-_,y=(l-i.x)*m+h,f=(o-i.y)*m+_,b=!x&&!p&&i.scale>=.35,A=tV||("undefined"==typeof Path2D?null:tV={check:new Path2D("M10.8456 4.25796L6.40263 8.63724L5.15431 7.40681C4.80532 7.06281 4.23708 7.06281 3.88809 7.40681L3.26169 8.02423C2.9127 8.36822 2.9127 8.92831 3.26169 9.2723L5.76729 11.742C6.11628 12.086 6.68451 12.086 7.0335 11.742L12.7382 6.12345C13.0872 5.77946 13.0872 5.21937 12.7382 4.87538L12.1118 4.25796C11.7583 3.91397 11.1946 3.91397 10.8456 4.25796Z"),lock:new Path2D("M6 3C5.45 3 5 3.45 5 4L5.005 5.59C5.005 5.855 5.11 6.105 5.295 6.295L7 8L5.295 9.715C5.11 9.9 5.005 10.155 5.005 10.42L5 12C5 12.55 5.45 13 6 13H10C10.55 13 11 12.55 11 12V10.42C11 10.155 10.895 9.9 10.71 9.715L9 8L10.705 6.3C10.895 6.11 11 5.855 11 5.59V4C11 3.45 10.55 3 10 3H6ZM10 10.455V11.5C10 11.775 9.775 12 9.5 12H6.5C6.225 12 6 11.775 6 11.5V10.455C6 10.32 6.055 10.195 6.145 10.1L8 8.25L9.855 10.105C9.945 10.195 10 10.325 10 10.455Z"),cross:new Path2D("M4.25895 5.50555C3.91457 5.16114 3.91457 4.60273 4.25895 4.25831C4.60334 3.9139 5.16169 3.9139 5.50608 4.25831L8.0001 6.75257L10.4939 4.25853C10.8383 3.91411 11.3966 3.91411 11.741 4.25853C12.0854 4.60294 12.0854 5.16135 11.741 5.50577L9.24722 7.9998L11.7417 10.4945C12.0861 10.8389 12.0861 11.3973 11.7417 11.7417C11.3973 12.0862 10.839 12.0862 10.4946 11.7417L8.0001 9.24704L5.50541 11.742C5.16103 12.0864 4.60267 12.0864 4.25829 11.742C3.9139 11.3975 3.9139 10.8391 4.25829 10.4947L6.75297 7.9998L4.25895 5.50555Z"),disabled:new Path2D("M5 2C6.65685 2 8 3.34315 8 5C8 6.65685 6.65685 8 5 8C3.34315 8 2 6.65685 2 5C2 3.34315 3.34315 2 5 2ZM3.69727 6.83203C4.06513 7.09409 4.51393 7.25 5 7.25C6.24264 7.25 7.25 6.24264 7.25 5C7.25 4.51393 7.09409 4.06513 6.83203 3.69727L3.69727 6.83203ZM5 2.75C3.75736 2.75 2.75 3.75736 2.75 5C2.75 5.48558 2.90542 5.9341 3.16699 6.30176L6.30176 3.16699C5.9341 2.90542 5.48558 2.75 5 2.75Z")});for(let e=0;e<n.zones.length;e++){let r=n.zones[e],l=c[e];if(!l||!(l.maxX<v)&&!(l.minX>y)&&!(l.maxY<g)&&!(l.minY>f)){for(let e of r.areas)(function(e,t){var n;let i=t.position.x,r=t.position.y,l=t.style.border_color,o=t.style.color,a=(null==t||null==(n=t.style)?void 0:n.rotation)||0;if("polygon"===t.type&&t.polygon){e.beginPath();let n=t.polygon.points;for(let t=0;t<n.length;t++){let l=i+n[t].x,o=r+n[t].y;0===t?e.moveTo(l,o):e.lineTo(l,o)}e.closePath(),o&&(e.fillStyle=o,e.fill()),l&&(e.strokeStyle=l,e.stroke())}else"rectangle"===t.type&&t.rectangle?(e.save(),a&&(e.translate(i,r),e.rotate(a*Math.PI/180),e.translate(-i,-r)),o&&(e.fillStyle=o,e.fillRect(i,r,t.rectangle.width,t.rectangle.height)),l&&(e.strokeStyle=l,e.strokeRect(i,r,t.rectangle.width,t.rectangle.height)),e.restore(
1)):"ellipse"===t.type&&t.ellipse?(e.beginPath(),e.ellipse(i,r,t.ellipse.radius.x,t.ellipse.radius.y,0,0,2*Math.PI),o&&(e.fillStyle=o,e.fill()),l&&(e.strokeStyle=l,e.stroke())):"circle"===t.type&&t.circle&&(e.beginPath(),e.arc(i,r,t.circle.radius,0,2*Math.PI),o&&(e.fillStyle=o,e.fill()),l&&(e.strokeStyle=l,e.stroke()))})(t,e),e.text.text&&function(e,t,n){var i;let r=t.position.x+t.text.position.x,l=t.position.y+t.text.position.y,o=(null==t||null==(i=t.style)?void 0:i.rotation)||0;e.save(),o&&(e.translate(r,l),e.rotate(o*Math.PI/180),e.translate(-r,-l)),e.fillStyle=t.text.color,e.font="".concat(t.text.size,"px ").concat(n),e.textAlign="center",e.textBaseline="middle",e.fillText(t.text.text,r,l),e.restore()}(t,e,u);if(l){for(let e of(t.save(),t.translate(r.position.y,r.position.x),r.rows))if(e.seats)for(let n of e.seats){var k,j,w,C,S,I,E;let l=n.style.radius||10,o=n.position.x+e.position.x,c=n.position.y+e.position.y,p=o+r.position.y,x=c+r.position.x;if(p+l<v||p-l>y||x+l<g||x-l>f)continue;let m=(null==(k=n.ticket)?void 0:k.color)||d.defaultSeatColor,h=a.has(n.id),_=s===n.id;h?function(e,t,n,i,r,l){if(e.beginPath(),e.arc(t,n,i,0,2*Math.PI),e.fillStyle=r,e.fill(),l){e.save(),e.translate(t-i,n-i);let r=2*i/16;e.scale(r,r),e.fillStyle="#ffffff",e.fill(l.check),e.restore()}}(t,o,c,l,m,A):n.status===e0.G1.UNAVAILABLE?function(e,t,n,i,r,l){if(e.beginPath(),e.arc(t,n,i,0,2*Math.PI),e.fillStyle=r,e.fill(),l){e.save(),e.translate(t-i,n-i);let o=2*i/10;e.scale(o,o),e.fillStyle=tE(r,.9),e.fill(l.disabled),e.restore()}}(t,o,c,l,d.disabledFill,A):n.status===e0.G1.AVAILABLE?(j=t,w=o,C=c,S=l,I=m,E=_,j.beginPath(),j.arc(w,C,S,0,2*Math.PI),j.fillStyle=E?tE(I,.1):I,j.fill(),j.lineWidth=E?3:.6,j.strokeStyle=tE(I,.3),j.stroke(),b&&(l-3)*i.scale>=6&&function(e,t,n,i,r,l,o){let a=t.length>
14?".."+t.slice(-3):t;e.fillStyle=l,e.font="".concat(r-3,"px ").concat(o),e.textAlign="center",e.textBaseline="middle",e.fillText(a,n,i)}(t,n.label,o,c,l,d.textColor,u)):n.status===e0.G1.BOOKED?function(e,t,n,i,r,l){if(e.beginPath(),e.arc(t,n,i,0,2*Math.PI),e.fillStyle=r,e.fill(),l){e.save(),e.translate(t-i,n-i);let o=2*i/16;e.scale(o,o),e.fillStyle=tE(r,.9),e.fill(l.lock),e.restore()}}(t,o,c,l,m,A):n.status===e0.G1.SOLD_OUT&&function(e,t,n,i,r,l){if(e.beginPath(),e.arc(t,n,i,0,2*Math.PI),e.fillStyle=r||"#B0B7C3",e.fill(),l){e.save(),e.translate(t-i,n-i);let r=2*i/16;e.scale(r,r),e.fillStyle="#ffffff",e.fill(l.cross),e.restore()}}(t,o,c,l,d.soldFill,A)}t.restore()}}}}({ctx:t,data:L.current,view:j.current,dpr:k.current,canvasWidth:n.width,canvasHeight:n.height,selectedSeatIds:R.current,activeSeatId:s.getSnapshot(),zoneBBoxes:F.current,colors:Q.current,fontFamily:X.current,hideSeatNumber:M.current,suppressLabels:N.current})};let ee=(0,f.useCallback)(()=>{null==w.current&&(w.current=requestAnimationFrame(()=>{w.current=null,J.current()}))},[]),et=(0,f.useCallback)(e=>{let t=B.current,n=+C.current,i=8*C.current;j.current=tU({...e,scale:tW(e.scale,n,i)},{width:t.width,height:t.height},{width:t.contentWidth,height:t.contentHeight}),$(),ee()},[$,ee,B]),en=(0,f.useRef)(null),ei=(0,f.useCallback)(()=>{null!=en.current&&(cancelAnimationFrame(en.current),en.current=null)},[]),er=(0,f.useCallback)(e=>{ei();let t=B.current,n=j.current,i=n.scale;if(i===e)return;let r=t.width/2,l=t.height/2,o=(r-n.x)/i,a=(l-n.y)/i,s=r-o*e,c=l-a*e,d=performance.now(),u=t=>{let r=Math.min(1,(t-d)/300),l=tH(r);et({scale:i+(e-i)*l,x:n.x+(s-n.x)*l,y:n.y+(c-n.y)*l}),r<1?en.current=requestAnimationFrame(u):en.current=null};en.current=requestAnimationFrame(u)},[ei,et,B]),el=(0,f.useCallback)(e=>{let t=C.current;if(t<=0)return;let n=j.current.scale/t,i=tW(n+e,1,8);i!==n&&er(i*t)},[er]);return(0,f.useEffect)(()=>ei,[ei]),(0,f.useLayoutEffect)(()=>{let e=A.current;if(!e||!r||!l)return;let t=window.devicePixelRatio||1;k.current=t,e.width=Math.max(1,Math.floor(r*t)),e.height=Math.max(1,Math.floor(l*t)),e.style.width="".concat(r,"px"),e.style.height="".concat(l,"px");let n=tz({width:r,height:l},{width:D.width,height:D.height}),i=S.current;C.current=n,S.current=n;let o=T.current,a=!o||o.width!==D.width||o.height!==D.height;if(T.current={width:D.width,height:D.height},!I.current||a||!i||i<=0)j.current=tq({width:r,height:l},{width:D.width,height:D.height}),I.current=!0;else{let e=tW(j.current.scale/i*n,+n,8*n);j.current=tU({...j.current,scale:e},{width:r,height:l},{width:D.width,height:D.height})}$(),ee()},[r,l,D.width,D.height,$,ee]),(0,f.useEffect)(()=>{ee()},[O,K,ee]),(0,f.useEffect)(()=>s.subscribe(ee),[s,ee]),(0,f.useEffect)(()=>()=>{null!=w.current&&cancelAnimationFrame(w.current)},[]),(0,f.useEffect)(()=>{let e=A.current;if(!e)return;let t=new Map,n=null,i=null,r=null,l=!1,o=null,a=null,c=()=>{n=null,i=null,r=null},d=()=>{null!=o&&(o=null,U.current())},u=()=>{if(!n)return null;let e=t.get(n[0]),i=t.get(n[1]);return e&&i?[e,i]:(c(),null)},p=()=>{let e=u();if(!e)return;let[t,n]=e,l=Math.hypot(t.lastX-n.lastX,t.lastY-n.lastY);i=l>0?l:null,r={x:(t.lastX+n.lastX)/2,y:(t.lastY+n.lastY)/2}},x=()=>{l||(l=!0,N.current=!0,G.current(),d(),e.style.cursor="")},m=()=>{l&&(l=!1,N.current=!1,Y.current(),ee())},h=i=>{ei();try{e.setPointerCapture(i.pointerId)}catch(e){}let r=tG(i);if(t.set(i.pointerId,{id:i.pointerId,startX:r.x,startY:r.y,lastX:r.x,lastY:r.y,moved:!1}),2===t.size&&!n){let e=Array.from(t.keys());n=[e[0],e[1]],p()}},_=t=>{if("mouse"!==t.pointerType||!P.current||l)return;let n=tG(t),i=tN(L.current,j.current,F.current,n.x,n.y);if(i){o!==i.seat.id&&(o=i.seat.id,q.current(t,i.seat));let n=i.seat.status===e0.G1.AVAILABLE||R.current.has(i.seat.id);e.style.cursor=n?"pointer":""}else d(),e.style.cursor=""},v=e=>{let t=u();if(!t)return;let[n,l]=t;if(e!==n.id&&e!==l.id)return;let o=Math.hypot(n.lastX-l.lastX,n.lastY-l.lastY),a={x:(n.lastX+l.lastX)/2,y:(n.lastY+l.lastY)/2};x();let s=i&&i>0?o/i:1,c=j.current;if(1!==s){let e=+C.current,t=8*C.current;c=function(e,t,n,i,r,l){let o=tW(e.scale*i,r,l);if(o===e.scale)return e;let a=(t-e.x)/e.scale,s=(n-e.y)/e.scale;return{scale:o,x:t-a*o,y:n-s*o}}(c,a.x,a.y,s,e,t)}r&&(c={scale:c.scale,x:c.x+(a.x-r.x),y:c.y+(a.y-r.y)}),et(c),i=o,r=a},g=e=>{let i=t.get(e.pointerId);if(!i)return void _(e);let r=tG(e),l=r.x-i.lastX,o=r.y-i.lastY;if(i.lastX=r.x,i.lastY=r.y,!i.moved&&(Math.abs(r.x-i.startX)>10||Math.abs(r.y-i.startY)>10)&&(i.moved=!0),n)return void v(e.pointerId);if(1===t.size){if(!i.moved)return;x(),et({scale:j.current.scale,x:j.current.x+l,y:j.current.y+o})}},y=(e,t)=>{if(t.moved)return;let n=tG(e),i=tN(L.current,j.current,F.current,n.x,n.y);
1if(!i){s.setActive(null),H.current();return}if(R.current.has(i.seat.id)){s.setActive(null),z.current(i.seat.id);return}if(i.seat.status===e0.G1.AVAILABLE){let t={...i.seat,seat_row:i.rowId,seat_column:i.seatIndex};P.current?V.current(t):(s.setActive(i.seat.id),q.current(e,t));return}W.current(e,i.seat)},f=i=>{let r=t.get(i.pointerId);t.delete(i.pointerId);try{e.releasePointerCapture(i.pointerId)}catch(e){}n&&(i.pointerId===n[0]||i.pointerId===n[1])&&c(),r&&0===t.size&&(r.moved||l||y(i,r),m())},b=e=>{e.preventDefault(),ei();let t=C.current;if(t<=0)return;let n=j.current.scale/t,i=tW(n+(e.deltaY<0?.2:-.2),1,8);if(i===n)return;let r=i*t,l=tG(e),o=(l.x-j.current.x)/j.current.scale,s=(l.y-j.current.y)/j.current.scale;x(),et({scale:r,x:l.x-o*r,y:l.y-s*r}),null!=a&&window.clearTimeout(a),a=window.setTimeout(m,180)};return e.addEventListener("pointerdown",h),e.addEventListener("pointermove",g),e.addEventListener("pointerup",f),e.addEventListener("pointercancel",f),e.addEventListener("wheel",b,{passive:!1}),()=>{e.removeEventListener("pointerdown",h),e.removeEventListener("pointermove",g),e.removeEventListener("pointerup",f),e.removeEventListener("pointercancel",f),e.removeEventListener("wheel",b),null!=a&&window.clearTimeout(a)}},[s,ei,ee,et,L,P,H,W,Y,G,q,U,z,V,R,F]),(0,f.useImperativeHandle)(t,()=>({zoomIn:()=>el(.5),zoomOut:()=>el(-.5),reset:()=>{ei();let e=B.current;j.current=tq({width:e.width,height:e.height},{width:e.contentWidth,height:e.contentHeight}),$(),ee()},subscribeView:e=>(Z.current.add(e),e(j.current),()=>{Z.current.delete(e)}),getView:()=>j.current,getFitScale:()=>C.current}),[el,ei,$,ee,B]),(0,y.jsx)("canvas",{ref:A,style:{display:"block",touchAction:"none",userSelect:"none",WebkitTapHighlightColor:"transparent"}})});tY.displayName="SeatCanvas";var tK=n(63882),tQ=n(4506),tX=n(52608),tZ=n(72311);let t$=(0,f.memo)(function(e){var t;let{area:n,scale:i}=e;return(0,y.jsx)(tZ.A,{textAnchor:"middle",verticalAnchor:"middle",fill:n.text.color,x:(n.position.x+n.text.position.x)*i,y:(n.position.y+n.text.position.y)*i,fontSize:n.text.size*i,angle:(null==n||null==(t=n.style)?void 0:t.rotation)||0,children:n.text.text})}),tJ=(0,f.memo)(function(e){let{area:t,scale:n}=e,i=t.position.x*n,r=t.position.y*n;if("polygon"===t.type){let e=t.polygon.points.map(e=>[(t.position.x+e.x)*n,(t.position.y+e.y)*n]);return(0,y.jsx)(tQ.Ay,{points:e,sides:e.length,fill:t.style.color,stroke:t.style.border_color})}if("text"===t.type)return(0,y.jsx)(t$,{area:t,scale:n});if("rectangle"===t.type){var l;return(0,y.jsx)("rect",{x:i,y:r,width:t.rectangle.width*n,height:t.rectangle.height*n,fill:t.style.color,stroke:t.style.border_color,transform:"rotate(".concat((null==t||null==(l=t.style)?void 0:l.rotation)||0," ").concat(i," ").concat(r,")")})}return"ellipse"===t.type?(0,y.jsx)("ellipse",{cx:i,cy:r,rx:t.ellipse.radius.x*n,ry:t.ellipse.radius.y*n,fill:t.style.color,stroke:t.style.border_color}):"circle"===t.type?(0,y.jsx)(tX.A,{cx:i,cy:r,r:t.circle.radius*n,fill:t.style.color,stroke:t.style.border_color}):null}),t0=(0,f.memo)(function(e){var t,n;let{row:i,scale:r,defaultColor:l}=e;if(!(null==(t=i.seats)?void 0:t.length))return null;let o=1/0,a=1/0,s=-1/0,c=-1/0;for(let e of i.seats){let t=e.style.radius||10,n=e.position.x+i.position.x,r=e.position.y+i.position.y;n-t<o&&(o=n-t),r-t<a&&(a=r-t),n+t>s&&(s=n+t),r+t>c&&(c=r+t)}let d=(null==(n=i.seats[0].ticket)?void 0:n.color)||l;return(0,y.jsx)("rect",{x:o*r,y:a*r,width:(s-o)*r,height:(c-a)*r,fill:d,fillOpacity:.4})}),t1=(0,f.memo)(function(e){let{seatData:t,scale:n}=e,i=(0,E.A)().palette.seat.category4.main;return(0,y.jsx)("svg",{width:"100%",height:"100%",children:t.zones.map((e,t)=>(0,y.jsxs)(tK.A,{children:[(0,y.jsx)(tK.A,{children:e.areas.map((e,t)=>(0,y.jsx)(tJ,{area:e,scale:n},t))}),(0,y.jsx)(tK.A,{top:e.position.x,left:e.position.y,children:e.rows.map((e,t)=>(0,y.jsx)(t0,{row:e,scale:n,defaultColor:i},t))})]},t))})});function t2(e){let{data:t,containerWidth:n,containerHeight:i,canvasHandleRef:r}=e,l=(0,E.A)(),o=(0,f.useRef)(null),{miniWidth:a,miniHeight:s,miniScale:c}=(0,f.useMemo)(()=>{let e=t.canvas_width||1,n=t.canvas_height||1,i=Math.min(150/e,150/n);return{miniWidth:e*i,miniHeight:n*i,miniScale:i}},[t.canvas_width,t.canvas_height]),d=t.canvas_width,u=t.canvas_height;return(0,f.useEffect)(()=>{let e=r.current;if(e)return e.subscribeView(e=>
1{let t=o.current;if(!t||e.scale<=0)return;let r=-e.x/e.scale,l=-e.y/e.scale,a=r+n/e.scale,s=l+i/e.scale,p=Math.max(0,r),x=Math.max(0,l),m=Math.max(0,Math.min(d,a)-p),h=Math.max(0,Math.min(u,s)-x);t.style.left="".concat(p*c,"px"),t.style.top="".concat(x*c,"px"),t.style.width="".concat(m*c,"px"),t.style.height="".concat(h*c,"px")})},[r,n,i,d,u,c]),(0,y.jsxs)(F.A,{sx:{position:"relative",width:"".concat(a,"px"),height:"".concat(s,"px"),borderRadius:"8px",overflow:"hidden",background:"rgba(22, 28, 36, 0.60)",border:"1px solid rgba(255, 255, 255, 0.48)"},children:[(0,y.jsx)(t1,{seatData:t,scale:c}),(0,y.jsx)(F.A,{ref:o,sx:{position:"absolute",border:"2px solid ".concat(l.palette.primary.main),pointerEvents:"none",boxSizing:"border-box",left:0,top:0,width:0,height:0}})]})}var t5=n(12360),t6=n(76562);let t3=()=>{let e=null,t=new Set;return{getSnapshot:()=>e,subscribe:e=>(t.add(e),()=>{t.delete(e)}),setActive:n=>{e!==n&&(e=n,t.forEach(e=>e()))}}};function t4(e){let{width:t,height:n,onBack:i,data:r,ticketOptions:l,selectedSeats:o,onClickSeat:a,maxPurchasableQuota:s,queueSnackbar:c}=e,{t:d}=(0,T.Bd)(),{tooltipData:u,tooltipLeft:p,tooltipTop:x,tooltipOpen:m,showTooltip:h,hideTooltip:_}=(0,t5.A)(),{containerRef:v,containerBounds:g}=(0,t6.A)({scroll:!0,detectBounds:!0}),b=(0,E.A)(),A=(0,V.A)(b.breakpoints.up("sm")),[k,j]=(0,f.useState)(1),[w,C]=(0,f.useState)(!1),S=(0,f.useRef)(null);S.current||(S.current=t3());let I=S.current,D=(0,f.useRef)(null),B=(0,f.useRef)(null),L=(0,f.useRef)(o);L.current=o;let O=(0,f.useRef)(l);O.current=l;let M=(0,f.useRef)(s);M.current=s;let P=(0,f.useRef)(a);P.current=a;let N=(0,f.useRef)(c);N.current=c;let z=(0,f.useRef)(d);z.current=d;let q=(0,f.useRef)(_);q.current=_;let U=(0,f.useRef)(h);U.current=h;let W=(0,f.useRef)(g);W.current=g;let H=(0,f.useRef)(m);H.current=m;let G=(0,f.useCallback)(()=>{null!=B.current&&(clearTimeout(B.current),B.current=null)},[]),Y=(0,f.useCallback)(e=>{G(),B.current=setTimeout(()=>{C(!1),B.current=null},e)},[G]);(0,f.useEffect)(()=>G,[G]);let K=(0,f.useCallback)(e=>{var t;null==(t=N.current)||t.call(N,{message:e,severity:"info"})},[]),Q=(0,f.useCallback)(()=>{H.current&&q.current()},[]),X=(0,f.useCallback)((e,t)=>{q.current(),U.current({tooltipLeft:e.clientX-W.current.left,tooltipTop:e.clientY-W.current.top,tooltipData:t})},[]),Z=(0,f.useCallback)((e,t)=>{A||(I.setActive(null),X(e,t))},[I,A,X]),$=(0,f.useCallback)(e=>{var t,n;let i=L.current,r=M.current,l=null==(n=(0,eJ.pu)(O.current).find(t=>t.ticket_option_uid===e.ticket.ticket_option_uid))||null==(t=n.ticket_schedules[0])?void 0:t.purchasable_quota,o=i.filter(t=>t.ticket.ticket_option_uid===e.ticket.ticket_option_uid);i.length>=r?0===r?K(z.current("key_zero_quota_select_seat")):K(z.current("key_select_seat_max",{number:i.length})):o.length>=l?0===l?K(z.current("key_zero_quota_select_seat_cat")):K(z.current("key_max_select_seat_cat",{number:o.length,"ticket name":e.ticket.title})):P.current([...i,e]),I.setActive(null),Q()},[I,Q,K]),J=(0,f.useCallback)(e=>{P.current(L.current.filter(t=>t.id!==e))},[]),ee=(0,f.useCallback)(()=>{G(),Q(),C(!0)},[G,Q]),et=(0,f.useCallback)(()=>{Y(500)},[Y]);(0,f.useEffect)(()=>{let e=D.current;if(e)return e.subscribeView(t=>{let n=e.getFitScale();if(!Number.isFinite(n)||n<=0||!Number.isFinite(t.scale)||t.scale<=0)return;let i=t.scale/n;if(!Number.isFinite(i)||i<=0)return;let r=Math.floor(100*i);j(e=>Math.floor(100*e)===r?e:i)})},[]);let en=(0,f.useCallback)(()=>{var e;Q(),C(!0),null==(e=D.current)||e.zoomIn(),Y(1e3)},[Q,Y]),ei=(0,f.useCallback)(()=>{var e;Q(),C(!0),null==(e=D.current)||e.zoomOut(),Y(1e3)},[Q,Y]);return(0,y.jsxs)(tg,{ref:v,children:[(0,y.jsx)("meta",{name:"viewport",content:"width=device-width, user-scalable=no"}),(0,y.jsx)(F.A,{sx:{position:"absolute",inset:0,background:b.palette.action.disabled},children:(0,y.jsx)(tY,{ref:D,width:t,height:n,data:r,selectedSeats:o,activeSeatStore:I,isDesktopResolution:A,hideSeatNumber:r.hide_seat_label,onSelectSeat:$,onRemoveSeat:J,onMouseEnter:X,onMouseLeave:Q,onDisabledClick:Z,onBackgroundTap:Q,onGestureStart:ee,onGestureEnd:et})}),(0,y.jsx)(tM.A,{in:w,mountOnEnter:!0,unmountOnExit:!0,children:(0,y.jsx)(F.A,{style:{position:"absolute",zIndex:1,bottom:"16
1px",left:"16px"},children:(0,y.jsx)(t2,{data:r,containerWidth:t,containerHeight:n,canvasHandleRef:D})})}),!(0,R.bN)()&&(0,y.jsx)(td,{onClick:i}),(0,y.jsxs)(es.A,{gap:"8px",sx:{pointerEvents:"none",height:{sm:"calc(100% - 32px)"},position:"absolute",right:"16px",top:"16px",maxWidth:"280px",flexDirection:{xs:"row",sm:"column"},justifyContent:{xs:"start",sm:"space-between"},alignItems:{xs:"start",sm:"end"}},children:[!(0,R.bN)()&&(0,y.jsx)(tA,{scale:k,onZoomIn:en,onZoomOut:ei}),(0,y.jsx)(tR,{ticketOptions:l})]}),m&&(0,y.jsx)(tj,{top:x,left:p,seat:u,handleSelectSeat:$})]})}var t8=n(1844),t7=n(36823),t9=n(27797);function ne(e){var t;let{events:n,currentEvent:i,onClickEvent:r,sx:l}=e,o=(0,E.A)(),{t:a}=(0,T.Bd)(),[s,c]=(0,f.useState)(!1),d=(0,f.useMemo)(()=>n.sort((e,t)=>new Date(e.event_started_at).getTime()-new Date(t.event_started_at).getTime()),[n]),u=e=>{let{product:t}=e,[n,l]=(0,f.useState)(!1),s=(0,y.jsx)(y.Fragment,{}),c={},d=!0;return t.product_uid===i?(s=(0,y.jsx)(B.A,{variant:"smallRegular",color:o.palette.text.tertiery,children:a("key_current_event")}),c={border:"1px solid ".concat(o.palette.border.subtitle)}):t.status===e0.yB.AVAILABLE||t.status===e0.yB.RUN_OUT_SOON?(s=(0,y.jsx)(t9.A,{sx:{width:"16px",height:"16px"}}),c={backgroundColor:o.palette.background.secondary},d=!1):(s=(0,y.jsx)(B.A,{variant:"smallRegular",color:o.palette.text.tertiery,children:a("".concat(eZ.bg[t.status]))}),c={backgroundColor:o.palette.background.tertiery}),(0,y.jsxs)(es.A,{id:"b-event-related-event-item-".concat(t.product_uid),justifyContent:"space-between",alignItems:"center",direction:"row",onClick:()=>{d||(l(!0),r(t))}
1,sx:{borderRadius:"6px",p:"12px",cursor:!d&&"pointer","-webkit-tap-highlight-color":"transparent",...c},children:[(0,y.jsx)(B.A,{variant:"normalRegular",color:d&&"".concat(o.palette.text.tertiery),children:t.label}),n?(0,y.jsx)(k.A,{size:18}):s]})};return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(es.A,{id:"b-event-show-related-events-drawer",justifyContent:"space-between",alignItems:"center",direction:"row",onClick:()=>c(!0),sx:{borderRadius:"6px",border:"1px solid ".concat(o.palette.border.subtitle),p:"12px",cursor:"pointer","-webkit-tap-highlight-color":"transparent",...l},children:[(0,y.jsx)(B.A,{variant:"normalRegular",children:(null==d||null==(t=d.find(e=>e.product_uid===i))?void 0:t.label)||a("key_current_event")}),(0,y.jsx)(B.A,{variant:"normalBold",color:o.palette.primary.main,children:a("key_view_more")})]}),(0,y.jsx)(t7.A,{title:a("otherEvents"),isOpen:s,onClose:()=>c(!1),children:(0,y.jsx)(es.A,{spacing:"8px",mb:"24px",children:null==d?void 0:d.map(e=>(0,y.jsx)(u,{product:e},e.product_uid))})})]})}var nt=n(89099);function nn(e){let{title:t,eventSummary:n,ticketOptions:i,relatedEvents:r,data:l,dataUpdatedAt:o,refetch:a,isFetching:s,isError:c,error:d,onBack:u,selectedSeats:p,setSelectedSeats:x,seatSelectionErrorMessage:m,queueSnackbar:h}=e,_=(0,E.A)(),{width:v,height:g,containerRef:b}=tu(),{height:A,containerRef:j}=tu(),w=(0,V.A)(_.breakpoints.up("sm")),{t:C}=(0,T.Bd)(),{query:S}=(0,nt.useRouter)(),{event_uid:I}=S,[D,F]=(0,f.useState)(!1),L=c||l.status===e0.YT.PROCESSING||l.status===e0.YT.INITIALIZING;return(0,f.useEffect)(()=>{if(s){let e=setTimeout(()=>{F(!0)},100);return()=>{clearTimeout(e),F(!1)}}},[s]),(0,f.useEffect)(()=>{m&&h({message:m,severity:"warning"})},[m,p]),(0,y.jsxs)(es.A,{gap:0,height:"100%",children:[(0,y.jsxs)(es.A,{ref:j,sx:{p:{xs:"16px 0px",sm:"16px 32px 8px 32px"},px:{xs:"16px"}},children:[(0,y.jsx)(B.A,{variant:w?"h3Desk":"mediumBold",sx:{color:_.palette.text.primary,lineBreak:"auto"},children:t}),(0,y.jsxs)(es.A,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[(0,y.jsxs)(es.A,{direction:"row",alignItems:"center",gap:1,children:[(0,y.jsxs)(B.A,{variant:"normalRegular",sx:{color:_.palette.text.secondary},children:[(0,ec.Ay)({date:null==n?void 0:n.event_started_at,format:"DD MMMM YYYY, HH:mm"})," "]}),(0,y.jsx)(eS.A,{orientation:"vertical",flexItem:!0,sx:{borderColor:_.palette.background.tertiery}}),(0,y.jsx)(B.A,{variant:"normalRegular",sx:{color:_.palette.text.secondary},children:null==n?void 0:n.location_venue}),(0,y.jsx)(es.A,{direction:"row",alignItems:"center"})]}),(0,y.jsx)(tv,{dataUpdatedAt:o,isLoading:s,refetch:async()=>{let{isError:e}=await a();e?h({message:C("key_select_seat_update_failed"),severity:"error"}):h({message:C("key_select_seat_update"),severity:"info"})}})]}),(null==r?void 0:r.length)>0&&(0,y.jsx)(ne,{events:r,currentEvent:I,onClickEvent:e=>{window.location.href="/event/".concat(e.product_uid,"?show_options=true")},sx:{my:"4px"}})]}),!s&&L?(0,y.jsx)(()=>{var e,t,n,i;let r,o;return c?(r=C("key_failed_load_seat_title"),o=C("key_failed_load_seat_desc")):(l.status===e0.YT.PROCESSING||l.status===e0.YT.INITIALIZING)&&(r=C("key_seat_update_title"),o=C("key_seat_update_desc")),(0,y.jsx)(tp,{onBack:u,children:(0,y.jsx)(es.A,{height:"100%",width:"100%",justifyContent:"center",alignItems:"center",sx:{top:"-4px",position:"absolute"},children:(0,y.jsxs)(es.A,{alignItems:"center",justifyContent:"center",sx:{maxWidth:{xs:"208px",md:"416px"},background:_.palette.background.primary,padding:"32px 16px",borderRadius:"8px"},gap:1,children:[(0,y.jsx)(B.A,{variant:"h4Desk",color:_.palette.text.primary,textAlign:"center",children:r}),(0,y.jsx)(B.A,{variant:"normalRegular",color:_.palette.text.secondary,textAlign:"center",children:o}),(null==d||null==(t=d.response)||null==(e=t.data)?void 0:e.requestId)&&(0,y.jsx)(t8.A,{id:null==d||null==(i=d.response)||null==(n=i.data)?void 0:n.requestId}),(0,y.jsx)(G.A,{buttonVariant:"filled",sx:{marginTop:"8px"},onClick:a,disabled:s,children:C("tryAgain")})]})})})},{}):D?(0,y.jsx)(tp,{onBack:u,children:(0,y.jsx)(k.A,{size:18})}):(0,y.jsx)(es.A,{ref:b,height:(()=>{let e=()=>{if(p.length)if(null==l?void 0:l.venue_url)return 138;else return 114;return(null==l?void 0:l.venue_url)?68:30};return w?"calc(100vh - ".concat(A+96,"px)"):(0,R.bN)()?"calc(100vh - ".concat(e()+A-30,"px)"):"calc(100vh - ".concat(e()+A+40,"px)")})(),children:(0,y.jsx)(t4,{width:v,height:g,onBack:u,data:l,ticketOptions:i,selectedSeats:p,onClickSeat:x,maxPurchasableQuota:null==n?void 0:n.max_purchasable_quota,queueSnackbar:h})})]})}var ni=n(46558),nr=n(1428);(0,K.Ay)(es.A)(e=>{let{source:t="",theme:n}=e;return{background:"url(".concat(t,")"),backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundSize:"cover",marginBottom:"24px",[n.breakpoints.up("xs")]:{borderRadius:"0px",height:"unset",aspectRatio:"16/9",marginLeft:"-18px",marginRight:"-18px"},[n.breakpoints.up("sm")]:{borderRadius:"12px",height:"300px",aspectRatio:"unset",marginLeft:"unset",marginRight:"unset"}}});let nl=(0,K.Ay)(F.A)(e=>{let{theme:t}=e;
1return{background:t.colors.hoverBackground,height:"100%",width:"100%",position:"absolute",opacity:"0",display:"flex",justifyContent:"center",alignItems:"center",transition:"0.1s",borderRadius:"8px"}}),no=(0,K.Ay)(D.A)(e=>{let{theme:t}=e;return{position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",display:"flex",flexDirection:"column",alignItems:"flex-end",margin:"auto 0",[t.breakpoints.down("sm")]:{top:"0%",transform:"translate(-50%, 0%)",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",borderRadius:"8px",img:{maxWidth:"100%"}}}}),na=e=>{let{source:t}=e,{t:n}=(0,T.Bd)(),[i,r]=(0,f.useState)(!1),l=(0,E.A)(),o=(0,V.A)(l.breakpoints.down("md"));return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(es.A,{id:"c-event-venue-map",sx:{width:"100%",aspectRatio:"344/311",background:l.palette.background.tertiery,borderRadius:"8px"},children:[(0,y.jsx)(es.A,{children:(0,y.jsx)(B.A,{sx:e=>({...e.typography.normalBold,color:e.palette.text.primary,padding:"16px 0px 16px 16px"}),children:n("eventSeatSelectionVenueLabel")})}),(0,y.jsxs)(es.A,{sx:{height:"100%",width:"100%",position:"relative",":hover":{div:{opacity:"100",cursor:"pointer"}}},children:[(0,y.jsx)(nl,{onClick:()=>r(!0),children:(0,y.jsx)(nr.A,{sx:e=>({color:e.palette.text.primary,width:"36px",height:"36px"})})}),(0,y.jsx)("img",{src:t,alt:"Venue Map",onError:e=>{let{currentTarget:t}=e;t.onerror=null,t.src="/img/placeholder/product_placeholder.jpg"},style:{borderRadius:"0px 0px 8px 8px",objectFit:"cover",height:"100%",maxHeight:o?"100%":"300px"}})]})]}),(0,y.jsx)(nc,{open:i,onClose:()=>r(!1),source:t})]})},ns=e=>{let{source:t}=e,[n,i]=(0,f.useState)(!1),r=(0,E.A)(),{t:l}=(0,T.Bd)();return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(G.A,{sx:{color:r.palette.text.primary,background:r.palette.background.primary,...r.typography.normalBold,":hover, :focus":{background:"inherit"},height:"40px"},onClick:()=>i(!0),children:[l("eventTicketSelectionSeeVenue"),(0,y.jsx)(eq.A,{color:"error"})]}),(0,y.jsx)(nc,{open:n,onClose:()=>i(!1),source:t})]})},nc=e=>{let{open:t,onClose:n,source:i}=e;return(0,y.jsx)(ni.A,{open:t,onClose:n,id:"c-event-venue-map-modal",children:(0,y.jsxs)(no,{children:[(0,y.jsx)(q.A,{id:"b-event-venue-map-close",onClick:n,sx:e=>({color:"white",margin:"0px -22px 0px 0px",[e.breakpoints.down("sm")]:{top:"0px",margin:"50px 8px 8px 0px"},":hover":{cursor:"pointer"},alignSelf:"flex-end"})}),(0,y.jsx)("img",{src:i,onError:e=>{let{currentTarget:t}=e;t.onerror=null,t.src="/img/placeholder/product_placeholder.jpg"},alt:"Venue Map",style:{borderRadius:"8px",width:"auto",maxWidth:"100%",height:"auto",maxHeight:"calc(100vh - 24px)"}})]})})};function nd(e){let{selectedSeats:t}=e,{t:n}=(0,T.Bd)(),i=(0,E.A)(),r=(0,f.useMemo)(()=>t.reduce((e,t)=>e+t.ticket.sale_price,0),[t]),l=(0,f.useMemo)(()=>t.map(e=>({id:e.id,title:e.ticket.title,label:e.label,ticket_option_uid:e.ticket.ticket_option_uid,color:e.ticket.color,sale_price:e.ticket.sale_price})).reduce(function(e,t){var n,i;return(null!=(i=e[n=t.title])?i:e[n]=[]).push(t),e},{}),[t]);return(0,y.jsxs)(y.Fragment,{children:[Object.keys(l).map(e=>{var t;let r=l[e],o=r.reduce((e,t)=>e+t.sale_price,0);return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(es.A,{gap:1,children:[(0,y.jsxs)(es.A,{direction:"row",alignItems:"center",children:[(0,y.jsx)(eF.A,{sx:{color:(null==(t=r[0])?void 0:t.color)||i.palette.seat.category4.main,width:"16px",height:"16px",mr:"4px"}}),(0,y.jsx)(B.A,{variant:"normalRegular",color:i.palette.text.primary,children:e})]}),(0,y.jsxs)(es.A,{direction:"row",justifyContent:"space-between",children:[(0,y.jsx)(B.A,{id:"c-seat-selection-num-selected-seats",variant:"normalRegular",sx:{color:i.palette.text.secondary},children:n("eventCartDetailModalEntryCount",{count:r.length})}),(0,y.jsx)(B.A,{id:"c-seat-selection-total-price",variant:"normalBold",sx:{color:i.palette.text.primary},children:(0,eI.A)(o)})]}),(0,y.jsxs)(es.A,{direction:"row",flexWrap:"wrap",gap:1,children:[r.map(e=>(0,y.jsx)(nx,{...e},e.id)),(0,y.jsx)(F.A,{sx:{marginBottom:"4px"},children:!r.length&&(0,y.jsx)(B.A,{variant:"smallRegular",sx:{color:i.palette.text.tertiery},children:n("eventCartDetailModalChosenSeat")})})]})]}),(0,y.jsx)(eS.A,{})]})}),(0,y.jsxs)(es.A,{direction:"row",justifyContent:"space-between",children:[(0,y.jsxs)(B.A,{id:"c-seat-selection-num-selected-seats",variant:"normalRegular",sx:{color:i.palette.text.secondary},children:[!!t.length&&"Total ",n("eventCartDetailModalEntryCount",{count:t.length})]}),(0,y.jsx)(B.A,{id:"c-seat-selection-total-price",variant:"normalBold",sx:{color:i.palette.text.primary},children:(0,eI.A)(r)})]}),!t.length&&(0,y.jsx)(B.A,{variant:"smallRegular",color:i.palette.text.secondary,children:n("eventCartDetailModalChosenSeat")})]})}function nu(e){let{selectedSeats:t,onBuyTicket:n,isDisablePaymentButton:i}=e,[r,l]=(0,f.useState)(!1),{t:o}=(0,T.Bd)(),a=(0,E.A)();return(0,y.jsxs)(es.A,{gap:2,sx:{paddingTop:"16px"},children:[(0,y.jsx)(B.A,{variant:"normalBold",sx:{color:a.palette.text.primary},children:o("eventParticipantFormScreenTitle")}),(0,y.jsx)(nd,{selectedSeats:t}
1),(0,y.jsx)(eH.A,{id:"b-seat-selection-purchase",disabled:i,buttonVariant:"filled",loading:r,sx:{borderRadius:"8px"},onClick:async()=>{l(!0),await n(),l(!1)},children:o("continueText")})]})}function np(e){let{selectedSeats:t,isDisablePaymentButton:n,onBuyTicket:i}=e,{t:r}=(0,T.Bd)(),l=(0,E.A)(),[o,a]=(0,f.useState)(!1),[s,c]=(0,f.useState)(!1),d=(0,f.useMemo)(()=>t.reduce((e,t)=>e+t.ticket.sale_price,0),[t]);return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(F.A,{children:!!t.length&&(0,y.jsx)(es.A,{gap:1.5,flex:1,mt:"8px",children:(0,y.jsxs)(es.A,{direction:"row",justifyContent:"space-between",children:[(0,y.jsxs)(es.A,{children:[(0,y.jsxs)(es.A,{direction:"row",alignItems:"center",mb:"2px",color:l.palette.text.secondary,onClick:()=>a(!0),children:[(0,y.jsx)(B.A,{variant:"smallRegular",color:l.palette.text.secondary,children:r("eventSeatSelectionSelectedTicketLabel",{n:t.length})}),(0,y.jsx)(tO.A,{sx:{height:"16px",width:"16px"}})]}),(0,y.jsx)(B.A,{variant:"h3",sx:{color:l.palette.text.primary},children:(0,eI.A)(d)})]}),(0,y.jsx)(eH.A,{id:"b-seat-selection-purchase",disabled:n,buttonVariant:"filled",loading:s,onClick:async()=>{c(!0),await i(),c(!1)},sx:{padding:"12px 16px",height:"44px",minWidth:"164px"},children:r("continueText")})]})})}),(0,y.jsx)(H.A,{open:o,title:r("eventParticipantFormScreenTitle"),onClose:()=>a(!1),children:(0,y.jsx)(es.A,{gap:2,children:(0,y.jsx)(nd,{selectedSeats:t})})})]})}function nx(e){let{label:t}=e,n=(0,E.A)(),i=(0,V.A)(n.breakpoints.up("sm"));return(0,y.jsx)(es.A,{id:"c-seat-selection-order-selected-seat",justifyContent:"center",sx:{borderRadius:"6px",minWidth:"32px",height:i?"28px":"24px",textAlign:"center",border:"1px solid ".concat(n.palette.border.subtitle),p:"8px 4px"},children:(0,y.jsx)(B.A,{variant:"smallBold",color:n.palette.text.primary,children:t})})}var nm=n(85305),nh=n(42252),n_=n(65355),nv=n(7766),ng=n.n(nv),ny=n(90753),nf=n(84059);let nb=(e,t)=>{let{setEventDetail:n}=(0,n_._v)(e=>({setEventDetail:e.setEventDetail}));return(0,nh.I)({queryKey:["eventDetail"],queryFn:async()=>{try{let n=await (0,ny.YV)(e,t);return ng()(n,"data.data",[])}catch(e){throw(0,nf.ll)(e),e}},enabled:!1,retry:!1,onSuccess:e=>n(e)})},nA=(e,t,n)=>{let{setEventUserDetail:i}=(0,n_._v)(e=>({setEventUserDetail:e.setEventUserDetail}));return(0,nh.I)({queryKey:["eventDetailUser"],queryFn:async()=>{try{let i=await (0,ny.$E)(e,t,n);return ng()(i,"data.data",[])}catch(e){throw(0,nf.ll)(e),e}},enabled:!1,retry:!1,onSuccess:e=>i(e)})},nk=e=>(0,nh.I)({queryKey:["eventTransactionStatus"],queryFn:async()=>{try{let t=await (0,ny.Gw)(e);return ng()(t,"data",[])}catch(e){throw(0,nf.ll)(e),e}},enabled:!1,retry:!1}),nj=e=>{let{productEventUid:t,enabled:n=!0}=e;return(0,nh.I)({queryKey:["seatLayout-".concat(t)],queryFn:async()=>{let e=await (0,ny.C6)(t);return ng()(e,"data.data",[])},enabled:n,retry:!1,refetchOnWindowFocus:!1})};var nw=n(72420),nC=n(11806);let nS=(e,t)=>{let n=!0,i=!0,r=!0,l=(e,n)=>t.find(t=>t.seat_column===(null==e?void 0:e.seat_column)+n&&t.seat_row===(null==e?void 0:e.seat_row)),o=nI(e),a=nI(t);Object.keys(o).forEach(e=>{let t=o[e].sort((e,t)=>e.seat_column-t.seat_column),s=t[0],c=t[t.length-1],d=null;t.forEach(t=>{let o=t.seat_column;for(let t=null!==d?d+1:o;t<o;t++)2===a[e][t].status&&(r=!1,n=!1);d=o;let u=l(s,-1),p=l(u,-1),x=l(c,1),m=l(x,1);(null==u?void 0:u.status)===2&&(null==x?void 0:x.status)===2&&((null==p?void 0:p.status)!==2||(null==m?void 0:m.status)!==2)&&(r=!1,i=!1)})});let s="";return i||(s=(0,nC.t)("eventSeatSelectionAlertLeavingOneSeat")),n||(s=(0,nC.t)("eventSeatSelectionAlertSkippingSeats")),{isValid:r,errorMessage:s}},nI=e=>e.reduce((e,t)=>{let n=t.seat_row;return e[n]=(e[n]||[]).concat(t),e},{});var nE=n(23348),nT=n(29675);function nD(e){let{productEventUid:t,title:n,eventSummary:i,relatedEvents:r,ticketOptions:l,setShowSeatSelection:o,onBuyTicket:a,fetchProductEventDetail:s,isFetchingProductEventDetail:c,trackerData:d={}}=e,{selectedSeats:u,setSelectedSeats:p,setBookingError:x}=(0,n_._v)(e=>({selectedSeats:e.selectedSeats,setSelectedSeats:e.setSelectedSeats,setBookingError:e.setBookingError})),m=(0,E.A)(),h=(0,V.A)(m.breakpoints.up("sm")),{data:_,dataUpdatedAt:v,isFetching:g,isError:b,error:A,refetch:k}=nj({productEventUid:t}),{isSnackbarOpen:w,snackbarMessage:C,queueSnackbar:S,closeSnackbar:I}=(0,nw.A)(),T=null==_?void 0:_.rules.find(e=>"ADJACENT_SEATS"===e),B=(null==_?void 0:_.status)==="ACTIVE",F=c||g,L=(0,f.useMemo)(()=>{let e=[];
1return(null==_?void 0:_.zones)&&(null==_||_.zones.map(t=>{t.rows.map(t=>{t.seats.map((n,i)=>{n.seat_row=t.id,n.seat_column=i,e.push(n)})})})),e},[_]),{isValid:O,errorMessage:M}=T?nS(u,null!=L?L:[]):{isValid:!0,errorMessage:""},P=!u.length||!B||!O;async function N(){if(d){let e={...d};delete e.source,delete e.source_action,(0,nE.sx)("confirm_eticket_seat_selection",{...e,state_name:"ETICKET_SEAT_SELECTION",event_quantity:u.length})}try{await a(u)}catch(t){let{data:e}=await k();q({data:e,showError:!1})}window.scrollTo(0,0)}let z=(0,f.useCallback)(()=>(o(!1),(0,nT.Pk)("show_options"),!0),[]),q=e=>{let{data:t,showError:n}=e;if(u.length){let e=[...u],i=e.map(e=>e.id);t.zones.map(t=>{t.rows.map(t=>{t.seats.map(t=>{i.indexOf(t.id)>-1&&t.status!==e0.G1.AVAILABLE&&(e=e.filter(e=>e.id!==t.id),n&&x({show:!0,code:"INVALID_ALREADY_BOOK"}))})})}),p(e)}};return(0,f.useEffect)(()=>{let e=e=>({handled:z()});return R.vz.on("deviceBackButtonPressed",e),()=>{R.vz.off("deviceBackButtonPressed",e)}},[z]),(0,f.useEffect)(()=>{d&&(0,nE.sx)("visit_eticket_seat_selection",{...d,state_name:"ETICKET_SEAT_SELECTION"})},[]),(0,y.jsxs)(D.A,{container:!0,sx:{marginX:"auto",minHeight:(0,R.bN)()&&"100vh"},children:[(0,y.jsxs)(D.A,{item:!0,width:{xs:"100%",md:"calc(100% - 400px)"},children:[(0,y.jsx)(nm.A,{open:w,autoHideDuration:3e3,onClose:I,anchorOrigin:{vertical:"top",horizontal:"center"},children:(0,y.jsx)(j.A,{onClose:I,severity:C.severity,variant:"filled",sx:{width:"100%"},children:C.message})}),(0,y.jsx)(es.A,{position:"relative",sx:h?{height:"auto",width:"100%"}:{height:"auto",width:"auto"},children:F?(0,y.jsx)(tx,{onBack:z}):(0,y.jsx)(nn,{title:n,data:_,eventSummary:i,ticketOptions:l,relatedEvents:r,dataUpdatedAt:v,isFetching:g,isError:b,error:A,refetch:async()=>{await s();let e=await k();return q({data:e.data,showError:!0}),e},onBack:z,selectedSeats:u,queueSnackbar:S,setSelectedSeats:p,seatSelectionErrorMessage:M})})]}),h&&(0,y.jsx)(D.A,{item:!0,width:{sm:"385px",xs:"100%"},sx:{borderLeft:"1px solid ".concat(m.palette.background.tertiery),pl:"24px"},children:(0,y.jsxs)(es.A,{justifyContent:"space-between",height:"100%",pb:"16px",children:[(0,y.jsx)(es.A,{mb:"200px",children:F?(0,y.jsx)(tm,{}):(0,y.jsx)(nu,{selectedSeats:u,isDisablePaymentButton:P,onBuyTicket:N})}),(null==_?void 0:_.venue_url)&&(0,y.jsx)(es.A,{children:F?(0,y.jsx)(th,{}):(0,y.jsx)(na,{source:null==_?void 0:_.venue_url})})]})}),!h&&(0,y.jsx)(y.Fragment,{children:(0,y.jsxs)(es.A,{sx:{zIndex:999,position:"fixed",bottom:0,left:0,width:"100%",background:{xs:m.palette.background.primary,md:m.palette.background.secondary},padding:u.length?"16px":"0px",paddingTop:(null==_?void 0:_.venue_url)||!u.length?"0px":"16px",boxShadow:{xs:"0px 0px 24px 0px ".concat(m.palette.border.subtitle),md:"none"}},children:[(null==_?void 0:_.venue_url)&&(0,y.jsx)(ns,{source:null==_?void 0:_.venue_url}),(0,y.jsx)(np,{selectedSeats:u,isDisablePaymentButton:P,onBuyTicket:N})]})})]})}function nB(e){let{onOpen:t,top:n=0}=e,{t:i}=(0,T.Bd)(),r=(0,E.A)();return(0,y.jsx)(F.A,{sx:{position:"sticky",top:n,zIndex:10,backgroundColor:r.palette.common.white,border:"1px solid ".concat(r.palette.divider),borderRadius:"8px",px:"16px",height:"44px",mb:"16px",display:"flex",alignItems:"center"},children:(0,y.jsxs)(es.A,{direction:"row",justifyContent:"space-between",alignItems:"center",sx:{width:"100%"},children:[(0,y.jsx)(B.A,{variant:"mediumBold",sx:{color:r.palette.text.secondary},children:i("ticketSectionTitle")}),(0,y.jsx)(X.A,{id:"b-sticky-section-bar-open",buttonVariant:"nude",sx:{padding:0,minWidth:0},onClick:t,children:(0,y.jsx)(B.A,{variant:"normalBold",sx:{color:r.palette.primary.main},children:i("chooseButton")})})]})})}var nF=n(71538);function nL(e){let{icon:t,id:n,label:i,onSelect:r}=e,l=(0,E.A)();return(0,y.jsxs)(es.A,{id:n,role:"button",tabIndex:0,direction:"row",justifyContent:"space-between",alignItems:"center",sx:{py:"12px",cursor:"pointer",outline:"none","&:focus-visible":{outline:"2px solid ".concat(l.palette.primary.main),outlineOffset:"2px",borderRadius:"4px"}},onClick:r,onKeyDown:e=>
1{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),r())},children:[(0,y.jsxs)(es.A,{direction:"row",alignItems:"center",gap:1,children:[t,(0,y.jsx)(B.A,{variant:"mediumBold",children:i})]}),(0,y.jsx)(eq.A,{sx:{color:l.palette.primary.main}})]})}function nO(e){var t,n;let{open:i,onClose:r,groups:l,onSelectSection:o,onSelectAll:a}=e,{t:s}=(0,T.Bd)(),c=(0,E.A)(),d=(null==(t=l[0])?void 0:t.section)===null&&(null==(n=l[0])?void 0:n.tickets.length)>0,u=(0,f.useMemo)(()=>l.filter(e=>null!==e.section),[l]),p=e=>{o(e),r()};return(0,y.jsxs)(t7.A,{isOpen:i,onClose:r,title:s("ticketSectionPickerTitle"),closeButtonId:"b-section-picker-close",children:[d&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(nL,{id:"b-event-section-picker-all",label:s("ticketSectionAll"),onSelect:()=>{a(),r()}}),u.length>0&&(0,y.jsx)(nF.A,{})]}),u.map((e,t)=>(0,y.jsxs)(f.Fragment,{children:[(0,y.jsx)(nL,{icon:(0,y.jsx)(eF.A,{sx:{fontSize:"20px",color:c.palette.text.tertiery}}),label:e.section.title,id:"b-event-section-picker-".concat(e.section.ticket_option_uid),onSelect:()=>p(e.section.ticket_option_uid)}),t<u.length-1&&(0,y.jsx)(nF.A,{})]},e.section.ticket_option_uid))]})}var nR=n(40625);function nM(){let e=(0,E.A)(),t=t=>{let{width:n,sx:i}=t;return(0,y.jsx)(to.A,{variant:"rectangular",height:"100%",width:n||"100%",sx:{backgroundColor:e.palette.grey[300],borderRadius:"12px",...i}})};return(0,y.jsx)(y.Fragment,{children:Array.from([,,,]).map((n,i)=>(0,y.jsx)(es.A,{height:"100%",sx:{padding:{xs:"0px 8px",sm:"0px"}},children:(0,y.jsxs)(es.A,{p:{xs:"16px",sm:"24px"},mb:"16px",sx:{backgroundColor:e.palette.background.tertiery,borderRadius:"12px"},children:[(0,y.jsx)(es.A,{height:"26px",mb:"16px",children:(0,y.jsx)(t,{width:"102px"})}),(0,y.jsx)(es.A,{height:"16px",mb:"16px",children:(0,y.jsx)(t,{width:{xs:"297px",sm:"380px"}})}),(0,y.jsx)(es.A,{height:"16px",children:(0,y.jsx)(t,{width:"182px"})})]})},i))})}let nP=(0,K.Ay)(es.A)(e=>{let{source:t="",theme:n}=e;return{background:"url(".concat(t,")"),backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundSize:"cover",marginBottom:"24px",[n.breakpoints.up("xs")]:{borderRadius:"0px",height:"unset",aspectRatio:"16/9",width:"calc(100% + 32px)",marginLeft:"-16px"},[n.breakpoints.up("sm")]:{borderRadius:"12px",height:"300px",aspectRatio:"unset",marginLeft:"unset",marginRight:"unset",width:"100%"}}}),nN=(0,K.Ay)(F.A)(e=>{let{theme:t}=e;return{background:t.colors.hoverBackground,height:"100%",width:"100%",position:"absolute",opacity:"0",display:"flex",justifyContent:"center",alignItems:"center",transition:"0.1s",borderRadius:"8px"}}),nV=(0,K.Ay)(D.A)(e=>{let{theme:t}=e;return{position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",display:"flex",flexDirection:"column",alignItems:"flex-end",margin:"auto 0",[t.breakpoints.down("sm")]:{top:"0%",transform:"translate(-50%, 0%)",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",borderRadius:"8px",img:{maxWidth:"100%"}}}}),nz=e=>{let{source:t}=e,{t:n}=(0,T.Bd)(),[i,r]=(0,f.useState)(!1),l=(0,E.A)(),o=(0,V.A)(l.breakpoints.down("md"));return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(es.A,{id:"c-event-venue-map",sx:{width:"100%",aspectRatio:"344/311",background:l.palette.background.tertiery,borderRadius:"8px"},children:[(0,y.jsx)(es.A,{children:(0,y.jsx)(B.A,{sx:e=>({...e.typography.normalBold,color:e.palette.text.primary,padding:"16px 0px 16px 16px"}),children:n("eventSeatSelectionVenueLabel")})}),(0,y.jsxs)(es.A,{sx:{height:"100%",width:"100%",position:"relative",":hover":{div:{opacity:"100",cursor:"pointer"}}},children:[(0,y.jsx)(nN,{onClick:()=>r(!0),children:(0,y.jsx)(nr.A,{sx:e=>({color:e.palette.text.primary,width:"36px",height:"36px"})})}),(0,y.jsx)("img",{src:t,alt:"Venue Map",onError:e=>{let{currentTarget:t}=e;t.onerror=null,t.src="/img/placeholder/product_placeholder.jpg"},style:{borderRadius:"0px 0px 8px 8px",objectFit:"cover",height:"100%",maxHeight:o?"100%":"300px"}})]})]}),(0,y.jsx)(nW,{open:i,onClose:()=>r(!1),source:t})]})},nq=e=>{let{source:t}=e,[n,i]=(0,f.useState)(!1),r=(0,E.A)(),{t:l}=(0,T.Bd)();return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(G.A,{sx:{color:r.palette.text.primary,background:r.palette.background.primary,...r.typography.normalBold,":hover, :focus":{background:"inherit"},height:"40px"},onClick:()=>i(!0),children:[l("eventTicketSelectionSeeVenue"),(0,y.jsx)(eq.A,{color:"error"})]}),(0,y.jsx)(nW,{open:n,onClose:()=>i(!1),source:t})]})},nU=e=>{let{source:t}=e,[n,i]=(0,f.useState)(!1);return(0,y.jsxs)(nP,{source:t,children:[(0,y.jsx)(es.A,{sx:{borderRadius:"12px",backdropFilter:"blur(10px)","-webkit-background-filter":"blur(10px)",height:"100%",width:"100%"},children:(0,y.jsxs)(es.A,{sx:{position:"relative",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",width:"100%",":hover":{div
1:{opacity:"100",cursor:"pointer"}}},children:[(0,y.jsx)(nN,{onClick:()=>i(!0),children:(0,y.jsx)(nr.A,{sx:e=>({color:e.palette.text.primary,width:"36px",height:"36px"})})}),(0,y.jsx)("img",{src:t,onError:e=>{let{currentTarget:t}=e;t.onerror=null,t.src="/img/placeholder/product_placeholder.jpg"},alt:"Venue Map",style:{maxHeight:"100%",maxWidth:"100%"}})]})}),(0,y.jsx)(nW,{open:n,onClose:()=>i(!1),source:t})]})},nW=e=>{let{open:t,onClose:n,source:i}=e;return(0,y.jsx)(ni.A,{open:t,onClose:n,id:"c-event-venue-map-modal",children:(0,y.jsxs)(nV,{children:[(0,y.jsx)(q.A,{id:"b-event-venue-map-close",onClick:n,sx:e=>({color:"white",margin:"0px -22px 0px 0px",[e.breakpoints.down("sm")]:{top:"0px",margin:"50px 8px 8px 0px"},":hover":{cursor:"pointer"},alignSelf:"flex-end"})}),(0,y.jsx)("img",{src:i,onError:e=>{let{currentTarget:t}=e;t.onerror=null,t.src="/img/placeholder/product_placeholder.jpg"},alt:"Venue Map",style:{borderRadius:"8px",width:"auto",maxWidth:"100%",height:"auto",maxHeight:"calc(100vh - 24px)"}})]})})};var nH=n(80330);function nG(e){let{price:t,onClick:n,sx:i}=e,{t:r}=(0,T.Bd)(),l=(0,E.A)();return(0,y.jsx)(F.A,{id:"b-saving-price-chip",onClick:n,sx:{width:"fit-content",...i},children:(0,y.jsx)(nH.A,{sx:{backgroundColor:l.palette.success.main,height:"auto",padding:"2px 0px",borderRadius:"6px","& .MuiChip-label":{display:"block",whiteSpace:"normal",padding:"2px 6px"},cursor:n?"pointer":"unset"},label:(0,y.jsxs)(es.A,{direction:"row",alignItems:"center",children:[(0,y.jsxs)(B.A,{variant:"smallRegular",sx:{mb:"-1px",color:"white"},children:[r("key_save_discount")," ",(0,y.jsx)("b",{children:(0,eI.A)(t)})]}),n&&(0,y.jsx)(ep.A,{sx:{color:l.palette.success.light,width:"12px",height:"12px",ml:"4px"}})]})})})}function nY(e){let{numTicketsSelected:t,maxPurchaseableQuota:n,setNumTicketsSelected:i,isMaxQuantityPerUser:r,trackEventHandler:l,option:o}=e,a=t===n||r;return(0,y.jsxs)(es.A,{direction:"row",alignItems:"center",children:[(0,y.jsx)(eO.A,{id:"b-event-ticket-option-decrease-quantity-".concat(o.title),size:"small",sx:e=>({width:"32px",height:"32px",borderRadius:"12px",border:"1px solid ".concat(e.palette.tiptip[500])}),onClick:()=>{l("click_add_ticket_quantity"),i(t-1)},children:(0,y.jsx)(eM.A,{fontSize:"small",sx:e=>({color:e.palette.text.primary})})}),(0,y.jsx)(B.A,{variant:"mediumRegular",sx:e=>({width:"32px",color:e.palette.text.primary,textAlign:"center"}),children:t}),(0,y.jsx)(eO.A,{id:"b-event-ticket-option-increase-quantity-".concat(o.title),size:"small",disabled:a,sx:e=>({width:"32px",height:"32px",borderRadius:"12px",border:"1px solid ".concat(a?e.palette.text.tertiery:e.palette.tiptip[500])}),onClick:()=>{l("click_deduct_ticket_quantity"),i(t+1)},children:(0,y.jsx)(eR.A,{fontSize:"small",sx:e=>({color:e.palette.text.primary})})})]})}function nK(e){var t,n,i;let{option:r,ticketCounter:l,setTicketCounter:o,maxQuantityPerUser:a,isSaleEnded:s,isSaleStarted:c,setCalendarAttraction:d,isAttraction:u,isCreator:p,selectedAttractionDate:x}=e,{t:m}=(0,T.Bd)(),h=(0,E.A)(),_=(0,K.Ay)(G.A)({":disabled":{backgroundColor:h.palette.background.secondary}}),v=null!=(i=null==r||null==(n=r.ticket_schedules)||null==(t=n[0])?void 0:t.min_purchasable_quota)?i:1,g=()=>{if(u&&(0,e$.A)(x))d({show:!0,ticket_option_uid:r.ticket_option_uid});else{var e,t;o({...l,[r.ticket_option_uid]:{...l[r.ticket_option_uid],qty:(null==r||null==(t=r.ticket_schedules)||null==(e=t[0])?void 0:e.min_purchasable_quota)||1}})}};if(!s&&r.status===e0.yB.AVAILABLE||!s&&r.status===e0.yB.RUN_OUT_SOON||c&&r.status===e0.yB.COMING_SOON)return(0,y.jsx)(_,{id:"b-event-ticket-action-available-".concat(null==r?void 0:r.title),disabled:e2(l)+v>a||e2(l)===a,onClick:g,sx:{minWidth:"96px",":disabled":{backgroundColor:h.palette.grey[300]}},children:u&&(0,e$.A)(x)?m("chooseButton"):(0,y.jsxs)(y.Fragment,{children:[m("eventTicketItemAddButton"),(0,y.jsx)(eR.A,{sx:{width:"20px",height:"20px",ml:"2px"}})]})});if(r.status===e0.yB.COMING_SOON)return(0,y.jsx)(_,{id:"b-event-ticket-action-coming-soon",disabled:!p,onClick:g,children:m(p?"eventTicketItemAddButton":"eventTicketComingSoonStatus")});if(r.status===e0.yB.SOLD_OUT)return(0,y.jsx)(_,{id:"b-event-ticket-action-sold-out",disabled:!0,children:m("eventLabelSoldOut")});if(r.status===e0.yB.FULLY_BOOKED)return(0,y.jsx)(_,{id:"b-event-ticket-action-fully-booked",disabled:!0,children:m("eventDetailsBuyTicketFullyBooked")});if(r.status===e0.yB.SALE_ENDED||s)return(0,y.jsx)(_,{id:"b-event-ticket-action-sale-ended",disabled:!0,children:m("eventLabelSalesEnded")});return null}let nQ=G.A;function nX(e){let{label:t,url:n,backgroundColor:i,textColor:r,onClick:l}=e;
1return(0,y.jsx)(nQ,{component:"a",href:n,target:"_blank",rel:"noopener noreferrer",id:"b-event-ticket-action-custom-cta",onClick:l,sx:{minWidth:"96px",...i&&{backgroundColor:i,":hover":{backgroundColor:i},":focus":{backgroundColor:i}},...r&&{color:r}},children:t})}let nZ=function(e){var t;let{open:n,ticketBundle:i,onClose:r}=e,{t:l}=(0,T.Bd)(),o=(0,E.A)();return(0,y.jsx)(t7.A,{isOpen:n,title:l("key_bundle"),onClose:r,children:(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(B.A,{variant:"normalRegular",sx:e=>({color:e.palette.text.secondary}),children:l("key_bundle_detail_benefit")}),(0,y.jsx)(B.A,{sx:{...o.typography.normalBold,mb:"8px",mt:"16px"},children:i.title}),null==i||null==(t=i.ticket_bundling)?void 0:t.map((e,t)=>(0,y.jsx)(es.A,{mt:"4px",mb:"4px",children:(0,y.jsxs)(es.A,{direction:"row",justifyContent:"space-between",children:[(0,y.jsxs)(es.A,{direction:"row",alignItems:"center",children:[(0,y.jsx)(eF.A,{sx:{color:o.palette.tiptip[300],height:"16px",width:"16px",mr:"4px"}}),(0,y.jsxs)(B.A,{variant:"normalRegular",sx:{color:o.palette.text.secondary},children:[e.qty," x ",e.name]})]}),(0,y.jsx)(B.A,{variant:"normalBold",sx:{color:o.palette.text.secondary},children:(0,eI.A)(e.qty*e.price)})]})},t)),(0,y.jsx)(eS.A,{sx:{mt:"8px"}}),(0,y.jsxs)(es.A,{direction:"row",justifyContent:"space-between",my:"8px",children:[(0,y.jsx)(B.A,{variant:"normalRegular",sx:{color:o.palette.text.secondary},children:l("key_total_value")}),(0,y.jsx)(B.A,{variant:"normalBold",sx:{color:o.palette.text.secondary,textDecoration:"line-through"},children:(0,eI.A)(i.before_bundling_price)})]}),(0,y.jsx)(eS.A,{}),(0,y.jsxs)(es.A,{direction:"row",justifyContent:"space-between",my:"10px",children:[(0,y.jsx)(B.A,{variant:"normalBold",sx:{color:o.palette.text.secondary},children:l("key_bundle_price")}),(0,y.jsxs)(es.A,{alignItems:"end",children:[(0,y.jsx)(B.A,{variant:"mediumBold",sx:{color:o.palette.text.primary},children:(0,eI.A)(i.sale_price)}),i.saving_price>0&&(0,y.jsx)(nG,{price:i.saving_price,sx:{mt:"6px"}})]})]})]})})};var n$=n(8578),nJ=n(76626);function n0(e){let{tabs:t,selectedTab:n,setSelectedTab:i}=e,r=(0,E.A)();return(0,y.jsx)(n$.A,{variant:"scrollable",value:n,onChange:(e,t)=>
1i(t),sx:{"& .MuiTabs-indicator":{display:"none"}},children:t.map((e,t)=>(0,y.jsx)(nJ.A,{sx:{minHeight:"unset",justifyContent:"center",border:"1px solid ".concat(r.palette.tiptip[500]),borderRadius:"22px",color:r.palette.tiptip[500],padding:"8px 12px",pt:"9px",fontWeight:"normal",marginLeft:t>0&&"12px","&.Mui-selected":{color:"white",fontWeight:"bold",backgroundColor:r.palette.tiptip[300]}},iconPosition:"start",label:e,value:e},t))})}let n1=e=>{let{children:t,borderColor:n}=e;return(0,y.jsxs)(es.A,{position:"relative",children:[(0,y.jsx)(F.A,{sx:{position:"absolute",left:"-25px",top:"calc(50% - 13px)",width:"12px",height:"26px",backgroundColor:"white",borderRadius:"0px 18px 18px 0px",border:"1px solid ".concat(n),borderLeft:"none"}}),t,(0,y.jsx)(F.A,{sx:{position:"absolute",right:"-25px",top:"calc(50% - 13px)",width:"12px",height:"26px",backgroundColor:"white",borderRadius:"18px 0px 0px 18px",border:"1px solid ".concat(n),borderRight:"none"}})]})};function n2(e){return(0,eJ.EP)(e.option)?null:(0,y.jsx)(n5,{...e})}function n5(e){var t,n,i,r,l,o,a,s,c;let{option:d,ticketCounter:u,setTicketCounter:p,maxQuantityPerUser:x,showPurchasableQuota:m,trackEventHandler:h,isAttraction:_,isCreator:v,ctaConfig:g}=e,[b,A]=(0,f.useState)(!1),[k,j]=(0,f.useState)(!1),[w,C]=(0,f.useState)(null),[S,I]=(0,f.useState)(!1),D=new Date(d.sales_started_at||null),L=new Date(d.sales_ended_at),R=(0,E.A)(),{t:M}=(0,T.Bd)(),P=(0,V.A)(R.breakpoints.up("sm")),{setCalendarAttraction:N,selectedAttractionDate:z}=(0,n_._v)(e=>({setCalendarAttraction:e.setCalendarAttraction,selectedAttractionDate:e.selectedAttractionDate}));(0,f.useEffect)(()=>{let e=new Date;A(e>D),j(e>L);let t=setInterval(()=>{let e=new Date;A(e>D),j(e>L)},1e3);return()=>clearInterval(t)},[]);let q=d.status===e0.yB.SOLD_OUT,U=d.status===e0.yB.AVAILABLE&&!k||d.status===e0.yB.RUN_OUT_SOON&&!k||d.status===e0.yB.COMING_SOON&&b,H=(null==(t=u[d.ticket_option_uid])?void 0:t.qty)>0,G=(null==g?void 0:g.button)&&U?g.button:null,Y=H?R.palette.tiptip[50032]:R.palette.border.minimal,K=(null==(n=d.ticket_type)?void 0:n.id)===e0.a2.BUNDLING,Q=null!=(c=null==(i=d.ticket_bundling)?void 0:i.reduce((e,t)=>e+t.qty,0))?c:0,X=()=>(0,y.jsx)(eS.A,{sx:{borderStyle:"dashed",my:"16px",borderColor:Y}});return(0,y.jsxs)(y.Fragment,{children:[K&&(0,y.jsx)(es.A,{direction:"row",sx:{background:"#6864e4",backgroundImage:"url(".concat(O.A.assetBaseUrl,"/ticket-option-group.svg)"),backgroundRepeat:"no-repeat",backgroundPosition:"right 20px top 4px",borderRadius:"12px 12px 0px 0px",marginBottom:"-12px",padding:"4px 16px 16px 16px"},children:(0,y.jsxs)(es.A,{id:"b-event-ticket-option-bundle-detail-".concat(d.ticket_option_uid),direction:"row",alignItems:"center",onClick:()=>I(!0),sx:{cursor:"pointer"},children:[(0,y.jsx)(B.A,{color:R.palette.orange[300],variant:"smallBold",sx:{mt:"2px"},children:M("key_bundle")}),(0,y.jsx)(B.A,{color:R.palette.secondary.main,variant:"smallRegular",sx:{mt:"2px",ml:"3px"},children:" - ".concat(M("eventCartDetailModalEntryCount",{count:Q}))}),(0,y.jsx)(ep.A,{sx:{color:R.palette.info.light,weight:"12px",height:"12px"}})]})}),(0,y.jsxs)(es.A,{id:"c-event-ticket-option-container",sx:{backgroundColor:H?R.palette.tiptip[100]:R.palette.background.secondary,border:"1px solid ".concat(Y),padding:"18px 24px",borderRadius:"12px",mb:"16px"},children:[(0,y.jsxs)(es.A,{direction:"row",justifyContent:"space-between",display:!P&&"grid",children:[(0,y.jsx)(B.A,{id:"c-event-ticket-option-name-label",variant:"h4Desk",sx:{color:q&&R.palette.text.tertiery,order:P?1:2,wordBreak:"break-word",overflowWrap:"break-word"},children:d.title}),d.trend_status&&(0,y.jsx)(F.A,{sx:{order:P?2:1,borderRadius:"8px",background:R.palette.info.main,color:"white",...R.typography.smallBold,p:"5px 8px",width:"fit-content",mb:!P&&"4px"},children:d.trend_status})]}),K&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(B.A,{variant:"smallRegular",sx:{color:R.palette.text.tertiery,mt:"8px"},children:M("key_ticket_included")}),(0,y.jsx)(es.A,{mt:"4px",direction:{xs:"column",md:"row"},sx:{flexWrap:"wrap"},rowGap:"8px",spacing:{xs:"0px",md:"16px"},children:d.ticket_bundling.map((e,t)=>(0,y.jsxs)(es.A,{direction:"row",alignItems:"center",children:[(0,y.jsx)(eF.A,{sx:{color:R.palette.icon.tertiery,height:"16px",width:"16px",mr:"4px"}}),(0,y.jsx)(B.A,{variant:"smallRegular",sx:{color:R.palette.text.secondary},children:e.name})]},t))})]}),(0,y.jsx)(B.A,{id:"c-event-ticket-option-description-label",variant:"normalRegular",sx:{wordBreak:"break-word"},children:(0,W.Ay)(d.desc||"")}),d.status!==e0.yB.SOLD_OUT?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(X,{}),(0,y.jsx)(n1,{borderColor:Y,children:(0,y.jsx)(eC,{saleEndTime:L,saleStartTime:D,isTicketOption:!0})}),(0,y.jsx)(X,{})]}):(0,y.jsx)(n1,{borderColor:Y,children:(0,y.jsx)(X,{})}),H&&d.visit_time&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(n0,{tabs:d.visit_time,selectedTab:w,setSelectedTab:e=>{C(e),p({...u,[d.ticket_option_uid]:{...u[d.ticket_option_uid],visit_time:e}})}}),(0,y.jsx)(X,{})]}),!(null==g?void 0:g.hidePrice)&&d.saving_price>0&&(0,y.jsx)(nG,{price:d.saving_price,onClick:()=>I(!0),sx:{my:"4px"}}),(0,y.jsxs)(es.A,{direction:"row",justifyContent:"space-between",children:[!(null==g?void 0:g.hidePrice)&&(0,y.jsx)(eB,{priceId:"c-event-ticket-option-price-label",salePriceId:"c-event-ticket-option-sale-price-label",showTitle:!1,salePrice:d.sale_price,price:K?d.before_bundling_price:d.price,disabled:q}),(0,y.jsx)(es.A,{sx:{marginLeft:"auto"},children:G?(0,y.jsx)(nX,{label:G.label,url:G.url,backgroundColor:G.backgroundColor,textColor:G.textColor,onClick:()=>{h("click_ticket_custom_cta",{ticket_option_uid:d.ticket_option_uid,url:G.url})}}):H?(0,y.jsx)(nY,{maxPurchaseableQuota:d.ticket_schedules[0].purchasable_quota,numTicketsSelected:null==(r=u[d.ticket_option_uid])?void 0:r.qty,setNumTicketsSelected:e=>{let t=e<d.ticket_schedules[0].min_purchasable_quota;p({...u,[d.ticket_option_uid]:{...u[d.ticket_option_uid],qty:t?0:e,visit_time:w}})},isMaxQuantityPerUser:Object.keys(u).reduce((e,t)=>
1e+u[t].qty,0)===x,trackEventHandler:h,option:d}):(0,y.jsx)(nK,{option:d,ticketCounter:u,setTicketCounter:e=>{!w&&d.visit_time?(C(d.visit_time[0]),p({...e,[d.ticket_option_uid]:{...e[d.ticket_option_uid],visit_time:d.visit_time[0]}})):p(e)},maxQuantityPerUser:x,isSaleEnded:k,isSaleStarted:b,setCalendarAttraction:N,isAttraction:_,selectedAttractionDate:z.date,isCreator:v})})]}),(null==d||null==(o=d.ticket_schedules)||null==(l=o[0])?void 0:l.min_purchasable_quota)>1&&(0,y.jsxs)(es.A,{direction:"row",alignItems:"center",spacing:{xs:.5,md:1},children:[(0,y.jsx)(ep.A,{sx:{color:R.palette.info.main,fontSize:"16px"}}),(0,y.jsx)(B.A,{color:R.palette.text.primary,variant:"smallRegular",children:M("key_minimum_ticket_purchase_info",{qty:null==d||null==(s=d.ticket_schedules)||null==(a=s[0])?void 0:a.min_purchasable_quota})})]}),(0,y.jsxs)(es.A,{direction:"row",justifyContent:"space-between",children:[(0,y.jsx)(F.A,{children:(0,y.jsx)(eL,{eventStatus:d.status,sx:{mt:"8px"}})}),m&&U&&(0,y.jsxs)(es.A,{direction:"row",mt:"8px",children:[(0,y.jsx)(ep.A,{sx:{color:"#484FF9",fontSize:"18px",mr:"8px"}}),(0,y.jsx)(B.A,{sx:{justifySelf:"end"},color:R.palette.text.secondary,fontSize:{xs:"12px",sm:"14px"},children:M("eventTicketSelectionLimitedQuota",{quota:d.ticket_schedules[0].purchasable_quota})})]})]})]}),(0,y.jsx)(nZ,{open:S,ticketBundle:d,onClose:()=>{I(!1)}})]})}var n6=n(22429),n3=n.n(n6),n4=n(5750),n8=n(68421),n7=n(47456),n9=n(92545),ie=n.n(n9),it=n(98467),ii=n.n(it),ir=n(37293);A().extend(ie()),A().extend(ii());let il=e=>{let{variant:t="selectable",date:n="",onDateClick:i=()=>{}}=e;A().locale("id");let{t:r}=(0,T.Bd)(),l=(0,E.A)(),o="selected"===t?l.palette.tiptip[500]:"selectable"===t?l.palette.text.primary:l.palette.text.tertiery,a="selected"===t?l.palette.tiptip[500]:"selectable"===t?l.palette.text.secondary:l.palette.text.tertiery;return(0,y.jsxs)(es.A,{direction:"column",alignItems:"center",onClick:i,sx:{cursor:"disabled"===t?"default":"pointer"},id:"b-event-slider-calendar-".concat(n),children:[(0,y.jsxs)(es.A,{direction:"column",alignContent:"center",justifyContent:"center",textAlign:"center",sx:{[l.breakpoints.up("md")]:{width:"80px",padding:"12px 8px"},width:"76px",padding:"12px 4px",height:"64px",..."selected"===t?{borderRadius:"12px",border:"2px solid ".concat(l.palette.tiptip[50032]),backgroundColor:l.palette.tiptip[100]}:"selectable"===t?{borderRadius:"12px",border:"2px solid ".concat(l.palette.border.bold),backgroundColor:l.palette.background.primary}:{borderRadius:"12px",border:"2px solid ".concat(l.palette.border.minimal),backgroundColor:l.palette.background.primary}},children:[(0,y.jsx)(B.A,{variant:"mediumBold",sx:{color:o},children:(0,ec.Ay)({date:n,format:ir.jd})}),(0,y.jsx)(B.A,{variant:"smallRegular",sx:{color:a},children:(0,ec.Ay)({date:n,format:"dddd"})})]}),(A()(n).isToday()||A()(n).isTomorrow())&&(0,y.jsx)(es.A,{"data-testid":"c-event-date-attraction-label",sx:{padding:"0px 3px",borderRadius:"4px",backgroundColor:"selected"===t?l.palette.tiptip[500]:l.palette.text.tertiery,marginTop:"-10px"},children:(0,y.jsx)(B.A,{variant:"smallRegular",sx:{color:l.palette.common.white},children:r(A()(n).isToday()?"key_today":"key_tomorrow")})})]})},io=(0,K.Ay)(F.A)({display:"flex",justifyContent:"space-between",padding:"8px 16px",alignItems:"center"}),ia=e=>{let{currentMonth:t,onMonthChange:n}=e;return(0,y.jsxs)(io,{children:[(0,y.jsx)(es.A,{spacing:1,direction:"row",children:(0,y.jsx)(eO.A,{id:"b-event-calendar-prev-month",onClick:()=>{n(A()(t).subtract(1,"month").toDate(),"right")},title:"Previous month",children:(0,y.jsx)(tc.A,{sx:{color:ti.Ay.palette.text.secondary}})})}),(0,y.jsx)(B.A,{variant:"mediumBold",children:A()(t).format("MMMM YYYY")}),(0,y.jsx)(es.A,{spacing:1,direction:"row",children:(0,y.jsx)(eO.A,{id:"b-event-calendar-next-month",onClick:()=>{n(A()(t).add(1,"month").toDate(),"left")},title:"Next month",children:(0,y.jsx)(eq.A,{sx:{color:ti.Ay.palette.text.secondary}})})})]})};A().extend(ii());let is=(0,f.memo)(e=>{let{day:t,sx:n,outsideCurrentMonth:i,selected:r,disabled:l,holidayCalendar:o,schedules:a,onClickDate:s}=e,c=(0,E.A)(),d=A()(t).format(ir.DR),u=0===A()(t).day(),p=A()(t).isToday(),x=(0,f.useMemo)(()=>{var e;return null==o||null==(e=o.holiday)?void 0:e.some(e=>e.date===d)},[o,d]),m=(0,f.useMemo)(()=>a.some(e=>e.date===d&&0===e.ticket_option_uids.length),[a,d]),h=(0,f.useMemo)(()=>i?{color:"transparent !important",cursor:"default",backgroundColor:"transparent !important"}:l||m?{color:"".concat(c.palette.text.tertiery," !important"),cursor:"default",backgroundColor:"transparent !important"}:r?{color:c.palette.background.primary,backgroundColor:c.palette.tiptip[500]}:p?{color:c.palette.purple[500],backgroundColor:c.palette.purple[100]}:u||x?{color:c.palette.error.main,backgroundColor:"transparent"}:{color:c.palette.text.primary,backgroundColor:"transparent"},[i,l,m,r,p,u,x,c]),_=(0,f.useMemo)(()=>({typography:"mediumBold",width:"36px",height:"36px",minWidth:"36px",padding:0,margin:"2px"}),[]);return(0,y.jsx)(G.A,{sx:{...n,...h,..._},disabled:i||l||m,onClick:()=>{i||l||m||s(t)},id:"b-event-date-attraction-".concat(d),children:A()(t).format("D")})});is.displayName="CustomCalendarDay";var ic=n(25500);let id=e=>(0,nh.I)({queryKey:[(0,e$.A)(null==e?void 0:e.start_date)&&(0,e$.A)(null==e?void 0:e.end_date)?"holidayCalendar":"holidayCalendar-".concat((null==e?void 0:e.start_date)||"","-").concat((null==e?void 0:e.end_date)||"")],queryFn:async()=>{var t;let n=await (0,ic.bE)(e);return null==n||null==(t=n.data)?void 0:t.data},enabled:!1,retry:!1,refetchOnWindowFocus:!1});var iu=n(53453),ip=n(58713);let ix=(e,t)=>{let n=[];for(let i=e;i>0;i--){let e=A()(t).subtract(i,"day").format(ir.DR);n.push({date:e,ticket_option_uids:[]})}return n},im=(e,t)=>{let n=[];for(let i=1;i<=e;i++){let e=A()(t).add(i,"day").format(ir.DR);n.push({date:e,ticket_option_uids:[]})}return n},ih=e=>{let{selectedIndex:t,initialDate:n,lastDate:i,schedules:r}=e,l=r.length,o=t>=3?0:3-t,a=[...ix(o,n),...r,...im(t+3<l?0:t+3-(l-1),i)],s=t+o,c=Math.max(s-3,0),d=Math.min(s+3+1,a.length);return a.slice(c,d)},i_=e=>A()(e).format(ir.DR),iv=e=>{let{isOpen:t,onCloseDialog:n,title:i,subtitle:r,onCancelAction:l,cancelLabel:o,submitLabel:a,onSubmitAction:s,imageStateName:c}=e,d=(0,E.A)();return(0,y.jsx)(t7.A,{isOpen:t,onClose:n,title:"",renderTitle:!1,sxDrawerContainer:{padding:"16px 0px"},children:(0,y.jsxs)(es.A,{alignItems:"center",spacing:3,children:[(0,y.jsx)(L.A,{type:c}),(0,y.jsxs)(es.A,{alignItems:"center",spacing:1,children:[(0,y.jsx)(B.A,{variant:"h4",children:i}),(0,y.jsx)(B.A,{variant:"normalRegular",sx:{color:d.palette.text.secondary,textAlign:"center"},children:r})]}),(0,y.jsxs)(es.A,{direction:"row",justifyContent:"space-between",spacing:2,width:"100%",children:[(0,y.jsx)(X.A,{id:"b-event-cancel-change-date-attraction",buttonVariant:"outlined",onClick:l,fullWidth:!0,children:o}),(0,y.jsx)(X.A,{id:"b-event-submit-change-date-attraction",buttonVariant:"filled",fullWidth:!0,onClick:s,children:a})]})]})})};A().extend(n3());let ig=e=>{var t,n,i,r,l;let{schedules:o,ticketCounter:a,setTicketCounter:s,timezone:c}=e,{t:d}=(0,T.Bd)(),u=(0,ip.Lg)("i18nextLng")||O.A.defaultLang;A().updateLocale(u,{weekStart:0}),A().locale(u);let p=()=>{var e;if((null==o||null==(e=o[0])?void 0:e.ticket_option_uids.length)!==0)return null==o?void 0:o.slice(0,7);{let e=[...o],t=0;for(;t<e.length&&(!e[t].ticket_option_uids||0===e[t].ticket_option_uids.length);)t++;return null==(e=e.slice(t))?void 0:e.slice(0,7)}},[x,m]=(0,f.useState)(p()),[h,_]=(0,f.useState)({date:"",source:""}),[v,g]=(0,f.useState)(!1),{setSelectedAttractionDate:b,selectedAttractionDate:k,calendarAttraction:j,setCalendarAttraction:w,selectedTicketOptions:C,setSelectedTicketOptions:S,attractionDates:I}=(0,n_._v)(e=>({setSelectedAttractionDate:e.setSelectedAttractionDate,selectedAttractionDate:e.selectedAttractionDate,calendarAttraction:e.calendarAttraction,setCalendarAttraction:e.setCalendarAttraction,selectedTicketOptions:e.selectedTicketOptions,setSelectedTicketOptions:e.setSelectedTicketOptions,attractionDates:e.attractionDates})),E=e1(C),D=function(){var e,t;let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:h.date;return ih({selectedIndex:o.findIndex(e=>e.date===n),initialDate:new Date(null==o||null==(e=o[0])?void 0:e.date),lastDate:new Date(null==o||null==(t=o[o.length-1])?void 0:t.date),schedules:o})},F=()=>{let e=D();b({...h,sliderDate:"slider"!==h.source?e:[...x]}),"slider"!==h.source&&m(e),w({show:!1}),v?R():j.ticket_option_uid&&s({...a,[j.ticket_option_uid]:{...a[j.ticket_option_uid],qty:1}})},L=e=>{e.ticket_option_uids.length>0&&(_({date:e.date,source:"slider"}),E>0?g(!0):b({date:e.date,source:"slider",sliderDate:[...x]}))},R=()=>{g(!1)};(0,f.useEffect)(()=>
1{if((0,e$.A)(h.date)&&(0,e$.A)(k.date)&&"view-all"!==k.source){for(let e of o)if(e.ticket_option_uids.length>0){_({date:e.date,source:""}),b({date:e.date,source:"",sliderDate:[...x]});break}}else(0,e$.A)(h.date)&&!(0,e$.A)(k.date)&&(_(k),m(k.sliderDate));N||P()},[]),(0,f.useEffect)(()=>{"view-all"===k.source&&_({date:"",source:""})},[k.source]);let M=(0,f.useMemo)(()=>{var e;return null==(e=o.reduce((e,t)=>A()(t.date).isAfter(A()(e.date))?t:e))?void 0:e.date},[]),{refetch:P,data:N}=id({start_date:null==o||null==(t=o[0])?void 0:t.date,end_date:M});return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(es.A,{direction:"column",spacing:1,children:[(0,y.jsx)(B.A,{variant:"smallRegular",sx:{color:ti.Ay.palette.text.secondary},children:d("key_timezone_date_picker",{timezone:c})}),(0,y.jsxs)(es.A,{direction:"row",justifyContent:"space-between",alignItems:"center",sx:{paddingBottom:4},children:[(0,y.jsx)(es.A,{direction:"row",spacing:1,sx:{width:"100%",overflow:"auto",scrollbarWidth:"none",display:"-webkit-box",[ti.Ay.breakpoints.down("md")]:{marginRight:"35px"},"::-webkit-scrollbar":{display:"none"}},children:null==x?void 0:x.map((e,t)=>(0,y.jsx)(il,{date:e.date,variant:0===e.ticket_option_uids.length?"disabled":e.date===k.date?"selected":"selectable",onDateClick:()=>L(e)},t))}),(0,y.jsx)(es.A,{sx:{padding:"18px 16px",[ti.Ay.breakpoints.down("md")]:{borderRadius:"32px 0px 0px 32px",background:ti.Ay.palette.background.primary,boxShadow:"0px 0px 16px 0px rgba(145, 158, 171, 0.20)",position:"absolute",right:0}},alignItems:"center",onClick:()=>{(0,e$.A)(k.date)&&_({date:"",source:""}),w({show:!0,ticket_option_uid:""})},id:"b-event-show-calendar-drawer",children:(0,y.jsx)(iu.A,{sx:{cursor:"pointer",color:ti.Ay.palette.tiptip[500],width:"24px",height:"24px"}})})]})]}),(0,y.jsx)(t7.A,{onClose:()=>{w({show:!1}),_({date:k.date,source:""})},isOpen:j.show,isLoading:!1,title:d("key_select_date"),sxDialogContainer:{width:"auto",padding:"24px"},sxDrawerContainer:{padding:"16px 0px"},children:(0,y.jsxs)(n8.$,{dateAdapter:n4.h,children:[(0,y.jsx)(n7.x,{sx:{width:"100%","& .css-1n1xn3x-MuiPickersSlideTransition-root-MuiDayCalendar-slideTransition":{height:"260px !important",maxHeight:"260px !important"}},value:new Date((null==k?void 0:k.source)==="view-all"&&(0,e$.A)(h.date)?null==(i=p())||null==(n=i[0])?void 0:n.date:h.date),slots:{calendarHeader:ia,day:e=>(0,y.jsx)(is,{...e,selected:A()(e.day).format(ir.DR)===h.date,schedules:o,holidayCalendar:N,onClickDate:e=>_({date:i_(e),source:"calendar"})})},dayOfWeekFormatter:e=>{let t=A()(e).locale(u).format("ddd");return"Min"===t||"Sun"===t?(0,y.jsx)(B.A,{variant:"smallRegular",sx:{color:ti.Ay.palette.error.main},children:t}):(0,y.jsx)(B.A,{variant:"smallRegular",children:t})},minDate:A()(null==o||null==(r=o[0])?void 0:r.date).isAfter(new Date)?new Date(null==o||null==(l=o[0])?void 0:l.date):new Date,maxDate:new Date(M),shouldDisableDate:e=>{var t,n,i;let r=A()(e).format("YYYY-MM-DD");if(!(0,e$.A)(k.date)&&(null==I||null==(t=I.dates)?void 0:t.length)===0)return!1;if((0,e$.A)(k.date)&&(null==I||null==(n=I.dates)?void 0:n.length)===0){let e=o.map(e=>e.date);return!(null==e?void 0:e.includes(r))}return!(null==I||null==(i=I.dates)?void 0:i.includes(r))}}),(0,y.jsx)(X.A,{sx:{marginTop:3},fullWidth:!0,onClick:()=>{E>0?g(!0):F()},disabled:(0,e$.A)(h.date)||h.date===k.date,id:"b-event-submit-attraction-selected-date",children:"".concat(d("chooseButton"))+(h.date?" - ".concat(A()(h.date).format(ir.YV)):"")})]})}),(0,y.jsx)(iv,{cancelLabel:d("key_cancel"),imageStateName:"calendar",isOpen:v,onCancelAction:()=>{_({date:k.date,source:""}),w({show:!1}),R()},onCloseDialog:R,onSubmitAction:()=>{S({}),F()},submitLabel:d("key_change_ticket_date_cta"),subtitle:d("key_change_ticket_date_desc"),title:d("key_change_ticket_date_title")})]})};var iy=n(80782),ib=n.n(iy),iA=n(14874),ik=n(15498);let ij=["en","id"],iw=(e,t)=>{if(!e||"object"!=typeof e)return null;let n=[t,...ij].find(t=>{let n=e[t];return"string"==typeof n&&n.trim().length>0});return n?e[n].trim():null},iC=(e,t)=>e?tT(t)?t:function(e){let t=4===e.length?"#".concat(e[1]).concat(e[1]).concat(e[2]).concat(e[2]).concat(e[3]).concat(e[3]):e,n=parseInt(t.slice(1,3),16),i=parseInt(t.slice(3,5),16);return(.299*n+.587*i+.114*parseInt(t.slice(5,7),16))/255>.5?"#000000":"#FFFFFF"}(e):null,iS=(e,t)=>{if(!e||"object"!=typeof e||!(0,nT.Z8)(e.url))return null;let n=iw(e.label,t);if(!n)return null;let i=tT(e.background_color)?e.background_color:null;return{label:n,url:e.url,backgroundColor:i,textColor:iC(i,e.text_color)}},iI=(e,t)=>{if(!e||"object"!=typeof e)return null;let n=iS(e.button,t),i=!0===e.hide_price;
1return n||i?{hidePrice:i,button:n}:null},iE=(e,t,n)=>{var i;if(!e||"object"!=typeof e||!0!==e.enabled||!t)return{};let r=null==(i=e.events)?void 0:i[t];return r&&"object"==typeof r?Object.keys(r).reduce((e,t)=>{let i=iI(r[t],n);return i?{...e,[t]:i}:e},{}):{}};var iT=n(46322);let iD=(0,f.forwardRef)(function(e,t){let{title:n,scrollMarginTop:i=0}=e,r=(0,E.A)();return(0,y.jsxs)(es.A,{ref:t,direction:"row",alignItems:"center",gap:1,sx:{py:"12px",scrollMarginTop:i},children:[(0,y.jsx)(eF.A,{sx:{fontSize:"20px",color:r.palette.text.tertiery}}),(0,y.jsx)(B.A,{variant:"mediumBold",children:n})]})});function iB(e){let{title:t,options:n,isEnableTicketSection:i,relatedEvents:r,productUid:l,venueMap:o,setVenueMapInView:a,ticketCounter:s,setTicketCounter:c,refetch:d,isFetching:u,dataUpdatedAt:p,maxQuantityPerUser:x,showPurchasableQuota:m,trackerDefaultState:h,attractionSchedules:_,onClickShowAllAttractionTickets:v,isAttraction:g,isCreator:b,timezone:A}=e,{t:k}=(0,T.Bd)(),w=(0,E.A)(),[C,S]=(0,f.useState)(!1),{selectedAttractionDate:I}=(0,n_._v)(e=>({selectedAttractionDate:e.selectedAttractionDate})),D=(0,V.A)(w.breakpoints.up("sm")),{ref:L,inView:O}=(0,nR.Wx)({threshold:.25}),M=function(e){let{i18n:t}=(0,T.Bd)(),n=(null==t?void 0:t.language)||"en",[i,r]=(0,f.useState)({});return(0,f.useEffect)(()=>{if(!e)return;let t=!0;return(async()=>{try{if(!await (0,iA.ho)())return void(0,nf.ll)("Remote Config not initialized when loading ticket CTA config");await (0,iA.dL)();let i=(0,iA.HT)(ik.L.EVENT_TICKET_CTA_CONFIG,null);if(!t)return;r(iE(i,e,n))}catch(e){(0,nf.ll)("Error loading ticket CTA config: ".concat(null==e?void 0:e.message))}})(),()=>{t=!1}},[e,n]),i}(l),{flags:P}=(0,iT.h)(),{ticketSectionsEnabled:N}=P,z=N&&!0===i,U=(0,f.useRef)(new Map),W=(0,f.useMemo)(()=>z?(0,eJ.EH)((0,eJ.oQ)(n)):null,[n,z]),[H,G]=(0,f.useState)(!1),Y=(0,f.useMemo)(()=>{var e;return null!=(e=null==W?void 0:W.some(e=>null!==e.section))&&e},[W]),K=z&&Y,Q=(0,R.bN)(),Z=Q?"".concat(60,"px"):{xs:"".concat(128,"px"),sm:"".concat(156,"px")},$=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,nE.sx)(e,{...h,...t})},J=(0,f.useCallback)(()=>G(!0),[]),ee=(0,f.useCallback)(()=>G(!1),[]),et=(0,f.useCallback)(e=>{var t;null==(t=U.current.get(e))||t.scrollIntoView({behavior:"smooth",block:"start"}),(0,nf.ll)("ticket_section_selected","info",{category:"ticket_section",data:{ticket_option_uid:e}})},[]),en=(0,f.useCallback)(()=>{window.scrollTo({top:0,behavior:"smooth"}),(0,nf.ll)("ticket_section_all_selected","info")},[]);return(0,f.useEffect)(()=>{h.state_name="ETICKET_OPTION",$("visit_eticket_option")},[]),(0,f.useEffect)(()=>{a(O)},[O]),(0,y.jsxs)(es.A,{children:[(0,y.jsxs)(es.A,{mb:"24px",children:[C&&(0,y.jsx)(j.A,{severity:"success",variant:"outlined",sx:{color:w.palette.text.primary,mb:"14px",padding:"2px 12px","& .MuiAlert-message":{pt:"9px"},"& .MuiAlert-action":{pt:"0px"}},icon:(0,y.jsx)(ep.A,{}),action:(0,y.jsx)(q.A,{onClick:()=>S(!1),sx:{m:"auto",mr:"14px",width:"20px"}}),children:k("key_success_update_ticket_list")}),(0,y.jsx)(B.A,{variant:D?"h3Desk":"mediumBold",sx:{color:w.palette.text.primary,wordBreak:"break-word",overflowWrap:"break-word"},children:t}),(0,y.jsxs)(es.A,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[(0,y.jsx)(B.A,{variant:"normalRegular",sx:{color:w.palette.text.secondary},children:k("key_select_ticket_want_order")}),(0,y.jsx)(iF,{dataUpdatedAt:p,isLoading:u,refetch:async()=>{try{await d(),S(!0)}catch(e){}}})]}),(null==r?void 0:r.length)>0&&(0,y.jsx)(ne,{events:r,currentEvent:l,onClickEvent:e=>{window.location.href="/event/".concat(e.product_uid,"?show_options=true")}})]}),u?(0,y.jsx)(nM,{}):(0,y.jsxs)(y.Fragment,{children:[o&&(0,y.jsx)(F.A,{ref:L,children:(0,y.jsx)(nU,{source:o})}),(null==_?void 0:_.length)>0&&(0,y.jsx)(ig,{schedules:_,ticketCounter:s,setTicketCounter:c,timezone:A}),K&&(0,y.jsx)(nB,{onOpen:J,top:Q?"".concat(8,"px"):{xs:"".concat(76,"px"),sm:"".concat(104,"px")}}),W?W.map((e,t)=>{var n;let{section:i,tickets:r}=e;return(0,y.jsxs)(f.Fragment,{children:[i&&(0,y.jsx)(iD,{ref:e=>{e?U.current.set(i.ticket_option_uid,e):U.current.delete(i.ticket_option_uid)},title:i.title,scrollMarginTop:Z}),r.map(e=>(0,y.jsx)(n2,{option:e,ticketCounter:s,setTicketCounter:c,maxQuantityPerUser:x,showPurchasableQuota:m,trackEventHandler:$,isAttraction:g,isCreator:b,ctaConfig:M[e.ticket_option_uid]},e.ticket_option_uid))]},null!=(n=null==i?void 0:i.ticket_option_uid)?n:"ungrouped-".concat(t))}):n.map(e=>(0,y.jsx)(n2,{option:e,ticketCounter:s,setTicketCounter:c,maxQuantityPerUser:x,showPurchasableQuota:m,trackEventHandler:$,isAttraction:g,isCreator:b,ctaConfig:M[e.ticket_option_uid]},e.ticket_option_uid)),(null==_?void 0:_.length)>0&&!(0,e$.A)(I.date)&&(0,y.jsxs)(X.A,{fullWidth:!1,buttonVariant:"nude",sx:{width:"fit-content",alignSelf:"center"},id:"b-event-show-all-attraction-tickets",onClick:v,children:[(0,y.jsx)(eF.A,{sx:{marginRight:1}})," ",k("key_view_all_tickets")]}),K&&(0,y.jsx)(nO,{open:H,onClose:ee,groups:null!=W?W:[],onSelectSection:et,onSelectAll:en})]})]})}let iF=e=>{let{dataUpdatedAt:t,isLoading:n,refetch:i}=e,{t:r}=(0,T.Bd)(),[l,o]=(0,f.useState)(!0),a=n||l,s=(0,E.A)(),c=(0,f.useCallback)(ib()(()=>{i(),o(!0),setTimeout(()=>{o(!1)},2e4)},2e4),[]);return(0,f.useEffect)(()=>
1{if(!n){let e=setTimeout(()=>{o(!1)},2e4);return()=>clearTimeout(e)}},[n]),(0,y.jsxs)(es.A,{direction:"row",alignItems:"center",gap:2,children:[(0,y.jsx)(B.A,{variant:"normalRegular",sx:{color:s.palette.text.secondary,display:{xs:"none",sm:"block"}},children:"".concat(r("key_last_update")," ").concat(A()(t).format("HH:mm"))}),(0,y.jsx)(nF.A,{orientation:"vertical",variant:"middle",flexItem:!0,sx:{borderColor:s.palette.background.tertiery,display:{xs:"none",sm:"block"}}}),(0,y.jsx)(es.A,{direction:"row",alignItems:"center",children:(0,y.jsxs)(G.A,{id:"b-event-ticket-option-refresh",buttonVariant:"nude",sx:{padding:"8px 0px"},onClick:c,disabled:a,children:[(0,y.jsx)(B.A,{variant:"normalBold",sx:{color:a?s.palette.text.tertiery:s.palette.primary.main,display:{xs:"none",sm:"block"}},children:r("refresh")}),(0,y.jsx)(t_.A,{sx:{fontSize:"18px",color:a?s.palette.text.tertiery:s.palette.tiptip[500],marginLeft:"6px"}})]})})]})};function iL(e){let{selectedTickets:t}=e,{t:n}=(0,T.Bd)(),i=(0,E.A)(),r=e6(t);return r?(0,y.jsxs)(y.Fragment,{children:[r.map((e,t)=>{var r;let l=(null==(r=e.ticket_bundling)?void 0:r.length)>0;return(0,y.jsxs)(F.A,{children:[l&&(0,y.jsx)(B.A,{variant:"normalBold",sx:{color:i.palette.text.primary,wordBreak:"break-word",overflowWrap:"break-word"},children:e.title}),l?(0,y.jsx)(es.A,{mt:"8px",children:e.ticket_bundling.map((e,t)=>(0,y.jsxs)(es.A,{direction:"row",alignItems:"center",children:[(0,y.jsx)(eF.A,{sx:{color:i.palette.tiptip[300],height:"16px",width:"16px",mr:"4px"}}),(0,y.jsxs)(B.A,{variant:"normalRegular",sx:{color:i.palette.text.secondary,wordBreak:"break-word"},children:[e.qty," x ",e.name]})]},t))}):(0,y.jsxs)(es.A,{direction:"row",alignItems:"center",children:[(0,y.jsx)(eF.A,{sx:{color:i.palette.tiptip[300],height:"16px",width:"16px",mr:"4px"}}),(0,y.jsx)(B.A,{variant:"normalRegular",sx:{color:i.palette.text.secondary,wordBreak:"break-word"},children:e.title})]}),(null==e?void 0:e.visit_time)&&(0,y.jsx)(B.A,{variant:"smallBold",sx:{color:i.palette.text.primary,wordBreak:"break-word"},children:e.visit_time}),(0,y.jsx)(es.A,{mt:"6px",mb:"10px",children:(0,y.jsxs)(es.A,{direction:"row",justifyContent:"space-between",children:[(0,y.jsx)(B.A,{variant:"normalRegular",sx:{color:i.palette.text.secondary},children:l?"".concat(e.qty," ").concat(n("key_bundle")):n("eventCartDetailModalEntryCount",{count:e.qty})}),(0,y.jsx)(B.A,{variant:"normalBold",sx:{color:i.palette.text.primary},children:(0,eI.A)(e.qty*e.price)})]})}),(0,y.jsx)(eS.A,{})]},t)}),(0,y.jsx)(es.A,{children:(0,y.jsxs)(es.A,{direction:"row",justifyContent:"space-between",children:[(0,y.jsx)(B.A,{variant:"normalRegular",sx:{color:i.palette.text.secondary},children:n("eventTicketCartDetailModalTotal",{count:e1(t)})}),(0,y.jsx)(B.A,{variant:"normalBold",sx:{color:i.palette.text.primary},children:(0,eI.A)(e5(t))})]})})]}):(0,y.jsxs)(es.A,{children:[(0,y.jsxs)(es.A,{direction:"row",alignItems:"center",children:[(0,y.jsx)(eF.A,{sx:{color:i.palette.tiptip[300],height:"16px",width:"16px",mr:"4px"}}),(0,y.jsx)(B.A,{variant:"normalRegular",sx:{color:i.palette.text.secondary},children:n("eventTicketNoTicketLabel")})]}),(0,y.jsx)(es.A,{mt:"6px",children:(0,y.jsxs)(es.A,{direction:"row",justifyContent:"space-between",children:[(0,y.jsx)(B.A,{variant:"normalRegular",sx:{color:i.palette.text.secondary},children:n("eventCartDetailModalEntryCount",{count:0})}),(0,y.jsx)(B.A,{variant:"normalBold",sx:{color:i.palette.text.primary},children:"Rp0"})]})})]})}function iO(e){let{selectedTicketOptions:t,onBuyTicket:n,isDisablePaymentButton:i,trackerDefaultState:r={}}=e,{t:l}=(0,T.Bd)(),o=(0,E.A)(),[a,s]=(0,f.useState)(!1);return(0,y.jsxs)(es.A,{gap:2,sx:{boxShadow:"0px 0px 8px 0px ".concat(o.palette.border.minimal),borderRadius:"8px",padding:"16px"},children:[(0,y.jsx)(B.A,{variant:"normalBold",sx:{color:o.palette.text.primary},children:l("eventParticipantFormScreenTitle")}),(0,y.jsx)(iL,{selectedTickets:t}),(0,y.jsx)(eH.A,{disabled:i,loading:a,buttonVariant:"filled",sx:{borderRadius:"8px"},id:"b-event-ticket-option-continue",onClick:async()=>{(0,nE.sx)("confirm_eticket_option",{...r}),s(!0),await n(),s(!1)},children:l("continueText")})]})}function iR(e){let{selectedTicketOptions:t,isDisablePaymentButton:n,onBuyTicket:i,cta:r="Lanjutkan",trackerDefaultState:l={}}=e,{t:o}=(0,T.Bd)(),a=(0,E.A)(),[s,c]=(0,f.useState)(!1),[d,u]=(0,f.useState)(!1),p=e5(t),x=e1(t);return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(F.A,{children:!!x&&(0,y.jsx)(es.A,{gap:1.5,flex:1,mt:"8px",children:(0,y.jsxs)(es.A,{direction:"row",justifyContent:"space-between",children:[(0,y.jsxs)(es.A,{children:[(0,y.jsxs)(es.A,{direction:"row",alignItems:"center",mb:"2px",color:a.palette.text.secondary,onClick:()=>c(!0),children:[(0,y.jsx)(B.A,{variant:"smallRegular",color:a.palette.text.secondary,children:o("eventSeatSelectionSelectedTicketLabel",{n:x})}),(0,y.jsx)(tO.A,{sx:{height:"16px",width:"16px"}})]}),(0,y.jsx)(B.A,{variant:"h3",sx:{color:a.palette.text.primary},children:(0,eI.A)(p)})]}),(0,y.jsx)(eH.A,{disabled:n,buttonVariant:"filled",loading:d,onClick:async()=>{(0,nE.sx)("confirm_eticket_option",{...l}),u(!0),await i(),u(!1)},sx:{padding:"12px 16px",height:"44px",minWidth:"164px"},children:r})]})})}),(0,y.jsx)(H.A,{open:s,title:o("eventParticipantFormScreenTitle"),onClose:()=>c(!1),children:(0,y.jsx)(es.A,{gap:2,children:(0,y.jsx)(iL,{selectedTickets:t})})})]})}var iM=n(46290),iP=n(35640),iN=n(73625);function iV(e){let{open:t,errorCode:n,requestId:i,onClose:r,data:l={}}=e,o=(0,E.A)(),a=(0,V.A)(o.breakpoints.up("sm")),s=()=>(0,y.jsx)(iM.A,{code:n,showCTA:!0,onCTA:e=>{switch(e){case"browse_events":(0,Q.A)("/browse?status=event");break;case"back_to_event":window.location.reload();break;case iP.l.SELECT_TICKET:(0,iN.k)();break;
1case"close":r()}},requestId:i,data:l});return a?(0,y.jsx)(z.Ay,{open:t,title:" ",closeButtonIcon:(0,y.jsx)(q.A,{sx:{color:"red"}}),onClose:r,sx:{".MuiDialog-paper":{width:"480px",padding:"24px",maxHeight:"695px","div:first-of-type button:first-of-type":{minWidth:"32px"}},".MuiDialogContent-root":{padding:0}},children:(0,y.jsx)(s,{})}):(0,y.jsx)(H.A,{open:t,title:" ",onClose:r,children:(0,y.jsx)(s,{})})}let iz=e=>{let{eventUserDetailData:t}=(0,n_._v)(e=>({eventUserDetailData:e.eventUserDetailData}));return(0,nh.I)({queryKey:["ticketOptionsByDate-".concat(e),t],queryFn:()=>{var n,i;let r={date:e,ticket_option_uids:[]};if((0,e$.A)(e)){let n=new Set;null==t||null==(i=t.availability_schedules)||i.forEach(e=>{e.ticket_option_uids.forEach(e=>n.add(e))}),r={date:e,ticket_option_uids:Array.from(n)}}else r=null==t?void 0:t.availability_schedules.find(t=>t.date===e);let l=(0,eJ.pu)(null==t?void 0:t.ticket_options);return(null==r||null==(n=r.ticket_option_uids)?void 0:n.map(e=>l.find(t=>t.ticket_option_uid===e)).filter(Boolean))||[]},retry:!1,refetchOnWindowFocus:!1})},iq=(e,t)=>{let{setAttractionDates:n}=(0,n_._v)(e=>({setAttractionDates:e.setAttractionDates}));return(0,nh.I)({queryKey:[(0,e$.A)(e)?"datesByTicketOption":"datesByTicketOption-".concat(e)],queryFn:async()=>{let i={ticket_option_uid:e,dates:[]};return t&&(null==t||t.forEach(t=>{let{date:n,ticket_option_uids:r}=t;e&&r.includes(e)?i.dates.push(n):!e&&r.length>0&&i.dates.push(n)})),n(i),i},retry:!1,refetchOnWindowFocus:!1,enabled:!1})};var iU=n(30090),iW=n(60216);function iH(e){var t,n,i,r,l,o;let{title:a,productEventDetailQuery:s,productDetail:c,onBuyTicket:d,onBack:u,isCreator:p,trackerDefaultState:x}=e,{t:m}=(0,T.Bd)(),{data:h,refetch:_,isFetching:v,dataUpdatedAt:g}=s,b=c.product_uid,A=!(0,iU.p)(),k=(0,eQ.XI)(),w=(null==h||null==(n=h.event_summary)||null==(t=n.event_type)?void 0:t.id)===eZ.Ho,[C,S]=(0,f.useState)([]),[I,F]=(0,f.useState)(!1),[L,O]=(0,f.useState)(!1),[M,P]=(0,f.useState)(""),[N,z]=(0,f.useState)({}),[q,U]=(0,f.useState)(""),[W,H]=(0,f.useState)(!0),[G,Y]=(0,f.useState)(!1),K=eZ.UZ.includes(b),[Q,X]=(0,f.useState)(!1),{selectedTicketOptions:Z,setSelectedTicketOptions:$,setBookingPreview:J,setBookingTimer:ee,setBookingError:et,setSelectedAttractionDate:en,selectedAttractionDate:ei,setCalendarAttraction:er,contactInfoFormValue:el,setContactInfoFormValue:eo}=(0,n_._v)(e=>({setBookingTimer:e.setBookingTimer,selectedTicketOptions:e.selectedTicketOptions,setSelectedTicketOptions:e.setSelectedTicketOptions,setBookingPreview:e.setBookingPreview,setBookingError:e.setBookingError,setSelectedAttractionDate:e.setSelectedAttractionDate,selectedAttractionDate:e.selectedAttractionDate,setCalendarAttraction:e.setCalendarAttraction,contactInfoFormValue:e.contactInfoFormValue,setContactInfoFormValue:e.setContactInfoFormValue})),{data:ea}=iz(ei.date),ec=(0,f.useMemo)(()=>I?C:w&&(null==ea?void 0:ea.length)>0?ea:null==h?void 0:h.ticket_options,[I,null==h?void 0:h.ticket_options,ea,w]),ed=(0,f.useMemo)(()=>(0,eJ.pu)(ec),[ec]),eu=(0,E.A)(),ep=(0,V.A)(eu.breakpoints.up("sm")),{isSnackbarOpen:ex,snackbarMessage:em,queueSnackbar:eh,closeSnackbar:e_}=(0,nw.A)(),ev=e1(Z);(0,f.useEffect)(()=>{if((0,e$.A)(Z)&&(null==ed?void 0:ed.length)>0){let e={};null==ed||ed.map(t=>{e[t.ticket_option_uid]={ticket_schedule_uid:t.ticket_schedules[0].ticket_schedule_uid,title:t.title,price:t.sale_price,ticket_bundling:t.ticket_bundling,qty:0}}),$(e)}},[]),(0,f.useEffect)(()=>{if((null==ed?void 0:ed.length)>0){let e={};null==ed||ed.map(t=>{var n,i;e[t.ticket_option_uid]={ticket_schedule_uid:t.ticket_schedules[0].ticket_schedule_uid,title:t.title,price:t.sale_price,ticket_bundling:t.ticket_bundling,qty:(0,e$.A)(Z)?0:(null==(n=Z[t.ticket_option_uid])?void 0:n.qty)||0,...t.visit_time&&{visit_time:(0,e$.A)(Z)?null==(i=Z[t.ticket_option_uid])?void 0:i.visit_time:t.visit_time[0]}}}),$(e)}},[ec]);let eg=async()=>{var e,t,n,i,r,l,o,a,s,c,u,x,m;try{let t=[];if(Object.keys(Z).map(e=>{Z[e].qty>0&&t.push({ticket_schedule_uid:Z[e].ticket_schedule_uid,qty:Z[e].qty})}),!p){let n=await (0,ny.wQ)({product_uid:b,head_source:"E-TICKET",tickets:t}),i=null==n||null==(e=n.data)?void 0:e.data;i&&(i.name||i.email||i.phone_number)&&eo({...el,full_name:i.name||el.full_name,email:i.email||el.email,phone_number:i.phone_number||el.phone_number})}A?d():await ey(),window.scrollTo(0,0)}catch(p){let e=null==p||null==(n=p.response)||null==(t=n.data)?void 0:t.code,d=null==p||null==(r=p.response)||null==(i=r.data)?void 0:i.requestId;if("NOT_ENOUGH_QUOTA"===e){let e=p.response.data.data;F(!0),S([...e.products[0].ticket_options]),Object.keys(Z).map(t=>{let n=e.products[0].ticket_options.find(e=>e.ticket_option_uid===t);(null==n?void 0:n.ticket_schedules[0].purchasable_quota)<Z[t].qty&&(Z[t].qty=n.ticket_schedules[0].purchasable_quota,$(Z))}),X(!0),eh({message:"Jumlah tiket yang dipesan tidak tersedia."})}else{if("INSUFFICIENT_MIN_PURCHASE"===e){let e=null==(a=p.response.data.data)||null==(o=a.products)||null==(l=o[0])?void 0:l.ticket_options,t={};if(e){let n=e.flatMap(e=>e.ticket_schedules.filter(e=>"INSUFFICIENT_MIN_PURCHASE"===e.purchasable_code).map(t=>({title:e.title,qty:t.min_purchasable_quota})));t=n.length>0?n[0]:{}}z(t)}if("USER_OVERBOOKED"===e){let e=(null==p||null==(c=p.response)||null==(s=c.data)?void 0:s.data)||{};
1z({limit:(null==e||null==(m=e.products)||null==(x=m[0])||null==(u=x.event_summary)?void 0:u.max_purchasable_quota)||0})}U(d),P(e),O(!0)}}},ey=async()=>{try{if(p)J({show:!0});else{let{book_session_id:e,book_expiry:t}=await (0,ny.e5)({product_uid:b,tickets:e3(Z),...w&&{visit_date:ei.date}});ee({show:!0,book_session_id:e,book_expiry:t})}d()}catch(p){var e,t,n,i,r,l,o;let a=p.response.data.code,s=null==p||null==(t=p.response)||null==(e=t.data)?void 0:e.requestId,c={};(null==p||null==(n=p.response)?void 0:n.status)===422&&K&&(0,nf.yW)(),"USER_OVERBOOKED"===a&&(c={limit:null==p||null==(o=p.response)||null==(l=o.data)||null==(r=l.data)||null==(i=r.quantity_overbooked)?void 0:i.max_quantity_per_user}),et({show:!0,code:a,requestId:s,data:c});let{book_expiry:d,book_session_id:u}=p.response.data.data;ee({show:!1,book_expiry:d,book_session_id:u})}};return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(D.A,{container:!0,sx:{padding:{xs:"16px",md:"32px 16px"},maxWidth:{lg:"1152px"},marginX:"auto",position:"relative",mb:!(null==k||null==(i=k.layout)?void 0:i.showFooter)&&"150px"},children:[(0,y.jsxs)(D.A,{item:!0,md:8,xs:12,sx:{pr:{md:"24px"}},children:[(null==k?void 0:k.showBackBtnContent)&&!(0,R.bN)()&&(0,y.jsxs)(es.A,{gap:.5,direction:"row",alignItems:"center",onClick:u,sx:{cursor:"pointer",alignSelf:"flex-start",mb:"6px",ml:"-8px"},children:[(0,y.jsx)(tc.A,{sx:{color:eu.palette.primary.main}}),(0,y.jsx)(B.A,{variant:"normalBold",sx:{color:eu.palette.primary.main},children:m("back")})]}),(0,y.jsx)(es.A,{sx:ep?{height:"auto",width:"100%"}:{height:"auto",width:"auto",marginBottom:(0,R.bN)()&&((null==h?void 0:h.event_summary.venue_url)?"124px":"84px")},children:(0,y.jsx)(iB,{title:a,options:ec,isEnableTicketSection:null==h||null==(r=h.event_summary)?void 0:r.is_enable_ticket_section,venueMap:(0,iW.A)(null==h?void 0:h.event_summary.venue_url,"1500w"),relatedEvents:h.related_products,productUid:b,setVenueMapInView:H,maxQuantityPerUser:null==h?void 0:h.event_summary.max_purchasable_quota,ticketCounter:Z,setTicketCounter:e=>{e2(e)>=(null==h?void 0:h.event_summary.max_purchasable_quota)&&eh({message:m("eventDetailsMaxQuantityMessage",{quantity:null==h?void 0:h.event_summary.max_purchasable_quota})}),e2(e)<=(null==h?void 0:h.event_summary.max_purchasable_quota)&&$(e)},trackerDefaultState:x,refetch:async()=>{await _(),F(!1)},isFetching:v,dataUpdatedAt:g,showPurchasableQuota:Q,attractionSchedules:null==h?void 0:h.availability_schedules,onClickShowAllAttractionTickets:()=>{ev>0?Y(!0):(en({date:"",source:"view-all",sliderDate:[]}),er({show:!1,ticket_option_uid:""}))},isAttraction:w,isCreator:p,timezone:null==h||null==(o=h.event_summary)||null==(l=o.event_timezone)?void 0:l.short_offset})})]}),ep&&(0,y.jsx)(D.A,{item:!0,md:4,xs:12,sx:{borderLeft:"1px solid ".concat(eu.palette.background.tertiery),pl:"24px"},children:(0,y.jsxs)(es.A,{sx:{position:"sticky",top:"96px"},children:[(0,y.jsx)(es.A,{mb:"32px",children:(0,y.jsx)(iO,{selectedTicketOptions:Z,isDisablePaymentButton:!ev,onBuyTicket:eg,trackerDefaultState:x})}),(null==h?void 0:h.event_summary.venue_url)&&(0,y.jsx)(es.A,{sx:{display:W&&"none"},children:(0,y.jsx)(nz,{source:null==h?void 0:h.event_summary.venue_url})})]})}),!ep&&(0,y.jsxs)(es.A,{sx:{position:"fixed",bottom:0,left:0,width:"100%",zIndex:10,background:eu.palette.background.primary,padding:ev&&"16px",paddingBottom:(0,R.bN)()?"32px":ev?"16px":"0px",boxShadow:"0px 0px 24px 0px ".concat(eu.palette.border.subtitle)},children:[(null==h?void 0:h.event_summary.venue_url)&&!W&&(0,y.jsx)(nq,{source:(0,iW.A)(null==h?void 0:h.event_summary.venue_url,"1500w")}),(0,y.jsx)(iR,{selectedTicketOptions:Z,isDisablePaymentButton:!1,onBuyTicket:eg,trackerDefaultState:x})]})]}),(0,y.jsx)(nm.A,{open:ex,autoHideDuration:3e3,onClose:e_,anchorOrigin:{vertical:"top",horizontal:"center"},children:(0,y.jsx)(j.A,{onClose:e_,severity:"info",variant:"filled",sx:{width:"100%"},children:em.message})}),(0,y.jsx)(iV,{open:L,errorCode:M,requestId:q,onClose:()=>{O(!1)},data:N}),(0,y.jsx)(iv,{cancelLabel:m("key_cancel"),imageStateName:"buy-ticket",isOpen:G,onCancelAction:()=>Y(!1),onCloseDialog:()=>Y(!1),onSubmitAction:()=>{$({}),en({date:"",source:"",sliderDate:[]}),er({show:!1,ticket_option_uid:""}),Y(!1)},submitLabel:m("key_view_all_tickets"),subtitle:m("key_view_all_ticket_warning_desc"),title:m("key_view_all_ticket_warning_title")})]})}function iG(e){let{label:t}=e,n=(0,E.A)(),i=(0,V.A)(n.breakpoints.up("sm"));return(0,y.jsx)(F.A,{id:"c-seat-selection-order-selected-seat",sx:{backgroundColor:n.palette.red[400],borderRadius:"6px",width:i?"32px":"38px",height:i?"28px":"24px",textAlign:"center"},children:(0,y.jsx)(B.A,{variant:"smallBold",sx:{color:n.palette.background.primary},children:t})})}function iY(e){let{selectedSeats:t,salePrice:n,onBuyTicket:i,isDisablePaymentButton:r,totalTicket:l,FooterContent:o=null,
1selectedTicketOptions:a}=e,[s,c]=(0,f.useState)(!1),{t:d}=(0,T.Bd)(),u=(0,E.A)();return(0,y.jsxs)(es.A,{spacing:"24px",children:[(0,y.jsxs)(es.A,{gap:2,sx:{boxShadow:"0px 0px 8px 0px ".concat(u.palette.border.minimal),borderRadius:"8px",padding:"16px"},children:[(0,y.jsx)(B.A,{variant:"normalBold",sx:{color:u.palette.text.primary},children:d("eventParticipantFormScreenTitle")}),(0,e$.A)(a)?(0,y.jsxs)(es.A,{gap:2,children:[(0,y.jsxs)(es.A,{direction:"row",justifyContent:"space-between",children:[(0,y.jsx)(B.A,{id:"c-seat-selection-num-selected-seats",variant:"normalRegular",sx:{color:u.palette.text.secondary},children:d("eventCartDetailModalEntryCount",{count:l})}),(0,y.jsx)(B.A,{id:"c-seat-selection-total-price",variant:"normalBold",sx:{color:u.palette.text.primary},children:0===n?"Gratis":(0,eI.A)(l*n)})]}),t.length>0&&(0,y.jsxs)(es.A,{direction:"row",flexWrap:"wrap",gap:1,children:[t.map(e=>(0,y.jsx)(iG,{...e},e.id)),(0,y.jsx)(F.A,{sx:{marginBottom:"4px"},children:!t.length&&(0,y.jsx)(B.A,{variant:"smallRegular",sx:{color:u.palette.text.tertiery},children:d("eventCartDetailModalChosenSeat")})})]})]}):(0,y.jsx)(iL,{selectedTickets:a}),(0,y.jsx)(eH.A,{id:"b-seat-selection-purchase",disabled:r,buttonVariant:"filled",sx:{borderRadius:"8px"},loading:s,onClick:async()=>{c(!0),await i(),c(!1)},children:d(0===n?"paymentConfirmationBottomSheetButton":"continueText")})]}),o]})}function iK(e){let{selectedSeats:t,salePrice:n,isDisablePaymentButton:i,onBuyTicket:r,totalTicket:l,selectedTicketOptions:o}=e,[a,s]=(0,f.useState)(!1),{t:c}=(0,T.Bd)(),d=(0,E.A)();return(0,e$.A)(o)?(0,y.jsx)(F.A,{children:(0,y.jsxs)(es.A,{gap:1.5,flex:1,mt:"8px",children:[t.length>0&&(0,y.jsx)(es.A,{direction:"row",flexWrap:"wrap",justifyContent:"center",gap:1,flex:1,children:t.map(e=>(0,y.jsx)(iG,{...e},e.id))}),(0,y.jsxs)(es.A,{direction:"row",justifyContent:"space-between",children:[(0,y.jsxs)(es.A,{children:[(0,y.jsx)(B.A,{id:"c-seat-selection-num-selected-seats",variant:"smallRegular",sx:{color:d.palette.text.secondary,marginBottom:"2px"},children:c("eventCartDetailModalEntryCount",{count:l})}),(0,y.jsx)(B.A,{id:"c-seat-selection-total-price",variant:"h3",sx:{color:d.palette.text.primary},children:0===n?"Gratis":(0,eI.A)(l*n)})]}),(0,y.jsx)(eH.A,{id:"b-seat-selection-purchase",disabled:i,buttonVariant:"filled",sx:{borderRadius:"8px"},loading:a,onClick:async()=>{s(!0),await r(),s(!1)},children:c(0===n?"paymentConfirmationBottomSheetButton":"continueText")})]})]})}):(0,y.jsx)(iR,{cta:c(0===n?"paymentConfirmationBottomSheetButton":"continueText"),onBuyTicket:r,selectedTicketOptions:o,isDisablePaymentButton:i})}var iQ=n(73853);function iX(e){let{ticket:t,disabled:n=!1}=e,i=(0,E.A)();return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(es.A,{direction:"row",alignItems:"center",children:[t.seatLabel&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(iQ.A,{sx:{color:i.palette.grey[500],height:"16px",width:"16px",mr:"4px"}}),(0,y.jsx)(B.A,{fontSize:"14px",mb:"-2px",color:n&&i.palette.text.tertiery,children:t.seatLabel})]}),t.seatLabel&&t.title&&(0,y.jsx)(eS.A,{orientation:"vertical",flexItem:!0,sx:{mx:"12px"}}),t.title&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(eF.A,{sx:{color:i.palette.grey[500],height:"16px",width:"16px",mr:"4px"}}),(0,y.jsx)(B.A,{fontSize:"14px",mb:"-2px",color:n&&i.palette.text.tertiery,sx:{wordBreak:"break-word",overflowWrap:"break-word",overflow:"hidden",textOverflow:"ellipsis",WebkitLineClamp:1,"-webkit-box-orient":"vertical",display:"-webkit-box"},children:t.title})]})]}),t.visit_time&&(0,y.jsx)(B.A,{variant:"smallRegular",color:n&&i.palette.text.tertiery,sx:{wordBreak:"break-word",overflowWrap:"break-word",overflow:"hidden",textOverflow:"ellipsis",WebkitLineClamp:1,"-webkit-box-orient":"vertical",display:"-webkit-box"},children:t.visit_time})]})}var iZ=n(3903),i$=n(48932),iJ=n(58808),i0=n(56715),i1=n(86310);function i2(){return(i2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(null,arguments)}let i5=function(e){return f.createElement("svg",i2({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"6 3.75 36 40"},e),i||(i=f.createElement("path",{d:"M28.354 5.477a6.351 6.351 0 00-8.708 0L7.333 17.072A4.238 4.238 0 006 20.157v19.355a4.236 4.236 0 004.235 4.237h27.53A4.236 4.236 0 0042 39.512V20.157a4.238 4.238 0 00-1.333-3.085L28.354 5.476z",fill:"url(#contact-info_svg__paint0_linear_12520_66377)"}
1)),r||(r=f.createElement("path",{d:"M35.646 32.352H11.293V17.4c0-1.68 1.37-3.056 3.044-3.056h3.866c1.05 0 2.085.52 2.588 1.436a3.028 3.028 0 002.678 1.62 3.073 3.073 0 002.694-1.604c.488-.933 1.523-1.437 2.573-1.437h3.881a3.033 3.033 0 013.029 3.041v14.952z",fill:"#fff"})),l||(l=f.createElement("path",{d:"M41.684 18.55L24 31.04 6.316 18.55A4.237 4.237 0 006 20.157v19.355c0 1.28.567 2.427 1.464 3.204L24 31.04l16.536 11.677A4.228 4.228 0 0042 39.512V20.157c0-.557-.11-1.102-.316-1.606z",fill:"url(#contact-info_svg__paint1_linear_12520_66377)"})),o||(o=f.createElement("path",{d:"M40.723 42.546L28.355 30.901a6.351 6.351 0 00-8.708 0L7.279 42.546a4.22 4.22 0 002.957 1.204h27.53a4.22 4.22 0 002.957-1.204z",fill:"url(#contact-info_svg__paint2_linear_12520_66377)"})),a||(a=f.createElement("defs",null,f.createElement("linearGradient",{id:"contact-info_svg__paint0_linear_12520_66377",x1:24,y1:7.434,x2:24,y2:23.75,gradientUnits:"userSpaceOnUse"},f.createElement("stop",{stopColor:"#9CA1FF"}),f.createElement("stop",{offset:1,stopColor:"#787DFC"})),f.createElement("linearGradient",{id:"contact-info_svg__paint1_linear_12520_66377",x1:24,y1:29.54,x2:24,y2:48.487,gradientUnits:"userSpaceOnUse"},f.createElement("stop",{stopColor:"#A8ABFE"}),f.createElement("stop",{offset:1,stopColor:"#787DFC"})),f.createElement("linearGradient",{id:"contact-info_svg__paint2_linear_12520_66377",x1:24.001,y1:29.174,x2:24.001,y2:43.75,gradientUnits:"userSpaceOnUse"},f.createElement("stop",{stopColor:"#D3D4FF"}),f.createElement("stop",{offset:1,stopColor:"#A9ACFF"})))))};var i6=n(42221);function i3(e){var t,n,i,r,l,o,a,s,c,d,u,p,x,m,h,_,v;let{title:g,productEventDetailQuery:b,productDetail:A,totalTicket:k,repeatQuestion:j,onBuyTicket:w,onBack:C,selectedSeats:S,containerSx:I={}}=e,{data:L}=b,M=!(0,iU.p)(),{t:P}=(0,T.Bd)(),N=(0,eQ.XI)(),{buyerInfoFormValue:z,contactInfoFormValue:q,eventUserDetailData:U,selectedTicketOptions:W,sendToAdditionalEmail:H,setBookingError:G,selectedAttractionDate:Y}=(0,n_._v)(e=>({buyerInfoFormValue:e.buyerInfoFormValue,contactInfoFormValue:e.contactInfoFormValue,eventDetailData:e.eventDetailData,eventUserDetailData:e.eventUserDetailData,selectedTicketOptions:e.selectedTicketOptions,sendToAdditionalEmail:e.sendToAdditionalEmail,setBookingError:e.setBookingError,setSelectedTicketOptions:e.setSelectedTicketOptions,selectedAttractionDate:e.selectedAttractionDate})),Q=(null==U||null==(n=U.event_summary)||null==(t=n.event_type)?void 0:t.id)===eZ.Ho,{profileData:X}=(0,i$.Vv)(e=>({profileData:e.profileData})),Z=(0,E.A)(),$=(0,V.A)(Z.breakpoints.up("sm")),J=(null==S?void 0:S.length)>0?S:[],ee=(null==U||null==(i=U.event_summary)?void 0:i.seating_plan_status)==="ACTIVE",et=(0,K.Ay)("img")(e=>{let{theme:t}=e;return{borderRadius:"8px",width:"104px",height:"104px",objectFit:"cover",aspectRatio:"1/1",[t.breakpoints.down("sm")]:{width:"56px",height:"56px"},[t.breakpoints.up("lg")]:{}}}),en={full_name:(null==X?void 0:X.full_name)||(null==X?void 0:X.name)||"-",phone_number:(null==(r=X.phone)?void 0:r.replace("+",""))||"-",email:(null==X?void 0:X.email)||"-"},ei=e=>{var t;let n=(null==U||null==(t=U.event_summary)?void 0:t.additional_form.fields).find(t=>t.name===e);return(null==n?void 0:n.label)||""},er=(0,f.useMemo)(()=>ee?S.map(e=>({title:e.ticket.title,seatLabel:e.label})):e4(W,!0,k),[W,S]);async function el(){await w()}function eo(){return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(B.A,{sx:e=>({color:e.palette.text.secondary,px:!$&&"8px",mb:!M&&"24px !important",ul:{paddingLeft:"18px"}}),variant:"body",fontSize:"14px",children:[(0,y.jsx)("strong",{children:P("eventParticipantFormAgreementTextTitle")}),(0,y.jsxs)("ul",{children:[(0,y.jsx)("li",{children:P("eventParticipantFormAgreementText")}),(0,y.jsx)("li",{children:P("eventParticipantFormAgreementText2")}),(0,y.jsx)("li",{children:P("eventParticipantFormAgreementText3")})]})]}),M&&(0,y.jsxs)(B.A,{sx:e=>({color:e.palette.text.secondary,mt:"16px !important",mb:"24px !important",px:!$&&"8px"}),variant:"body",fontSize:"14px",children:[P("tncByPressingButton")," ",(0,y.jsx)("span",{style:{color:Z.palette.text.primary,fontWeight:"bold"},children:P("tncPayNow")})," ",P("tncAgreeWith")," ",(0,y.jsx)("a",{href:O.A.termsConditionUrl,style:{color:Z.palette.blue[500],fontWeight:"bold"},target:"_blank",rel:"noreferrer",children:P("eventDetailTncTitle")}),","," ",(0,y.jsx)("a",{href:O.A.privacyPolicyUrl,style:{color:Z.palette.blue[500],fontWeight:"bold"},target:"_blank",rel:"noreferrer",children:P("signUpPrivacyPolicy")}),", ",P("tncAnd")," ",(0,y.jsx)("a",{href:O.A.communityGuidelineUrl,style:{color:Z.palette.blue[500],fontWeight:"bold"},target:"_blank",rel:"noreferrer",children:P("signUpTextSpan5")})," ",P("signUpTextSpan6")]})]})}return(0,f.useEffect)(()=>
1{if(null==N?void 0:N.showPreventNavigate){let e=e=>{e.preventDefault()};return window.addEventListener("beforeunload",e),()=>{window.removeEventListener("beforeunload",e)}}},[N]),(0,y.jsx)(y.Fragment,{children:(0,y.jsxs)(D.A,{container:!0,sx:{maxWidth:{lg:"1152px"},marginX:"auto",position:"relative",mb:!(null==N||null==(l=N.layout)?void 0:l.showFooter)&&"150px",...I},children:[(0,y.jsxs)(D.A,{item:!0,md:8,xs:12,sx:{pr:{md:"24px"}},children:[(null==N?void 0:N.showBackBtnContent)&&!(0,R.bN)()&&(0,y.jsxs)(es.A,{gap:.5,direction:"row",alignItems:"center",onClick:C,sx:{cursor:"pointer",alignSelf:"flex-start",mb:"6px",ml:"-8px"},children:[(0,y.jsx)(tc.A,{sx:{color:Z.palette.primary.main}}),(0,y.jsx)(B.A,{variant:"normalBold",sx:{color:Z.palette.primary.main},children:P("back")})]}),(0,y.jsxs)(es.A,{sx:$?{height:"auto",width:"100%"}:{height:"auto",width:"auto"},children:[" ",(0,y.jsxs)(es.A,{spacing:1,children:[(0,y.jsx)(B.A,{variant:$?"h3Desk":"mediumBold",sx:{color:Z.palette.text.primary,lineBreak:"anywhere"},children:g}),Q&&(0,y.jsx)(iZ.A,{date:Y.date,timezone:null==U||null==(a=U.event_summary)||null==(o=a.event_timezone)?void 0:o.short_offset}),(0,y.jsx)(B.A,{color:Z.palette.text.secondary,fontSize:"14px",children:P("key_order_review_desc")})]}),(0,y.jsxs)(es.A,{direction:"row",mt:"24px",children:[(0,y.jsx)(et,{src:A.cover}),(0,y.jsxs)(es.A,{ml:{xs:"10px",sm:"24px"},justifyContent:"space-around",children:[(0,y.jsxs)(es.A,{direction:"row",sx:{alignItems:"center"},children:[(0,y.jsx)(eu.A,{sx:{mr:"8px",width:"16px",color:Z.palette.text.secondary}})," ",null==L||null==(s=L.event_summary)?void 0:s.location_city]}),(0,y.jsxs)(es.A,{direction:"row",sx:{alignItems:"center"},children:[(0,y.jsx)(ed.A,{sx:{mr:"8px",width:"16px",color:Z.palette.text.secondary}}),null==L||null==(c=L.event_summary)?void 0:c.location_venue]}),!Q&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(es.A,{direction:"row",sx:{alignItems:"center"},children:[(0,y.jsx)(i1.A,{sx:{mr:"8px",width:"16px",color:Z.palette.text.secondary}}),"".concat((0,ec.Ay)({date:(0,iJ.WZ)(L).startDate,format:"DD MMMM YYYY",timezone:null==L||null==(d=L.event_summary)?void 0:d.event_timezone})," - ").concat((0,ec.Ay)({date:(0,iJ.WZ)(L).endDate,format:"DD MMMM YYYY",timezone:null==L||null==(u=L.event_summary)?void 0:u.event_timezone}))]}),(0,y.jsxs)(es.A,{direction:"row",sx:{alignItems:"center"},children:[(0,y.jsx)(i0.A,{sx:{mr:"8px",width:"16px",color:Z.palette.text.secondary}}),"".concat((0,ec.Ay)({date:(0,iJ.WZ)(L).startDate,format:"HH:mm",timezone:null==L||null==(p=L.event_summary)?void 0:p.event_timezone})," - ").concat((0,ec.Ay)({date:(0,iJ.WZ)(L).endDate,format:"HH:mm",timezone:null==L||null==(x=L.event_summary)?void 0:x.event_timezone}
1)," ").concat(null==L||null==(h=L.event_summary)||null==(m=h.event_timezone)?void 0:m.abbreviation)]})]})]})]}),(0,y.jsx)(es.A,{sx:{background:Z.palette.background.secondary,p:"20px",borderRadius:"12px",mt:"24px"},children:(0,y.jsxs)(es.A,{direction:"row",pr:{xs:"8px",md:"0px"},children:[(0,y.jsx)(es.A,{children:(0,y.jsx)(i5,{width:"40px",height:"40px"})}),(0,y.jsx)(es.A,{flexGrow:1,spacing:2,children:(0,y.jsxs)(tw.A,{defaultExpanded:!0,sx:{background:Z.palette.background.secondary,boxShadow:"none",minHeight:"unset"},children:[(0,y.jsx)(tC.A,{expandIcon:(0,y.jsx)(tO.A,{}),"aria-controls":"panel3-content",id:"panel3-header",sx:{minHeight:"40px !important",height:"40px !important","&.Mui-expanded":{minHeight:"40px !important",height:"40px !important"}},children:(0,y.jsx)(B.A,{color:Z.palette.text.primary,sx:{typography:{xs:"h4",md:"h5Desk"}},children:P("eventGuestFormContactInfoTitle")})}),(0,y.jsxs)(tS.A,{sx:{pb:"0px"},children:[(0,y.jsxs)(B.A,{sx:{fontSize:"14px",color:Z.palette.text.secondary,mb:"8px"},children:[P("key_contact_info_ticket_delivery_1")," ",(!M||q.send_notification_preference_wa)&&"& whatsapp."]}),Object.keys(M?q:en).map(e=>{if("send_notification_preference_wa"!==e&&"country_code"!==e)return(0,y.jsxs)(es.A,{flex:"row",children:[(0,y.jsx)(B.A,{fontSize:"14px",children:ei(e)}),(0,y.jsx)(B.A,{fontSize:"14px",fontWeight:"bold",sx:{wordBreak:"break-word",overflowWrap:"break-word"},children:M?q[e]:en[e]}),(0,y.jsx)(eS.A,{borderColor:"minimal",sx:{mb:"16px",mt:"8px"}})]},e)}),M&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(B.A,{sx:{fontSize:"14px",color:Z.palette.text.secondary,mb:"10px"},children:P("key_contact_info_disclaimer")}),(0,y.jsx)(B.A,{sx:{cursor:"pointer",color:Z.palette.primary.main,fontWeight:"bold",fontSize:"14px"},onClick:()=>{G({show:!0,code:"EDIT_CONFIRMATION"})},children:P("key_change_contact_info_cta")})]})]})]})})]})}),(0,y.jsx)(es.A,{sx:{background:Z.palette.background.secondary,p:"20px",borderRadius:"12px",mt:"24px"},children:(0,y.jsxs)(es.A,{direction:"row",pr:{xs:"8px",md:"0px"},children:[(0,y.jsx)(F.A,{children:(0,y.jsx)(i6.A,{width:"40px",height:"40px"})}),(0,y.jsx)(es.A,{spacing:2,flexGrow:1,children:(null==z?void 0:z.length)&&(null==er?void 0:er.map((e,t)=>{let n=j?z[t]:z[0];return(0,y.jsxs)(y.Fragment,{children:[t>0&&(0,y.jsx)(F.A,{px:"16px",mt:"0px !important",mr:"0px !important",children:(0,y.jsx)(eS.A,{sx:{mt:{xs:"4px",md:"0px"}}})}),(0,y.jsxs)(tw.A,{sx:{background:Z.palette.background.secondary,boxShadow:"none",minHeight:"unset",":before":{opacity:"0"}},children:[(0,y.jsx)(tC.A,{expandIcon:(0,y.jsx)(tO.A,{}),sx:{mb:{xs:"8px",md:"16px"},minHeight:"40px !important",height:"40px !important","&.Mui-expanded":{minHeight:"40px !important",height:"40px !important"}},children:(0,y.jsxs)(es.A,{children:[(0,y.jsxs)(es.A,{direction:"row",children:[(0,y.jsx)(B.A,{color:Z.palette.text.primary,sx:{typography:{xs:"h4",md:"h5Desk"},wordBreak:"break-word",overflowWrap:"break-word",overflow:"hidden",textOverflow:"ellipsis",WebkitLineClamp:1,"-webkit-box-orient":"vertical",display:"-webkit-box"},children:n.full_name}),er.length>1&&(0,y.jsxs)(B.A,{color:Z.palette.text.secondary,fontWeight:"bold",sx:{marginLeft:"5px",typography:{xs:"h4",md:"h5Desk"}},children:[t+1,"/",er.length]})]}),e&&(0,y.jsx)(iX,{ticket:e})]})}),(0,y.jsxs)(tS.A,{sx:{pb:"0px",pt:"0px"},children:[Object.keys(n).map(e=>{if("full_name"!==e&&!e.includes("_files")&&!e.includes("_states"))return(0,y.jsxs)(es.A,{flex:"row",children:[(0,y.jsx)(B.A,{fontSize:"14px",children:ei(e)}),(0,y.jsx)(B.A,{fontSize:"14px",fontWeight:"bold",sx:{wordBreak:"break-word",overflowWrap:"break-word"},children:Array.isArray(n[e])?n[e].join(", "):n[e]}),(0,y.jsx)(eS.A,{borderColor:"minimal",sx:{mb:"16px",mt:"8px"}})]},e)}),(0,y.jsx)(B.A,{sx:{cursor:"pointer",color:Z.palette.primary.main,fontWeight:"bold",fontSize:"14px"},onClick:C,children:P("change")})]})]})]})}))})]})}),H&&(0,y.jsxs)(es.A,{direction:"row",my:"24px",textAlign:"center",children:[(0,y.jsx)(ep.A,{width:24,height:24,sx:{color:Z.palette.info.main}}),(0,y.jsx)(B.A,{ml:"8px",children:P("eventGuestFormContactConfirmationSe
1ndToParticipantEmail")})]})]})]}),$&&(0,y.jsx)(D.A,{item:!0,md:4,xs:12,sx:{borderLeft:"1px solid ".concat(Z.palette.border.subtitle),pl:"24px"},children:(0,y.jsx)(es.A,{sx:{position:"sticky",top:"96px"},children:(0,y.jsx)(es.A,{mb:"32px",children:ee?(0,y.jsxs)(es.A,{spacing:"24px",children:[(0,y.jsx)(nu,{selectedSeats:J,isDisablePaymentButton:!1,onBuyTicket:el}),(null==N?void 0:N.showTnCParagraph)&&(0,y.jsx)(eo,{})]}):(0,y.jsx)(iY,{salePrice:null==U||null==(_=U.event_summary)?void 0:_.min_sale_price,isDisablePaymentButton:!1,onBuyTicket:el,totalTicket:J.length||k,selectedSeats:J,selectedTicketOptions:W,FooterContent:(null==N?void 0:N.showTnCParagraph)&&(0,y.jsx)(eo,{})})})})}),!$&&(0,y.jsxs)(y.Fragment,{children:[(null==N?void 0:N.showTnCParagraph)&&(0,y.jsx)(es.A,{sx:{marginTop:"16px",marginBottom:(0,R.bN)()&&"64px"},children:(0,y.jsx)(eo,{})}),(0,y.jsx)(es.A,{sx:{position:"fixed",bottom:0,left:0,width:"100%",background:Z.palette.background.secondary,padding:"16px",boxShadow:{xs:"0px 0px 24px 0px ".concat(Z.palette.border.subtitle),md:"none"}},children:ee?(0,y.jsx)(np,{selectedSeats:J,isDisablePaymentButton:!1,onBuyTicket:el}):(0,y.jsx)(iK,{salePrice:null==U||null==(v=U.event_summary)?void 0:v.min_sale_price,isDisablePaymentButton:!1,onBuyTicket:el,totalTicket:J.length||k,selectedSeats:J,selectedTicketOptions:W})})]})]})})}var i4=n(4957),i8=n(59771),i7=n(20747);let i9=function(e){let{id:t="",title:n="",cancelLabel:i="",content:r="",showModal:l=!1,onCloseAction:o=()=>{},onSubmitAction:a=()=>{},onLeftBtnAction:s=()=>{},submitLabel:c="",isRequesting:d=!1,fullWidth:u=!1,hideButtonRequest:p=!1,hideCancelButton:x=!0,onCancelAction:m=()=>{},hideHeader:h=!1,LeftBtnLabel:_="",hideCloseButton:v=!1,submitButtonId:g="",swapButtonPosition:f=!1,closeButtonId:b="",variant:A="filled",isXenditIframe:k=!1,isEventOrderDetail:j=!1,isVoucher:w=!1,sx:C={}}=e;return(0,y.jsx)(ni.A,{id:t,open:l,onClose:()=>o(),sx:{...C},children:(0,y.jsx)(i7.rf,{isXenditIframe:k,isEventOrderDetail:j,isVoucher:w,children:(0,y.jsxs)(es.A,{sx:{height:"100%"},children:[!h&&(0,y.jsxs)(es.A,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[(0,y.jsx)(i7.wt,{children:n}),!v&&(0,y.jsx)(i7.IL,{buttonVariant:"nude",onClick:()=>o(),sx:{textTransform:"unset"},id:""!==b&&b,children:i&&""!==i?i:(0,y.jsx)(q.A,{})})]}),(0,y.jsx)(i7.$m,{children:r}),(0,y.jsxs)(i7.II,{children:[!p&&(0,y.jsxs)(i7.YD,{direction:"row",justifyContent:u?"center":"flex-start",alignItems:"center",spacing:2,style:f?{display:"flex",flexDirection:"row-reverse"}:{},children:[""!==_&&(0,y.jsx)(G.A,{buttonVariant:"outlined",disableElevation:!0,fullWidth:!0,onClick:s,disabled:d,sx:{textTransform:"unset",height:"44px"},children:_}),""!==c&&(0,y.jsx)(G.A,{buttonVariant:A,disableElevation:!0,fullWidth:!0,onClick:a,disabled:d,sx:{textTransform:"unset",height:"44px"},id:""!==g&&g,style:f?{marginLeft:0,marginRight:16}:{},children:c})]}),!x&&(0,y.jsx)(i7.YD,{direction:"row",justifyContent:u?"center":"flex-start",alignItems:"center",spacing:2,children:(0,y.jsx)(i7.g6,{background:"transparent",variant:"outlined",disableElevation:!0,fullWidth:!0,onClick:m,disabled:d,sx:{textTransform:"unset"},style:{marginTop:12},children:i})})]})]})})})};var re=n(29647),rt=n(39848),rn=n(25782),ri=n(1732);function rr(e){let{selectedSeats:t,salePrice:n,onBuyTicket:i,isDisablePaymentButton:r,totalTicket:l,FooterContent:o=null,selectedTicketOptions:a}=e,[s,c]=(0,f.useState)(!1),{t:d}=(0,T.Bd)(),u=(0,E.A)();return(0,y.jsxs)(es.A,{spacing:"24px",children:[(0,y.jsxs)(es.A,{gap:2,sx:{boxShadow:"0px 0px 8px 0px ".concat(u.palette.border.minimal),borderRadius:"8px",padding:"16px"},children:[(0,y.jsx)(B.A,{variant:"normalBold",sx:{color:u.palette.text.primary},children:d("eventParticipantFormScreenTitle")}),(0,e$.A)(a)?(0,y.jsxs)(es.A,{gap:2,children:[(0,y.jsxs)(es.A,{direction:"row",justifyContent:"space-between",children:[(0,y.jsx)(B.A,{id:"c-seat-selection-num-selected-seats",variant:"normalRegular",sx:{color:u.palette.text.secondary},children:d("eventCartDetailModalEntryCount",{count:l})}),(0,y.jsx)(B.A,{id:"c-seat-selection-total-price",variant:"normalBold",sx:{color:u.palette.text.primary},children:0===n?"Gratis":(0,eI.A)(l*n)})]}),t.length>0&&(0,y.jsxs)(es.A,{direction:"row",flexWrap:"wrap",gap:1,children:[t.map(e=>(0,y.jsx)(iG,{...e},e.id)),(0,y.jsx)(F.A,{sx:{marginBottom:"4px"},children:!t.length&&(0,y.jsx)(B.A,{variant:"smallRegular",sx:{color:u.palette.text.tertiery},children:d("eventCartDetailModalChosenSeat")})})]})]}):(0,y.jsx)(iL,{selectedTickets:a}
1),(0,y.jsx)(eH.A,{id:"b-seat-selection-purchase",disabled:r,buttonVariant:"filled",sx:{borderRadius:"8px"},loading:s,onClick:async()=>{c(!0),await i(),c(!1)},children:d("continueText")})]}),o]})}function rl(e){let{selectedSeats:t,salePrice:n,isDisablePaymentButton:i,onBuyTicket:r,totalTicket:l,selectedTicketOptions:o}=e,{t:a}=(0,T.Bd)(),[s,c]=(0,f.useState)(!1),d=(0,E.A)();return(0,e$.A)(o)?(0,y.jsx)(F.A,{children:(0,y.jsxs)(es.A,{gap:1.5,flex:1,mt:"8px",children:[t.length>0&&(0,y.jsx)(es.A,{direction:"row",flexWrap:"wrap",justifyContent:"center",gap:1,flex:1,children:t.map(e=>(0,y.jsx)(iG,{...e},e.id))}),(0,y.jsxs)(es.A,{direction:"row",justifyContent:"space-between",children:[(0,y.jsxs)(es.A,{children:[(0,y.jsx)(B.A,{id:"c-seat-selection-num-selected-seats",variant:"smallRegular",sx:{color:d.palette.text.secondary,marginBottom:"2px"},children:a("eventCartDetailModalEntryCount",{count:l})}),(0,y.jsx)(B.A,{id:"c-seat-selection-total-price",variant:"h3",sx:{color:d.palette.text.primary},children:0===n?"Gratis":(0,eI.A)(l*n)})]}),(0,y.jsx)(eH.A,{id:"b-seat-selection-purchase",disabled:i,buttonVariant:"filled",loading:s,onClick:async()=>{c(!0),await r(),c(!1)},sx:{padding:"12px 16px"},children:a("continueText")})]})]})}):(0,y.jsx)(iR,{cta:a("continueText"),onBuyTicket:r,selectedTicketOptions:o,isDisablePaymentButton:i})}var ro=n(19412),ra=n(6003),rs=function(e){return e.full_name="name",e.phone_number="tel",e.email="email",e}({}),rc=n(88992),rd=n(65119),ru=n(61694);let rp=e=>"."+e.substring(e.lastIndexOf(".")+1).toLowerCase(),rx=async e=>new Blob([await e.arrayBuffer()],{type:e.type}),rm=async(e,t,n)=>{var i;let r=await (0,rd.A)({url:e,method:"POST",token:(0,iU.p)(),data:{ext:t,...n}});if((null==r||null==(i=r.data)?void 0:i.code)!=="SUCCESS")throw Error("Failed to get presigned URL");return r.data.data},rh=async e=>{let{url:t,handleErrorUploadImage:n=()=>{},onProgressChange:i,additionalData:r={},setRequest:l,images:o,defaultErrorText:a="Upload failed",onSuccess:s=()=>{}}=e;if(!o)throw Error("No image provided");let c=Array.isArray(o)?o:[o],d={success:[],failed:[]};if((await Promise.allSettled(c.map(async(e,o)=>{try{let c=await rm(t,rp(e.name),r),d=await rx(e);return await (0,ru.D)({headers:c.presign_url_headers,contentType:e.type,url:c.presign_url,blob:d,handleUploadProgress:e=>i({index:o,progress:e}),setRequest:e=>{l&&l({request:e,index:o})},handleError:t=>{let i=t instanceof Error?t:Error(a);throw n(i,e.name),i}}),s(c,o),c}catch(t){throw Object.assign(t instanceof Error?t:Error((null==t?void 0:t.message)||a),{fileName:e.name})}}))).forEach((e,t)=>{"fulfilled"===e.status?d.success.push(e.value):d.failed.push(e.reason),i({index:t,progress:100})}),!Array.isArray(o)){var u;if(d.success.length>0)return d.success[0];throw(null==(u=d.failed[0])?void 0:u.error)||Error(a)}if(d.failed.length>0){let e=Error("".concat(d.failed.length," file(s) failed to upload"));throw Object.assign(e,{details:d.failed,result:d}),e}return 0===d.failed.length?d.success:d},r_=e=>{let{name:t,label:n,validation:i={},file_upload_url:r,additionalData:l}=e,{t:o}=(0,T.Bd)(),{setValue:a,trigger:s,getValues:c,setError:d,clearErrors:u,watch:p}=(0,rc.xW)(),x=(0,f.useRef)([]),m=(0,f.useRef)(!1),h=p("".concat(t,"_states")),_=(0,f.useMemo)(()=>h||[],[h]),v=(0,f.useCallback)(e=>(null!=e?e:[]).map(e=>".".concat(e.toLowerCase())).join(","),[]),g=(0,f.useCallback)((e,n)=>{let i=[...c("".concat(t,"_states"))||[]];i[e]={...i[e],...n},a("".concat(t,"_states"),i,{shouldValidate:!1})},[t,a,c]),y=(0,f.useCallback)(()=>{let e=(c("".concat(t,"_states"))||[]).map(e=>e.uploadedFilename).filter(e=>null!==e);a(t,e,{shouldValidate:!1})},[t,a,c]),b=(0,f.useCallback)(async(e,n)=>{g(n,{isUploading:!0,hasError:!1,errorMessage:null,progress:0});try{await rh({url:r,images:[e],additionalData:l,onProgressChange:e=>{let{progress:t}=e;g(n,{progress:null!=t?t:0})},setRequest:e=>{let{request:t}=e;x.current[n]=t},onSuccess:e=>{g(n,{uploadedFilename:e.filename,isUploading:!1,progress:100,hasError:!1,uploadedUrl:e.presign_url}),y()}})}catch(e){var i;g(n,{isUploading:!1,hasError:!0,errorMessage:(null==e||null==(i=e.details)?void 0:i[0])||"Upload failed",progress:0}),d(t+"_files",{message:o("dynamicFormFailedUploadErrorText")})}},[r,l,t,d,o,g,y]),A=(0,f.useCallback)(async(e,r)=>{if(!e||0===e.length)return;let l=Array.from(e),p=c("".concat(t,"_states"))||[],x=[...p.map(e=>e.file),...l];if(x.length>i.max_length)return void d(t+"_files",{type:"max-files",message:o("dynamicFormMaxLengthErrorText",{fieldLabel:n,maxLength:i.max_length,unit:o("validationErrorMessageUnitFile")})});a("".concat(t,"_files"),x,{shouldValidate:!1}),m.current=!0;let h=await s("".concat(t,"_files"));if(m.current=!1,h){let e=l.map(e=>({file:e,uploadedFilename:null,progress:0,isUploading:!1,hasError:!1,errorMessage:null,uploadedUrl:null})),n=p.length,i=[...p,...e];a("".concat(t,"_states"),i,{shouldValidate:!1}),a("".concat(t,"_files"),x,{shouldValidate:!1}),u(t),e.forEach((e,t)=>{b(l[t],n+t)})}else{let e=p.map(e=>e.file);a("".concat(t,"_files"),e,{shouldValidate:!1}),a("".concat(t,"_states"),p,{shouldValidate:!1})}r&&(r.value="")},[t,a,s,u,b,c,i.max_length,d,n,o]);return{fileStates:_,getAcceptString:v,handleFileInputChange:A,deleteFileAtIndex:(0,f.useCallback)(e=>{x.current[e]&&x.current[e].abort();
1let n=(c("".concat(t,"_states"))||[]).filter((t,n)=>n!==e);a("".concat(t,"_states"),n,{shouldValidate:!1}),a("".concat(t,"_files"),n.map(e=>e.file),{shouldValidate:!1}),x.current=x.current.filter((t,n)=>n!==e),y(),s("".concat(t,"_files"))},[t,s,a,c,y]),retryUploadAtIndex:(0,f.useCallback)(e=>{let n=(c("".concat(t,"_states"))||[])[e];n&&(u(t),b(n.file,e))},[b,u,t,c]),isDisabled:_.length>=i.max_length}};function rv(e){let{name:t,label:n,placeholder:i="Upload File",validation:r={},description:l,file_upload_url:o,additionalData:a}=e,{getValues:s,setValue:c}=(0,rc.xW)(),{fileStates:d,getAcceptString:u,handleFileInputChange:p,deleteFileAtIndex:x,retryUploadAtIndex:m,isDisabled:h}=r_({name:t,label:n,validation:r,file_upload_url:o,additionalData:a});return(0,f.useEffect)(()=>{let e=s("".concat(t,"_files")),n=s("".concat(t,"_states"));if(e&&Array.isArray(e)&&e.length>0&&(!n||0===n.length)){let n=e.map(e=>({file:e,uploadedFilename:null,progress:0,isUploading:!1,hasError:!1,errorMessage:null,uploadedUrl:null}));c("".concat(t,"_states"),n,{shouldValidate:!1})}},[]),(0,y.jsx)(ro.ee,{allowedFileExtension:u(null==r?void 0:r.allowed_file_extensions),files:d,name:t+"_files",onChange:e=>p(e.target.files,e.target),onDeleteFile:x,onRetry:m,required:r.required,description:l,disabled:h,label:n,placeholder:i})}let rg=(0,f.memo)(e=>{let t=(0,E.A)(),[,n]=(0,f.useState)(0),i=t=>{let n=t.nativeEvent;if(e.validation.number_only&&!/^\d+$/.test(n.data))return t.preventDefault(),!1},r=e=>{let t=e.nativeEvent;if(tI.U7.test(t.data))return e.preventDefault(),!1},l=e=>{i(e),r(e)};return(0,y.jsx)(es.A,{sx:{".MuiOutlinedInput-root":{marginTop:0},"& .MuiOutlinedInput-root.Mui-disabled input, & .MuiOutlinedInput-root.Mui-disabled textarea":{WebkitTextFillColor:"".concat(t.palette.text.tertiery," !important")},"& .MuiFormLabel-root.Mui-disabled":{color:"".concat(t.palette.text.tertiery," !important")}},spacing:.5,id:e.component_id||null,children:(0,y.jsx)(()=>{switch(e.type){case"TEXT":return(0,y.jsx)(ro.o3,{name:e.name,required:e.validation.required,multiline:!1,rows:1,fullWidth:!0,autoComplete:rs[e.name],className:"i-custom-field-text",type:e.validation.number_only?"number":"text",onWheel:e=>e.target.blur(),"data-testid":"i-common-rhf-text-field",onKeyDown:e=>{("ArrowUp"===e.key||"ArrowDown"===e.key)&&e.preventDefault()},label:e.label,placeholder:e.placeholder,description:e.description,disabled:e.disabled,onBeforeInput:l,onCompositionEnd:t=>{e.setValue(e.name,t.nativeEvent.target.value.replace(tI.U7,""))},inputMode:e.validation.number_only?"numeric":"text",slotProps:{htmlInput:{inputMode:e.validation.number_only?"numeric":"text"}}});case"PARAGRAPH":return(0,y.jsx)(ro.fV,{maxRows:4,name:e.name,required:e.validation.required,autoComplete:rs[e.name],className:"i-custom-field-text-area",onWheel:e=>e.target.blur(),"data-testid":"i-common-rhf-text-area",minRows:4,disabledErrorBorder:!0,maxCount:e.validation.max_length,label:e.label,description:e.description});case"RADIO_BUTTON":return(0,y.jsx)(ro.b$,{"data-testid":"i-common-rhf-radio-button",options:e.options.map(e=>({value:e.value,label:e.value})),sxRadioGroup:{flexDirection:"row"},required:e.validation.required,name:e.name,label:e.label,description:e.description});case"CHECKBOX":return(0,y.jsx)(ro.SF,{...e,"data-testid":"i-common-rhf-checkbox",options:e.options.map(e=>({value:e.value,label:e.value})),required:e.validation.required,maxLength:e.validation.max_length,sxFormGroup:{flexDirection:"row"}});case"DROPDOWN":return(0,y.jsx)(ro.tX,{...e,"data-testid":"i-common-select-dropdown",onChangeValue:t=>{e.setValue(e.name,t,{shouldValidate:!0,shouldTouch:!0}),n(e=>e+1)},value:e.getValues(e.name),displayEmpty:!0,required:e.validation.required,disableUnderline:!0,sx:{marginTop:0},children:e.options.map(e=>(0,y.jsx)(ra.A,{value:e.value,children:e.value},e.key))});case"DATE":return(0,y.jsx)(ro.ZE,{...e,"data-testid":"i-common-date-picker",required:e.validation.required,onChange:t=>{let n=t?(0,ec.Ay)({date:t,format:"YYYY-MM-DD"}):null;e.setValue(e.name,n,{shouldValidate:!0,shouldTouch:!0})},value:e.getValues(e.name)?new Date(e.getValues(e.name)):null,maxDate:e.validation.max_date?(0,iJ.z4)(e.validation.max_date):void 0,minDate:e.validation.min_date?(0,iJ.z4)(e.validation.min_date):void 0});case"PHONE":return(0,y.jsx)(ro.nU,{name:e.name,label:e.label,placeholder:e.placeholder,description:e.description,"data-testid":"i-common-phone-field",isHideFlag:!1,required:e.validation.required,disabled:e.disabled,readOnlyCountryCode:e.disabled,sxCountryCodeLabel:{transform:"none",...e.disabled&&{color:t.palette.text.tertiery}},sxCountryCodeContainer:{border:"none",...e.disabled&&{color:t.palette.text.tertiery,cursor:"not-allowed"}},type:"number",onKeyDown:e=>{("ArrowUp"===e.key||"ArrowDown"===e.key)&&e.preventDefault()},onWheel:e=>e.target.blur(),autoComplete:rs[e.name],onBeforeInput:l,onCompositionEnd:t=>
1{e.setValue(e.name,t.nativeEvent.target.value.replace(tI.U7,""))},inputMode:"numeric",slotProps:{htmlInput:{inputMode:"numeric"}}});case"ATTACHMENT":return(0,y.jsx)(rv,{name:e.name,label:e.label,placeholder:e.placeholder,description:e.description,validation:e.validation,file_upload_url:e.file_upload_url,disabled:e.disabled,additionalData:null==e?void 0:e.additionalData});default:return null}},{})})});var ry=n(71090);let rf=()=>{let e=(0,n_._v)(e=>e.contactInfoAreaCode),t=(0,n_._v)(e=>e.contactInfoFormValue),{disableContactInfoOnPrefill:n}=(0,eQ.XI)();return(0,f.useMemo)(()=>[{type:"TEXT",name:"full_name",label:"name",description:"eventGuestFormContactInfoFullNameDesc",validation:{required:!0,number_only:!1,min_length:3,max_length:60,custom_validation:"^[a-zA-Z\\s\\.\\-']+$"},placeholder:"accountNameHint",value:"",disabled:!!(n&&t.full_name),_id:1},{type:"PHONE",name:"phone_number",label:"signInPhoneNumberLabel",description:"eventGuestFormContactInfoPhoneNumberDescription",validation:{required:!0,number_only:!0,min_length:6,max_length:15,custom_validation:"^(?!0)(?!".concat((null==e?void 0:e.areaCode.replace("+",""))||"",")[0-9]*$")},placeholder:"phoneNumberInputsPhoneNumberPlaceholder",value:"",disabled:!!(n&&t.phone_number),_id:2},{name:"send_notification_preference_wa",type:"CHECKBOX",disabled:!1,label:"",validation:{required:!1,min_length:0},options:[{key:"eventGuestFormContactInfoSendToWhatsApp",value:(0,nC.t)("eventGuestFormContactInfoSendToWhatsApp")}]},{type:"TEXT",name:"email",label:"signInUsernameLabel",description:"eventGuestFormContactInfoEmailDesc",validation:{required:!0,number_only:!1,min_length:3,max_length:100,custom_validation:"^(?!.*\\s)([a-zA-Z0-9_\\-\\.]+)@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.)|(([a-zA-Z0-9\\-]+\\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\\]?)$"},placeholder:"eventGuestFormContactInfoEmailPlaceholder",value:"",disabled:!1,_id:3}],[e,t,n])};var rb=n(91408);let rA=e=>{let{label:t,validation:n,validationErrorMessage:i}=e,r=rb.gl(),{required:l,min_length:o,max_length:a,max_file_size:s,allowed_file_extensions:c}=n,d=e=>null==e||Array.isArray(e)&&0===e.length||"string"==typeof e&&""===e.trim();if(l&&(r=r.test("required",(null==i?void 0:i.required)||(0,nC.t)("dynamicFormRequiredErrorText",{fieldLabel:t}),e=>!d(e))),o&&o>0&&(r=r.test("min-files",(null==i?void 0:i.min_length)||(0,nC.t)("dynamicFormMinLengthErrorText",{fieldLabel:t,minLength:o,unit:(0,nC.t)("validationErrorMessageUnitFile")}),e=>d(e)?!l:!Array.isArray(e)||e.length>=o)),a&&a>0&&(r=r.test("max-files",(null==i?void 0:i.max_length)||(0,nC.t)("dynamicFormMaxLengthErrorText",{fieldLabel:t,maxLength:a,unit:(0,nC.t)("validationErrorMessageUnitFile")}),e=>d(e)?!l:!Array.isArray(e)||e.length<=a)),s&&s>0){let e=(s/1024).toFixed(1).replace(/\.0$/,"");r=r.test("file-size",(null==i?void 0:i.max_file_size)||(0,nC.t)("attachmentMaxFileSizeError",{fieldLabel:t,maxFileSize:e}),e=>d(e)?!l:(Array.isArray(e)?e:[e]).every(e=>e.size/1024<=s))}if(c.length>0){let e=c.map(e=>e.toLowerCase());r=r.test("file-extension",(null==i?void 0:i.allowed_file_extensions)||(0,nC.t)("attachmentFileExtensionError",{fieldLabel:t,allowedFileExtensions:e.join(", ")}),t=>d(t)?!l:(Array.isArray(t)?t:[t]).every(t=>{var n;let i=(null==(n=t.name.split(".").pop())?void 0:n.toLowerCase())||"";return e.includes(i)}))}return r},rk=e=>{let{label:t,validation:n,validationErrorMessage:i}=e,r=rb.p6();if(r=r.typeError((0,nC.t)("dynamicFormCustomValidationErrorText",{fieldLabel:t})),n.days_before){let e=n.days_before<0,l=e?-1*n.days_before:n.days_before,o="";o=l>365?(0,nC.t)("dynamicFormErrorTextInYears",{inYears:Math.floor(l/365)}):l>30?(0,nC.t)("dynamicFormErrorTextInMonths",{inMonths:Math.floor(l/30)}):(0,nC.t)("dynamicFormErrorTextInDays",{inDays:Math.floor(l)}),r=r.min((0,iJ.PG)(n.days_before),(null==n?void 0:n.error_message)||(null==i?void 0:i.days_before)||(0,nC.t)(e?"dynamicFormDaysBeforeErrorText":"dynamicFormDaysBeforePositiveErrorText",{fieldLabel:t,durationBefore:o}))}if(n.days_after){let e=n.days_after<0,l=e?-1*n.days_after:n.days_after,o="";o=l>365?(0,nC.t)("dynamicFormErrorTextInYears",{inYears:Math.floor(l/365)}):l>30?(0,nC.t)("dynamicFormErrorTextInMonths",{inMonths:Math.floor(l/30)}):(0,nC.t)("dynamicFormErrorTextInDays",{inDays:Math.floor(l)}),r=r.max((0,iJ.PG)(n.days_after),(null==n?void 0:n.error_message)||(null==i?void 0:i.days_after)||(0,nC.t)(e?"dynamicFormDaysAfterNegativeErrorText":"dynamicFormDaysAfterErrorText",{fieldLabel:t,durationAfter:o}))}return n.min_date&&(r=r.min((0,iJ.z4)(n.min_date),(null==n?void 0:n.error_message)||(null==i?void 0:i.min_date)||(0,nC.t)("dynamicFormRequiredErrorText",{fieldLabel:t}))),n.max_date&&(r=r.max((0,iJ.z4)(n.max_date),(null==n?void 0:n.error_message)||(null==i?void 0:i.max_date)||(0,nC.t)("dynamicFormRequiredErrorText",{fieldLabel:t}))),n.required&&(r=r.required((null==i?void 0:i.required)||(0,nC.t)("dynamicFormRequiredErrorText",{fieldLabel:t}))),r},rj=e=>{let{label:t,validation:n,validationErrorMessage:i}=e,r=rb.YO().of(rb.Yj());return n.required&&(r=(r=r.required((null==i?void 0:i.required)||(0,nC.t)("dynamicFormRequiredErrorText",{fieldLabel:t}))).min((null==n?void 0:n.min_length)||1,(null==i?void 0:i.min_length)||(0,nC.t)("dynamicFormMinLengthErrorText",{fieldLabel:t,minLength:(null==n?void 0:n.min_length)||1,unit:(0,nC.t)("validationErrorMessageUnitChoice")}))),n.max_length&&(r=r.max(n.max_length,(null==i?void 0:i.max_length)||(0,nC.t)("dynamicFormMaxLengthErrorText",{fieldLabel:t,maxLength:null==n?void 0:n.max_length,unit:(0,nC.t)("validationErrorMessageUnitChoice")}))),r},rw=e=>{let{label:t,validation:n,validationErrorMessage:i,name:r,key:l,fieldType:o}=e,a=rb.Yj().trim();if(n.required&&(a=a.required((null==i?void 0:i.required)||(0,nC.t)("dynamicFormRequiredErrorText",{fieldLabel:t}))),"PHONE"===o?a=a.test("phone-length","",(e,r)=>{let{parent:l,createError:o}=r,{phone_number_code:a}=l,s="".concat((null==a?void 0:a.replace("+",""))||"").concat(e||"").length;return!e||(s<((null==n?void 0:n.min_length)||1)?o({message:(null==i?void 0:i.min_length)||(0,nC.t)("dynamicFormMinLengthErrorText",{fieldLabel:t,minLength:(null==n?void 0:n.min_length)||1,unit:(0,nC.t)("validationErrorMessageUnitChar")})}):!(s>n.max_length)||o({message:(null==i?void 0:i.max_length)||(0,nC.t)("key_max_lengh_max_char2",{label:t,max:n.max_length})}
1))}):(n.min_length&&(a=a.test("min-length",(null==i?void 0:i.min_length)||(0,nC.t)("dynamicFormMinLengthErrorText",{fieldLabel:t,minLength:(null==n?void 0:n.min_length)||1,unit:(0,nC.t)("validationErrorMessageUnitChar")}),e=>!e||e.length>=n.min_length)),n.max_length&&(a=a.max(n.max_length,(null==i?void 0:i.max_length)||(0,nC.t)("key_max_lengh_max_char2",{label:t,max:n.max_length})))),n.number_only&&(a=a.matches(/^\d+$/,(null==i?void 0:i.number_only)||(0,nC.t)("dynamicFormNumberOnlyErrorText",{fieldLabel:t}))),n.min_value&&(a=a.test("min_value",(null==i?void 0:i.min_value)||(0,nC.t)("dynamicFormMinValueErrorText",{fieldLabel:t,minValue:n.min_value}),e=>!e||parseInt(e)>=n.min_value)),n.custom_validation){let e=new RegExp(n.custom_validation);a=a.test("custom_validation",(null==i?void 0:i.custom_validation)||(0,nC.t)("key_invalid_label",{label:t}),t=>!t||e.test(t))}return n.max_file_size&&(a=a.test("max_file_size","",e=>{if(!n.required&&(!e||""===e)||!e||"object"!=typeof e||!("size"in e))return!0;{let i=e.size/1048576,r=n.max_file_size/1024;if(i>r)throw new rb.yI((0,nC.t)("attachmentMaxFileSizeError",{fieldLabel:t,maxFileSize:r.toFixed(0)}));return!0}})),n.allowed_file_extensions&&(a=a.test("file_extension","",e=>{if(!n.required&&(!e||""===e)||!e||"object"!=typeof e||!("name"in e))return!0;{let i=e.name.toLowerCase(),r=n.allowed_file_extensions.map(e=>e.toLowerCase()),l=i.split(".").pop();if(!l||!r.includes(l))throw new rb.yI((0,nC.t)("attachmentFileExtensionError",{fieldLabel:t,allowedFileExtensions:r.join(", ")}));return!0}})),n.is_unique&&(a=a.test("is_unique",(0,nC.t)("key_error_identity_number",{fieldLabel:t}),function(e){var t,n,i;let{from:o,index:a}=this.options,s=(null==o||null==(i=o[1])||null==(n=i.value)||null==(t=n[l])?void 0:t.map(e=>e[r]))||[];
1return!s||0===s.length||!(s.filter((t,n)=>t===e&&a!==n).length>0)})),a},rC=(e,t)=>{let n,{validation:i,validation_error_message:r,label:l,name:o,type:a}=e,s=(0,nC.t)(l);switch(e.type){case"ATTACHMENT":n=rA({label:s,validation:i,validationErrorMessage:r});break;case"DATE":n=rk({label:s,validation:i,validationErrorMessage:r});break;case"CHECKBOX":n=rj({label:s,validation:i,validationErrorMessage:r});break;default:n=rw({label:s,validation:i,validationErrorMessage:r,name:o,key:t,fieldType:a})}return n},rS=(e,t,n)=>{let i={};return(e.forEach(e=>{let n="ATTACHMENT"===e.type?e.name+"_files":e.name;(null==e?void 0:e.validation)&&(i[n]=rC(e,t))}),n)?rb.Ik().shape({[t]:rb.YO().of(rb.Ik(i))}):rb.Ik(i)};var rI=n(88274);let rE=e=>{var t,n;let{selectedTicketOptions:i,selectedSeats:r,totalTicket:l}=e,{t:o}=(0,T.Bd)(),a=(0,E.A)(),s=(0,V.A)(a.breakpoints.up("sm")),{contactInfoFormValue:c,contactInfoAreaCode:d,eventDetailData:u,eventUserDetailData:p,setContactInfoFormValue:x,setBookingError:m,setBookingTimer:h,setEnableBuyerInfoForm:_,selectedAttractionDate:v}=(0,n_._v)(e=>({contactInfoFormValue:e.contactInfoFormValue,contactInfoAreaCode:e.contactInfoAreaCode,eventDetailData:e.eventDetailData,eventUserDetailData:e.eventUserDetailData,setBookingError:e.setBookingError,setBookingTimer:e.setBookingTimer,setBuyerInfoFormValue:e.setBuyerInfoFormValue,setContactInfoFormValue:e.setContactInfoFormValue,setEnableBuyerInfoForm:e.setEnableBuyerInfoForm,selectedAttractionDate:e.selectedAttractionDate})),g=(null==p||null==(n=p.event_summary)||null==(t=n.event_type)?void 0:t.id)===eZ.Ho,{countryData:b}=(0,i$.nc)(e=>({countryData:e.countryData})),A=rf(),k=(0,f.useMemo)(()=>rS(A),[A]),j=(0,rc.mN)({mode:"onChange",reValidateMode:"onChange",resolver:(0,ry.t)(k),values:{...c,send_notification_preference_wa:c.send_notification_preference_wa?[o("eventGuestFormContactInfoSendToWhatsApp")]:[],phone_number:c.phone_number?(0,rI.Rj)("+"+c.phone_number).phoneNumber:"",phone_number_code:(null==d?void 0:d.areaCode)||"+62"},resetOptions:{keepDirtyValues:!0}}),w=eZ.UZ.includes(u.product_uid),{handleSubmit:C,watch:S,formState:{isSubmitting:I}}=j,D=S(),L=k.isValidSync(D),O=async e=>{var t,n,o,a,s,c,d,y,f,A,k,j,C,S,I,E,T,D,B;let{phone_number_code:F,phone_number:L,send_notification_preference_wa:O}=e,R=(0,eJ.pu)(null==p?void 0:p.ticket_options),M=null==(n=R[0])||null==(t=n.ticket_schedules[0])?void 0:t.ticket_schedule_uid,P=R.length>1||e8(null==p?void 0:p.ticket_options),N=r.length>0;try{let t={...e,phone_number:"".concat(F).concat(L).replace("+",""),country_code:b.country_code,send_notification_preference_wa:(null==O?void 0:O.length)>0};delete t.phone_number_code,x({...t});let{book_session_id:n,book_expiry:o}=await (0,ny.e5)(N?{product_uid:u.product_uid,selected_seats:r.map(e=>({seat_uid:e.id})),contact_info:t}:{product_uid:u.product_uid,tickets:P&&!(0,e$.A)(i)?e3(i):[{ticket_schedule_uid:M,qty:l}],contact_info:t,...g&&{visit_date:v.date}});h({show:!0,book_session_id:n,book_expiry:o}),_(!0)}catch(i){let e=null==i||null==(a=i.response)||null==(o=a.data)?void 0:o.code,t=null==i||null==(c=i.response)||null==(s=c.data)?void 0:s.requestId,n={};(null==i||null==(d=i.response)?void 0:d.status)===422&&w&&(0,nf.yW)(),"INSUFFICIENT_MIN_PURCHASE"===e?n={title:null==i||null==(k=i.response)||null==(A=k.data)||null==(f=A.data)||null==(y=f.unpurchasable_ticket)?void 0:y.title,qty:null==i||null==(I=i.response)||null==(S=I.data)||null==(C=S.data)||null==(j=C.unpurchasable_ticket)?void 0:j.min_purchasable_quota}:"USER_OVERBOOKED"===e&&(n={limit:null==i||null==(B=i.response)||null==(D=B.data)||null==(T=D.data)||null==(E=T.quantity_overbooked)?void 0:E.max_quantity_per_user}),"BOOKING_ONGOING"===e&&(h({show:!1,book_expiry:i.response.data.data.book_expiry,book_session_id:i.response.data.data.book_session_id}),n={minutes:(0,iJ.hO)(i.response.data.data.book_expiry)}),m({show:!0,code:e,requestId:t,data:n})}};return(0,y.jsx)(ro.Op,{onSubmit:C(O),methods:j,children:(0,y.jsxs)(es.A,{direction:"row",spacing:{xs:1,sm:2},pr:{xs:"8px",md:"0px"},children:[(0,y.jsx)(i5,{width:s?"48px":"36px",height:s?"48px":"36px"}),(0,y.jsxs)(es.A,{flexGrow:1,spacing:2,children:[(0,y.jsx)(B.A,{color:a.palette.text.primary,sx:{fontWeight:a.typography.h4.fontWeight+"!important",fontSize:a.typography.h4.fontSize+"px !important",lineHeight:a.typography.h4.lineHeight+"!important",fontFamily:a.typography.h4.fontFamily+"!important",[a.breakpoints.up("md")]:{fontWeight:a.typography.h4Desk.fontWeight+"!important",fontSize:a.typography.h4Desk.fontSize+"px !important",lineHeight:a.typography.h4Desk.lineHeight+"!important",fontFamily:a.typography.h4Desk.fontFamily+"!important"}},children:o("eventGuestFormContactInfoTitle")}),(0,y.jsx)(es.A,{spacing:2,sx:{"& .Mui-disabled, & .Mui-disabled input, & .Mui-disabled textarea":{cursor:"not-allowed !important"}},children:A.map(e=>(0,f.createElement)(rg,{...e,key:e._id,type:e.type,description:o(e.description),label:o(e.label),placeholder:o(e.placeholder),getValues:j.getValues,setValue:j.setValue}))}),(0,y.jsx)(F.A,{textAlign:"right",children:(0,y.jsx)(eH.A,{id:"b-contact-info-form-save",sx:{padding:"20px 42px !important"},type:"submit",buttonVariant:"ghost",fullWidth:!1,loading:I,disabled:!L||I,
1children:o("continueText")})}),(0,y.jsx)(eS.A,{borderColor:"minimal",sx:{mt:"32px !important"}})]})]})})},rT=e=>{let{formMethods:t,questions:n,formIndex:i,repeatQuestion:r,bookSessionId:l}=e,o=(0,f.useCallback)(t.getValues,[t.getValues]),a=(0,f.useCallback)(t.setValue,[t.setValue]),s=(0,f.useMemo)(()=>({book_session_id:l}),[l]);return(0,y.jsx)(ro.Op,{methods:t,children:(0,y.jsx)(es.A,{spacing:2,children:n.map(e=>(0,y.jsx)(rg,{...e,getValues:o,setValue:a,name:r?"buyerInfo[".concat(i,"].").concat(e.name):e.name,disabled:!1,type:e.type,additionalData:s},"buyerInfo-".concat(i,"-").concat(e.name)))})})};var rD=n(45900),rB=n(18935),rF=n(97216);function rL(){return(rL=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(null,arguments)}let rO=function(e){return f.createElement("svg",rL({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"5 2.5 30 35"},e),s||(s=f.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15 7.688c-.33.193-.714.302-1.124.302a2.21 2.21 0 01-1.953-1.17 1.88 1.88 0 00-.474-.558 2.275 2.275 0 00-1.412-.48H7.219A2.22 2.22 0 005 7.99v19.666h1.506c.307 0 .556.245.556.547a.551.551 0 01-.556.547H5v5.447a2.22 2.22 0 002.219 2.21h2.818c.766 0 1.52-.377 1.886-1.039.127-.234.294-.443.492-.617A2.201 2.201 0 0115 34.505V7.688zm-1.6 20.515a.551.551 0 00-.555-.547H9.518a.551.551 0 00-.555.547c0 .302.248.547.555.547h3.327a.551.551 0 00.556-.547z",fill:"#C4CDD5"})),c||(c=f.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.379 13.438c.46 0 .833.367.833.82 0 .453-.373.82-.833.82H9.722a.827.827 0 01-.833-.82c0-.453.373-.82.833-.82h6.657zm0 3.828c.46 0 .833.367.833.82 0 .453-.373.82-.833.82H9.722a.827.827 0 01-.833-.82c0-.453.373-.82.833-.82h6.657zm.833 4.648a.827.827 0 00-.833-.82H9.722a.827.827 0 00-.833.82c0 .453.373.82.833.82h6.657c.46 0 .833-.367.833-.82z",fill:"#fff"})),d||(d=f.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M27.2 36.313a2.5 2.5 0 00-2.2-1.338 2.5 2.5 0 00-2.2 1.338c-.413.758-1.262 1.187-2.125 1.187H17.5c-1.375 0-2.5-1.136-2.5-2.525V28.75h2.57a.551.551 0 00.556-.547.551.551 0 00-.555-.547H15V5.025C15 3.636 16.125 2.5 17.5 2.5h3.175c.863 0 1.712.43 2.125 1.187A2.485 2.485 0 0025 5.025c.95 0 1.775-.53 2.212-1.326.4-.77 1.25-1.186 2.113-1.186h3.188C33.888 2.513 35 3.636 35 5.025v22.631h-2.568a.551.551 0 00-.556.547c0 .302.249.547.556.547H35v6.225c0 1.389-1.125 2.525-2.5 2.525h-3.175c-.863 0-1.712-.43-2.125-1.187zm-3.38-8.657c.307 0 .556.245.556.547a.551.551 0 01-.556.547h-3.264a.551.551 0 01-.555-.547c0-.302.249-.547.555-.547h3.264zm5.623 0c.306 0 .555.245.555.547a.551.551 0 01-.555.547h-2.64a.551.551 0 01-.555-.547c0-.302.249-.547.556-.547h2.639z",fill:"#DFE3E8"})),u||(u=f.createElement("path",{d:"M25 16.406a3.124 3.124 0 100-6.25 3.124 3.124 0 100 6.25zm0 1.563c-2.086 0-6.25 1.047-6.25 3.125v.781c0 .43.352.781.781.781H30.47c.43 0 .781-.351.781-.781v-.781c0-2.078-4.164-3.125-6.25-3.125z",fill:"#fff"})))};function rR(){return(rR=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(null,arguments)}let rM=function(e){return f.createElement("svg",rR({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"6 3.75 36 40"},e),p||(p=f.createElement("path",{d:"M28.354 5.477a6.351 6.351 0 00-8.708 0L7.333 17.072A4.238 4.238 0 006 20.157v19.355a4.236 4.236 0 004.235 4.237h27.53A4.236 4.236 0 0042 39.512V20.157a4.238 4.238 0 00-1.333-3.085L28.354 5.476z",fill:"url(#contact-info-checked_
1svg__paint0_linear_12520_46123)"})),x||(x=f.createElement("path",{d:"M35.646 32.352H11.293V17.4c0-1.68 1.37-3.056 3.044-3.056h3.866c1.05 0 2.085.52 2.588 1.436a3.028 3.028 0 002.678 1.62 3.073 3.073 0 002.694-1.604c.488-.933 1.523-1.437 2.573-1.437h3.881a3.033 3.033 0 013.029 3.041v14.952z",fill:"#fff"})),m||(m=f.createElement("path",{d:"M41.684 18.55L24 31.04 6.316 18.55A4.237 4.237 0 006 20.157v19.355c0 1.28.567 2.427 1.464 3.204L24 31.04l16.536 11.677A4.228 4.228 0 0042 39.512V20.157c0-.557-.11-1.102-.316-1.606z",fill:"url(#contact-info-checked_svg__paint1_linear_12520_46123)"})),h||(h=f.createElement("path",{d:"M40.723 42.546L28.355 30.901a6.351 6.351 0 00-8.708 0L7.279 42.546a4.22 4.22 0 002.957 1.204h27.53a4.22 4.22 0 002.957-1.204z",fill:"url(#contact-info-checked_svg__paint2_linear_12520_46123)"})),_||(_=f.createElement("rect",{x:16,y:23,width:16,height:16,rx:8,fill:"#fff"})),v||(v=f.createElement("path",{d:"M24 24.334a6.67 6.67 0 00-6.666 6.667 6.67 6.67 0 006.667 6.666 6.669 6.669 0 006.666-6.666 6.67 6.67 0 00-6.666-6.667zm-1.806 9.527l-2.393-2.394a.664.664 0 11.94-.94l1.926 1.92 4.587-4.586a.664.664 0 11.94.94l-5.06 5.06a.664.664 0 01-.94 0z",fill:"url(#contact-info-checked_
1svg__paint3_linear_12520_46123)"})),g||(g=f.createElement("defs",null,f.createElement("linearGradient",{id:"contact-info-checked_svg__paint0_linear_12520_46123",x1:24,y1:7.434,x2:24,y2:23.75,gradientUnits:"userSpaceOnUse"},f.createElement("stop",{stopColor:"#9CA1FF"}),f.createElement("stop",{offset:1,stopColor:"#787DFC"})),f.createElement("linearGradient",{id:"contact-info-checked_svg__paint1_linear_12520_46123",x1:24,y1:29.54,x2:24,y2:48.487,gradientUnits:"userSpaceOnUse"},f.createElement("stop",{stopColor:"#A8ABFE"}),f.createElement("stop",{offset:1,stopColor:"#787DFC"})),f.createElement("linearGradient",{id:"contact-info-checked_svg__paint2_linear_12520_46123",x1:24.001,y1:29.174,x2:24.001,y2:43.75,gradientUnits:"userSpaceOnUse"},f.createElement("stop",{stopColor:"#D3D4FF"}),f.createElement("stop",{offset:1,stopColor:"#A9ACFF"})),f.createElement("linearGradient",{id:"contact-info-checked_svg__paint3_linear_12520_46123",x1:28.001,y1:35.334,x2:14.334,y2:20.001,gradientUnits:"userSpaceOnUse"},f.createElement("stop",{stopColor:"#3BAD77"}),f.createElement("stop",{offset:1,stopColor:"#76EF98"})))))};var rP=n(75953),rN=n(95691),rV=n(77e3),rz=n(2059);function rq(e){var t,n,i,r,l,o;let{title:a,salePrice:s,onBuyTicket:c,onBack:d,totalTicket:u,questions:p,selectedSeats:x,selectedTicketOptions:m,repeatQuestion:h,disableBuyButton:_,prefillData:v=null,trackerDefaultState:g={},isCreator:b,containerSx:A={}}=e,{t:k}=(0,T.Bd)(),[j,w]=(0,f.useState)(!1),[C,S]=(0,f.useState)(!1),[I,O]=(0,f.useState)(!1),M=(0,E.A)(),P=!(0,iU.p)(),N=(0,V.A)(M.breakpoints.up("sm")),z=(0,eQ.XI)(),q=(0,rB.E)(e=>({eventPersonalQuestions:e.eventPersonalQuestions})),{bookingTimer:U,buyerInfoFormInit:W,buyerInfoFormValue:H,contactInfoFormValue:G,enableBuyerInfoForm:Y,eventUserDetailData:K,sendToAdditionalEmail:Q,setBookingError:X,setBookingTimer:Z,setBuyerInfoFormInit:$,setBuyerInfoFormValid:J,setBuyerInfoFormValue:ee,setEnableBuyerInfoForm:et,setSendToAdditionalEmail:en,selectedAttractionDate:ei}=(0,n_._v)(e=>({bookingTimer:e.bookingTimer,buyerInfoFormInit:e.buyerInfoFormInit,buyerInfoFormValue:e.buyerInfoFormValue,contactInfoFormValue:e.contactInfoFormValue,enableBuyerInfoForm:e.enableBuyerInfoForm,eventUserDetailData:e.eventUserDetailData,sendToAdditionalEmail:e.sendToAdditionalEmail,setBookingError:e.setBookingError,setBookingTimer:e.setBookingTimer,setBuyerInfoFormInit:e.setBuyerInfoFormInit,setBuyerInfoFormValid:e.setBuyerInfoFormValid,setBuyerInfoFormValue:e.setBuyerInfoFormValue,setEnableBuyerInfoForm:e.setEnableBuyerInfoForm,setSendToAdditionalEmail:e.setSendToAdditionalEmail,selectedAttractionDate:e.selectedAttractionDate})),er=(null==K||null==(n=K.event_summary)||null==(t=n.event_type)?void 0:t.id)===eZ.Ho,el=(null==K||null==(i=K.event_summary)?void 0:i.seating_plan_status)==="ACTIVE",eo=async e=>{try{let t=await fetch(e),n=await t.blob(),i=(()=>{try{return new URL(e).pathname.split("/").pop()||"file"}catch(e){return"file"}})();return new File([n],i,{type:n.type})}catch(e){return console.error("Error converting URL to File:",e),null}},ea=async()=>{let e=(e,t)=>{var n,i,r,l,o,a,s,c;switch(e.name){case"full_name":case"name":return h&&0===t?(null==H||null==(n=H[t])?void 0:n[e.name])||(null==v?void 0:v.full_name)||(null==v?void 0:v.name)||e.value:null==H||null==(i=H[t])?void 0:i[e.name];case"email":return h&&0===t?(null==H||null==(r=H[t])?void 0:r[e.name])||v.email||e.value:null==H||null==(l=H[t])?void 0:l[e.name];case"phone_number":return h&&0===t?(null==H||null==(o=H[t])?void 0:o[e.name])||(null==(a=v.phone)?void 0:a.replace("+",""))||e.value:null==H||null==(s=H[t])?void 0:s[e.name];default:return null==H||null==(c=H[t])?void 0:c[e.name]}},t=async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n={};for(let i of p)if("ATTACHMENT"===i.type){let r=await e(i,t),l=await e({...i,name:i.name+"_states"},t),o=await e({...i,name:i.name+"_files"},t);if(l||o)n["".concat(i.name,"_states")]=l,n["".concat(i.name,"_files")]=o,n[i.name]=r;else{let e=r&&r.length>0?await Promise.all(r.map(async e=>{if("string"==typeof e){let t=await eo(e),n={errorMessage:null,file:t,hasError:!1,isUploading:!1,progress:100,uploadedFilename:t.name,uploadedUrl:e};return t?n:e}return e})):[];n["".concat(i.name,"_states")]=e,n["".concat(i.name,"_files")]=e.filter(e=>"string"!=typeof e&&e.file).map(e=>e.file),n[i.name]=e.map(e=>"string"==typeof e?e:e.uploadedFilename)}}else n[i.name]=e(i,t);return n};if(h){let e=[];for(let n=0;n<u;n++){let i=await t(n);e.push(i)}return{buyerInfo:e}}return t()},ec=(0,f.useMemo)(()=>el?h?x.map(e=>({title:e.ticket.title,seatLabel:e.label})):[void 0]:e4(m,h,u),[m,x]),ed=(0,f.useMemo)(()=>rS(p,"buyerInfo",h),[p,h,u]),eu=(0,rc.mN)({mode:"onChange",resolver:(0,ry.t)(ed),defaultValues:{}});async function ep(){if(eh)await eu.trigger();else try{let t=eu.getValues(),n=h?t.buyerInfo:[t],i={additional_info:n.map(e=>Object.fromEntries(Object.entries(e).filter(e=>{let[t]=e;return!t.includes("_files")&&!t.includes("_states")}))),book_session_id:U.book_session_id,send_to_participant_email:Q};if(ee(n),b)S(!0);else{if(g){var e;(0,nE.sx)("confirm_eticket_additional_form",{...g,state_name:"ETICKET_ADDITIONAL_FORM"}),(0,rz.vO)({title:a,salePrice:s,totalTicket:u,selectedSeats:x,selectedTicketOptions:m,fallbackContentId:null==(e=(0,eJ.pu)(null==K?void 0:K.ticket_options)[0])?void 0:e.ticket_option_uid,trackerDefaultState:g,creatorId:null==g?void 0:g.creator_id})}let{book_expiry:t,book_session_id:n}=await (0,ny.DB)(i);Z({show:!0,book_expiry:t,book_session_id:n}),c()}window.scrollTo(0,0)}catch(i){let{data:e,code:t,requestId:n}=i.response.data;X({show:!0,code:t,data:e,requestId:n})}}(0,f.useEffect)(()=>{I||e();async function e(){let e=await ea();eu.reset(e),O(!0)}},[I]);let ex=x.length>0?x:[];(0,f.useEffect)(()=>{q.eventPersonalQuestions.addUserAdditionalInfo(H)},[H]),(0,f.useEffect)(()=>{q.eventPersonalQuestions.setUserContactInfo(G)},[G]),(0,f.useEffect)(()=>{q.eventPersonalQuestions.setSendToAdditionalEmail(Q)},[Q]),(0,f.useEffect)(()=>
1{if(null==z?void 0:z.showPreventNavigate){let e=e=>{e.preventDefault()};return window.addEventListener("beforeunload",e),()=>{window.removeEventListener("beforeunload",e)}}},[z]),(0,f.useEffect)(()=>{P||et(!0),W||(g&&(0,nE.sx)("visit_eticket_additional_form",{...g,state_name:"ETICKET_ADDITIONAL_FORM"}),ee([]),J([]),$(!0))},[]);let em=!(_||(0,iU.p)())&&!Y,eh=(0,f.useMemo)(()=>{let e=eu.formState.isValid;return _||(0,iU.p)()?!e:!e||!Y},[_,eu.formState.isValid,Y]);if(!W||!p)return null;let e_=e=>{w(e.target.checked),e.target.checked&&p.filter(e=>Object.keys(G).includes(e.name)).forEach(e=>{let t=h?"buyerInfo[0].".concat(e.name):e.name;eu.setValue(t,(null==G?void 0:G[e.name])||"",{shouldValidate:!0})})};function ev(){var e;return(null==K||null==(e=K.event_summary)?void 0:e.is_hide_send_to_all)?null:(0,y.jsxs)(es.A,{direction:"row",sx:e=>{var t;return{color:e.palette.text.primary,border:"1px solid ".concat(e.palette.background.tertiery),borderRadius:"8px",padding:"8px",mx:!N&&"8px",mb:!(null==z||null==(t=z.layout)?void 0:t.showFooter)&&"150px"}},justifyContent:"space-between",children:[(0,y.jsx)(B.A,{fontSize:"14px",mt:"2px",children:h&&u>1?k("eventParticipantFormSendEmailLabel"):k("eventParticipantFormNonRepeatedSendEmailLabel")}),(0,y.jsx)(rD.A,{id:"b-order-form-send-ticket-to-email-toggle",color:"primary",size:"small",checked:Q,onChange:e=>{en(e.target.checked)}})]})}return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(D.A,{container:!0,sx:{maxWidth:{lg:"1152px"},marginX:"auto",position:"relative",mb:!(null==z||null==(r=z.layout)?void 0:r.showFooter)&&"150px",...A},children:[(0,y.jsxs)(D.A,{item:!0,md:8,xs:12,sx:{pr:{md:"24px"}},children:[(null==z?void 0:z.showBackBtnContent)&&!(0,R.bN)()&&(0,y.jsxs)(es.A,{gap:.5,direction:"row",alignItems:"center",onClick:()=>{U.show?X({show:!0,code:"CANCEL_CONFIRMATION"}):($(!1),d())},sx:{cursor:"pointer",alignSelf:"flex-start",mb:"6px",ml:"-8px"},children:[(0,y.jsx)(tc.A,{sx:{color:M.palette.primary.main}}),(0,y.jsx)(B.A,{variant:"normalBold",sx:{color:M.palette.primary.main},children:k("back")})]}),(0,y.jsxs)(es.A,{sx:N?{height:"auto",width:"100%"}:{height:"auto",width:"auto"},spacing:3,children:[(0,y.jsxs)(es.A,{spacing:1,children:[(0,y.jsx)(B.A,{variant:N?"h3Desk":"mediumBold",sx:{color:M.palette.text.primary,lineBreak:"anywhere"},children:a}),er&&(0,y.jsx)(iZ.A,{date:ei.date,timezone:null==K||null==(o=K.event_summary)||null==(l=o.event_timezone)?void 0:l.short_offset}),(0,y.jsx)(B.A,{color:M.palette.text.secondary,fontSize:"14px",children:k("eventParticipantFormListHeader")})]}),P&&!Y&&(0,y.jsx)(rE,{selectedTicketOptions:m,selectedSeats:x,totalTicket:u}),P&&Y&&(0,y.jsx)(y.Fragment,{children:(0,y.jsxs)(es.A,{direction:"row",spacing:{xs:1,sm:2},pr:{xs:"8px",md:"0px"},children:[(0,y.jsx)(F.A,{children:(0,y.jsx)(rM,{width:N?"48px":"36px",height:N?"48px":"36px"})}),(0,y.jsxs)(es.A,{flexGrow:1,spacing:{xs:.5,sm:2},sx:{maxWidth:"100%"},children:[(0,y.jsxs)(es.A,{direction:"row",justifyContent:"space-between",children:[(0,y.jsx)(B.A,{color:M.palette.text.primary,sx:{typography:{xs:"h4",md:"h4Desk"}},children:k("eventGuestFormContactInfoTitle")}),(0,y.jsx)(rF.A,{onClick:()=>X({show:!0,code:"EDIT_CONFIRMATION"}),sx:{cursor:"pointer",color:M.palette.primary.main}})]}),(0,y.jsxs)(es.A,{direction:"column",spacing:1,children:[(0,y.jsxs)(es.A,{id:"c-contact-info-full_name-label",direction:"row",alignItems:"center",sx:{overflowWrap:"anywhere"},spacing:.5,children:[(0,y.jsx)(rP.A,{sx:{width:"16px",height:"16px",color:M.palette.text.tertiery}}),(0,y.jsx)(B.A,{children:G.full_name})]}),(0,y.jsxs)(es.A,{id:"c-contact-info-phone_number-label",direction:"row",alignItems:"center",sx:{overflowWrap:"anywhere"},spacing:.5,children:[(0,y.jsx)(rN.A,{sx:{width:"16px",height:"16px",color:M.palette.text.tertiery}}),(0,y.jsx)(B.A,{children:G.phone_number})]}),(0,y.jsxs)(es.A,{id:"c-contact-info-email-label",direction:"row",alignItems:"center",sx:{overflowWrap:"anywhere"},spacing:.5,children:[(0,y.jsx)(rV.A,{sx:{width:"16px",height:"16px",color:M.palette.text.tertiery}}),(0,y.jsx)(B.A,{children:G.email})]})]}),(0,y.jsx)(eS.A,{borderColor:"minimal",sx:{mt:"20px !important"}})]})]})}),!Y&&(0,y.jsx)(y.Fragment,{children:ec.map((e,t)=>(0,y.jsxs)(es.A,{direction:"row",spacing:{xs:1,sm:2},pr:{xs:"8px",md:"0px"},children:[(0,y.jsx)(rO,{width:N?"48px":"36px",height:N?"48px":"36px",style:{marginTop:t>0&&"24px"}}),(0,y.jsx)(es.A,{flexGrow:1,spacing:2,sx:t>0&&{borderTop:"1px solid ".concat(M.palette.background.tertiery),paddingTop:3},children:(0,y.jsx)(D.A,{container:!0,direction:"row",justifyContent:"space-between",children:(0,y.jsxs)(D.A,{item:!0,xs:12,sm:6,children:[(0,y.jsxs)(B.A,{color:M.palette.text.tertiery,sx:{typography:{xs:"h4",md:"h4Desk"},display:"inline-flex"},children:[k("eventParticipantFormListItemTitle")," ",h&&u>1&&(0,y.jsxs)(B.A,{color:M.palette.text.tertiery,fontWeight:"bold",fontSize:"inherit",sx:{marginLeft:"5px",typography:{xs:"h4",md:"h4Desk"}},children:[t+1,"/",u]})]}),e&&(0,y.jsx)(iX,{ticket:e,disabled:!0})]})})})]},"buyer-info-item-".concat(t)))}),Y&&ec.map((e,t)=>(0,y.jsxs)(es.A,{direction:"row",spacing:{xs:1,sm:2},pr:{xs:"8px",md:"0px"},children:[(0,y.jsx)(i6.A,{width:N?"48px":"36px",height:N?"48px":"36px",style:{marginTop:t>0&&"24px"}}),(0,y.jsxs)(es.A,{flexGrow:1,spacing:2,sx:{borderTop:t>0&&"1px solid ".concat(M.palette.background.tertiery),paddingTop:t>0&&3,width:"100%"},children:[(0,y.jsxs)(D.A,{container:!0,direction:"row",justifyContent:"space-between",children:[(0,y.jsxs)(D.A,{item:!0,xs:12,sm:6,children:[(0,y.jsxs)(B.A,{color:M.palette.text.primary,sx:{typography:{xs:"h4",md:"h4Desk"},display:"inline-flex"},children:[k("eventParticipantFormListItemTitle"),h&&u>1&&(0,y.jsxs)(B.A,{color:M.palette.text.secondary,fontWeight:"bold",fontSize:"inherit",sx:{marginLeft:"5px",typography:{xs:"h4",md:"h4Desk"}},children:[t+1,"/",u]})]}),e&&(0,y.jsx)(iX,{ticket:e})]}),P&&0===t&&(0,y.jsx)(D.A,{item:!0,xs:12,sm:6,children:(0,y.jsxs)(es.A,{direction:"row",sx:e=>N?{color:e.palette.text.primary,marginTop:"4px"}:{marginTop:"8px",color:e.palette.text.primary,border:"1px solid ".concat(e.palette.background.tertiery),borderRadius:"8px",padding:"8px"},justifyContent:{xs:"space-between",sm:"end"},children:[(0,y.jsx)(B.A,{fontSize:"14px",m:"2px 4px 0px 0px",children:k("eventGuestFormDuplicateContactToggle")}),(0,y.jsx)(rD.A,{id:"b-buyer-info-same-as-contact-info-toggle",size:"small",checked:j,onChange:e_})]})})]}),(0,y.jsx)(rT,{formMethods:eu,formIndex:t,questions:p,repeatQuestion:h,bookSessionId:U.book_session_id})]})]},"buyer-info-item-".concat(t)))]})]}),N&&(0,y.jsx)(D.A,{item:!0,md:4,xs:12,sx:{borderLeft:"1px solid ".concat(M.palette.border.subtitle),pl:"24px"},children:(0,y.jsx)(es.A,{sx:{position:"sticky",top:"96px"},children:(0,y.jsx)(es.A,{mb:"32px",children:el?(0,y.jsxs)(es.A,{spacing:"24px",children:[(0,y.jsx)(nu,{selectedSeats:ex,isDisablePaymentButton:em,onBuyTicket:ep}),(0,y.jsx)(ev,{})]}):(0,y.jsx)(rr,{salePrice:s,isDisablePaymentButton:em,onBuyTicket:ep,totalTicket:ex.length||u,selectedSeats:ex,selectedTicketOptions:m,FooterContent:(0,y.jsx)(ev,{})})})})}),!N&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(es.A,{sx:{mt:"16px",width:"100%",marginBottom:(0,R.bN)()&&"100px"},children:(0,y.jsx)(ev,{})}),(0,y.jsx)(es.A,{sx:{position:"fixed",bottom:0,left:0,width:"100%",background:M.palette.background.secondary,padding:"16px",boxShadow:{xs:"0px 0px 24px 0px ".concat(M.palette.border.subtitle),md:"none"}},children:el?(0,y.jsx)(np,{selectedSeats:ex,isDisablePaymentButton:em,onBuyTicket:ep}):(0,y.jsx)(rl,{salePrice:s,isDisablePaymentButton:em,onBuyTicket:ep,totalTicket:ex.length||u,selectedSeats:ex,selectedTicketOptions:m})})]})]}),(0,y.jsxs)(t7.A,{title:"",isOpen:C,onClose:()=>S(!1),hideCloseButton:!1,sxDialogContainer:{"& .MuiDialogContent-root":{padding:"0px"},"& .MuiDialog-paper":{width:"500px"}},sxDrawerContainer:{padding:"16px 0px"}
1,children:[(0,y.jsx)(L.A,{type:"empty-search",sx:{display:"block",marginX:"auto",marginBottom:"24px"}}),(0,y.jsx)(ts.r3,{children:k("key_preview_mode_modal_title")}),(0,y.jsx)(ts.oX,{children:k("key_preview_mode_modal_desc")})]})]})}var rU=n(69488),rW=n(50371),rH=n(91284),rG=n(35829);let rY=e=>{let{ref:t,offset:n=0}=e,i=t.current;if(i){let e=i.getBoundingClientRect().top+window.pageYOffset-n;window.scrollTo({top:e,behavior:"smooth"})}},rK=(0,K.Ay)(F.A)(e=>{let{theme:t}=e;return{width:"100%",maxWidth:1152,margin:"16px auto 0px auto",[t.breakpoints.up("xs")]:{padding:"0px 16px"},[t.breakpoints.up("sm")]:{padding:"0px 48px"},[t.breakpoints.up("md")]:{margin:"32px auto 0px auto",padding:"0px 24px"}}});function rQ(e){let{items:t}=e,n=(0,E.A)();return t.map((e,t)=>(0,y.jsx)(D.A,{item:!0,children:(0,y.jsxs)(G.A,{buttonVariant:"nude",onClick:()=>rY({ref:e.ref,offset:90}),children:[(0,y.jsx)(e.icon,{sx:{color:n.palette.text.primary,fontSize:20}}),(0,y.jsx)(i4.qn,{children:e.title})]})},t))}let rX=(0,K.Ay)(B.A)(e=>{let{theme:t}=e;return{...t.typography.h3,color:t.palette.text.primary,textAlign:"left",wordBreak:"break-word",marginTop:0,[t.breakpoints.up("sm")]:{...t.typography.h2Desk}}});function rZ(e){let{descriptionRef:t,creatorProfileRef:n}=e,{t:i}=(0,T.Bd)();return(0,y.jsx)(D.A,{container:!0,direction:"row",justifyContent:"center",columnSpacing:{xs:3,sm:7},marginTop:{xs:4,sm:3},marginBottom:{xs:2,sm:3},children:(0,y.jsx)(rQ,{items:[{title:i("description"),icon:rU.A,ref:t},{title:i("profileCreator"),icon:rW.A,ref:n}]})})}function r$(e){var t,n,i,r,l,o,a,s,c,d;let{errorDetail:u=null}=e,{t:p}=(0,T.Bd)(),x=(0,eQ.XI)(),m=null==u||null==(i=u.response)||null==(n=i.data)||null==(t=n.errors)?void 0:t.includes("product for partner"),h=null==u||null==(l=u.response)||null==(r=l.data)?void 0:r.requestId,_=(null==u||null==(a=u.response)||null==(o=a.data)?void 0:o.code)==="INVALID_PARTNER_TOKEN";return(0,y.jsx)(C.A,{visibility:_?{useLiteHeader:!1,showHeader:!1,showFooter:!1,showAppBanner:!1,showHeaderTitle:!1}:null==x?void 0:x.layout,renderFooter:!(0,R.bN)(),renderHeader:!(0,R.bN)(),sxMainContainer:{marginLeft:"auto",marginRight:"auto"},children:(0,y.jsx)(F.A,{sx:{width:"100%",minHeight:{xs:"60vh",sm:"70vh"},display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:{xs:"40px 16px",sm:"60px 24px"}},children:(0,y.jsxs)(F.A,{sx:{width:"100%",maxWidth:{xs:"100%",sm:360,md:480},textAlign:"center",mx:"auto"},children:[(0,y.jsx)(rH.A,{padding:"20px",title:p(m||_?"contentOnlyOnPartnerTitle":"eventDetailsFailedToLoadTitle"),desc:m?"".concat(p("contentOnlyOnPartnerDescription")," ").concat(null==u||null==(d=u.response)||null==(c=d.data)||null==(s=c.data)?void 0:s.available_partners.join(", ")):(0,y.jsxs)(y.Fragment,{children:[p("eventDetailsFailedToLoadSubtitle"),h&&(0,y.jsx)(t8.A,{id:h})]}),children:(0,y.jsx)(L.A,{type:m||_?"page-not-found":"no-respond"})}),(0,y.jsxs)(es.A,{direction:"row",spacing:1,justifyContent:"center",children:[(null==x?void 0:x.showBackToHomeBtn)||_&&(0,y.jsx)(G.A,{buttonVariant:"outlined",onClick:()=>{(0,rG.MI)("/")},sx:{borderRadius:"25px"},children:p(m?"eventUnpublishedButtonLabel":"backToTiptip")}),!m&&(0,y.jsx)(G.A,{buttonVariant:"filled",onClick:()=>{window.location.reload()},sx:{borderRadius:"25px"},children:p("refresh")})]})]})})})}function rJ(e){let{status:t,reason:n,attachments:i}=e;return(0,y.jsxs)(j.A,{variant:"outlined",severity:"info",sx:e=>({color:e.palette.text.primary,borderColor:e.palette.info.main}),children:[(0,y.jsx)(w.A,{sx:{fontWeight:"bold"},children:"REJECT"===t?"Event Tidak Disetujui":"Event Perlu Diperbaiki"}),n,(null==i?void 0:i.length)>0&&(0,y.jsx)(F.A,{children:i.map((e,t)=>(0,y.jsxs)(y.Fragment,{children:[t>0&&(0,y.jsx)(B.A,{children:", "}),(0,y.jsx)(el.A,{href:e.link,color:"#1890FF",fontWeight:"bold",variant:"body2",sx:{textDecoration:"underline"},target:"_blank",children:e.name},t)]}))})]})}var r0=n(55057),r1=n(37498),r2=n(29633),r5=n(44446),r6=n(58174),r3=n(95844),r4=n(25052);function r8(e){var t;let{isPageView:n}=e,{t:i}=(0,T.Bd)(),r=null==(t=(0,eQ.XI)())?void 0:t.bookingTimer;return(0,y.jsx)(es.A,{sx:e=>({background:e.palette.info.main,justifyContent:"center",alignItems:"center",color:null==r?void 0:r.colorText,fontSize:"14px",py:"6px",flexDirection:"column",width:"100%",position:n?"static":"fixed",zIndex:999,[e.breakpoints.up("sm")]:{py:"10px",flexDirection:"row"}}),children:(0,y.jsxs)(es.A,{direction:"row",alignItems:"center",id:"c-event-booking-timer-label",children:[(0,y.jsx)(r4.A,{sx:{width:"16px",height:"16px",mr:"4px",mt:"-2px"}}),(0,y.jsx)(B.A,{sx:{color:null==r?void 0:r.colorText,fontSize:"14px"},children:i("key_preview_mode")})]})})}var r7=n(14744),r9=n(26086),le=n(81533),lt=n(59015),ln=n(6432),li=n(82209),lr=n(46375),ll=n(10841),lo=n(63651),la=n(28454),ls=n(68790),lc=n(12994),ld=n(22702),lu=n(11488),lp=n(50579),lx=n(45728);let lm=()=>{let e=(0,ip.Lg)("idempotentKey");if(e)return String(e);let t=String((0,ll.F)());return(0,ip.ZB)("idempotentKey",t),t};var lh=n(77066),l_=n(18936),lv=n(84733),lg=n(20008),ly=n(36896),lf=n(42727),lb=n(87777),lA=n(26787);let lk=()=>"https://".concat("tiptip.id"),lj=e=>"".concat(lk()).concat(e).split("?")[0],lw=e=>(e||"").replace(/<[^>]*>/g,"").trim(),lC=e=>{switch(e){case"sold_out":return"https://schema.org/SoldOut";case"coming_soon":return"https://schema.org/PreOrder";default:return"https://schema.org/InStock"}};var lS=n(99253),lI=n(88939),lE=n(42291);let lT=e=>e.split("?")[0].replace(/ /g,"+"),lD=e=>e?Array.isArray(e)?e.map(e=>"string"==typeof e?lT(e):e):"string"==typeof e?lT(e):e:e;
1function lB(e){let{contentUid:t}=e;return(0,y.jsx)(F.A,{sx:{width:"100%",minWidth:{xs:"100%",md:"1152px"},maxWidth:1152,marginLeft:{xs:"-16px",md:"auto"},marginRight:{xs:"auto",md:"auto"},padding:{xs:"8px 16px 8px 0px",md:"0px 0px 16px 0px"}},children:(0,y.jsx)(r7.A,{sxContainerTitle:{typography:{xs:"h4",md:"h4Desk"}},title:"Event Lainnya",limit:10,isEvent:!0,eventStatusFilter:["upcoming"],withoutHeaders:!0,hideShowallButton:!0,isOtherSection:!0,endpointUrl:"/recommendation/guest/v1/content/similar/".concat(t)})})}var lF=!0;let lL=function(e){var t,n,i,r,l,o,a,s,c,d,u,p,x,m,h,_,v,g,b,E,M,P,V,z,q,U,W,H,G,K,X,Z,$,el,eo,ea,ec,ed,eu,ex,em,eh,e_,ev,eg,eb,eA,ek,ej,ew,eC,eI,eE,eT,eD,eB,eF,eL,eO,eR,eM,eP,eN,eV,ez,eq,eU,eW,eH,eG,eY,eK,eX,e2,e6,e4,e7,tn,ti,to,tc,td,tu;let{prefetchProductDetail:tp,prefetchProductEventDetail:tx,prefetchError:tm}=e,{t:th}=(0,T.Bd)(),t_=(0,li.A)(),{setCustomTheme:tv,resetCustomTheme:tg}=(0,lI.zp)(),[ty,tf]=(0,f.useState)(ly.F.default),{isReady:tb,query:tA,pathname:tk,asPath:tj}=(0,nt.useRouter)(),tw=lm(),tC="true"===(0,ld.W9)("openModalPrivateEvent"),{flagsReady:tS}=(0,iT.h)(),{maintenanceBanner:tI}=(0,lu.f)(),[tE,tT]=(0,f.useState)(""),[tD,tB]=(0,f.useState)(null),[tF,tL]=(0,f.useState)(null),[tO,tR]=(0,f.useState)(!1),[tM,tP]=(0,f.useState)(!1),[tN,tV]=(0,f.useState)(!1),[tz,tq]=(0,f.useState)(!1),[tU,tW]=(0,f.useState)(!1),[tH,tG]=(0,f.useState)(!1),[tY,tK]=(0,f.useState)(!1),[tQ,tX]=(0,f.useState)(!1),[tZ,t$]=(0,f.useState)(!1),[tJ,t0]=(0,f.useState)(!1),[t1,t2]=(0,f.useState)(!0),[t5,t6]=(0,f.useState)(!1),[t3,t4]=(0,f.useState)(!1),[t8,t9]=(0,f.useState)(!1),[nn,ni]=(0,f.useState)(!1),[nr,nl]=(0,f.useState)(!1),[no,na]=(0,f.useState)(!1),[ns,nc]=(0,f.useState)(!1),[nd,nu]=(0,f.useState)(""),[np,nx]=(0,f.useState)(!1),[nh,nv]=(0,f.useState)(!1),[ng,nC]=(0,f.useState)((0,nT.YJ)()),[nS,nI]=(0,f.useState)(1),[nB,nF]=(0,f.useState)(!1),[nL,nO]=(0,f.useState)(!1),[nR,nM]=(0,f.useState)(!1),[nP,nN]=(0,f.useState)(!1),[nV,nz]=(0,f.useState)(!1),[nq,nU]=(0,f.useState)(!1),[nW,nH]=(0,f.useState)(!1),[nG,nY]=(0,f.useState)(!1),[nK,nQ]=(0,f.useState)(!1),[nX,nZ]=(0,f.useState)(!1),[n$,nJ]=(0,f.useState)(!1),[n0,n1]=(0,f.useState)(!1),[n2,n5]=(0,f.useState)(!1),[n6,n3]=(0,f.useState)(null),{event_uid:n4,pt:n8,show_options:n7,tr_status:n9,inv_id:ie,inv_time:it,inv_pm:ii,inv_total:ir,partner_token:il,user_info:io}=tA,{generatePromoterLink:ia,link:is,isLoadingGenerateLink:ic,isSuccessGenerateLink:id,resetGenerateLink:iu,isErrorGenerateLink:ix}=(0,lI.hj)(e=>({isLoadingGenerateLink:e.isLoadingGenerateLink,isSuccessGenerateLink:e.isSuccessGenerateLink,isErrorGenerateLink:e.isErrorGenerateLink,link:e.link,generatePromoterLink:e.generatePromoterLink,resetGenerateLink:e.resetGenerateLink})),{bookingError:im,bookingPreview:ih,bookingTimer:i_,contactInfoFormValue:iv,resetBuyerInfoForm:ig,resetContactInfoForm:iy,selectedSeats:ib,selectedTicketOptions:iA,setBookingError:ik,setBookingPreview:ij,setBookingTimer:iw,setBuyerInfoFormInit:iC,setBuyerInfoFormValid:iS,setBuyerInfoFormValue:iI,setContactInfoFormValid:iE,setContactInfoFormValue:iD,setEnableBuyerInfoForm:iB,setEventDetail:iF,setEventUserDetail:iL,setSelectedSeats:iO,setSelectedTicketOptions:iR,selectedAttractionDate:iN,calendarAttraction:iV,setCalendarAttraction:iz,setSelectedAttractionDate:iG}=(0,n_._v)(e=>({bookingError:e.bookingError,bookingPreview:e.bookingPreview,bookingTimer:e.bookingTimer,contactInfoFormValue:e.contactInfoFormValue,resetBuyerInfoForm:e.resetBuyerInfoForm,resetContactInfoForm:e.resetContactInfoForm,selectedSeats:e.selectedSeats,selectedTicketOptions:e.selectedTicketOptions,selectedAttractionDate:e.selectedAttractionDate,calendarAttraction:e.calendarAttraction,setBookingError:e.setBookingError,setBookingPreview:e.setBookingPreview,setBookingTimer:e.setBookingTimer,setBuyerInfoFormInit:e.setBuyerInfoFormInit,setBuyerInfoFormValid:e.setBuyerInfoFormValid,setBuyerInfoFormValue:e.setBuyerInfoFormValue,setContactInfoFormValid:e.setContactInfoFormValid,setContactInfoFormValue:e.setContactInfoFormValue,setEnableBuyerInfoForm:e.setEnableBuyerInfoForm,setEventDetail:e.setEventDetail,setEventUserDetail
1:e.setEventUserDetail,setSelectedSeats:e.setSelectedSeats,setSelectedTicketOptions:e.setSelectedTicketOptions,setCalendarAttraction:e.setCalendarAttraction,setSelectedAttractionDate:e.setSelectedAttractionDate})),{referralCodeInfo:iY}=(0,i$.YO)(e=>({referralCodeInfo:e.referralCodeInfo})),[iK,iQ]=(0,f.useState)(null),{data:iX,error:iZ,refetch:i0,isFetching:i1,isFetched:i2,remove:i5}=nb(n4,lD(il)),i6=nA(n4,(0,ls.y)(n4),lD(il)),{data:i7,error:rr,refetch:rl,isFetching:ro,remove:ra}=i6,{data:rs,refetch:rc,remove:rd}=nk(n4),{data:ru,refetch:rp}=(0,ln.Ys)(n4),rx=i7||tx,rm=iX||tp,rh=JSON.parse(tm),r_=tS&&(null==rx||null==(n=rx.event_summary)||null==(t=n.event_type)?void 0:t.id)===eZ.Ho,rv=1===(0,eJ.pu)(null==rx?void 0:rx.ticket_options).length&&!r_&&(null==rx||null==(i=rx.related_products)?void 0:i.length)>0&&!ro&&tS,rg=null==rs?void 0:rs.ongoing_booking,ry=null==rs?void 0:rs.payment,rf=null==rs?void 0:rs.payment_instruction,rb=eZ.UZ.includes(n4.toString()),{refetch:rA}=nj({productEventUid:null==rx||null==(r=rx.event_summary)?void 0:r.product_event_uid,enabled:!1}),{paymentStatusData:rk,fetchPaymentStatus:rj,isErrorPaymentStatus:rw}=(0,lt.e)({idempotentKey:tw,invoiceId:(null==ie?void 0:ie.toString())||(null==rf||null==(l=rf.invoice_id)?void 0:l.toString()),onCallbackSuccess:e=>{var t,n,i;"FAILED"===n9&&(null==e||null==(t=e.status)?void 0:t.toUpperCase())!=="PENDING"||(null==e||null==(n=e.status)?void 0:n.toUpperCase())==="FAILED"||(null==e||null==(i=e.status)?void 0:i.toUpperCase())==="EXPIRED"?n3(!0):n5(!0)},onCallbackFailed:e=>{e&&("PAYMENT_CARD"===ii||(null==rf?void 0:rf.payment_method_code)==="PAYMENT_CARD")?n3(e):"FAILED"===n9&&"PAYMENT_CARD_PIVOT"===ii&&n3(!0)}}),{isCancelPaymentFetching:rC,fetchCancelPayment:rS}=(0,lr.C)({invoice_id:null==rf?void 0:rf.invoice_id,idempotentKey:tw,onCallbackSuccess:()=>{nF(!0),nN(!1),tX(!1),nH(!1),rd()},onCallbackCleanup:()=>tX(!1),onCallbackFailed:e=>{("INVOICE_ALREADY_PAID"===e||"INVOICE_ALREADY_FAILED"===e)&&nO(!0)}}),{communityProduct:rI,setIsOpenPrivateCommunityContentModal:rE,alertCommunity:rT,setAlertOpen:rD,resetCommunityDrawer:rF}=(0,lE.sI)(e=>({communityProduct:e.communityProduct,setIsOpenPrivateCommunityContentModal:e.setIsOpenPrivateCommunityContentModal,alertCommunity:e.alertCommunity,setAlertOpen:e.setAlertOpen,resetCommunityDrawer:e.resetCommunityDrawer})),{setIsOpenSuggestFollowModal:rL,isSuccessFollow:rO,successMessage:rR,setIsSuccessFollow:rM,creatorFollower:rP}=(0,lE.wu)(e=>({setIsOpenSuggestFollowModal:e.setIsOpenSuggestFollowModal,isSuccessFollow:e.isSuccessFollow,successMessage:e.successMessage,setIsSuccessFollow:e.setIsSuccessFollow,creatorFollower:e.creatorFollower})),{isSnackbarOpen:rN,snackbarMessage:rV,queueSnackbar:rz,closeSnackbar:rU}=(0,nw.A)(),rW=(0,f.useMemo)(()=>{var e,t,n,i;return null!=(i=null==(n=(0,eJ.pu)(null==rx?void 0:rx.ticket_options)[0])||null==(t=n.ticket_schedules)||null==(e=t[0])?void 0:e.min_purchasable_quota)?i:1},[rx]);(0,f.useEffect)(()=>{nI(rW)},[rW]),(0,f.useEffect)(()=>{iZ&&tB(iZ)},[iZ]),(0,f.useEffect)(()=>{rr&&tL(rr)},[rr]);let{profileData:rH}=(0,i$.Vv)(e=>({profileData:e.profileData})),rY=(0,rB.E)(e=>({creatorProfile:e.creatorProfile,moreContent:e.moreContent,contentDelivery:e.contentDelivery,eventPersonalQuestions:e.eventPersonalQuestions,topUp:e.topUp})),rQ=(0,rB.O)(e=>({signUpBonusBanner:e.signUpBonusBanner,creatorProfile:e.creatorProfile,moreContent:e.moreContent,contentDelivery:e.contentDelivery,eventPersonalQuestions:e.eventPersonalQuestions})),r4=(0,iU.p)(),r7=(0,f.useRef)(null),lT=(0,f.useRef)(null),lF=(0,f.useRef)(0),lL=(0,f.useRef)(3e3),lO=(0,f.useRef)(null),lR=null==rx||null==(o=rx.event_summary)?void 0:o.seating_plan_status,lM=!!lR,lP="INITIALIZING"===lR,lN="INACTIVE"===lR,lV=!lM||lP||lN,lz=(0,eJ.pu)(null==rx?void 0:rx.ticket_options).length>1||e8(null==rx?void 0:rx.ticket_options)||r_||!!(null==rx||null==(a=rx.event_summary)?void 0:a.is_enable_ticket_section),lq=A()(null==rx||null==(s=rx.event_summary)?void 0:s.sales_ended_at).diff(new Date().toString(),"hour"),lU="true"===n7,lW=(null==(c=(0,ip.Lg)("userId"))?void 0:c.id)===(null==rx||null==(d=rx.creator)?void 0:d.creator_user_id
1)&&!!r4,lH=(null==rf?void 0:rf.payment_method_code)==="PAYMENT_CARD_PIVOT",lG={states:rQ,pathname:tk,query:tA,productDetail:rm,productEventDetail:rx,saleTimeLeft:lq,contentCommunityInfo:ru},lY=function(e){var t,n,i,r,l,o,a,s,c,d,u,p,x,m,h,_,v,g,y,f,b,A,k,j,w,C,S,I,E,T,D;let{pathname:B,productDetail:F,query:L,saleTimeLeft:O,productEventDetail:R,additionalProperty:M={}}=e;return{state_name:(0,nE.hO)(B)||"",source_action:(0,e$.A)(L.source_action)?"unknown":String(L.source_action),source:(0,e$.A)(L.source)?"unknown":(0,nE.hO)(String(L.source)),creator_category_id:(null==R||null==(n=R.creator)||null==(t=n.category)?void 0:t.id)||"",creator_category:(null==R||null==(r=R.creator)||null==(i=r.category)?void 0:i.name)||"",creator_user_id:(null==R?void 0:R.creator_user_id)||"",creator_name:(null==R||null==(l=R.creator)?void 0:l.name)||"",creator_id:(null==R||null==(o=R.creator)?void 0:o.creator_id)||"",creator_group:(null==R||null==(a=R.creator)?void 0:a.creator_group)||"",is_community_leader:null==R||null==(s=R.creator)?void 0:s.is_community_leader,event_title:(null==F?void 0:F.title)||"",event_id:(null==F?void 0:F.product_uid)||"",content_state:(null==R||null==(d=R.event_summary)||null==(c=d.event_bookings)?void 0:c.length)>0?"purchased":"unpurchased",event_type_id:null==R||null==(p=R.event_summary)||null==(u=p.event_type)?void 0:u.id,event_type_name:null==R||null==(m=R.event_summary)||null==(x=m.event_type)?void 0:x.name,event_poster_image_path:null==F?void 0:F.cover,event_has_teaser:(null==F?void 0:F.teaser)?"yes":"no",event_created_date:null==F?void 0:F.created_at,event_sale_end_date:null==R||null==(h=R.event_summary)?void 0:h.sales_ended_at,event_sale_countdown_hrs:O,event_start_date:null==R||null==(_=R.event_summary)?void 0:_.event_started_at,event_end_date:null==R||null==(v=R.event_summary)?void 0:v.event_ended_at,event_location_city:null==R||null==(g=R.event_summary)?void 0:g.location_city,event_location_name:null==R||null==(y=R.event_summary)?void 0:y.location_venue,event_gmap_url:null==R||null==(f=R.event_summary)?void 0:f.map_url,event_num_sold:null==F||null==(b=F.stats)?void 0:b.total_sales,event_max_quota:null==R||null==(A=R.event_summary)?void 0:A.quota,event_price_initial:null==R||null==(k=R.event_summary)?void 0:k.min_price,event_price_final:null==R||null==(j=R.event_summary)?void 0:j.min_sale_price,event_status:null==R||null==(w=R.event_summary)?void 0:w.status,event_state:(null==R||null==(S=R.event_summary)||null==(C=S.event_bookings)?void 0:C.length)>0?"purchased":"unpurchased",event_is_seat_selection_set:(null==R||null==(I=R.event_summary)?void 0:I.seating_plan_status)==="ACTIVE",event_is_custom_form_set:(null==R||null==(D=R.event_summary)||null==(T=D.additional_form)||null==(E=T.fields)?void 0:E.length)!==3,...M}}({saleTimeLeft:lq,productEventDetail:rx,productDetail:rm,pathname:tk,query:tA,additionalProperty:{event_quantity:lz?e1(iA):ib.length||nS,event_subtotal:lz?e5(iA):(ib.length||nS)*(null==rx||null==(u=rx.event_summary)?void 0:u.min_sale_price),community_id:rI.mask_id||null,community_name:rI.name||null,community_is_private:rI.mask_id?rI.is_private:null,is_member_community:rI.mask_id?rI.status_join>0:null,user_type:r4?"supporter":"guest",event_is_multiple_ticket_option:lz,event_is_first_purchase:!((null==rx||null==(x=rx.event_summary)||null==(p=x.event_bookings)?void 0:p.length)>0)}}),{data:lK,isFetching:lQ,refetch:lX}=iq(iV.ticket_option_uid,null==rx?void 0:rx.availability_schedules),lZ=r_&&!lQ&&(null==lK||null==(m
1=lK.dates)?void 0:m.length)===0,{userAdditionalInfo:l$,userContactInfo:lJ,sendToAdditionalEmail:l0}=(0,rB.O)(e=>e.eventPersonalQuestions),l1=()=>{void 0!==(0,ip.Lg)("showPromoterInfoEvent")?l6():nQ(!0)},l2=()=>{(0,e$.A)(rI.mask_id)||(0,lc.uW)()?rP.is_following||setTimeout(()=>{rL(!0)},1e3):"accept"!==lh.S[rI.status_join]&&setTimeout(()=>{rL(!0)},1e3)},l5=async()=>{if(lz?lV?0===e5(iA):0===ib.reduce((e,t)=>e+t.ticket.sale_price,0):0===rx.event_summary.min_sale_price){if(tz)return null;try{tq(!0),await oe("")?((0,ip.ZB)("idempotentKey",(0,ll.F)()),t0(!0),i0(),rl(),lM&&nZ(!1),nz(!1),rY.eventPersonalQuestions.clearUserAdditionalInfo(),iR({}),iO([]),r_&&iG({date:"",source:"",sliderDate:[]}),l2()):(lM&&rA(),nN(!1))}catch(i){var e,t;let n=null==i||null==(t=i.response)||null==(e=t.data)?void 0:e.code;if(lM){if("INVALID_ALREADY_BOOK"===n)return t9(!0);if("INVALID_SEAT_RULES"===n)return tR(!0);1;return t4(!0)}if("USER_OVERBOOKED"===n||"NOT_ENOUGH_QUOTA"===n)return tK(!0),!0;if("INSUFFICIENT_QUOTA"===n)return na(!0),!0;tW(!0)}finally{tq(!1)}return}return(0,Q.A)("/payment/".concat(i_.book_session_id,"?"),{isReplace:!0})},l6=async()=>{ia({product_uid:n4,product_type:"event"})};(0,f.useEffect)(()=>{nn||ix||iu()},[nn,ix]),(0,f.useEffect)(()=>{id&&!ic&&(nC(is),ni(!0))},[ic,id,is]),(0,f.useEffect)(()=>{if(tb)if((0,ip.ZB)("idempotentKey",(0,ll.F)()),n4&&void 0!==n8){let e={promoterToken:n8,expiredDate:(0,iJ.cP)(new Date)};(0,ip._Y)("affiliate$".concat(n4),JSON.stringify(e)||"",(0,iJ.fi)(lg.A.affiliateExpiryDays)),tP(!0)}else tP(!0)},[tb,n8,n4]),(0,f.useEffect)(()=>{async function e(){var e,t,n,i;(il||(null==rh||null==(e=rh.response)?void 0:e.status)===429)&&i0(),rl(),rc(),iF(rm),iL(rx),rp();let r=null==rx||null==(t=rx.event_summary)?void 0:t.max_purchasable_quota,l=null==rx||null==(n=rx.event_summary)?void 0:n.status,o=null==rs?void 0:rs.has_pending_order,a=null==rs?void 0:rs.has_ongoing_booking,s=(0,eJ.pu)(null==rx?void 0:rx.ticket_options).length>1||r_||e8(null==rx?void 0:rx.ticket_options)||!!(null==rx||null==(i=rx.event_summary)?void 0:i.is_enable_ticket_section);!(0===r||o||a||"fully_booked"===l||"coming_soon"===l||"sold_out"===l||"sale_ended"===l||"event_ended"===l||!s&&!lM||lZ)&&lU&&(np||(null==rx?void 0:rx.event_summary.is_allow_guest_purchase))&&(lM?nZ(!0):nJ(!0))}if(n4&&!i1&&!ro&&tM&&tS&&(iO([]),iR({}),r_&&(iG({date:"",source:"",sliderDate:[]}),lQ||lX()),e()),ie&&"PAYMENT_CARD_PIVOT"===ii&&"FAILED"===n9){n3(!0);let e=setTimeout(()=>{rj()},3e3);return()=>clearTimeout(e)}},[n4,tM,ie,ii,tS]),(0,f.useEffect)(()=>{lX()},[null==iV?void 0:iV.ticket_option_uid]);let l3=null==rx||null==(h=rx.creator)?void 0:h.username;async function l4(){var e,t,n,i,r,l,o,a;if((null==rx||null==(t=rx.event_summary)||null==(e=t.event_bookings)?void 0:e.length)>0){delete lY.source,delete lY.source_action,(0,nE.sx)("click_view_eticket",{event_is_first_purchase:!((null==rx||null==(i=rx.event_summary)||null==(n=i.event_bookings)?void 0:n.length)>0),...lY}),(0,nE.iE)({lifetime_num_content_viewed:1}),(0,nE.uq)({lifetime_first_view_content_datetime:new Date().toISOString()}),(0,nE.br)({lifetime_last_view_content_datetime:new Date().toISOString()}),(0,nE.hh)({lifetime_list_content_viewed:n4});let e=new URL(null==rx||null==(l=rx.event_summary)||null==(r=l.event_bookings[0])?void 0:r.url);return(null==rx||null==(a=rx.event_summary)||null==(o=a.event_bookings)?void 0:o.length)>1?nM(!0):(0,rG.MI)(e.pathname)}}(0,f.useEffect)(()=>{tb&&(r4&&nx(!0),t2(!0),t0(!0),rm&&rx&&!nh&&((0,nE.sx)("visit_event_detail",{...lY}),(0,nE.iE)({lifetime_num_content_visited:1}),nv(!0)),(null==rs?void 0:rs.is_show_success_payment)&&ie&&ii&&!(n9&&it)&&(null===l_.GN||void 0===l_.GN?void 0:l_.GN.includes(null==ii?void 0:ii.toString()))&&rj())},[tb,rm,rx,null==rx?void 0:rx.creator.creator_id,rs,rQ.moreContent,nh,n4]),(0,f.useEffect)(()=>{nU(!0)},[null==rs?void 0:rs.has_ongoing_booking]),(0,f.useEffect)(()=>{let e=()=>{lF.current++,nc(!1),rl(),rc(),lL.current*=2,lO.current=setTimeout(e,lL.current)};return(ns&&(null==rf?void 0:rf.is_show)&&lF.current<3&&(0,eQ.t9)()===lv.sK.MANDIRI&&(lO.current=setTimeout(e,lL.current)),(null==rf?void 0:rf.is_show)&&(0,eQ.t9)()!==lv.sK.MANDIRI)?void clearTimeout(lO.current):()=>clearTimeout(lO.current)},[ns,rf]),(0,f.useEffect)(()=>{var e,t;(null==rx||null==(t=rx.event_summary)||null==(e=t.event_bookings)?void 0:e.length)>0&&tV(!0)},[rx,rm,tJ]),(0,f.useEffect)(()=>(rb&&(0,nf.GW)(),()=>{rF(),ig(),iy(),rY.creatorProfile.resetCreatorProfile(),tL(null),tB(null),i5(),ra(),iw({show:!1,book_expiry:null,book_session_id:null})}),[]),(0,f.useEffect)(()=>{(null==rx?void 0:rx.pro_com_est)>0&&nY(!0)},[null==rx?void 0:rx.pro_com_est]),(0,f.useEffect)(()=>
1{if(!il||iZ)(0,lc.b6)("partnerInfo"),tg();else if(null==iX?void 0:iX.partner){(0,lp.K$)();let e={token:lD(il),partner:null==iX?void 0:iX.partner,userInfo:lD(io)};(0,lc.TV)("partnerInfo",JSON.stringify(e)),tf(ly.F[null==iX?void 0:iX.partner.toLowerCase()]),tv(null==iX?void 0:iX.partner)}},[null==iX?void 0:iX.partner,il,io,iZ]);let l8=async e=>{nF(!1),nO(!1),(null==e?void 0:e.length)>0&&iO(e);let t=async()=>{if(nP)return nN(!1),nz(!0);if(n$){if(nJ(!1),(0,nT.Pk)("show_options"),lV)return nN(!0)}else if(lV||nX)if(lz&&lV)r_&&"view-all"===iN.source&&iG({source:"",date:"",sliderDate:[]}),nJ(!0),(0,nT.mL)("show_options","true");else if((0,lc.uW)())return nZ(!1),nN(!0);else try{if(lW)ij({show:!0});else{let{book_session_id:t,book_expiry:n}=await (0,ny.e5)(lV?{product_uid:String(n4),tickets:l7(),...r_&&{visit_date:iN.date}}:{product_uid:String(n4),selected_seats:e.map(e=>({seat_uid:e.id}))});iw({show:!0,book_session_id:t,book_expiry:n})}return nZ(!1),nN(!0)}catch(s){var t;let{book_expiry:e,book_session_id:n,quantity_overbooked:i,unpurchasable_ticket:r}=s.response.data.data,l=s.response.data.code,o=s.response.data.requestId,a={};if((null==s||null==(t=s.response)?void 0:t.status)===422&&rb&&(0,nf.yW)(),"INSUFFICIENT_MIN_PURCHASE"===l&&(a={title:null==r?void 0:r.title,qty:null==r?void 0:r.min_purchasable_quota}),"USER_OVERBOOKED"===l&&(a={limit:null==i?void 0:i.max_quantity_per_user}),"BOOKING_ONGOING"===l&&(a={minutes:(0,iJ.hO)(e)},iw({show:!1,book_expiry:e,book_session_id:n})),ik({show:!0,code:l,requestId:o,data:a}),!lV)throw s}else nZ(!0),(0,nT.mL)("show_options","true")};np?rI.is_private&&"accept"!==lh.S[rI.status_join]?rE(!0):await t():rx.event_summary.is_allow_guest_purchase?(null==rf?void 0:rf.is_show)&&!ns?tX(!0):await t():((0,ld.yt)("openModalPrivateEvent","true"),(0,rG.MI)(lg.A.loginPath))},l7=()=>{var e,t;return lz&&!(0,e$.A)(iA)?e3(iA):[{ticket_schedule_uid:null==(t=(0,eJ.pu)(null==rx?void 0:rx.ticket_options)[0])||null==(e=t.ticket_schedules[0])?void 0:e.ticket_schedule_uid,qty:lV?nS:ib.length}]},l9=async()=>{try{await (0,ny.qM)(i_.book_session_id||(null==rg?void 0:rg.book_session_id)),iw({book_session_id:null,book_expiry:null,show:!1})}catch(a){var e,t,n,i;let r=a.response.data.code,l=a.response.data.requestId,o={};throw"USER_OVERBOOKED"===r&&(o={limit:null==a||null==(i=a.response)||null==(n=i.data)||null==(t=n.data)||null==(e=t.quantity_overbooked)?void 0:e.max_quantity_per_user}),ik({show:!0,code:r,requestId:l,data:o}),a}},oe=(0,f.useCallback)(async e=>{try{tG(!0);let t=await (0,lf.hp)({book_session_id:null==i_?void 0:i_.book_session_id,payment_method:"",promoter_token:(0,ls.y)(n4),voucher_code:e,checkout_source:"DIRECT_TICKET_OPTION",event:{utm:(0,nE.AK)()},idempotentKey:tw});return iw({show:!1,book_expiry:null,book_session_id:null}),ik({show:!1}),iy(),nI(1),ig(),t}catch(e){throw e}finally{tG(!1)}},[n4,nS,tw,l$,lJ,ib,lV,l0]),ot=()=>{nc(!0),nH(!1),setTimeout(()=>{rc()},500)},on=async e=>{var t,n,i,r,l;switch(e){case iP.l.CONTACT_CS:window.open("https://wa.me/".concat(O.A.waCS),"_blank");break;case iP.l.CLOSE:ik({show:!1});break;case iP.l.REFRESH:case iP.l.BACK_TO_EVENT:window.location.reload();break;case iP.l.BROWSE_EVENT:(0,Q.A)("/browse?status=event");break;case iP.l.CANCEL_BOOKING:await l9(),iy(),ig(),iC(!1),lz&&nP&&lV&&(iR({}),nJ(!0),(0,nT.mL)("show_options","true")),nN(!1),nz(!1),!lV&&nP&&(iO([]),nZ(!0)),ik({show:!1}),r_&&iG({date:"",source:"",sliderDate:[]}),rl();break;case iP.l.EDIT_BOOKING:await l9(),nV&&(nz(!1),nN(!0)),iB(!1),ik({show:!1});break;case iP.l.REORDER:case iP.l.SELECT_TICKET:await rl(),iy(),ig(),iR({}),iO([]),nN(!1),nz(!1),lz&&lV?((0,nT.mL)("show_options","true"),nJ(!0)):nI(rW),lV||nZ(!0),ik({show:!1}),iw({show:!1,book_expiry:null,book_session_id:null});break;case iP.l.CONTINUE_BOOKING:ik({show:!1});break;case iP.l.CREATE_NEW_BOOKING:try{if(n$||nP||nX){await l9();let{book_session_id:e,book_expiry:t}=await (0,ny.e5)(lV?{product_uid:String(n4),tickets:l7(),contact_info:(0,lc.uW)()&&iv,...r_&&{visit_date:iN.date}}:{product_uid:String(n4),selected_seats:ib.map(e=>({seat_uid:e.id})),contact_info:(0,lc.uW)()&&iv});iw({show:!0,book_session_id:e,book_expiry:t}),n$&&nJ(!1),nX&&nZ(!1),nP&&(0,lc.uW)()&&iB(!0),nN(!0),ik({show:!1})}else await l9(),ik({show:!1}),l8([]);rl()}catch(r){let e=r.response.data.code,n=r.response.data.requestId,i={};if("INSUFFICIENT_MIN_PURCHASE"===e){let{unpurchasable_ticket:e}=r.response.data.data;i={title:null==e?void 0:e.title,qty:null==e?void 0:e.min_purchasable_quota}}if((null==r||null==(t=r.response)?void 0:t.status)===422&&rb&&(0,nf.yW)(),"BOOKING_ONGOING"===e){let{book_expiry:e,book_session_id:t}=r.response.data.data;iw({show:!1,book_expiry:e,book_session_id:t}),i={minutes:(0,iJ.hO)(e)}}ik({show:!0,code:e,requestId:n,data:i})}break;case iP.l.FINISH_BOOKING:try{let{booking_detail:e,additional_info:t,contact_info:r}=await (0,ny.HL)(i_.book_session_id||(null==rg?void 0:rg.book_session_id));if(lz&&lV){let t={};null==e||null==(n=e.tickets)||n.map(e=>{t[e.ticket_option_uid]={ticket_schedule_uid:e.ticket_schedule_uid,title:e.title,price:e.sale_price,ticket_bundling:e.ticket_bundling,qty:e.qty,visit_time:e.visit_time}}),iR(t)}else lV?nI(null==e?void 0:e.tickets[0].qty):iO((null==e||null==(i=e.selected_seats)?void 0:i.map(e=>({id:e.id,label:e.label,ticket:e.ticket})))||[]);if((0,lc.uW)()&&iB(!0),r&&(iD(r),iE({full_name:!0,phone_number:!0,email:!0})),t){let e=[];t.map(t=>{let n={};Object.keys(t).map(e=>n[e]=!0),e.push(n)}),iC(!0),iS(e),iI(t)}iw({show:!0,book_session_id:e.book_session_id,book_expiry:e.book_expiry}),nJ(!1),nZ(!1),nN(!0),ik({show:!1}),r_&&!(0,e$.A)(e.visit_date)&&iG({date:e.visit_date,source:"",sliderDate:[]})}catch(t){let e=t.response.data.requestId;ik({show:!0,code:null==t||null==(l=t.response)||null==(r=l.data)?void 0:r.code,requestId:e})}}};(0,f.useEffect)(()=>{var e,t,n,i,r;(null==rs||null==(e=rs.payment)?void 0:e.expiry_message)&&nu(null==rs||null==(t=rs.payment)?void 0:t.expiry_message),nH((null==rf?void 0:rf.is_show)&&!ns),(null==rx||null==(i=rx.event_summary)||null==(n=i.event_bookings)?void 0:n.length)>0&&tV(!0),rx&&tJ&&(null==rs?void 0:rs.is_show_success_payment)&&l2(),lz||iz({ticket_option_uid:null==(r=(0,eJ.pu)(null==rx?void 0:rx.ticket_options)[0])?void 0:r.ticket_option_uid,show:!1})},[rx,tJ,rs,ns]),(0,f.useEffect)(()=>{np&&tC&&rI.is_private&&"accept"!==lh.S[rI.status_join]&&((0,ld.G_)("openModalPrivateEvent"),rE(!0))},[rI,tC,np]),(0,f.useEffect)(()=>
1{if(null==ty?void 0:ty.disableZoom)return(0,lx.K)()},[null==ty?void 0:ty.disableZoom]),(0,f.useEffect)(()=>{let e=document.querySelector("title");if(!e)return;let t=new MutationObserver(()=>{let e=document.title;R.vz.send("titleChanged",{title:e})});return t.observe(e,{childList:!0}),()=>t.disconnect()},[]);let oi=(0,f.useCallback)(()=>n$&&(null==rx?void 0:rx.ticket_options)?(nU(null==rs?void 0:rs.has_ongoing_booking),nJ(!1),(0,nT.Pk)("show_options"),!0):nP?((ih.show&&ij({show:!1}),i_.show)?ik({show:!0,code:"CANCEL_CONFIRMATION"}):(iQ("additionalQuestion"),nN(!1),lM&&"ACTIVE"===lR?nZ(!0):lz&&(nJ(!0),(0,nT.mL)("show_options","true"))),!0):!!nV&&(nz(!1),nN(!0),!0),[n$,null==rx?void 0:rx.ticket_options,nP,nV,rs,i_.show,ik,lM,lR,lz]);if((0,f.useEffect)(()=>{let e=e=>({handled:oi()});if(!nX)return R.vz.on("deviceBackButtonPressed",e),()=>{R.vz.off("deviceBackButtonPressed",e)};R.vz.off("deviceBackButtonPressed",e)},[nX,oi]),(i1||ro||!i2)&&il)return(0,y.jsx)(r9.A,{});if((null==rh||null==(_=rh.response)?void 0:_.status)===404||(null==tD||null==(v=tD.response)?void 0:v.status)===404||(null==tF||null==(g=tF.response)?void 0:g.status)===404||rm&&rx&&(null==rm||null==(E=rm.type)||null==(b=E.name)?void 0:b.toLowerCase())!=="event")return(null==tD||null==(eU=tD.response)?void 0:eU.data.code)==="PRODUCT_UNPUBLISHED"||(null==tF||null==(eW=tF.response)?void 0:eW.data.code)==="PRODUCT_UNPUBLISHED"||(null==rh||null==(eG=rh.response)||null==(eH=eG.data)?void 0:eH.code)==="PRODUCT_UNPUBLISHED"?(0,y.jsx)(J,{}):(0,y.jsx)(I.A,{});let or=!(0,e$.A)((0,eQ.CQ)()),ol=null==rx||null==(M=rx.creator)?void 0:M.name,oo=null==rm?void 0:rm.title,oa=(0,R.bN)()?"â":"".concat(or?"":"".concat(ol,": ")).concat(oo);function os(){return n$&&(null==rx?void 0:rx.ticket_options)?th("eventTicketSelectTicketButton"):nP?th("eventParticipantFormScreenTitle"):nV?th("orderReviewScreenTitle"):nX?th("eventSeatSelectionAppBarTitle"):oa}if(tU||tD&&(null==tD||null==(P=tD.response)?void 0:P.status)!==404||tF&&(null==tF||null==(V=tF.response)?void 0:V.status)!==404||!i2&&rh&&(null==rh||null==(z=rh.response)?void 0:z.status)!==404&&(null==rh||null==(q=rh.response)?void 0:q.status)!==429)return(0,y.jsxs)(y.Fragment,{children:[(0,R.bN)()&&(0,y.jsx)(lo.A,{title:os()}),(0,y.jsx)(r$,{errorDetail:tD||tF||rh||null})]});let oc=(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(i9,{showModal:tY,onCloseAction:()=>{lM&&(rA(),rl()),tK(!1)},submitLabel:th("key_adjust_quantity_CTA"),onSubmitAction:()=>{lM?rA():window.location.reload(),tK(!1)},content:(0,y.jsxs)(F.A,{children:[(0,y.jsx)(L.A,{type:"data-failed",sx:{marginBottom:"16px",display:"block",marginLeft:"auto",marginRight:"auto"}}),(0,y.jsx)(ts.r3,{children:th("key_max_user_purchase_title")}),(0,y.jsx)(ts.oX,{children:th("key_max_user_purchase_desc")})]})}),(0,y.jsx)(i9,{showModal:no,onCloseAction:()=>{lM?(rA(),na(!1),nZ(!1),rl()):(0,Q.A)("/")},submitLabel:lM?th("eventSeatSelectionErrorInsufficientQuotaCtaLabel"):th("backToTiptip"),onSubmitAction:()=>{lM?(rA(),na(!1),nZ(!1)):(0,Q.A)("/")},content:(0,y.jsxs)(F.A,{children:[(0,y.jsx)(ts.Zi,{}),(0,y.jsx)(ts.r3,{children:th("eventDetailsErrorInsufficientQuotaTitle")}),(0,y.jsx)(ts.oX,{children:th("eventDetailsInsufficientQuotaSubtitle")})]})}),(0,y.jsx)(i9,{showModal:t8,onCloseAction:()=>{lM?t9(!1):(0,Q.A)("/")},submitLabel:"Pilih Ulang",onSubmitAction:()=>{lM?t9(!1):(0,Q.A)("/")},content:(0,y.jsxs)(F.A,{children:[(0,y.jsx)(ts.M0,{}),(0,y.jsx)(ts.r3,{children:th("eventSeatSelectionErrorSeatConflictedTitle")}),(0,y.jsx)(ts.oX,{children:th("eventSeatSelectionErrorSeatUnavailableDesc")})]})}),(0,y.jsx)(i9,{showModal:tO,onCloseAction:()=>{tR(!1),rA()},submitLabel:"Pilih Ulang",onSubmitAction:()=>()=>{tR(!1),rA()},content:(0,y.jsxs)(F.A,{children:[(0,y.jsx)(ts.FB,{}),(0,y.jsx)(ts.r3,{children:th("eventSeatSelectionErrorSeatRuleTitle")}),(0,y.jsx)(ts.oX,{children:th("eventSeatSelectionErrorSeatRuleDescription")})]})}),(0,y.jsx)(i9,{showModal:t3,onCloseAction:()=>{lM?(iw({show:!1,book_expiry:null,book_session_id:null}),t4(!1),nZ(!0),nN(!1),nz(!1)):(0,Q.A)("/")},submitLabel:"Pilih Ulang",onSubmitAction:()=>{lM?(iw({show:!1,book_expiry:null,book_session_id:null}),t4(!1),nZ(!0),nN(!1),nz(!1)):(0,Q.A)("/")},content:(0,y.jsxs)(F.A,{children:[(0,y.jsx)(ts.FB,{}),(0,y.jsx)(ts.r3,{children:th("eventSeatSelectionErrorSeatUnavailable")}),(0,y.jsx)(ts.oX,{children:th("eventSeatSelectionErrorSeatUnavailableDesc")})]})}),(0,y.jsx)(i9,{showModal:tQ,onCloseAction:()=>tX(!1),submitLabel:(null==rf?void 0:rf.payment_method_code)==="PAYMENT_CARD"?th("key_check_payment_status"):lH?th("transactionHistoryScreenCancelBtn"):th("digitalContentDetailsScreenClickableTextPendingV2"),onSubmitAction:()=>{tX(!1),lH?rS():(0,R.bN)()?R.vz.send("openPaymentInstruction",{invoiceId:null==rf?void 0:rf.invoice_id,invoiceUrl:null==rf?void 0:rf.invoice_url}):(0,e$.A)(null==rf?void 0:rf.invoice_url)?(0,e$.A)((0,eQ.CQ)())?window.open("/payment/".concat(null==rf?void 0:rf.invoice_id,"?inv_id=").concat(null==rf?void 0:rf.invoice_id,"&inv_pm=").concat(null==rf?void 0:rf.payment_method_code),"_blank"):(0,Q.A)("/payment/".concat(null==rf?void 0:rf.invoice_id,"?inv_id=").concat(null==rf?void 0:rf.invoice_id,"&inv_pm=").concat(null==rf?void 0:rf.payment_method_code)):(0,e$.A)((0,eQ.CQ)())?window.open(null==rf?void 0:rf.invoice_url,"_blank"):(0,Q.A)(null==rf?void 0:rf.invoice_url)},LeftBtnLabel:lH?"":th("transactionHistoryScreenCancelBtn"),onLeftBtnAction:rS,isRequesting:rC,content:(0,y.jsxs)(F.A,{children:[(0,y.jsx)(L.A,{sx:{marginBottom:"16
1px",display:"block",marginLeft:"auto",marginRight:"auto"},type:lH&&(0,e$.A)(null==rf?void 0:rf.invoice_url)?"error":"guest_pending"}),(0,y.jsx)(ts.r3,{children:lH&&(0,e$.A)(null==rf?void 0:rf.invoice_url)?th("key_force_cancel_order"):th("key_previous_order_not_paid")}),(0,y.jsx)(ts.oX,{children:lH?(0,e$.A)(null==rf?void 0:rf.invoice_url)?th("key_force_cancel_order_desc"):th("key_force_cancel_order_reason"):null==rf?void 0:rf.body})]})}),n6&&(0,y.jsxs)(t7.A,{title:"",hideCloseButton:!(0,e$.A)(null==rk||null==(U=rk.payment_gateway_response)?void 0:U.error_code)||"PAYMENT_CARD_PIVOT"===ii&&"FAILED"===n9,isOpen:n6,onClose:()=>n3(!1),sxDialogContainer:{"& .MuiDialogContent-root":{overflow:"hidden",padding:"16px 0px"}},sxDrawerContainer:{padding:"16px 0px"},renderTitle:!0,children:[(0,y.jsx)(iM.A,{code:rk||rw||"PAYMENT_CARD_PIVOT"!==ii||"FAILED"!==n9?(0,lS.gA)(null==rk||null==(W=rk.payment_gateway_response)?void 0:W.error_code,"pivot")||"FAILED_CONTINUE":"VERIFICATION_PENDING",data:{isFromEventDetail:!0},showCTA:!0,onCTA:e=>{switch(e){case iP.l.TRANSACTION_HISTORY:(0,Q.A)("/transaction-history?source=".concat(tk,"&source_action="));break;
1case iP.l.CONTACT_CS:n3(!1),window.open("".concat(O.A.supportCenterUrl,"home"),"_blank");break;default:n3(!1)}}}),!rk&&!rw&&"PAYMENT_CARD_PIVOT"===ii&&"FAILED"===n9&&(0,y.jsx)(k.A,{sx:{display:"block",margin:"auto"}})]}),nL&&(0,y.jsx)(t7.A,{title:"",isOpen:nL,onClose:()=>{rl(),rc(),nO(!1)},sxDrawerContainer:{padding:"16px 0px"},renderTitle:!0,children:(0,y.jsx)(iM.A,{code:"FAILED_CANCEL",showCTA:!0,onCTA:()=>(0,Q.A)("".concat(O.A.supportCenterUrl,"home"))})}),(0,y.jsx)(t7.A,{title:"",isOpen:n2&&(null==rs?void 0:rs.is_show_success_payment),onClose:()=>{(0,lc.uW)()&&(rd(),nH(!1),i0(),rl()),n5(!1)},sxDrawerContainer:{padding:"16px 0px"},children:(0,y.jsx)(r5.A,{vaStatus:{invoice_id:(null==ie?void 0:ie.toString())||(null==rk?void 0:rk.invoice_id),payment_method_code:rk?null==rk?void 0:rk.payment_method_code:null==ii?void 0:ii.toString(),status:(null==n9?void 0:n9.toString())||(null==rk?void 0:rk.status),paid_at:(null==it?void 0:it.toString())||(null==rk?void 0:rk.paid_at),checkout_at:(null==it?void 0:it.toString())||(null==rk?void 0:rk.checkout_at),payment_method_name:rk?null==rk?void 0:rk.payment_method_name:null==ii?void 0:ii.toString(),total:parseInt(null==ir?void 0:ir.toString())||(null==rk?void 0:rk.total),ticket:(null==rk?void 0:rk.ticket)||""},itemType:"event",handleClose:()=>{(0,lc.uW)()&&(rd(),nH(!1),i0(),rl()),n5(!1)}})})]}),od=nX||n$||nP||nV;return(0,y.jsxs)(y.Fragment,{children:[rm&&(0,y.jsx)(lo.A,{...function(e){var t,n;let{productDetail:i,productEventDetail:r,title:l,asPath:o}=e,a=null==r||null==(t=r.creator)?void 0:t.name;return{title:l,description:"Ikuti ".concat(null==i?void 0:i.title," oleh ").concat(a,", beli tiketnya sekarang juga!"),keywords:"tiket, event, konser, tiket konser, tiket event, tiket online, promotor, beli tiket, harga tiket konser, harga tiket, tiket ".concat(null==i?void 0:i.title,", tiket konser ").concat(a,", tiket event ").concat(a,", beli tiket ").concat(null==i?void 0:i.title,", harga tiket ").concat(null==i?void 0:i.title),link:lj(o),image:null==i?void 0:i.cover_thumbnail,robots:(null==r||null==(n=r.event_summary)?void 0:n.is_listed_event)?"all":"noindex"}}({productDetail:rm,productEventDetail:rx,title:(0,R.bN)()?os():oa,asPath:tj})}),rm&&rx&&(0,y.jsx)(la.A,{id:"event-jsonld",data:function(e){var t,n;let{productDetail:i,productEventDetail:r,canonicalUrl:l}=e,o=null==r?void 0:r.event_summary;if(!i||!(null==o?void 0:o.is_listed_event))return null;let a=lk(),s=null==r?void 0:r.creator,c=!!(o.location_venue||o.location_address),d="".concat(a,"/#Organization"),u="".concat(a,"/#WebSite"),p="".concat(l,"#Breadcrumb"),x=function(e){var t,n;let i="offline"===e.location.mode,r=i?{"@type":"Place",name:e.location.name,address:{"@type":"PostalAddress",streetAddress:e.location.streetAddress,addressLocality:e.location.addressLocality,addressCountry:e.location.addressCountry||"ID"}}:{"@type":"VirtualLocation",url:e.location.url},l={"@type":"Event","@id":e.id,name:e.name,description:e.description,image:e.image,url:e.url,startDate:e.startDate,endDate:e.endDate,eventStatus:"https://schema.org/EventScheduled",eventAttendanceMode:i?"https://schema.org/OfflineEventAttendanceMode":"https://schema.org/OnlineEventAttendanceMode",location:r,offers:{"@type":"Offer",price:e.offer.price,priceCurrency:e.offer.priceCurrency,availability:e.offer.availability,url:e.offer.url,...e.offer.validFrom&&{validFrom:e.offer.validFrom}}};return(null==(t=e.organizer)?void 0:t.name)&&(l.organizer={"@type":"Organization",name:e.organizer.name,...e.organizer.url&&{url:e.organizer.url}}),(null==(n=e.performer)?void 0:n.name)&&(l.performer={"@type":"Person",name:e.performer.name}),l}({id:"".concat(l,"#Event"),name:i.title,description:lw(i.description),image:[i.cover||i.cover_thumbnail].filter(Boolean),url:l,startDate:o.event_started_at_tz||o.event_started_at,endDate:o.event_ended_at_tz||o.event_ended_at,location:c?{mode:"offline",name:o.location_venue||o.location_city,streetAddress:o.location_address,addressLocality:o.city_name||o.location_city,addressCountry:"ID"}:{mode:"online",url:l},offer:{price:null!=(n=null!=(t=o.min_sale_price)?t:o.min_price)?n:null==r?void 0:r.sale_price,priceCurrency:(null==r?void 0:r.currency)||"IDR",availability:lC(o.status),url:l,validFrom:o.sales_started_at},...(null==s?void 0:s.name)&&{organizer:{name:s.name,url:s.username?"".concat(a,"/p/").concat(s.username):void 0},performer:{name:s.name}}}
1),m=(0,lb.b)({id:"".concat(l,"#WebPage"),url:l,name:i.title,description:lw(i.description),websiteId:u,organizationId:d,breadcrumbId:p,image:i.cover||i.cover_thumbnail}),h={"@type":"BreadcrumbList","@id":p,itemListElement:[{position:1,name:"TipTip",url:a},{position:2,name:i.title,url:l}].map(e=>({"@type":"ListItem",position:e.position,name:e.name,item:e.url}))};return(0,lA.ow)(x,m,h)}({productDetail:rm,productEventDetail:rx,canonicalUrl:lj(tj)})}),(0,y.jsxs)(C.A,{withManualWidth:!0,renderHeader:!n0&&!(0,R.bN)(),visibility:null==ty?void 0:ty.layout,renderFooter:!(0,R.bN)(),isHideBackBtn:!od,onBackLiteHeader:oi,headerTitle:(null==ty||null==(H=ty.layout)?void 0:H.showHeaderTitle)?os():"",children:[od?(0,y.jsxs)(y.Fragment,{children:[i_.show&&(0,y.jsx)(r3.A,{bookingTimer:i_,onTimerFinished:()=>{tH||(ik({show:!0,code:"BOOKING_EXPIRED"}),iw({show:!1,book_expiry:null,book_session_id:null}))}}),ih.show&&(0,y.jsx)(r8,{}),n$&&rx.ticket_options&&(0,y.jsx)(iH,{trackerDefaultState:lY,title:null==rm?void 0:rm.title,onBuyTicket:e=>{iC(!1),l8(e)},onBack:oi,productEventDetailQuery:{...i6,data:i7||tx},productDetail:rm,isCreator:lW}),nX&&(0,y.jsx)(nD,{title:null==rm?void 0:rm.title,productEventUid:null==rx||null==(eK=rx.event_summary)?void 0:eK.product_event_uid,setShowSeatSelection:nZ,eventSummary:null==rx?void 0:rx.event_summary,ticketOptions:null==rx?void 0:rx.ticket_options,relatedEvents:null==rx?void 0:rx.related_products,onBuyTicket:async e=>(iQ("seatSelection"),await l8(e)),fetchProductEventDetail:rl,isFetchingProductEventDetail:ro,trackerData:{...lY,event_is_first_purchase:!((null==rx||null==(e2=rx.event_summary)||null==(eX=e2.event_bookings)?void 0:eX.length)>0),source:"additionalQuestion"===iK?"ETICKET_ADDITIONAL_FORM":"EVENT_DETAIL",source_action:"additionalQuestion"===iK?"trigger_back":"trigger_purchase_event"}}),nP&&(0,y.jsx)(rq,{trackerDefaultState:{...lY,source:"seatSelection"===iK?"ETICKET_SEAT_SELECTION":"EVENT_DETAIL",source_action:"seatSelection"===iK?"trigger_confirm_eticket_seat_selection":"trigger_purchase_event",event_is_first_purchase:!((null==rx||null==(e4=rx.event_summary)||null==(e6=e4.event_bookings)?void 0:e6.length)>0)},title:null==rm?void 0:rm.title,salePrice:null==rx||null==(e7=rx.event_summary)?void 0:e7.min_sale_price,onBuyTicket:l8,onBack:oi,disableBuyButton:ro,repeatQuestion:null==rx||null==(ti=rx.event_summary)||null==(tn=ti.additional_form)?void 0:tn.repeat_form,totalTicket:lV?lz?e1(iA):nS:ib.length,questions:null==rx||null==(tc=rx.event_summary)||null==(to=tc.additional_form)?void 0:to.fields,selectedSeats:ib,selectedTicketOptions:iA,prefillData:rH,containerSx:{padding:{xs:i_.show||ih.show?"70px 16px 16px 16px":"16px",md:i_.show||ih.show?"53px 16px 32px 16":"32px 16px"}},isCreator:lW}),nV&&(0,y.jsx)(i3,{title:null==rm?void 0:rm.title,onBuyTicket:l5,onBack:oi,repeatQuestion:null==rx||null==(tu=rx.event_summary)||null==(td=tu.additional_form)?void 0:td.repeat_form,totalTicket:lV?lz?e1(iA):nS:ib.length,selectedSeats:ib,productEventDetailQuery:{...i6,data:i7||tx},productDetail:rm,containerSx:{padding:{xs:i_.show||ih.show?"70px 16px 16px 16px":"16px",md:i_.show||ih.show?"53px 16px 32px 16":"32px 16px"}}})]}):(0,y.jsxs)(y.Fragment,{children:[!tI.loading&&tI.show&&(0,y.jsx)(le.A,{maintenanceBanner:tI}),(null==ty?void 0:ty.showBreadcrumb)&&!(0,R.bN)()&&(0,y.jsx)(er.A,{htmlIdAttribute:"c-event-breadcrumb",creatorName:null==rx||null==(G=rx.creator)?void 0:G.name,creatorUsername:null==rx||null==(K=rx.creator)?void 0:K.username,productTitle:(null==rm?void 0:rm.title)||null,sx:tI.show?{marginTop:"0px !important"}:void 0}),(0,y.jsxs)(es.A,{direction:"column",justifyContent:"space-around",sx:{position:"relative"},children:[lW&&!!(null==rx||null==(X=rx.moderation)?void 0:X.moderation_status)&&["REJECT","ACTION_REQUIRED"].includes(null==rx||null==(Z=rx.moderation)?void 0:Z.moderation_status)&&(0,y.jsx)(F.A,{padding:{xs:"0px 16px",sm:"0px 48px",md:"0px 24px"},sx:{maxWidth:1152,margin:{xs:"16px auto",md:"32px auto"},width:"100%"},children:(0,y.jsx)(rJ,{status:rx.moderation.moderation_status,reason:rx.moderation.moderation_reason,attachments:rx.moderation.moderation_attachment})}),(null==rs?void 0:rs.is_show_success_payment)&&tJ&&(0,y.jsx)(tt.A,{isPaidNotifOpen:t1,setIsPaidNotifOpen:t2,message:th("key_thankyou_your_purchase_content")}),(0,y.jsx)(tt.A,{isPaidNotifOpen:rT.isOpen,setIsPaidNotifOpen:rD,message:rT.message}),(0,y.jsx)(tt.A,{isPaidNotifOpen:rO,setIsPaidNotifOpen:rM,message:rR}),(0,y.jsx)(tt.A,{isPaidNotifOpen:nB,setIsPaidNotifOpen:nF,message:th("eventGuestPurchaseCancelPaymentSuccess")}),(0,y.jsx)(tr,{isBannerOpen:nL,setBannerOpen:nO,message:th("eventGuestPurchaseCancelPaymentFailed")}),nW&&!(0,lc.uW)()&&(0,y.jsx)(te.A,{isPendingNotifOpen:nW,setIsPendingNotifOpen:nH,paymentInstruction:rf,onClickHandler:()=>{(0,Q.A)("/transaction-history?source=".concat(tk,"&source_action="))},ctaTitle:th("digitalContentDetailsScreenClickableTextPendingV2"),payment:ry,onHandleTimerFinished:ot}),(null==rg?void 0:rg.book_expiry)&&(0,y.jsx)(te.A,{isPendingNotifOpen:nq,setIsPendingNotifOpen:nU,paymentInstruction:{is_show:!0,invoice_id:"",payment_method_code:"",title:th("key_pending_order"),body:th("key_pending_order_desc")},dismissible:!1,onClickHandler:()=>{on("finish_booking")},countdownWithHours:!1,countdownWithText:!0,ctaTitle:th("key_complete_Order"),payment:{expiry_date:null==rg?void 0:rg.book_expiry,time_remaining:0,expiry_message:"",is_timer_active:!0},onHandleTimerFinished:async()=>{ik({show:!1}),nU(!1),setTimeout(()=>{i0(),rl(),rc()},500)}}),nW&&(0,lc.uW)()&&(0,y.jsx)(te.A,{isPendingNotifOpen:nW,setIsPendingNotifOpen:nH,paymentInstruction:rf,ctaTitle:th("digitalContentDetailsScreenClickableTextPendingV2"),onClickHandler:async()=>{lH?tX(!0):(0,R.bN)()?R.vz.send("openPaymentInstruction",{invoiceId:null==rf?void 0:rf.invoice_id,invoiceUrl:null==rf?void 0:rf.invoice_url}):(0,e$.A)(null==rf?void 0:rf.invoice_url)?(0,e$.A)((0,eQ.CQ)())?window.open("/payment/".concat(null==rf?void 0:rf.invoice_id,"?inv_id=").concat(null==rf?void 0:rf.invoice_id,"&inv_pm=").concat(null==rf?void 0:rf.payment_method_code),"_blank"):(0,Q.A)("/payment/".concat(null==rf?void 0:rf.invoice_id,"?inv_id=").concat(null==rf?void 0:rf.invoice_id,"&inv_pm=").concat(null==rf?void 0:rf.payment_method_code)):(0,e$.A)((0,eQ.CQ)())?window.open(null==rf?void 0:rf.invoice_url,"_blank"):(0,Q.A)(null==rf?void 0:rf.invoice_url)},payment:ry,onHandleTimerFinished:ot}),ns&&(0,y.jsx)(i8.A,{isOpen:ns,desc:nd,sx:{margin:{xs:"16px auto"}}}),(null==rx||null==(el=rx.event_summary)||null==($=el.status)?void 0:$.toLowerCase())===e0.yB.CANCELED&&(0,y.jsx)(rK,{children:(0,y.jsxs)(j.A,{variant:"filled",severity:"info",sx:{color:t_.palette.text.primary,width:"100%",padding:1},icon:(0,y.jsx)(ep.A,{}),children:[(0,y.jsx)(w.A,{children:th("eventDetailsEventCanceledInfoTitle")}),th("eventDetailsEventCanceledInfoSubtitle")]})}),i1&&ro&&!tS?(0,y.jsx)(tl.A,{style:{margin:{xs:"16px auto 0px auto",md:"32px auto 0px auto"},width:"100%",maxWidth:1152,padding:"0px 16px"}}):(0,y.jsxs)(i4.H5,{children:[(0,y.jsxs)(D.A,{container:!0,direction:{xs:"column",sm:"row"},justifyContent:"center",alignItems:{sm:"flex-start"},columns:{xs:1,sm:12},margin:{xs:"16px auto !important",md:"32px auto !important"},padding:{xs:"0px 16px",sm:"0px 48px",md:"0px 24px"},sx:{maxWidth:1152},children:[(0,y.jsx)(en.A,{isOpen:tZ,setOpen:t$,poster:null==rm?void 0:rm.cover,teaser:null==rm?void 0:rm.teaser,isTeaserShown:nr,setIsTeaserShown:nl,trackEventDefaultStates:lY,onCloseVideoPlayer:()=>{n1(!1)}}),(0,y.jsx)(ei.A,{contentCover:(0,iW.A)(null==rm?void 0:rm.cover,"500w"),onClickCover:()=>{t$(!tZ)},teaser:null==rm?void 0:rm.teaser,onTeaserClick:()=>{delete lY.source,delete lY.source_action,(0,nE.sx)("click_play_teaser",{...lY}),nl(!0)}}),(0,y.jsxs)(D.A,{item:!0,xs:1,sm:8,sx:{maxWidth:"100% !important",p:{xs:0,md:rv?"0px 0px 0px 24px":"24px 0px 0px 24px"}},children:[rv&&(0,y.jsx)(ne,{events:rx.related_products,currentEvent:n4,onClickEvent:e=>{window.location.href="/event/".concat(e.product_uid,"?show_options=true")},sx:{mb:"14px",mt:"0px"}}),(0,y.jsxs)(D.A,{container:!0,children:[(0,y.jsx)(D.A,{item:!0,children:(0,y.jsx)(rX,{component:"h1",id:"c-product-event-title-label",children:null==rm?void 0:rm.title})}),!ro&&tS?(0,y.jsxs)(D.A,{container:!0,direction:"row",marginTop:{xs:"8px",sm:"16px"},children:[(0,y.jsx)(r1.A,{creatorName:null==rx||null==(eo=rx.creator)?void 0:eo.name,creatorUsername:l3,isOwner:rH.user_id===(null==rx||null==(ea=rx.creator)?void 0:ea.creator_id),isVerifiedCreator:null==rx||null==(ec=rx.creator)?void 0:ec.verified,enableCreatorProfileRedirect:!il,onClickReport:()=>{t6(!0),(0,nE.sx)("select_report_event",{...lY})},onClickShare:()=>{tT("share_button"),!(0,lc.uW)()&&(null==rx?void 0:rx.pro_com_est)>0?l1():(ni(!0),(0,nE.sx)("select_share_event",{...lY}))},communityId:rI.mask_id,communityName:rI.name,isPrivateCommunity:rI.is_private,showShareAndReport:null==ty?void 0:ty.showShareAndReport}),(0,y.jsx)(eS.A,{sx:{margin:"16px 0"}}),(0,y.jsx)(ey,{eventStartDate:(0,iJ.WZ)(rx).startDate,eventEndDate:(0,iJ.WZ)(rx).endDate,eventLocationAddress:null==rx||null==(ed=rx.event_summary)?void 0:ed.location_address,eventLocationVenue:null==rx||null==(eu=rx.event_summary)?void 0:eu.location_venue,eventLocationCity:null==rx||null==(ex=rx.event_summary)?void 0:ex.location_city,eventTypeName:null==rx||null==(eh=rx.event_summary)||null==(em=eh.event_type)?void 0:em.name,eventMapURL:null==rx||null==(e_=rx.event_summary)?void 0:e_.map_url,eventTimezone:null==rx||null==(ev=rx.event_summary)?void 0:ev.event_timezone,isEnabledClick:(0,e$.A)((0,eQ.CQ)())||(null==ty||null==(eg=ty.eventInfoSection)?void 0:eg.isEnabledClick),isAttraction:r_,hideDateTime:O.A.hideDatetimeSku===n4}),(0,y.jsx)(e9,{isCreator:lW,isBought:tN,isPendingTransaction:(null==rs?void 0:rs.has_pending_order)&&!(0,lc.uW)(),onBuyTicket:async e=>{var t,n,i;(null==rs?void 0:rs.has_ongoing_booking)?ik({show:!0,code:"BOOKING_ONGOING",data:{minutes:(0,iJ.hO)(null==rs||null==(t=rs.ongoing_booking)?void 0:t.book_expiry)}}):((0,nE.sx)("click_purchase_eticket",{...lY,event_is_first_purchase:!((null==rx||null==(i=rx.event_summary)||null==(n=i.event_bookings)?void 0:n.length)>0)}),await l8(e),window.scrollTo(0,0))},onViewTicket:l4,numTicketsSelected:nS,setNumTicketsSelected:e=>{var t,n,i;e===(null==rx||null==(t=rx.event_summary)?void 0:t.max_purchasable_quota)&&rz({message:th("eventDetailsMaxQuantityMessage",{quantity:null==rx||null==(i=rx.event_summary)?void 0:i.max_purchasable_quota})}),e<=(null==rx||null==(n=rx.event_summary)?void 0:n.max_purchasable_quota)&&nI(e)},isLoading:ro,isSeatSelection:!lV,productEventDetail:rx,attractionSchedules:lK})]}):(0,y.jsx)(ta,{sx:{margin:"16px auto 0px auto",width:"100%"}})]})]})]}),(null==ty?void 0:ty.showTabCreatorAndDescLite)&&(0,y.jsx)(F.A,{sx:{padding:"16px 0px",justifyContent:"center",textAlign:"center"},children:(0,y.jsx)(B.A,{variant:"body1",component:"h2",fontWeight:500,children:th("description")})}),(null==ty?void 0:ty.showTabCreatorAndDesc)&&(0,y.jsx)(rZ,{descriptionRef:r7,creatorProfileRef:lT})]}),(0,y.jsx)(i4.Dv,{children:(0,y.jsxs)(F.A,{sx:{maxWidth:760,marginLeft:"auto",marginRight:"auto",marginBottom:!(null==ty||null==(eb=ty.layout)?void 0:eb.showFooter)&&"150px"},children:[(0,y.jsx)(et.A,{ref:r7,description:null==rm?void 0:rm.description,onReadMoreClick:()=>{var e;(0,nE.sx)("click_read_more",{...lY,content_type:null==rm||null==(e=rm.type)?void 0:e.name})}}),(0,y.jsxs)(es.A,{spacing:3,children:[(null==rx||null==(eA=rx.event_summary)?void 0:eA.eticket_detail)&&(0,y.jsx)(Y,{data:null==rx||null==(ek=rx.event_summary)?void 0:ek.eticket_detail}),(0,y.jsx)(eS.A,{}),(0,y.jsx)(ee.A,{ref:lT,creatorProfile:null==rx?void 0:rx.creator,onClickCreatorName:()=>{delete lY.source,delete lY.source_action,(0,nE.sx)("click_creator_profile",{...lY})}}),(null==ty?void 0:ty.showCommunitySection)&&(0,y.jsx)(re.A,{isEvent:!0,trackerData:lG,id:String(tA.event_uid),additionalTrackerData:{user_type:r4?"supporter":"guest",event_is_multiple_ticket_option:lz}}),!(0,lc.uW)()&&nG&&(0,y.jsx)(rt.A,{FFPromoterBannerA:!0,FFPromoterBannerB:!1,estimationPrice:null==rx?void 0:rx.pro_com_est,onClose:()=>{nY(!1)},trackerData:lG,onShowPromoterDrawer:()=>{tT("promote_button"),l1()},productType:"event"})]})]})}),(0,y.jsxs)(es.A,{sx:{display:"flex",background:t_.palette.background.secondary,padding:{xs:"0px 16px",md:"0px"},marginBottom:(0,R.bN)()&&"100px"},children:[(0,y.jsx)(eS.A,{sx:{width:"100%",minWidth:{xs:"100%",md:"1152px"},maxWidth:1152,marginLeft:{xs:"auto"},marginRight:{xs:"auto"},marginBottom:{md:"16px"}}}),(0,y.jsx)(lB,{contentUid:n4}),(null==ty?void 0:ty.showEventFooterInfoSection)&&(0,y.jsx)(N,{isAttraction:r_})]})]}),(0,y.jsx)(rn.A,{isGuestMode:(0,lc.uW)(),title:"Bagikan Event ini",isPromoted:(null==rx?void 0:rx.pro_com_est)>
10,trackerData:lG,FFPromoterBannerA:!0,clickButton:tE,contentData:rx,creatorProfile:rH,commissionEstimation:null==rx?void 0:rx.pro_com_est,showDrawer:nn,onClose:()=>{ni(!1)},linkData:(0,nT.F1)("share-content",null==rx||null==(ej=rx.creator)?void 0:ej.name,null!=(eY=null==rx||null==(eC=rx.creator)||null==(ew=eC.category)?void 0:ew.name)?eY:"",null==rx||null==(eI=rx.creator)?void 0:eI.header_image,ng),productType:"event"}),(0,y.jsx)(ri.A,{FFPromoterBannerA:!1,trackerData:lG,commissionEstimation:null==rx?void 0:rx.pro_com_est,clickButton:tE,isRequesting:ic,showDrawer:nK,onClose:()=>{nQ(!1)},onhandleGeneratePromoterLink:()=>{l6()},productType:"event"}),(null==rx||null==(eT=rx.event_summary)||null==(eE=eT.event_bookings)?void 0:eE.length)>1&&(0,y.jsx)(S.A,{showDrawer:nR,onClose:()=>{nM(!1)},tickets:null==rx?void 0:rx.event_summary.event_bookings.map(e=>({link:e.url,bookingCode:e.booking_code,name:e.full_name,purchasedDate:e.purchased_at}))}),r4&&(0,y.jsx)(ef.A,{onClose:()=>{(0,nE.sx)("select_report_event",{...lY}),t6(!1)},showDrawer:t5,reportType:"event",productId:n4,creatorId:(null==rx||null==(eD=rx.creator)?void 0:eD.creator_id)||"",creatorUserId:null==rx||null==(eB=rx.creator)?void 0:eB.creator_user_id,creatorName:null==rx||null==(eF=rx.creator)?void 0:eF.name,categoryId:null==rx||null==(eO=rx.creator)||null==(eL=eO.category)?void 0:eL.id,categoryName:null==rx||null==(eM=rx.creator)||null==(eR=eM.category)?void 0:eR.name,contentType:"event",contentTitle:null==rm?void 0:rm.title,contentPrice:null==rx||null==(eP=rx.event_summary)?void 0:eP.min_price,contentSalePrice:null==rx||null==(eN=rx.event_summary)?void 0:eN.min_sale_price}),(0,y.jsx)(r0.A,{communityName:rI.name,statusJoin:lh.S[rI.status_join],communityId:rI.mask_id,productId:String(n4),isEvent:!0,showScreeningQuestion:rI.has_screening_questions,creatorProfile:null==rQ||null==(eV=rQ.creatorProfile)?void 0:eV.creatorProfileData,productTitle:null==rm?void 0:rm.title}),!(0,lc.uW)()&&(0,y.jsx)(y.Fragment,{children:(null==(ez=(0,ip.Lg)("referralCode"))?void 0:ez.code)&&(null==iY?void 0:iY.community)?(0,y.jsx)(r2.A,{image:iY.community.thumbnail_image,name:iY.community.name,type:"referral",communityId:iY.community.mask_id,customSubtitle:th("joinCommunityModalDesc")}):(0,y.jsx)(r2.A,{name:(0,e$.A)(rI.mask_id)||"accept"===lh.S[rI.status_join]?null==rx?void 0:rx.creator.name:rI.name,image:(0,e$.A)(rI.mask_id)||"accept"===lh.S[rI.status_join]?null==rx?void 0:rx.creator.header_image:rI.thumbnail_image,type:(0,e$.A)(rI.mask_id)||"accept"===lh.S[rI.status_join]?"creator":"community",username:null==rx||null==(eq=rx.creator)?void 0:eq.username,communityId:rI.mask_id})}),(0,y.jsx)(nm.A,{open:rN,autoHideDuration:3e3,onClose:rU,anchorOrigin:{vertical:"top",horizontal:"center"},children:(0,y.jsx)(j.A,{onClose:rU,severity:"info",variant:"filled",sx:{width:"100%"},children:rV.message})})]}),oc,(0,y.jsx)(r6.A,{show:im.show,code:im.code,data:im.data,requestId:im.requestId,onClose:()=>{"BOOKING_EXPIRED"!==im.code&&ik({show:!1})},onCTA:on})]})]})}},20747:(e,t,n)=>{"use strict";n.d(t,{$m:()=>d,II:()=>p,IL:()=>u,YD:()=>m,g6:()=>x,rf:()=>s,wt:()=>c});var i=n(54773),r=n(62828),l=n(83705),o=n(82451),a=n(61626);let s=(0,i.Ay)(l.A)(e=>{let{theme:t,isEventOrderDetail:n,isXenditIframe:i,isVoucher:r}=e;return{display:n?"flex":"block",background:t.palette.background.primary,position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",width:"90%",height:"auto",margin:"auto 0",padding:i?"16px 0px 0px 0px":"24px 16px",minHeight:n&&520||n&&"380px",maxHeight:r&&"100vh"||n&&"650px",maxWidth:i?"920px":"490px",borderRadius:"12px",overflow:i&&"auto"||r&&"scroll",overflowX:"hidden",[t.breakpoints.up("xs")]:{height:n&&"90%"}}}),c=(0,i.Ay)(o.A)(e=>{let{theme:t}=e;return{color:t.palette.text.primary,fontSize:"20px",lineHeight:"20px",fontWeight:"bold",letterSpacing:"0.02em",wordBreak:"break-word"}}),d=(0,i.Ay)(l.A)(e=>{let{theme:t}=e;return{flex:1,color:t.palette.text.secondary,fontSize:"14px",lineHeight:"20px",letterSpacing:"0.02em"}}),u=(0,i.Ay)(r.A)(e=>{let{theme:t}=e;return{color:t.palette.text.tertiery,fontSize:"14px",lineHeight:"18px",fontWeight:"bold",letterSpacing:"0.02em",svg:{color:t.palette.tiptip[500]}}}),p=(0,i.Ay)(l.A)({alignItems:"center",display:"flex",width:"100%",flexDirection:"column",marginTop:"auto"}),x=(0,i.Ay)(r.A)(e=>{let{background:t=""}=e;return{borderRadius:"8px",color:"white",background:""!==t?t:null}}
1),m=(0,i.Ay)(a.A)({display:"flex",width:"100%",flexDirection:"row"})},26787:(e,t,n)=>{"use strict";function i(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return{"@context":"https://schema.org","@graph":t}}n.d(t,{ow:()=>i})},28454:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var i=n(37876),r=n(77328),l=n.n(r);function o(e){let{data:t,id:n}=e;if(!t)return null;let r=JSON.stringify(t).replace(/</g,"\\u003c");return(0,i.jsx)(l(),{children:(0,i.jsx)("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:r}},n||"jsonld")})}},37074:(e,t,n)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/event/[event_uid]",function(){return n(19360)}])},42221:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});var i,r,l,o,a,s=n(14232);function c(){return(c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(null,arguments)}let d=function(e){return s.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"6 3 36 42"},e),i||(i=s.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18 9.225a2.661 2.661 0 01-1.349.363 2.651 2.651 0 01-2.344-1.405 2.256 2.256 0 00-.569-.669 2.73 2.73 0 00-1.694-.577H8.663A2.665 2.665 0 006 9.588v23.6h1.807c.368 0 .667.293.667.656a.662.662 0 01-.667.656H6v6.537a2.665 2.665 0 002.663 2.65h3.381c.92 0 1.824-.45 2.263-1.245.153-.281.353-.532.591-.741A2.642 2.642 0 0118 41.406V9.226zm-1.92 24.619a.661.661 0 00-.666-.657h-3.992a.662.662 0 00-.667.657c0 .362.299.656.667.656h3.992a.661.661 0 00.667-.656z",fill:"url(#buyer-info_svg__paint0_linear_12520_25007)"})),r||(r=s.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.654 16.125c.553 0 1 .44 1 .984a.992.992 0 01-1 .985h-7.988c-.552 0-1-.441-1-.985a.992.992
10 011-.984h7.988zm0 4.594c.553 0 1 .44 1 .984a.992.992 0 01-1 .985h-7.988c-.552 0-1-.441-1-.985a.992.992 0 011-.984h7.988zm1 5.578a.992.992 0 00-1-.985h-7.988c-.552 0-1 .441-1 .985s.448.984 1 .984h7.988c.553 0 1-.44 1-.984z",fill:"#C6C9FF"})),l||(l=s.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M32.64 43.576c-.51-.954-1.5-1.606-2.64-1.606-1.14 0-2.13.652-2.64 1.606-.495.909-1.515 1.424-2.55 1.424H21c-1.65 0-3-1.363-3-3.03V34.5h3.085a.662.662 0 00.667-.656.662.662 0 00-.667-.657H18V6.03C18 4.363 19.35 3 21 3h3.81c1.035 0 2.055.515 2.55 1.424A2.982 2.982 0 0030 6.03c1.14 0 2.13-.636 2.655-1.59.48-.925 1.5-1.425 2.535-1.425h3.825C40.665 3.015 42 4.363 42 6.03v27.157h-3.082a.662.662 0 00-.667.657c0 .362.299.656.667.656H42v7.47c0 1.667-1.35 3.03-3 3.03h-3.81c-1.035 0-2.055-.515-2.55-1.424zm-4.056-10.389c.369 0 .667.294.667.657a.662.662 0 01-.667.656h-3.916a.661.661 0 01-.667-.656c0-.363.298-.657.667-.657h3.916zm6.747 0c.368 0 .667.294.667.657a.662.662 0 01-.667.656h-3.166a.662.662 0 01-.667-.656c0-.363.298-.657.667-.657h3.166z",fill:"url(#buyer-info_svg__paint1_linear_12520_25007)"})),o||(o=s.createElement("path",{d:"M30 19.688a3.749 3.749 0 003.75-3.75 3.749 3.749 0 00-3.75-3.75 3.749 3.749 0 00-3.75 3.75 3.749 3.749 0 003.75 3.75zm0 1.875c-2.503 0-7.5 1.256-7.5 3.75v.937a.94.94 0 00.938.938h13.125a.94.94 0 00.937-.938v-.938c0-2.493-4.997-3.75-7.5-3.75z",fill:"#FED492"})),a||(a=s.createElement("defs",null,s.createElement("linearGradient",{id:"buyer-info_svg__paint0_linear_12520_25007",x1:12.056,y1:6.938,x2:12.056,y2:43.688,gradientUnits:"userSpaceOnUse"},s.createElement("stop",{stopColor:"#9CA0FF"}),s.createElement("stop",{offset:1,stopColor:"#787DFC"})),s.createElement("linearGradient",{id:"buyer-info_svg__paint1_linear_12520_25007",x1:30,y1:3,x2:30,y2:45,gradientUnits:"userSpaceOnUse"},s.createElement("stop",{stopColor:"#FFB43D"}),s.createElement("stop",{offset:1,stopColor:"#F89C0B"})))))}},45728:(e,t,n)=>{"use strict";function i(){let e=document.querySelector("meta[name='viewport']");e||((e=document.createElement("meta")).name="viewport",document.head.appendChild(e));let t=e.content;function n(e){e.touches.length>1&&e.preventDefault()}function i(e){e.ctrlKey&&e.preventDefault()}return e.content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no",document.addEventListener("touchmove",n,{passive:!1}),document.addEventListener("wheel",i,{passive:!1}),()=>{e.content=t,document.removeEventListener("touchmove",n),document.removeEventListener("wheel",i)}}n.d(t,{K:()=>i})},46375:(e,t,n)=>{"use strict";n.d(t,{C:()=>o});var i=n(42252),r=n(58713),l=n(42727);let o=e=>{let{invoice_id:t,idempotentKey:n,onCallbackSuccess:o=()=>{},onCallbackFailed:a=()=>{},onCallbackCleanup:s=()=>{}}=e,{isFetching:c,refetch:d,data:u,isError:p,error:x}=(0,i.I)({queryKey:["cancelPayment",t],queryFn:async()=>{try{let e=await (0,l.HY)({invoice_id:t,idempotentKey:n});return o(),(0,r.Tv)("tempInvoiceData"),e}catch(t){var e,i;throw a(null==t||null==(i=t.response)||null==(e=i.data)?void 0:e.code),t}finally{s()}},enabled:!1,retry:!1,refetchOnWindowFocus:!1});return{isCancelPaymentFetching:c,fetchCancelPayment:d,cancelPaymentData:u,isCancelPaymentError:p,cancelPaymentError:x}}},46484:(e,t,n)=>{"use strict";n.d(t,{A:()=>h});var i=n(37876),r=n(14232),l=n(58865),o=n(20035),a=n(83198),s=n(70946),c=n(37643),d=n(37224),u=n(14628),p=n(8873);let x=(0,o.A)(l.A)({"&.MuiAlert-root":{width:"100%",padding:"10px",borderRadius:"6px",alignItems:"center",".MuiAlert-icon, .MuiAlert-message, .MuiAlert-action":{padding:"0px"},".MuiAlert-icon":{marginRight:"10px"}}});function m(e){let[t,n]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{e.show&&n(e.show),e.autoClose&&setTimeout(()=>{n(!1),setTimeout(()=>{null==e||e.onCallbackAutoClose()},500)},3e3)},[e.show,e.autoClose]),(0,i.jsx)(d.A,{in:t,sx:e.sxCollapse,children:(0,i.jsx)(x,{severity:e.severity,variant:(null==e?void 0:e.variant)||"outlined",iconMapping:{success:e.successIcon,error:e.errorIcon,info:e.infoIcon},sx:e.sx,action:e.dismissable&&(0,i.jsx)(s.A,{id:"b-common-alert-close","aria-label":"close",color:"inherit",size:"small",onClick:()=>n(!1),children:(0,i.jsx)(p.A,{fontSize:"inherit"})}),...e,children:e.children})})}m.defaultProps={show:!1,autoClose:!1,dismissable:!0,successIcon:(0,i.jsx)(u.A,{sx:{fontSize:"20px",color:"#51CE83"}}),errorIcon:(0,i.jsx)(a.A,{sx:{fontSize:"20px",color:"error"}}),infoIcon:(0,i.jsx)(c.A,{sx:e=>({fontSize:"20px",color:e.palette.info.main})}),onCallbackAutoClose:()=>{},variant:"outlined"};let h=m}
1,58174:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var i=n(37876),r=n(46290),l=n(36823);function o(e){let{show:t,code:n,data:o,onClose:a,onCTA:s,requestId:c}=e;return(0,i.jsx)(l.A,{title:"",isOpen:t,onClose:a,hideCloseButton:"BOOKING_EXPIRED"===n,sxDialogContainer:{"& .MuiDialogContent-root":{padding:"0px"},"& .MuiDialog-paper":{width:"500px"}},sxDrawerContainer:{padding:"16px 0px"},children:(0,i.jsx)(r.A,{code:n,showCTA:!0,onCTA:s,data:o,requestId:c})})}},65355:(e,t,n)=>{"use strict";n.d(t,{_v:()=>x,Cf:()=>m,If:()=>h});var i=n(34957),r=n(13379);let l=e=>({eventDetailData:{product_id:"",product_uid:"",title:"",description:"",cover:"",type:{id:0,name:"",units:""},created_at:"",content_length:0,teaser:"",stats:{total_sales:0},is_published:!1,cover_file:"",teaser_file:"",currency:"",tier_id:0,allowed_payment_method:[],tiptip_fee:0,is_tiptip_studio:!1,category:{id:0,name:""},file_name:"",file_name_original:"",promoter_fee_from_creator:0,promoter_fee_from_tiptip:0,is_promoted:!1,status:{id:0,name:""},content_info:"",preview_link:"",submitted_at:"",released_at:"",cover_thumbnail:""},eventUserDetailData:{creator:{creator_id:"",name:"",username:"",creator_user_id:"",header_image:"",bio:"",category:{id:0,name:""},verified:!1,is_community_leader:!1,creator_group:"",creator_user_status:0},related_products:[{event_ended_at:"",event_started_at:"",label:"",product_uid:"",status:r.yB.AVAILABLE}],currency:"",encoding_information:{encoding_id:"",original_file_path:"",encoding_file_path:""},file_link:"",is_show_success_payment:!1,is_subscriber:!1,metadata:{event_started_at:"",location_city:"",quota:0,quota_status:{id:0,name:""}},event_summary:{status:r.yB.AVAILABLE,event_type:{id:0,name:""},eticket_detail:"",location_city:"",location_venue:"",location_address:"",map_url:"",is_listed_event:!0,is_seating_required:!1,seating_plan_status:"",seating_plan_version:"",product_event_uid:"",sales_started_at:"",sales_ended_at:"",min_price:0,min_sale_price:0,max_price:0,max_sale_price:0,is_allow_guest_purchase:!0,venue_filename:"",venue_url:"",event_started_at:"",event_ended_at:"",event_started_at_tz:"",event_ended_at_tz:"",event_timezone:{name:"",offset:"",abbreviation:"",prefix:"",label:"",short_offset:""},is_stpdf:!1,days_before_delivery:0,city_id:0,city_name:"",booking_timer_minute:0,use_wristband_code:!1,event_bookings:[],max_purchasable_quota:0,min_coin_price:0,min_coin_sale_price:0,additional_form:{id:"",form_name:"",form_description:"",submit_url:"",submit_method:"",fields:[],repeat_form:!1},is_hide_send_to_all:!1},ticket_options:[],payment_instruction:{is_show:!1,title:"",body:"",invoice_id:"",payment_method_code:""},price:0,sale_price:0,price_tier:{tier_id:0,web_price:0,web_price_sale:0,app_price:0,app_price_sale:0,ios_price:0,ios_price_sale:0,iap_product_id:""},pro_com_est:0,status_order:"",has_pending_order:!1,subscribe_package_list:[],content_access_source:"",has_ongoing_booking:!1,ongoing_booking:{show:!1,book_expiry:"",book_session_id:""},moderation:{},availability_schedules:[],payment:{expiry_date:"",time_remaining:0,expiry_message:"",is_timer_active:!1}},contactInfoFormValue:{full_name:"",phone_number:"",send_notification_preference_wa:!1,email:"",country_code:""},contactInfoFormValid:{full_name:!1,email:!1,phone_number:!1},enableBuyerInfoForm:!1,selectedSeats:[],selectedTicketOptions:{},buyerInfoFormInit:!1,buyerInfoFormValue:[],buyerInfoFormValid:[],bookingTimer:{show:!1,book_expiry:null,book_session_id:null},bookingPreview:{show:!1},bookingError:{show:!1,code:null,data:{},requestId:""},sendToAdditionalEmail:!1,contactInfoAreaCode:{areaCode:"+62",countryCode:"ID"},selectedAttractionDate:{date:"",source:"",sliderDate:[]},calendarAttraction:{show:!1,ticket_option_uid:""},attractionDates:{ticket_option_uid:"",dates:[]},setEventDetail:async t=>{e({eventDetailData:t})},setEventUserDetail:async t=>{e({eventUserDetailData:t})},setContactInfoFormValue:async t=>{e({contactInfoFormValue:t})},setContactInfoFormValid:async t=>{e({contactInfoFormValid:t})},resetContactInfoForm:async()=>{e({contactInfoFormValue:{full_name:"",phone_number:"",send_notification_preference_wa:!1,email:"",country_code:""},contactInfoFormValid:{full_name:!1,phone_number:!1,email:!1},enableBuyerInfoForm:!1})},resetBuyerInfoForm:async()=>{e({buyerInfoFormValue:[],buyerInfoFormValid:[],buyerInfoFormInit:!1})},setEnableBuyerInfoForm:async t=>{e({enableBuyerInfoForm:t})},setBuyerInfoFormValue:async t=>{e({buyerInfoFormValue:t})},setBuyerInfoFormValid:async t=>{e({buyerInfoFormValid:t})},setSelectedSeats:t=>{e({selectedSeats:t})},setSelectedTicketOptions:t=>{e({selectedTicketOptions:t})},setBuyerInfoFormInit:async t=>{e({buyerInfoFormInit:t})},setBookingTimer:async t=>{e(e=>({bookingTimer:{...e.bookingTimer,...t}}))},setBookingPreview:async t=>{e(e=>({bookingPreview:{...e.bookingPreview,...t}}))},setBookingError:async t=>{e(e=>({bookingError:{...e.bookingError,...t}}))},setSendToAdditionalEmail:async t=>{e({sendToAdditionalEmail:t})},setContactInfoAreaCode:async t=>{e({contactInfoAreaCode:t})},setSelectedAttractionDate:t=>{e({selectedAttractionDate:t})},setCalendarAttraction:t=>{e({calendarAttraction:t})},setAttractionDates:t=>{e({attractionDates:t})}});var o=n(4319);let a={eventTypes:[],selectedEventType:null,selectedEventTypes:[]},s=[],c=e=>(s.push(()=>e(a)),{...a,setEventTypes(t){e({eventTypes:t})},setSelectedEventType:t=>{e({selectedEventType:t})},setSelectedEventTypes:t=>{e({selectedEventTypes:t})}}),d={screen:{current:"email",previous:null},seconds:n(84733).ro,expiredAt:null,verificationForm:{},deliveryMethod:"email"},u=[],p=e=>(u.push(()=>e(d)),{...d,setScreen(t){e({screen:t})}
1,setSeconds(t){e({seconds:t})},setExpiredAt(t){e({expiredAt:t})},setVerificationForm:t=>{e({verificationForm:t})},setDeliveryMethod(t){e({deliveryMethod:t})},tickSecondsTimer:t=>{e(e=>({seconds:e.seconds>0?e.seconds+t:e.seconds}))}}),x=(0,i.vt)()(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return{...l(...t)}}),m=(0,i.vt)()((0,o.Zr)(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return{...c(...t)}},{name:"eventTypes-store",partialize:e=>({eventTypes:e.eventTypes})})),h=(0,i.vt)()((0,o.Zr)(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return{...p(...t)}},{name:"eventVerification-store"}))},72420:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var i=n(14232);let r=function(){let e,[t,n]=(0,i.useState)(!1),[r,l]=(0,i.useState)({message:"",severity:"info"});return{isSnackbarOpen:t,snackbarMessage:r,queueSnackbar:i=>{t?(clearTimeout(e),n(!1),setTimeout(()=>{l(i),n(!0)},100)):(n(!0),l(i))},closeSnackbar:(e,t)=>{"clickaway"!==t&&n(!1)}}}},81533:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});var i=n(37876),r=n(30566),l=n(2673),o=n(29468),a=n(46484),s=n(61626),c=n(82451);function d(e){let{show:t=!0,maintenanceBanner:n,source:d="other"}=e,u=(0,r.A)(),p=(0,l.A)(u.breakpoints.up("sm"));return(0,i.jsx)(a.A,{sxCollapse:{width:"100%",marginTop:"0px !important",borderRadius:0},sx:{"&.MuiAlert-root":{borderRadius:0},padding:{desktop:{home:"16px 128px 40px 128px !important",other:"10px 128px !important"},mobile:{home:"16px 16px 40px 16px !important",other:"8px !important"}}[p?"desktop":"mobile"][d],"& .MuiAlert-message":{overflow:"hidden"}},show:t,severity:"info",variant:"filled",infoIcon:(0,i.jsx)(o.A,{sx:{fontSize:"24px",color:u.palette.purple[300]}}),dismissable:!1,children:(0,i.jsxs)(s.A,{children:[(0,i.jsx)(c.A,{variant:"normalBold",sx:{color:u.palette.background.primary},children:(null==n?void 0:n.title)||""}),(0,i.jsx)(c.A,{variant:"normalRegular",sx:{color:u.palette.background.primary},children:(null==n?void 0:n.message)||""})]})})}},85305:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var i=n(54773),r=n(49516);let l=(0,i.Ay)(r.A)({})},87777:(e,t,n)=>{"use strict";function i(e){return{"@type":e.type||"WebPage","@id":e.id,url:e.url,name:e.name,isPartOf:{"@id":e.websiteId},about:{"@id":e.organizationId},...e.description&&{description:e.description},...e.breadcrumbId&&{breadcrumb:{"@id":e.breadcrumbId}},...e.image&&{primaryImageOfPage:{"@type":"ImageObject",url:e.image}}}}n.d(t,{b:()=>i})},88274:(e,t,n)=>{"use strict";n.d(t,{EY:()=>s,Rj:()=>a});var i=n(67882),r=n(88177);let l=e=>{if(""!==e)return e.includes("+0")?l(e.replace("+0","+62")):(0,i.L)(e)},o=e=>l(e).country?(0,r.K)(l(e).country):(0,i.L)(e).countryCallingCode,a=e=>{if(""===e||void 0===e)return{phoneNumber:"",countryCode:"+62"};try{let t=o(e);return{phoneNumber:e.split("+".concat(t))[1],countryCode:"+".concat(t)}}catch(t){return{phoneNumber:e.replace(/^\+/,""),countryCode:"+62"}}};function s(e){let t=e.replace(/[\s()-]/g,"");return/^(?:\+62|62|0)(8[0-9]+)$/.test(t)}},95844:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var i=n(37876),r=n(61626),l=n(82451),o=n(14493),a=n(8118),s=n(34846),c=n(11772),d=n(5560);function u(e){var t;let{bookingTimer:n,onTimerFinished:u,isPageView:p}=e,{t:x}=(0,s.Bd)(),m=null==(t=(0,d.XI)())?void 0:t.bookingTimer;return(0,i.jsxs)(r.A,{sx:e=>({background:e.palette.info.main,justifyContent:"center",alignItems:"center",color:null==m?void 0:m.colorText,fontSize:"14px",py:"6px",flexDirection:"column",width:"100%",position:p?"static":"fixed",zIndex:999,[e.breakpoints.up("sm")]:{py:"10px",flexDirection:"row"}}),children:[(0,i.jsxs)(r.A,{direction:"row",alignItems:"center",id:"c-event-booking-timer-label",children:[(0,i.jsx)(c.A,{sx:{width:"16px",height:"16px",mr:"4px",mt:"-2px"}}),(0,i.jsx)(l.A,{sx:{color:null==m?void 0:m.colorText,fontSize:"14px"},children:x("key_ticket_hold")})]}),(0,i.jsx)(o.A,{orientation:"vertical",sx:e=>({ml:"8px",mr:"4px",borderColor:e.palette.info.light,height:"21px",[e.breakpoints.down("md")]:{display:"none"}})}),(0,i.jsx)(r.A,{id:"c-event-booking-timer-countdown",children:(0,i.jsx)(a.A,{withText:!0,expiryDate:null==n?void 0:n.book_expiry,withHours:!1,sx:{marginLeft:"4px"," p":{color:null==m?void 0:m.colorText,fontSize:"14px",fontWeight:700}},onTimerFinished:u})})]})}}},e=>{var t=t=>e(e.s=t);e.O(0,[655,8522,9759,1420,5458,2787,1898,261,8885,535,1488,9199,2601,4744,9095,2320,723,636,6593,8792],()=>t(37074)),_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.