1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8605],{78605:function(e,t,n){n.r(t),n.d(t,{default:function(){return e5}});var i=n(52676),r=n(93417),o=n(53149),a=n(1968),s=n(1637),c=n(35968),l=n(75271);let d=o.ZP.button.withConfig({componentId:"sc-43f175b-0"})(['background:none;border:none;color:#f8c22c;cursor:pointer;font-size:14px;padding:0.5rem;font-family:"PressStart2P",cursive;text-transform:uppercase;margin-bottom:1rem;&:hover{color:rgb(244,255,161);}']),u=o.ZP.span.withConfig({componentId:"sc-43f175b-1"})(["font-size:13px;color:rgb(246,255,255);"]),h=o.ZP.span.withConfig({componentId:"sc-43f175b-2"})(["font-size:13px;color:white;font-weight:bold;"]),p=o.ZP.div.withConfig({componentId:"sc-43f175b-3"})([""," gap:16px;"],(0,a.fU)("row","center","center"));var f=n(52860);function m(e){let{handleBack:t,selectedTranche:n}=e;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(d,{onClick:t,children:"â Back to Tranches"}),(0,i.jsxs)(g,{children:[(0,i.jsx)(x,{children:null==n?void 0:n.name}),(0,i.jsxs)(b,{children:[(0,i.jsxs)(v,{children:[(0,i.jsx)(u,{children:"APY"}),(0,i.jsx)(h,{children:null==n?void 0:n.apy})]}),(0,i.jsxs)(v,{children:[(0,i.jsx)(u,{children:"Minimum Contribution"}),(0,i.jsx)(h,{children:null==n?void 0:n.minInvestment})]}),(0,i.jsxs)(v,{children:[(0,i.jsx)(u,{children:"Lockup Period"}),(0,i.jsx)(h,{children:null==n?void 0:n.lockupPeriod})]})]}),(0,i.jsxs)(w,{children:[(0,i.jsx)(j,{children:"Enter participation Amount (BIG)"}),(0,i.jsx)(I,{type:"number",placeholder:"0.00"})]}),(0,i.jsxs)(p,{children:[(0,i.jsx)(f.m,{$primary:!0,children:"Invest Now"}),(0,i.jsx)(f.m,{onClick:t,children:"Cancel"})]})]})]})}let g=o.ZP.div.withConfig({componentId:"sc-5e066c20-0"})([""," gap:1.5rem;width:100%;"],(0,a.fU)("column","flex-start","stretch")),x=o.ZP.h3.withConfig({componentId:"sc-5e066c20-1"})(["margin:0;font-size:18px;color:#f8c22c;text-align:center;"]),b=o.ZP.div.withConfig({componentId:"sc-5e066c20-2"})([""," gap:1rem;padding:1rem;background:#1a3d4f;width:100%;"],(0,a.fU)("column","flex-start","stretch")),v=o.ZP.div.withConfig({componentId:"sc-5e066c20-3"})([""," width:100%;"],(0,a.fU)("row","space-between","center")),w=o.ZP.div.withConfig({componentId:"sc-5e066c20-4"})([""," gap:0.5rem;width:100%;"],(0,a.fU)("column","flex-start","stretch")),j=o.ZP.label.withConfig({componentId:"sc-5e066c20-5"})(["font-size:14px;color:rgb(246,255,255);"]),I=o.ZP.input.withConfig({componentId:"sc-5e066c20-6"})(['background:#1a3d4f;border:2px solid #f8c22c;color:#f8c22c;padding:0.75rem;font-size:16px;width:100%;text-align:right;outline:none;font-family:"PressStart2P",cursive;&::placeholder{color:rgba(248,194,44,0.5);}']);var C=n(39033),P=n(57958),k=n(68080),y=n(14115),A=n(32753),Z=n(4942),T=n(96976),B=n(68986);function $(e={}){let{hash:t,query:n={}}=e,i=(0,B.Z)(e),r=(0,T.x)({config:i}),o=function(e,t={}){return{async queryFn({queryKey:n}){let{hash:i,...r}=n[1];if(!i)throw Error("hash is required");return(0,y.e)(e,{...r,onReplaced:t.onReplaced,hash:i})},queryKey:function(e={}){let{onReplaced:t,...n}=e;return["waitForTransactionReceipt",(0,A.OP)(n)]}(t)}}(i,{...e,chainId:e.chainId??r}),a=!!(t&&(n.enabled??!0));return(0,Z.aM)({...n,...o,enabled:a})}var S=n(67630),D=n(8912),N=n(28935),M=n(54772);class R extends M.G{constructor({value:e}){super(`Number \`${e}\` is not a valid decimal number.`,{name:"InvalidDecimalNumberError"})}}var z=n(32359);let G=()=>(0,C.u)({address:S.TR,abi:S._H,functionName:"maxCap"}),F=()=>(0,C.u)({address:S.TR,abi:S._H,functionName:"totalDeposits"}),E=()=>(0,C.u)({address:S.TR,abi:S._H,functionName:"maturityDate"}),L=()=>(0,C.u)({address:S.TR,abi:S._H,functionName:"rewards"}),U=e=>{let{address:t}=(0,P.m)(),n=e||t;return(0,C.u)({address:S.TR,abi:S._H,functionName:"userDeposits",args:n?[n]:void 0})},H=e=>{let{address:t}=(0,P.m)(),n=e||t;return(0,C.u)({address:S.TR,abi:S._H,functionName:"userClaimed",args:n?[n]:void 0})},_=e=>{let{address:t}=(0,P.m)(),n=e||t,{data:i,isLoading:r,error:o,refetch:a}=(0,C.u)({address:S.TR,abi:S._H,functionName:"claimedAmt",args:n?[n]:void 0}),s=i||[BigInt(0),BigInt(0)];return{ethReceived:s[0],bigReceived:s[1],isLoading:r,error:o,refetch:a}},O=()=>{let{data:e,isLoading:t,error:n,refetch:i}=G(),{data:r,isLoading:o,error:a,refetch:s}=F(),{data:c,isLoading:l,error:d,refetch:u}=E();return{data:e&&c?{maxCap:(0,D.d)(e),totalDeposits:r?(0,D.d)(r):"0",maturityDate:new Date(1e3*Number(c)).toISOString(),isAvailable:Date.now()<1e3*Number(c),filledPercentage:Number(r)/Number(e)*100}:void 0,isLoading:t||o||l,error:n||a||d,refetch:()=>{i(),s(),u()}}},Y=e=>{let{data:t,isLoading:n,error:i,refetch:r}=U(e),{data:o,isLoading:a,error:s,refetch:c}=L(),{data:l,isLoading:d,error:u,refetch:h}=H(e),{data:p,isLoading:f,error:m,refetch:g}=E(),{data:x,refetch:b}=F(),{ethReceived:v,bigReceived:w,refetch:j}=_(e),I=t||BigInt(0),C=o||BigInt(0);return{data:{amount:(0,D.d)(I),hasClaimed:!!l,ethReceived:(0,D.d)(v),bigReceived:(0,D.d)(w),projectedPayout:K(I,C,x),nextPayoutDate:new Date(1e3*Number(p)).toISOString()},isLoading:n||d||f||a,error:i||u||m||s,refetch:()=>{r(),h(),g(),c(),b(),j()}}},V=()=>{let{address:e}=(0,P.m)();return(0,C.u)({address:S.tF,abi:S.RB,functionName:"allowance",args:e?[e,S.TR]:void 0,query:{enabled:!!e}})},X=()=>{let{writeContract:e,data:t,error:n,isPending:i}=(0,k.S)(),{isLoading:r,isSuccess:o,isError:a}=$({hash:t}),{showToast:s}=(0,z.E)();return(0,l.useEffect)(()=>{a?s((null==n?void 0:n.message)||"An error occurred during approval","error"):o&&s("Approval successful!","success")},[a,o,n,s]),{approve:(0,l.useCallback)(t=>{t&&e({address:S.tF,abi:S.RB,functionName:"approve",args:[S.TR,BigInt(578960446186581e62)]})},[e]),isPending:i,isConfirming:r,isConfirmed:o,error:n}},q=e=>{let{writeContract:t,data:n,error:i,isPending:r}=(0,k.S)(),{isLoading:o,isSuccess:a,isError:s}=$({hash:n}),{showToast:c}=(0,z.E)();return(0,l.useEffect)(()=>{a&&(c("Staking successful!","success"),e())},[a]),(0,l.useEffect)(()=>{s&&c((null==i?void 0:i.message)||"An error occurred","error")},[s,i,c]),{deposit:(0,l.useCallback)(e=>{if(!e)return;let n=function(e,t="wei"){return function(e,t){if(!/^(-?)([0-9]*)\.?([0-9]*)$/.test(e))throw new R({value:e});let[n,i="0"]=e.split("."),r=n.startsWith("-");if(r&&(n=n.slice(1)),i=i.replace(/(0+)$/,""),0===t)1===Math.round(Number(`.${i}`))&&(n=`${BigInt(n)+1n}`),i="";else if(i.length>t){let[e,r,o]=[i.slice(0,t-1),i.slice(t-1,t),i.slice(t)],a=Math.round(Number(`${r}.${o}`));(i=a>9?`${BigInt(e)+BigInt(1)}0`.padStart(e.length+1,"0"):`${e}${a}`).length>t&&(i=i.slice(1),n=`${BigInt(n)+1n}`),i=i.slice(0,t)}else i=i.padEnd(t,"0");return BigInt(`${r?"-":""}${n}${i}`)}(e,N.ez[t])}(e);t({address:S.TR,abi:S._H,functionName:"deposit",args:[n]})},[t]),isPending:r,isConfirming:o,isConfirmed:a,error:i}},W=()=>{let{writeContract:e,data:t,error:n,isPending:i}=(0,k.S)(),{isLoading:r,isSuccess:o}=$({hash:t}),{showToast:a}=(0,z.E)();return(0,l.useEffect)(()=>{o&&a("Claim successful!","success")},[o]),{claim:(0,l.useCallback)(()=>
1{e({address:S.TR,abi:S._H,functionName:"claim"})},[e]),isPending:i,isConfirming:r,isConfirmed:o,error:n}},K=(e,t,n)=>n===BigInt(0)?"0":(0,D.d)(e*t/n);function J(e){let{tranche:t,handleTrancheClick:n}=e,r=(()=>{if(!t.maxCap||!t.filledAmount)return 0;let e=parseFloat(t.maxCap.replace(/[^0-9.]/g,"")),n=parseFloat(t.filledAmount.replace(/[^0-9.]/g,""));return isNaN(e)||isNaN(n)||0===e?0:Math.min(100,n/e*100)})(),o="Cap: ".concat(t.filledAmount," / ").concat(t.maxCap),a=t.isAvailable?o:"Cap: ??? BIG / ??? BIG";return(0,i.jsxs)(ee,{$isAvailable:t.isAvailable,onClick:()=>n(t),children:[(0,i.jsx)(et,{children:t.name}),(0,i.jsxs)(en,{children:[(0,i.jsx)(u,{children:"reward Asset"}),(0,i.jsx)(h,{children:t.payOutAsset})]}),(0,i.jsxs)(en,{children:[(0,i.jsx)(u,{children:"Minimum contribution"}),(0,i.jsx)(h,{children:t.minInvestment})]}),(0,i.jsxs)(er,{children:[(0,i.jsx)(eo,{children:(0,i.jsx)(u,{children:a})}),(0,i.jsx)(ea,{children:(0,i.jsx)(es,{$fillPercentage:r,$isAvailable:t.isAvailable})})]}),!t.isAvailable&&(0,i.jsx)(ei,{children:"Coming Soon"})]},t.id)}o.ZP.div.withConfig({componentId:"sc-3dafbb36-0"})([""," padding:0.75rem;background:#1a3d4f;"],(0,a.fU)("column","flex-start","stretch")),o.ZP.p.withConfig({componentId:"sc-3dafbb36-1"})(["margin:0;font-size:14px;line-height:1.6;"]);let Q=o.ZP.div.withConfig({componentId:"sc-3dafbb36-2"})([""," gap:1rem;"],(0,a.fU)("column","flex-start","stretch")),ee=o.ZP.div.withConfig({componentId:"sc-3dafbb36-3"})([""," gap:0.8rem;padding:1rem;background:#1a3d4f;border:2px solid ",";cursor:",";opacity:",";position:relative;transition:all 0.2s ease-in-out;user-select:",";&:hover{transform:",";box-shadow:",";}"],(0,a.fU)("column","flex-start","stretch"),e=>e.$isAvailable?"#F8C22C":"#666666",e=>e.$isAvailable?"pointer":"not-allowed",e=>e.$isAvailable?1:.7,e=>e.$isAvailable?"auto":"none",e=>e.$isAvailable?"translateY(-2px)":"none",e=>e.$isAvailable?"0 4px 8px rgba(0,0,0,0.2)":"none"),et=o.ZP.h3.withConfig({componentId:"sc-3dafbb36-4"})(["margin:0;font-size:15px;color:#f8c22c;"]),en=o.ZP.div.withConfig({componentId:"sc-3dafbb36-5"})([""," width:100%;"],(0,a.fU)("row","space-between","center")),ei=o.ZP.div.withConfig({componentId:"sc-3dafbb36-6"})(["position:absolute;top:50%;left:50%;transform:translate(-50%,-50%) rotate(-45deg);background:#666666;color:white;padding:0.5rem 1.5rem;font-size:12px;font-weight:bold;text-transform:uppercase;letter-spacing:1px;"]),er=o.ZP.div.withConfig({componentId:"sc-3dafbb36-7"})([""," gap:0.5rem;width:100%;"],(0,a.fU)("column","flex-start","stretch")),eo=o.ZP.div.withConfig({componentId:"sc-3dafbb36-8"})([""," width:100%;"],(0,a.fU)("row","space-between","center")),ea=o.ZP.div.withConfig({componentId:"sc-3dafbb36-9"})(["width:100%;height:8px;background:#2a5d7f;border-radius:0px;overflow:hidden;"]),es=o.ZP.div.withConfig({componentId:"sc-3dafbb36-10"})(["width:","%;height:100%;background:",";border-radius:0px;transition:width 0.3s ease-in-out;"],e=>e.$fillPercentage,e=>e.$isAvailable?"#F8C22C":"#666666");var ec=function(e){let{handleTrancheClick:t,setModalState:n}=e,r=function(){var e;let{data:t}=O();return[{id:1,name:"Tranche A",apy:"400%",payOutAsset:"ETH",minInvestment:"1 BIG",lockupPeriod:t?"".concat(Math.ceil((new Date(t.maturityDate).getTime()-Date.now())/864e5)," Days"):"???",isAvailable:!0,maxCap:t?"".concat(Number(t.maxCap).toLocaleString()," BIG"):"N/A",filledAmount:t?"".concat(Number(null!==(e=null==t?void 0:t.totalDeposits)&&void 0!==e?e:0).toLocaleString()," BIG"):"N/A"},{id:2,name:"Tranche B",apy:"???",payOutAsset:"???",minInvestment:"???",lockupPeriod:"???",isAvailable:!1,maxCap:"2,000,000 BIG",filledAmount:"0 BIG"},{id:3,name:"Tranche C",apy:"???",payOutAsset:"???",minInvestment:"???",lockupPeriod:"???",isAvailable:!1,maxCap:"3,000,000 BIG",filledAmount:"0 BIG"}]}();return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Q,{children:r.map(e=>(0,i.jsx)(J,{tranche:e,handleTrancheClick:t},e.id))}),(0,i.jsx)(p,{children:(0,i.jsx)(f.m,{onClick:()=>n({type:"none"}),children:"Close"})})]})};function el(e){let{title:t,content:n}=e,[r,o]=(0,l.useState)(!1);return(0,i.jsxs)(ed,{children:[(0,i.jsxs)(eu,{onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),children:[t,(0,i.jsx)(eh,{children:"?"})]}),r&&(0,i.jsxs)(ep,{children:[(0,i.jsx)(ef,{children:t}),(0,i.jsx)(em,{children:n})]})]})}let ed=o.ZP.div.withConfig({componentId:"sc-9393b5c4-0"})(["position:relative;display:inline-block;"]),eu=o.ZP.span.withConfig({componentId:"sc-9393b5c4-1"})(["display:inline-flex;align-items:center;cursor:help;color:white;font-weight:bold;"]),eh=o.ZP.span.withConfig({componentId:"sc-9393b5c4-2"})(["display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;border-radius:50%;background-color:#f8c22c;color:#102c39;font-size:10px;margin-left:8px;font-weight:bold;"]),ep=o.ZP.div.withConfig({componentId:"sc-9393b5c4-3"})(['position:absolute;z-index:10;width:350px;background-color:#1a3d4f;border:2px solid #f8c22c;border-radius:0;padding:12px;top:100%;left:50%;transform:translateX(-50%);margin-top:8px;box-shadow:0 4px 8px rgba(0,0,0,0.3);&::before{content:"";position:absolute;top:-8px;left:50%;transform:translateX(-50%);border-width:0 8px 8px 8px;border-style:solid;border-color:transparent transparent #f8c22c transparent;}&::after{content:"";position:absolute;top:-6px;left:50%;transform:translateX(-50%);border-width:0 6px 6px 6px;border-style:solid;border-color:transparent transparent #1a3d4f transparent;}']),ef=o.ZP.h4.withConfig({componentId:"sc-9393b5c4-4"})(["margin:0 0 8px 0;color:#f8c22c;font-size:14px;"]),em=o.ZP.p.withConfig({componentId:"sc-9393b5c4-5"})(["margin:0;color:rgb(246,255,255);font-size:12px;line-height:1.8;"]);function eg(e){let{trancheData:t}=e,{apy:n,payOutAsset:r,maturityDate:o,minInvestment:a}=t,s=function(e){let t=new Date(e),n=new Date;if(t.getTime()-n.getTime()<864e5){let e=Math.floor((t.getTime()-n.getTime())/6e4);if(!(e<60))return"".concat(Math.floor(e/60)," hours left");if(!(e<=0))return"".concat(e," minutes left");{let e=Math.floor((t.getTime()-n.getTime())/1e3);return e<=0?"Payout READY":e<60?"1 minute left":"".concat(Math.floor(e/60)," minutes left")}}return t.toLocaleDateString("en-US",{day:"numeric",month:"short",year:"numeric"})}(o);return(0,i.jsxs)(ex,{children:[(0,i.jsxs)(eb,{children:[(0,i.jsx)(ev,{children:(0,i.jsx)(el,{title:"projected APR",content:"Annual Percentage Rate. This represents the expected return on your staked amount over a year. This vault has a 5-day lockup and actual returns are based on that duration."})}),(0,i.jsx)(ew,{children:n})]}),(0,i.jsxs)(eb,{children:[(0,i.jsx)(ev,{children:(0,i.jsx)(el,{title:"Minimum Contribution",content:"The minimum amount of BIG tokens you need to participate in Tranche A."})}),(0,i.jsx)(ew,{children:a})]}),(0,i.jsxs)(eb,{children:[(0,i.jsx)(ev,{children:(0,i.jsx)(el,{title:"Maturity date",content:"The duration you must keep your $BIG locked in the tranche before you can withdraw."})}),(0,i.jsx)(ew,{children:s})]}),(0,i.jsxs)(eb,{children:[(0,i.jsx)(ev,{children:(0,i.jsx)(el,{title:"Reward Asset",content:"The asset you'll receive as rewards for your participation."})}),(0,i.jsx)(ew,{children:r})]})]})}let ex=o.ZP.div.withConfig({componentId:"sc-6d564da5-0"})([""," gap:1.25rem;width:100%;
1"],(0,a.fU)("column","flex-start","stretch")),eb=o.ZP.div.withConfig({componentId:"sc-6d564da5-1"})([""," width:100%;padding:0.5rem 0;border-bottom:1px solid rgba(248,194,44,0.1);&:last-child{border-bottom:none;}"],(0,a.fU)("row","space-between","center")),ev=o.ZP.div.withConfig({componentId:"sc-6d564da5-2"})(["font-size:13px;color:rgb(246,255,255);"]),ew=o.ZP.div.withConfig({componentId:"sc-6d564da5-3"})(["font-size:13px;color:#f8c22c;font-weight:bold;"]);function ej(e){let{userInvestment:t}=e,n=(1600*Number(t.projectedPayout)).toFixed(2),r=function(e){let t=new Date,n=Math.floor((new Date(e).getTime()-t.getTime())/6e4);return n>60?"".concat(Math.floor(n/60)," hours"):n>0?"".concat(n," minutes"):1===n?"1 minute left":"Payout READY"}(t.nextPayoutDate),o=t.ethReceived,a=t.bigReceived;return"0"!==t.ethReceived?(0,i.jsxs)(eI,{children:[(0,i.jsxs)(eC,{children:[(0,i.jsx)(eP,{children:"ETH Received"}),(0,i.jsx)(ek,{children:Number(o).toLocaleString()})]}),(0,i.jsxs)(eC,{children:[(0,i.jsx)(eP,{children:"BIG Received"}),(0,i.jsx)(ek,{children:Number(a).toLocaleString()})]})]}):(0,i.jsxs)(eI,{children:[(0,i.jsxs)(eC,{children:[(0,i.jsx)(eP,{children:"Current Stake"}),(0,i.jsx)(ek,{children:t.amount})]}),(0,i.jsxs)(eC,{children:[(0,i.jsx)(eP,{children:"Projected Payout"}),(0,i.jsxs)(ek,{children:["~ $",n]})]}),(0,i.jsxs)(eC,{children:[(0,i.jsx)(eP,{children:"Payout Time"}),(0,i.jsx)(ek,{children:r})]})]})}let eI=o.ZP.div.withConfig({componentId:"sc-c5027c6-0"})([""," gap:1.25rem;width:100%;"],(0,a.fU)("column","flex-start","stretch")),eC=o.ZP.div.withConfig({componentId:"sc-c5027c6-1"})([""," width:100%;padding:0.5rem 0;border-bottom:1px solid rgba(248,194,44,0.1);&:last-child{border-bottom:none;}"],(0,a.fU)("row","space-between","center")),eP=o.ZP.span.withConfig({componentId:"sc-c5027c6-2"})(["font-size:13px;color:rgb(246,255,255);"]),ek=o.ZP.span.withConfig({componentId:"sc-c5027c6-3"})(["font-size:13px;color:#f8c22c;font-weight:bold;"]);function ey(e){let{trancheData:t,userInvestment:n}=e,r="0"!==n.amount,[o,a]=(0,l.useState)(r?"investment":"details");return(0,i.jsxs)(eA,{children:[(0,i.jsxs)(eZ,{children:[(0,i.jsx)(eT,{$active:"details"===o,onClick:()=>a("details"),children:"Tranche Details"}),(0,i.jsx)(eT,{$active:"investment"===o,onClick:()=>r&&a("investment"),$disabled:!r,children:"Your Stake"})]}),(0,i.jsx)(eB,{children:"details"===o?(0,i.jsx)(eg,{trancheData:t}):(0,i.jsx)(ej,{userInvestment:n})})]})}let eA=o.ZP.div.withConfig({componentId:"sc-a7944378-0"})([""," width:100%;background:#1a3d4f;box-shadow:0 4px 12px rgba(0,0,0,0.15);"],(0,a.fU)("column","flex-start","stretch")),eZ=o.ZP.div.withConfig({componentId:"sc-a7944378-1"})([""," width:100%;background:#1a3d4f;border-bottom:1px solid rgba(248,194,44,0.2);"],(0,a.fU)("row","flex-start","center")),eT=o.ZP.div.withConfig({componentId:"sc-a7944378-2"})(["padding:0.75rem 1.25rem;font-size:14px;font-weight:",";color:",";background:",";cursor:",";opacity:",";transition:all 0.2s ease;position:relative;border-radius:0;&:hover{background:",";color:",";}&:after{content:'';position:absolute;bottom:-1px;left:0;right:0;height:2px;background:",";transition:all 0.2s ease;}"],e=>e.$active?"600":"400",e=>e.$active?"#f8c22c":"rgba(246, 255, 255, 0.7)",e=>e.$active?"rgba(248, 194, 44, 0.1)":"transparent",e=>e.$disabled?"not-allowed":"pointer",e=>e.$disabled?.5:1,e=>e.$disabled||e.$active?e.$active?"rgba(248, 194, 44, 0.1)":"transparent":"rgba(248, 194, 44, 0.05)",e=>e.$disabled?"rgba(246, 255, 255, 0.7)":"#f8c22c",e=>e.$active?"#f8c22c":"transparent"),eB=o.ZP.div.withConfig({componentId:"sc-a7944378-3"})(["padding:1.25rem;width:100%;background:rgba(26,61,79,0.5);"]);function e$(e){let{maxCap:t,filledAmount:n}=e,r=(()=>{if(!t||!n)return 0;let e=parseFloat(t.replace(/[^0-9.]/g,"")),i=parseFloat(n.replace(/[^0-9.]/g,""));return isNaN(e)||isNaN(i)||0===e?0:Math.min(100,i/e*100)})();return(0,i.jsxs)(eS,{children:[(0,i.jsx)(eD,{children:(0,i.jsx)(el,{title:"Participation Cap",content:"The maximum amount that can be staked in this Tranche. Once the cap is reached, no more capital will be accepted."})}
1),(0,i.jsx)(eN,{children:(0,i.jsx)(eM,{$fillPercentage:r})}),(0,i.jsxs)(eR,{children:[(0,i.jsx)(ez,{children:Number(n).toLocaleString()+" BIG"}),(0,i.jsx)(ez,{children:"/"}),(0,i.jsx)(ez,{children:Number(t).toLocaleString()+" BIG"})]})]})}let eS=o.ZP.div.withConfig({componentId:"sc-c5a5b2e7-0"})([""," gap:0.5rem;padding:1rem;background:#1a3d4f;width:100%;"],(0,a.fU)("column","flex-start","stretch")),eD=o.ZP.div.withConfig({componentId:"sc-c5a5b2e7-1"})(["font-size:14px;color:rgb(246,255,255);margin-bottom:6px;"]),eN=o.ZP.div.withConfig({componentId:"sc-c5a5b2e7-2"})(["width:100%;height:8px;background:#2a5d7f;border-radius:0px;overflow:hidden;"]),eM=o.ZP.div.withConfig({componentId:"sc-c5a5b2e7-3"})(["width:","%;height:100%;background:#f8c22c;border-radius:0px;transition:width 0.3s ease-in-out;"],e=>e.$fillPercentage),eR=o.ZP.div.withConfig({componentId:"sc-c5a5b2e7-4"})([""," width:100%;font-size:12px;color:#f8c22c;"],(0,a.fU)("row","space-between","center")),ez=o.ZP.span.withConfig({componentId:"sc-c5a5b2e7-5"})(["font-size:12px;color:#f8c22c;"]);function eG(e){let{rawInvestmentAmount:t,rawSetInvestmentAmount:n,onInvestmentChange:r}=e;return(0,i.jsxs)(eF,{children:[(0,i.jsx)(eE,{children:"Amount to stake"}),(0,i.jsx)(eL,{type:"number",placeholder:"0",value:t,onChange:e=>{let t=e.target.value.replace(/\./g,"");n(t),r(t)},min:"100",step:"1"})]})}let eF=o.ZP.div.withConfig({componentId:"sc-55f70cee-0"})([""," gap:0.5rem;width:100%;"],(0,a.fU)("column","flex-start","stretch")),eE=o.ZP.label.withConfig({componentId:"sc-55f70cee-1"})(["font-size:14px;color:rgb(246,255,255);"]),eL=o.ZP.input.withConfig({componentId:"sc-55f70cee-2"})(['background:#1a3d4f;border:2px solid #f8c22c;color:#f8c22c;padding:0.75rem;font-size:16px;width:100%;text-align:right;outline:none;font-family:"PressStart2P",cursive;&::placeholder{color:rgba(248,194,44,0.5);}&::-webkit-outer-spin-button,&::-webkit-inner-spin-button{-webkit-appearance:none;margin:0;}']);function eU(e){let{isPastMaturityDate:t}=e;return t?(0,i.jsxs)(eH,{children:[(0,i.jsx)(e_,{children:"Tranche A is complete"}),(0,i.jsx)(eO,{children:"You can no longer invest in Tranche A. Tune in for future tranches!"})]}):(0,i.jsxs)(eH,{children:[(0,i.jsx)(e_,{children:"How Tranche A Works"}),(0,i.jsx)(eO,{children:"Tranche A utilizes a conservative approach with minimal lock-up, delivering moderate ETH-denominated returns."})]})}let eH=o.ZP.div.withConfig({componentId:"sc-74dbb985-0"})([""," gap:0.75rem;padding:1rem;background:#1a3d4f;width:100%;"],(0,a.fU)("column","flex-start","stretch")),e_=o.ZP.h4.withConfig({componentId:"sc-74dbb985-1"})(["margin:0;font-size:14px;color:#f8c22c;"]),eO=o.ZP.p.withConfig({componentId:"sc-74dbb985-2"})(["margin:0;font-size:12px;line-height:1.65;color:rgb(246,255,255);"]);function eY(e){let{children:t,content:n}=e,[r,o]=(0,l.useState)(!1);return(0,i.jsxs)(eV,{children:[(0,i.jsx)(eX,{onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),children:t}),r&&(0,i.jsx)(eq,{children:(0,i.jsx)(eW,{children:n})})]})}let eV=o.ZP.div.withConfig({componentId:"sc-5e5f64d2-0"})(["position:relative;display:inline-block;"]),eX=o.ZP.div.withConfig({componentId:"sc-5e5f64d2-1"})(["display:inline-block;"]),eq=o.ZP.div.withConfig({componentId:"sc-5e5f64d2-2"})(['position:absolute;z-index:10;width:250px;background-color:#1a3d4f;border:2px solid #f8c22c;border-radius:4px;padding:12px;bottom:100%;left:50%;transform:translateX(-50%);margin-bottom:8px;box-shadow:0 4px 8px rgba(0,0,0,0.3);&::before{content:"";position:absolute;bottom:-8px;left:50%;transform:translateX(-50%);border-width:8px 8px 0 8px;border-style:solid;border-color:#f8c22c transparent transparent transparent;}&::after{content:"";position:absolute;bottom:-6px;left:50%;transform:translateX(-50%);border-width:6px 6px 0 6px;border-style:solid;border-color:#1a3d4f transparent transparent transparent;}']),eW=o.ZP.p.withConfig({componentId:"sc-5e5f64d2-3"})(["margin:0;color:rgb(246,255,255);font-size:12px;line-height:1.8;"]),eK=(0,n(7073).U)(e=>({isMichaelHovered:!1,setMichaelHovered:t=>e({isMichaelHovered:t})})),eJ=o.ZP.div.withConfig({componentId:"sc-d3e021a4-0"})([""," gap:1.5rem;width:100%;
1"],(0,a.fU)("column","flex-start","stretch")),eQ=o.ZP.h3.withConfig({componentId:"sc-d3e021a4-1"})(["margin:0;font-size:18px;color:#f8c22c;text-align:center;"]);var e0=e=>{var t,n,r,o,a,s,c,d,u,h;let{handleBack:m}=e,[g,x]=(0,l.useState)(""),[b,v]=(0,l.useState)(""),[w,j]=(0,l.useState)(!1),I=eK(e=>e.setMichaelHovered),{address:k}=(0,P.m)(),{data:y,isLoading:A,refetch:Z}=O(),{data:T,isLoading:B,refetch:$}=Y(k),{data:D}=V(),{data:N}=H(k),{deposit:M,isPending:R,isConfirmed:z}=q(function(){x(""),v(""),$(),Z()}),{approve:G,isPending:F,isConfirmed:E}=X(),{claim:L,isPending:U}=W(),{data:_}=(0,C.u)({address:S.tF,abi:S.RB,functionName:"balanceOf",args:k?[k]:void 0,query:{enabled:!!k}}),K={id:1,name:"Tranche A",apy:y?"400%":"0%",minInvestment:"1 BIG",lockupPeriod:function(e){if(!e)return"Unknown";let t=new Date(e).getTime(),n=Date.now();return"".concat(Math.ceil((t-n)/864e5)," Days")}(null==y?void 0:y.maturityDate),maturityDate:null!==(t=null==y?void 0:y.maturityDate)&&void 0!==t?t:"",isAvailable:null===(n=null==y?void 0:y.isAvailable)||void 0===n||n,payOutAsset:"ETH",maxCap:null!==(r=null==y?void 0:y.maxCap)&&void 0!==r?r:"0 BIG",filledAmount:null!==(o=null==y?void 0:y.totalDeposits)&&void 0!==o?o:"0 BIG"},J={amount:null!==(a=null==T?void 0:T.amount)&&void 0!==a?a:"0 BIG",startDate:new Date().toISOString().split("T")[0],projectedPayout:null!==(s=null==T?void 0:T.projectedPayout)&&void 0!==s?s:"0 ETH",nextPayoutDate:null!==(c=null==T?void 0:T.nextPayoutDate)&&void 0!==c?c:new Date().toISOString(),ethReceived:null!==(d=null==T?void 0:T.ethReceived)&&void 0!==d?d:"0 ETH",bigReceived:null!==(u=null==T?void 0:T.bigReceived)&&void 0!==u?u:"0 BIG"},Q=!!(h=K.maturityDate)&&new Date(h).getTime()<Date.now(),ee=R||F,et=function(e){if(!e.maxCap||!e.filledAmount)return!1;let t=parseFloat(e.maxCap.replace(/[^0-9.]/g,""));return parseFloat(e.filledAmount.replace(/[^0-9.]/g,""))>=t}(K),{isValid:en,errorMessage:ei}=function(e){var t,n,i;let{investmentAmount:r,bigTokenBalance:o,trancheData:a,userInvestmentData:s,isPastMaturityDate:c}=e;if(!r)return{isValid:!1,errorMessage:"Please enter a valid amount"};let l=parseFloat(r);return l<1?{isValid:!1,errorMessage:"You need to input at least 1 BIG to invest in this tranche"}:o&&o>=BigInt(Math.floor(1e18*l))?!function(e){if(!e.maxCap||!e.filledAmount)return!1;let t=parseFloat(e.maxCap.replace(/[^0-9.]/g,""));return parseFloat(e.filledAmount.replace(/[^0-9.]/g,""))>=t}(a)?!function(e,t){if(!t.maxCap||!t.filledAmount||!e)return!1;let n=parseFloat(t.maxCap.replace(/[^0-9.]/g,""));return parseFloat(t.filledAmount.replace(/[^0-9.]/g,""))+parseFloat(e)>n}(r,a)?(t=r,parseFloat((null!==(i=null==(n=s)?void 0:n.amount)&&void 0!==i?i:"0").replace(/[^0-9.]/g,""))+parseFloat(t)>2500)?{isValid:!1,errorMessage:"the max total is 2500 BIG per user. Your current stake is ".concat((null==s?void 0:s.amount)||"0 BIG")}:c?{isValid:!1,errorMessage:"This tranche has matured and is no longer available"}:{isValid:!0,errorMessage:""}:{isValid:!1,errorMessage:"Your stake amount would exceed the maximum cap for this tranche"}:{isValid:!1,errorMessage:"The maximum cap for this tranche has been reached"}:{isValid:!1,errorMessage:"You don't have enough BIG tokens for this stake"}}({investmentAmount:g,bigTokenBalance:_,trancheData:K,userInvestmentData:T,isPastMaturityDate:Q});(0,l.useEffect)(()=>{D&&g&&j(D>=BigInt(Math.floor(1e18*parseFloat(g))))},[D,g]),(0,l.useEffect)(()=>{E&&j(!0)},[E]);let er=function(e){let{maxCapReached:t,setMichaelHovered:n,investmentAmount:r,isProcessing:o,isValid:a,buttonText:s,handleInvest:c}=e;return t?(0,i.jsx)("div",{}):(0,i.jsx)(f.m,{$primary:!0,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),disabled:!r||1>parseFloat(r)||o||!a,onClick:c,children:s})}({maxCapReached:et,setMichaelHovered:I,investmentAmount:g,isProcessing:ee,isValid:en,buttonText:ee?"Processing...":w&&z?"Staking Successful":w&&!z?"Stake":"Approve BIG",handleInvest:function(){g&&(w?M(g):G(g))}}),eo=!N&&T?(0,i.jsx)(f.m,{$primary:!0,onClick:function(){L()},children:"Claim"}):(0,i.jsx)("div",{}),ea=!en;return A||B?(0,i.jsx)(eJ,{children:(0,i.jsx)(eQ,{children:"Loading Tranche Data..."})}):(0,i.jsxs)(eJ,{children:[(0,i.jsx)(eQ,{children:"Tranche A"}),(0,i.jsx)(ey,{trancheData:K,userInvestment:J}),(0,i.jsx)(e$,{maxCap:K.maxCap,filledAmount:K.filledAmount}),!et&&!Q&&(0,i.jsx)(eG,{rawInvestmentAmount:b,rawSetInvestmentAmount:v,onInvestmentChange:function(e){x(e)}}),(0,i.jsx)(eU,{isPastMaturityDate:Q}),(0,i.jsxs)(p,{children:[Q?eo:ea?(0,i.jsx)(eY,{content:ei,children:er}):er,(0,i.jsx)(f.m,{onClick:m,children:"Go Back"})]})]})},e1=n(29472);function e5(e){let{isVisible:t}=e,{setModalState:n}=(0,r.a)(),[o,a]=(0,l.useState)("main"),[d,u]=(0,l.useState)(null);(0,e1.p)(t);let h=()=>{a("main"),u(null)},p=eK(e=>e.isMichaelHovered);return(0,i.jsxs)(s.F,{isVisible:t,children:[(0,i.jsx)(c.Z,{children:(0,i.jsxs)(e2,{children:[(0,i.jsx)(e4,{children:"BIG Staking"}),"main"===o&&null===d?(0,i.jsx)(ec,{handleTrancheClick:e=>{e.isAvailable&&(u(e),a("tranche-detail"))},setModalState:n}):(null==d?void 0:d.name)==="Tranche A"?(0,i.jsx)(e0,{handleBack:h}):(0,i.jsx)(m,{handleBack:h,selectedTranche:d})]})}),(0,i.jsx)(e6,{$isHovered:p,src:"/images/michael.png"})]})}let e2=o.ZP.div.withConfig({componentId:"sc-e4aa7db8-0"})([""," gap:1.5rem;padding:12px 8px;color:rgb(246,255,255);
1"],(0,a.fU)("column","flex-start","stretch")),e4=o.ZP.h2.withConfig({componentId:"sc-e4aa7db8-1"})(["text-align:center;margin:0;font-size:16px;letter-spacing:1px;"]),e6=o.ZP.img.withConfig({componentId:"sc-e4aa7db8-2"})(["width:100px;position:absolute;top:0;z-index:-1;transform:",";transition:transform 0.265s ease-in-out;"],e=>e.$isHovered?"translateY(-100px)":"none")}}]);
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.