1try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="9eb30c94-6e62-41c1-8a32-b41a253a3a15",e._sentryDebugIdIdentifier="sentry-dbid-9eb30c94-6e62-41c1-8a32-b41a253a3a15")}()}catch(e){}"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7524],{2293:(e,t,a)=>{a.d(t,{_:()=>s});var r=a(79237);function s(e){let{tickerBar:t,actionBar:a}=e;return(0,r.jsx)("section",{"data-component":"Header",className:"h-full overflow-hidden",children:(0,r.jsxs)("div",{className:"text-t1 flex h-full items-center gap-6 px-4",children:[(0,r.jsx)("div",{className:"min-w-0 flex-1",children:(0,r.jsx)("div",{className:"flex h-full min-w-0 items-center",children:t})}),(0,r.jsx)("div",{className:"shrink-0",children:a})]})})}},4058:(e,t,a)=>{a.d(t,{EA:()=>s,FL:()=>l,Kk:()=>c,LO:()=>i,SQ:()=>r,Xs:()=>u,_1:()=>o,jS:()=>n,ld:()=>m});var r=function(e){return e.Header="header",e.ChartTabs="chartTabs",e.OrderBookTrades="orderBookTrades",e.PlaceOrder="placeOrder",e.TradingTables="tradingTables",e.Wallet="wallet",e}({}),s=function(e){return e.Max="max",e.Lg="lg",e.Xxl="xxl",e.Xl="xl",e.Sm="sm",e.Xs="xs",e}({});let l=17,n=[4,4],i={max:1680,lg:1440,xxl:1200,xl:1024,sm:767,xs:0},o={max:100,lg:100,xxl:100,xl:100,sm:100,xs:100};function c(e){return e>i.xl}function d(e){return Number(((e+n[1])/(l+n[1])).toFixed(4))}let x={max:[{i:"header",x:0,y:0,w:100,h:d(52),static:!0},{i:"chartTabs",x:0,y:1,w:68,h:d(597),minH:d(290),minW:32},{i:"orderBookTrades",x:68,y:1,w:16,h:d(597),minH:d(290),maxH:d(917),minW:16},{i:"placeOrder",x:84,y:1,w:16,h:d(597),minH:d(100),minW:16,maxW:16},{i:"tradingTables",x:0,y:2,w:84,h:d(600),minH:d(70),minW:56},{i:"wallet",x:84,y:2,w:16,h:d(600),minH:d(70),minW:16,maxW:16}],lg:[{i:"header",x:0,y:0,w:100,h:d(52),static:!0},{i:"chartTabs",x:0,y:1,w:64,h:d(600),minH:d(290),minW:37},{i:"orderBookTrades",x:64,y:1,w:18,h:d(600),minH:d(290),maxH:d(917),minW:18},{i:"placeOrder",x:82,y:1,w:18,h:d(600),minH:d(100),minW:18,maxW:18},{i:"tradingTables",x:0,y:2,w:82,h:d(600),minH:d(70),minW:58},{i:"wallet",x:82,y:2,w:18,h:d(600),minH:d(70),minW:18,maxW:18}],xxl:[{i:"header",x:0,y:0,w:100,h:d(52),static:!0},{i:"chartTabs",x:0,y:1,w:58,h:d(597),minH:d(290),minW:37},{i:"orderBookTrades",x:58,y:1,w:21,h:d(597),minH:d(290),maxH:d(917),minW:21},{i:"placeOrder",x:79,y:1,w:21,h:d(597),minH:d(100),minW:21,maxW:21},{i:"tradingTables",x:0,y:2,w:79,h:d(600),minH:d(70),minW:56},{i:"wallet",x:79,y:2,w:21,h:d(600),minH:d(70),minW:21,maxW:21}],xl:[{i:"header",x:0,y:0,w:100,h:d(52),static:!0},{i:"chartTabs",x:0,y:1,w:58,h:d(597),minH:d(290),minW:44},{i:"orderBookTrades",x:58,y:1,w:21,h:d(597),minH:d(290),maxH:d(917),minW:21},{i:"placeOrder",x:79,y:1,w:21,h:d(597),minH:d(100),minW:21,maxW:21},{i:"tradingTables",x:0,y:2,w:79,h:d(600),minH:d(70),minW:68},{i:"wallet",x:79,y:2,w:21,h:d(600),minH:d(70),minW:21,maxW:21}],sm:[{i:"header",x:0,y:0,w:100,h:d(52)},{i:"chartTabs",x:0,y:1,w:66,h:d(417)},{i:"placeOrder",x:66,y:1,w:34,h:d(720)},{i:"orderBookTrades",x:0,y:2,w:66,h:d(300)},{i:"tradingTables",x:0,y:3,w:66,h:d(397)},{i:"wallet",x:66,y:3,w:34,h:d(397)}],xs:[{i:"header",x:0,y:0,w:100,h:d(228)},{i:"chartTabs",x:0,y:1,w:100,h:d(440)},{i:"tradingTables",x:0,y:2,w:100,h:d(600)}]};function u(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:x,t={};for(let[a,r]of Object.entries(e))r&&(t[a]=r.map(e=>({...e})));return t}function m(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:x,t=u(e);for(let e of["max","lg","xxl","xl","sm"]){let a=t[e];a&&(t[e]=a.map(e=>"header"===e.i?{...e,h:d(52)}:e))}return t}},5408:(e,t,a)=>{a.d(t,{Ad:()=>p,Vd:()=>c,Vi:()=>x,Y_:()=>f,Zq:()=>h,ci:()=>m,es:()=>o,jG:()=>d,sw:()=>u,tL:()=>i});let r="https://cdn.tapbit.mobi/next-web/futures",s={MARKET_CLOSED:"".concat(r,"/market-closed.png"),PRE_MARKET:"".concat(r,"/pre-market.png"),REGULAR_MARKET:"".concat(r,"/regulare-market.png"),AFTER_HOURS:"".concat(r,"/after-hours.png"),OVERNIGHT:"".concat(r,"/overnight.png"),WEEKEND:"".concat(r,"/weekend.png")};function l(e){switch(e){case"MARKET_CLOSED":case"PRE_MARKET":case"REGULAR_MARKET":case"AFTER_HOURS":case"OVERNIGHT":case"WEEKEND":return!0;default:return!1}}function n(e){return"LOW"===e||"MEDIUM"===e||"HIGH"===e}function i(e,t){switch(t){case"MARKET_CLOSED":return e("Market Closed");case"PRE_MARKET":return e("Pre-Market");case"REGULAR_MARKET":return e("Regular Market");case"AFTER_HOURS":return e("After Hours");case"OVERNIGHT":return e("Overnight");case"WEEKEND":return e("Weekend");default:return""}}function o(e){return s[e]}function c(e,t){let a=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(!t)return"";if(a)switch(t){case"HIGH":return e("High Liquidity");case"MEDIUM":return e("Medium Liquidity");case"LOW":return e("Low Liquidity");default:return""}switch(t){case"HIGH":return e("Liquidity High");case"MEDIUM":return e("Liquidity Medium");case"LOW":return e("Liquidity Low");default:return""}}function d(e,t){let a=function(e,t){let a=String(t||"").toUpperCase();return a?"WEEKEND"===a?e("Weekend"):"HOLIDAY"===a?e("Holiday"):"EARLY_CLOSE"===a?e("Early Close"):"":""}(e,t.specialTag);if(!a||"EARLY_CLOSE"!==String(t.specialTag).toUpperCase())return a;let r=function(e,t){let a=Number(t||0);if(!Number.isFinite(a)||a<=0)return"";let r=String(e).toUpperCase(),s="US_STOCK"===r?"ET":"KR_STOCK"===r?"KST":"";if(!s)return"";let l=new Intl.DateTimeFormat("en-GB",{hour:"2-digit",hourCycle:"h23",minute:"2-digit",timeZone:"US_STOCK"===r?"America/Ne
1w_York":"Asia/Seoul"}).format(new Date(a));return"".concat(l," ").concat(s)}(t.contractScope,t.earlyCloseTimeAt);return r?"".concat(a," \xb7 ").concat(r):a}function x(e){let t=String(e||"").toLowerCase();return"https://tapbitcex.zendesk.com/hc/".concat("ja"===t?"ja":"zh-tw"===t?"zh-tw":"en-us","/articles/").concat("16760214049039")}function u(e){var t;if(!(null==e?void 0:e.contractScope)||!l(e.currentMarketStatus)||!n(e.liquidityLevel))return null;let a=Number(e.timestamp||0);if(!Number.isFinite(a)||a<=0)return null;let r=Number(e.earlyCloseTimeAt||0);return{contractScope:e.contractScope,currentMarketStatus:e.currentMarketStatus,earlyCloseTimeAt:Number.isFinite(r)&&r>0?r:void 0,liquidityLevel:e.liquidityLevel,nextMarketStatus:l(e.nextMarketStatus)?e.nextMarketStatus:void 0,nextMarketStatusStartTime:Number(e.nextMarketStatusStartTime||0)||void 0,specialTag:null!=(t=e.specialTag)?t:null,timestamp:a}}function m(e,t,a){let r="market"===t?null==e?void 0:e.market:null==e?void 0:e.local;return((null==r?void 0:r.items)||[]).map(e=>(function(e,t){if(!l(e.title)||!n(e.liquidityLevel))return null;return{status:e.title,label:i(t,e.title),timeRange:e.timeDesc||"",liquidityLevel:e.liquidityLevel,iconSrc:s[e.title]}})(e,a)).filter(e=>!!e)}function h(e){let t=Math.max(0,Math.floor(e/1e3)),a=Math.floor(t/86400),r=Math.floor(t%86400/3600),s=Math.floor(t%3600/60),l="".concat(String(r).padStart(2,"0"),":").concat(String(s).padStart(2,"0"),":").concat(String(t%60).padStart(2,"0"));return a>0?"".concat(a,"D ").concat(l):l}function p(e,t){let a=Number(e.nextMarketStatusStartTime||0),r=Number(e.timestamp||0);return a&&r?a-r-Math.max(0,t-e.timestamp):0}function f(e){return!!((null==e?void 0:e.currentMarketStatus)&&(null==e?void 0:e.liquidityLevel))}},20156:(e,t,a)=>{a.d(t,{_:()=>n});var r=a(79237),s=a(66960),l=a(21781);function n(e){let{columnOptions:t,iconClassName:a,onChange:n,triggerClassName:i}=e,{$t:o}=(0,s.B)(),c={symbol:o("Symbol"),quantity:o("Available/Holding"),avgPrice:o("Entry Price"),positionMargin:o("Margin_1"),markPrice:o("Mark Price"),unrealisedPnl:o("Unrealized PNL(ROE)"),realisedPnl:o("Realized PNL"),liquidationPrice:o("Liq Price_2"),marketClose:o("Market"),operation:o("Operation"),reverse:o("Reverse"),tpsl:o("TP/SL"),positionTPSL:o("Position TP/SL"),followers:o("Followers"),trader:o("Trader"),weight:o("ADL")};return(0,r.jsx)(l.C,{options:t,iconClassName:a,renderLabel:e=>c[e.key],triggerClassName:i,onChange:n})}},21781:(e,t,a)=>{a.d(t,{C:()=>N});var r=a(79237),s=a(90910),l=a(69938),n=a(66960),i=a(90477),o=a(98889),c=a(99568),d=a(38113),x=a(65375);let u=d.forwardRef((e,t)=>(0,r.jsx)(x.B,{ref:t,viewBox:"0 0 1024 1024",...e,children:(0,r.jsx)("path",{d:"M326.4 640a57.6 57.6 0 0 1 57.6-57.6h512a57.6 57.6 0 0 1 0 115.2H384a57.6 57.6 0 0 1-57.6-57.6zM326.4 320a57.6 57.6 0 0 1 57.6-57.6h512a57.6 57.6 0 0 1 0 115.2H384a57.6 57.6 0 0 1-57.6-57.6z"})}));u.displayName="DragOptionIcon";var m=a(24626),h=a(44677),p=a(91216),f=a(94195);let g="table-column-filter-option",v={type:"idle"};function b(e){var t;return e.type===g&&"string"==typeof e.instanceId&&"string"==typeof e.key&&"object"==typeof(t=e.rect)&&null!==t&&"number"==typeof t.height&&"number"==typeof t.width}function j(e){let{height:t}=e;return(0,r.jsx)("div",{className:"border-l1 bg-bg2 rounded-r2 my-0.5 border opacity-80",style:{height:t},"aria-hidden":"true"})}function y(e){let{instanceId:t,option:a,renderLabel:s,onVisibilityChange:l}=e,n=(0,d.useRef)(null),x=(0,d.useRef)(null),y=(0,d.useRef)(null),[w,N]=(0,d.useState)(v),k=!a.dragDisabled;(0,d.useEffect)(()=>{let e=n.current,r=x.current,s=y.current;if(e&&r&&s)return(0,h.k)((0,c.kZ)({element:r,dragHandle:s,canDrag:()=>k,getInitialData:e=>{let{element:r}=e;return function(e){let{instanceId:t,key:a,rect:r}=e;return{type:g,instanceId:t,key:a,rect:r}}({instanceId:t,key:a.key,rect:r.getBoundingClientRect()})},onGenerateDragPreview(e){let{location:t,nativeSetDragImage:a}=e,s=r.getBoundingClientRect();(0,f.t)({nativeSetDragImage:a,getOffset:(0,p.C)({element:r,input:t.current.input}),render(e){let{container:t}=e,a=r.cloneNode(!0);a instanceof HTMLElement&&(a.style.width="".concat(s.width,"px"),a.style.height="".concat(s.height,"px"),a.style.opacity="0.95",a.style.pointerEvents="none",a.style.transform="rotate(2deg)",t.appendChild(a))}})},onDragStart(){N({type:"dragging"})},onDrop(){N(v)}}),(0,c.tO)({element:e,canDrop(e){let{source:r}=e;return k&&b(r.data)&&r.data.instanceId===t&&r.data.key!==a.key},getIsSticky:()=>!0,getData(e){let{element:r,input:s}=e;return(0,o.E)(function(e){let{instanceId:t,key:a}=e;return{type:g,instanceId:t,key:a}}({instanceId:t,key:a.key}),{element:r,input:s,allowedEdges:["top","bottom"]})},onDragEnter(e){let{self:t,source:a}=e;if(!b(a.data))return;let r=(0,o.S)(t.data);r&&N({type:"over",closestEdge:r,draggingRect:a.data.rect})},onDrag(e){let{self:t,source:a}=e;if(!b(a.data))return;let r=(0,o.S)(t.data);if(!r)return;let s={type:"over",closestEdge:r,draggingRect:a.data.rect};N(e=>e.type===s.type&&e.closestEdge===s.closestEdge&&e.draggingRect.height===s.draggingRect.height?e:s)},onDragLeave(){N(v)},onDrop(){N(v)}}))},[k,t,a.key]);let S=(0,i.cn)("dragging"===w.type&&"bg-bg2 opacity-40","over"===w.type?"bg-bg2":"hover:bg-bg2");return(0,r.jsxs)("div",{ref:n,className:"px-2 py-0",children:["over"===w.type&&"top"===w.closestEdge?(0,r.jsx)(j,{height:w.draggingRect.height}):null,(0,r.jsx)("div",{ref:x,className:"flex h-10 items-center",children:(0,r.jsxs)("div",{className:(0,i.cn)("rounded-r2 flex h-10 w-full items-center gap-2 px-2 py-[10px] transition-[background-color,opacity]",S),children:[(0,r.jsxs)(m.Checkbox.Label,{className:"min-w-0 flex-1 gap-2",children:[(0,r.jsx)(m.Checkbox.Control,{checked:!a.hidden,disabled:a.visibilityDisabled,className:"disabled:opacity-40",onCheckedChange:e=>l(a.key,e)}),(0,r.jsx)(m.Checkbox.Text,{className:"text-b14 truncate",children:s(a)})]}),(0,r.jsx)("div",{ref:y,className:k?"cursor-grab active:cursor-grabbing":"cursor-default",children:(0,r.jsx)(u,{className:"size-4 shrink-0 ".concat(k?"text-t1":"text-t5")})})]})}),"over"===w.type&&"bottom"===w.closestEdge?(0,r.jsx)(j,{height:w.draggingRect.height}):null]})}var w=a(8464);function N(e){let{iconClassName:t,options:a,renderLabel:x,onChange:u,title:m,sortLabel:h,triggerClassName:p}=e,{$t:f}=(0,n.B)(),v=(0,d.useId)(),j=a.filter(e=>!e.panelHidden),N=(0,d.useCallback)((e,t)=>{u(a.map(a=>a.key!==e||a.visibilityDisabled?a:{...a,hidden:!0!==t}))},[u,a]);return(0,d.useEffect)(()=>(0,c.$p)({canMonitor(e){let{source:t}=e;return b(t.data)&&t.data.instanceId===v},onDrop(e){var t;let{source:r,location:s}=e;if(!b(r.data)||r.data.instanceId!==v)return;let l=s.current.dropTargets[0];if(!l||(t=l.data).type!==g||"string"!=typeof t.instanceId||"string"!=typeof t.key||l.data.instanceId!==v)return;let n=(0,o.S)(l.data);if("top"!==n&&"bottom"!==n)return;let i=(0,w.Ro)(a,r.data.key,l.data.key,n);i!==a&&u(i)}}),[v,u,a]),(0,r.jsxs)(l.Popover,{children:[(0,r.jsx)(l.PopoverTrigger,{asChild:!0,children:(0,r.jsx)("button",{type:"button",className:(0,i.cn)("text-t4 hover:text-t2 inl
1ine-flex size-4 cursor-pointer items-center justify-center transition-colors outline-none",p),"aria-label":null!=m?m:f("Displayed Columns"),children:(0,r.jsx)(s.Q,{className:t||"size-4"})})}),(0,r.jsxs)(l.PopoverContent,{align:"end",sideOffset:8,showArrow:!1,className:"!border-l1 !bg-m3 !shadow-2 !rounded-r3 w-[240px] !p-0",children:[(0,r.jsx)("div",{className:"flex h-10 items-center px-4",children:(0,r.jsxs)("div",{className:"flex w-full items-center justify-between gap-3",children:[(0,r.jsx)("div",{className:"text-c12 text-t3",children:null!=m?m:f("Displayed Columns")}),(0,r.jsx)("div",{className:"text-c12 text-t3 text-right",children:null!=h?h:f("Sort")})]})}),(0,r.jsx)("div",{className:"py-0",children:j.map(e=>(0,r.jsx)(y,{instanceId:v,option:e,renderLabel:x,onVisibilityChange:N},e.key))})]})]})}},23300:(e,t,a)=>{a.d(t,{JR:()=>v,Ay:()=>b});var r=a(79237),s=a(62309),l=a(53951),n=a(70659),i=a(46540),o=a(81742),c=a(66960),d=a(60173),x=a(19490),u=a(90477),m=a(18746),h=a(38113),p=a(94129);function f(e){let{visible:t=!1,displayContractName:a}=e,{item:f,dialogOpen:v,openDialog:b,closeDialog:j,flashClose:y}=(0,p.W)(),{theme:w}=(0,o.W)(),{$t:N,locale:k}=(0,c.B)(),S=t||v,[T,C]=(0,h.useState)(!1),[P,L]=(0,h.useState)(null);(0,h.useEffect)(()=>{t&&!v&&b(e.requestId)},[t]);let B=(0,h.useMemo)(()=>(null==f?void 0:f.direction)===1?"text-p2":"text-p3",[null==f?void 0:f.direction]),M=(0,h.useMemo)(()=>(null==f?void 0:f.direction)===1?"bg-p2":"bg-p3",[null==f?void 0:f.direction]),O=Number((null==f?void 0:f.unrealisedPnl)||0),_=a||x.Ay.toSeprator((null==f?void 0:f.contract)||"");return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(l.Dialog,{open:S,onOpenChange:e=>{e||j()},variant:"drawer",title:N("Voucher Position"),description:N("This position is opened with contract voucher; profits are withdrawable, and losses are offsettable."),className:"bg-m1 text-t1 z-1001 overflow-hidden p-0",headerClassName:"gap-s2 px-s6 pt-s6 !pb-0 mb:pb-s4",bodyClassName:"md:mt-s5 px-s6",footerClassName:"mt-s5 px-s6 pb-s6",footer:(0,r.jsx)(n.$,{variant:"secondary",size:"m",className:"w-full",onClick:()=>y(e.requestId,{success:N("Success_1")}),children:N("Flash Close")}),children:[(0,r.jsxs)("div",{className:"gap-s1 flex h-5 items-center",children:[(0,r.jsx)("div",{className:(0,u.cn)("h-4 w-1 shrink-0",M)}),(0,r.jsxs)("div",{className:"text-bm14 gap-s1 flex min-w-0 items-center whitespace-nowrap",children:[(0,r.jsx)("div",{className:"text-tm14 text-t1 truncate",children:_}),(0,r.jsx)("div",{className:"text-t3 shrink-0",children:N("Perp")}),(0,r.jsx)("div",{className:"text-t3 shrink-0",children:N("Isolated")}),(0,r.jsx)("div",{className:(0,u.cn)("text-mm14 shrink-0",B),children:((null==f?void 0:f.leverage)||0)+"X"})]})]}),(0,r.jsxs)("div",{"data-position-meta-list":!0,className:"mt-s4 gap-s3 flex flex-col",children:[(0,r.jsx)(g,{label:N("Holding"),value:"".concat(x.Ay.toSeprator((null==f?void 0:f.value)||0)," USDT")}),(0,r.jsx)(g,{label:N("Entry Price"),value:"".concat(x.Ay.toSeprator((null==f?void 0:f.avgPrice)||0)," USDT")}),(0,r.jsx)(g,{label:N("Margin"),value:"".concat(x.Ay.toSeprator((null==f?void 0:f.positionMargin)||0)," USDT")}),(0,r.jsx)(g,{label:N("Mark Price"),value:"".concat(x.Ay.toSeprator((null==f?void 0:f.markPrice)||0)," USDT")}),(0,r.jsxs)("div",{className:"text-bm14 gap-s4 flex min-h-5 items-center justify-between",children:[(0,r.jsx)(i.Tooltip,{className:"z-1002",content:N("Use the last price to calculate unrealized profit and loss and Return on Equity."),children:(0,r.jsxs)("div",{"data-position-pnl-label":!0,className:"text-t3 shrink-0 underline decoration-dotted underline-offset-2",children:[N("Unrealized PNL"),"(ROE)"]})}),(0,r.jsxs)("div",{className:"gap-s2 flex min-w-0 items-center justify-end",children:[(0,r.jsxs)("span",{className:(0,u.cn)("text-right",O>=0?"text-p2":"text-p3"),children:[function(e){let t=Number(e||0),a=t>0?"+":"";return"".concat(a).concat(x.Ay.toSeprator(t))}(null==f?void 0:f.unrealisedPnl)," (",function(e){let t=Number(e||0),a=x.Ay.toPercent(t)||"0.00%",r=t>0?"+":"";return"".concat(r).concat(a)}(null==f?void 0:f.roe),")"]}),(0,r.jsx)(s.l,{className:"text-t3 hover:text-t1 size-[14px] shrink-0 cursor-pointer",onClick:()=>{j(),L({theme:w,type:"perpetual",template:"positionMain",header:{label:"Perpetual"}
1,top:{symbol:{coin:(null==f?void 0:f.contract)?"".concat(f.contract.split("-")[0]):"",tags:[{type:"other",class:(null==f?void 0:f.direction)===1?"is-up":"is-down",label:(null==f?void 0:f.direction)===1?N("Long"):N("Short")},{type:"leverage",class:"is-primary",label:"".concat((null==f?void 0:f.leverage)||0,"X")}]},inset:{type:"perpetual"}},core:{rate:[{type:"roe",label:"".concat(N("ROE")),value:Number((null==f?void 0:f.roe)||0)},{type:"pnl",label:"".concat(N("PNL"),"(USDT)"),value:Number((null==f?void 0:f.unrealisedPnl)||0)}],menu:[{type:"default",label:"".concat(N("Entry Price")),value:Number((null==f?void 0:f.avgPrice)||0)},{type:"default",label:"".concat(N("Last Price")),value:Number((null==f?void 0:f.lastPrice)||0)}]},referral:{link:"".concat(window.location.origin).concat((0,d.Xt)("/invite/{0}",k))},check:{leverage:!0,pnl:!0,referral:!0}}),C(!0)}})]})]}),(0,r.jsx)(g,{label:N("Liq Price"),value:(0,r.jsx)("span",{className:"text-p1-dark",children:x.Ay.toSeprator((null==f?void 0:f.liquidationPrice)||0)})}),(0,r.jsx)(g,{label:N("Open Time"),value:x.Ay.tsToTime({value:(null==f?void 0:f.openTimeLong)||new Date().getTime(),format:"MM-DD HH:mm:ss"})}),(0,r.jsx)(g,{label:N("24h Auto-Close Time"),value:x.Ay.tsToTime({value:(null==f?void 0:f.closeTimeLong)||new Date().getTime(),format:"MM-DD HH:mm:ss"})})]})]}),T&&(0,r.jsx)(m.A,{id:"SHARE_LAYER_ID",config:P,onClose:()=>{L(null),C(!1)}})]})}function g(e){let{label:t,value:a}=e;return(0,r.jsxs)("div",{className:"text-cm12 md:text-bm14 gap-s4 flex min-h-5 items-center justify-between",children:[(0,r.jsx)("div",{className:"text-t3 shrink-0",children:t}),(0,r.jsx)("div",{className:"text-t1 min-w-0 text-right",children:a})]})}function v(e){let{visible:t,requestId:a,onSuccess:s,onClose:l}=e,{fetchPositionInfo:n,setOnSuccess:i,setOnClose:o}=(0,p.W)();return(0,h.useEffect)(()=>{s&&i(s),l&&o(l)},[s,l,i,o]),(0,h.useEffect)(()=>{t&&n(a)},[t,a]),(0,r.jsx)(f,{...e})}let b=v},24631:(e,t,a)=>{a.d(t,{T:()=>n});var r=a(79237),s=a(56233);let l=["all","sell","buy"];function n(e){let{value:t,onValueChange:a}=e;return(0,r.jsx)("div",{className:"flex w-0 flex-1 items-center gap-[12px]",children:l.map(e=>{let l=t===e;return(0,r.jsx)("div",{onClick:()=>a(e),className:"cursor-pointer",children:(0,r.jsx)(s.g,{view:e,active:l})},e)})})}},24900:(e,t,a)=>{a.d(t,{s:()=>x});var r=a(79237),s=a(90910),l=a(69938),n=a(81742),i=a(90477),o=a(83125);let c=[1,2],d={1:{light:"https://cdn.tapbit.mobi/next-web/futures/modal-show-2-light.png",dark:"https://cdn.tapbit.mobi/next-web/futures/modal-show-2-dark.png"},2:{light:"https://cdn.tapbit.mobi/next-web/futures/modal-show-1-light.png",dark:"https://cdn.tapbit.mobi/next-web/futures/modal-show-1-dark.png"}};function x(e){let{value:t,onValueChange:a}=e,{theme:x}=(0,n.W)(),u="dark"===x?"dark":"light";return(0,r.jsxs)(l.Popover,{trigger:"hover",children:[(0,r.jsx)(l.PopoverTrigger,{asChild:!0,children:(0,r.jsx)("button",{type:"button",className:"text-t3 hover:text-t1 flex size-6 cursor-pointer items-center justify-center","aria-label":"Order book layout switch",children:(0,r.jsx)(s.Q,{className:"size-4"})})}),(0,r.jsx)(l.PopoverContent,{align:"end",side:"bottom",sideOffset:8,showArrow:!1,className:"rounded-r3 border-l1 bg-m3 w-auto p-[20px]",children:(0,r.jsx)("div",{className:"flex items-center gap-[14px]",children:c.map(e=>{let s=t===e;return(0,r.jsx)(l.PopoverClose,{asChild:!0,children:(0,r.jsx)("button",{type:"button",onClick:()=>a(e),className:(0,i.cn)("cursor-pointer rounded-[3px] border p-[8px] transition-colors",s?"border-p1":"hover:border-l1 border-transparent"),children:(0,r.jsx)(o.Image,{src:d[e][u],alt:"",width:88,height:116,dpi:2,unoptimized:!0,className:"pointer-events-none select-none"})})},e)})})})]})}},25318:(e,t,a)=>{a.d(t,{Y:()=>o});var r=a(41760),s=a(96620),l=a(12733),n=a(17883),i=a(92413);function o(){let e=(0,i.T)(),t=(0,l.bZ)(t=>t.symbolsConfigBySymbol[e]),a=(0,r.N1)(e?s.p.USDT.SIMPLE_TICKER(e):void 0),o=!!(e&&!t),c=!!(t&&(0,n.D2)(t.contractScope)),d=!!(e&&(null==a?void 0:a.symbol)===e),x=!!(o||c&&e&&!d);return{active:!!(c&&d&&(0,n.w0)(a)),pending:x,symbol:e,ticker:a}}},27308:(e,t,a)=>{a.r(t),a.d(t,{PcShell:()=>eE});var r=a(79237),s=a(56042),l=a(43972),n=a(30511),i=a(4058),o=a(51038),c=a(38113),d=a(91559),x=a(39921),u=a(53710);a(87869),a(43154);
1var m=a(76656),h=a(31913),p=a(2293),f=a(87300),g=a(78493);function v(){let{actions:e,state:t}=(0,g.b)();return(0,r.jsx)(f.e2,{theme:t.theme,onLayoutReset:e.handleLayoutReset,onSettingsClick:e.handleSettingsClick,onThemeClick:e.handleThemeClick})}var b=a(66960),j=a(47575),y=a(53303),w=a(43231),N=a(87052),k=a(47606);function S(){let{locale:e}=(0,b.B)(),{summary:t}=(0,g.b)();return(0,r.jsx)(j.e,{summary:t,symbolSearchSlot:(0,r.jsx)(N.T,{desktopSubtitlePrefixSlot:(0,r.jsx)(w.K,{})}),showLastPriceChange:!0,markPriceTooltip:(0,r.jsx)(k.o,{locale:e,symbol:t.symbol}),fundingRateSlot:(0,r.jsx)(y.E,{})})}var T=a(62393),C=a(24900),P=a(97781),L=a(92413),B=a(27644),M=a(43129),O=a(72433),_=a(12733),z=a(24631),E=a(50048),R=a(39450),H=a(35263),I=a(50428),A=a(70783),D=a(40249),W=a(68924);function F(){var e;let{$t:t}=(0,b.B)(),a=(0,L.T)(),{getQuantity:s,precision:l}=(0,B.A)({symbol:a}),n=(0,_.bZ)(e=>{var t;return null==(t=e.symbolsConfigBySymbol[a])?void 0:t.precision}),{orderBookView:i,setOrderBookView:o,mergedPrec:d,setMergedPrec:x,clearMergedPrec:u}=(0,M.J)((0,m.k)(e=>({orderBookView:e.orderBookView,setOrderBookView:e.setOrderBookView,mergedPrec:e.mergedPrec,setMergedPrec:e.setMergedPrec,clearMergedPrec:e.clearMergedPrec}))),h=(0,c.useRef)(null),p=(0,A.A)(h),{unit:f,buyRatio:g,sellRatio:v,visibleAskList:j,visibleBidList:y,max:w,showAskList:N,showBidList:k,handleDepthFill:S}=(0,D.f)({symbol:a,panelHeight:null!=(e=null==p?void 0:p.height)?e:0,centerHeight:44,rowHeight:20,dualSideFallbackRows:8,singleSideFallbackRows:16,roundMode:"ceil"});return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"flex h-[36px] items-center px-[16px]",children:[(0,r.jsx)(z.T,{value:i,onValueChange:o}),(0,r.jsx)("div",{className:"flex shrink-0 items-center justify-end",children:(0,r.jsx)(E.y,{symbol:a,pricePrecision:n,mergedPrec:d,setMergedPrec:x,clearMergedPrec:u})})]}),(0,r.jsxs)("div",{className:"grid min-h-6 grid-cols-3 items-center gap-[2px] px-[16px]",children:[(0,r.jsx)("div",{className:"text-c12 text-t3 min-w-0 truncate",children:t("Price")}),(0,r.jsxs)("div",{className:"text-c12 text-t3 flex min-w-0 flex-wrap justify-end text-right leading-4",children:[(0,r.jsx)("span",{className:"max-w-full shrink-0 truncate whitespace-nowrap",children:t("key_qty_1_3_11_copy")}),(0,r.jsxs)("span",{className:"max-w-full shrink-0 truncate whitespace-nowrap",children:["(",f,")"]})]}),(0,r.jsxs)("div",{className:"text-c12 text-t3 flex min-w-0 flex-wrap justify-end text-right leading-4",children:[(0,r.jsx)("span",{className:"max-w-full shrink-0 truncate whitespace-nowrap",children:t("Total_4")}),(0,r.jsxs)("span",{className:"max-w-full shrink-0 truncate whitespace-nowrap",children:["(",f,")"]})]})]}),(0,r.jsx)("div",{ref:h,className:"relative flex h-1 flex-1 flex-col px-[16px]",children:(0,r.jsx)(R.E,{variant:"pc",asks:j,bids:y,showAskList:N,showBidList:k,max:w,onDepthFill:S,precision:l,getQuantity:s,centerSlot:(0,r.jsx)(H.C,{symbol:a,getMarkPricePath:W.Gj})})}),(0,r.jsx)(I.q,{buyRatio:g,sellRatio:v})]})}let q=(0,c.memo)(function(e){let{isSplitLayout:t,activeTab:a,onActiveTabChange:s,orderBookLabel:l,layoutMode:n,onLayoutModeChange:i}=e;return(0,r.jsxs)("div",{className:"border-l3 flex h-[40px] items-center justify-between border-b px-[16px]",children:[t?(0,r.jsx)("div",{className:"text-m14 text-t1",children:l}):(0,r.jsx)(T.K,{value:a,onValueChange:s}),(0,r.jsx)(C.s,{value:n,onValueChange:i})]})});q.displayName="OrderBookTradesHeader";let U=(0,c.memo)(function(){let{$t:e}=(0,b.B)(),t=e("Order Book"),a=e("Trades"),s=(0,L.T)(),{unit:l,getQuantity:n}=(0,B.A)({symbol:s}),{layoutMode:o,setLayoutMode:d}=(0,M.J)((0,m.k)(e=>({layoutMode:e.orderBookLayoutMode,setLayoutMode:e.setOrderBookLayoutMode}))),x=(0,O.n)(e=>e.currentBreakpoint),[u,h]=(0,c.useState)("orderBook"),p=x===i.EA.Sm,f=1===o,g=f||"orderBook"===u,v={symbol:s,unit:l,getQuantity:n,layoutMode:o,onLayoutModeChange:d};return((0,c.useEffect)(()=>{1===o&&"trades"===u&&h("orderBook")},[u,o]),p)?(0,r.jsx)("section",{"data-component":"OrderBookTradesPanel",className:"h-full overflow-hidden",children:(0,r.jsxs)("div",{className:"flex h-full min-h-0",children:[(0,r.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col",children:[(0,r.jsx)("div",{className:"border-l1 flex h-[40px] items-center border-b px-[16px]",children:(0,r.jsx)("div",{className:"text-m14 text-t1",children:t})}),(0,r.jsx)(F,{})]}
1),(0,r.jsx)("div",{"aria-hidden":!0,className:"bg-bg5 h-full shrink-0",style:{width:i.jS[0]}}),(0,r.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col",children:[(0,r.jsx)("div",{className:"border-l1 flex h-[40px] items-center border-b px-[16px]",children:(0,r.jsx)("div",{className:"text-m14 text-t1",children:a})}),(0,r.jsx)(P.b,{...v,showHeader:!1})]})]})}):(0,r.jsx)("section",{"data-component":"OrderBookTradesPanel",className:"h-full overflow-hidden",children:(0,r.jsxs)("div",{className:"flex h-full flex-col",children:[(0,r.jsxs)("div",{className:"flex min-h-0 flex-col",style:{flex:f?"427 1 0%":"1 1 0%"},children:[(0,r.jsx)(q,{isSplitLayout:f,activeTab:u,onActiveTabChange:h,orderBookLabel:t,layoutMode:o,onLayoutModeChange:d}),g?(0,r.jsx)(F,{}):(0,r.jsx)(P.b,{...v,showHeader:!1})]}),f?(0,r.jsx)("div",{className:"border-l3 flex min-h-0 flex-col border-t",style:{flex:"173 1 0%"},children:(0,r.jsx)(P.b,{...v})}):null]})})});U.displayName="OrderBookTradesPanel";var V=a(24800),K=a(749),Q=a(39824),G=a(72219),J=a(19698),X=a(58454),Y=a(65375);let Z=c.forwardRef((e,t)=>(0,r.jsx)(Y.B,{ref:t,viewBox:"0 0 1024 1024",...e,children:(0,r.jsx)("path",{d:"M491.392 254.976c-62.336 19.328-127.232 39.424-192.704 39.424a611.84 611.84 0 0 1-115.328-10.88 976.96 976.96 0 0 0-48.576-8.704 96 96 0 0 0-9.6-0.896 74.88 74.88 0 0 0-0.832 7.552c-0.64 9.344-0.64 22.4-0.64 42.304v458.624a178.176 178.176 0 0 0 0 4.608 42.432 42.432 0 0 0 2.048 3.136c22.4 9.664 73.28 24.768 172.928 24.768 79.04 0 148.928-19.712 217.984-40.96 5.312-1.6 10.624-3.2 15.936-4.928 62.336-19.328 127.232-39.424 192.704-39.424 43.52 0 82.432 4.608 115.328 10.88 22.4 4.352 37.568 7.296 48.576 8.704 4.608 0.64 7.68 0.832 9.6 0.896a73.6 73.6 0 0 0 0.832-7.552c0.64-9.344 0.64-22.4 0.64-42.304V241.6 237.44l-0.064-0.448a33.856 33.856 0 0 0-2.048-3.136c-22.336-9.664-73.216-24.768-172.8-24.768-79.104 0-148.992 19.712-218.112 40.96-5.248 1.6-10.56 3.2-15.872 4.928z m409.216 495.104h-0.128zM123.392 273.92h0.128z m361.28-97.28c69.568-21.44 149.12-44.352 240.64-44.352 108.16 0 170.304 16.512 204.608 31.616l0.32 0.192a66.752 66.752 0 0 1 21.76 14.848c4.992 4.736 9.216 10.88 11.584 14.528 2.368 3.648 6.336 10.048 8.64 16.576 4.864 13.312 4.864 22.72 4.864 31.04v460.416c0 18.304 0 33.92-0.832 46.08-0.768 11.52-2.496 26.816-10.24 40.128a80.064 80.064 0 0 1-18.112 21.952 80 80 0 0 1-24.96 13.632c-15.104 5.312-31.872 3.648-43.84 2.048-13.44-1.792-30.848-5.12-51.776-9.152l-1.216-0.256a535.296 535.296 0 0 0-100.8-9.536c-53.312 0-107.328 16.64-172.8 36.864l-13.248 4.096c-69.504 21.44-148.992 44.352-240.64 44.352-108.16 0-170.24-16.512-204.544-31.616l-0.32-0.192a66.304 66.304 0 0 1-21.76-14.848 85.312 85.312 0 0 1-11.584-14.528 85.376 85.376 0 0 1-8.64-16.576 81.536 81.536 0 0 1-4.864-31.04V322.56c0-18.304 0-33.92 0.832-46.08 0.768-11.52 2.432-26.816 10.24-40.128a80 80 0 0 1 18.112-21.952 80 80 0 0 1 24.96-13.632c15.104-5.312 31.872-3.648 43.84-2.048 13.44 1.792 30.848 5.12 51.776 9.152l1.216 0.256c28.672 5.504 62.72 9.536 100.8 9.536 53.312 0 107.328-16.64 172.8-36.864l13.184-4.096zM768 345.6a38.4 38.4 0 0 1 38.4 38.4v170.688a38.4 38.4 0 1 1-76.8 0V384a38.4 38.4 0 0 1 38.4-38.4zM512 443.712a68.288 68.288 0 1 0 0 136.576 68.288 68.288 0 0 0 0-136.576zM366.912 512a145.088 145.088 0 1 1 290.176 0 145.088 145.088 0 0 1-290.176 0zM256 430.912a38.4 38.4 0 0 1 38.4 38.4V640a38.4 38.4 0 1 1-76.8 0V469.312a38.4 38.4 0 0 1 38.4-38.4z"})}));Z.displayName="CouponPositionTipIcon";var $=a(76562),ee=a(51924),et=a(69938),ea=a(70659),er=a(19490),es=a(69534),el=a(90477),en=a(94129),ei=a(23300);let eo="couponPositionTipShow";function ec(e){var t,a;let{activeTab:s,isLogged:l=!0}=e,{$t:n}=(0,b.B)(),{item:i,fetchPositionInfo:o,openDialog:d}=(0,en.W)((0,m.k)(e=>({item:e.item,fetchPositionInfo:e.fetchPositionInfo,openDialog:e.openDialog}))),[x,u]=(0,c.useState)(!1),h="positions"===s,p=!!((null==i?void 0:i.contract)&&(null==i?void 0:i.active)!==0);(0,c.useEffect)(()=>{u(!es.xM.getItem(eo))},[]),(0,c.useEffect)(()=>{if(!l||!h)return;o();let e=window.setInterval(()=>{o()},18e4);return()=>{window.clearInterval(e)}},[o,l,h]);let f=()=>{u(!1),es.xM.setItem(eo,"hide")},g=(0,c.useCallback)(()=>{o()},[o]);if(!l||!h||!p)return null;let v=function(e){let t=Number(null!=e?e:0);return t>0?"text-p2":t<0?"text-p3":"text-t1"}(null==i?void 0:i.unrealisedPnl),j=function(e){if(!e)return;let[t]=e.trim().toUpperCase().split("-");return t?"".concat(t,"USDT"):void 0}(null==i?void 0:i.contract);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{"data-component":"CouponPositionBanner",className:"px-s4 pt-s3",children:(0,r.jsxs)(et.Popover,{open:x,children:[(0,r.jsx)(et.PopoverTrigger,{asChild:!0,children:(0,r.jsxs)("button",{type:"button",className:"gap-s2 text-t2 inl
1ine-flex h-7 w-fit max-w-full cursor-pointer items-center rounded-[2px] border-none bg-[rgba(255,153,0,0.2)] px-[10px] text-[12px] leading-7 transition-colors hover:bg-[rgba(255,153,0,0.24)]",onClick:()=>{d(null==i?void 0:i.requestId)},children:[(0,r.jsx)(Z,{"aria-hidden":!0,className:"size-4 shrink-0 text-[#FFBB00]"}),(0,r.jsxs)("span",{className:"shrink-0 text-[14px] leading-7 text-[#FFBB00]",children:[n("Voucher Position"),":"]}),(0,r.jsxs)("span",{className:"min-w-0 truncate",children:[n("Holding"),": ",(0,r.jsx)("span",{className:"text-t1",children:(0,er.iT)(null!=(t=null==i?void 0:i.value)?t:0)})]}),(0,r.jsxs)("span",{className:"min-w-0 truncate",children:[n("Unrealized PNL"),":"," ",(0,r.jsx)("span",{className:(0,el.cn)(v),children:(0,er.iT)(null!=(a=null==i?void 0:i.unrealisedPnl)?a:0)})]}),(0,r.jsx)($.Y,{"aria-hidden":!0,className:"size-3 shrink-0 text-[#FFBB00]"})]})}),(0,r.jsxs)(et.PopoverContent,{align:"start",side:"top",sideOffset:8,className:"rounded-r2 p-s4 w-[312px] border-none bg-[#FFBB00] text-white shadow-none [--color-l1:#FFBB00] [--color-m3:#FFBB00]",children:[(0,r.jsxs)("div",{className:"gap-s3 flex items-center justify-between",children:[(0,r.jsx)("div",{className:"text-[16px] leading-[22px] font-bold text-white",children:n("Voucher Order Tips")}),(0,r.jsx)("button",{type:"button",className:"flex size-5 shrink-0 cursor-pointer items-center justify-center text-white hover:text-white","aria-label":n("Close"),onClick:f,children:(0,r.jsx)(ee.U,{"aria-hidden":!0,className:"size-5"})})]}),(0,r.jsx)("div",{className:"mt-s3 text-[14px] leading-5 text-white",children:n("Congratulations! You've received a contract voucher.")}),(0,r.jsx)("div",{className:"mt-s3 text-[14px] leading-5 text-white",children:n("You can go to the coupon center to open a position with your voucher and check your position there or here.")}),(0,r.jsx)("div",{className:"mt-s3 flex justify-end",children:(0,r.jsx)(ea.$,{type:"button",variant:"white",size:"xs",className:"h-[30px] rounded-[2px] border-none bg-white px-4 text-[14px] leading-5 font-normal text-[#e6a800] before:hidden hover:bg-white hover:text-[#e6a800]",onClick:f,children:n("OK, I Got it")})})]})]})}),(0,r.jsx)(ei.Ay,{displayContractName:j,onSuccess:g})]})}var ed=a(29153),ex=a(812),eu=a(48157),em=a(24626),eh=a(20156),ep=a(36506),ef=a(88926);function eg(e){let{columnOptions:t,onChange:a}=e,{$t:s}=(0,b.B)(),l={symbol:s("Symbol_r_1"),quantity:s("Available/Holding"),avgPrice:s("Entry Price"),positionMargin:s("Margin_r_1"),markPrice:s("Mark Price_r_1"),unrealisedPnl:s("Unrealized PNL(ROE)"),realisedPnl:s("Realized PNL"),liquidationPrice:s("Liq Price_r_1"),marketClose:s("Market_r_1"),operation:s("Operation_r_1"),reverse:s("Reverse"),tpsl:s("TP/SL"),positionTPSL:s("Position TP/SL"),weight:s("ADL")};return(0,r.jsx)(ef.q,{columnOptions:t,columnLabels:l,onChange:a})}function ev(e){let{activeTab:t}=e,{$t:a}=(0,b.B)(),{showHideOther:s,hideOtherChecked:l,onHideOtherChange:n,showBulkAction:i,bulkActionLabel:o,openBulkActionDialog:c,showSettings:d,settingsKind:x,copyTradeIsTrader:u,positionColumnOptions:m,setPositionColumnOptions:h,copyTradePositionColumnOptions:p,setCopyTradePositionColumnOptions:f,leadingTradePositionColumnOptions:g,setLeadingTradePositionColumnOptions:v}=(0,ep.kk)(t);return s||i||d?(0,r.jsxs)("div",{"data-component":"StandardContractActionBar",className:"hidden shrink-0 items-center gap-4 pr-4 pl-6 md:flex",children:[s?(0,r.jsxs)(em.Checkbox.Label,{className:"gap-1",children:[(0,r.jsx)(em.Checkbox.Control,{checked:l,onCheckedChange:e=>n(!0===e)}),(0,r.jsx)(em.Checkbox.Text,{className:"text-c12 text-t3 whitespace-nowrap",children:a("Hide Other Symbols")})]}):null,i?(0,r.jsx)("button",{type:"button",className:"text-m12 text-p1-dark cursor-pointer leading-4 whitespace-nowrap",onClick:c,children:o}):null,d?"positions"===x?(0,r.jsx)(eg,{columnOptions:m,onChange:h}):"copyTrade"===x?(0,r.jsx)(eh._,{columnOptions:u?g:p,onChange:u?v:f}):null:null]}):null}var eb=a(60886),ej=a(89505),ey=a(86617);function ew(){let e=(0,M.J)(e=>e.activeContractTab),t=(0,G.Z)();return(0,r.jsxs)("div",{className:"flex h-full min-h-0 flex-col",children:[(0,r.jsxs)("div",{className:'after:bg-l3 relative flex min-h-10 items-stretch justify-between after:absolute after:right-0 after:bottom-0 after:left-0 after:h-px after:content-[""]',children:[(0,r.jsx)(J.k,{className:"h-full [&>div]:h-full [&>div]:!border-b-0 [&>div>[data-slot=scroll-area]]:h-full",listClassName:"h-full w-full justify-start gap-5 bg-transparent px-0",triggerClassName:"h-full"}),(0,r.jsx)(ev,{activeTab:e})]}),(0,r.jsx)("div",{className:"min-h-0 flex-1",children:(0,r.jsxs)(Q.E,{...t,children:["positions"===e&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(ec,{activeTab:e,isLogged:t.isLogged}),(0,r.jsx)(eu.X,{})]}),"openOrders"===e&&(0,r.jsx)(ed.o,{}),"triggerOrders"===e&&(0,r.jsx)(ey.o,{}),"ordersHistory"===e&&(0,r.jsx)(ex.Y,{}),"tpsl"===e&&(0,r.jsx)(eb.a,{}),"transactionHistory"===e&&(0,r.jsx)(ej.BV,{}),"copyTrade"===e&&(0,r.jsx)(X.e,{})]})})]})}var eN=a(20757),ek=a(46540),eS=a(51025),eT=a(89719),eC=a(50697),eP=
1a(50324),eL=a(90877),eB=a(97867);let eM="w-1 flex-1 h-[32px] !text-m12 !rounded-r1 text-t1",eO=(0,c.memo)(function(){let{$t:e,locale:t}=(0,b.B)(),a=(0,L.T)(),s=(0,eS.k)(e=>e.user),l=(0,eS.k)(e=>e.gotoLogin),n=!!(null==s?void 0:s.userId);return(0,r.jsxs)("div",{className:"pt-s4 flex gap-[8px]",children:[(0,r.jsx)(ea.$,{variant:"secondary",onClick:()=>{window.location.href="/".concat(t,"/wallet/deposit")},className:eM,children:e("Deposit")}),(0,r.jsx)(ea.$,{variant:"secondary",onClick:()=>{if(!n)return void l();(0,eC.F9)({values:{asset:"USDT",fromProduct:eP.X9.spot,toProduct:eP.X9.futures_usdt},customData:{assetDisabled:!1},onSuccess:()=>{(0,eB.xm)({locale:t,symbol:a}).catch(e=>{console.error("[WalletPanel] å·æ°åè½¬åæ°æ®å¤±è´¥:",e)})}})},className:eM,children:e("Transfer_1")})]})});function e_(e){let{label:t,tooltip:a,value:s,valueClassName:l="text-t1"}=e,n=(0,_.bZ)(e=>e.contractType);return(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)(ek.Tooltip,{content:(0,r.jsx)("span",{className:"text-c12",children:a}),side:"top",align:"center",children:(0,r.jsx)("div",{className:"text-t3 border-t4 text-mm12 w-fit cursor-help border-b border-dashed pb-px text-left",children:t})}),(0,r.jsxs)("div",{className:"direction-ltr text-mm12 break-all ".concat(l),children:[s," ",n]})]})}let ez={[i.SQ.Header]:(0,r.jsx)(function(){return(0,r.jsx)(p._,{tickerBar:(0,r.jsx)(S,{}),actionBar:(0,r.jsx)(v,{})})},{}),[i.SQ.ChartTabs]:(0,r.jsx)(h.ContractTradingView,{}),[i.SQ.OrderBookTrades]:(0,r.jsx)(U,{}),[i.SQ.PlaceOrder]:(0,r.jsx)(V._,{}),[i.SQ.TradingTables]:(0,r.jsx)(function(){let e=(0,M.J)(e=>e.strategyMode);return(0,r.jsx)("section",{"data-component":"TradingTablesPanel",className:"bg-bg7 h-full min-h-0 overflow-hidden",children:e===K.n1.Grid?(0,r.jsx)(eN.I,{}):(0,r.jsx)(ew,{})})},{}),[i.SQ.Wallet]:(0,r.jsx)(function(){let{$t:e}=(0,b.B)(),t=(0,eS.k)(e=>e.user),a=(0,eT.wc)(),s=!!(null==t?void 0:t.userId),{balance:l=0,unrealisedPnl:n=0,marginBalance:i=0}=(0,eL.t)(),o=e=>s?void 0===e?"--":er.Ay.toSeprator(e):"0.00";return(0,r.jsx)("section",{"data-component":"WalletPanel",className:"h-full overflow-hidden",children:(0,r.jsxs)("div",{className:"flex h-full flex-col",children:[(0,r.jsx)("div",{className:"text-t1 text-tm14 border-l3 flex h-10 shrink-0 items-center border-b px-4",children:e("Contract Wallet")}),(0,r.jsx)("div",{className:"flex-1 overflow-y-auto px-4 py-4",children:(0,r.jsxs)("div",{className:"flex h-full min-h-0 flex-col",children:[(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)(e_,{label:e("Wallet Balance"),tooltip:e("Wallet Balance=Transfer In-Transfer Out+Realized PNL"),value:o(l)}),(0,r.jsx)(e_,{label:e("Unrealized PNL_r_1"),tooltip:e("1"===a?"Unrealized PNL is calculated based on mark price.":"Unrealized PNL is calculated based on last price."),value:o(n)}),(0,r.jsx)(e_,{label:e("Total Value_r_1"),tooltip:e("Total Value=Wallet Balance+Unrealized PNL"),value:o(i)})]}),(0,r.jsx)(eO,{})]})})]})})},{})};function eE(e){let{themeReady:t}=e,{width:a,containerRef:s,mounted:l}=(0,d.zn)({measureBeforeMount:!0,initialWidth:0}),i=l&&a>0&&t;return(0,r.jsxs)("div",{className:"w-full pb-6",ref:s,children:[(0,r.jsx)(o.R,{}),i?(0,r.jsx)(eR,{width:a}):(0,r.jsx)("div",{className:"bg-bg5 fixed inset-0 z-[1100] flex items-center justify-center",role:"status","aria-busy":"true",children:(0,r.jsx)(n.t,{type:"global",size:"l"})})]})}function eR(e){let{width:t}=e,{persistedLayouts:a,setCoreLayouts:n,resetCoreLayouts:o}=(0,M.J)((0,m.k)(e=>({persistedLayouts:e.layouts,setCoreLayouts:e.setCoreLayouts,resetCoreLayouts:e.resetCoreLayouts}))),h=(0,c.useMemo)(()=>(function(e){let t=(0,i.Xs)();if(e)for(let[a,r]of Object.entries(e))Array.isArray(r)&&0!==r.length&&(t[a]=r.map(e=>({...e})));return(0,i.ld)(t)})(a),[a]),{layout:p,breakpoint:f,cols:g,setLayouts:v}=(0,d.sR)({width:t,breakpoints:i.LO,cols:i._1,layouts:h}),b=(0,O.n)(e=>e.layoutResetVersion),j=(0,O.n)(e=>e.setCurrentBreakpoint),y=(0,i.Kk)(t);return(0,c.useEffect)(()=>{j(f)},[f,j]),(0,c.useEffect)(()=>{0!==b&&(o(),v((0,i.Xs)()))},[b,o,v]),(0,r.jsx)("div",{className:"bg-bg5",children:(0,r.jsx)(x.JT,{positionStrategy:u.Bm,gridConfig:{cols:g,rowHeight:i.FL,margin:i.jS},dragConfig:{enabled:y,handle:".drag-handler"},resizeConfig:{enabled:y,handleComponent:y?(e,t)=>(0,r.jsx)("div",{ref:t,className:"resize-handler absolute right-0 bottom-0 z-10 cursor-se-resize opacity-0",children:(0,r.jsx)(s.K,{className:"text-t3 hover:text-t1 size-4"})}):void 0},width:t,onLayoutChange:e=>{n({...function(e){let t={};for(let[a,r]of Object.entries(e))Array.isArray(r)&&(t[a]=r.map(e=>({...e})));return t}(h),[f]:e.map(e=>({...e}))})},layout:p,children:p.map(e=>{let t=y&&!e.static;return(0,r.jsxs)("div",{className:"bg-bg7 text-t1 ".concat(t?"[&:hover>.drag-handler]:opacity-100 [&:hover>.resize-handler]:opacity-100":""),children:[(0,r.jsx)(l.W,{className:"drag-handler text-t3 hover:text-t1 absolute top-[6px] right-0 z-10 size-4 cursor-grab opacity-0"}),ez[e.i]]},e.i)})},b)})}},36434:(e,t,a)=>{a.r(t),a.d(t,{BaseProgress:()=>x,Progress:()=>d,ProgressStep:()=>u,progressVariants:()=>c});var r=a(79237),s=a(90477),l=a(99698),n=a(4487),i=a(6791),o=a(38113);let c=(0,n.F)("relative w-full overflow-visible",{variants:{size:{default:""}},defaultVariants:{size:"default"}}),d=o.forwardRef((e,t)=>
1{let{className:a,value:s=0,barHeight:l,barClassName:n,size:i,showIndicator:o=!1,indicatorColor:c,completedBarColor:d="var(--color-p1)",unCompletedBarColor:u="var(--color-bg6)",segmentOverlap:m}=e,h=Math.min(Math.max(s,0),100);return(0,r.jsxs)("div",{className:"flex w-full flex-col gap-1",children:[o&&(0,r.jsx)("div",{className:"h-s1 relative w-full",children:(0,r.jsx)("div",{className:"absolute top-[calc(-1*var(--spacing-s1))]",style:{left:"".concat(h,"%"),transform:"translate(-50%, -100%)"},children:(0,r.jsxs)("div",{className:"flex flex-col items-center shadow-[0px_2px_8px_0px_rgba(0,0,0,0.12)]",children:[(0,r.jsx)("div",{className:"p-s1 mb-[-5px] overflow-hidden rounded-[2px]",style:{backgroundColor:c||d},children:(0,r.jsxs)("p",{className:"text-p6 text-c12 text-center whitespace-nowrap",children:[s,"%"]})}),(0,r.jsx)("div",{className:"mb-[-5px] flex items-center justify-center",children:(0,r.jsx)("div",{className:"relative h-2.5 w-3.5",children:(0,r.jsx)("svg",{viewBox:"0 0 14 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"absolute inset-0 h-full w-full",children:(0,r.jsx)("path",{d:"M7 10L0.937822 0.25L13.0622 0.25L7 10Z",style:{fill:d}})})})})]})})}),(0,r.jsx)(x,{ref:t,className:a,value:h,barHeight:l,barClassName:n,completedBarColor:d,unCompletedBarColor:u,segmentOverlap:m,size:i})]})});d.displayName="Progress";let x=o.forwardRef((e,t)=>{let{className:a,value:n=0,barHeight:o,barClassName:d,completedBarColor:x="var(--color-p1)",unCompletedBarColor:u="var(--color-bg6)",segmentOverlap:m,size:h,style:p,...f}=e,g=null!=o?o:12,v=Math.max(2,Math.round(2*g/3));return(0,r.jsx)(l.bL,{ref:t,"data-slot":"progress",className:(0,s.Q)(c({size:h}),a),value:n,style:{...p,height:g},...f,children:(0,r.jsxs)("div",{className:(0,s.Q)("rounded-rb4 relative flex w-full items-center overflow-hidden",d),style:{height:g},children:[n>0&&(0,r.jsxs)("div",{className:"flex shrink-0 items-center",style:{width:"".concat(n,"%"),height:g},children:[(0,r.jsx)("div",{className:"flex-1",style:{height:g,backgroundColor:x}}),n<100&&(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:v,height:g,viewBox:"0 0 ".concat(v," ").concat(g),fill:"none",className:"shrink-0 rtl:rotate-180",children:(0,r.jsx)("path",{d:"M0 0H".concat(v,"L0 ").concat(g,"V0Z"),style:{fill:x}})})]}),n<100&&(0,r.jsxs)("div",{className:(0,s.Q)("flex grow items-center",(0,i.A)(m)?"-ml-s1 rtl:-mr-s1 rtl:ml-0":""),style:{height:g,...(0,i.A)(m)?null:{marginInlineStart:-m}},children:[n>0&&(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:v,height:g,viewBox:"0 0 ".concat(v," ").concat(g),fill:"none",className:"shrink-0 rotate-180 rtl:rotate-0",children:(0,r.jsx)("path",{d:"M0 0H".concat(v,"L0 ").concat(g,"V0Z"),style:{fill:u}})}),(0,r.jsx)("div",{className:"flex-1",style:{height:g,backgroundColor:u}})]})]})})});x.displayName="BaseProgress";let u=o.forwardRef((e,t)=>{let{className:a,items:l,current:n,...i}=e,c=l.map(e=>({...e,completed:e.step<n,current:e.step===n}));return(0,r.jsx)("div",{ref:t,className:(0,s.Q)("flex flex-col gap-2",a),...i,children:c.map((e,t)=>(0,r.jsxs)(o.Fragment,{children:[(0,r.jsxs)("div",{className:"flex items-start gap-3",children:[(0,r.jsx)("div",{className:(0,s.Q)("flex h-5.5 w-5.5 shrink-0 items-center justify-center rounded-full",e.completed||e.current?"bg-p1":"bg-bg6"),children:(0,r.jsx)("p",{className:(0,s.Q)("text-t12 w-5 text-center font-semibold",e.completed||e.current?"text-t1":"text-t3"),children:e.step})}),(0,r.jsx)("div",{className:"flex h-5.5 items-center",children:(0,r.jsx)("p",{className:(0,s.Q)("text-t14 text-center font-semibold whitespace-pre",e.completed||e.current?"text-t1":"text-t3"),children:e.title})})]}),t<c.length-1&&(0,r.jsx)("div",{className:"flex h-7.5 w-5.5 items-center justify-center",children:(0,r.jsx)("div",{className:(0,s.Q)("h-full w-0 border-l-2 border-dashed",e.completed?"border-p1":"border-bg6")})})]},e.step))})});u.displayName="ProgressStep"},37745:(e,t,a)=>{a.d(t,{f:()=>n});var r=a(79237),s=a(38113),l=a(65375);let n=s.forwardRef((e,t)=>(0,r.jsx)(l.B,{ref:t,viewBox:"0 0 1024 1024",...e,children:(0,r.jsx)("path",{d:"M849.92 495.786667a42.666667 42.666667 0 0 0-8.96-14.08l-213.333333-213.333334a42.837333 42.837333 0 1 0-60.586667 60.586667l140.8 140.373333H213.333333a42.666667 42.666667 0 1 0 0 85.333334h494.506667l-140.8 140.373333a42.752 42.752 0 0 0 13.866667 69.973333 42.752 42.752 0 0 0 46.72-9.386666l213.333333-213.333334c3.882667-4.053333 6.912-8.832 8.96-14.08a42.666667 42.666667 0 0 0 0-32.426666z"})}));n.displayName="ArrowRightIcon"},37966:(e,t,a)=>{a.d(t,{q:()=>c});var r=a(95496),s=a(43487),l=a(84605),n=a(43115),i=a(22675);function o(e,t){if(t)switch(e){case"openOrders":return r.yx.getState().hideOther?t:void 0;case"triggerOrders":return i.a5.getState().hideOther?t:void 0;case"ordersHistory":return s.dw.getState().hideOther?t:void 0;case"tpsl":return l.hv.getState().hideOther?t:void 0;default:return}}async function c(e,t){var a,c,d,x,u;let m=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};switch(e){case"positions":case"copyTrade":return;case"openOrders":await (0,r.j6)({pageNum:null!=(a=m.pageNum)?a:r.yx.getState().pagination.pageNum,symbol:o("openOrders",t)});return;case"triggerOrders":await (0,i.WJ)({pageNum:null!=(c=m.pageNum)?c:i.a5.getState().pagination.pageNum,symbol:o("triggerOrders",t)});return;case"ordersHistory":await (0,s.k2)({pageNum:null!=(d=m.pageNum)?d:s.dw.getState().pagination.pageNum,symbol:o("ordersHistory",t)});return;case"tpsl":await (0,l.JH)({pageNum:null!=(x=m.pageNum)?x:l.hv.getState().pagination.pageNum,symbol:o("tpsl",t)});return;case"transactionHistory":await (0,n.Fw)(),await (0,n.rp)({pageNum:null!=(u=m.pageNum)?u:n.tM.getState().pagination.pageNum,scene:n.tM.getState().scene});return}}},43115:(e,t,a)=>{a.d(t,{Fw:()=>g,rp:()=>f,tM:()=>p});var r=a(40323),s=a(88518),l=a(51025),n=a(86538),i=a(41809);let o={pageNum:1,pageSize:10,total:0},c=new r.J0,d=new r.J0;function x(e,t){let a=Number(e);return Number.isFinite(a)?a:t}function u(e){return Math.max(1,x(e,1))}function m(e){return Math.max(1,x(e,o.pageSize))}function h(){return{initialized:!1,items:[],loading:!1,pagination:{...o},scene:"",scenes:[],scenesInitialized:!1,scenesLoading:!1}}let p=(0,i.v)()((e,t)=>
1({...h(),loadData:async function(){var a,r,n,i,o,d,h;let p=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},f=null==(a=l.k.getState().user)?void 0:a.userId;if(!f)return void t().resetRuntime();let{pagination:g,scene:v}=t(),b=u(null!=(r=p.pageNum)?r:g.pageNum),j=m(null!=(n=p.pageSize)?n:g.pageSize),y=null!=(i=p.scene)?i:v,w={...p,pageNum:b,pageSize:j,scene:y,userId:Number(f)};void 0!==p.scene&&p.scene!==v&&e({scene:p.scene}),e({loading:!0});try{let t=await c.batch(["orders.bills",f,w.scene||"all",b,j].join(":"),()=>(0,s.xR)({params:w})),a=null==t?void 0:t.data;e({initialized:!0,items:Array.isArray(null==a?void 0:a.list)?a.list:[],loading:!1,pagination:(o={pageNum:b,pageSize:j},{pageNum:u(null!=(d=null==a?void 0:a.pageNum)?d:o.pageNum),pageSize:m(null!=(h=null==a?void 0:a.pageSize)?h:o.pageSize),total:x(null==a?void 0:a.total,0),totalPage:x(null==a?void 0:a.pages,0)})})}catch(t){e({loading:!1}),console.error("[TradingTablesTransactionHistoryStore] å è½½ Transaction History 失败:",t)}},loadScenes:async()=>{if(!t().scenesLoading){e({scenesLoading:!0});try{let t=await d.batch("orders.billScenes",()=>(0,s.lf)({params:{}}));e({scenes:Array.isArray(null==t?void 0:t.data)?t.data:[],scenesInitialized:!0,scenesLoading:!1})}catch(t){e({scenesLoading:!1}),console.error("[TradingTablesTransactionHistoryStore] å è½½ Transaction History åºæ¯å¤±è´¥:",t)}}},resetRuntime:()=>e(h()),setData:t=>e(e=>({initialized:!0,items:t.items,loading:!1,pagination:t.pagination?{...t.pagination}:e.pagination})),setScene:t=>e({scene:t}),setScenes:t=>e({scenes:t,scenesInitialized:!0,scenesLoading:!1}),setLoading:t=>e({loading:t}),setScenesLoading:t=>e({scenesLoading:t}),setPageNum:t=>e(e=>({pagination:{...e.pagination,pageNum:u(t)}}))}));async function f(e){await p.getState().loadData(e)}async function g(){await p.getState().loadScenes()}(0,n.A)(e=>{p.getState().loadData(e)},3e3,{leading:!0,trailing:!0}),(0,n.A)(()=>{p.getState().loadScenes()},3e3,{leading:!0,trailing:!0})},43972:(e,t,a)=>{a.d(t,{W:()=>n});var r=a(79237),s=a(38113),l=a(65375);let n=s.forwardRef((e,t)=>(0,r.jsx)(l.B,{ref:t,viewBox:"0 0 1024 1024",...e,children:(0,r.jsx)("path",{d:"M537.961412 860.039529a54.211765 54.211765 0 0 1 54.211764-54.211764h301.176471a54.211765 54.211765 0 0 1 0 108.423529h-301.176471a54.211765 54.211765 0 0 1-54.211764-54.211765zM537.961412 538.804706a54.211765 54.211765 0 0 1 54.211764-54.211765h301.176471a54.211765 54.211765 0 0 1 0 108.42353h-301.176471a54.211765 54.211765 0 0 1-54.211764-54.211765zM537.961412 217.569882a54.211765 54.211765 0 0 1 54.211764-54.211764h301.176471a54.211765 54.211765 0 0 1 0 108.423529h-301.176471a54.211765 54.211765 0 0 1-54.211764-54.211765z"})}));n.displayName="DragIcon"},46571:(e,t,a)=>{a.r(t),a.d(t,{PcShell:()=>ev});var r=a(79237),s=a(56042),l=a(43972),n=a(30511),i=a(4058),o=a(51038),c=a(38113),d=a(91559),x=a(39921),u=a(53710);a(87869),a(43154);var m=a(76656),h=a(21415),p=a(2293),f=a(37745),g=a(66960),v=a(87300),b=a(61877),j=a.n(b),y=a(559);function w(){let{$t:e}=(0,g.B)(),{actions:t,state:a}=(0,y.b)();return(0,r.jsx)(v.e2,{theme:a.theme,beforeCommonActionsSlot:(0,r.jsxs)(j(),{href:a.liveTradingHref,"aria-label":e("Live Trading"),className:v.nj,children:[(0,r.jsx)(f.f,{"aria-hidden":"true",className:"size-4 shrink-0 rotate-180 rtl:rotate-0"}),e("Live Trading")]}),onLayoutReset:t.handleLayoutReset,onSettingsClick:t.handleSettingsClick,onThemeClick:t.handleThemeClick})}var N=a(47575),k=a(26811),S=a(15977),T=a(5684);function C(){let{$t:e,locale:t}=(0,g.B)(),{summary:a}=(0,y.b)();return(0,r.jsx)(N.e,{summary:a,symbolSearchSlot:(0,r.jsx)(S.T,{}),showLastPriceChange:!0,markPriceTooltip:(0,r.jsx)(T.o,{locale:t,symbol:a.symbol}),fundingRateSlot:(0,r.jsx)(k.E,{}),showOpenInterest:!1,volumeLabel:e("24h Vol_r_1"),volumeValue:"".concat(a.volumeText).concat(a.volumeUnit)})}var P=a(62393),L=a(24900),B=a(97781),M=a(21219),O=a(97430),_=a(2639),z=a(68699),E=a(52293),R=a(24631),H=a(50048),I=a(39450),A=a(35263),D=a(50428),W=a(70783),F=a(16591),q=a(24558);function U(){var e;let{$t:t}=(0,g.B)(),a=(0,M.T)(),{getQuantity:s,precision:l}
1=(0,O.A)({symbol:a}),n=(0,E.bZ)(e=>{var t;return null==(t=e.symbolsConfigBySymbol[a])?void 0:t.precision}),{orderBookView:i,setOrderBookView:o,mergedPrec:d,setMergedPrec:x,clearMergedPrec:u}=(0,_.J)((0,m.k)(e=>({orderBookView:e.orderBookView,setOrderBookView:e.setOrderBookView,mergedPrec:e.mergedPrec,setMergedPrec:e.setMergedPrec,clearMergedPrec:e.clearMergedPrec}))),h=(0,c.useRef)(null),p=(0,W.A)(h),{unit:f,buyRatio:v,sellRatio:b,visibleAskList:j,visibleBidList:y,max:w,showAskList:N,showBidList:k,handleDepthFill:S}=(0,F.f)({symbol:a,panelHeight:null!=(e=null==p?void 0:p.height)?e:0,centerHeight:44,rowHeight:20,dualSideFallbackRows:8,singleSideFallbackRows:16,roundMode:"ceil"});return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"flex h-[36px] items-center px-[16px]",children:[(0,r.jsx)(R.T,{value:i,onValueChange:o}),(0,r.jsx)("div",{className:"flex shrink-0 items-center justify-end",children:(0,r.jsx)(H.y,{symbol:a,pricePrecision:n,mergedPrec:d,setMergedPrec:x,clearMergedPrec:u})})]}),(0,r.jsxs)("div",{className:"grid min-h-6 grid-cols-3 items-center gap-[2px] px-[16px]",children:[(0,r.jsx)("div",{className:"text-c12 text-t3 min-w-0 truncate",children:t("Price")}),(0,r.jsxs)("div",{className:"text-c12 text-t3 flex min-w-0 flex-wrap justify-end text-right leading-4",children:[(0,r.jsx)("span",{className:"max-w-full shrink-0 truncate whitespace-nowrap",children:t("key_qty_1_3_11_copy")}),(0,r.jsxs)("span",{className:"max-w-full shrink-0 truncate whitespace-nowrap",children:["(",f,")"]})]}),(0,r.jsxs)("div",{className:"text-c12 text-t3 flex min-w-0 flex-wrap justify-end text-right leading-4",children:[(0,r.jsx)("span",{className:"max-w-full shrink-0 truncate whitespace-nowrap",children:t("Total_4")}),(0,r.jsxs)("span",{className:"max-w-full shrink-0 truncate whitespace-nowrap",children:["(",f,")"]})]})]}),(0,r.jsx)("div",{ref:h,className:"relative flex h-1 flex-1 flex-col px-[16px]",children:(0,r.jsx)(I.E,{variant:"pc",asks:j,bids:y,showAskList:N,showBidList:k,max:w,onDepthFill:S,precision:l,getQuantity:s,centerSlot:(0,r.jsx)(A.C,{symbol:a,getMarkPricePath:q.Gj})})}),(0,r.jsx)(D.q,{buyRatio:v,sellRatio:b})]})}let V=(0,c.memo)(function(e){let{isSplitLayout:t,activeTab:a,onActiveTabChange:s,orderBookLabel:l,layoutMode:n,onLayoutModeChange:i}=e;return(0,r.jsxs)("div",{className:"border-l3 flex h-[40px] items-center justify-between border-b px-[16px]",children:[t?(0,r.jsx)("div",{className:"text-m14 text-t1",children:l}):(0,r.jsx)(P.K,{value:a,onValueChange:s}),(0,r.jsx)(L.s,{value:n,onValueChange:i})]})});V.displayName="OrderBookTradesHeader";let K=(0,c.memo)(function(){let{$t:e}=(0,g.B)(),t=e("Order Book"),a=e("Trades"),s=(0,M.T)(),{unit:l,getQuantity:n}=(0,O.A)({symbol:s}),{layoutMode:o,setLayoutMode:d}=(0,_.J)((0,m.k)(e=>({layoutMode:e.orderBookLayoutMode,setLayoutMode:e.setOrderBookLayoutMode}))),x=(0,z.n)(e=>e.currentBreakpoint),[u,h]=(0,c.useState)("orderBook"),p=x===i.EA.Sm,f=1===o,v=f||"orderBook"===u,b={symbol:s,unit:l,getQuantity:n,layoutMode:o,onLayoutModeChange:d};return((0,c.useEffect)(()=>{1===o&&"trades"===u&&h("orderBook")},[u,o]),p)?(0,r.jsx)("section",{"data-component":"OrderBookTradesPanel",className:"h-full overflow-hidden",children:(0,r.jsxs)("div",{className:"flex h-full min-h-0",children:[(0,r.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col",children:[(0,r.jsx)("div",{className:"border-l1 flex h-[40px] items-center border-b px-[16px]",children:(0,r.jsx)("div",{className:"text-m14 text-t1",children:t})}),(0,r.jsx)(U,{})]}),(0,r.jsx)("div",{"aria-hidden":!0,className:"bg-bg5 h-full shrink-0",style:{width:i.jS[0]}}),(0,r.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col",children:[(0,r.jsx)("div",{className:"border-l1 flex h-[40px] items-center border-b px-[16px]",children:(0,r.jsx)("div",{className:"text-m14 text-t1",children:a})}),(0,r.jsx)(B.b,{...b,showHeader:!1})]})]})}):(0,r.jsx)("section",{"data-component":"OrderBookTradesPanel",className:"h-full overflow-hidden",children:(0,r.jsxs)("div",{className:"flex h-full flex-col",children:[(0,r.jsxs)("div",{className:"flex min-h-0 flex-col",style:{flex:f?"427 1 0%":"1 1 0%"},children:[(0,r.jsx)(V,{isSplitLayout:f,activeTab:u,onActiveTabChange:h,orderBookLabel:t,layoutMode:o,onLayoutModeChange:d}),v?(0,r.jsx)(U,{}):(0,r.jsx)(B.b,{...b,showHeader:!1})]}),f?(0,r.jsx)("div",{className:"border-l3 flex min-h-0 flex-col border-t",style:{flex:"173 1 0%"},children:(0,r.jsx)(B.b,{...b})}):null]})})});K.displayName="OrderBookTradesPanel";var Q=a(32371),G=a(39824),J=a(74709),X=a(57625),Y=a(84137),Z=a(74526),$=a(50962),ee=a(24626),et=a(26560),ea=a(88926);
1function er(e){let{columnOptions:t,onChange:a}=e,{$t:s}=(0,g.B)(),l={symbol:s("Symbol_r_1"),quantity:s("Available/Holding"),avgPrice:s("Entry Price"),positionMargin:s("Margin_r_1"),markPrice:s("Mark Price_r_1"),unrealisedPnl:s("Unrealized PNL(ROE)"),realisedPnl:s("Realized PNL"),liquidationPrice:s("Liq Price_r_1"),marketClose:s("Market_r_1"),operation:s("Operation_r_1"),tpsl:s("TP/SL"),positionTPSL:s("Position TP/SL"),weight:s("ADL")};return(0,r.jsx)(ea.q,{columnOptions:t,columnLabels:l,onChange:a})}function es(e){let{activeTab:t}=e,{$t:a}=(0,g.B)(),{showHideOther:s,hideOtherChecked:l,onHideOtherChange:n,showBulkAction:i,bulkActionLabel:o,openBulkActionDialog:c,showSettings:d,settingsKind:x,positionColumnOptions:u,setPositionColumnOptions:m}=(0,et.kk)(t);return s||i||d?(0,r.jsxs)("div",{"data-component":"StandardContractActionBar",className:"hidden shrink-0 items-center gap-4 pr-4 pl-6 md:flex",children:[s?(0,r.jsxs)(ee.Checkbox.Label,{className:"gap-1",children:[(0,r.jsx)(ee.Checkbox.Control,{checked:l,onCheckedChange:e=>n(!0===e)}),(0,r.jsx)(ee.Checkbox.Text,{className:"text-c12 text-t3 whitespace-nowrap",children:a("Hide Other Symbols")})]}):null,i?(0,r.jsx)("button",{type:"button",className:"text-m12 text-p1-dark cursor-pointer leading-4 whitespace-nowrap",onClick:c,children:o}):null,d&&"positions"===x?(0,r.jsx)(er,{columnOptions:u,onChange:m}):null]}):null}var el=a(46420),en=a(52612);function ei(){let e=(0,_.J)(e=>e.activeContractTab),t=(0,J.Z)();return(0,r.jsxs)("div",{className:"flex h-full min-h-0 flex-col",children:[(0,r.jsxs)("div",{className:'after:bg-l3 relative flex min-h-10 items-stretch justify-between after:absolute after:right-0 after:bottom-0 after:left-0 after:h-px after:content-[""]',children:[(0,r.jsx)(X.k,{className:"h-full [&>div]:h-full [&>div]:!border-b-0 [&>div>[data-slot=scroll-area]]:h-full",listClassName:"h-full w-full justify-start gap-5 bg-transparent px-0",triggerClassName:"h-full"}),(0,r.jsx)(es,{activeTab:e})]}),(0,r.jsx)("div",{className:"min-h-0 flex-1",children:(0,r.jsxs)(G.E,{...t,children:["positions"===e&&(0,r.jsx)($.X,{}),"openOrders"===e&&(0,r.jsx)(Y.o,{}),"triggerOrders"===e&&(0,r.jsx)(en.o,{}),"ordersHistory"===e&&(0,r.jsx)(Z.Y,{}),"tpsl"===e&&(0,r.jsx)(el.a,{})]})})]})}var eo=a(70659),ec=a(46540),ed=a(19490),ex=a(51025),eu=a(89719),em=a(2815),eh=a(76856),ep=a(12724);function ef(e){let{label:t,tooltip:a,value:s,valueClassName:l="text-t1"}=e;return(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)(ec.Tooltip,{content:(0,r.jsx)("span",{className:"text-c12",children:a}),side:"top",align:"center",children:(0,r.jsx)("div",{className:"text-t3 border-t4 text-mm12 w-fit cursor-help border-b border-dashed pb-px text-left",children:t})}),(0,r.jsxs)("div",{className:"direction-ltr text-mm12 break-all ".concat(l),children:[s," ","XUSDT"]})]})}let eg={[i.SQ.Header]:(0,r.jsx)(function(){return(0,r.jsx)(p._,{tickerBar:(0,r.jsx)(C,{}),actionBar:(0,r.jsx)(w,{})})},{}),[i.SQ.ChartTabs]:(0,r.jsx)(h.ContractTradingView,{}),[i.SQ.OrderBookTrades]:(0,r.jsx)(K,{}),[i.SQ.PlaceOrder]:(0,r.jsx)(Q._,{}),[i.SQ.TradingTables]:(0,r.jsx)(function(){return(0,r.jsx)("section",{"data-component":"TradingTablesPanel",className:"bg-bg7 h-full min-h-0 overflow-hidden",children:(0,r.jsx)(ei,{})})},{}),[i.SQ.Wallet]:(0,r.jsx)(function(){var e,t,a;let{$t:s,locale:l}=(0,g.B)(),n=(0,ex.k)(e=>e.user),i=(0,ex.k)(e=>e.gotoLogin),o=(0,M.T)(),c=(0,eu.wc)(),d=!!(null==n?void 0:n.userId),x=(0,ep.oM)(),{handleResetDemoFund:u,resetting:m}=(0,eh.R)({locale:l,symbol:o,isLoggedIn:d,gotoLogin:i,activityInfo:null==(e=x.data)?void 0:e.data,isActivityEnd:null==(a=x.data)||null==(t=a.data)?void 0:t.isActivityEnd}),{balance:h=0,unrealisedPnl:p=0,marginBalance:f=0}=(0,em.tQ)(),v=e=>d?void 0===e?"--":ed.Ay.toSeprator(e):"0.0000";return(0,r.jsx)("section",{"data-component":"WalletPanel",className:"h-full overflow-hidden",children:(0,r.jsxs)("div",{className:"flex h-full flex-col",children:[(0,r.jsx)("div",{className:"text-t1 text-tm14 border-l3 flex h-10 shrink-0 items-center border-b px-4",children:s("Demo Wallet")}),(0,r.jsx)("div",{className:"flex-1 overflow-y-auto px-4 py-4",children:(0,r.jsxs)("div",{className:"flex h-full min-h-0 flex-col",children:[(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)(ef,{label:s("Wallet Balance"),tooltip:s("Wallet Balance=Transfer In-Transfer Out+Realized PNL"),value:v(h)}),(0,r.jsx)(ef,{label:s("Unrealized PNL_r_1"),tooltip:s("1"===c?"Unrealized PNL is calculated based on mark price.":"Unrealized PNL is calculated based on last price."),value:v(p)}),(0,r.jsx)(ef,{label:s("Total Value_r_1"),tooltip:s("Total Value=Wallet Balance+Unrealized PNL"),value:v(f)})]}),(0,r.jsx)(eo.$,{variant:"secondary",loading:m,disabled:m,onClick:u,className:"mt-s4 !rounded-r1 !text-m12 text-t1 h-[32px] w-full",children:s("Reset")})]})})]})})},{})};function ev(e){let{themeReady:t}=e,{width:a,containerRef:s,mounted:l}=(0,d.zn)({measureBeforeMount:!0,initialWidth:0}),i=l&&a>0&&t;return(0,r.jsxs)("div",{className:"w-full pb-6",ref:s,children:[(0,r.jsx)(o.R,{}),i?(0,r.jsx)(eb,{width:a}):(0,r.jsx)("div",{className:"bg-bg5 fixed inset-0 z-[1100] flex items-center justify-center",role:"status","aria-busy":"true",children:(0,r.jsx)(n.t,{type:"global",size:"l"})})]})}function eb(e){let{width:t}=e,{persistedLayouts:a,setCoreLayouts:n,resetCoreLayouts:o}=(0,_.J)((0,m.k)(e=>({persistedLayouts:e.layouts,setCoreLayouts:e.setCoreLayouts,resetCoreLayouts:e.resetCoreLayouts}))),h=(0,c.useMemo)(()=>(function(e){let t=(0,i.Xs)();if(e)for(let[a,r]of Object.entries(e))Array.isArray(r)&&0!==r.length&&(t[a]=r.map(e=>({...e})));return(0,i.ld)(t)})(a),[a]),{layout:p,breakpoint:f,cols:g,setLayouts:v}=(0,d.sR)({width:t,breakpoints:i.LO,cols:i._1,layouts:h}),b=(0,z.n)(e=>
1e.layoutResetVersion),j=(0,z.n)(e=>e.setCurrentBreakpoint),y=(0,i.Kk)(t);return(0,c.useEffect)(()=>{j(f)},[f,j]),(0,c.useEffect)(()=>{0!==b&&(o(),v((0,i.Xs)()))},[b,o,v]),(0,r.jsx)("div",{className:"bg-bg5",children:(0,r.jsx)(x.JT,{positionStrategy:u.Bm,gridConfig:{cols:g,rowHeight:i.FL,margin:i.jS},dragConfig:{enabled:y,handle:".drag-handler"},resizeConfig:{enabled:y,handleComponent:y?(e,t)=>(0,r.jsx)("div",{ref:t,className:"resize-handler absolute right-0 bottom-0 z-10 cursor-se-resize opacity-0",children:(0,r.jsx)(s.K,{className:"text-t3 hover:text-t1 size-4"})}):void 0},width:t,onLayoutChange:e=>{n({...function(e){let t={};for(let[a,r]of Object.entries(e))Array.isArray(r)&&(t[a]=r.map(e=>({...e})));return t}(h),[f]:e.map(e=>({...e}))})},layout:p,children:p.map(e=>{let t=y&&!e.static;return(0,r.jsxs)("div",{className:"bg-bg7 text-t1 ".concat(t?"[&:hover>.drag-handler]:opacity-100 [&:hover>.resize-handler]:opacity-100":""),children:[(0,r.jsx)(l.W,{className:"drag-handler text-t3 hover:text-t1 absolute top-[6px] right-0 z-10 size-4 cursor-grab opacity-0"}),eg[e.i]]},e.i)})},b)})}},47575:(e,t,a)=>{a.d(t,{e:()=>c});var r=a(79237),s=a(49553),l=a(66960),n=a(90477),i=a(3849),o=a(22522);function c(e){let{summary:t,symbolSearchSlot:a,afterSymbolSearchSlot:c,markPriceTooltip:d,fundingRateSlot:x,showOpenInterest:u=!0,showLastPriceChange:m=!1,volumeLabel:h,volumeValue:p}=e,{$t:f}=(0,l.B)(),g=null!=h?h:"".concat(f("24h Vol_r_1")," (").concat(t.volumeUnit,")"),v=null!=p?p:t.volumeText;return(0,r.jsxs)("div",{"data-component":"TickerBar",className:"flex min-w-0 items-center gap-6",children:[a,c,m?(0,r.jsxs)("div",{className:"flex shrink-0 flex-col justify-center gap-[2px]",children:[(0,r.jsx)("div",{className:(0,n.cn)("text-tm16 leading-[22px]",t.lastPriceClassName),children:t.lastPrice}),(0,r.jsx)("div",{className:(0,n.cn)("text-cm12 leading-[16px] whitespace-nowrap",t.changeClassName),children:t.changeText})]}):(0,r.jsx)("div",{className:(0,n.cn)("text-tm16 shrink-0 leading-[22px]",t.lastPriceClassName),children:t.lastPrice}),(0,r.jsx)(s.A,{className:"flex h-full min-w-0 flex-1 items-center",viewportClassName:"min-w-0 flex-1",scrollAmount:320,children:(0,r.jsxs)("div",{className:"flex min-w-max items-center gap-6 pr-1",children:[(0,r.jsx)(i.W,{label:f("Mark Price"),value:t.markPrice,tooltip:d,trigger:"all"}),(0,r.jsx)(i.W,{label:f("Index Price"),value:t.indexPrice,tooltip:(0,r.jsx)(o.N,{}),trigger:"all"}),x,(0,r.jsx)(i.W,{label:f("High_r_1"),value:t.highPrice,tooltip:f("UTC 0:00-24:00 High"),trigger:"label"}),(0,r.jsx)(i.W,{label:f("Low_r_1"),value:t.lowPrice,tooltip:f("UTC 0:00-24:00 Low"),trigger:"label"}),(0,r.jsx)(i.W,{label:g,value:v}),u?(0,r.jsx)(i.W,{label:"".concat(f("Open Interest")," (").concat(t.openInterestUnit,")"),value:t.openInterestText}):null]})})]})}},49553:(e,t,a)=>{a.d(t,{A:()=>o});var r=a(79237),s=a(4637),l=a(76562),n=a(90477),i=a(38113);let o=function(e){let{arrowButtonClassName:t,children:a,className:o,leftGradientClassName:c,rightGradientClassName:d,viewportClassName:x,scrollAmount:u=180}=e,m=(0,i.useRef)(null),[h,p]=(0,i.useState)(!1),[f,g]=(0,i.useState)(!1),v=(0,i.useCallback)(()=>{let e=m.current;if(!e)return;let{scrollLeft:t,scrollWidth:a,clientWidth:r}=e;p(t>1),g(t<a-r-1)},[]);(0,i.useEffect)(()=>{let e=m.current;if(!e)return;let t=()=>v();e.addEventListener("scroll",t,{passive:!0});let a=null;return"undefined"!=typeof ResizeObserver&&(a=new ResizeObserver(v)).observe(e),window.addEventListener("resize",v),v(),()=>{e.removeEventListener("scroll",t),null==a||a.disconnect(),window.removeEventListener("resize",v)}},[v]),(0,i.useEffect)(()=>{v()},[a,v]);let b=(0,i.useCallback)(e=>{let t=m.current;t&&(t.scrollBy({left:"left"===e?-u:u,behavior:"smooth"}),window.setTimeout(v,280))},[u,v]),j="absolute top-0 bottom-0 z-2 flex cursor-pointer text-t3 hover:text-t1 ",y="w-[24px] h-full bg-gradient-to-r",w="cursor-pointer flex items-center justify-center transition-colors";return(0,r.jsxs)("div",{className:(0,n.cn)("relative",o),children:[h?(0,r.jsxs)("div",{className:(0,n.cn)(j,"left-0"),onClick:()=>b("left"),children:[(0,r.jsx)("button",{type:"button","aria-label":"Scroll left",className:(0,n.cn)(w,"left-s1 bg-bg7",t),children:(0,r.jsx)(s.F,{className:"size-4"})}),(0,r.jsx)("div",{className:(0,n.cn)(y,"from-bg7 to-transparent",c)})]}):null,(0,r.jsx)("div",{ref:m,className:(0,n.cn)("relative z-1 overflow-x-auto [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",x),children:a}),f?(0,r.jsxs)("div",{className:(0,n.cn)(j,"right-0"),onClick:()=>b("right"),children:[(0,r.jsx)("div",{className:(0,n.cn)(y,"to-bg7 from-transparent",d)}),(0,r.jsx)("button",{type:"button","aria-label":"Scroll right",className:(0,n.cn)(w,"right-s1 bg-bg7",t),children:(0,r.jsx)(l.Y,{className:"size-4"})})]}):null]})}},50428:(e,t,a)=>{a.d(t,{q:()=>l});var r=a(79237),s=a(36434);function l(e){let{buyRatio:t,sellRatio:a}=e;return(0,r.jsx)("div",{className:"flex h-[36px] items-center px-[16px] py-[8px]",children:(0,r.jsxs)("div",{className:"relative h-[20px] w-full",children:[(0,r.jsx)(s.BaseProgress,{segmentOverlap:8,value:t,barHeight:20,barClassName:"!rounded-[2px]",completedBarColor:"rgb(from var(--color-p2) r g b / 10%)",unCompletedBarColor:"rgb(from var(--color-p3) r g b / 10%)"}),(0,r.jsxs)("div",{className:"text-c12 text-p2 pointer-events-none absolute inset-y-0 left-0 flex items-center gap-[4px]",children:[(0,r.jsx)("span",{className:"border-p2 flex h-[20px] w-[20px] items-center justify-center rounded-[2px] border",children:"B"}),(0,r.jsxs)("span",{children:[t,"%"]})]}),(0,r.jsxs)("div",{className:"text-c12 text-p3 pointer-events-none absolute inset-y-0 right-0 flex items-center gap-[4px]",children:[(0,r.jsxs)("span",{children:[a,"%"]}),(0,r.jsx)("span",{className:"border-p3 flex h-[20px] w-[20px] items-center justify-center rounded-[2px] border",children:"S"})]})]})})}},51038:(e,t,a)=>{a.d(t,{R:()=>d});var r=a(79237),s=a(38113),l=a(65375);let n=s.forwardRef((e,t)=>
1(0,r.jsx)(l.B,{ref:t,viewBox:"0 0 1024 1024",...e,children:(0,r.jsx)("path",{d:"M128 170.666667a42.666667 42.666667 0 0 1 42.666667-42.666667 725.333333 725.333333 0 0 1 725.333333 725.333333 42.666667 42.666667 0 1 1-85.333333 0A640 640 0 0 0 170.666667 213.333333a42.666667 42.666667 0 0 1-42.666667-42.666666z m0 298.666666a42.666667 42.666667 0 0 1 42.666667-42.666666 426.666667 426.666667 0 0 1 426.666666 426.666666 42.666667 42.666667 0 1 1-85.333333 0 341.333333 341.333333 0 0 0-341.333333-341.333333 42.666667 42.666667 0 0 1-42.666667-42.666667z m0 341.333334a85.333333 85.333333 0 1 1 170.666667 0 85.333333 85.333333 0 0 1-170.666667 0z"})}));n.displayName="RssIcon";var i=a(66960),o=a(25825),c=a(76656);function d(){let{$t:e}=(0,i.B)(),{reconnecting:t,connectionFailed:a,link:l}=(0,o.G)((0,c.k)(e=>({reconnecting:e.reconnecting,connectionFailed:e.connectionFailed,link:e.link}))),[d,x]=(0,s.useState)(()=>"undefined"==typeof navigator||navigator.onLine);(0,s.useEffect)(()=>{let e=()=>{x(navigator.onLine)};return window.addEventListener("offline",e),window.addEventListener("online",e),()=>{window.removeEventListener("offline",e),window.removeEventListener("online",e)}},[]);let u=(0,s.useMemo)(()=>d?a?{tone:"fail",text:e("Connection failed, please refresh the page")}:t?{tone:"fail",text:e("Reconnecting...")}:l?{tone:"success",text:e("Stable connection {0}",{0:String(l)})}:null:{tone:"fail",text:e("Disconnected")},[e,a,l,d,t]);if(!u)return null;let m="success"===u.tone?"text-p2":"text-p3";return(0,r.jsx)("div",{className:"bg-bg7 border-l3 fixed inset-x-0 bottom-0 z-[100] h-6 border-t px-4 py-1 backdrop-blur-[4px]",children:(0,r.jsxs)("div",{className:"text-c12 flex items-start gap-2 leading-4 ".concat(m),children:[(0,r.jsx)(n,{className:"mt-[0.5px] size-4 shrink-0"}),(0,r.jsx)("span",{children:u.text})]})})}},56042:(e,t,a)=>{a.d(t,{K:()=>n});var r=a(79237),s=a(38113),l=a(65375);let n=s.forwardRef((e,t)=>(0,r.jsx)(l.B,{ref:t,viewBox:"0 0 1024 1024",...e,children:(0,r.jsx)("path",{d:"M755.952941 243.651765a54.211765 54.211765 0 0 1 54.211765 54.211764v421.647059a114.447059 114.447059 0 0 1-114.447059 114.447059h-421.647059a54.211765 54.211765 0 0 1 0-108.423529h421.647059a6.023529 6.023529 0 0 0 6.023529-6.02353v-421.647059a54.211765 54.211765 0 0 1 54.211765-54.211764z"})}));n.displayName="ResizeIcon"},62393:(e,t,a)=>{a.d(t,{K:()=>i});var r=a(79237),s=a(66960),l=a(90477);let n=["orderBook","trades"];function i(e){let{value:t,onValueChange:a}=e,{$t:i}=(0,s.B)();return(0,r.jsx)("div",{className:"flex h-full items-center gap-[24px]",children:n.map(e=>{let s=t===e;return(0,r.jsx)("div",{onClick:()=>a(e),className:(0,l.cn)('text-m14 relative flex h-full cursor-pointer items-center after:absolute after:right-0 after:bottom-0 after:left-0 after:h-px after:content-[""]',s?"text-t1 after:bg-t1":"text-t3 after:bg-transparent"),children:"orderBook"===e?i("Order Book"):i("Trades")},e)})})}},65198:(e,t,a)=>{a.d(t,{v:()=>i,r:()=>o});var r=a(69534);let s=e=>{let{namespace:t}=e,a="".concat(t,".futuresTheme");return{set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";r.xM.setItem(a,e)},get:()=>r.xM.getItem(a)||"tapbit-dark"}},l=s({namespace:"contract_futures"});s({namespace:"contract_simul"});let n="tapbit-light";function i(){return l.get()===n?"light":"dark"}function o(e){l.set("light"===e?n:"tapbit-dark")}},80156:(e,t,a)=>{a.d(t,{I:()=>r});function r(e,t){return"1"!==e.usdtContract_protocol?{initStep:0,variant:t&&"1"!==e.Pre_IPO_risk_protocol?"preIpoCombined":"standard"}:t&&"1"!==e.Pre_IPO_risk_protocol?{initStep:0,variant:"preIpoOnly"}:"1"!==e.usdt_complete_quiz?{initStep:1,variant:"standard"}:null}},87300:(e,t,a)=>{a.d(t,{e2:()=>u,nj:()=>x});var r=a(79237),s=a(95370),l=a(37901),n=a(45341),i=a(47317),o=a(46540),c=a(66960);let d="text-t1 hover:text-t1 flex size-8 cursor-pointer items-center justify-center rounded-full transition-colors",x="text-m12 text-tr1 hover:text-tr1 border-l1 bg-bt4 flex items-center gap-1 rounded-r1 border px-3 py-1.5 whitespace-nowrap transition-colors hover:opacity-90";function u(e){let{theme:t,leadingSlot:a,beforeCommonActionsSlot:x,onLayoutReset:u,onSettingsClick:m,onThemeClick:h}=e,{$t:p}=(0,c.B)(),f="light"===t?s.g:l.r;return(0,r.jsxs)("div",{className:"flex items-center gap-6",children:[a,(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[x,(0,r.jsx)(o.Tooltip,{side:"left",content:p("Reset Interface"),children:(0,r.jsx)("button",{type:"button","aria-label":p("Reset Interface"),onClick:u,className:d,children:(0,r.jsx)(n.N,{className:"size-5"})})}),(0,r.jsx)("button",{type:"button","aria-label":p("Contract Settings"),onClick:m,className:d,children:(0,r.jsx)(i.Z,{className:"size-5"})}),(0,r.jsx)("button",{type:"button","data-testid":"futures-theme-switch",onClick:h,className:d,children:(0,r.jsx)(f,{className:"size-5"})})]})]})}},88926:(e,t,a)=>{a.d(t,{q:()=>l});var r=a(79237),s=a(21781);
1function l(e){let{columnOptions:t,columnLabels:a,onChange:l}=e;return(0,r.jsx)(s.C,{options:t,renderLabel:e=>a[e.key],triggerClassName:"text-t3 hover:text-t1",onChange:l})}},90910:(e,t,a)=>{a.d(t,{Q:()=>n});var r=a(79237),s=a(38113),l=a(65375);let n=s.forwardRef((e,t)=>(0,r.jsx)(l.B,{ref:t,viewBox:"0 0 1066 1024",...e,children:(0,r.jsx)("path",{d:"M774.101333 256a85.333333 85.333333 0 1 0 0 170.666667 85.333333 85.333333 0 0 0 0-170.666667z m-165.290666 42.666667a170.752 170.752 0 0 1 335.957333 42.666666 170.666667 170.666667 0 0 1-335.957333 42.666667H134.101333a42.666667 42.666667 0 0 1 0-85.333333h474.709334z m-346.709334 298.666666a85.333333 85.333333 0 1 0 0 170.666667 85.333333 85.333333 0 0 0 0-170.666667z m-170.666666 85.333334a170.666667 170.666667 0 0 1 335.957333-42.666667h474.709333a42.666667 42.666667 0 1 1 0 85.333333H427.392a170.752 170.752 0 0 1-335.957333-42.666666z"})}));n.displayName="SlidersIcon"},94129:(e,t,a)=>{a.d(t,{W:()=>o});var r=a(93924),s=a(59292),l=a(10935),n=a(41809);let i={POSITION_INFO:"/api/usdt-rouse-api/grants/position/info",POSITION_CLOSE:"/api/usdt-rouse-api/grants/position/close"},o=(0,n.v)((e,t)=>({item:null,loading:!1,closing:!1,dialogOpen:!1,onSuccess:void 0,onClose:void 0,setOnSuccess:t=>e({onSuccess:t}),setOnClose:t=>e({onClose:t}),openDialog:a=>{e({dialogOpen:!0}),t().fetchPositionInfo(a)},closeDialog:()=>{e({dialogOpen:!1});let a=t();a.onClose&&a.onClose()},fetchPositionInfo:async t=>{e({loading:!0});try{let a=t?await s.request.get(i.POSITION_INFO,{params:{grantsId:t}}):await s.request.get(i.POSITION_INFO);a&&200===a.code&&e({item:a.data||null})}catch(e){console.error("fetchPositionInfo error",e)}finally{e({loading:!1})}},flashClose:async(a,n)=>{var o,c,d;let x=t();if((null==(o=x.item)?void 0:o.requestId)||a){e({closing:!0});try{let t=await s.request.post(i.POSITION_CLOSE,{body:{grantsId:a||(null==(c=x.item)?void 0:c.requestId)},requestType:l.Yw.JsonString});t&&200===t.code&&((0,r.toast)({type:"success",title:null!=(d=null==n?void 0:n.success)?d:"Success"}),x.onSuccess&&x.onSuccess(),e({dialogOpen:!1}))}catch(e){console.error("flashClose error",e)}finally{e({closing:!1})}}}}))},97781:(e,t,a)=>{a.d(t,{b:()=>d});var r=a(79237),s=a(82586),l=a(66960),n=a(41760),i=a(96620),o=a(19490),c=a(24900);function d(e){let{symbol:t,unit:a,getQuantity:d,layoutMode:x,onLayoutModeChange:u,showHeader:m}=e,{$t:h}=(0,l.B)(),p=(0,n.N1)(i.p.USDT.TRADE_LIST(t))||[];return(0,r.jsx)("div",{className:"h-1 flex-1 overflow-hidden",children:(0,r.jsxs)("div",{className:"flex h-full flex-col",children:[null==m||m?(0,r.jsxs)("div",{className:"border-l3 flex h-[40px] items-center justify-between border-b px-[16px]",children:[(0,r.jsx)("div",{className:"text-m14 text-t1",children:h("Trades")}),(0,r.jsx)(c.s,{value:x,onValueChange:u})]}):null,(0,r.jsxs)("div",{className:"gap-s3 flex h-[32px] items-center px-[16px]",children:[(0,r.jsx)("div",{className:"text-c12 text-t3 w-1 min-w-0 flex-1 truncate",children:h("Price_1")}),(0,r.jsxs)("div",{className:"text-c12 text-t3 w-1 min-w-0 flex-1 truncate text-right",children:[h("Quantity_4"),"(",a,")"]}),(0,r.jsx)("div",{className:"text-c12 text-t3 w-1 min-w-0 flex-1 truncate text-right",children:h("Time_r_1")})]}),(0,r.jsx)("div",{className:"relative flex h-1 flex-1 flex-col",children:(0,r.jsx)(s.ScrollArea,{className:"h-full",children:(0,r.jsx)("div",{className:"flex flex-col",children:p.map((e,t)=>(0,r.jsxs)("div",{className:"gap-s3 flex h-[22px] items-center px-[16px]",children:[(0,r.jsx)("div",{className:"text-c12 w-1 flex-1 ".concat("buy"===e.side?"text-p2":"text-p3"),children:e.price?(0,o.iT)(e.price):"--"}),(0,r.jsx)("div",{className:"text-c12 text-t1 w-1 flex-1 text-right",children:e.quantity?(0,o.iT)(d(e.quantity,"",e.price)):"--"}),(0,r.jsx)("div",{className:"text-c12 text-t1 w-1 flex-1 text-right",children:e.time?(0,o.yS)({value:e.time,type:"time",unit:"ms"}):"--"})]},"trade-row-".concat(t)))})})})]})})}}}]);
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.