PageSourceSearch

https://www.cryptopunks.app/_next/static/chunks/4279-7504645c83061d23.js?dpl=dpl_8npMKoNKf8Bo6c7h6E6oPiBnBcp9

js cryptopunks.app collected 2026-09-25 18:34:13 UTC 28,447 bytes, 2 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="01a08f3e-2e06-79f2-b840-92bcd2c02b96")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4279],{1038:(e,t,n)=>{n.d(t,{A:()=>o});var i=n(95155);n(12115);var s=n(89626),r=n(60755),l=n(41171),a=n(16757);function o(e){let{selectedBid:t,currentEthPrice:n,ownerAddress:o,transactionHash:c}=e;return(0,i.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"30px",marginBottom:"24px",width:"100%"},children:[(0,i.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"15px"},children:[(0,i.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:[(0,i.jsx)("div",{style:{fontSize:"18px",fontWeight:"bold",fontFamily:"Montserrat, sans-serif",color:"#000000",lineHeight:"100%",letterSpacing:"-0.36px"},children:"Amount in ETH"}),(0,i.jsx)("div",{style:{display:"flex",alignItems:"center",gap:"10px",fontSize:"18px",fontWeight:"normal",fontFamily:"Montserrat, sans-serif",color:"#000000",lineHeight:0,letterSpacing:"-0.36px",width:"100%"},children:(0,i.jsx)("div",{style:{display:"flex",flexDirection:"column",justifyContent:"flex-end",flexShrink:0},children:(0,i.jsx)("p",{style:{lineHeight:"normal",margin:0},children:(0,s.$g)(t.bid_amount_wei,t.bid_amount_eth*n,{...r.r.ETH,currency:"ETH",useAbbreviations:!1},"ETH").split(" ")[0]})})})]}),o&&(0,i.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:[(0,i.jsx)("div",{style:{fontSize:"18px",fontWeight:"bold",fontFamily:"Montserrat, sans-serif",color:"#000000",lineHeight:"100%",letterSpacing:"-0.36px"},children:c?"Wallet":"Withdraw To"}),(0,i.jsx)("div",{style:{fontWeight:"normal",fontFamily:"Montserrat, sans-serif",color:"#000000",lineHeight:"100%",letterSpacing:"-0.28px"},children:(0,i.jsxs)("a",{href:"https://".concat((0,l.i)()?"sepolia.":"","etherscan.io/address/").concat(o),target:"_blank",rel:"noopener noreferrer",style:{color:"#ea34b0",textDecoration:"none"},children:[o.slice(0,5),"...",o.slice(-3)," (You)"]})})]})]}),c&&(0,i.jsx)(a.A,{transactionHash:c,isConfirming:!1,successMessage:"Transaction successful."})]})}},15989:(e,t,n)=>{n.d(t,{Fo:()=>a,K_:()=>l});var i=n(26549),s=n(41171);async function r(e){let{chainId:t,sellToken:n,buyToken:i,sellAmount:s,buyAmount:r,taker:l,apiKey:a="bd539862-6a0a-41d4-a3ca-5c4d8f0484b6"}=e;if(!s&&!r)throw Error("Either sellAmount or buyAmount must be provided");{let e=new URLSearchParams({chainId:t,sellToken:n,buyToken:i,taker:l});s&&e.append("sellAmount",s),r&&e.append("buyAmount",r),a&&e.append("apiKey",a);let o=await fetch("/api/0x/price?".concat(e.toString()),{method:"GET"});if(!o.ok)throw Error((await o.json().catch(()=>({error:"Unknown error"}))).error||"0x API error: ".concat(o.status," ").concat(o.statusText));return o.json()}}async function l(e){let{chainId:t="1",ethAmountWei:n,taker:l,apiKey:a}=e,o=BigInt(n),c=o*BigInt(2500)*BigInt(10**i.Ji)/BigInt(1e18),d=(0,s.i)()?i.$b:(0,s._)()?i.po:i.X_,x=(0,s.i)()?i.AN:(0,s._)()?i.K8:i.r5,p=await r({chainId:t,sellToken:d,buyToken:x,sellAmount:c.toString(),taker:l,apiKey:a}),u=BigInt(p.buyAmount),h=o*BigInt(p.sellAmount)/u,f=BigInt(10**i.Ji),m=(h%f).toString().padStart(i.Ji,"0").slice(0,2);return"".concat(h/f,".").concat(m)}async function a(e){let{chainId:t,sellToken:n,buyToken:i,sellAmount:s,buyAmount:r,taker:l,apiKey:a="bd539862-6a0a-41d4-a3ca-5c4d8f0484b6"}=e;if(!s&&!r)throw Error("Either sellAmount or buyAmount must be provided");{let e=new URLSearchParams({chainId:t,sellToken:n,buyToken:i,taker:l});s&&e.append("sellAmount",s),r&&e.append("buyAmount",r),a&&e.append("apiKey",a);let o=await fetch("/api/0x/quote?".concat(e.toString()),{method:"GET"});if(!o.ok)throw Error((await o.json().catch(()=>({error:"Unknown error"}))).error||"0x API error: ".concat(o.status," ").concat(o.statusText));return o.json()}}},29074:(e,t,n)=>{n.d(t,{A:()=>u});var i=n(95155);n(12115);var s=n(52619),r=n.n(s),l=n(89626),a=n(60755),o=n(59349),c=n(91678);function d(e){let{isCheckingStash:t,isCheckingLiquidity:n,isStashDeployedStatus:s,hasSufficientLiquidity:r,isPunkListedHigher:l}=e;return t||n||!1!==s&&!1!==r?null:(0,i.jsx)(c.A,{showIcon:!1,message:!1===s?(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)("span",{children:["To accept the bid, you first need to deploy a bidding contract."," "]})}):!1===r?(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)("span",{children:["The bidder does not have sufficient liquidity in their stash to fulfill this bid."," "]})}):(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)("span",{children:[l?"This punk is listed for sale at a higher price than the bid. Click the button below to re-list it at the bid amount and then accept the bid.":"This punk is not listed for sale to the bidder's stash address. Click the button below to list it for sale and then accept the bid."," "]})})})}var x=n(56138),p=n(16757);function u(e){let{selectedBid:t,currentEthPrice:n,currentOfferPrice:s,floorPrice:u,isCheckingStash:h,isCheckingLiquidity:f,isStashDeployedStatus:m,hasSufficientLiquidity:g,isPunkListedHigher:b,error:y,localError:j,transactionHash:v,isConfirming:w=!1,isHighestBid:k=!0}=e,A=t.punk_indices.length>1&&t.punk_indices.length<1e4;return(0,i.jsxs)("div",{className:"flex flex-col gap-[30px] w-full",children:[(0,i.jsxs)("div",{className:"flex flex-col gap-[15px] w-full",children:[(0,i.jsx)("div",{className:"flex flex-col",style:{rowGap:"12px"},children:(0,i.jsxs)("div",{className:"flex flex-col",style:{rowGap:"8px"},children:[(0,i.jsx)("div",{className:"font-montserrat font-bold text-black",style:{fontSize:"18px",lineHeight:"100%",letterSpacing:"-0.36px"},children:"Bid Amount in ETH"}),(0,i.jsx)("div",{className:"flex items-center text-black font-montserrat font-normal w-full",style:{columnGap:"10
1px",fontSize:"18px",lineHeight:0,letterSpacing:"-0.36px"},children:(0,i.jsx)("div",{className:"flex flex-col justify-end flex-shrink-0",children:(0,i.jsx)("p",{className:"",style:{lineHeight:"normal",margin:0},children:(0,l.$g)(t.bid_amount_wei,t.bid_amount_eth*n,{...a.r.ETH,currency:"ETH",useAbbreviations:!1},"ETH").split(" ")[0]})})}),(s||u)&&(0,i.jsxs)("div",{className:"flex items-center font-montserrat font-normal w-full",style:{justifyContent:"space-between",fontSize:"14px",lineHeight:"100%",letterSpacing:"-0.28px"},children:[(0,i.jsx)("div",{style:{color:"#000000",minWidth:"150px"},children:s?"Offered at ".concat(s?(0,l.w1)(s,{currency:"ETH",useAbbreviations:!1}):null):u?"Collection Floor: ".concat((0,l.w1)(u.toString(),{currency:"ETH",useAbbreviations:!1})):""}),(0,i.jsx)("div",{style:{color:"#ea34b0",textAlign:"right",flex:1},children:(()=>{if(s){let e=s&&t?(0,l.Tw)(s,t.bid_amount_wei):null;return null===e||0===e?"":"This price is ".concat(Math.abs(e).toFixed(0),"% ").concat(e>0?"lower":"higher"," than the offered price.")}if(u){let e=Number((BigInt(t.bid_amount_wei)-u)*BigInt(100)/u);return 0===e?"This price matches the collection floor.":"This price is ".concat(Math.abs(e).toFixed(0),"% ").concat(e>0?"above":"below"," the collection floor.")}return""})()})]})]})}),A&&t.tag&&(0,i.jsxs)("div",{className:"flex flex-col",style:{rowGap:"8px"},children:[(0,i.jsx)("div",{className:"font-montserrat font-bold text-black",style:{fontSize:"18px",lineHeight:"100%",letterSpacing:"-0.36px"},children:"Traits"}),(0,i.jsx)(r(),{href:(0,o.SN)(t.tag),className:"font-montserrat font-normal text-black hover:underline cursor-pointer",style:{fontSize:"18px",lineHeight:"100%",letterSpacing:"-0.36px"},children:(0,o.ty)(t.tag)})]})]}),(0,i.jsx)(d,{isCheckingStash:h,isCheckingLiquidity:f,isStashDeployedStatus:m,hasSufficientLiquidity:g,isPunkListedHigher:b}),!k&&(0,i.jsx)(c.A,{message:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("strong",{children:"Warning:"})," This is not the highest bid in the list."]}),showIcon:!1,height:"48px"}),(0,i.jsx)(x.A,{error:j||y}),v?(0,i.jsx)("div",{style:{marginTop:"30px"},children:(0,i.jsx)(p.A,{transactionHash:v,isConfirming:w,successMessage:"Transaction successful."})}):null]})}},34809:(e,t,n)=>{n.d(t,{A:()=>p});var i=n(95155),s=n(12115),r=n(78941),l=n(91767),a=n(89626),o=n(24784),c=n(28245);function d(e){let{offerAmount:t,onOfferAmountChange:n,offerToAddress:l,onOfferToAddressChange:d,isOfferBelowFloor:x,floorPrice:p,currentEthPrice:u,onAddressValidationChange:h}=e,{t:f}=(0,r.L)(),[m,g]=(0,s.useState)(null);return(0,s.useEffect)(()=>{if(!l.trim()){g(null),null==h||h(!1);return}(0,o.P)(l)?(g(null),null==h||h(!1)):(g(f("details.invalidAddress")),null==h||h(!0))},[l,f,h]),(0,i.jsxs)("div",{className:"flex flex-col gap-[30px] items-start w-full",children:[(0,i.jsxs)("div",{className:"flex flex-col gap-[15px] items-start w-full",children:[(0,i.jsxs)("div",{className:"flex flex-col gap-[5px] items-start w-full",children:[(0,i.jsx)("p",{className:"text-body-mobile sm:text-body-mobile md:text-body-desktop font-montserrat font-extrabold text-black !mb-0",children:(0,i.jsx)("b",{children:t&&"0"!==t?(0,i.jsxs)("span",{children:[f("details.youAreAskingFor")," ",t," ETH (",(0,a.az)(parseFloat(t)*u,{currency:"USD",useAbbreviations:!1})," ","USD)"]}):f("details.askingPriceInEth")})}),(0,i.jsx)("div",{className:"border h-[48px] flex items-center px-2.5 py-4 w-full border-[#dddddd] focus-within:border-[#ea34b0] transition-colors",children:(0,i.jsx)("input",{type:"number",className:"flex-1 w-full text-lg text-black bg-transparent border-none outline-none",id:"offerPunkAmount",value:t,onChange:e=>{var t;(t=e.target.value).startsWith("-")||n(t)},min:"0",step:"any",placeholder:""})})]}),(0,i.jsxs)("div",{className:"flex flex-col gap-[5px] items-start w-full",children:[(0,i.jsx)("p",{className:"text-body-mobile sm:text-body-mobile md:text-body-desktop font-montserrat font-extrabold text-black !mb-0",children:(0,i.jsxs)("b",{children:[f("details.offerToAddress")," (optional)"]})}),(0,i.jsx)("div",{className:"border h-[48px] flex items-center px-2.5 py-4 w-full border-[#dddddd] focus-within:border-[#ea34b0] transition-colors",children:(0,i.jsx)("input",{type:"text",className:"flex-1 w-full text-lg text-black bg-transparent border-none outline-none",id:"offerToAddress",value:l,onCh
1ange:e=>{d(e.target.value)},placeholder:f("details.anyone")})})]})]}),m&&(0,i.jsx)("div",{style:{backgroundColor:"#000000",padding:"10px",display:"flex",alignItems:"center",gap:"12px",width:"100%",height:"48px"},role:"alert",children:(0,i.jsx)("div",{style:{color:"white",fontSize:"18px",fontWeight:"normal",fontFamily:"Montserrat, sans-serif",lineHeight:"100%",letterSpacing:"-0.36px",flex:1},children:m})}),x&&(0,i.jsx)("div",{style:{backgroundColor:"#000000",padding:"10px",display:"flex",alignItems:"center",gap:"12px",width:"100%",height:"48px"},role:"alert",children:(0,i.jsxs)("div",{style:{color:"white",fontSize:"18px",fontWeight:"normal",fontFamily:"Montserrat, sans-serif",lineHeight:"100%",letterSpacing:"-0.36px",flex:1},children:["Warning: Price entered is below floor price of"," ",(0,c.c)(p)," ETH"]})})]})}var x=n(72245);function p(e){let{isOpen:t,onClose:n,onSubmit:a,offerAmount:o,onOfferAmountChange:c,offerToAddress:p,onOfferToAddressChange:u,isLoading:h,isSwitchingChain:f,isOfferBelowFloor:m,floorPrice:g,currentEthPrice:b,punkIndex:y}=e,{t:j}=(0,r.L)(),[v,w]=(0,s.useState)(!1),k=[{text:j("common.cancel"),onClick:n,variant:"secondary"},{text:h||f?(0,i.jsx)(x.A,{size:16}):j("details.offerPunk"),onClick:a,variant:"primary",disabled:h||f||v||!o.trim()}];return(0,i.jsx)(l.A,{isOpen:t,onClose:n,header:"Offer CryptoPunk #".concat(y," for sale"),body:(0,i.jsx)(d,{offerAmount:o,onOfferAmountChange:c,offerToAddress:p,onOfferToAddressChange:u,isOfferBelowFloor:m,floorPrice:g,currentEthPrice:b,onAddressValidationChange:w}),buttons:k})}},56138:(e,t,n)=>{n.d(t,{A:()=>r});var i=n(95155);n(12115);var s=n(78941);function r(e){let{error:t}=e,{t:n}=(0,s.L)();return t?(0,i.jsxs)("div",{style:{backgroundColor:"#f8d7da",border:"1px solid #f5c6cb",color:"#721c24",padding:"12px 20px",fontSize:"16px",lineHeight:"1.4"},children:[(0,i.jsxs)("strong",{children:[n("details.error"),":"]})," ",t]}):null}},57708:(e,t,n)=>{n.d(t,{A:()=>f});var i=n(95155),s=n(78941),r=n(12115),l=n(28245),a=n(90960),o=n(89626),c=n(91767),d=n(72245),x=n(16060),p=n(33536),u=n(26549),h=n(41171);function f(e){let{isOpen:t,onClose:n,onSubmit:f,bidAmount:m,onBidAmountChange:g,isLoading:b,isSwitchingChain:y,bidPriceAlert:j,bidBelowMinimumAlert:v,onSwitchToCustomBid:w,punkIndex:k,currentHighestBid:A}=e,{t:N}=(0,s.L)(),[S,C]=(0,r.useState)(0);(0,r.useEffect)(()=>{a.H.getCurrentEthPrice().then(C)},[]);let E=S&&m&&parseFloat(m)>0?(0,o.az)(parseFloat(m)*S):null,T=(0,i.jsxs)("div",{className:"flex flex-col gap-[15px] items-start w-full",children:[void 0!==k&&(0,i.jsx)("div",{className:"flex flex-col gap-[5px] items-start w-full",children:(0,i.jsxs)("div",{className:"flex items-center gap-3",children:[(0,i.jsx)("div",{className:"w-24 h-24 relative",children:(0,i.jsx)(x.A,{punkIndex:k,size:96,color:u.aL.DEFAULT})}),(0,i.jsx)("p",{className:"text-body-mobile sm:text-body-mobile md:text-body-desktop font-montserrat font-extrabold text-black !mb-0",children:(0,i.jsxs)("b",{children:["CryptoPunk #",k]})})]})}),(0,i.jsxs)("div",{className:"flex flex-col gap-[5px] items-start w-full",children:[(0,i.jsx)("div",{className:"flex gap-[5px] items-start w-full",children:(0,i.jsx)("p",{className:"text-body-mobile sm:text-body-mobile md:text-body-desktop font-montserrat font-extrabold text-black !mb-0",children:(0,i.jsx)("b",{children:N("details.bidAmountInEth")})})}),(0,i.jsxs)("div",{className:"border h-[48px] flex items-center px-2.5 py-4 w-full border-[#dddddd] focus-within:border-[#ea34b0] transition-colors",children:[(0,i.jsx)("input",{type:"number",id:"enterBidAmount",className:"flex-1 w-full text-lg text-black bg-transparent border-none outline-none font-montserrat [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",value:m,onKeyDown:e=>{("-"===e.key||"+"===e.key||"e"===e.key||"E"===e.key)&&e.preventDefault()},onChange:e=>{let t=e.target.value;!t.includes("-")&&(""!==t&&!isNaN(parseFloat(t))&&0>parseFloat(t)||g(t))},placeholder:"0",min:"0",step:"any"}),E&&(0,i.jsx)("span",{className:"text-[18px] font-montserrat text-gray-400 whitespace-nowrap pl-2",children:E})]}),(0,i.jsxs)("div",{className:"flex items-center justify-between w-full min-h-[28px]",children:[(0,i.jsx)("span",{}),j||v?(0,i.jsx)("p",{className:"text-lg font-montserrat text-[#ea34b0] text-right",children:j?N("details.enterValidPrice"):v?N("details.bidsMustBeAtLeast"):""}):A?(0,i.jsxs)("p",{className:"text-lg font-montserrat text-black text-right",children:["Current High Bid: ",(0,i.jsxs)("b",{children:[(0,l.c)(BigInt(A))," ETH"]})]}):null]})]}),w&&(0,i.jsx)("div",{className:"w-full",children:(0,i.jsx)(p.A,{checked:!1,onChange:()=>w(),label:"Use bidding contract"})})]}
1),F=[{text:N("common.cancel"),onClick:n,variant:"secondary",disabled:b||y},{text:b||y?(0,i.jsx)(d.A,{size:16}):N("details.submitBid"),onClick:f,variant:"primary",disabled:b||y||!m.trim()||j||v}],H=void 0!==k?"Place bid for Punk #".concat(k):N("details.placeBidForPunk"),I=(0,h.i)()?u.uw:u.se,B=(0,i.jsxs)("div",{className:"min-h-[72px] md:min-h-0",children:["This bid deposits ETH directly into the"," ",(0,i.jsx)("a",{href:"https://".concat((0,h.i)()?"sepolia.":"","etherscan.io/address/").concat(I),target:"_blank",rel:"noopener noreferrer",className:"text-base-pink underline hover:text-[#d12d9a] transition-colors",children:"CryptoPunks contract"}),". It can be withdrawn at any time before it is accepted."]});return(0,i.jsx)(c.A,{isOpen:t,onClose:n,disableCloseAnimation:!0,header:H,subheader:B,body:T,buttons:F,maxWidth:"max-w-modal"})}},60755:(e,t,n)=>{n.d(t,{r:()=>i});let i={ETH:{decimals:2,showTrailingZeros:!1,useAbbreviations:!0,currency:"ETH"},USD:{decimals:2,showTrailingZeros:!1,useAbbreviations:!0,currency:"USD"},PERCENTAGE:{decimals:2,showTrailingZeros:!1},LARGE_NUMBER:{decimals:0,showTrailingZeros:!1,useAbbreviations:!0},SMALL_DECIMAL:{decimals:4,showTrailingZeros:!1},PRECISE_CURRENCY:{decimals:2,showTrailingZeros:!0,useAbbreviations:!1},ETH_PRECISE:{decimals:2,showTrailingZeros:!1,useAbbreviations:!1,currency:"ETH"}}},69858:(e,t,n)=>{n.d(t,{S:()=>u});var i=n(95155),s=n(12115);let r={x1:12,y1:12,x2:12,y2:12,opacity:0}
1,l=(e,t,n,i)=>({x1:e,y1:t,x2:n,y2:i,opacity:1}),a=[l(4,12,20,12),l(13,5,20,12),l(13,19,20,12)],o=[l(8,5,15,12),l(8,19,15,12),r],c=[l(7,22,7,3),l(17,2,17,21),l(2,8,7,3),l(12,8,7,3),l(12,16,17,21),l(22,16,17,21)],d={menu:{lines:[l(4,6,20,6),l(4,12,20,12),l(4,18,20,18)],rotation:0},close:{lines:[l(6,6,18,18),l(6,18,18,6),r],rotation:0},plus:{lines:[l(12,4,12,20),l(4,12,20,12),r],rotation:0},minus:{lines:[l(4,12,20,12),r,r],rotation:0},check:{lines:[l(5,12,10,17),l(10,17,19,7),r],rotation:0},"arrow-right":{lines:a,rotation:0},"arrow-down":{lines:a,rotation:90},"arrow-left":{lines:a,rotation:180},"arrow-up":{lines:a,rotation:270},"chevron-right":{lines:o,rotation:0},"chevron-down":{lines:o,rotation:90},"chevron-left":{lines:o,rotation:180},"chevron-up":{lines:o,rotation:270},play:{lines:[l(8,5,8,19),l(8,5,19,12),l(8,19,19,12)],rotation:0},pause:{lines:[l(7,5,7,19),l(17,5,17,19),r],rotation:0},swap:{lines:c,rotation:0},"swap-alt":{lines:c,rotation:180}},x=Math.max(...Object.values(d).map(e=>e.lines.length));function p(e){let t=[...e];for(;t.length<x;)t.push(r);return t}function u(e){let{icon:t,size:n=24,color:r="currentColor",strokeWidth:l=2,duration:a=350,className:o,style:c}=e,u=(0,s.useRef)(Array(x).fill(null)).current,h=(0,s.useRef)(null),f=(0,s.useRef)(t),m=(0,s.useRef)(0),g=(0,s.useCallback)((e,t)=>{e&&(e.setAttribute("x1",String(t.x1)),e.setAttribute("y1",String(t.y1)),e.setAttribute("x2",String(t.x2)),e.setAttribute("y2",String(t.y2)),e.setAttribute("opacity",String(t.opacity)))},[]),b=(0,s.useCallback)(e=>{h.current&&(h.current.style.transform="rotate(".concat(e,"deg)"))},[]);return(0,s.useEffect)(()=>{let e=d[t];p(e.lines).forEach((e,t)=>g(u[t],e)),b(e.rotation)},[]),(0,s.useEffect)(()=>{if(f.current===t)return;let e=p(d[f.current].lines),n=p(d[t].lines),i=d[f.current],s=d[t];f.current=t,cancelAnimationFrame(m.current);let r=performance.now(),l=t=>{var o,c;let d=Math.min((t-r)/a,1),p=d<.5?4*d*d*d:1-Math.pow(-2*d+2,3)/2;for(let t=0;t<x;t++)g(u[t],(o=e[t],c=n[t],{x1:o.x1+(c.x1-o.x1)*p,y1:o.y1+(c.y1-o.y1)*p,x2:o.x2+(c.x2-o.x2)*p,y2:o.y2+(c.y2-o.y2)*p,opacity:o.opacity+(c.opacity-o.opacity)*p}));let h=i.rotation,f=s.rotation,y=f-h;y>180?h+=360:y<-180&&(h-=360),b(h+(f-h)*p),d<1&&(m.current=requestAnimationFrame(l))};return m.current=requestAnimationFrame(l),()=>cancelAnimationFrame(m.current)},[t,a]),(0,i.jsx)("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:o,style:{flexShrink:0,display:"block",...c},children:(0,i.jsx)("g",{ref:h,style:{transformOrigin:"12px 12px"},children:Array.from({length:x},(e,t)=>(0,i.jsx)("line",{ref:e=>{u[t]=e},stroke:r,strokeWidth:l,strokeLinecap:"round"},t))})})}},78161:(e,t,n)=>{n.d(t,{A:()=>u});var i=n(95155),s=n(12115),r=n(78941),l=n(91767),a=n(28245),o=n(91678);function c(e){let{bidValueStr:t,floorPrice:n,isBidBelowFloor:s,isChecked:l,setIsChecked:c,isOwner:d=!0}=e,{t:x}=(0,r.L)(),p=(0,a.c)(BigInt(t));return(0,i.jsxs)("div",{className:"flex flex-col gap-modal-body-gap w-full",children:[(0,i.jsx)("div",{className:"flex flex-col gap-y-3",children:(0,i.jsxs)("div",{className:"flex flex-col gap-y-2",children:[(0,i.jsx)("div",{className:"font-montserrat font-bold text-base-black text-body-desktop leading-[100%]",children:x("details.bidAmountInEth")}),(0,i.jsx)("div",{className:"flex items-center text-base-black font-montserrat font-normal w-full text-body-desktop gap-x-[10px]",children:p})]})}),d&&(0,i.jsxs)("div",{className:"flex gap-[10px] items-start w-full",children:[(0,i.jsx)("button",{type:"button",onClick:()=>c(!l),className:"!mt-1 w-8 h-8 border-2 border-base-pink rounded-none cursor-pointer shrink-0 flex items-center justify-center p-0 transition-colors duration-200 ".concat(l?"bg-base-pink":"bg-base-white")}),(0,i.jsxs)("p",{className:"font-montserrat font-bold text-caption-desktop leading-[100%] text-base-pink m-0 flex-1",children:["I understand that by accepting this bid I will transfer my CryptoPunk to the highest bidder and receive at least ",p," ","ETH."]})]}),s&&(0,i.jsx)(o.A,{message:(0,i.jsxs)(i.Fragment,{children:["Warning: Bid is below floor price of"," ",(0,a.c)(BigInt(n))," ETH"]}),showIcon:!1,height:"48px"})]})}var d=n(16757);function x(e){let{transactionHash:t,isConfirming:n=!1}=e;return(0,i.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"24px",width:"100%"},children:t&&(0,i.jsx)(d.A,{transactionHash:t,isConfirming:n,successMessage:"Transaction successful."})})}var p=n(72245);function u(e){let{isOpen:t,onClose:n,onAcceptBid:a,onAcceptBidWithFlashbots:u,onOfferPunk:h,bidValueStr:f,currentEthPrice:m,floorPrice:g,isUsingWalletConnect:b,isBidBelowFloor:y,isLoading:j,isSwitchingChain:v,punkId:w,transactionHash:k,isTransactionConfirmed:A=!1,isTransactionConfirming:N=!1,onWithdraw:S,isWithdrawing:C=!1,hasWithdrawn:E=!1,isOwner:T=!0}=e,{t:F}
1=(0,r.L)(),[H,I]=(0,s.useState)(!1);if((0,s.useEffect)(()=>{t||I(!1)},[t]),k&&(A||E)){let e=[];return E||C||!S?C?(e.push({text:"Close",onClick:n,variant:"secondary"}),e.push({text:(0,i.jsx)(p.A,{size:16}),onClick:()=>{},variant:"primary",disabled:!0})):e.push({text:"Close",onClick:n,variant:"primary"}):(e.push({text:"Close",onClick:n,variant:"secondary"}),e.push({text:"Withdraw Funds",onClick:S,variant:"primary",disabled:!1})),(0,i.jsx)(l.A,{isOpen:t,onClose:n,header:E?"Funds withdrawn successfully":"CryptoPunk #".concat(w," sold successfully"),subheader:E?"You may now close this modal.":"Your sale has been completed. Withdraw funds from the contract to complete the transaction.",body:(0,i.jsx)(x,{transactionHash:k,isConfirming:!1}),buttons:e,maxWidth:"max-w-[600px]"})}let B=b?[{text:F("common.cancel"),onClick:n,variant:"secondary"},{text:j||v?(0,i.jsx)(p.A,{size:16}):F("details.acceptBid"),onClick:a,variant:"primary",disabled:j||v||!H||!T}]:[{text:F("common.cancel"),onClick:n,variant:"secondary"},{text:j||v?(0,i.jsx)(p.A,{size:16}):F("details.acceptBid"),onClick:u,variant:"primary",disabled:j||v||!H||!T}];return(0,i.jsx)(l.A,{isOpen:t,onClose:n,header:T?"Accept bid for CryptoPunk #".concat(w):"Bid for CryptoPunk #".concat(w),subheader:T?"Accepting this bid will transfer the Punk from your wallet. This is irreversible.":"",body:(0,i.jsxs)("div",{className:"flex flex-col gap-[24px] w-full",children:[(0,i.jsx)(c,{bidValueStr:f,currentEthPrice:m,floorPrice:g,isUsingWalletConnect:b,isBidBelowFloor:y,onOfferPunk:h,onAcceptBid:b?void 0:a,isChecked:H,setIsChecked:I,isOwner:T}),k&&!A&&(0,i.jsx)(d.A,{transactionHash:k,isConfirming:N}),!T&&(0,i.jsx)(o.A,{message:"Bids can only be accepted by the owner of this CryptoPunk.",showIcon:!1,height:"auto"})]}),buttons:B,maxWidth:"max-w-[600px]"})}},91678:(e,t,n)=>{n.d(t,{A:()=>s});var i=n(95155);function s(e){let{message:t,showIcon:n=!0,width:s="100%",height:r="auto"}=e;return(0,i.jsxs)("div",{style:{backgroundColor:"#000000",padding:"10px",display:"flex",alignItems:"center",gap:"12px",width:s,height:r},children:[n&&(0,i.jsx)("div",{style:{width:"16px",height:"16px",backgroundColor:"white",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"10px",fontWeight:"bold",color:"#000000"},children:"i"}),(0,i.jsx)("div",{style:{color:"white",fontSize:"18px",fontWeight:"normal",fontFamily:"Montserrat, sans-serif",lineHeight:"100%",letterSpacing:"-0.36px",flex:1},children:t})]})}n(12115)},92426:(e,t,n)=>{n.d(t,{A:()=>h});var i=n(95155),s=n(12115),r=n(15989),l=n(72245),a=n(41171),o=n(87562),c=n(88848),d=n(33791),x=n(28245),p=n(16757),u=n(69858);function h(e){let{isOpen:t,address:n,supportsBatchTransactions:h=null,usdcQuote:f,isLoadingQuote:m,price:g,priceWei:b,priceUsd:y,usdcStep:j,expectedSwapEthOutWei:v,showUsdcDisplay:w,setShowUsdcDisplay:k,onUsdcQuoteChange:A,purchaseSuccess:N}=e,[S,C]=(0,s.useState)(null),[E,T]=(0,s.useState)(!1),F=!!N,H=!1===h,I=!!(H&&1===j&&w),B=!!(H&&2===j&&w),L=!!(H&&3===j&&w),P=!!(H&&void 0!==j&&w),_=B&&v?(()=>{try{let e=Number((0,x.c)(BigInt(v)));if(Number.isFinite(e))return"~".concat(e.toLocaleString("en-US",{minimumFractionDigits:0,maximumFractionDigits:6})," ETH (est.)");return"~".concat((0,x.c)(BigInt(v))," ETH (est.)")}catch(e){return null}})():null,D=null!=f?f:S,U=m||E;(0,s.useEffect)(()=>{!F&&null==f&&t&&n&&g&&(async()=>{T(!0);try{let e=await (0,r.K_)({chainId:(0,a.i)()?o.G.id.toString():(0,a._)()?c.E.id.toString():d.r.id.toString(),ethAmountWei:b,taker:n});C(e),null==A||A(e)}catch(e){console.error("Failed to fetch USDC quote:",e),C(null),null==A||A(null)}finally{T(!1)}})()},[t,n,g,b,A,f,F]);let W=void 0!==j&&D,z=t&&n&&void 0===j&&(null!==D||U),M=D&&!U?"".concat(parseFloat(D).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})," USDC"):null,O=w&&D?"".concat(parseFloat(D).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})," USDC"):g,R=w&&D?g:null!=M?M:null;return N?(0,i.jsxs)("div",{className:"flex flex-col gap-6 w-full",children:[(()=>{var e;let t=null!=(e=N.stackOrder)?e:"priceFirst",n="priceUsdFirst"===t?N.priceUsd:N.price,s="priceUsdFirst"===t?N.price:N.priceUsd;return(0,i.jsx)(i.Fragment,{children:(n||s)&&(0,i.jsx)("div",{className:"flex flex-col gap-[5px] items-start w-full",children:(0,i.jsxs)("div",{className:"flex flex-col items-start gap-2 mt-2",children:[n&&(0,i.jsx)("span",{className:"text-[24px] font-bold font-montserrat text-black leading-[100%] tracking-[-0.48px]",children:n}),s&&(0,i.jsx)("span",{className:"text-[24px] font-normal font-montserrat text-[#888888] leading-[100%] tracking-[-0.36px]",children:s})]})})})})(),N.transactionHash&&(0,i.jsx)(p.A,{transactionHash:N.transactionHash,isConfirming:!1,successMessage:""})]}):(0,i.jsx)("div",{className:"flex flex-col gap-[30px] w-full",children:(0,i.jsx)("div",{className:"flex flex-col gap-[15px] items-start w-full",children:(0,i.jsxs)("div",{className:"flex flex-col gap-[5px] items-start w-full",children:[!z&&(0,i.jsx)("div",{className:"text-[18px] font-bold font-montserrat text-black leading-[100%] tracking-[-0.36px]",children:I?"Approval Amount":B?"Swap Amount":"Purchase Amount"}),z?(0,i.jsx)("div",{className:"flex flex-col gap-[8px] w-full",children:(0,i.jsxs)("div",{className:"flex flex-col items-start gap-4",children:[(0,i.jsxs)("span",{className:"text-[24px] font-bold font-montserrat text-black leading-[100%] tracking-[-0.48px]",children:[O,U&&!M&&(0,i.jsx)(l.A,{size:16,className:"ml-2 inline-block align-middle"})]}),null!==R?(0,i.jsxs)("button",{type:"button",onClick:()=>M&&k(!w),className:"flex items-center gap-4 text-left bg-transparent border-none p-0 cursor-pointer disabled:cursor-default",disabled:!M,"aria-label":"Switch between ETH and USDC",children:[!P&&(0,i.jsx)(u.S,{icon:w?"swap-alt":"swap",size:20,color:"#EA34B0",strokeWidth:2}),(0,i.jsx)("span",{className:"text-[24px] font-normal font-montserrat text-[#888888] leading-[100%] tracking-[-0.36px]",children:w&&D?g:M})]}):(0,i.jsx)(l.A,{size:16,className:"ml-2 inline-block align-middle",secondary:!0})]})}):(0,i.jsxs)("div",{className:"flex flex-col items-start gap-2",children:[(0,i.jsxs)("span",{className:"text-[18px] font-montserrat text-black leading-[100%] tracking-[-0.48px] flex items-center gap-2 mt-2",children:[L?g:W&&D?"".concat(parseFloat(D).toLocaleStr
1ing("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})," USDC"):g,U&&(0,i.jsx)(l.A,{size:16,className:"inline-block align-middle",secondary:!0})]}),W&&D&&!I&&!L&&(0,i.jsxs)("span",{className:"text-[18px] font-normal font-montserrat text-[#888888] leading-[100%] tracking-[-0.36px] flex items-center gap-1",children:[!P&&(0,i.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 12 12",fill:"none",className:"flex-shrink-0","aria-hidden":!0,children:[(0,i.jsx)("path",{d:"M4 9L4 3M3 5L4 3L5 5",stroke:"#ea34b0",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,i.jsx)("path",{d:"M8 3L8 9M7 7L8 9L9 7",stroke:"#ea34b0",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"})]}),B?null!=_?_:"Estimating output…":g]})]})]})})})}}}]);
2//# chunkId=01a08f3e-2e06-79f2-b840-92bcd2c02b96

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.