PageSourceSearch

https://agdex.io/_next/static/chunks/pages/trading-campaign/campaignSeason4Widget-545f3e79a8772ca4.js

js agdex.io collected 2026-10-08 07:28:29 UTC 4,902 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4143],{8814:function(e,t,a){"use strict";a.d(t,{Z:function(){return s}});var n=a(4297);let s=(0,n.Z)("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]])},4998:function(e,t,a){"use strict";a.d(t,{Z:function(){return s}});var n=a(4297);let s=(0,n.Z)("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},6467:function(e,t,a){"use strict";a.d(t,{Z:function(){return s}});var n=a(4297);let s=(0,n.Z)("MoreHorizontal",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]])},7105:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/trading-campaign/campaignSeason4Widget",function(){return a(2966)}])},2966:function(e,t,a){"use strict";a.r(t),a.d(t,{LIQUIDATION_REWARDS:function(){return v},PNL_REWARDS:function(){return h},VOL_REWARDS:function(){return P},default:function(){return CampaignV4Widget},getRewardByRank:function(){return getRewardByRank}});var n=a(5893),s=a(7294),i=a(5675),r=a.n(i),l=a(7017),o=a(9522),c=a(2097),d=a(377),p=a(1731),u=a(6243),g=a(9991),f=a(3986),x=a(3027),m=a(4331);let P=[{rank:1,apt:108,agPoints:9e4,specialRole:!0},{rank:2,apt:60,agPoints:5e4,specialRole:!0},{rank:3,apt:36,agPoints:3e4,specialRole:!0},{range:[4,10],totalApt:126,totalAgPoints:105e3,perPersonApt:18,perPersonAgPoints:15e3},{range:[11,20],totalApt:90,totalAgPoints:75e3,perPersonApt:9,perPersonAgPoints:7500},{range:[21,50],totalApt:180,totalAgPoints:15e4,perPersonApt:6,perPersonAgPoints:5e3}],h=[{rank:1,apt:108,agPoints:9e4,specialRole:!0},{rank:2,apt:60,agPoints:5e4,specialRole:!0},{rank:3,apt:36,agPoints:3e4,specialRole:!0},{range:[4,10],totalApt:126,totalAgPoints:105e3,perPersonApt:18,perPersonAgPoints:15e3},{range:[11,20],totalApt:90,totalAgPoints:75e3,perPersonApt:9,perPersonAgPoints:7500},{range:[21,50],totalApt:180,totalAgPoints:15e4,perPersonApt:6,perPersonAgPoints:5e3}],v=[{rank:1,apt:50,agPoints:9e4,specialRole:!0},{rank:2,apt:20,agPoints:5e4,specialRole:!0},{rank:3,apt:15,agPoints:3e4,specialRole:!0},{rank:4,apt:10,agPoints:3e4,specialRole:!0},{rank:5,apt:5,agPoints:3e4,specialRole:!0}],getRewardByRank=(e,t)=>{for(let a of t){if(a.rank===e)return{apt:a.apt,agPoints:a.agPoints,specialRole:a.specialRole||!1};if(a.range&&e>=a.range[0]&&e<=a.range[1])return{apt:a.perPersonApt,agPoints:a.perPersonAgPoints,specialRole:!1}}return{apt:0,agPoints:0,specialRole:!1}};function CampaignV4Widget(){let[e,t]=(0,s.useState)(!1),[a,i]=(0,s.useState)(0),[P,h]=(0,s.useState)(0),fetchSeason3Stat=async()=>{try{var e,t,a;let n=await (0,l.$z)(),s=null==n?void 0:null===(a=n.syncSqlResponse)||void 0===a?void 0:null===(t=a.result)||void 0===t?void 0:null===(e=t.rows)||void 0===e?void 0:e[0],r=null==s?void 0:s.total_trades,c=null==s?void 0:s.total_volume;i(r||0),h((0,o.PC)(c||0,18))}catch(e){(0,d.yv)("error",{variant:"info"}),setTimeout(()=>{fetchSeason3Stat()},3e3)}};return(0,s.useEffect)(()=>{fetchSeason3Stat()},[]),(0,n.jsx)(p.Zb,{className:"pt-4 mt-2 rounded-[10px] relative",children:(0,n.jsxs)(g.Yt,{defaultValue:"Position",children:[(0,n.jsxs)("div",{className:"flex flex-row items-center justify-between w-full",children:[(0,n.jsx)("div",{className:"flex flex-row items-center justify-between w-full",children:(0,n.jsxs)(g.Yv,{className:"w-full",children:[(0,n.jsx)(g.Y2,{value:"Position",className:"mr-4 w-3/5 text-xs md:text-base md:w-[150px]",children:"Trading Volume"}),(0,n.jsx)(g.Y2,{value:"Orders",className:"mr-4 w-1/5 text-xs md:text-base md:w-[150px]",children:"PnL"}),(0,n.jsx)(g.Y2,{value:"Liquidation",className:"mr-4 w-2/5 text-xs md:text-base md:w-[150px]",children:"Liquidation"})]})}),(0,n.jsx)("div",{className:"hidden mr-2 md:block",children:e&&(0,n.jsx)(u.Z,{width:30,height:15})})]}),(0,n.jsx)("div",{className:"block w-full mt-2 mb-1 md:hidden",children:(0,n.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,n.jsx)(r(),{src:c.Z,alt:"",className:"size-8"}),(0,n.jsx)("span",{className:"text-sm font-semibold text-transparent bg-custom-gradient bg-clip-text",children:"Rewards Distributed"})]})}),!e&&(0,n.jsx)("div",{className:"absolute hidden md:block right-4 top-4",children:(0,n.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,n.jsx)(r(),{src:c.Z,alt:"",className:"size-8"}),(0,n.jsx)("span",{className:"font-semibold text-transparent bg-custom-gradient bg-clip-text",children:"Rewards Distributed"})]})}),(0,n.jsx)(g.b8,{value:"Position",children:(0,n.jsx)(m.default,{setLoa
1ding:t,totalTrades:a,totalVol:P})}),(0,n.jsx)(g.b8,{value:"Orders",children:(0,n.jsx)(x.default,{setLoading:t,totalTrades:a,totalVol:P})}),(0,n.jsx)(g.b8,{value:"Liquidation",children:(0,n.jsx)(f.default,{setLoading:t,totalTrades:a,totalVol:P})})]})})}}},function(e){e.O(0,[1713,2773,1477,7705,4331,3986,3027,9774,2888,179],function(){return e(e.s=7105)}),_N_E=e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.