1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7353],{73940:function(e,t,n){n.d(t,{R3:function(){return r},qk:function(){return o},vh:function(){return i},yJ:function(){return l}});var l=6e4,i=36e5,o=1e3,r=3600},88133:function(e,t,n){n.d(t,{Z:function(){return s}});var l=n(73940),i=n(23309),o=n(4175),r=n(50255);function s(e,t,n){(0,o.Z)(2,arguments);var s=(0,i.Z)(e,t)/l.vh;return(0,r.u)(null==n?void 0:n.roundingMethod)(s)}},25004:function(e,t,n){n.d(t,{L:function(){return i},Z:function(){return k}});var l,i,o=n(97458),r=n(4586),s=n(91834),a=n(35963),d=n(38435),c=n(43748),u=n(46905),x=n(30303),m=n(30202),h=n(33077);let p={},Z=()=>{var e,t,n,l,i;return!(null==window?void 0:null===(e=window.ethereum)||void 0===e?void 0:e.isSafePal)&&((null==window?void 0:null===(t=window.ethereum)||void 0===t?void 0:t.isMetaMask)||(null==window?void 0:null===(n=window.ethereum)||void 0===n?void 0:n.isTrust)||(null==window?void 0:null===(l=window.ethereum)||void 0===l?void 0:l.isCoinbaseWallet)||(null==window?void 0:null===(i=window.ethereum)||void 0===i?void 0:i.isTokenPocket))};(l=i||(i={}))[l.NO_TEXT=0]="NO_TEXT",l[l.TEXT=1]="TEXT",l[l.TEXT_WITH_ASSET=2]="TEXT_WITH_ASSET";let j={Binance:s.Z,"Coinbase Wallet":a.Z,Opera:d.Z,TokenPocket:c.Z,"Trust Wallet":u.Z,MetaMask:x.Z},f=(e,t,n)=>e!==i.NO_TEXT&&(e===i.TEXT?n("Add to Wallet"):n("Add %asset% to Wallet",{asset:t})),v=(e,t)=>{var n,l,i,r;let s={width:"16px",...e&&{ml:e}};if(t&&j[t]){let e=j[t];return(0,o.jsx)(e,{...s})}return(null==window?void 0:null===(n=window.ethereum)||void 0===n?void 0:n.isTrust)?(0,o.jsx)(u.Z,{...s}):(null==window?void 0:null===(l=window.ethereum)||void 0===l?void 0:l.isCoinbaseWallet)?(0,o.jsx)(a.Z,{...s}):(null==window?void 0:null===(i=window.ethereum)||void 0===i?void 0:i.isTokenPocket)?(0,o.jsx)(c.Z,{...s}):(null==window||null===(r=window.ethereum)||void 0===r||r.isMetaMask,(0,o.jsx)(x.Z,{...s}))},g=e=>{let{tokenAddress:t,tokenSymbol:n,tokenDecimals:l,tokenLogo:s,textOptions:a=i.NO_TEXT,marginTextBetweenLogo:d="0px",...c}=e,{t:u}=(0,r.Z)(),{connector:x,isConnected:j}=(0,h.mA)(),g=Z();return(!x||"Binance"!==x.name)&&x&&x.watchAsset&&j&&g?(0,o.jsxs)(m.Z,{...c,onClick:()=>{var e;let i=s?p[s]?void 0:s:void 0;null===(e=x.watchAsset)||void 0===e||e.call(x,{address:t,symbol:n,image:i,decimals:l})},children:[f(a,n,u),v(d,null==x?void 0:x.name)]}):null};var k=g},3945:function(e,t,n){n.d(t,{H:function(){return s},q:function(){return a}});var l=n(20030),i=n(12812),o=n(6988),r=n(60717);function s(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:r.A.V3,l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";return`/info${n===r.A.V3?"/v3":""}${o.Dw[e]}/tokens/${t}?chain=${i.MS[e]}${l.replace("?","&")}`}function a(e){switch(e){case l.a_.BSC:return"BSC";case l.a_.ETHEREUM:return"ETH";case l.a_.ALL:default:return"ALL"}}},62175:function(e,t,n){var l,i=n(97458),o=n(50353),r=n(10863),s=n(74057),a=n(21699),d=n(33077);t.Z=(l=o.y,e=>{var t,n;let{address:o}=(0,d.mA)(),c=(0,s.je)(),{shouldShowBlockCountdown:u,hasPoolStarted:x}=(0,a.zy)(e.pool,c),m=null!==(n=null===(t=r.Y[e.pool.vaultKey])||void 0===t?void 0:t.autoCompoundFrequency)&&void 0!==n?n:0;return(0,i.jsx)(l,{...e,shouldShowApr:x||!u,account:o,autoCompoundFrequency:m})})},23130:function(e,t,n){var l=n(97458),i=n(26909),o=n(25149),r=n(4586),s=n(88133),a=n(71421),d=n(52832),c=n(21699);let u=e=>{let{pool:t,account:n}=e,{t:u,currentLanguage:{locale:x}}=(0,r.Z)(),{earningTokenPrice:m}=t,{pricePerFullShare:h,userData:p}=(0,a.eB)(t.vaultKey),{autoCakeToDisplay:Z,autoUsdToDisplay:j}=(0,c.UN)(n,p.cakeAtLastUserAction,p.userShares,h,m,t.vaultKey===d.om.CakeVault?p.currentPerformanceFee.plus(p.currentOverdueFee).plus(p.userBoostedShare):null),f=p.lastUserActionTime?1e3*parseInt(p.lastUserActionTime):0,v=(0,s.Z)(Date.now(),f),g=v?Z/v:0,k=v?j/v:0;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(i.Z,{children:[u("Earned since your last action"),":"]}),(0,l.jsx)(i.Z,{bold:!0,children:new Date(f).toLocaleString(x,{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1})}),v?(0,l.jsxs)(o.ZP,{mt:"12px",children:[(0,l.jsxs)(i.Z,{children:[u("Hourly Average"),":"]}),(0,l.jsxs)(i.Z,{bold:!0,children:[g<.01?"<0.01":g.toFixed(2)," HYDX",(0,l.jsxs)(i.Z,{display:"inline-block",ml:"5
1px",children:["(",k<.01?"<0.01":`~${k.toFixed(2)}`," USD)"]})]})]}):null,(0,l.jsx)(o.ZP,{mt:"12px",children:(0,l.jsx)(i.Z,{children:u("*Please note that any deposit, withdraw, extend or convert action will combine earned rewards with the original staked amount. Resetting this number to 0.")})})]})};t.Z=u},58859:function(e,t,n){n.d(t,{Z:function(){return f}});var l=n(97458),i=n(57670),o=n(26909),r=n(33932),s=n(95193),a=n(33077),d=n(4586),c=n(11545),u=n(4175),x=n(73940),m=n(71421),h=n(69571),p=n(60506);let Z=e=>{let{secondsRemaining:t}=e,{t:n}=(0,d.Z)(),{days:i,hours:r,minutes:s}=(0,p.Z)(t);return(0,l.jsx)(o.Z,{bold:!0,fontSize:"14px",children:n("%day%d:%hour%h:%minute%m",{day:i,hour:r,minute:s})})},j=e=>{let{isTableVariant:t,vaultKey:n}=e,{t:p}=(0,d.Z)(),{address:j}=(0,a.mA)(),{userData:{lastDepositedTime:f,userShares:v},fees:{withdrawalFee:g,withdrawalFeePeriod:k}}=(0,m.eB)(n),b=g/100||"-",w=k?(0,h.Ch)(k):"-",{targetRef:S,tooltip:y,tooltipVisible:T}=(0,i.Z)((0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(o.Z,{bold:!0,mb:"4px",children:p("Unstaking fee: %fee%%",{fee:b})}),(0,l.jsx)(o.Z,{children:p("Only applies within %num% days of staking. Unstaking after %num% days will not include a fee. Timer resets every time you stake new HYDX in the pool.",{num:w})})]}),{placement:"bottom-start"}),{secondsRemaining:C,hasUnstakingFee:P}=(0,c.Z)(parseInt(f,10),v,k),A=f&&!P&&v.gt(0),D=j&&f&&P,I=k?function(e){return(0,u.Z)(1,arguments),Math.floor(e/x.R3)}(k):"-";return(0,l.jsxs)(r.Z,{alignItems:t?"flex-start":"center",justifyContent:"space-between",flexDirection:t?"column":"row",children:[T&&y,(0,l.jsxs)(s.Z,{ref:S,small:!0,textTransform:"lowercase",children:[A?"0":b,"% ",A?p("Unstaking Fee"):D?p("unstaking fee before"):p("unstaking fee if withdrawn within %num%h",{num:I})]}),D&&(0,l.jsx)(Z,{secondsRemaining:C})]})};var f=j},90454:function(e,t,n){n.d(t,{Z:function(){return G}});var l=n(97458),i=n(52983),o=n(27144),r=n(30202),s=n(33932),a=n(26909),d=n(40968),c=n(47473),u=n(56828),x=n(48162),m=n(8737),h=n(27131),p=n(68192),Z=n(58733),j=n(25149),f=n(82955),v=n(33077),g=n(4586),k=n(83018),b=n(37745),w=n(71421),S=n(66840),y=n(71040),T=n(51773),C=n(17206),P=n(11545),A=n(17921),D=n(81379),I=n(22459),L=n(31219),F=n(52832),E=n(3944),B=n(34898),z=n(10863),M=n(12286),N=n(29063),H=n(85546),Y=n(84534),$=n(99134),K=n(98072),U=n(57670),R=n(95193),W=n(69571),X=n(58859);let V=e=>{let{stakingTokenSymbol:t,stakeAmount:n,vaultKey:i}=e,{t:o}=(0,g.Z)(),{fees:{withdrawalFee:r,withdrawalFeePeriod:d},userData:{lastDepositedTime:c}}=(0,w.eB)(i),u=r/100,x=(parseFloat(n)*(u/100)).toFixed(4),m=d?(0,W.Ch)(d):"-",{targetRef:h,tooltip:p,tooltipVisible:Z}=(0,U.Z)((0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(a.Z,{bold:!0,mb:"4px",children:o("Unstaking fee: %fee%%",{fee:u})}),(0,l.jsx)(a.Z,{children:o("Only applies within %num% days of staking. Unstaking after %num% days will not include a fee. Timer resets every time you stake new HYDX in the pool.",{num:m})})]}),{placement:"top-start"}),j=c&&(0,P.D)(parseInt(c,10),d);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(s.Z,{mt:"24px",alignItems:"center",justifyContent:"space-between",children:[Z&&p,(0,l.jsx)(R.Z,{ref:h,small:!0,children:o("Unstaking Fee")}),(0,l.jsxs)(a.Z,{fontSize:"14px",children:[n&&j?x:"-"," ",t]})]}),(0,l.jsx)(X.Z,{vaultKey:i})]})};var O=n(21699);let _=(0,o.ZP)(r.Z).withConfig({componentId:"sc-e5aa7b21-0"})` 2 flex-grow: 1; 3`,q=(0,o.ZP)(s.Z).withConfig({componentId:"sc-e5aa7b21-1"})` 4 cursor: pointer; 5`,J=(0,o.ZP)(a.Z).withConfig({componentId:"sc-e5aa7b21-2"})` 6 width: 72px; 7 max-width: 72px; 8 overflow: hidden; 9 text-align: right; 10 text-overflow: ellipsis; 11`,Q=e=>{let{pool:t,stakingMax:n,performanceFee:o,isRemovingStake:U=!1,onDismiss:R}=e,W=(0,k.TL)(),{chainId:X}=(0,N.g)(),{stakingToken:Q,stakingTokenPrice:G,earningTokenPrice:ee,vaultKey:et}=t,{address:en}=(0,v.mA)(),{fetchWithCatchTxError:el,loading:ei}=(0,I.Z)(),eo=(0,T.Ak)(t.vaultKey),{callWithGasPrice:er}=(0,H.d)(),{pricePerFullShare:es,userData:{lastDepositedTime:ea,userShares:ed,balance:{cakeAsBigNumber:ec,cakeAsNumberBalance:eu}}}=(0,w.eB)(t.vaultKey),{t:ex}=(0,g.Z)(),{theme:em}=(0,C.ZP)(),{toastSuccess:eh}=(0,d.p)(),[ep,eZ]=(0,i.useState)(""),[ej,ef]=(0,i.useState)(0),[ev,eg]=(0,i.useState)(!1),{hasUnstakingFee:ek}=(0,P.Z)(parseInt(ea,10),ed),eb=(0,b.Nj)(),ew=new A.Z(ep).times(eb),eS=eb.gt(0)&&ep?(0,D.uf)(ew.toNumber()):"",{flexibleApy:ey}=(0,S.o)(),{allowance:eT,setLastUpdated:eC}=(0,y.dI)(et),{handleApprove:eP,pendingTx:eA}=(0,y.Le)(et,eC),eD=(0,i.useMemo)(()=>
11{if(!U){let e=(0,D.Qe)(new A.Z(ep));return e.gt(eT)}return!1},[eT,ep,U]),eI={gas:z.Y[t.vaultKey].gasLimit},eL=(0,E.A1)({principalInUSD:ew.isNaN()?0:ew.toNumber(),apr:+ey,earningTokenPrice:ee,performanceFee:o,compoundFrequency:0}),eF=eL[3]*t.earningTokenPrice,eE=(0,D.uf)(eF,eF>1e4?0:2,eF>1e4?0:2),eB=Q.address?`/swap?outputCurrency=${Q.address}`:"/swap",ez=(0,D.Qe)(new A.Z(ep),Q.decimals),eM=e=>{if(e){let t=new A.Z(e).multipliedBy((0,M.t)(Q.decimals)),l=Math.floor(t.dividedBy(n).multipliedBy(100).toNumber());ef(l>100?100:l)}else ef(0);eZ(e)},eN=(0,i.useCallback)(e=>{if(e>0){let t=n.dividedBy(100).multipliedBy(e),l=(0,D.NJ)(t,Q.decimals,Q.decimals);eZ(l)}else eZ("");ef(e)},[n,Q.decimals]),eH=async()=>{let e=n.minus(ez).lte(O.dF),i=await el(()=>{if(e)return er(eo,"withdrawAll",void 0,eI);if(t.vaultKey===F.om.CakeFlexibleSideVault){let{sharesAsBigNumber:e}=(0,O.CE)(ez,es);return er(eo,"withdraw",[parseInt(e.toString())],eI)}return er(eo,"withdrawByAmount",[ez.toString()],eI)});(null==i?void 0:i.status)&&(eh(ex("Unstaked!"),(0,l.jsx)(B.Y,{txHash:i.transactionHash,children:ex("Your earnings have also been harvested to your wallet")})),null==R||R(),W((0,L.x$)({account:en,chainId:X})))},eY=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=await el(()=>{let n=t.vaultKey===F.om.CakeVault?[e.toString()]:[],l=[ez.toString(),...n];return er(eo,"deposit",l,eI)});(null==n?void 0:n.status)&&(eh(ex("Staked!"),(0,l.jsx)(B.Y,{txHash:n.transactionHash,children:ex("Your funds have been staked in the pool")})),null==R||R(),W((0,L.x$)({account:en,chainId:X})))},e$=async()=>{U?eH():eY()};return ev?(0,l.jsx)($.E,{pool:t,linkLabel:ex("Get %symbol%",{symbol:Q.symbol}),linkHref:eB,stakingTokenBalance:ec.plus(n),onBack:()=>eg(!1),initialValue:ep,performanceFee:o}):(0,l.jsxs)(c.ZP,{title:U?ex("Unstake"):ex("Stake in Pool"),onDismiss:R,headerBackground:em.colors.gradientCardHeader,children:[(0,l.jsxs)(s.Z,{alignItems:"center",justifyContent:"space-between",mb:"8px",children:[(0,l.jsxs)(a.Z,{bold:!0,children:[U?ex("Unstake"):ex("Stake"),":"]}),(0,l.jsxs)(s.Z,{alignItems:"center",minWidth:"70px",children:[(0,l.jsx)(u.Z,{src:`/images/tokens/${Y.xs[X]}/${Q.address.toLowerCase()}.png`,width:24,height:24,alt:Q.symbol}),(0,l.jsx)(a.Z,{ml:"4px",bold:!0,children:Q.symbol})]})]}),(0,l.jsx)(x.Z,{value:ep,isWarning:eD,onUserInput:eM,currencyValue:eb.gt(0)&&`~${eS||0} USD`,decimals:Q.decimals}),eD&&(0,l.jsx)(a.Z,{color:"failure",textAlign:"right",fontSize:"12px",mt:"8px",children:ex('Insufficient token allowance. Click "Enable" to approve.')}),(0,l.jsx)(a.Z,{color:"textSubtle",textAlign:"right",fontSize:"12px",m:"8px 0",children:ex("Balance: %balance%",{balance:(0,D.NJ)(n,Q.decimals)})}),(0,l.jsx)(m.Z,{min:0,max:100,value:ej,onValueChanged:eN,name:"stake",valueLabel:`${ej}%`,step:1}),(0,l.jsxs)(s.Z,{alignItems:"center",justifyContent:"space-between",mt:"8px",children:[(0,l.jsx)(_,{scale:"xs",mx:"2px",p:"4px 16px",variant:"tertiary",onClick:()=>eN(25),children:"25%"}),(0,l.jsx)(_,{scale:"xs",mx:"2px",p:"4px 16px",variant:"tertiary",onClick:()=>eN(50),children:"50%"}),(0,l.jsx)(_,{scale:"xs",mx:"2px",p:"4px 16px",variant:"tertiary",onClick:()=>eN(75),children:"75%"}),(0,l.jsx)(_,{scale:"xs",mx:"2px",p:"4px 16px",variant:"tertiary",onClick:()=>eN(100),children:ex("Max")})]}),U&&ek&&(0,l.jsx)(V,{vaultKey:et,stakingTokenSymbol:Q.symbol,stakeAmount:ep}),!U&&(0,l.jsxs)(s.Z,{mt:"24px",alignItems:"center",justifyContent:"space-between",children:[(0,l.jsxs)(a.Z,{mr:"8px",color:"textSubtle",children:[ex("Annual ROI at current rates"),":"]}),Number.isFinite(eF)?(0,l.jsxs)(q,{alignItems:"center",onClick:()=>{eg(!0)},children:[(0,l.jsxs)(J,{children:["$",eE]}),(0,l.jsx)(h.Z,{variant:"text",scale:"sm",children:(0,l.jsx)(p.Z,{color:"textSubtle",width:"18px"})})]}):(0,l.jsx)(Z.Z,{width:60})]}),t.vaultKey===F.om.CakeVault&&eu?(0,l.jsx)(j.ZP,{mt:"8px",maxWidth:"370px",children:(0,l.jsx)(K.Z,{stakingToken:Q,stakingTokenPrice:G,currentStakedAmount:eu})}):null,eD?(0,l.jsx)(r.Z,{isLoading:eA,endIcon:eA?(0,l.jsx)(f.Z,{spin:!0,color:"currentColor"}):null,onClick:eP,mt:"24px",children:ex("Enable")}):(0,l.jsx)(r.Z,{isLoading:ei,endIcon:ei?(0,l.jsx)(f.Z,{spin:!0,color:"currentColor"}):null,onClick:e$,disabled:!ep||0===parseFloat(ep)||n.lt(ez),mt:"24px",children:ei?ex("Confirming"):ex("Confirm")}),!U&&(0,l.jsx)(r.Z,{mt:"8px",as:"a",external:!0,href:eB,variant:"secondary",children:ex("Add %symbol%",{symbol:Q.symbol})})]})};var G=Q},14269:function(e,t,n){n.d(t,{_:function(){return eg},Z:function(){return eb}});var l=n(97458),i=n(98245),o=n(73208),r=n(30202),s=n(97649),a=n(25149),d=n(33932),c=n(26909),u=n(89755),x=n(50641),m=n(44826),h=n(58733),p=n(33077),Z=n(71645),j=n(10863),f=n(4586),v=n(71421),g=n(52832),k=n(27144),b=n(26646),w=n(86718),S=n(6022),y=n(14271),T=n(87380),C=n(58859),P=n(37745),A=n(21699),D=n(57670),I=n(95193),L=n(6126),F=n(23130);let E=e=>{let{cakeToDisplay:t,pool:n,account:i}
11=e,{targetRef:o,tooltip:r,tooltipVisible:s}=(0,D.Z)((0,l.jsx)(F.Z,{pool:n,account:i}),{placement:"bottom-end"});return(0,l.jsxs)(l.Fragment,{children:[s&&r,(0,l.jsx)(I.Z,{ref:o,small:!0,children:(0,l.jsx)(L.Z,{fontSize:"14px",value:t})})]})},B=e=>{let{pool:t}=e,{t:n}=(0,f.Z)(),{address:i}=(0,p.mA)(),{pricePerFullShare:o,userData:r}=(0,v.eB)(t.vaultKey),s=(0,P.Nj)(),{hasAutoEarnings:a,autoCakeToDisplay:u}=(0,A.UN)(i,r.cakeAtLastUserAction,r.userShares,o,s.toNumber(),t.vaultKey===g.om.CakeVault?r.currentPerformanceFee.plus(r.currentOverdueFee):null);return r.userShares.gt(0)&&i?(0,l.jsxs)(d.Z,{alignItems:"center",justifyContent:"space-between",children:[(0,l.jsx)(c.Z,{fontSize:"14px",children:`${n("Recent HYDX profit")}:`}),a&&(0,l.jsx)(E,{cakeToDisplay:u,pool:t,account:i})]}):null};var z=n(68192),M=n(91616),N=n(66840),H=n(52983),Y=n(99134);let $=(0,k.ZP)(d.Z).withConfig({componentId:"sc-76707f7a-0"})` 12 &:hover { 13 opacity: 0.5; 14 } 15`,K=(0,H.memo)(e=>{let{pool:t}=e,{t:n}=(0,f.Z)(),{flexibleApy:i,lockedApy:a}=(0,N.o)(),[u]=(0,o.Z)((0,l.jsx)(Y.E,{pool:t})),[x]=(0,o.Z)((0,l.jsx)(Y.E,{pool:t,initialView:1}));return(0,l.jsxs)(M.m5,{children:[(0,l.jsxs)(d.Z,{alignItems:"center",justifyContent:"space-between",children:[(0,l.jsxs)(c.Z,{color:"textSubtle",textTransform:"uppercase",bold:!0,fontSize:"12px",children:[n("Flexible")," APY:"]}),i?(0,l.jsxs)($,{alignItems:"center",justifyContent:"flex-start",children:[(0,l.jsx)(L.Z,{fontSize:"16px",value:parseFloat(i),decimals:2,unit:"%",bold:!0}),(0,l.jsx)(r.Z,{onClick:e=>{e.stopPropagation(),u()},variant:"text",width:"20px",height:"20px",padding:"0px",marginLeft:"4px",children:(0,l.jsx)(z.Z,{color:"textSubtle",width:"20px"})})]}):(0,l.jsx)(h.Z,{width:"80px",height:"16px"})]}),t.vaultKey===g.om.CakeVault&&(0,l.jsxs)(d.Z,{alignItems:"center",justifyContent:"space-between",children:[(0,l.jsxs)(c.Z,{color:"textSubtle",textTransform:"uppercase",bold:!0,fontSize:"12px",children:[n("Locked")," APR:"]}),a?(0,l.jsxs)(s.Z,{gap:"4px",flexWrap:"wrap",justifyContent:"flex-end",children:[(0,l.jsx)(c.Z,{style:{whiteSpace:"nowrap"},bold:!0,children:n("Up to")}),(0,l.jsxs)($,{alignItems:"center",children:[(0,l.jsx)(L.Z,{fontSize:"16px",value:parseFloat(a),decimals:2,unit:"%",bold:!0}),(0,l.jsx)(r.Z,{onClick:e=>{e.stopPropagation(),x()},variant:"text",width:"20px",height:"20px",padding:"0px",marginLeft:"4px",children:(0,l.jsx)(z.Z,{color:"textSubtle",width:"20px"})})]})]}):(0,l.jsx)(h.Z,{width:"80px",height:"16px"})]})]})});var U=n(17921),R=n(90239),W=n(82955),X=n(71040);let V=e=>{let{vaultKey:t,isLoading:n=!1,setLastUpdated:i}=e,{t:o}=(0,f.Z)(),{handleApprove:s,pendingTx:a}=(0,X.Le)(t,i);return(0,l.jsx)(l.Fragment,{children:n?(0,l.jsx)(h.Z,{width:"100%",height:"52px"}):(0,l.jsx)(r.Z,{isLoading:a,endIcon:a?(0,l.jsx)(W.Z,{spin:!0,color:"currentColor"}):null,disabled:a,onClick:s,width:"100%",children:o("Enable")})})};var O=n(51871),_=n(74847),q=n(90454),J=n(71129),Q=n(27131),G=n(77673),ee=n(69656),et=n(81379),en=n(98072);let el=e=>{let{pool:t,stakingTokenBalance:n,performanceFee:i}=e,{userData:{balance:{cakeAsBigNumber:r,cakeAsNumberBalance:s}}}=(0,v.eB)(t.vaultKey),{stakingToken:u,stakingTokenPrice:x}=t,m=(0,P.Nj)(),p=m.gt(0)?(0,et.mW)(r.multipliedBy(m),u.decimals):0,[Z]=(0,o.Z)((0,l.jsx)(O.Z,{tokenSymbol:u.symbol})),[j]=(0,o.Z)((0,l.jsx)(q.Z,{stakingMax:n,performanceFee:i,pool:t})),[f]=(0,o.Z)((0,l.jsx)(q.Z,{stakingMax:r,pool:t,isRemovingStake:!0}),!0,!0,`withdraw-vault-${t.sousId}-${t.vaultKey}`);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(d.Z,{mb:"16px",justifyContent:"space-between",alignItems:"center",children:[(0,l.jsxs)(d.Z,{flexDirection:"column",children:[(0,l.jsx)(L.Z,{fontSize:"20px",bold:!0,value:s,decimals:5}),(0,l.jsx)(c.Z,{as:d.Z,fontSize:"12px",color:"textSubtle",flexWrap:"wrap",children:m.gt(0)?(0,l.jsx)(L.Z,{value:p,fontSize:"12px",color:"textSubtle",decimals:2,prefix:"~",unit:" USD"}):(0,l.jsx)(h.Z,{mt:"1px",height:16,width:64})})]}),(0,l.jsxs)(d.Z,{children:[(0,l.jsx)(Q.Z,{variant:"secondary",onClick:()=>{f()},mr:"6px",children:(0,l.jsx)(G.Z,{color:"primary",width:"24px"})}),(0,l.jsx)(Q.Z,{variant:"secondary",onClick:n.gt(0)?j:Z,children:(0,l.jsx)(ee.Z,{color:"primary",width:"24px",height:"24px"})})]})]}),t.vaultKey===g.om.CakeVault&&(0,l.jsx)(a.ZP,{mb:"16px",children:(0,l.jsx)(en.Z,{stakingToken:u,stakingTokenPrice:x,currentStakedAmount:s})})]})},ei=e=>{let{pool:t,stakingTokenBalance:n,accountHasSharesStaked:i,performanceFee:r}=e,{stakingToken:s,stakingTokenPrice:a,userDataLoaded:c}=t,[u]=(0,o.Z)((0,l.jsx)(O.Z,{tokenSymbol:s.symbol})),[x]=(0,o.Z)((0,l.jsx)(q.Z,{stakingMax:n,pool:t,performanceFee:r})),[m]=(0,o.Z)((0,l.jsx)(J.Z,{currentBalance:n,stakingToken:s,stakingTokenPrice:a,stakingTokenBalance:n}));return(0,l.jsx)(d.Z,{flexDirection:"column",children:c?i?(0,l.jsx)(el,{pool:t,stakingTokenBalance:n,performanceFee:r}):(0,l.jsx)(_.w,{onFlexibleClick:n.gt(0)?x:u,onLockedClick:t.vaultKey===g.om.CakeVault?m:null}):(0,l.jsx)(h.Z,{width:"100%",height:"52px"})})},eo=(0,k.ZP)(c.Z).withConfig({componentId:"sc-69b37aeb-0"})` 16 display: inline; 17`,er=e=>{let{pool:t,accountHasSharesStaked:n,isLoading:i,performanceFee:o}=e,{stakingToken:r,userData:s}=t,{t:c}=(0,f.Z)(),u=(null==s?void 0:s.stakingTokenBalance)?new U.Z(s.stakingTokenBalance):R.HW,{isVaultApproved:x,setLastUpdated:m}=(0,X.dI)(t.vaultKey);return(0,l.jsx)(d.Z,{flexDirection:"column",children:(0,l.jsxs)(d.Z,{flexDirection:"column",children:[(0,l.jsxs)(a.ZP,{display:"inline",children:[(0,l.jsxs)(eo,{color:n?"secondary":"textSubtle",textTransform:"uppercase",bold:!0,fontSize:"12px",children:[n?r.symbol
17:c("Stake")," "]}),(0,l.jsx)(eo,{color:n?"textSubtle":"secondary",textTransform:"uppercase",bold:!0,fontSize:"12px",children:n?c("Staked"):`${r.symbol}`})]}),x||n?(0,l.jsx)(ei,{pool:t,stakingTokenBalance:u,accountHasSharesStaked:n,performanceFee:o}):(0,l.jsx)(V,{vaultKey:t.vaultKey,isLoading:i,setLastUpdated:m})]})})};var es=n(5046),ea=n(55835),ed=n(75785),ec=n(30084),eu=n(41058),ex=n(41156);(0,k.ZP)(n(44986).Z).withConfig({componentId:"sc-6d9a7d6e-0"})` 18 display: inline; 19`;let em=()=>{let{t:e}=(0,f.Z)(),t=(0,v.cq)(),n=(0,v.dd)(),i=(0,A.XW)(n),{targetRef:o,tooltip:r,tooltipVisible:s}=(0,D.Z)((0,l.jsx)(a.ZP,{children:(0,l.jsx)(c.Z,{children:e("The number of iHYDX equals the locked staking amount if the staking duration is longer than %weeks% weeks. If the staking duration is less than %weeks% weeks, it will linearly decrease based on the staking duration.",{weeks:i})})}),{placement:"bottom-start"});return(0,l.jsxs)(d.Z,{alignItems:"center",justifyContent:"space-between",children:[s&&r,(0,l.jsx)(I.Z,{children:(0,l.jsx)(c.Z,{ref:o,color:"textSubtle",bold:!0,fontSize:"12px",children:e("iHYDX")})}),(0,l.jsx)(es.Z,{color:"text",bold:!0,fontSize:"16px",decimals:3,value:(0,et.mW)(t)})]})};var eh=n(61475),ep=n(26674),eZ=n(55124);let ej=e=>{var t;let{userData:n,showICake:i,pool:o,account:r}=e,{t:s}=(0,f.Z)(),a=(0,H.useMemo)(()=>(0,w.cP)({userShares:null==n?void 0:n.userShares,locked:null==n?void 0:n.locked,lockEndTime:null==n?void 0:n.lockEndTime}),[n]),{weekDuration:u,secondDuration:x}=(0,eh.Z)({lockStartTime:null==n?void 0:n.lockStartTime,lockEndTime:null==n?void 0:n.lockEndTime,burnStartTime:null==n?void 0:n.burnStartTime}),{lockedApy:m}=(0,N.o)({duration:x}),h=(0,H.useMemo)(()=>{var e;return(0,et.mW)(null==n?void 0:null===(e=n.balance)||void 0===e?void 0:e.cakeAsBigNumber.minus(null==n?void 0:n.cakeAtLastUserAction))},[null==n?void 0:null===(t=n.balance)||void 0===t?void 0:t.cakeAsBigNumber,null==n?void 0:n.cakeAtLastUserAction]),p=(0,H.useMemo)(()=>(0,et.NJ)(null==n?void 0:n.cakeAtLastUserAction,18,5),[null==n?void 0:n.cakeAtLastUserAction]),Z=(0,l.jsx)(ep.Z,{boostedYieldAmount:p}),{targetRef:j,tooltip:v,tooltipVisible:g}=(0,D.Z)(Z,{placement:"bottom-start"}),k=(0,et.mW)(null==n?void 0:n.lockedAmount),{targetRef:b,tooltip:S,tooltipVisible:y}=(0,D.Z)((0,l.jsx)(F.Z,{pool:o,account:r}),{placement:"bottom"});return(0,l.jsxs)(M.m5,{children:[(0,l.jsx)(eZ.Z,{pool:o,userData:n}),(0,l.jsx)(ea.Z,{}),![w.PS.LockedEnd,w.PS.AfterBurning].includes(a)&&(0,l.jsxs)(d.Z,{alignItems:"center",justifyContent:"space-between",children:[g&&v,(0,l.jsx)(I.Z,{children:(0,l.jsx)(c.Z,{ref:j,color:"textSubtle",textTransform:"uppercase",bold:!0,fontSize:"12px",children:s("APR")})}),(0,l.jsx)(es.Z,{color:"text",bold:!0,fontSize:"16px",value:parseFloat(m),decimals:2,unit:"%"})]}),(0,l.jsx)(ex.Z,{weekDuration:u}),![w.PS.LockedEnd,w.PS.AfterBurning].includes(a)&&(0,l.jsx)(eu.Z,{secondDuration:x}),(0,l.jsxs)(d.Z,{alignItems:"center",justifyContent:"space-between",children:[y&&S,(0,l.jsx)(I.Z,{children:(0,l.jsx)(c.Z,{ref:b,color:"textSubtle",textTransform:"uppercase",bold:!0,fontSize:"12px",children:s("Recent HYDX profit")})}),(0,l.jsx)(es.Z,{color:"text",bold:!0,fontSize:"16px",value:h,decimals:5})]}),a===w.PS.LockedEnd&&(0,l.jsxs)(d.Z,{alignItems:"center",justifyContent:"space-between",children:[(0,l.jsx)(c.Z,{color:"textSubtle",textTransform:"uppercase",bold:!0,fontSize:"12px",children:s("After Burning In")}),(0,l.jsx)(c.Z,{color:"failure",bold:!0,children:(0,l.jsx)(ec.Z,{lockEndTime:null==n?void 0:n.lockEndTime})})]}),a===w.PS.AfterBurning&&(0,l.jsxs)(d.Z,{alignItems:"center",justifyContent:"space-between",children:[(0,l.jsx)(c.Z,{color:"textSubtle",textTransform:"uppercase",bold:!0,fontSize:"12px",children:s("After burning")}),(0,l.jsx)(c.Z,{color:"failure",bold:!0,children:(0,ed.Z)(null==n?void 0:n.currentOverdueFee)?"-":s("%amount% Burned",{amount:(0,et.NJ)(null==n?void 0:n.currentOverdueFee,18,5)})})]}),(0,l.jsxs)(d.Z,{alignItems:"center",justifyContent:"space-between",children:[(0,l.jsx)(c.Z,{color:"textSubtle",textTransform:"uppercase",bold:!0,fontSize:"12px",children:s("Original locked amount")}),(0,l.jsx)(es.Z,{color:"text",bold:!0,fontSize:"16px",value:k,decimals:2})]}),i&&(0,l.jsx)(em,{})]})};var ef=(0,H.memo)(ej);let ev=(0,k.ZP)(i.Z).withConfig({componentId:"sc-64d0c74d-0"})` 20 min-height: ${e=>{let{isLoading:t}=e;return t?"0":"254px"}}; 21`,eg=e=>{var t;let{isLoading:n=!1,account:i,pool:u,vaultPool:x,accountHasSharesStaked:m,showICake:h,performanceFeeAsDecimal:p,defaultFooterExpanded:j}=e,{t:v}=(0,f.Z)(),{isInitialization:k}=(0,S.Z)(),[P]=(0,o.Z)((0,l.jsx)(b.Z,{pool:u,userData:null==x?void 0:x.userData}),!0,!1,"revenueModal"),A=(0,w.cP)(x.userData),D=null==x?void 0:null===(t=x.userData)||void 0===t?void 0:t.locked;return u?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(ev,{isLoading:n,children:[i&&u.vaultKey===g.om.CakeVault&&(0,l.jsx)(T.X,{userData:null==x?void 0:x.userData}),i&&u.vaultKey===g.om.CakeVault&&D?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(ef,{userData:x.userData,showICake:h,pool:u,account:i}),A===w.PS.Locked&&k&&!h&&(0,l.jsx)(r.Z,{mt:"16px",width:"100%",variant:"secondary",onClick:P,children:v("View Benefits")})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(K,{pool:u}),(0,l.jsxs)(s.Z,{mt:"16px",gap:"24px",flexDirection:m?"column-reverse":"column",children:[(0,l.jsxs)(a.ZP,{children:[i&&(0,l.jsx)(a.ZP,{mb:"8px",children:(0,l.jsx)(C.Z,{vaultKey:u.vaultKey})}),(0,l.jsx)(B,{pool:u})]}),(0,l.jsx)(d.Z,{flexDirection:"column",children:i?(0,l.jsx)(er,{pool:u,accountHasSharesStaked:m,isLoading:n,performanceFee:p}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(c.Z,{mb:"10px",textTransform:"uppercase",fontSize:"12px",color:"textSubtle",bold:!0,children:v("Start earning")}),(0,l.jsx)(Z.Z,{})]})})]})]})]}),(0,l.jsx)(y.Z,{isLocked:D,defaultExpanded:j,pool:u,account:i})]}):null},ek=e=>{let{pool:t,showStakedOnly:n,defaultFooterExpanded:i,showICake:o=!1,showSkeleton:r=!0,...s}=e,{address:a}=(0,p.mA)(),c=(0,v.eB)((null==t?void 0:t.vaultKey)||g.om.CakeVault),Z=null==t?void 0:t.totalStaked,{userData:{userShares:f,isLoading:k},fees:{performanceFeeAsDecimal:b}}=c,w=f&&f.gt(0),S=!(null==t?void 0:t.userData)||k;return t&&(!n||w)?(0,l.jsxs)(u.r,{isActive:!0,...s,children:[(0,l.jsx)(x.J,{isStaking:w,children:!r||Z&&Z.gte(0)?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(x.e,{title:j.Y[t.vaultKey].name,subTitle:j.Y[t.vaultKey].description}),(0,l.jsx)(m.Z,{...j.Y[t.vaultKey].tokenImage,width:64,height:64})]}):(0,l.jsxs)(d.Z,{width:"100%",justifyContent:"space-between",children:[(0,l.jsxs)(d.Z,{flexDirection:"column",children:[(0,l.jsx)(h.Z,{width:100,height:26,mb:"4px"}
21),(0,l.jsx)(h.Z,{width:65,height:20})]}),(0,l.jsx)(h.Z,{width:58,height:58,variant:"circle"})]})}),(0,l.jsx)(eg,{isLoading:S,account:a,pool:t,vaultPool:c,accountHasSharesStaked:w,showICake:o,performanceFeeAsDecimal:b,defaultFooterExpanded:i})]}):null};var eb=ek},30084:function(e,t,n){var l=n(97458),i=n(52983),o=n(84601),r=n(60506),s=n(61929),a=n(50692),d=n(54473),c=n(69571);let u=e=>{let{lockEndTime:t}=e,[n,u]=(0,i.useState)(0),x=(0,i.useMemo)(()=>(0,a.Z)((0,c.Eg)(t),s.by),[t]),m=(0,i.useCallback)(()=>{u((0,d.Z)(x,new Date))},[x]);(0,o.Yz)(m,6e4);let{days:h,hours:p,minutes:Z}=(0,r.Z)(n);return(0,l.jsx)(l.Fragment,{children:`${h}d: ${p}h: ${Z}m`})};t.Z=(0,i.memo)(u)},98072:function(e,t,n){var l=n(97458),i=n(48172),o=n(72953),r=n(33932),s=n(58733),a=n(4586),d=n(52983),c=n(66840),u=n(31707),x=n(38018);let m=e=>{let{stakingToken:t,stakingTokenPrice:n,currentStakedAmount:d,isInline:m}=e,{t:h}=(0,a.Z)(),{isMobile:p}=(0,i.Z)(),Z=m&&!p,{avgLockDurationsInSeconds:j}=(0,x.Z)(),{lockedApy:f}=(0,c.o)({duration:j});return(0,l.jsx)(o.Z,{variant:"warning",action:(0,l.jsx)(r.Z,{mt:!Z&&"8px",flexGrow:1,ml:Z&&"80px",children:(0,l.jsx)(u.Z,{modalTitle:h("Convert to Lock"),lockEndTime:"0",lockStartTime:"0",stakingToken:t,stakingTokenPrice:n,currentLockedAmount:d,children:h("Convert to Lock")})}),actionInline:Z,children:(0,l.jsx)(s.i,{isDataReady:!!(j&&f),wrapperProps:{height:"fit-content"},children:(0,l.jsx)(o.Y,{children:h("Lock staking users are earning an average of %amount%% APR. More benefits are coming soon.",{amount:f?parseFloat(f).toFixed(2):0})})})})};t.Z=(0,d.memo)(m)},41156:function(e,t,n){var l=n(97458),i=n(33932),o=n(26909),r=n(4586);let s=e=>{let{weekDuration:t}=e,{t:n}=(0,r.Z)();return(0,l.jsxs)(i.Z,{alignItems:"center",justifyContent:"space-between",children:[(0,l.jsx)(o.Z,{color:"textSubtle",textTransform:"uppercase",bold:!0,fontSize:"12px",children:n("Lock Duration")}),(0,l.jsx)(o.Z,{color:"text",bold:!0,fontSize:"16px",children:t})]})};t.Z=s},59896:function(e,t,n){var l=n(97458),i=n(52983),o=n(33932),r=n(25149),s=n(17921),a=n(86718),d=n(90239),c=n(4586),u=n(81379),x=n(88834),m=n(31707),h=n(21760);let p=e=>{let{userShares:t,locked:n,lockEndTime:p,lockStartTime:Z,stakingToken:j,stakingTokenBalance:f,stakingTokenPrice:v,lockedAmount:g,variant:k}=e,b=(0,i.useMemo)(()=>(0,a.cP)({userShares:t,locked:n,lockEndTime:p}),[t,n,p]),{t:w}=(0,c.Z)(),S=(0,u.mW)(g),y=(0,i.useMemo)(()=>f?new s.Z(f):d.HW,[f]);return b===a.PS.Locked?(0,l.jsxs)(o.Z,{children:[(0,l.jsx)(r.ZP,{width:"100%",mr:"4px",children:(0,l.jsx)(x.Z,{variant:k||"primary",lockEndTime:p,lockStartTime:Z,currentLockedAmount:g,stakingToken:j,currentBalance:y,stakingTokenBalance:f,stakingTokenPrice:v})}),(0,l.jsx)(r.ZP,{width:"100%",ml:"4px",children:(0,l.jsx)(m.Z,{variant:k||"primary",lockEndTime:p,lockStartTime:Z,stakingToken:j,stakingTokenPrice:v,currentBalance:y,currentLockedAmount:S,children:w("Extend")})})]}):(0,l.jsx)(h.Z,{lockEndTime:p,lockStartTime:Z,position:b,currentLockedAmount:S,stakingToken:j,stakingTokenPrice:v})};t.Z=p},26674:function(e,t,n){n.d(t,{Z:function(){return o}});var l=n(97458),i=n(4586);function o(e){let{boostedYieldAmount:t}=e,{t:n}=(0,i.Z)();return(0,l.jsxs)(l.Fragment,{children:[n("Boosted yield applies to the original locked amount: %boostedYieldAmount%",{boostedYieldAmount:t}),(0,l.jsx)("br",{}),(0,l.jsx)("br",{}),n("Calculated based on current rates and subject to change based on various external variables. It is a rough estimate provided for convenience only, and by no means represents guaranteed returns.")]})}},41058:function(e,t,n){var l=n(97458),i=n(57670),o=n(33932),r=n(95193),s=n(26909),a=n(5046),d=n(66840),c=n(4586);let u=e=>{let{secondDuration:t}=e,{boostFactor:n}=(0,d.o)({duration:t}),{t:u}=(0,c.Z)(),x=u("Your yield will be boosted based on the total lock duration of your current fixed term staking position."),{targetRef:m,tooltip:h,tooltipVisible:p}=(0,i.Z)(x,{placement:"bottom-start"});return(0,l.jsxs)(o.Z,{alignItems:"center",justifyContent:"space-between",children:[p&&h,(0,l.jsx)(r.Z,{children:(0,l.jsx)(s.Z,{ref:m,color:"textSubtle",textTransform:"uppercase",bold:!0,fontSize:"12px",children:u("Yield boost")})}),(0,l.jsx)(a.Z,{color:"text",bold:!0,fontSize:"16px",value:n?null==n?void 0:n.toString():"0",decimals:2,unit:"x"})]})};t.Z=u},55124:function(e,t,n){var l=n(97458),i=n(27144),o=n(52983),r=n(86718),s=n(57670),a=n(25149),d=n(33932),c=n(26909),u=n(5046),x=n(84612),m=n(4586),h=n(81379),p=n(59896),Z=n(61475),j=n(55977);
21let f=i.ZP.div.withConfig({componentId:"sc-605f5dbf-0"})` 22 align-self: center; 23`,v=e=>{var t,n,i;let{buttonVariant:v,pool:g,userData:k}=e,{t:b}=(0,m.Z)(),w=(0,o.useMemo)(()=>(0,r.cP)({userShares:null==k?void 0:k.userShares,locked:null==k?void 0:k.locked,lockEndTime:null==k?void 0:k.lockEndTime}),[k]),S=null==g?void 0:g.stakingToken,y=null==g?void 0:g.stakingTokenPrice,T=null==g?void 0:null===(t=g.userData)||void 0===t?void 0:t.stakingTokenBalance,C=(0,o.useMemo)(()=>{var e;return null==k?void 0:null===(e=k.balance)||void 0===e?void 0:e.cakeAsBigNumber},[null==k?void 0:null===(n=k.balance)||void 0===n?void 0:n.cakeAsBigNumber]),P=(0,h.mW)(C),A=(0,o.useMemo)(()=>{var e;return S&&y?(0,h.mW)(null==k?void 0:null===(e=k.balance)||void 0===e?void 0:e.cakeAsBigNumber.multipliedBy(y),null==S?void 0:S.decimals):null},[null==k?void 0:null===(i=k.balance)||void 0===i?void 0:i.cakeAsBigNumber,y,S]),{lockEndDate:D,remainingTime:I,burnStartTime:L}=(0,Z.Z)({lockStartTime:null==k?void 0:k.lockStartTime,lockEndTime:null==k?void 0:k.lockEndTime,burnStartTime:null==k?void 0:k.burnStartTime}),{targetRef:F,tooltip:E,tooltipVisible:B}=(0,s.Z)((0,l.jsx)(j.Z,{pool:g}),{placement:"bottom"}),z=b("After Burning starts at %burnStartTime%. You need to renew your fix-term position, to initiate a new lock or convert your staking position to flexible before it starts. Otherwise all the rewards will be burned within the next 90 days.",{burnStartTime:L}),{targetRef:M,tooltip:N,tooltipVisible:H}=(0,s.Z)(z,{placement:"bottom"});return(0,l.jsxs)(a.ZP,{children:[(0,l.jsxs)(d.Z,{justifyContent:"space-between",mb:"16px",children:[(0,l.jsxs)(a.ZP,{children:[(0,l.jsx)(c.Z,{color:"textSubtle",textTransform:"uppercase",bold:!0,fontSize:"12px",children:b("HYDX locked")}),(0,l.jsxs)(d.Z,{children:[(0,l.jsx)(u.Z,{color:"text",bold:!0,fontSize:"16px",value:P,decimals:5}),B&&E,(0,l.jsx)(f,{ref:F,children:(0,l.jsx)(x.Z,{ml:"4px",mt:"2px",width:"20px",height:"20px",color:"textSubtle"})})]}),(0,l.jsx)(u.Z,{value:A,fontSize:"12px",color:"textSubtle",decimals:2,prefix:"~",unit:" USD"})]}),(0,l.jsxs)(a.ZP,{children:[(0,l.jsx)(c.Z,{color:"textSubtle",textTransform:"uppercase",bold:!0,fontSize:"12px",children:b("Unlocks In")}),(0,l.jsxs)(d.Z,{children:[(0,l.jsx)(c.Z,{color:w>=r.PS.LockedEnd?"#D67E0A":"text",bold:!0,fontSize:"16px",children:w>=r.PS.LockedEnd?b("Unlocked"):I}),H&&N,(0,l.jsx)("span",{ref:M,children:(0,l.jsx)(x.Z,{ml:"4px",mt:"2px",width:"20px",height:"20px",color:"textSubtle"})})]}),(0,l.jsx)(c.Z,{color:w>=r.PS.LockedEnd?"#D67E0A":"text",fontSize:"12px",children:b("On %date%",{date:D})})]})]}),(0,l.jsx)(a.ZP,{mb:"16px",children:(0,l.jsx)(p.Z,{userShares:null==k?void 0:k.userShares,locked:null==k?void 0:k.locked,lockEndTime:null==k?void 0:k.lockEndTime,lockStartTime:null==k?void 0:k.lockStartTime,stakingToken:S,stakingTokenBalance:T,stakingTokenPrice:null==g?void 0:g.stakingTokenPrice,lockedAmount:C,variant:v})})]})};t.Z=v},55977:function(e,t,n){var l=n(97458),i=n(26909),o=n(25149),r=n(4586),s=n(71421),a=n(81379);let d=e=>{let{pool:t}=e,{t:n,currentLanguage:{locale:d}}=(0,r.Z)(),{userData:c}=(0,s.eB)(t.vaultKey),u=(0,a.mW)(null==c?void 0:c.lockedAmount),x=(0,a.mW)(null==c?void 0:c.lockedAmount.multipliedBy(t.stakingTokenPrice),t.stakingToken.decimals),m=u>.01?u.toFixed(2):"<0.01",h=x>.01?`~${x.toFixed(2)}`:"<0.01",p=(null==c?void 0:c.lastUserActionTime)?1e3*parseInt(null==c?void 0:c.lastUserActionTime):0;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(i.Z,{children:n("Includes both the original staked amount and rewards earned since the last deposit, withdraw, extend or convert action.")}),(0,l.jsxs)(o.ZP,{mt:"12px",children:[(0,l.jsxs)(i.Z,{children:[n("Original locked amount"),":"]}),(0,l.jsx)(i.Z,{bold:!0,children:`${m} HYDX (${h} USD)`})]}),(0,l.jsxs)(o.ZP,{mt:"12px",children:[(0,l.jsxs)(i.Z,{children:[n("Last action"),":"]}),(0,l.jsx)(i.Z,{bold:!0,children:new Date(p).toLocaleString(d,{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1})})]})]})};t.Z=d},14271:function(e,t,n){var l=n(97458),i=n(52983),o=n(27144),r=n(4586),s=n(33932),a=n(91016),d=n(84612),c=n(60542),u=n(42672),x=n(17169);let m=(0,o.ZP)(s.Z).withConfig({componentId:"sc-552a9b90-0"})` 24 align-items: center; 25 justify-content: space-between; 26 button { 27 padding: 0; 28 } 29`,h=(0,o.ZP)(s.Z).withConfig({componentId:"sc-552a9b90-1"})` 30 svg { 31 height: 14px; 32 width: 14px; 33 } 34`,p=e=>{let{pool:t,account:n,defaultExpanded:o,children:p,isLocked:Z=!1}=e,{vaultKey:j}=t,{t:f}=(0,r.Z)(),[v,g]=(0,i.useState)(o||!1);return(0,l.jsxs)(a.Z,{children:[(0,l.jsxs)(m,{children:[(0,l.jsx)(s.Z,{alignItems:"center",children:(0,l.jsx)(x.Z,{vaultKey:j,isLocked:Z,account:n,children:e=>(0,l.jsx)(s.Z,{ref:e,children:(0,l.jsx)(d.Z,{ml:"4px",width:"20px",height:"20px",color:"textSubtle"})})})}),(0,l.jsx)(c.L,{expanded:v,onClick:()=>g(!v),children:f(v?"Hide":"Details")})]}),v&&(0,l.jsx)(h,{flexDirection:"column",children:p||(0,l.jsx)(u.Z,{pool:t,account:n})})]})};t.Z=p},42672:function(e,t,n){n.d(t,{Z:function(){return z}});var l=n(97458),i=n(33932),o=n(26909),r=n(40525),s=n(18304),a=n(58733),d=n(70348),c=n(73634),u=n(25004),x=n(4586),m=n(90239),h=n(52983),p=n(74057),Z=n(71421),j=n(52832),f=n(95423),v=n(21699),g=n(29063),k=n(34239),b=n(3945),w=n(81379);let S=e=>{let{small:t=!1,stakingLimit:n,stakingLimitEndTimestamp:r,stakingToken:a,hasPoolStarted:d,endTimestamp:c}=e,{t:u}=(0,x.Z)(),m=Math.floor(Date.now()/1e3),h=d&&c>=m&&r>=m;return h?(0,l.jsxs)(i.Z,{flexDirection:"column",children:[(0,l.jsxs)(i.Z,{justifyContent:"space-between",alignItems:"center",children:[(0,l.jsxs)(o.Z,{small:t,children:[u("Max. stake per user"),":"]}),(0,l.jsx)(o.Z,{small:t,children:`${(0,w.NJ)(n,a.decimals,0)} ${a.symbol}`})]}),h&&c!==r&&(0,l.jsxs)(i.Z,{justifyContent:"space-between",alignItems:"center",children:[(0,l.jsxs)(o.Z,{small:t,children:[u("Max. stake limit ends in"),":"]}),(0,l.jsx)(s.mZ,{timestamp:r})]})]}):null};var y=n(57670),T=n(99034),C=n(95193),P=n(86718),A=n(38018),D=n(62175);let I=e=>{let{userData:t,performanceFeeAsDecimal:n}=e,{t:i}
34=(0,x.Z)(),{targetRef:r,tooltip:s,tooltipVisible:a}=(0,y.Z)(i("Performance fee only applies to the flexible staking rewards."),{placement:"bottom-start"}),d=(0,P.p1)(t),c=(0,P.IM)(t);return!n||d?null:(0,l.jsxs)(T.F,{label:(0,l.jsx)(C.Z,{ref:r,small:!0,children:i("Performance Fee")}),children:[a&&s,(0,l.jsx)(o.Z,{ml:"4px",small:!0,children:c?`${n}%`:`0~${n}%`})]})},L=e=>{let{totalLocked:t,lockedToken:n}=e,{t:i}=(0,x.Z)();return(0,l.jsx)(T.F,{label:(0,l.jsxs)(o.Z,{small:!0,children:[i("Total locked"),":"]}),children:(0,l.jsx)(r.z,{total:t,tokenDecimals:n.decimals,decimalsToShow:0,symbol:n.symbol})})},F=()=>{let{t:e}=(0,x.Z)(),{targetRef:t,tooltip:n,tooltipVisible:i}=(0,y.Z)(e("The average lock duration of all the locked staking positions of other users"),{placement:"bottom-start"}),{avgLockDurationsInWeeks:r}=(0,A.Z)();return(0,l.jsxs)(T.F,{label:(0,l.jsxs)(C.Z,{ref:t,small:!0,children:[e("Average lock duration"),":"]}),children:[i&&n,(0,l.jsx)(o.Z,{ml:"4px",small:!0,children:r})]})},E=e=>{let{pool:t,stakedBalance:n}=e,{t:r}=(0,x.Z)();return(0,l.jsxs)(i.Z,{justifyContent:"space-between",alignItems:"center",children:[(0,l.jsxs)(o.Z,{small:!0,children:[r("APR"),":"]}),(0,l.jsx)(D.Z,{pool:t,showIcon:!0,stakedBalance:n,performanceFee:0,fontSize:"14px"})]})},B=e=>{let{pool:t,account:n,showTotalStaked:w=!0,alignLinksToRight:y=!0}=e,{t:T}=(0,x.Z)(),C=(0,p.je)(),{chainId:P}=(0,g.g)(),{stakingToken:A,earningToken:D,totalStaked:B,startTimestamp:z,endTimestamp:M,stakingLimit:N,stakingLimitEndTimestamp:H,contractAddress:Y,vaultKey:$,profileRequirement:K,isFinished:U,userData:R}=t,W=(null==R?void 0:R.stakedBalance)?R.stakedBalance:m.HW,{totalCakeInVault:X,totalLockedAmount:V,fees:{performanceFeeAsDecimal:O},userData:_}=(0,Z.eB)($),q=D.address||"",J=(0,f.ZX)($,P),{shouldShowBlockCountdown:Q,timeUntilStart:G,timeRemaining:ee,hasPoolStarted:et}=(0,v.zy)(t,C),en=(0,h.useMemo)(()=>(0,b.H)(P,D.address),[P,D.address]);return(0,l.jsxs)(l.Fragment,{children:[K&&(K.required||K.thresholdPoints.gt(0))&&(0,l.jsxs)(i.Z,{mb:"8px",justifyContent:"space-between",children:[(0,l.jsxs)(o.Z,{small:!0,children:[T("Requirement"),":"]}),(0,l.jsxs)(o.Z,{small:!0,textAlign:"right",children:[K.required&&T("ALLTRASONIC Profile")," ",K.thresholdPoints.gt(0)&&(0,l.jsxs)(o.Z,{small:!0,children:[K.thresholdPoints.toNumber()," ",T("Profile Points")]})]})]}),!$&&(0,l.jsx)(E,{pool:t,stakedBalance:W}),w&&(0,l.jsx)(r.R,{totalStaked:$?X:B,tokenDecimals:A.decimals,symbol:A.symbol,decimalsToShow:0}),$===j.om.CakeVault&&(0,l.jsx)(L,{totalLocked:V,lockedToken:A}),$===j.om.CakeVault&&(0,l.jsx)(F,{}),!U&&N&&N.gt(0)&&(0,l.jsx)(S,{small:!0,currentBlock:C,hasPoolStarted:et,stakingLimit:N,stakingLimitEndTimestamp:H,stakingToken:A,endTimestamp:M}),Q&&(0,l.jsxs)(i.Z,{mb:"2px",justifyContent:"space-between",alignItems:"center",children:[(0,l.jsxs)(o.Z,{small:!0,children:[T(et?"Ends in":"Starts in"),":"]}),ee||G?(0,l.jsx)(s.mZ,{timestamp:et?M:z}):(0,l.jsx)(a.Z,{width:"54px",height:"21px"})]}),$&&(0,l.jsx)(I,{userData:_,performanceFeeAsDecimal:O}),(0,l.jsx)(i.Z,{mb:"2px",justifyContent:y?"flex-end":"flex-start",children:(0,l.jsx)(d.Z,{href:en,bold:!1,small:!0,children:T("See Token Info")})}),!$&&(0,l.jsx)(i.Z,{mb:"2px",justifyContent:y?"flex-end":"flex-start",children:(0,l.jsx)(d.Z,{href:D.projectLink,bold:!1,small:!0,children:T("View Project Site")})}),Y&&(0,l.jsx)(i.Z,{mb:"2px",justifyContent:y?"flex-end":"flex-start",children:(0,l.jsx)(c.Z,{href:(0,k.C)($?J:Y,"address",P),bold:!1,small:!0,children:T("View Contract")})}),n&&q&&(0,l.jsx)(i.Z,{justifyContent:y?"flex-end":"flex-start",children:(0,l.jsx)(u.Z,{variant:"text",p:"0",height:"auto",style:{fontSize:"14px",fontWeight:"400",lineHeight:"normal"},marginTextBetweenLogo:"4px",textOptions:u.L.TEXT,tokenAddress:q,tokenSymbol:D.symbol,tokenDecimals:D.decimals,tokenLogo:`/images/tokens/${q.toLowerCase()}.png`})})]})};var z=(0,h.memo)(B)},17169:function(e,t,n){var l=n(97458),i=n(4586),o=n(30993),r=n(57670);let{CompoundingPoolTag:s,ManualPoolTag:a,LockedPoolTag:d,LockedOrAutoPoolTag:c}=o.Z,u=e=>{let t,{account:n,vaultKey:o,isLocked:u,children:x}=e,{t:m}=(0,i.Z)();t=m(o?n?u?"Rewards are locked until the end of the staking position.":"Rewards are distributed and included in your total staking balance.":"In flexible staking, rewards are distributed and included in your total staking balance. In locked staking, Rewards are locked until the end of the staking position.":"You must harvest and compound your earnings from this pool manually.");
34let{targetRef:h,tooltip:p,tooltipVisible:Z}=(0,r.Z)(t,{placement:"bottom"});return(0,l.jsxs)(l.Fragment,{children:[o?n?u?(0,l.jsx)(d,{}):(0,l.jsx)(s,{}):(0,l.jsx)(c,{}):(0,l.jsx)(a,{}),Z&&p,x(h)]})};t.Z=u},26646:function(e,t,n){n.d(t,{Z:function(){return eu}});var l=n(97458),i=n(27144),o=n(4586),r=n(50259),s=n(84285),a=n(33932),d=n(22859),c=n(26909),u=n(32887),x=n(26720),m=n(33077),h=n(52983),p=n(48586),Z=n(25149),j=n(7905),f=n(32268),v=n(46737),g=n(69309),k=n(86186),b=n.n(k),w=n(17921),S=n(48172),y=n(57670),T=n(95193);let C=e=>{let{title:t,icon:n,tooltipComponent:i}=e,{isMobile:o}=(0,S.Z)(),{targetRef:r,tooltipVisible:s,tooltip:d}=(0,y.Z)((0,l.jsx)(l.Fragment,{children:i}),{placement:"bottom",...o&&{hideTimeout:2e3}});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(a.Z,{ref:r,mr:"auto",children:[n,(0,l.jsx)(T.Z,{color:"textSubtle",fontSize:"14px",children:t})]}),s&&d]})},P=e=>{let{title:t,value:n,icon:i,tooltipComponent:o}=e;return(0,l.jsxs)(a.Z,{mt:"8px",flexDirection:"row",alignItems:"center",children:[(0,l.jsx)(a.Z,{mr:"auto",children:(0,l.jsx)(C,{title:t,icon:i,tooltipComponent:o})}),(0,l.jsx)(c.Z,{bold:!0,children:n})]})};var A=n(86736),D=n(66840),I=n(52832),L=n(71421),F=n(61475);let E=()=>{var e,t,n,i;let{t:r}=(0,o.Z)(),{data:s}=(0,A.Z)(),{getLockedApy:d,getBoostFactor:u}=(0,D.o)(),{userData:x}=(0,L.eB)(I.om.CakeVault),{secondDuration:m}=(0,F.Z)({lockStartTime:null!==(t=null==x?void 0:x.lockStartTime)&&void 0!==t?t:"0",lockEndTime:null!==(n=null==x?void 0:x.lockEndTime)&&void 0!==n?n:"0"}),k=(0,h.useMemo)(()=>d(m),[d,m]),S=(0,h.useMemo)(()=>u(m),[u,m]),y=(0,h.useMemo)(()=>new w.Z(k).div(S).toNumber(),[k,S]);return(0,l.jsxs)(Z.ZP,{position:"relative",children:[(0,l.jsx)(Z.ZP,{position:"absolute",right:"20px",top:"-55px",zIndex:1,children:(0,l.jsx)(b(),{width:73,height:84,alt:"lockCAKEbenefit",src:"/images/pool/lockCAKEbenefit.png"})}),(0,l.jsx)(j.Z,{mb:"24px",children:(0,l.jsxs)(Z.ZP,{padding:16,children:[(0,l.jsx)(c.Z,{fontSize:12,bold:!0,color:"secondary",textTransform:"uppercase",children:r("locked benefits")}),(0,l.jsxs)(Z.ZP,{mt:"8px",children:[(0,l.jsxs)(a.Z,{mt:"8px",flexDirection:"row",alignItems:"center",children:[(0,l.jsx)(c.Z,{color:"textSubtle",fontSize:"14px",mr:"auto",children:r("HYDX Yield")}),(0,l.jsx)(c.Z,{style:{display:"inline-block"},color:"success",bold:!0,children:`${Number(k).toFixed(2)}%`}),(0,l.jsx)(c.Z,{ml:"2px",as:"del",bold:!0,children:`${Number(y).toFixed(2)}%`})]}),(0,l.jsx)(P,{title:"iHYDX",value:null==s?void 0:s.iCake,tooltipComponent:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(c.Z,{children:r("iHYDX allows you to participate in the IFO public sales and commit up to %iCake% amount of HYDX.",{iCake:null==s?void 0:s.iCake})}),(0,l.jsx)(p.Z,{to:"/ifo",children:(0,l.jsx)(c.Z,{bold:!0,color:"primary",children:r("Learn More")})})]}),icon:(0,l.jsx)(f.Z,{width:24,height:24,mr:"8px"})}),(0,l.jsx)(P,{title:"bCAKE",value:r("Up to %boostMultiplier%x",{boostMultiplier:2}),tooltipComponent:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(c.Z,{children:r("bCAKE allows you to boost your yield in Hyper-Dex Exchange Swap Farms by up to 2x.")}),(0,l.jsx)(p.Z,{to:"/farms",children:(0,l.jsx)(c.Z,{bold:!0,color:"primary",children:r("Learn More")})})]}),icon:(0,l.jsx)(v.Z,{width:24,height:24,mr:"8px"})}),(0,l.jsx)(P,{title:"vCAKE",value:null==s?void 0:null===(e=s.vCake)||void 0===e?void 0:e.vaultScore,tooltipComponent:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(c.Z,{children:r("vCAKE boosts your voting power to %totalScore% in the Hyper-Dex Exchange Swap voting governance.",{totalScore:null==s?void 0:null===(i=s.vCake)||void 0===i?void 0:i.totalScore})}),(0,l.jsx)(p.Z,{to:"/voting",children:(0,l.jsx)(c.Z,{bold:!0,color:"primary",children:r("Learn More")})})]}),icon:(0,l.jsx)(g.Z,{width:24,height:24,mr:"8px"})})]})]})})]})};var B=n(37745),z=n(6126),M=n(72953),N=n(3967),H=n(70348),Y=n(61929),$=n(84342),K=n(96638),U=n(85990),R=n(54636),W=n(51773),X=n(95423),V=n(52566),O=n(74057);let _={balanceOfAt:"0",totalSupplyAt:"0",nextDistributionTimestamp:0,lastTokenTimestamp:0,availableClaim:"0"},q=()=>{let{account:e,chainId:t}=(0,U.Z)(),n=(0,W.Ek)({chainId:t}),l=(0,X.D5)(t),i=(0,O.o7)(),{data:o}=(0,K.ZP)(e&&t&&["/revenue-sharing-pool",e,t],async()=>{try{let o=Math.floor(i/Y.kp)*Y.kp,r=[{functionName:"balanceOfAt",address:l,abi:V.n,args:[e,o]},{functionName:"totalSupplyAt",address:l,abi:V.n,args:[o]},{functionName:"lastTokenTimestamp",address:l,abi:V.n,args:[]}],s=(0,R.z2)({chainId:t}),[a,d]=await Promise.all([s.multicall({contracts:r,allowFailure:!0}),n.simulate.claim([e])]),c=new w.Z(a[2].result.toString()).plus(Y.kp).toNumber();return{balanceOfAt:a[0].result.toString(),totalSupplyAt:a[1].result.toString(),nextDistributionTimestamp:c,lastTokenTimestamp:Number(a[2].result.toString()),availableClaim:d.result.toString()}}catch(e){return console.error("[ERROR] Fetching Revenue Sharing Pool",e),_}});return null!=o?o:_};var J=n(81379),Q=n(69571),G=n(40968),ee=n(30202),et=n(22459),en=n(34898);let el=e=>{let{availableClaim:t,onDismiss:n}=e,{t:i}=(0,o.Z)(),{toastSuccess:r}=(0,G.p)(),{chainId:s,account:a}=(0,U.Z)(),d=(0,W.Ek)({chainId:s}),{fetchWithCatchTxError:c,loading:u}=(0,et.Z)(),x=(0,h.useMemo)(()=>new w.Z(t).gt(0)&&!u,[t,u]),m=(0,h.useCallback)(async()=>{try{let e=await c(()=>d.write.claim([a],{account:a,chainId:s}));(null==e?void 0:e.status)&&(r(i("Success!"),(0,l.jsx)(en.Y,{txHash:e.transactionHash,children:i("You have successfully claimed your rewards.")})),null==n||n())}catch(e){console.error("[ERROR] Submit Revenue Claim Button",e)}},[a,s,d,c,n,i,r]);return(0,l.jsx)(ee.Z,{mt:"24px",width:"100%",variant:"subtle",disabled:!x,onClick:m,children:i("Claim")})},ei=e=>{var t;let{onDismiss:n}=e,{t:i,currentLanguage:{locale:r}}=(0,o.Z)(),s=(0,B.Nj)(),{userData:d}=(0,L.eB)(I.om.CakeVault),{balanceOfAt:u,totalSupplyAt:x,nextDistributionTimestamp:m,lastTokenTimestamp:f,availableClaim:v}=q(),g=(0,h.useMemo)(()=>(0,J.U4)(new w.Z(u)).toNumber(),[u]),k=(0,h.useMemo)(()=>
34new w.Z(u).div(x).times(100).toNumber()||0,[u,x]),b=(0,h.useMemo)(()=>(0,J.U4)(new w.Z(v)).toNumber(),[v]),S=(0,h.useMemo)(()=>new w.Z(b).times(s).toNumber(),[b,s]),y=(0,h.useMemo)(()=>{var e;let t=new w.Z(m).plus(Y.kp);return new w.Z(null!==(e=null==d?void 0:d.lockEndTime)&&void 0!==e?e:"0").lt(t)},[m,null==d?void 0:d.lockEndTime]),T=(0,h.useMemo)(()=>new w.Z(null!==(t=null==d?void 0:d.lockedAmount)&&void 0!==t?t:"0").lte(0),[null==d?void 0:d.lockedAmount]);return(0,l.jsx)(j.Z,{isActive:!0,mb:["24px","24px","24px","0"],children:(0,l.jsxs)(Z.ZP,{padding:16,children:[(0,l.jsx)(c.Z,{fontSize:12,bold:!0,color:"secondary",textTransform:"uppercase",children:i("revenue sharing")}),(0,l.jsxs)(Z.ZP,{mt:"8px",children:[(0,l.jsxs)(a.Z,{mt:"8px",flexDirection:"row",alignItems:"center",children:[(0,l.jsx)(C,{title:i("Your shares"),tooltipComponent:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(c.Z,{children:i("The virtual shares you currently own and the % against the whole revenue sharing pool.")}),(0,l.jsx)(c.Z,{m:"4px 0",children:i("Please note that after locking or updating, your shares will only update upon revenue distributions.")}),(0,l.jsx)(p.Z,{target:"_blank",to:"https://docs.pancakeswap.finance/products/revenue-sharing/faq#50b7c683-feb0-47f6-809f-39c1a0976bb5",children:(0,l.jsx)(c.Z,{bold:!0,color:"primary",children:i("Learn More")})})]})}),(0,l.jsx)(Z.ZP,{children:0===g?(0,l.jsx)(c.Z,{bold:!0,color:"failure",children:"0"}):(0,l.jsxs)(l.Fragment,{children:[g<=.01?(0,l.jsx)(c.Z,{as:"span",bold:!0,children:"< 0.01"}):(0,l.jsx)(z.Z,{display:"inline-block",bold:!0,value:g,decimals:2}),k<=.01?(0,l.jsx)(c.Z,{as:"span",ml:"4px",children:"(< 0.01%)"}):(0,l.jsx)(z.Z,{display:"inline-block",prefix:"(",unit:"%)",ml:"4px",value:k,decimals:2})]})})]}),(0,l.jsxs)(a.Z,{mt:"8px",flexDirection:"row",alignItems:"center",children:[(0,l.jsx)(C,{title:i("Next distribution"),tooltipComponent:(0,l.jsx)(c.Z,{children:i("Time remaining until the next revenue distribution and share updates.")})}),(0,l.jsx)(c.Z,{color:y?"failure":"text",bold:!0,children:i("in %day%",{day:(0,Q.At)(1e3*m)})})]}),y&&(0,l.jsx)(M.Z,{variant:"danger",padding:"8px",mt:"8px",icon:(0,l.jsx)(N.Z,{color:"failure"}),children:(0,l.jsxs)(M.Y,{lineHeight:"120%",children:[(0,l.jsx)(c.Z,{fontSize:"14px",color:"failure",children:i("Your fixed-term staking position will have less than 1 week in remaining duration upon the next distribution.")}),(0,l.jsx)(c.Z,{fontSize:"14px",color:"failure",mt:"4px",children:i("Extend your stakings to receive shares in the next distribution.")})]})}),(0,l.jsxs)(a.Z,{mt:"8px",flexDirection:"row",alignItems:"center",children:[(0,l.jsx)(C,{title:i("Last distribution"),tooltipComponent:(0,l.jsx)(c.Z,{children:i("The time of the last revenue distribution and shares update.")})}),(0,l.jsx)(c.Z,{bold:!0,children:(0,$.i)(r,f)})]}),(0,l.jsxs)(a.Z,{mt:"8px",flexDirection:"row",alignItems:"center",children:[(0,l.jsx)(C,{title:i("Available for claiming"),tooltipComponent:(0,l.jsx)(c.Z,{children:i("Amount of revenue available for claiming in HYDX.")})}),(0,l.jsxs)(Z.ZP,{children:[(0,l.jsx)(z.Z,{unit:" HYDX",bold:!0,value:b,decimals:2}),(0,l.jsx)(z.Z,{ml:"4px",color:"textSubtle",fontSize:12,textAlign:"right",lineHeight:"110%",prefix:"(~ $",unit:")",value:S,decimals:2})]})]})]}),T&&(0,l.jsx)(M.Z,{variant:"danger",padding:"8px",mt:"8px",icon:(0,l.jsx)(N.Z,{color:"failure"}),children:(0,l.jsx)(M.Y,{lineHeight:"120%",children:i("You need to update your staking in order to start earning from protocol revenue sharing.")})}),(0,l.jsx)(el,{availableClaim:v,onDismiss:n}),(0,l.jsx)(H.Z,{external:!0,m:"8px auto auto auto",href:"https://docs.pancakeswap.finance/products/revenue-sharing",children:i("Learn More")})]})})};var eo=n(53951);let er=()=>{var e,t;let{t:n}=(0,o.Z)(),{userData:i}=(0,L.eB)(I.om.CakeVault),{pools:r}=(0,L.f6)(),s=(0,h.useMemo)(()=>r.find(e=>e.userData&&0===e.sousId),[r]),d=null==s?void 0:s.stakingToken,u=null==s?void 0:s.stakingTokenPrice,x=(0,h.useMemo)(()=>{var e;return null==i?void 0:null===(e=i.balance)||void 0===e?void 0:e.cakeAsNumberBalance},[null==i?void 0:null===(e=i.balance)||void 0===e?void 0:e.cakeAsNumberBalance]),m=(0,h.useMemo)(()=>{var e;return d&&u?(0,J.mW)(null==i?void 0:null===(e=i.balance)||void 0===e?void 0:e.cakeAsBigNumber.multipliedBy(u),null==d?void 0:d.decimals):null},[null==i?void 0:null===(t=i.balance)||void 0===t?void 0:t.cakeAsBigNumber,u,d]);return(0,l.jsxs)(a.Z,{mb:"16px",children:[(0,l.jsx)(eo.Z,{mr:"8px",width:43,height:43,style:{minWidth:43}}),(0,l.jsxs)(Z.ZP,{children:[(0,l.jsx)(c.Z,{fontSize:12,color:"secondary",bold:!0,lineHeight:"110%",textTransform:"uppercase",children:n("HYDX locked")}),(0,l.jsx)(z.Z,{bold:!0,decimals:2,fontSize:20,lineHeight:"110%",value:x}),(0,l.jsx)(z.Z,{bold:!0,prefix:"~ ",decimals:2,fontSize:12,fontWeight:400,lineHeight:"110%",color:"textSubtle",value:m})]})]})};var es=n(59896);let ea=(0,i.ZP)(s.F0).withConfig({componentId:"sc-348989ce-0"})` 35 width: 100%; 36 overflow: hidden; 37 max-height: 90vh; 38 39 ${e=>{let{theme:t}=e;return t.mediaQueries.md}} { 40 width: 375px; 41 } 42`,ed=(0,i.ZP)(a.Z).withConfig({componentId:"sc-348989ce-1"})` 43 flex-direction: column; 44 height: auto; 45 ${e=>{let{theme:t}=e;return t.mediaQueries.xs}} { 46 max-height: 100vh; 47 } 48 ${e=>{let{theme:t}=e;return t.mediaQueries.md}} { 49 max-height: none; 50 } 51`,ec=e=>{var t,n;let{pool:i,userData:a,onDismiss:h}=e,{t:p}=(0,o.Z)();return(0,m.mA)({onConnect:e=>{let{connector:t}=e;null==t||t.addListener("change",()=>null==h?void 0:h())},onDisconnect:()=>null==h?void 0:h()}),(0,l.jsx)(ea,{children:(0,l.jsxs)(r.p,{bg:"gradientBubblegum",py:"24px",children:[(0,l.jsxs)(d.m0,{flexWrap:"nowrap",px:"24px",children:[(0,l.jsx)(c.Z,{fontSize:20,bold:!0,children:p("Locked HYDX Benefits")}),(0,l.jsx)(s.ol,{onDismiss:h})]}),(0,l.jsx)(s.fe,{mt:"16px",width:"100%",style:{maxHeight:"calc(100vh - 260px)"},children:(0,l.jsxs)(ed,{px:"24px",children:[(0,l.jsx)(er,{}),(0,l.jsx)(E,{}),(0,l.jsx)(ei,{onDismiss:h})]})}),(0,l.jsx)(u.Tz,{px:"24px",gap:"16px",children:(0,l.jsx)(x.Z,{children:(0,l.jsx)(es.Z,{userShares:null==a?void 0:a.userShares,locked:null==a?void 0:a.locked,lockEndTime:null==a?void 0:a.lockEndTime,lockStartTime:null==a?void 0:a.lockStartTime,stakingToken:null==i?void 0:i.stakingToken,stakingTokenPrice:null==i?void 0:i.stakingTokenPrice,stakingTokenBalance:null==i?void 0:null===(t=i.userData)||void 0===t?void 0:t.stakingTokenBalance,lockedAmount:null==a?void 0:null===(n=a.balance)||void 0===n?void 0:n.cakeAsBigNumber})})})]})})};var eu=ec},87380:function(e,t,n){n.d(t,{X:function(){return k}});var l=n(97458),i=n(87173),o=n(72072),r=n(97322),s=n(75840),a=n(18053),d=n(25149),c=n(97649),u=n(26909),x=n(48267),m=n(4586),h=n(52983),p=n(86718);
51let Z={[p.PS.None]:{},[p.PS.Flexible]:{variant:"success"},[p.PS.Locked]:{variant:"secondary"},[p.PS.LockedEnd]:{variant:"secondary",outline:!0},[p.PS.AfterBurning]:{variant:"failure",outline:!0}},j={[p.PS.None]:null,[p.PS.Flexible]:i.Z,[p.PS.Locked]:o.Z,[p.PS.LockedEnd]:r.Z,[p.PS.AfterBurning]:s.Z},f={[p.PS.None]:null,[p.PS.Flexible]:"white",[p.PS.Locked]:"white",[p.PS.LockedEnd]:null,[p.PS.AfterBurning]:null},v={[p.PS.None]:"",[p.PS.Flexible]:(0,l.jsx)(x.Z,{children:"Flexible"}),[p.PS.Locked]:(0,l.jsx)(x.Z,{children:"Locked"}),[p.PS.LockedEnd]:(0,l.jsx)(x.Z,{children:"Locked End"}),[p.PS.AfterBurning]:(0,l.jsx)(x.Z,{children:"After Burning"})},g=e=>{let{position:t}=e;return(0,l.jsxs)(a.Z,{...Z[t],children:[(0,l.jsx)(d.ZP,{as:j[t],mr:"4px",color:f[t]}),v[t]]})},k=e=>{let{userData:t,...n}=e,{t:i}=(0,m.Z)(),o=(0,h.useMemo)(()=>(0,p.cP)(t),[t]);return o?(0,l.jsxs)(c.Z,{alignItems:"center",justifyContent:"space-between",marginX:"8px",mb:"8px",gap:"12px",...n,children:[(0,l.jsx)(u.Z,{fontSize:"12px",color:"secondary",textTransform:"uppercase",bold:!0,children:i("My Position")}),(0,l.jsx)(g,{position:o})]}):null}},74847:function(e,t,n){n.d(t,{w:function(){return c}});var l=n(97458),i=n(57670),o=n(25149),r=n(97649),s=n(30202),a=n(95193),d=n(4586);let c=e=>{let{onFlexibleClick:t,onLockedClick:n}=e,{t:c}=(0,d.Z)(),{targetRef:u,tooltip:x,tooltipVisible:m}=(0,i.Z)((0,l.jsx)(o.ZP,{children:c("Flexible staking offers flexibility for staking/unstaking whenever you want. Locked staking offers higher APY as well as other benefits.")}),{});return(0,l.jsxs)(o.ZP,{width:"100%",children:[(0,l.jsxs)(r.Z,{gap:"12px",children:[(0,l.jsx)(s.Z,{style:{flex:1},onClick:t,children:c("Flexible")}),n&&(0,l.jsx)(s.Z,{style:{flex:1},onClick:n,children:c("Locked")})]}),m&&x,n&&(0,l.jsx)(a.Z,{mt:"16px",small:!0,ref:u,children:c("Whatâs the difference?")})]})}},6022:function(e,t,n){var l=n(96638),i=n(20030),o=n(85990),r=n(51773);let s=()=>{let{account:e,chainId:t}=(0,o.Z)(),n=(0,r.rF)({chainId:t}),{data:s,mutate:a}=(0,l.ZP)(e&&t===i.a_.BSC&&["/v-cake-initialization",e,t],async()=>{try{let t=await n.read.initialization([e]);return t}catch(e){return console.error("[ERROR] Fetching vCake initialization",e),null}});return{isInitialization:s,refresh:a}};t.Z=s},11545:function(e,t,n){n.d(t,{D:function(){return i}});var l=n(52983);let i=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:259200,n=Math.floor(Date.now()/1e3);return e+t-n>0};t.Z=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:259200,[i,o]=(0,l.useState)(null),[r,s]=(0,l.useState)(!1),[a,d]=(0,l.useState)(()=>Math.floor(Date.now()/1e3));return(0,l.useEffect)(()=>{let l=e+n-a,i=t.gt(0)&&l>0,r=()=>{d(e=>e+1)},c=setInterval(()=>r(),1e3);return i?(o(l),s(!0)):(s(!1),clearInterval(c)),()=>clearInterval(c)},[e,n,o,a,t]),{hasUnstakingFee:r,secondsRemaining:i}}},91016:function(e,t,n){var l=n(27144),i=n(13729);let o=l.ZP.div.withConfig({componentId:"sc-5ed8a823-0"})` 52 border-top: 1px solid ${e=>{let{theme:t}=e;return t.colors.cardBorder}}; 53 ${i.Dh} 54`;o.defaultProps={p:"24px"},t.Z=o},61364:function(e,t,n){var l=n(97458),i=n(25149);let o=e=>{let{children:t,...n}=e;return(0,l.jsx)(i.ZP,{px:["16px","24px"],mx:"auto",maxWidth:"1200px",...n,children:t})};t.Z=o},77673:function(e,t,n){var l=n(97458);n(52983);var i=n(85817);let o=e=>(0,l.jsx)(i.Z,{viewBox:"0 0 24 24",...e,children:(0,l.jsx)("path",{d:"M18 13H6C5.45 13 5 12.55 5 12C5 11.45 5.45 11 6 11H18C18.55 11 19 11.45 19 12C19 12.55 18.55 13 18 13Z"})});t.Z=o},26720:function(e,t,n){n.d(t,{Z:function(){return u}});var l=n(97458),i=n(52983),o=n(27144);let r=e=>{let t,{size:n="md"}=e,{spacing:r}=(0,i.useContext)(o.Ni);switch(n){case"lg":t=r["32px"];break;case"sm":t=r["12px"];break;default:t=r["24px"]}return(0,l.jsx)(s,{size:t})},s=o.ZP.div.withConfig({componentId:"sc-dfc28eb1-0"})` 55 height: ${e=>e.size}; 56 width: ${e=>e.size}; 57`,a=e=>{let{children:t}=e,n=i.Children.toArray(t).length;return(0,l.jsx)(d,{children:i.Children.map(t,(e,t)=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(c,{children:e}),t<n-1&&(0,l.jsx)(r,{})]}))})},d=o.ZP.div.withConfig({componentId:"sc-89296d0e-0"})` 58 align-items: center; 59 background-color: ${e=>e.theme.colors.primaryDark}00; 60 display: flex; 61 margin: 0; 62 padding: ${e=>e.theme.spacing["24px"]} 0; 63`,c=o.ZP.div.withConfig({componentId:"sc-89296d0e-1"})` 64 flex: 1; 65`;var u=a}}]); 66//# sourceMappingURL=7353-4d4c509822854673.js.map
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.