PageSourceSearch

https://miles-muso.netlify.app/_next/static/chunks/pages/index-274cc7d3d16dc090.js

js miles-muso.netlify.app collected 2026-10-03 11:09:47 UTC 6,030 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5405],{48312:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return s(42603)}])},42603:function(e,n,s){"use strict";s.r(n);var t=s(85893),a=s(68001),r=s(84416),i=s(204),l=s(295),c=s(7754),d=s(36979),o=s(29379),x=s(73143),h=s(5902),u=s(14418),m=s(9564),g=s(50131),j=s(19152),f=s(97822),w=s(5197),p=s(90634),b=s(67294),v=s(66005);let E=e=>{let{spin:n,duration:s,nft:i}=e,[l,c]=(0,v.q_)(()=>({from:{transform:"translateY(0%)"},reset:!0,config:{duration:s,easing:v.Z5.easeOutBounce,tension:200,friction:20}})),{contract:d}=(0,a.cqn)((null==i?void 0:i.contractAddress)||""),{data:o,isLoading:x,error:h}=(0,a.elG)(d,(null==i?void 0:i.tokenId)||"");(0,b.useEffect)(()=>{n?c.start({from:{transform:"translateY(0%)"},to:{transform:"translateY(-70%)"},reset:!0,loop:!0}):i&&!x&&o?c.set({transform:"translateY(0%)"}):c.stop()},[n,i,x,o]);let u=(0,b.useRef)(null),m=(0,b.useRef)(null),g=()=>{u.current&&m.current&&(m.current.style.height="".concat(u.current.offsetHeight,"px"))};return(0,b.useEffect)(()=>(g(),window.addEventListener("resize",g),()=>{window.removeEventListener("resize",g)}),[]),(0,t.jsx)("div",{ref:m,className:"w-[90vw] overflow-hidden border-4 border-purple shadow-lg rounded-lg",children:(0,t.jsx)(v.q.div,{style:{...l},children:!n&&i&&!x&&o?(0,t.jsx)(r.E,{ref:u,src:o.metadata.image,className:"w-full",alt:"NFT Image",onLoad:g}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.E,{ref:u,src:"slot-1.webp",className:"w-full",alt:"slot-1",onLoad:g}),(0,t.jsx)(r.E,{src:"slot-3.webp",className:"w-full",alt:"slot-2",onLoad:g}),(0,t.jsx)(r.E,{src:"slot-2.webp",className:"w-full",alt:"slot-3",onLoad:g}),(0,t.jsx)(r.E,{src:"slot-5.webp",className:"w-full",alt:"slot-4",onLoad:g}),(0,t.jsx)(r.E,{src:"slot-1.webp",className:"w-full",alt:"slot-5",onLoad:g}),(0,t.jsx)(r.E,{src:"slot-3.webp",className:"w-full",alt:"slot-6",onLoad:g})]})})})},y=e=>{let{nfts:n,spin:s,onSpin:r}=e,d=(0,a.SFn)(),{contract:o}=(0,a.cqn)("0xD1559796672Ee75B243aA62711e5F3FD0Cc5c9Fd"),{data:x,isLoading:h,error:u}=(0,a.doQ)(o,"isWinner",[d]);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.k,{justifyContent:"center",className:"space-x-4 mb-2 w-full",bgColor:"brand.black",children:[...Array(6)].map((e,a)=>(0,t.jsx)(E,{spin:s,duration:1e3+200*a,nft:n[a]},a))}),(0,t.jsx)("div",{children:h?(0,t.jsx)(l.$,{}):x&&0===n.length&&(0,t.jsx)(c.M,{children:(0,t.jsx)(a.tnh,{style:{fontFamily:"Bangers",boxShadow:"inset 0 0 10px #ffffff !important"},className:"!w-56 !text-4xl !font-bold !text-white !bg-red-500 !hover:bg-red-700 !rounded-full !py-4 !px-8 transform transition-transform duration-200 ease-in-out active:scale-95",contractAddress:"0xD1559796672Ee75B243aA62711e5F3FD0Cc5c9Fd",action:r,children:"Spin"})})})]})};n.default=()=>{let e=(0,a.SFn)(),{contract:n}=(0,a.cqn)("0xD1559796672Ee75B243aA62711e5F3FD0Cc5c9Fd"),{mutateAsync:s,isLoading:v}=(0,a.GGd)(n,"spinSlotMachine"),[E,F]=(0,b.useState)(!1),N=async()=>{F(!0);try{await s({args:[]})}catch(e){console.error(e)}finally{F(!1)}},[C,A]=(0,b.useState)([]);(0,b.useEffect)(()=>{let e;return n&&(e=n.events.addEventListener("PrizeDetermined",e=>{A(n=>[...n,{contractAddress:e.data.contractAddress,tokenId:e.data.id}])})),()=>{e&&e()}},[n]);let{mutateAsync:L,isLoading:_}=(0,a.GGd)(n,"enterGiveaway"),{mutateAsync:G,isLoading:k}=(0,a.GGd)(n,"claimPrizes"),{data:B,isLoading:D,error:z}=(0,a.doQ)(n,"getAllParticipants"),{data:S,isLoading:P,error:W}=(0,a.doQ)(n,"getPrizesForWinner",[e]);return(0,t.jsx)(t.Fragment,{children:e?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(j.xu,{w:"100%",children:(0,t.jsx)(c.M,{children:(0,t.jsx)(r.E,{src:"/index-bg-2.webp",alt:"Miles Banner",style:{width:"90vw",height:"auto"}})})}),(0,t.jsx)(i.k,{justifyContent:"center",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(j.xu,{w:"90vw",height:"40px",bgGradient:"linear-gradient(180deg, rgba(11,60,77,1) 0%, rgba(21,75,94,1) 100%)"}),(0,t.jsx)(j.xu,{w:"90vw",bgGradient:"linear-gradient(180deg, rgba(0,4,17,1) 0%, rgba(9,9,42,1) 46%)",paddingBottom:4,children:(0,t.jsx)(y,{nfts:C,spin:E,onSpin:N})})]})}),(0,t.jsxs)(d.W,{maxW:"container.lg",centerContent:!0,padding:4,bg:"brand.100",children:[(0,t.jsxs)(o.Z,{maxW:"sm",children:[(0,t.jsxs)(h.e,{children:[(0,t.jsx)(r.E,{src:"/miles-mascot-2.webp",alt:"kangaroo mascot"}),(0,t.jsxs)(x.K,{mt:"6",spacing:"3",children:[(0,t.jsx)(a.RZ8,{className:"!mb-2"}),(0,t.jsx)(m.x,{children:"Enter the giveaway for a chance to spin the slot machine and win prizes!"})]})]}),(0,t.jsx)(f.i,{}),(0,t.jsx)(g.e,{children:(0,t.jsx)(a.tnh,{className:"!w-56 !bg-brand-400 !text-brand-300",contractAddress:"0xD1559796672Ee75B243aA62711e5F3FD0Cc5c9Fd",action:async()=>{await L({args:[]})},children:"Enter Giveaway"})})]}),(0,t.jsx)(u.X,{children:"Participants"}),(0,t.jsx)(w.aV,{spacing:3,children:D?(0,t.jsx)(w.HC,{children:(0,t.jsx)(l.$,{})}):null==B?void 0:B.map((e,n)=>(0,t.jsx)(w.HC,{children:e},n))}),P?(0,t.jsx)(l.$,{}):S.length>0&&(0,t.jsxs)(p.g,{children:[(0,t.jsx)(u.X,{size:"2xl",className:"!text-brand-300",children:"Claim your prizes!"}),(0,t.jsx)(a.tnh,{className:"!w-56",contractAddress:"0xD1559796672Ee75B243aA62711e5F3FD0Cc5c9Fd",action:async()=>{await G({args:[]}),A(e=>[])},children:"Claim Prizes"})]})]})]}):(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(i.k,{minHeight:"100vh",alignItems:"center",justifyContent:"center",children:(0,t.jsx)(d.W,{maxW:"container.lg",centerContent:!0,bg:"brand.100",rounded:"md",padding:4,children:(0,t.jsxs)(o.Z,{direction:{base:"column",sm:"row"},overflow:"hidden",variant:"outline",children:[(0,t.jsx)(r.E,{src:"/login-image.png",alt:"Miles Banner",style:{width:"25vw",height:"auto"}}),(0,t.jsxs)(x.K,{children:[(0,t.jsxs)(h.e,{children:[(0,t.jsx)(u.X,{size:"md",children:"miles.muso BIG SIX-O"}),(0,t.jsx)(m.x,{py:"2",children:"NFT giveaway for Miles 60th birthday!"})]}),(0,t.jsx)(g.e,{children:(0,t.jsx)(a.RZ8,{className:"!bg-brand-400 !text-brand-300"})})]})]})})})})})}}},function(e){e.O(0,[9554,9774,2888,179],function(){return e(e.s=48312)}),_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.