1import{dc as c,dh as q,db as e,dH as $,dg as B}from"./index-ByIcGKUX.js";import{p as he}from"./pack-reveal-D8qXWAMR.js";import{J as C,f as be,K as ke,M as ye,H as J,N as Q,k as je,O as ee,P as T,p as G,Q as ve}from"./StorefrontRoot-D71SJSus.js";import{u as z,C as te,a as we,b as Pe,c as Ce,d as Se,e as Ie,O as se,P as Ne,S as Ae,g as Re,r as Be,f as Te}from"./SealedPackPrizeDetails-CnLEfUF5.js";import{u as ae,b as M,g as ne,D as Ee,d as Le}from"./products-CYzceBxF.js";import{r as L,i as _e,f as H,a as Y,b6 as le,b7 as oe,B as E,b8 as _,b4 as D,F as re,A as K,b5 as A,b9 as Fe,ba as W,bb as Oe}from"./versionProvider-BLaKWEOB.js";import{C as Ue}from"./CardImageWithGloss-CmMgovQY.js";import{u as De}from"./productsCatalogue-CdhJZ2PV.js";import{u as ze}from"./index-rfwHk5oe.js";import{u as ie,S as Me}from"./BuybackBanner-DPsXeOEq.js";import{u as He,o as Ve,q as $e}from"./user-CGO6qNct.js";import"./shared-DxjqqMQm.js";import"./useQuery-DGVh7Xho.js";import"./x-B1VVXcwM.js";import"./dialog-BZgb3TVt.js";import"./browser-CYAfahY6.js";import"./dijkstra-D_NXgYpA.js";import"./unit-BrLjPYbF.js";import"./CoinflowCardFormV2-wUCfml6Q.js";import"./copy-BOSy771x.js";import"./check-DMJTZdTc.js";import"./external-link-ZISQTI0T.js";import"./popover-Cakz3dqx.js";import"./select-vH_7AOji.js";import"./useCoinflowCustomer-DvH41G-z.js";import"./trash-2-Z9ctlBoK.js";import"./resolveApiErrorMessage-BInnpMnV.js";import"./codes-D2UxDkcV.js";import"./CoinflowPurchase-CT_n0wZa.js";import"./CopyIcon-C8lC9AK1.js";import"./useCopyText-B51vYgUW.js";import"./globe-q6PX2PaH.js";import"./chevron-right-zEj-AxBq.js";import"./riveFilePreloader-DkhK0uMb.js";import"./index-CGi9kPo_.js";import"./ImageWithFallback-DtZfQEqZ.js";import"./riveImagePreloader-BT6PeJar.js";import"./Checkbox-Cjwo43Dn.js";import"./CollapsibleDetails-Dd5rjEEm.js";import"./cardDetailItems-SH3_Szyj.js";import"./CardDetailsGrid-CPQ_sz9o.js";import"./useIsScreen-D-4_6aVj.js";import"./index-D2ISR4WI.js";import"./usePreloadImages-CMPlD1ht.js";import"./download-BSblNyUs.js";import"./cardOwnership-BVxQVUhn.js";import"./useDeadlineExpiry-D6COtgBv.js";const X={idle:"cardActions.status.idle",sellSuccess:"cardActions.status.sellSuccess",sellError:"cardActions.status.sellError",loadingPurchase:"cardActions.status.loadingPurchase",loadingPurchaseAfterSell:"",continueOpening:"cardActions.status.continueOpening"},Ge="linear-gradient(122deg, rgba(48,48,48,0.2) 6%, rgba(47,47,47,0.2) 40%, rgba(146,146,146,0.2) 64%, rgba(47,47,47,0.2) 80%, rgba(113,113,113,0.2) 114%), linear-gradient(90deg, #121212 0%, #121212 100%)",Ye=({result:t})=>{const{t:s}=L("play"),o=H(),a=ze(),{backToIdle:n,productId:l}=C(),d=ae().find(F=>F.productId===l),m=!d&&je(l),{data:g}=Q(l,m),i=d?.price??g?.total??0,u=t.value,{idleLabel:f,sellingLabel:k,buybackValue:x,buybackPercent:w}=z(u,d?.buybackRateBps),h=i>0?$(u).minus(i).div(i).times(100):$(0),P=h.gte(0)?`+${h.toFixed(1)}%`:`${h.toFixed(1)}%`,b=[t.details.year,t.details.setName,t.details.name,t.details.cardNumber?`#${t.details.cardNumber}`:null].filter(Boolean).join(" "),{handleBuyBack:y,loading:v,soldNftIds:S}=ie({onSuccess:()=>{q.success(s("sell.cardSoldToast")),n(),o(B.PLAY)}}),R=S.has(t.nftId.toString()),[I,N]=c.useState(!1),j=c.useRef(!1);c.useEffect(()=>{j.current||i<=0||(j.current=!0,Ve(a,$e.guaranteedPullCardValue,{card_value:u,pack_price:i,value_ratio:u/i,collection:d?.collection,pack_id:l}))},[i,u,d?.collection,l,a]);const p=()=>{n(),o(B.PLAY)};return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"w-[293px] flex flex-col gap-2 items-center justify-center overflow-hidden rounded-lg px-3 pt-4 pb-3 border-[0.5px] border-grey-40",style:{backgroundImage:Ge},children:[e.jsx("p",{className:"font-space-grotesk font-bold text-sm text-white text-center uppercase w-full",children:b}),e.jsx("div",{className:"w-full h-px bg-grey-40"}),e.jsx("span",{className:"font-space-grotesk font-bold text-2xl text-center text-gradient-silver",children:D(u)}),e.jsxs("div",{className:"flex items-center justify-center gap-1",children:[e.jsx("span",{className:"font-space-grotesk text-xs text-grey-20",children:s("cardActions.fromPricePack",{price:D(i)})}),e.jsx("span",{className:"font-space-grotesk text-[10px] text-green border border-green/20 rounded px-1 py-0.5",children:P})]})]}),e.jsxs("div",{className:"flex flex-col gap-4 items-center",children:[e.jsx("p",{className:"font-space-grotesk text-sm text-grey-30 text-center",children:t.cardId==="mystery"?e.jsxs(e.Fragment,{children:[le,e.jsx("br",{}),oe]}):s("cardActions.status.idle")}),e.jsxs("div",{className:"flex flex-col md:flex-row items-center gap-2",children:[e.jsx(E,{variant:"outline",size:"lg",className:"w-full md:w-64 h-12 font-space-grotesk font-bold border-grey-70",onClick:p,disabled:v,children:"Go back"}),e.jsx(_,{variant:"primary",size:"lg",className:"w-full md:w-64 max-w-full whitespace-nowrap px-6 h-12 font-space-grotesk",onClick:()=>N(!0),isLoading:v,disabled:v||R,children:v?k:f})]})]}),e.jsx(te,{open:I,onOpenChange:N,onConfirm:()=>y(t.nftId.toString()),buybackAmount:x,buybackPercent:w,fmvAmount:u}),e.jsxs(E,{"aria-label":s("back"),variant:"secondary",className:"w-min font-space-grotesk fixed top-4 left-4 md:left-20 md:top-10 bg-black border border-grey-80",onClick:p,children:[e.jsx(J,{className:"!size-4 !p-0"}),e.jsx("span",{className:"hidden md:block ml-2",children:s("boosterPack.packSelection")})]})]})},Ke=()=>{const{t}=L("play"),s=_e(),o=H(),{result:a,backToIdle:n,productId:l,canPullAnother:r,type:d}=C(),{address:m}=He(),{purchaseBoosterPack:g,loading:i}=be(),{handleContinueUncompletedPackPurchase:u,isLoading:f}=ke(),x=ae().find(ge=>ge.productId===l),w=M(l),[h,P]=c.useState(!1),[b,y]=c.useState("idle"),[v,S]=c.useState(!1),[R,I]=c.useState(!1),{handleBuyBack:N,loading:j,status:p,soldNftIds:F}=ie({onSuccess:()=>{q.success(t("sell.cardSoldToast")),P(!0),y("sellSuccess")}});c.useEffect(()=>{p==="error"&&y("sellError")},[p]);const{uncompletedCount:V,uncompletedBoosterPacks:ce}=ye(s.productId?x?.catalogueId:void 0),O=r&&V>0,de=()=>{n(),o(B.PLAY)},ue=()=>{y(h?"loadingPurchaseAfterSell":"loadingPurchase"),g(x)},pe=async()=>{y("continueOpening"),await u(ce)},{buybackValue:me,buybackPercent:fe}=z(a?.value??0,x?.buybackRateBps);if(!a)return null;if(d==="guaranteedpull")return e.jsx(Ye,{result:a});const xe={...a,owner:a.owner||m};return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:Y("w-full md:w-[520px] flex flex-col justify-center items-start gap-4",O&&"gap-2 lg:gap-4"),children:[e.jsx("div",{className:Y("self-stretch text-center justify-center text-sm font-normal font-space-grotesk",b==="idle"&&a.cardId==="mystery"?"text-grey-30":b==="sellSuccess"?"text-green text-xs":"text-grey-30 h-5"),children:b==="idle"&&a.cardId==="mystery"?e.jsxs(e.Fragment,{children:[le,e.jsx("br",{}),oe]}):X[b]&&t(X[b])}),e.jsxs("div",{className:"self-stretch flex flex-col md:flex-row md:inline-flex justify-center items-center md:items-start gap-2",children:[h&&e.jsx(We,{onClick:()=>S(!0)}),r&&(O?e.jsx(qe,{onClick:pe,isPrimary:h,isLoading:f,disabled:j}):e.jsx(Xe,{onClick:ue,isPrimary:h,isLoading:i,disabled:j,price:x?.price,productId:l,collection:x?.collection,productName:w?.title})),!h&&e.jsx(Ze,{onClick:()=>I(!0),isLoading:j,disabled:i||f||F.has(a.nftId.toString()),cardValue:a.value,buybackRateBps:x?.buybackRateBps})]}),O&&e.jsxs("div",{className:"self-stretch text-center justify-center text-sm font-normal font-space-grotesk text-grey-30 lg:mt-6 mb-2 lg:mb-0",children:["Remaining packs: ",V]})]}),!i&&!j&&e.jsxs(E,{"aria-label":t("back"),variant:"secondary",className:"w-min font-space-grotesk fixed top-4 left-4 md:left-20 md:top-10",onClick:de,children:[e.jsx(J,{className:"!size-4 !p-0"}),e.jsx("span",{className:"hidden md:block ml-2",children:t("boosterPack.packSelection")})]}),e.jsx(Me,{card:xe,open:v,setOpen:S}),e.jsx(te,{open:R,onOpenChange:I,onConfirm:()=>N(a.nftId.toString()),buybackAmount:me,buybackPercent:fe,fmvAmount:a.value})]})},We=({onClick:t})=>e.jsxs(E,{variant:"outline",size:"lg",className:"flex-1 w-full md:w-64 pl-4 pr-8 py-2 font-space-grotesk",onClick:t,children:[e.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M13.162 5.16618C13.1643 4.52449 12.646 4.00241 12.0043 4.00001C11.3627 3.99761 10.8405 4.51616 10.838 5.15784C10.8303 7.29435 10.2722 8.6392 9.41312 9.46896C8.54452 10.3079 7.17369 10.8093 5.14552 10.8381C4.50704 10.8472 3.9955 11.3697 4.00003 12.0082C4.00456 12.6468 4.52347 13.162 5.16201 13.162C7.41493 13.162 8.75315 13.7571 9.55245 14.6215C10.3696 15.5051 10.8204 16.8805 10.838 18.8484C10.8437 19.4768 11.3478 19.9868 11.9761 19.9998C12.6043 20.0127 13.1291 19.5238 13.1605 18.8962C13.2649 16.8166 13.8178 15.4208 14.6764 14.5454C15.5208 13.6845 16.8312 13.1544 18.8336 13.162C19.4714 13.1644 19.9919 12.6523 19.9999 12.0146C20.0079 11.3769 19.5005 10.8519 18.8628 10.8383C16.6658 10.7913 15.2956 10.2103 14.4651 9.34778C13.6321 8.48262 13.1543 7.13902 13.162 5.16618Z",fill:"white"})}),"Flex"]}),Xe=({onClick:t,isPrimary:s,isLoading:o,disabled:a,price:n,productId:l,collection:r,productName:d})=>e.jsx(_,{id:"packs-pull-another-btn",variant:s?"primary":"outline",size:"lg",className:"w-full md:w-64 font-space-grotesk",onClick:t,isLoading:o,disabled:a,"data-price":n?.toString(),"data-product-category":r,"data-
1product-id":l,"data-product-name":d,children:"Pull another"}),Ze=({onClick:t,isLoading:s,disabled:o,cardValue:a,buybackRateBps:n})=>{const{idleLabel:l,sellingLabel:r}=z(a,n);return e.jsx(_,{variant:"primary",size:"lg",className:"w-full md:w-64 max-w-full whitespace-nowrap px-6 text-black font-space-grotesk",onClick:t,isLoading:s,disabled:o,children:s?r:l})},qe=({onClick:t,isPrimary:s,isLoading:o,disabled:a})=>e.jsx(_,{variant:s?"primary":"secondary",size:"lg",className:"w-full md:w-64 font-space-grotesk",onClick:t,disabled:a,isLoading:o,children:"Continue Another"});function Je(t,s){if(!t||!Number.isFinite(s))return null;const o=Fe(t).filter(n=>Number.isFinite(n.priceLow)&&Number.isFinite(n.priceHigh)&&n.priceHigh>=n.priceLow).sort((n,l)=>n.priceLow-l.priceLow).slice(0,W.length);if(o.length===0)return null;let a=0;for(let n=1;n<o.length;n++){if(s>=o[n].priceLow){a=n;continue}break}return W[a]??null}const Qe=()=>{const{result:t,productId:s,type:o}=C(),[a,n]=c.useState(!1),[l,r]=c.useState(!1),[d,m]=c.useState(!1),g=we(),i=g?Math.min(380,Math.max(180,g-300)):380,f=De().getProduct(s),k=f?.components[0]?.presetId,w=ne(f?.collection??"pokemon")?.cardBackImg??re,h=()=>{n(!a)},P=()=>{r(!0);const y=setTimeout(()=>{m(!0)},800);return()=>clearTimeout(y)};if(c.useEffect(()=>{t&&(n(!1),r(!1),m(!1))},[t]),!t)return null;const b=K(t.details.img,"large");return e.jsxs(e.Fragment,{children:[e.jsx(A.div,{className:"fixed top-0 left-0 z-[9999] flex h-full w-full cursor-pointer flex-col bg-black/90 text-center font-space-grotesk backdrop-blur-lg",initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},transition:{duration:.3},children:e.jsxs("div",{className:"m-auto flex w-full flex-col items-center gap-[24px] py-10",children:[d?e.jsx(Ce,{showTiltAnimation:!0,enableTilt:!0,enableGlow:!0,onClick:h,glowVariant:["common","uncommon"].includes(t.details.rarity||"")?"common":"rainbow",children:e.jsx(Ue,{src:b,alt:t.details.name||"",containerClassName:"relative rounded-lg overflow-hidden",glossClassName:"w-full h-full",className:"h-[clamp(180px,calc(100dvh_-_300px),380px)] w-auto max-w-[280px] lg:h-[clamp(180px,calc(100dvh_-_300px),400px)] lg:max-w-[300px]",imageClassName:"object-contain",amount:t.value})}):e.jsx(Pe,{frontImage:b,backImage:K(t.details.backImg,"large")||w,isFlipped:l,height:i,amount:t.value}),e.jsx(et,{product:f,result:t,revealedCardInfo:l,onReveal:P,type:o})]})}),e.jsx(Se,{isOpen:a,onClose:()=>n(!1),card:t,isUserOwner:!0,pulledOn:new Date().toISOString(),presetId:k})]})},et=({product:t,result:s,revealedCardInfo:o,onReveal:a,type:n})=>{const l=c.useMemo(()=>[{key:"grade",title:"Grade",text:s.details.grade||""},{key:"year",title:"Year",text:s.details.year||""},{key:"rarity",title:"Rarity",text:Je(t,s.value)??""}],[t,s]);return e.jsx("div",{className:"flex w-full flex-col items-center justify-center gap-6 px-6 md:gap-10",children:o?e.jsxs(e.Fragment,{children:[n!=="guaranteedpull"&&e.jsx(tt,{result:s}),e.jsx(Ke,{})]}):e.jsxs(e.Fragment,{children:[e.jsx(Ie,{infoBoxes:l,revealLabel:"Reveal Card",onReveal:a}),e.jsx(se,{})]})})},tt=({result:t})=>{const{t:s}=L("play"),o=`${t.details.year||""} ${t.details.setName||""} ${t.details.name||""} ${t.details.cardNumber?`#${t.details.cardNumber}`:""}`.trim();return e.jsxs("div",{className:"flex w-[293px] flex-col items-center justify-center gap-2 overflow-hidden rounded-lg bg-gradient-grey-3 px-3 pt-4 pb-3",style:{border:"0.5px solid #646464"},children:[e.jsx("div",{className:"self-stretch text-center text-sm font-bold text-white",children:o}),e.jsx("div",{className:"self-stretch h-[2px] bg-[#1e1e1e]/80"}),e.jsxs("div",{className:"inline-flex justify-center items-center gap-1.5",children:[e.jsx("div",{className:"rounded bg-grey-60 px-1.5 py-0.5 text-[10px] font-normal text-grey-20",children:s("fmv")}),e.jsx("div",{className:"bg-gradient-grey-4 bg-clip-text text-transparent text-xl md:text-2xl leading-none font-bold",children:D(t.value)})]})]})},st=({riveFile:t})=>{const{setUiState:s,productId:o}=C(),a=M(o),{data:n}=Q(o,!!o&&!a),l=!!a||!!n,r=a?.packImg??n?.ui.image??Ee,d=a?.collection??n?.collection,m=ne(d??"pokemon"),g=()=>{s("details")},{soundEnabled:i,soundVolume:u}=ee(),[f]=T("/audio/packs/pack-opening.wav",{volume:i?Math.min(u/100+.5,1):0,playbackRate:2}),[k]=T("/audio/packs/exp-level-up.mp3",{volume:i?u/100:0});if(c.useEffect(()=>{l&&G(r),m?.cardBackImg&&G(m.cardBackImg)},[l,r,m]),!l||!m)return null;const x=Oe(m.animationTypes);return e.jsx("div",{className:"fixed top-0 left-0 z-[9999] flex h-full w-full cursor-pointer flex-col items-center justify-center gap-2 bg-black text-center backdrop-blur-lg",children:e.jsx(Ne,{riveFile:t,cardImageUrl:m.cardBackImg??re,packImageUrl:r,onAnimationComplete:g,onPackRipStart:()=>f(),onCardRevealStart:()=>k(),animationType:x})})},at=({finalPrizeType:t})=>{const{productId:s,result:o,backToIdle:a}=C(),n=H();if(!o)return null;const l=()=>{a(),n(B.PLAY)};return e.jsx(Ae,{productId:s,result:o,finalPrizeType:t,onBack:l})},U="h-[420px] w-[252px] max-w-[78vw] md:h-[600px] md:w-[400px]",nt="h-[300px] w-[300px] max-w-[72vw] md:h-[380px] md:w-[380px]",Z=10,lt=1300,ot=3e3,rt=120,it=24;function ct({packImageUrl:t,finalPrizeType:s,onRipStart:o,onFlashStart:a,onAnimationComplete:n}){const{t:l}=L("common"),[r,d]=c.useState("idle"),[m,g]=c.useState(0),i=c.useRef(null),u=c.useRef(null),f=c.useRef(null),k=c.useRef(null),x=c.useRef(!1),w=c.useMemo(()=>["pack","box","case"],[]),h=r==="flashing"?w[m%w.length]??s:s,P=()=>{u.current!==null&&(window.clearTimeout(u.current),u.current=null),f.current!==null&&(window.clearInterval(f.current),f.current=null),k.current!==null&&(window.clearTimeout(k.current),k.current=null)},b=()=>{x.current||(x.current=!0,P(),g(0),d("done"),n?.())},y=()=>
1{if(x.current)return;d("flashing"),g(0),a?.();let p=0;f.current=window.setInterval(()=>{p+=1,g(p)},rt),k.current=window.setTimeout(()=>{b()},ot)},v=()=>{r==="idle"&&(d("ripping"),o?.(),u.current=window.setTimeout(()=>{y()},lt))};c.useEffect(()=>()=>{P()},[]);const S=p=>{r==="idle"&&(i.current=p.clientX)},R=p=>{r!=="idle"||i.current===null||p.clientX-i.current>=it&&(i.current=null,v())},I=()=>{i.current=null},N=()=>{i.current=null},j=()=>{r==="idle"&&v()};return e.jsxs("div",{className:"relative flex h-full w-full flex-col items-center justify-center overflow-hidden px-6 font-space-grotesk",onClick:j,onPointerCancel:N,onPointerDown:S,onPointerMove:R,onPointerUp:I,role:"button",tabIndex:0,onKeyDown:p=>{(p.key==="Enter"||p.key===" ")&&r==="idle"&&(p.preventDefault(),j())},children:[e.jsx("div",{className:"relative flex h-full w-full items-center justify-center",children:r==="idle"||r==="ripping"?e.jsx(dt,{packImgSrc:t,isIdle:r==="idle",isRipping:r==="ripping",packAlt:l("sealedPacks.packAlt"),swipeHintLine1:l("sealedPacks.swipeHintLine1"),swipeHintLine2:l("sealedPacks.swipeHintLine2")}):e.jsx(pt,{prizeType:h,prizeAlt:l("sealedPacks.prizeAlt",{prizeType:h})})}),r==="flashing"&&e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",className:"fixed top-[88%] z-30 text-sm font-medium text-white/50 transition hover:text-white/80",onClick:p=>{p.stopPropagation(),b()},children:l("sealedPacks.clickToSkip")}),e.jsx(se,{})]})]})}const dt=({packImgSrc:t,isIdle:s,isRipping:o,packAlt:a,swipeHintLine1:n,swipeHintLine2:l})=>{const r=`inset(0 0 ${100-Z}% 0)`,d=`inset(${Z}% 0 0 0)`;return e.jsxs("div",{className:"relative flex items-center justify-center",children:[e.jsxs("div",{className:`relative ${U}`,children:[e.jsx(A.div,{className:"absolute inset-0 z-10",initial:!1,animate:o?{y:[2,10,62,-40,-100],x:[0,4,20,0,0],rotate:[0,2,10,60,75],opacity:[1,1,1,.5,0]}:{y:0,x:0,rotate:0,opacity:1},transition:{duration:1.35,ease:[.22,1,.36,1]},children:e.jsx("img",{src:t,alt:a,className:`${U} object-contain`,style:{clipPath:r}})}),e.jsx("div",{className:"pointer-events-none absolute inset-x-0 top-[10%] z-20 flex items-center",children:s&&e.jsx(ut,{})}),e.jsx(A.div,{className:"absolute inset-0",initial:!1,animate:o?{y:[0,6,16],scale:[1,1.01,1.03]}:{y:0,scale:1},transition:{duration:1.15,ease:[.22,1,.36,1]},children:e.jsx("img",{src:t,alt:a,className:`${U} object-contain`,style:{clipPath:d}})})]}),s&&e.jsxs("div",{className:"pointer-events-none absolute right-full top-[16%] hidden w-[180px] -translate-y-1/2 pr-6 text-left text-[14px] leading-[1.3] text-white/85 md:block",children:[n,e.jsx("br",{}),l]})]})},ut=()=>e.jsx("div",{className:"pointer-events-none absolute left-[8%] right-[6%] flex items-center justify-between text-white/90",children:Array.from({length:7}).map((t,s)=>e.jsx(A.span,{className:"text-[24px] font-semibold leading-none",initial:{opacity:.08,x:-8},animate:{opacity:[.08,.95,.08],x:[-8,8,20]},transition:{duration:1.2,repeat:Number.POSITIVE_INFINITY,delay:s*.08,ease:"easeOut"},children:"âº"},s))}),pt=({prizeType:t,prizeAlt:s})=>e.jsxs(A.div,{initial:{opacity:0,scale:.88,y:10,filter:"brightness(1.7)"},animate:{opacity:1,scale:1,y:0,filter:"brightness(1)"},transition:{duration:.16,ease:"easeOut"},className:"relative flex items-center justify-center",children:[e.jsx(A.div,{className:"absolute inset-[-28px] rounded-full bg-white/20 blur-2xl",initial:{opacity:0}
1,animate:{opacity:[0,.85,.15]},transition:{duration:.22,ease:"easeOut"}}),e.jsx("img",{src:Re(t),alt:s,className:`${nt} object-contain`})]},t),mt=({finalPrizeType:t})=>{const{setUiState:s,productId:o,result:a}=C(),n=M(o),l=()=>{s("details")},{soundEnabled:r,soundVolume:d}=ee(),[m]=T("/audio/packs/pack-opening.wav",{volume:r?Math.min(d/100+.5,1):0,playbackRate:2}),[g]=T("/audio/packs/exp-level-up.mp3",{volume:r?d/100:0});return!n||!a?null:e.jsx("div",{className:"fixed top-0 left-0 z-[9999] flex h-full w-full items-center justify-center bg-black text-center backdrop-blur-lg",children:e.jsx(ct,{packImageUrl:n.packImg,finalPrizeType:t,onRipStart:()=>m(),onFlashStart:()=>g(),onAnimationComplete:l})})},is=()=>{const{uiState:t,productId:s,result:o}=C(),n=(Le(s)??"cards")==="sealed-product",l=o?Be(o.details):"pack";return t==="opening"?n?e.jsx(mt,{finalPrizeType:l}):e.jsx(ft,{}):t==="details"?n?e.jsx(at,{finalPrizeType:l}):e.jsx(Qe,{}):null},ft=()=>{const{riveFile:t,status:s}=Te(he);return s!=="success"||!t?e.jsx(ve,{}):e.jsx(st,{riveFile:t})};export{is as BoosterPackMode};
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.