"use strict";(("undefined"!=typeof self?self:this).__LOADABLE_LOADED_CHUNKS__=("undefined"!=typeof self?self:this).__LOADABLE_LOADED_CHUNKS__||[]).push([[64741,42340],{49079:(e,t,i)=>{i.d(t,{Z:()=>h});var n=i(64572),r=i(15861),o=i(94436),c=i(36239),s=i(13633),a=i(98531),l=i(93091),d=i(61247),p=i(94379);function u(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function f(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?u(Object(i),!0).forEach((function(t){(0,n.Z)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):u(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}const h=({giftId:e})=>function(){var t=(0,r.Z)((function*(t,i){const n=["gift","item",e],r=(0,s.default)(i(),"token");if((0,a.Z)(i(),n,"isFetching"))return t({type:""});const u={headers:f(f({},(0,l.wU)()),{},{Authorization:`Bearer ${r}`})},h=(0,c.Z)({endpoint:`/gift/${e}`});t({type:p.TA,payload:{selectPath:n}});try{let r=yield(0,o.ZP)(h.href,u);r.ok||(r=yield(0,d.Z)({response:r,dispatch:t,getState:i,fetchOptions:u,fetchUrl:h}));const c=yield r.json();return t({type:p.I0,payload:{gifts:{[e]:c}}}),t({type:p.Ij,payload:{selectPath:n}})}catch(e){return t({type:p.g$,payload:{selectPath:n,error:e}})}}));return function(e,i){return t.apply(this,arguments)}}()},88982:(e,t,i)=>{i.r(t),i.d(t,{PrivateShowGift:()=>v,default:()=>D});var n=i(51721),r=i(64572),o=i(67294),c=i(45697),s=i.n(c),a=i(71893),l=i(60712),d=i(53826),p=i(42362),u=i(93924),f=i(36241),h=i(16966),g=i(54264);const m=i.p+"static/img/img_show_ticket_more.d1d92f76.svg",x=i.p+"static/img/img_show_ticket_mvp.8b054409.svg",P=i.p+"static/img/img_show_ticket_single.8e5e90ae.svg";let v=function(e){function t(...t){var i;return i=e.call.apply(e,[this].concat(t))||this,(0,r.Z)(i,"renderHeader",(()=>{const{status:e,type:t,isSelected:n,t:r}=i.props;return t===p.Ux.SINGLE?o.createElement(w,{shouldHide:!0,isSelected:n}):t===p.Ux.MVP?o.createElement(w,{isSelected:n},o.createElement(_,null,r("show_become_mvp",{ns:u.TranslationNamespace.LIVESTREAM}))):t===p.Ux.MORE?[p.kn.PREPARING,p.kn.PERFORMING].includes(e)?o.createElement(w,{isSelected:n},o.createElement(_,null,r("show_strength",{ns:u.TranslationNamespace.LIVESTREAM}))):o.createElement(w,{isSelected:n},o.createElement(_,null,r("popup_achieve_target",{ns:u.TranslationNamespace.LIVESTREAM}))):null})),(0,r.Z)(i,"getEarlyBirdDiscountPercentage",(()=>{const{earlyBirdDiscountPercentage:e,remoteConfigEarlyBirdPrice:t,remoteConfigTicketPrice:n}=i.props;return null!==e?e:null!==t&&null!==n?Math.floor(100*(1-t/n)):0})),(0,r.Z)(i,"getShouldShowDiscount",(()=>{const{isEarlyBirdTicket:e}=i.props;return e&&i.getEarlyBirdDiscountPercentage()>0})),(0,r.Z)(i,"renderPrice",(({isOriginalPrice:e=!1}={})=>{const{isAuthed:t,price:n,count:r,earlyBirdDiscountPercentage:c,remoteConfigTicketPrice:s}=i.props;return t?o.createElement(o.Fragment,null,o.createElement(O,{src:g,isActive:!e}),o.createElement(C,{isActive:!e},n?(0,d.Z)({number:e?null!==c?Math.ceil(100*n/(100-c))*r:s*r:n*r}):"-")):null})),(0,r.Z)(i,"getGiftIconSource",(()=>{const{type:e}=i.props;switch(e){case p.Ux.SINGLE:return P;case p.Ux.MORE:return m;case p.Ux.MVP:return x;default:return null}})),(0,r.Z)(i,"fetchGift",(()=>{const{giftId:e,fetchGift:t,isGiftFetched:n}=i.props;if(e&&!n)return t({giftId:e})})),i}(0,n.Z)(t,e);var i=t.prototype;return i.componentDidMount=function(){this.fetchGift()},i.componentDidUpdate=function(e){const{giftId:t,isAuthed:i}=this.props;i===e.isAuthed&&t===e.giftId||this.fetchGift()},i.render=function(){const{count:e,isSelected:t,t:i}=this.props;return o.createElement(y,{isSelected:t},this.renderHeader(),o.createElement(E,null,o.createElement(S,{src:this.getGiftIconSource()}),o.createElement(Z,null,e?i("show_tickets",{number:(0,d.Z)({number:e}),ns:u.TranslationNamespace.LIVESTREAM}):"-"),o.createElement(G,null,this.renderPrice()),this.getShouldShowDiscount()&&o.createElement(N,null,this.renderPrice({isOriginalPrice:!0})),this.getShouldShowDiscount()&&o.createElement(I,null,o.createElement(b,null,this.getEarlyBirdDiscountPercentage(),"% Off"))))},t}(o.PureComponent);v.propTypes={giftId:s().string,status:s().string,type:s().string,count:s().number,remoteConfigEarlyBirdPrice:s().number,remoteConfigTicketPrice:s().number,price:s().number,earlyBirdDiscountPercentage:s().number,isSelected:s().bool,isAuthed:s().bool,isEarlyBirdTicket:s().bool,isGiftFetched:s().bool,fetchGift:s().func,t:s().func.isRequired},v.defaultProps={giftId:"",status:null,type:null,count:null,remoteConfigEarlyBirdPrice:null,remoteConfigTicketPrice:null,price:null,earlyBirdDiscountPercentage:null,isSelected:!1,isAuthed:!1,isEarlyBirdTicket:!1,isGiftFetched:!1,fetchGift:()=>null};const y=a.default.div.withConfig({displayName:"PrivateShowGift__StyledPrivateShowGift",componentId:"sc-1vpxfxx-0"})(["border-radius:4px;",""],(({isSelected:e})=>{if(e)return(0,a.css)(["border:2px solid ",";"],f.$_.carmine)})),w=a.default.div.withConfig({displayName:"PrivateShowGift__Header",componentId:"sc-1vpxfxx-1"})(["padding-left:4px;padding-right:4px;height:20px;display:flex;align-items:center;justify-content:center;"," overflow:hidden;line-height:1;"],(({isSelected:e,shouldHide:t})=>{if(e&&!t)return(0,a.css)(["background-color:",";"],f.$_.carmine)})),_=a.default.div.withConfig({displayName:"PrivateShowGift__HeaderText",componentId:"sc-1vpxfxx-2"})(["",";font-size:12px;font-weight:600;color:",";"],h.Z,f.zP.white),E=a.default.div.withConfig({displayName:"PrivateShowGift__Body",componentId:"sc-1vpxfxx-3"})(["padding:8px;display:flex;flex-direction:column;align-items:center;"]),S=a.default.img.withConfig({displayName:"PrivateShowGift__GiftImage",componentId:"sc-1vpxfxx-4"})(["margin-bottom:4px;width:72px;height:72px;object-fit:cover;"]),Z=a.default.div.withConfig({displayName:"PrivateShowGift__GiftName",componentId:"sc-1vpxfxx-5"})(["margin-bottom:8px;font-size:12px;line-height:1;color:",";text-align:center;"],f.zP.white),I=a.default.div.withConfig({displayName:"PrivateShowGift__Badge",componentId:"sc-1vpxfxx-6"})(["margin-top:4px;padding:0px 4px;max-width:100%;display:flex;align-items:center;justify-content:center;overflow:hidden;background-color:",";"],f.$_.red),b=a.default.div.withConfig({displayName:"PrivateShowGift__BadgeText",componentId:"sc-1vpxfxx-7"})(["",";font-size:12px;line-height:1.5;color:",";"],h.Z,f.$_.neutral[100]),G=a.default.div.withConfig({displayName:"PrivateShowGift__Price",componentId:"sc-1vpxfxx-8"})(["display:flex;align-items:center;justify-content:center;min-height:21px;"]),N=(0,a.default)(G).withConfig({displayName:"PrivateShowGift__OriginalPrice",componentId:"sc-1vpxfxx-9"})(["position:relative;::after{position:absolute;left:0px;right:0px;top:50%;height:1px;background-color:",";transform:translateY(-50%);content:'';}"],f.$_.red),k=(0,a.css)(["opacity:",";"],(({isActive:e})=>e?1:.6)),O=a.default.img.withConfig({displayName:"PrivateShowGift__GiftIcon",componentId:"sc-1vpxfxx-10"})(["",";margin-right:4px;width:12px;height:12px;"],k),C=a.default.div.withConfig({displayName:"PrivateShowGift__GiftTotalPrice",componentId:"sc-1vpxfxx-11"})(["",";font-size:14px;font-weight:600;line-height:1.5;color:",";"],k,f.zP.primary),D=(0,l.Zh)()(v)},75425:(e,t,i)=>{i.r(t),i.d(t,{default:()=>P});var n=i(45007),r=i(11650),o=i(88982),c=i(49079),s=i(98531),a=i(13633),l=i(67093),d=i(43641),p=i(95876),u=i(5471),f=i(59522),h=i(76197),g=i(66564),m=i(95110),x=i(22826);const P=(0,n.$j)(((e,{streamId:t,type:i})=>{var n;const o=(0,a.default)(e,"id"),c=(0,u.ZP)(e,[t,"privateShow"],"fundingId"),P=(0,u.ZP)(e,[t,"privateShow"],"performingId"),v=(0,h.Z)(e,t,c,P),y=null===(n=(0,f.Z)(e,["goal",c,"breakdown"],"itemIds"))||void 0===n?void 0:n[0],w=(0,p.Z)(e,t),_=(0,d.Z)(e,v,"price"),E=+(0,l.Z)(e,t,c,y,o,i);return{giftId:v,status:w,remoteConfigEarlyBirdPrice:(0,x.default)(e,r.oXD),remoteConfigTicketPrice:(0,x.default)(e,r.B3Q),price:_,count:E,earlyBirdDiscountPercentage:(0,m.Z)(e,[c,"context"],"discount_percentage"),isAuthed:!!o,isEarlyBirdTicket:(0,g.Z)(e,v,c),isGiftFetched:(0,s.Z)(e,["gift","item",v],"isFetched")}}),(e=>({fetchGift:t=>e((0,c.Z)(t))})))(o.default)},53826:(e,t,i)=>{i.d(t,{Z:()=>n});const n=({number:e})=>{if(isNaN(e)||null===e)return null;const t=e.toString();if(t.includes(".")){const[e,i=""]=t.split(".");return[e.replace(/\B(?=(\d{3})+(?!\d))/g,","),i].join(".")}return t.replace(/\B(?=(\d{3})+(?!\d))/g,",")}},76197:(e,t,i)=>{i.d(t,{Z:()=>o});var n=i(78392),r=i(95110);const o=(0,n.Z)(((e,t,i)=>(0,r.Z)(e,[i,"context"],"ticket_product_id")),((e,t,i,n)=>(0,r.Z)(e,[n,"context"],"ticket_product_id")),((e,t)=>t||e))(((e,t,i,n)=>`${t}:${i}:${n}`))},95876:(e,t,i)=>{i.d(t,{Z:()=>c});var n=i(78392),r=i(5471),o=i(42362);const c=(0,n.Z)(((e,t)=>(0,r.ZP)(e,[t,"privateShow","status"],"isFunding")),((e,t)=>(0,r.ZP)(e,[t,"privateShow","status"],"isFundingFinalCall")),((e,t)=>(0,r.ZP)(e,[t,"privateShow","status"],"isConsidering")),((e,t)=>(0,r.ZP)(e,[t,"privateShow","status"],"isRefunding")),((e,t)=>(0,r.ZP)(e,[t,"privateShow","status"],"isPreparing")),((e,t)=>(0,r.ZP)(e,[t,"privateShow","status"],"isPerforming")),((e,t,i,n,r,c)=>c?o.kn.PERFORMING:r?o.kn.PREPARING:n?o.kn.REFUNDING:i?o.kn.CONSIDERING:t?o.kn.FUNDING_FINAL_CALL:e?o.kn.FUNDING:void 0))(((e,t)=>`${t}`))},67093:(e,t,i)=>{i.d(t,{Z:()=>l});var n=i(78392),r=i(11650),o=i(95110),c=i(22826),s=i(95876),a=i(42362);const l=(0,n.Z)(((e,t)=>(0,s.Z)(e,t)),((e,t,i,n,r,o)=>o),((e,t,i,n,r)=>(0,o.Z)(e,[i,"breakdown",r],"progress")),((e,t,i,n)=>(0,o.Z)(e,[i,"breakdown",n],"progress")),((e,t,i)=>(0,o.Z)(e,[i,"levels",0],"target")),((e,t,i)=>(0,o.Z)(e,[i],"progress")),(e=>(0,c.default)(e,r.bhw)),((e,t,i=0,n=0,r=0,o=0,c=1)=>{switch(t){case a.Ux.MVP:return Math.max(1,n-i+1);case a.Ux.MORE:return[a.kn.PERFORMING,a.kn.PREPARING].includes(e)?c:Math.max(1,r-o);case a.Ux.SINGLE:return 1}}))(((e,t,i,n,r,o)=>`${t}:${i}:${n}:${r}:${o}`))},54264:(e,t,i)=>{e.exports=i.p+"static/img/point_2.29bbdc80.svg"}}]);
//# sourceMappingURL=defaultVendors~64741.af259702.js.map