"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4194],{73240:function(e,t,o){var n=o(85893),a=o(67294);t.Z=a.memo((0,a.forwardRef)(function(e,t){let{maxLength:o,max:i,min:r=0,step:l=1,onKeyDown:s,onChange:c,onInput:d,decimal:h,...u}=e,m=(0,a.useRef)({key:"",prevent:!1}),p=(0,a.useCallback)(e=>{"."===e.key?h?"."===m.current.key||String(u.value).includes(".")?(e.preventDefault(),m.current.prevent=!0):m.current.prevent=!1:(e.preventDefault(),m.current.prevent=!0):m.current.prevent=!1,m.current.key=e.key,null==s||s(e)},[s,h,u.value]),g=(0,a.useCallback)(e=>{let t=e.target.value;if(o&&t&&t.length>=o){let n=t.slice(0,o);e.target.value=n.replace(/\.$/g,"")}if(i&&t){let o=Number(i);!Number.isNaN(o)&&Number(t)>o&&(e.target.value=String(o))}null==c||c(e)},[c,i,o]),f=(0,a.useCallback)(e=>{let t=e.target.value;if(!["Backspace","Delete"].includes(m.current.key)&&!t){let{key:t,prevent:o}=m.current;if("."===t&&!o)return;e.target.value=u.value}null==d||d(e)},[d,u.value]);return(0,n.jsx)("input",{...u,type:"number",min:r,step:l,ref:t,onChange:g,onKeyDown:p,onInput:f})}))},666:function(e,t,o){o.d(t,{Z:function(){return l}});var n=o(85893),a=o(4400),i=o(4281),r=o(81763);function l(e){let{children:t,...o}=e;return(0,n.jsxs)(s,{...o,children:[(0,n.jsx)(a.N,{iconPath:"logo",className:"logo"}),t,(0,n.jsx)("span",{className:"dot",children:"."})]})}let s=o(41686).ZP.div.withConfig({componentId:"sc-b5803e34-0"})(["display:flex;align-items:center;padding:0 ",";color:",";",";font-size:",";line-height:",";> .logo{width:",";height:",";fill:",";margin-right:",";}> .dot{color:",";}"],(0,r.hO)(4),e=>e.theme.Content.cont_main,i.typography.extrabold._,(0,r.hO)(20),(0,r.hO)(28),(0,r.hO)(20),(0,r.hO)(20),e=>e.theme.Content.cont_main,(0,r.hO)(8),e=>e.theme.Content.cont_theme)},51051:function(e,t,o){o.d(t,{Ey:function(){return I},ZP:function(){return A}});var n=o(85893),a=o(29323),i=o(39332),r=o(67294),l=o(33425),s=o(4281),c=o(41686),d=o(81763),h=o(76662),u=o(61232),m=o(21073),p=o(73645),g=o(37696),f=o(99260);async function b(e){return await s.pop.push((0,n.jsx)(s.WhiteThemeProvider,{children:(0,n.jsx)(k,{...e})}))}function k(e){let{list:t,selected:o}=e,{t:a}=(0,u.$G)("common"),i=(0,r.useMemo)(()=>(0,d.ji)(t).map(e=>({...e,isMainted:1===e.status})),[t]),[l,c]=(0,r.useState)(i),h=(0,r.useCallback)(function(e){e.trim()?c(i.filter(t=>"".concat(t.name,"__").concat(t.symbol).toLowerCase().includes(e.trim().toLowerCase()))||[]):c(i)},[i]);return(0,n.jsxs)(x,{title:a("common.selectToken"),children:[(0,n.jsx)(s.SearchInput,{placeholder:a("common.search"),onSearch:h,immediate:!0}),(0,n.jsx)(s.ScrollView,{className:"list",children:l.length>0?l.map(e=>(0,n.jsx)("button",{className:"item",disabled:e.isMainted,onClick:()=>{s.pop.back(e)},children:(0,n.jsx)(v,{item:e,selected:e.token_id===o.token_id,isMainted:e.isMainted})},e.token_id)):(0,n.jsx)(s.Typography.RegularXS,{className:"empty",children:a("settings.search.empty")})})]})}let x=(0,c.ZP)(g.Z).withConfig({componentId:"sc-d4911fbe-0"})(["display:flex;flex-direction:column;gap:",";> .list{margin:0 ",";padding:0 ",";height:",";> .item{width:100%;border-radius:",";padding:",";gap:",";&:disabled{opacity:0.5;cursor:not-allowed;}","{&:hover:not(:disabled){background:",";border-radius:",";}}}.empty{height:100%;display:flex;align-items:center;justify-content:center;color:",";}}> .all{display:flex;align-items:center;height:",";padding:",";gap:",";margin-bottom:",";box-shadow:0 1px 0 0 ",";","{&:hover:not(:disabled){background:",";border-radius:",";border-bottom-color:transparent;}}.logo{width:",";height:",";border-radius:50%;background:var(--Neutral-Apathy-2,#f9f9fb);}.name{text-align:left;color:",";flex:1;text-transform:capitalize;}.total{color:",";}}> .multiple{> .item{display:flex;align-items:center;.tokenItem{flex:1;}}}> .countWrap{padding:"," "," ",";box-shadow:0 -1px 0 0 ",";margin-top:",";color:",";.current{color:",";}}> .btns{gap:",";.cancel,.confirm{height:",";border-radius:",";color:",";}.cancel{background:var(--Neutral-Apathy-9,#8b8d98);}.confirm{background:",";}}"],(0,d.hO)(12),(0,d.hO)(-16),(0,d.hO)(16),(0,d.hO)(480),(0,d.hO)(12),(0,d.hO)(12),(0,d.hO)(8),h.W.hover,e=>e.theme.Surface.surf_isleongrey,(0,d.hO)(12),e=>e.theme.Content.cont_sub,(0,d.hO)(60),(0,d.hO)(12),(0,d.hO)(8),(0,d.hO)(-12),e=>e.theme.Stroke.line_melter,h.W.hover,e=>e.theme.Surface.surf_isleongrey,(0,d.hO)(12),(0,d.hO)(32),(0,d.hO)(32),e=>e.theme.Content.cont_main,e=>e.theme.Content.cont_sub,(0,d.hO)(16),(0,d.hO)(4),(0,d.hO)(4),e=>e.theme.Stroke.line_melter,(0,d.hO)(-12),e=>e.theme.Content.cont_sub,e=>e.theme.Content.cont_main,(0,d.hO)(12),(0,d.hO)(46),(0,d.hO)(8),e=>e.theme.Content.cont_inverted,e=>e.theme.Content.cont_main),v=(0,a.Pi)(function(e){let{className:t,item:o,selected:a,isMainted:i}=e,{t:r}=(0,u.$G)("common"),{hideBalance:l,hideBalanceSymbol:c}=m.account.options;return(0,n.jsxs)(y,{className:(0,f.classList)("tokenItem",t),children:[(0,n.jsxs)(s.Layout.RowMiddle,{className:"logoWrap",children:[(0,n.jsx)("img",{className:"coinLogo",src:o.logo,loading:"lazy"}),i&&(0,n.jsx)(w,{className:"delisted"})]}),(0,n.jsxs)(s.Layout.Col,{className:"nameWrap",children:[(0,n.jsxs)(s.Layout.RowMiddle,{className:"row",children:[(0,n.jsx)(s.Typography.SemiboldXS,{className:"symbol",children:o.symbol}),i&&(0,n.jsx)(s.Typography.RegularXS,{className:"delisted",children:"Maintaining"}),a&&(0,n.jsx)(s.Typography.RegularXS,{className:"selected",children:r("common.selected")})]}),(0,n.jsx)(s.Typography.RegularXS,{className:"name secondColor",children:o.name})]}),(0,n.jsxs)(s.Layout.Col,{className:"balanceWrap",children:[(0,n.jsx)(s.Typography.SemiboldXS,{className:"tokenBalance",children:l?c:m.g.numberToLocaleString(m.g.formatBalanceAmount(o.balance))}),(0,n.jsx)(s.Typography.RegularXS,{className:"fiatBalance secondColor",children:l?c:o.price?"".concat(m.g.fiatCurrencyNumberFormat(m.g.toFiat(o.balance,o.token_id))):"--"})]})]})}),y=(0,c.ZP)(s.Layout.RowMiddle).withConfig({componentId:"sc-d4911fbe-1"})(["gap:",";color:",";> .logoWrap{flex-shrink:0;position:relative;.coinLogo{width:",";height:",";}.delisted{position:absolute;right:",";bottom:",";width:",";height:",";}}> .nameWrap{flex:1;text-align:left;.name,.symbol{",";}.row{gap:",";.selected{border-radius:",";padding:"," ",";background:var(--Indicative-Info-3,#edf6ff);color:",";}.delisted{border-radius:",";padding:"," ",";background:var(--Indicative-Error-5,#fdd8d8);color:",";}}}> .balanceWrap{text-align:right;}.secondColor{color:",";}"],(0,d.hO)(8),e=>e.theme.Content.cont_main,(0,d.hO)(32),(0,d.hO)(32),(0,d.hO)(-3),(0,d.hO)(-1),(0,d.hO)(14),(0,d.hO)(14),h.W.textEllipsisLn(1),(0,d.hO)(4),(0,d.hO)(4),(0,d.hO)(2),(0,d.hO)(4),e=>e.theme.Content.cont_info,(0,d.hO)(4),(0,d.hO)(2),(0,d.hO)(4),e=>e.theme.Content.cont_loss,e=>e.theme.Content.cont_sub);function w(e){let{className:t}=e;return(0,n.jsxs)("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,n.jsx)("path",{d:"M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8",fill:"#F9F9FB"}),(0,n.jsx)("path",{d:"M8 14.857A6.857 6.857 0 1 0 8 1.143a6.857 6.857 0 0 0 0 13.714",fill:"#fff"}),(0,n.jsx)("path",{d:"M8 14.857A6.857 6.857 0 1 0 8 1.143a6.857 6.857 0 0 0 0 13.714M3.592 7.021h8.816a.49.49 0 0 1 .49.489v.981a.49.49 0 0 1-.49.489H3.592a.49.49 0 0 1-.49-.489v-.982a.49.49 0 0 1 .49-.489",fill:"#E5484D"})]})}c.ZP.div.withConfig({componentId:"sc-d4911fbe-2"})(["width:",";height:",";display:flex;align-items:center;justify-content:center;border-radius:",";&.enabled{border:1px solid ",";background:var(--Neutral-Apathy-1,#fcfcfd);}&.disabled{border:1px solid ",";background:var(--Neutral-Apathy-3,#f2f2f5);svg{fill:",";}}&.selected,&.changed{background:",";svg{fill:#fff;}}"],(0,d.hO)(20),(0,d.hO)(20),(0,d.hO)(4),e=>e.theme.Stroke.line_blender,e=>e.theme.Stroke.line_contrast,e=>e.theme.Stroke.line_repel,e=>e.theme.Content.cont_theme);var _=o(4400),N=o(73240),j=o(90482),C=o(54660),O=o(44523),L=o(55718);async function T(e){return await s.pop.push((0,n.jsx)(s.WhiteThemeProvider,{children:(0,n.jsx)(S,{...e})}))}function S(e){let{slippage:t}=e,{t:o}=(0,u.$G)("common"),a=(0,r.useRef)(null),[i,l]=(0,r.useState)(t),c=.1>Number(i)||Number(i)>50;return(0,n.jsx)(R,{title:o("wallet.swap.setslippage"),children:(0,n.jsxs)("div",{className:"content",children:[(0,n.jsxs)(s.Typography.RegularM,{className:"text",children:[o("wallet.sliptolerance"),":"]}),(0,n.jsxs)(s.Layout.RowMiddle,{className:"control",children:[(0,n.jsxs)(s.Layout.RowMiddle,{className:"custom",children:[(0,n.jsx)(N.Z,{ref:a,className:(0,f.classList)("input"),name:"slippage",decimal:!0,autoComplete:"off",placeholder:"0.5",max:100,value:i,onChange:e=>l(e.target.value),onWheel:()=>{var e;return null===(e=a.current)||void 0===e?void 0:e.blur()}}),(0,n.jsx)("svg",{className:"sign",xmlns:"http://www.w3.org/2000/svg",width:20,height:20,viewBox:"0 0 20 20",fill:"#7E808A",children:(0,n.jsx)("path",{d:"M6.253 9.167a2.8 2.8 0 0 1-2.063-.854 2.8 2.8 0 0 1-.854-2.062q0-1.208.854-2.063a2.8 2.8 0 0 1 2.063-.854 2.8 2.8 0 0 1 2.062.854q.854.854.854 2.063a2.8 2.8 0 0 1-.854 2.062 2.8 2.8 0 0 1-2.062.854m0-1.666q.52 0 .885-.365.365-.364.365-.885-.001-.522-.365-.885A1.2 1.2 0 0 0 6.253 5a1.2 1.2 0 0 0-.885.365q-.363.367-.365.885t.365.885.885.365m7.5 9.166a2.8 2.8 0 0 1-2.063-.854 2.8 2.8 0 0 1-.854-2.062q0-1.208.854-2.063a2.8 2.8 0 0 1 2.063-.854 2.8 2.8 0 0 1 2.062.854q.854.854.854 2.063a2.8 2.8 0 0 1-.854 2.062 2.8 2.8 0 0 1-2.062.854m0-1.666q.52 0 .885-.364.366-.365.365-.886-.001-.522-.365-.885a1.2 1.2 0 0 0-.885-.365 1.2 1.2 0 0 0-.885.365q-.363.367-.365.885-.003.517.365.886.367.367.885.364m-9.834 1.083a.8.8 0 0 1-.229-.583.8.8 0 0 1 .23-.584l11-11a.8.8 0 0 1 .583-.229.8.8 0 0 1 .583.23.8.8 0 0 1 .23.583.8.8 0 0 1-.23.583l-11 11a.8.8 0 0 1-.583.23.8.8 0 0 1-.584-.23"})})]}),(0,n.jsx)("button",{className:(0,f.classList)("preset",.1===Number(i)&&"active"),onClick:()=>l("0.1"),children:"0.1%"}),(0,n.jsx)("button",{className:(0,f.classList)("preset",.5===Number(i)&&"active"),onClick:()=>l("0.5"),children:"0.5%"}),(0,n.jsx)("button",{className:(0,f.classList)("preset",1===Number(i)&&"active"),onClick:()=>l("1"),children:"1%"})]}),(0,n.jsx)("div",{className:"divider"}),(0,n.jsxs)("div",{className:"desc",children:[(0,n.jsxs)(s.Layout.RowMiddle,{className:"title",children:[(0,n.jsx)(_.N,{className:"icon",iconPath:"info_fill"}),(0,n.jsx)(s.Typography.SemiboldS,{children:o("wallet.swap.aboutslippage")})]}),(0,n.jsx)(s.Typography.RegularS,{children:o("wallet.swap.aboutslippage.desc")})]}),(0,n.jsx)(p.xk,{className:"confirm",disabled:c,onClick:()=>s.pop.back(Number(i).toFixed(1)),children:o("common.actions.confirm")})]})})}let R=(0,c.ZP)(g.Z).withConfig({componentId:"sc-6b12dfaa-0"})(["> .content{> .text{padding:",";margin-bottom:",";color:",";}.control{gap:",";.input{width:100%;height:100%;border:none;appearance:none;outline:none;background:transparent;color:",";",";&::placeholder{color:",";}&:disabled{background:none;color:",";}&::-webkit-outer-spin-button,&::-webkit-inner-spin-button{display:none;margin:0;-webkit-appearance:none;-moz-appearance:textfield;}}}.custom{flex:1;&:has(.input:focus){box-shadow:0 0 0 1px "," inset;}}.custom,.preset{height:",";padding:0 ",";border-radius:",";border:1px solid ",";min-width:",";}.preset{",";&.active{border:1px solid ",";background:var(--Accent-Primary-Alpha-2,rgba(99,177,0,0.05));color:",";",";}","{&:hover{background:",";color:",";border-color:",";",";}}}> .divider{height:1px;background:",";margin:"," 0 ",";}> .desc{padding:"," ",";color:",";margin-bottom:",";.title{gap:",";margin-bottom:",";color:var(--Neutral-Apathy-11,#60646c);.icon{width:",";height:",";fill:var(--Neutral-Apathy-11,#60646c);}}}> .confirm{height:",";border-radius:",";background:",";color:",";",";&:disabled{background:var(--Neutral-Apathy-7,#d3d4db);color:",";}}}"],(0,d.hO)(4),(0,d.hO)(8),e=>e.theme.Content.cont_sub,(0,d.hO)(8),e=>e.theme.Content.cont_main,s.typography.regular.m,e=>e.theme.Content.cont_limbo,e=>e.theme.Content.cont_limbo,e=>e.theme.Content.cont_theme,(0,d.hO)(48),(0,d.hO)(16),(0,d.hO)(8),e=>e.theme.Stroke.line_melter,(0,d.hO)(68),s.typography.semibold.xs,e=>e.theme.Content.cont_theme,e=>e.theme.Content.cont_theme,s.typography.bold.xs,h.W.hover,e=>e.theme.Content.cont_main,e=>e.theme.Content.cont_neon,e=>e.theme.Content.cont_main,s.typography.bold.xs,e=>e.theme.Stroke.line_melter,(0,d.hO)(24),(0,d.hO)(12),(0,d.hO)(12),(0,d.hO)(4),e=>e.theme.Content.cont_sub,(0,d.hO)(12),(0,d.hO)(4),(0,d.hO)(10),(0,d.hO)(16),(0,d.hO)(16),(0,d.hO)(46),(0,d.hO)(8),e=>e.theme.Content.cont_main,e=>e.theme.Content.cont_inverted,s.typography.semibold.xs,e=>e.theme.Content.cont_sub);var A=(0,a.Pi)(function(){let e=(0,i.useSearchParams)(),t=e.get("from")||"",o=e.get("to")||"";return((0,r.useEffect)(()=>{l.swapStore.initSingleSwapList(l.x.Market,t,o)},[t,o]),(0,r.useEffect)(()=>{let e=l.swapStore.autoUpdateMarketRate(),t=l.swapStore.autoUpdateMarketInput();return()=>{e(),t()}},[]),(0,r.useEffect)(()=>{l.swapStore.marketReady&&l.swapStore.updateMarketRate()},[]),l.swapStore.marketReady)?(0,n.jsxs)(M,{children:[(0,n.jsxs)("div",{children:[(0,n.jsx)(P,{}),(0,n.jsx)(W,{}),(0,n.jsx)(D,{})]}),(0,n.jsx)(F,{}),(0,n.jsx)(q,{})]}):(0,n.jsx)(M,{children:(0,n.jsx)(s.Loading,{})})});let M=(0,c.ZP)(s.Layout.Col).withConfig({componentId:"sc-3fe979d9-0"})(["width:100%;gap:",";min-height:",";"],(0,d.hO)(20),(0,d.hO)(486)),I=(0,c.ZP)(s.Layout.Col).withConfig({componentId:"sc-3fe979d9-1"})(["border-radius:",";background:var(--Neutral-Apathy-3,#f2f2f5);padding:",";gap:",";transition:box-shadow ease 200ms;","{&:hover{background:var(--Neutral-Apathy-1,#fcfcfd);}}&:has(.input:focus){box-shadow:0 0 0 1px "," inset;background:var(--Neutral-Apathy-1,#fcfcfd);> .titleRow{color:",";}}&:has(.input.hasError){box-shadow:0 0 0 1px "," inset;background:var(--Indicative-Error-1,#fffcfc);}.input{flex:1;width:",";padding:"," 0;border:none;appearance:none;outline:none;background:transparent;color:",";text-align:right;",";&::placeholder{color:",";}&:disabled{background:none;color:",";}&::-webkit-outer-spin-button,&::-webkit-inner-spin-button{display:none;margin:0;-webkit-appearance:none;-moz-appearance:textfield;}}> .titleRow{color:",";}> .inputRow{gap:",";.coinItem{display:inline-flex;align-items:center;.logo{width:",";height:",";margin-right:",";}.symbol{color:",";}.icon{fill:",";width:",";height:",";transform:rotateZ(90deg);}","{&:hover{.icon{fill:",";}}}&:active{.icon{fill:",";}}}.balanceWrap{gap:",";color:",";.balance{color:",";&.zero{color:",";}&.error{color:",";}}.fiat{flex:1;text-align:right;color:",";}}}"],(0,d.hO)(12),(0,d.hO)(16),(0,d.hO)(16),h.W.hover,e=>e.theme.Content.cont_theme,e=>e.theme.Content.cont_main,e=>e.theme.Content.cont_loss,(0,d.hO)(100),(0,d.hO)(6),e=>e.theme.Content.cont_main,s.typography.bold.m,e=>e.theme.Content.cont_limbo,e=>e.theme.Content.cont_limbo,e=>e.theme.Content.cont_sub,(0,d.hO)(8),(0,d.hO)(24),(0,d.hO)(24),(0,d.hO)(8),e=>e.theme.Content.cont_main,e=>e.theme.Content.cont_sub,(0,d.hO)(24),(0,d.hO)(24),h.W.hover,e=>e.theme.Content.cont_main,e=>e.theme.Content.cont_main,(0,d.hO)(4),e=>e.theme.Content.cont_limbo,e=>e.theme.Content.cont_theme,e=>e.theme.Content.cont_sub,e=>e.theme.Content.cont_loss,e=>e.theme.Content.cont_sub),P=(0,a.Pi)(function(){let{t:e}=(0,u.$G)("common"),t=(0,r.useRef)(null),{singleInputData:o,toggleSinglePair:a,updateToList:i,type:c}=l.swapStore,{fromToken:d,fromAmount:h,updateData:p,hasError:g,fromList:k,toToken:x}=o;if(!d)return null;let v=m.g.formatBalanceAmount(m.g.getToken(d.token_id).balance),y=Number(v)>0,w=Number(h)>0,j=m.g.fiatCurrencyNumberFormat(m.g.toFiat(h||0,d.token_id));async function C(){let e=await b({list:k,selected:d});if(e){if(e.token_id===(null==x?void 0:x.token_id))a();else{p({fromToken:e});let t=await i(c,e.token_id);if(!t)return;t.find(e=>e.token_id===(null==x?void 0:x.token_id))||p({toToken:t[0]})}}}return(0,n.jsxs)(B,{children:[(0,n.jsx)(s.Layout.RowBetween,{className:"titleRow",children:(0,n.jsx)(s.Typography.RegularM,{children:e("wallet.swap.title.bulkfrom")})}),(0,n.jsxs)(s.Layout.Col,{className:"inputRow",children:[(0,n.jsxs)(s.Layout.RowMiddle,{children:[(0,n.jsxs)("button",{className:"coinItem",onClick:C,children:[(0,n.jsx)("img",{className:"logo",src:d.logo,loading:"lazy"}),(0,n.jsx)(s.Typography.SemiboldS,{className:"symobl",children:d.symbol}),(0,n.jsx)(_.N,{className:"icon",iconPath:"rightArrow"})]}),(0,n.jsx)(N.Z,{ref:t,className:(0,f.classList)("input",g&&"hasError"),name:"from",decimal:!0,autoComplete:"off",placeholder:"0.00",value:h,onChange:e=>p({fromAmount:e.target.value}),onFocus:()=>p({useToAmount:!1}),onWheel:()=>{var e;return null===(e=t.current)||void 0===e?void 0:e.blur()}})]}),(0,n.jsxs)(s.Layout.RowMiddle,{className:"balanceWrap",children:[(0,n.jsxs)(s.Typography.RegularM,{children:[e("wallet.balance"),":"]}),(0,n.jsx)(s.Typography.SemiboldXS,{className:(0,f.classList)("balance",!y&&"zero",g&&"error"),children:y?m.g.numberToLocaleString(v):"0.00"}),w&&(0,n.jsxs)(s.Typography.SemiboldXS,{className:"fiat",children:["≈ ",j]})]})]})]})}),B=(0,c.ZP)(I).withConfig({componentId:"sc-3fe979d9-2"})([".max{padding:0 ",";border-radius:",";",";color:",";","{&:hover{background:",";}}&:active{background:",";}}"],(0,d.hO)(8),(0,d.hO)(4),s.typography.semibold.xxs,e=>e.theme.Content.cont_theme,h.W.hover,e=>e.theme.Surface.surf_s2_joy,e=>e.theme.Surface.surf_s2_joy),D=(0,a.Pi)(function(){let{t:e}=(0,u.$G)("common"),t=(0,r.useRef)(null),{singleInputData:o,toggleSinglePair:a,updateFromList:i,type:c}=l.swapStore,{toToken:d,toAmount:h,updateData:p,toList:g,fromToken:k}=o;if(!d)return null;let x=m.g.formatBalanceAmount(m.g.getToken(d.token_id).balance),v=Number(x)>0,y=Number(h)>0,w=m.g.fiatCurrencyNumberFormat(m.g.toFiat(h||0,d.token_id));async function j(){let e=await b({list:g,selected:d});if(e){if(e.token_id===(null==k?void 0:k.token_id))a();else{p({toToken:e});let t=await i(c,e.token_id);if(!t)return;t.find(e=>e.token_id===(null==k?void 0:k.token_id))||p({fromToken:t[0]})}}}return(0,n.jsxs)(Z,{children:[(0,n.jsx)(s.Layout.RowBetween,{className:"titleRow",children:(0,n.jsx)(s.Typography.RegularM,{children:e("wallet.swap.youreceive")})}),(0,n.jsxs)(s.Layout.Col,{className:"inputRow",children:[(0,n.jsxs)(s.Layout.RowMiddle,{children:[(0,n.jsxs)("button",{className:"coinItem",onClick:j,children:[(0,n.jsx)("img",{className:"logo",src:d.logo,loading:"lazy"}),(0,n.jsx)(s.Typography.SemiboldS,{className:"symobl",children:d.symbol}),(0,n.jsx)(_.N,{className:"icon",iconPath:"rightArrow"})]}),(0,n.jsx)(N.Z,{ref:t,className:(0,f.classList)("input",!1),name:"from",decimal:!0,autoComplete:"off",placeholder:"0.00",value:h,onChange:e=>p({toAmount:e.target.value}),onFocus:()=>p({useToAmount:!0}),onWheel:()=>{var e;return null===(e=t.current)||void 0===e?void 0:e.blur()}})]}),(0,n.jsxs)(s.Layout.RowMiddle,{className:"balanceWrap",children:[(0,n.jsxs)(s.Typography.RegularM,{children:[e("wallet.balance"),":"]}),(0,n.jsx)(s.Typography.SemiboldXS,{className:(0,f.classList)("balance",!v&&"zero"),children:v?m.g.numberToLocaleString(x):"0.00"}),y&&(0,n.jsxs)(s.Typography.SemiboldXS,{className:"fiat",children:["≈ ",w]})]})]})]})}),Z=(0,c.ZP)(I).withConfig({componentId:"sc-3fe979d9-3"})([""]),W=(0,a.Pi)(function(){return(0,n.jsx)(E,{onClick:l.swapStore.toggleSinglePair,children:(0,n.jsx)("svg",{className:"icon",xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"#1C2024",children:(0,n.jsx)("path",{d:"M10.297 19.874a.922.922 0 0 1-1.376.803l-.116-.079-5.019-3.956-.001-.001a.55.55 0 0 1-.207-.429v-1.7a.36.36 0 0 1 .583-.283l4.011 3.163V3.562a.36.36 0 0 1 .358-.358h1.406a.36.36 0 0 1 .36.358zM20.422 9.488a.36.36 0 0 1-.583.283l-4.011-3.163v13.83a.36.36 0 0 1-.358.359h-1.406a.36.36 0 0 1-.36-.36V4.126a.921.921 0 0 1 1.491-.723l5.019 3.957h.001a.55.55 0 0 1 .207.43z"})})})}),E=c.ZP.button.withConfig({componentId:"sc-3fe979d9-4"})(["margin:"," auto ",";display:flex;align-items:center;justify-content:center;width:",";height:",";border-radius:",";border:1px solid ",";background:var(--Casting-Lighten-Dual-8,rgba(255,255,255,0.36));box-shadow:0 70px 20px 0 rgba(0,0,0,0),0 45px 18px 0 rgba(0,0,0,0),0 25px 15px 0 rgba(0,0,0,0.01),0 11px 11px 0 rgba(0,0,0,0.02),0 3px 6px 0 rgba(0,0,0,0.02);backdrop-filter:blur(7px);.icon{width:",";height:",";fill:var(--Neutral-Apathy-11,#60646c);}","{&:hover{border:1px solid ",";background:var(--Casting-Lighten-Dual-11,rgba(255,255,255,0.64));.icon{fill:",";}}}&:active{background:var(--Neutral-Apathy-11,#60646c);border-color:var(--Neutral-Apathy-11,#60646c);.icon{fill:",";}}"],(0,d.hO)(-18),(0,d.hO)(-18),(0,d.hO)(48),(0,d.hO)(48),(0,d.hO)(12),e=>e.theme.Stroke.line_melter,(0,d.hO)(28),(0,d.hO)(28),h.W.hover,e=>e.theme.Stroke.line_contrast,e=>e.theme.Content.cont_main,e=>e.theme.Content.cont_inverted),F=(0,a.Pi)(function(){let{t:e}=(0,u.$G)("common"),[t,o]=(0,r.useState)(!0),{market:a,updateMarketRate:i,updateMarketData:c}=l.swapStore,{fromToken:d,toToken:h,rateInfo:p,toAmount:g,rate:f="1",slippage:b="0.5"}=a,k=j.Z.mul(g||0,j.Z.sub(100,b).div(100)).toNumber(),x=(0,r.useMemo)(()=>t?"1".concat(null==d?void 0:d.symbol," ≈ ").concat(m.g.numberToLocaleString(m.g.formatBalanceAmount(f))," ").concat(null==h?void 0:h.symbol):"1".concat(null==h?void 0:h.symbol," ≈ ").concat(m.g.numberToLocaleString(m.g.formatBalanceAmount(1/Number(f)))," ").concat(null==d?void 0:d.symbol),[f,t,d,h]),v=!(parseFloat((null==p?void 0:p.swap_fee)||"0")>0);return d&&h?(0,n.jsxs)(U,{children:[(0,n.jsxs)(s.Layout.RowBetween,{children:[(0,n.jsx)(s.Typography.RegularM,{className:"type",children:e("wallet.price")}),(0,n.jsxs)(s.Layout.RowMiddle,{className:"right",children:[(0,n.jsx)(C.ZP,{iconPath:"arrowLeftRightLine",onClick:()=>o(e=>!e)}),(0,n.jsx)(s.Typography.SemiboldXS,{className:"text",children:x}),(0,n.jsx)(C.Wt,{loading:a.rateLoading,iconPath:"refreshLine",onClick:async()=>{await i()}})]})]}),(0,n.jsxs)(s.Layout.RowBetween,{children:[(0,n.jsx)(s.Typography.RegularM,{className:"type",children:e("wallet.slippage")}),(0,n.jsxs)(s.Layout.RowBetween,{className:"right",children:[(0,n.jsxs)(s.Typography.SemiboldXS,{className:"text",children:[b,"%"]}),(0,n.jsx)(C.ZP,{iconPath:"edit",onClick:()=>T({slippage:b}).then(e=>{e&&c({slippage:e})})})]})]}),(0,n.jsxs)(s.Layout.RowBetween,{children:[(0,n.jsx)(s.Typography.RegularM,{className:"type",children:e("wallet.swap.miniumreceived")}),(0,n.jsx)(s.Layout.RowBetween,{className:"right",children:(0,n.jsxs)(s.Typography.SemiboldXS,{className:"text",children:[m.g.numberToLocaleString(m.g.formatBalanceAmount(k)),"\xa0",h.symbol]})})]}),(0,n.jsxs)(s.Layout.RowBetween,{children:[(0,n.jsx)(s.Typography.RegularM,{className:"type",children:e("wallet.fee")}),(0,n.jsx)(s.Layout.RowBetween,{className:"right",children:v?(0,n.jsx)(X,{}):(0,n.jsx)(s.Typography.SemiboldXS,{className:"text",children:null==p?void 0:p.swap_fee})})]})]}):null}),U=(0,c.ZP)(s.Layout.Col).withConfig({componentId:"sc-3fe979d9-5"})(["gap:",";padding:0 ",";.type{color:",";}.text{color:",";}.right{gap:",";}"],(0,d.hO)(12),(0,d.hO)(4),e=>e.theme.Content.cont_sub,e=>e.theme.Content.cont_main,(0,d.hO)(4));function X(){let{t:e}=(0,u.$G)("common"),[t,o]=(0,r.useState)(!1),a=(0,O._d)(),i=(0,L.Z)(()=>o(!1));return(0,n.jsxs)(z,{ref:i,className:(0,f.classList)(t&&"show"),onMouseLeave:()=>{a&&o(!1)},children:[(0,n.jsx)("button",{className:"wrap",onMouseEnter:()=>{a&&o(!0)},onClick:()=>{o(!t)},children:t?(0,n.jsx)(_.N,{iconPath:"info_fill"}):(0,n.jsx)(_.N,{iconPath:"infoCircle"})}),(0,n.jsx)(s.Typography.SemiboldXS,{className:"free",children:e("limit.fee")}),t&&(0,n.jsx)("div",{className:"info",children:(0,n.jsx)(s.Typography.RegularS,{className:"tooltip",children:e("wallet.swap.free")})})]})}let z=(0,c.ZP)(s.Layout.RowMiddle).withConfig({componentId:"sc-3fe979d9-6"})(["gap:",";position:relative;> .wrap{display:flex;align-items:center;svg{width:",";height:",";fill:",";}}> .free{text-transform:uppercase;color:",";}> .info{position:absolute;right:0;bottom:100%;padding-bottom:",";width:",";.tooltip{border-radius:",";padding:",";background:var(--Casting-Darken-Dual-13,rgba(0,0,0,0.8));box-shadow:0 0 46px 0 rgba(139,141,152,0.36);backdrop-filter:blur(15px);color:",";}}"],(0,d.hO)(4),(0,d.hO)(16),(0,d.hO)(16),e=>e.theme.Content.cont_theme,e=>e.theme.Content.cont_theme,(0,d.hO)(12),(0,d.hO)(322),(0,d.hO)(8),(0,d.hO)(16),e=>e.theme.Content.cont_inverted),q=(0,a.Pi)(function(){let{t:e}=(0,u.$G)("common"),t=(0,O.s0)(),{market:o,marketError:a}=l.swapStore,i=m.account.isLogin&&(0>=Number(o.fromAmount)||o.rateLoading||a),r=e(m.account.isLogin?a?"otc.button.exceed":"wallet.swap":"wallet.login");async function s(){var e,n;let a=new URLSearchParams({from:(null===(e=o.fromToken)||void 0===e?void 0:e.token_id)||"",to:(null===(n=o.toToken)||void 0===n?void 0:n.token_id)||""});o.useToAmount?a.append("toAmount",o.toAmount||""):a.append("fromAmount",o.fromAmount||""),t("/swap?".concat(a.toString()))}return(0,n.jsx)($,{onClick:s,className:"submit",disabled:i,children:r})}),$=(0,c.ZP)(p.xk).withConfig({componentId:"sc-3fe979d9-7"})(["height:",";border-radius:",";",";background:",";color:",";&:disabled{background:var(--Neutral-Apathy-7,#d3d4db);color:",";}"],(0,d.hO)(46),(0,d.hO)(8),s.typography.semibold.xs,e=>e.theme.Content.cont_main,e=>e.theme.Content.cont_neon,e=>e.theme.Content.cont_sub)},54660:function(e,t,o){o.d(t,{Wt:function(){return h},ZP:function(){return c}});var n=o(85893),a=o(4400),i=o(4281),r=o(81763),l=o(76662);o(99260);var s=o(41686);function c(e){let{className:t,onClick:o,iconPath:i}=e;return(0,n.jsx)(d,{className:t,onClick:o,children:(0,n.jsx)(a.N,{iconPath:i,className:"icon"})})}let d=s.ZP.button.withConfig({componentId:"sc-899d874-0"})(["width:",";height:",";border-radius:50%;display:flex;align-items:center;justify-content:center;.icon{width:",";height:",";fill:#7e808a;}&:hover{","{background-color:#f9f9fb;.icon{fill:#1c2024;}}}&:active{background-color:#f9f9fb;.icon{fill:#1c2024;}}"],(0,r.hO)(24),(0,r.hO)(24),(0,r.hO)(16),(0,r.hO)(16),l.W.hover);function h(e){let{className:t,onClick:o,iconPath:a="refresh",loading:l=!1}=e,[s,d]=r.PT.useSetState({loading:!1});return s.loading||l?(0,n.jsx)(u,{className:t,children:(0,n.jsx)(i.Loading,{})}):(0,n.jsx)(c,{className:t,iconPath:a,onClick:function(){d({loading:!0}),o().finally(()=>{d({loading:!1})})}})}let u=s.ZP.button.withConfig({componentId:"sc-899d874-1"})(["display:flex;align-items:center;justify-content:center;width:",";height:",";svg{width:",";height:",";}"],(0,r.hO)(24),(0,r.hO)(24),(0,r.hO)(16),(0,r.hO)(16))},37696:function(e,t,o){var n=o(85893),a=o(4281),i=o(81763),r=o(76662),l=o(29323),s=o(41686),c=o(54660);t.Z=(0,l.Pi)(function(e){let{title:t,children:o,className:i}=e;return(0,n.jsxs)(d,{className:i,children:[a.pop.isFocused&&function(){var e,t;let o=window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1);return!!((null===(t=window.Telegram)||void 0===t?void 0:null===(e=t.WebApp)||void 0===e?void 0:e.initData)&&o)}()&&(0,n.jsx)(h,{}),t&&(0,n.jsxs)(a.Layout.RowMiddle,{className:"header",children:[(0,n.jsx)(a.Typography.SemiboldS,{className:"text",children:t}),(0,n.jsx)(c.ZP,{className:"close",iconPath:"close",onClick:()=>a.pop.back()})]}),o]})});let d=s.ZP.div.withConfig({componentId:"sc-46052027-0"})(["padding:",";border-radius:",";background:#fff;width:",";","{padding-bottom:",";border-radius:"," "," 0 0;width:100vw;max-width:100vw;max-height:85vh;}> .header{height:",";.text{flex:1;padding-left:",";text-align:center;color:",";}.close{.icon{width:",";height:",";}}}"],(0,i.hO)(16),(0,i.hO)(16),(0,i.hO)(480),r.W.mobileMedia,(0,i.hO)(36),(0,i.hO)(16),(0,i.hO)(16),(0,i.hO)(32),(0,i.hO)(24),e=>e.theme.Content.cont_main,(0,i.hO)(9),(0,i.hO)(9)),h=(0,s.vJ)([".cui-overlayer{bottom:unset !important;height:var(--tg-viewport-stable-height,100vh);}"])},33425:function(e,t,o){o.d(t,{swapStore:function(){return m},x:function(){return a}});var n,a,i=o(7159),r=o(4281),l=o(90482),s=o(99260),c=o(68949),d=o(21073);let h=r.Notify;(n=a||(a={}))[n.Market=0]="Market",n[n.Limit=1]="Limit",n[n.Bulk=2]="Bulk";class u{setType(e){this.type=e}setShowChart(e){this.showChart=e}get marketReady(){return this.market.fromToken&&this.market.toToken}get limitReady(){return this.limit.fromToken&&this.limit.toToken}get bulkReady(){return this.bulk.fromToken&&this.bulk.toToken}get marketError(){let{fromAmount:e,fromToken:t}=this.market;if(e&&t){let o=d.g.getToken(t.token_id).balance;if(Number(e)>Number(o))return!0}return!1}get limitError(){let{fromAmount:e,fromToken:t}=this.limit;if(e&&t){let o=d.g.getToken(t.token_id).balance;if(Number(e)>Number(o))return!0}return!1}get bulkError(){let{selectedTokenId:e,inputRecord:t}=this.bulk;return!!(null==e?void 0:e.some(e=>{let o=d.g.formatBalanceAmount(d.g.getToken(e).balance),n=(null==t?void 0:t[e].amount)||"0";return Number(n)>0&&Number(n)>Number(o)}))}get singleInputData(){let e=0===this.type,{fromToken:t,toToken:o,fromAmount:n,toAmount:a,fromList:i,toList:r,rate:l}=e?this.market:this.limit;return{fromList:i,fromToken:t,fromAmount:n,toList:r,toToken:o,toAmount:a,rate:l,hasError:e?this.marketError:this.limitError,updateData:e?this.updateMarketData:this.updateLimitData}}async updateFromList(e,t){let[o,n]=await (0,s.promiseWrap)(i.fK.getSwapList("from",t,1)),a=n||void 0;switch(o&&h(o),e){case 0:this.updateMarketData({fromList:a});break;case 1:this.updateLimitData({fromList:a});break;case 2:let r=["01b7f34f-f54c-4c2a-b426-f23cdca3b815"];this.updateBulkData({fromList:a?a.filter(e=>!r.includes(e.token_id)):a})}return a}async updateToList(e,t){let[o,n]=await (0,s.promiseWrap)(i.fK.getSwapList("to",t,1)),a=n||void 0;switch(o&&h(o),e){case 0:this.updateMarketData({toList:a});break;case 1:this.updateLimitData({toList:a});break;case 2:let r=["01b7f34f-f54c-4c2a-b426-f23cdca3b815"];this.updateBulkData({toList:a?a.filter(e=>!r.includes(e.token_id)):a})}return a}async updateMarketRate(e,t){var o,n;if(e||(e=null===(o=this.market.fromToken)||void 0===o?void 0:o.token_id),t||(t=null===(n=this.market.toToken)||void 0===n?void 0:n.token_id),!e||!t)return;this.updateMarketData({rateLoading:!0});let[a,r]=await (0,s.promiseWrap)(i.fK.getSwapRateV2({from:e,to:t}));if(a){this.updateMarketData({rateLoading:!1}),h(a);return}return this.updateMarketData({rateInfo:r,rateLoading:!1,rate:r.rate}),r.rate}async updateLimitRate(e,t){var o,n;if(e||(e=null===(o=this.limit.fromToken)||void 0===o?void 0:o.token_id),t||(t=null===(n=this.limit.toToken)||void 0===n?void 0:n.token_id),!e||!t)return;this.updateLimitData({rateLoading:!0});let[a,r]=await (0,s.promiseWrap)(i.fK.querySpotRate({from_coin_id:e,to_coin_id:t}));if(a){this.updateLimitData({rateLoading:!1}),h(a);return}return this.updateLimitData({rateInfo:r,rateLoading:!1,rate:r.currency_trade_rate}),r.currency_trade_rate}async updateBulkRate(e,t){if(e&&0!==e.length||(e=this.bulk.selectedTokenId),!t){var o;t=null===(o=this.bulk.toToken)||void 0===o?void 0:o.token_id}if(!e||!t)return;this.updateBulkData({rateLoading:!0});let[n,a]=await (0,s.promiseWrap)(i.fK.getBatchSwapRate({from_list:e,to:t}));if(n){this.updateBulkData({rateLoading:!1}),h(n);return}return this.updateBulkData({rateInfo:a,rateLoading:!1}),a}async initSingleSwapList(e,t,o){let n=await this.updateFromList(e);if(!n)return;let a=n.find(e=>e.token_id===t)||n.find(e=>1!==e.status)||n[0],i=await this.updateToList(e,a.token_id);if(!i)return;let r=i.find(e=>e.token_id===o)||i.find(e=>1!==e.status)||i[0];switch(e){case 0:this.updateMarketData({fromToken:a,toToken:r});break;case 1:this.updateLimitData({fromToken:a,toToken:r})}}async initMultipleSwapList(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:d.g.USDT_TOKEN_ID,n=await this.updateToList(e);if(!n)return;let a=n.find(e=>e.token_id===o)||n.find(e=>1!==e.status)||n[0],i=await this.updateFromList(e,a.token_id);if(!i)return;let r=i.find(e=>e.token_id===t)||i.find(e=>1!==e.status)||i[0],l=i.filter(e=>Number(e.balance)>1e-8).map(e=>e.token_id);this.updateBulkData({fromToken:r,toToken:a,selectedTokenId:this.bulk.selectedTokenId?this.bulk.selectedTokenId:l.length>0?l:[r.token_id]})}updateMarketData(e){this.market={...this.market,...e}}updateLimitData(e){this.limit={...this.limit,...e}}updateBulkData(e){this.bulk={...this.bulk,...e}}toggleSinglePair(){let{fromToken:e,toToken:t,fromList:o,toList:n,rate:a,updateData:i}=this.singleInputData;i({fromAmount:"",toAmount:"",fromToken:t,toToken:e,fromList:n,toList:o,rate:a?l.Z.div(1,a).toString():void 0})}autoUpdateMarketRate(){return(0,c.U5)(()=>{var e,t;return"".concat(null===(e=this.market.fromToken)||void 0===e?void 0:e.token_id,"__").concat(null===(t=this.market.toToken)||void 0===t?void 0:t.token_id)},e=>{let[t,o]=e.split("__");"undefined"!==t&&"undefined"!==o&&this.updateMarketRate(t,o)})}autoUpdateLimitRate(){return(0,c.U5)(()=>{var e,t;return"".concat(null===(e=this.limit.fromToken)||void 0===e?void 0:e.token_id,"__").concat(null===(t=this.limit.toToken)||void 0===t?void 0:t.token_id)},e=>{let[t,o]=e.split("__");"undefined"!==t&&"undefined"!==o&&this.updateLimitRate(t,o)})}autoUpdateBulkRate(){return(0,c.U5)(()=>{var e,t;return"".concat(null===(e=this.bulk.selectedTokenId)||void 0===e?void 0:e.length,"__").concat(null===(t=this.bulk.toToken)||void 0===t?void 0:t.token_id)},(e,t)=>{let[o,n]=e.split("__"),[a,i]=t.split("__");"undefined"!==o&&"undefined"!==n&&(Number(o)>Number(a)||n!==i)&&this.updateBulkRate(this.bulk.selectedTokenId,n)})}autoUpdateMarketInput(){return(0,c.U5)(()=>{var e;return"".concat(this.market.fromAmount,"__").concat(this.market.toAmount,"__").concat(null===(e=this.market.rateInfo)||void 0===e?void 0:e.rate)},e=>{let[t,o,n]=e.split("__");if("undefined"!==t&&"undefined"!==o&&"undefined"!==n){if(this.market.useToAmount){let e=Number(o)>0?d.g.formatBalanceAmount(l.Z.div(o,n)):"";this.updateMarketData({fromAmount:e})}else{let e=Number(t)>0?d.g.formatBalanceAmount(l.Z.mul(t,n)):"";this.updateMarketData({toAmount:e})}}})}autoUpdateLimitInput(){return(0,c.U5)(()=>"".concat(this.limit.fromAmount,"__").concat(this.limit.toAmount,"__").concat(this.limit.customRate),e=>{let[t,o,n]=e.split("__");if("undefined"===t||"undefined"===o||"undefined"===n)return;let a=this.limit.useToAmount;if(this.limit.toggleRate&&(n=l.Z.div(1,n).toString()),a){let e=Number(o)>0?d.g.formatBalanceAmount(l.Z.div(o,n)):"";this.updateLimitData({fromAmount:e})}else{let e=Number(t)>0?d.g.formatBalanceAmount(l.Z.mul(t,n)):"";this.updateLimitData({toAmount:e})}})}autoUpdateBulkInput(){let e=(0,c.U5)(()=>{var e;return"".concat(null===(e=this.bulk.selectedTokenId)||void 0===e?void 0:e.length)},e=>{if("undefined"===e)return;let t=this.bulk.selectedTokenId,o={amount:"",tokenId:"",checkError:"",focused:!1},n=t.reduce((e,t)=>{var n;return e[t]=(null===(n=this.bulk.inputRecord)||void 0===n?void 0:n[t])||{...o,amount:d.g.formatBalanceAmount(d.g.getToken(t).balance),tokenId:t},e},{});this.updateBulkData({inputRecord:n})}),t=(0,c.U5)(()=>{var e;return"".concat(Object.values(this.bulk.inputRecord||{}).map(e=>e.amount).join(""),"__").concat(null===(e=this.bulk.rateInfo)||void 0===e?void 0:e.rate_list.map(e=>e.rate).join(""))},e=>{var t;let[o,n]=e.split("__");if("undefined"===o||"undefined"===n)return;let a=null===(t=this.bulk.selectedTokenId)||void 0===t?void 0:t.reduce((e,t)=>{var o,n,a;let i=(null===(o=this.bulk.inputRecord)||void 0===o?void 0:o[t].amount)||"0",r=(null===(a=this.bulk.rateInfo)||void 0===a?void 0:null===(n=a.rate_list.find(e=>e.from===t))||void 0===n?void 0:n.rate)||"0";return l.Z.mul(i,r).add(e).toNumber()},0);this.updateBulkData({toAmount:d.g.formatBalanceAmount(a||0)})});return()=>{e(),t()}}handleBulkAllMax(){let e=this.bulk.selectedTokenId.reduce((e,t)=>{let o=e[t],n=d.g.formatBalanceAmount(d.g.getToken(t).balance);return e[t]={...o,amount:n},e},{});this.updateBulkData({inputRecord:e})}constructor(){this.type=0,this.showChart=!1,this.market={fromAmount:"",toAmount:"",useToAmount:!1,rateLoading:!1,slippage:"0.5"},this.limit={fromAmount:"",toAmount:"",useToAmount:!1,customRate:"",toggleRate:!1},this.bulk={toAmount:"",slippage:"0.5",inputRecord:{}},(0,c.ky)(this,void 0,{autoBind:!0,deep:!1,name:"SwapStore"})}}let m=new u}}]);