1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="10667da2-2c1b-4b8d-9b6e-463e93e84ffe",e._sentryDebugIdIdentifier="sentry-dbid-10667da2-2c1b-4b8d-9b6e-463e93e84ffe")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[27807],{1058:(e,n,t)=>{t.d(n,{A:()=>a});var l=t(6289),i=t(25076);function a(e,n){let{mutate:t}=(0,i.Ay)({limit:10,offset:0}),{mutate:a}=(0,i.u3)({limit:10,bot:(0,l.A)(n)?0:n}),{mutate:r}=(0,i.u3)({symbol:e,bot:(0,l.A)(n)?0:n}),o=()=>{t(),a(),e&&r()};return{mutateAllUserOrders:()=>{setTimeout(()=>{o(),setTimeout(()=>{o()},2e3)},500)}}}},7957:(e,n,t)=>{t.d(n,{A:()=>c});var l=t(18153),i=t(59312),a=t(18847),r=t.n(a);let o=r()(()=>Promise.all([t.e(85861),t.e(74573),t.e(68974)]).then(t.bind(t,46593)),{loadableGenerated:{webpack:()=>[46593]}}),d=r()(()=>Promise.all([t.e(85861),t.e(74573),t.e(37852),t.e(90377)]).then(t.bind(t,19898)),{loadableGenerated:{webpack:()=>[19898]}});function c(e){return(0,i.$W)()?(0,l.Y)(o,{...e}):(0,l.Y)(d,{...e})}},22925:(e,n,t)=>{t.d(n,{A:()=>s});var l=t(18153),i=t(84733),a=t(55134),r=t(62168),o=t(5067),d=t(50074),c=t(56905);function s(e){let{placeholder:n,error:t,adornment:s,tooltip:u,...m}=e;return(0,l.Y)(c.A,{variant:"filled",sx:{"& > .MuiFilledInput-root":{borderRadius:1,borderWidth:1,borderStyle:"solid",borderColor:"transparent"},"& input":{padding:1},"& .Mui-error":{borderColor:e=>e.palette.error.light}},size:"small",color:"secondary",placeholder:n,margin:"dense",fullWidth:!0,error:t,InputProps:{disableUnderline:!0,startAdornment:(0,l.FD)(i.A,{sx:{display:"inline-flex",alignItems:"center",gap:.25},children:[(0,l.Y)(o.A,{sx:{textWrap:"nowrap"},children:s}),u&&(0,l.Y)(r.A,{title:u,arrow:!0,enterTouchDelay:0,leaveTouchDelay:4e3,children:(0,l.Y)(a.A,{size:"small",sx:{p:.25,color:"text.secondary"},"aria-label":"راÙÙÙ
ا",children:(0,l.Y)(d.default,{sx:{fontSize:14}})})})]})},inputProps:{dir:"ltr",autoComplete:"off"},...m})}},27807:(e,n,t)=>{t.d(n,{A:()=>eL});var l=t(18153),i=t(18847),a=t.n(i),r=t(84733),o=t(18939),d=t(46513),c=t(5067),s=t(45434),u=t(95654),m=t(13540),h=t(55134),p=t(8108),b=t(62168),y=t(94504),A=t(18697),f=t(74230),v=t(63090),Y=t(61917),x=t(30441),g=t(63565),D=t(11610),F=t(14232),w=t(75855),k=t(87689),_=t(25601),O=t(7400),C=t(48338),W=t(58106),S=t.n(W),R=t(87353),I=t.n(R),N=t(27092),M=t(74441),L=t(3801),z=t(59688),P=t(30455),E=t(37394),T=t(95124),j=t(91316),U=t(72082),B=t(89885),K=t(52960),G=t(22925),q=t(71693),X=t(11248),$=t(82772),V=t(99319);let H=(0,F.memo)(function(e){var n;let{data:t,mutate:i,orderFormDrawer:a}=e,[o,d]=(0,F.useState)({price:"",amount:"",total:""}),s=e=>d(n=>({...n,price:e})),u=e=>d(n=>({...n,amount:e})),m=e=>d(n=>({...n,total:e})),{marketType:h}=(0,T.uG)(),{highestBidPrice:b}=(0,T.$G)(null==t||null==(n=t.symbol)?void 0:n.name),{orderType:v}=(0,T.SO)(),Y=null==t?void 0:t.symbol.asset.symbol,g=null==t?void 0:t.symbol.base_asset.symbol,D=null==t?void 0:t.symbol.tick_size,w=null==t?void 0:t.symbol.step_size,k=t.free_amount,_=(0,V.u)(k),[O,W]=(0,F.useState)(!1),[R,M]=(0,F.useState)(!1),[L,H]=(0,F.useState)(!1),Q=w||0,J=D||0;async function ee(){try{var e;ea(),M(!0);let n=await (0,E.ajax)({method:"post",url:"v1/market/orders/?fast_mode=1",data:{is_open_position:!1,position_id:null==t?void 0:t.id,symbol:null==t?void 0:t.symbol.name,amount:(0,y.OM)((0,y.Re)(o.amount)),...v===C.q$.Market?{fill_type:"market"}:{fill_type:"limit",price:(0,y.OM)((0,y.Re)(o.price))},side:"short"===t.side?"buy":"sell",market:"margin"}});i(),n.data.status===C.Re.Filled?z.toast.success("Ù
عاÙ
ÙÙ Ø§ÙØ¬Ø§Ù
شد"):z.toast.success("ثبت شد"),u(""),m(""),j.firebaseCloudMessaging.fireBaseLogEvent("new_order"),(0,U.QT)({symbol:null==t||null==(e=t.symbol)?void 0:e.name,side:(null==t?void 0:t.side)==="short"?"buy":"sell",market_type:"margin",order_kind:"position_close"})}catch(e){(0,E.handleError)(e)}finally{M(!1),H(!1)}}let en=(0,F.useRef)(!1);(0,F.useEffect)(()=>{a||(d({price:"",amount:"",total:""}),en.current=!1)},[a]);let et=e=>{let n=e.target.value;if(S()(n)||void 0===n)return void s("");let t=(0,y.OM)((0,y.Re)(n));if((0,y.Et)(t,D)){let e=new P.W(t),n=new P.W((0,y.OM)((0,y.Re)(o.amount||"0"))),l=e.times(n),i="";i=l.decimalPlaces()>J?l.toFixed(J,P.W.ROUND_DOWN):l.valueOf(),s((0,y.f6)(t)),m((0,y.f6)(i))}},el=()=>new P.W(k||"0").toFixed(Q,P.W.ROUND_DOWN),ei=()=>{let e=el();return new P.W((0,y.OM)((0,y.Re)(o.price||"0"))).times(e).toFixed(J,P.W.ROUND_DOWN)},ea=()=>{try{let e=new P.W((0,y.OM)((0,y.Re)(o.price))),n=new P.W((0,y.OM)((0,y.Re)(o.amount))),t=e.times(n),l="";l=t.decimalPlaces()>J?t.toFixed(J,P.W.ROUND_DOWN):t.valueOf();let i=(0,y.OM)((0,y.Re)(l));m((0,y.f6)(i))}catch(e){}};(0,F.useEffect)(()=>{a&&!en.current&&b&&"0"!==b&&(en.current=!0,d(e=>e.price?e:{...e,price:(0,y.f6)(b)}))},[a,b]);let er=(e,n)=>{let t=new P.W(k||"0"),l=new P.W((0,y.OM)((0,y.Re)(o.price||"0"))),i=t.toFixed(Q,P.W.ROUND_DOWN),a=new P.W(n).times(i).dividedBy(100),r="";r=a.decimalPlaces()>Q?a.toFixed(Q,P.W.ROUND_DOWN):a.valueOf();let d=l.times(r),c="";c=d.decimalPlaces()>J?d.toFixed(J,P.W.ROUND_DOWN):d.valueOf(),u((0,y.f6)(r)),m((0,y.f6)(c))},eo=(0,F.useMemo)(()=>{let e=new P.W((0,y.OM)((0,y.Re)(o.amount||"0"))),n=new P.W((0,y.OM)((0,y.Re)(k||"0"))).toFixed(Q,P.W.ROUND_DOWN),t=new P.W(n).greaterThan(0)?e.times(100).dividedBy(n).toFixed(0):0;return I()(t)},[o.amount,Q,k]),ed=L&&!(0,V.u)(o.amount);return(0,l.FD)(l.FK,{children:[(0,l.FD)(r.A,{sx:{p:1,backgroundColor:e=>e.vars.palette.background.default,borderRadius:2,mb:2},children:[(0,l.FD)(r.A,{display:"flex",alignItems:"flex-end",justifyContent:"space-between",minHeight:24,mb:1,children:[(0,l.Y)(c.A,{variant:"caption",color:"textSecondary",children:"بازار"}),(0,l.FD)(r.A,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[(0,l.Y)(c.A,{variant:"caption",children:(0,l.Y)(p.A,{color:"inherit",component:A.A,href:"/trade/classic/".concat(t.symbol.asset.symbol+t.symbol.base_asset.symbol),children:(0,l.Y)("strong",{children:t.symbol.asset.symbol+t.symbol.base_asset.symbol})})}),(0,l.FD)(c.A,{ml:.5,color:x.M[t.side].color,variant:"caption",display:"inline-block",children:[t.leverage,"x ",t.side?x.M[t.side].text:"-"]})]})]}),(0,l.FD)(r.A,{display:"flex",alignItems:"flex-end",justifyContent:"space-between",minHeight:24,mb:1,children:[(0,l.Y)(c.A,{variant:"caption",color:"textSecondary",children:"Ù
ÛØ§ÙÚ¯ÛÙ ÙÛÙ
ت ÙØ±Ùد"}),t.average_price?(0,l.FD)(r.A,{children:[(0,l.Y)(c.A,{variant:"caption",display:"inline-block",color:"text.secondary",mr:.5,children:t.symbol.base_asset.symbol}),(0,l.Y)(c.A,{variant:"body2",display:"inline-block",children:(0,l.Y)($.A,{children:(0,y.f6)(t.average_price)})})]}):"-"]}),(0,l.FD)(r.A,{display:"flex",alignItems:"flex-end",justifyContent:"space-between",minHeight:24,mb:1,children:[(0,l.Y)(c.A,{variant:"caption",color:"textSecondary",children:"Ø³ÙØ¯ / Ø²ÛØ§Ù"}),t.pnl?(0,l.Y)(f.ZI,{value:null==t?void 0:t.pnl,render:e=>(0,l.FD)(l.FK,{children:[(0,l.Y)(c.A,{variant:"caption",display:"inline-block",color:"text.secondary",mr:.5,children:t.symbol.base_asset.symbol}),(0,l.Y)(c.A,{variant:"caption",display:"inline-block",children:(0,l.Y)($.A,{children:X.x+(0,y.f6)(e)})})]})}):"-"]})]}),(0,l.FD)("form",{onSubmit:function(e){e.preventDefault(),H(!0),(0,V.u)(o.amount)&&o.price&&ee()},noValidate:!0,children:[(0,l.Y)(q.A,{prefix:"ØØ¯Ø§Ú©Ø«Ø±",data:{balance:k,symbol:Y},isFetching:!1,onBalanceClicked:()=>er(null,100)}),v===C.q$.Market&&(0,l.Y)(G.A,{disabled:!0,id:"price",value:"",onChange:et,placeholder:"ÙÛÙ
ت بازار",adornment:"ÙÛÙ
ت"}),v===C.q$.Limit&&(0,l.Y)(G.A,{disabled:R,id:"price",value:o.price,onChange:et,placeholder:g,adornment:"ÙÛÙ
ت",error:!o.price&&L}),(0,l.Y)(G.A,{disabled:R,id:"amount",value:o.amount,onChange:e=>{let n=el(),t=e.target.value;if(S()(t)||void 0===t)return void u("");let l=(0,y.OM)((0,y.Re)(t)),i=Number(l)>Number(n)?n:l;if((0,y.Et)(i,w)){let e=new P.W((0,y.OM)((0,y.Re)(o.price||"0"))),n=new P.W(i),t=e.times(n),l="";l=t.decimalPlaces()>J?t.toFixed(J,P.W.ROUND_DOWN):t.valueOf(),u((0,y.f6)(i)),m((0,y.f6)(l))}},placeholder:Y,adornment:"Ù
ÙØ¯Ø§Ø±",error:ed,helperText:_?ed?"Ù
ÙØ¯Ø§Ø± Ø¨Ø§ÛØ¯ Ø¨ÛØ´ØªØ± از ØµÙØ± باشد.":void 0:"Ù
ÙØ¯Ø§Ø± Ø¢Ø²Ø§Ø¯Û Ø¨Ø±Ø§Û Ø¨Ø³ØªÙ Ø§ÛÙ Ù
ÙÙØ¹Ûت باÙÛ ÙÙ
Ø§ÙØ¯Ù Ø§Ø³ØªØ Ø§Ú¯Ø± Ø³ÙØ§Ø±Ø´ بست٠باز Ø¯Ø§Ø±ÛØ¯Ø ابتدا آ٠را ÙØºÙ Ú©ÙÛØ¯."}),(0,l.Y)(N.A,{fullWidth:!0,margin:"dense",children:(0,l.Y)(K.A,{name:"slider",value:eo,onChange:er,disabled:!_,type:"sell"})}),v===C.q$.Limit&&(0,l.Y)(G.A,{disabled:R,id:"total",value:o.total,onChange:e=>{let n=e.target.value;if(S()(n)||void 0===n)return void m("");let t=(0,y.OM)((0,y.Re)(n)),l=Number(t)>Number(ei())?ei():t;if((0,y.Et)(l,w)){let e=new P.W((0,y.OM)((0,y.Re)(o.price||"0"))),n=new P.W(l),t="0"===e.valueOf()?new P.W(0):n.dividedBy(e),i="";i=t.decimalPlaces()>Q?t.toFixed(Q,P.W.ROUND_DOWN):t.valueOf(),m((0,y.f6)(l)),u((0,y.f6)(i))}},placeholder:g,adornment:"Ù
جÙ
ÙØ¹"}),(0,l.Y)(Z,{color:(null==t?void 0:t.side)==="short"?"buy":"sell",variant:"contained",disableElevation:!0,fullWidth:!0,type:"submit",loading:R,sx:{mt:1},children:"بست٠Ù
ÙÙØ¹Ûت"}),(0,l.Y)(B.A,{})]})]})}),Z=(0,w.Ay)(L.A)(e=>
1{let{theme:n,color:t}=e;return{color:n.vars.palette.background.default,backgroundColor:n.vars.palette[t],"&:hover":{backgroundColor:(0,M.e$)(n.palette[t],.15)},[n.getColorSchemeSelector("dark")]:{color:n.vars.palette.text.primary}}});function Q(e){let{orderFormDrawer:n,data:t,mutate:i}=e,{orderType:a,setOrderType:d}=(0,T.SO)();return(0,l.Y)(o.A,{square:!0,variant:"elevation",elevation:0,sx:{height:"100%"},children:(0,l.FD)(l.FK,{children:[(0,l.Y)(r.A,{px:1,py:.5,children:(0,l.FD)(J,{variant:"scrollable",value:a,onChange:(e,n)=>{d(n)},children:[(0,l.Y)(ee,{label:"ÙÛÙ
ت ثابت",value:C.q$.Limit}),(0,l.Y)(ee,{label:"ÙÛÙ
ت بازار",value:C.q$.Market})]})}),(0,l.Y)(O.A,{variant:"fullWidth",sx:{opacity:"0.6"}}),(0,l.Y)(r.A,{mb:2}),(0,l.Y)(r.A,{px:2,pb:2,mt:1,children:(0,l.Y)(H,{orderFormDrawer:n,mutate:i,data:t})})]})})}let J=(0,w.Ay)(k.A)({minHeight:30,"& .MuiTabs-indicator":{backgroundColor:"transparent"}}),ee=(0,w.Ay)(_.A)(e=>{let{theme:n}=e;return{minHeight:30,minWidth:"unset",borderRadius:4,fontSize:12,lineHeight:"14px",fontWeight:500,paddingTop:4,paddingBottom:4,paddingLeft:4,paddingRight:4,marginRight:4,marginLeft:4,color:n.vars.palette.text.primary,"&.Mui-selected":{color:n.vars.palette.text.mainColor},"&:hover":{color:n.vars.palette.text.mainColor}}});function en(e){let{data:n,mutate:t}=e,[i,a]=(0,F.useState)(!1);return(0,l.FD)(l.FK,{children:[(0,l.Y)(r.A,{ml:.5,width:"100%",color:e=>(null==n?void 0:n.side)==="short"?e.vars.palette.buy:e.vars.palette.sell,children:(0,l.Y)(u.A,{fullWidth:!0,size:"small",onClick:()=>{a(!0)},color:"inherit",children:"بست٠Ù
ÙÙØ¹Ûت"})}),(0,l.Y)(D.A,{anchor:"bottom",open:i,onClose:()=>{a(!1)},keepMounted:!0,PaperProps:{sx:{borderTopLeftRadius:12,borderTopRightRadius:12,overflowX:"hidden"}},children:(0,l.Y)(Q,{orderFormDrawer:i,mutate:t,data:n})})]})}var et=t(41597),el=t(71667),ei=t(91320);let ea=a()(()=>t.e(61649).then(t.bind(t,61649)),{loadableGenerated:{webpack:()=>[61649]}});function er(e){let{data:n,mutate:t}=e,{dispatch:i}=(0,Y.rY)();return(0,l.FD)(r.A,{p:2,sx:{borderBottomWidth:1,borderBottomStyle:"solid",borderBottomColor:"divider","&:last-of-type":{borderBottomWidth:0}},children:[(0,l.FD)(r.A,{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2,children:[(0,l.Y)(r.A,{display:"flex",alignItems:"center",children:(0,l.FD)(c.A,{color:x.M[n.side].color,variant:"body1",display:"inline-block",children:[n.leverage,"x ",n.side?x.M[n.side].text:"-"]})}),(0,l.Y)(r.A,{display:"flex",alignItems:"center",children:(0,l.Y)(c.A,{variant:"body1",sx:{mt:.4},children:(0,l.Y)(p.A,{color:"inherit",component:A.A,href:"/trade/classic/".concat(n.symbol.asset.symbol+n.symbol.base_asset.symbol),children:(0,l.Y)("strong",{children:n.symbol.asset.symbol+n.symbol.base_asset.symbol})})})})]}),(0,l.FD)(r.A,{display:"flex",justifyContent:"space-between",alignItems:"end",mb:1,children:[(0,l.Y)(c.A,{variant:"body2",color:"textSecondary",children:"زÙ
ا٠بست٠شدÙ"}),(0,l.Y)(r.A,{children:(0,l.Y)(c.A,{variant:"caption",display:"inline-block",children:(0,el.A)(null==n?void 0:n.deadline)>1?"".concat((0,el.A)(null==n?void 0:n.deadline)," Ø±ÙØ² Ù
Ø§ÙØ¯Ù"):(null==n?void 0:n.deadline)?"".concat((0,l.Y)($.A,{children:(0,el.Y)(null==n?void 0:n.deadline,"'ساعت' HH:mm")})," (اÙ
Ø±ÙØ²)"):null})})]}),(0,l.FD)(r.A,{display:"flex",justifyContent:"space-between",alignItems:"end",mb:1,children:[(0,l.Y)(eo,{help:" ØØ¬Ù
ÛØ§ Ø§ÙØ¯Ø§Ø²Ù Ù
ÙÙØ¹Ûت برابر است با Ù
ÛØ²Ø§Ù ارز Ø¯ÛØ¬Ûتا٠Ù
عاÙ
Ù٠شد٠در ØÛ٠باز کرد٠Ù
ÙÙØ¹Ûت ضربدر ÙÛÙ
ت ÙØ¹ÙÛ Ø¨Ø§Ø²Ø§Ø±. ØØ¬Ù
Ù
ÙÙØ¹Ûت با آخرÛÙ ÙÛÙ
ت بازار تغÛÛØ± Ù
Û Ú©ÙØ¯.",children:"ØØ¬Ù
"}),(0,l.Y)(r.A,{children:(0,l.Y)(f.ZI,{value:n.volume,render:e=>(0,l.FD)(l.FK,{children:[(0,l.Y)(c.A,{variant:"caption",display:"inline-block",color:"text.secondary",mr:.5,children:n.symbol.base_asset.symbol}),(0,l.FD)(c.A,{variant:"body2",display:"inline-block",children:[X.x,Number(e)>0?"+":null,(0,l.Y)($.A,{children:(0,y.f6)(e)})]})]})})})]}),(0,l.FD)(r.A,{display:"flex",justifyContent:"space-between",alignItems:"end",mb:1,children:[(0,l.Y)(eo,{help:"Ù
ÛØ§ÙÚ¯ÛÙ ÙÛÙ
ت Ø®Ø±ÛØ¯/ÙØ±ÙØ´ Ø§ÙØ¬Ø§Ù
Ø´Ø¯Ù Ø¨Ø±Ø§Û ÙØ±Ùد ب٠Ù
ÙÙØ¹Ûت.",children:"Ù
ÛØ§ÙÚ¯ÛÙ ÙÛÙ
ت ÙØ±Ùد"}),(0,l.Y)(r.A,{children:n.average_price?(0,l.FD)(l.FK,{children:[(0,l.Y)(c.A,{variant:"caption",display:"inline-block",color:"text.secondary",mr:.5,children:n.symbol.base_asset.symbol}),(0,l.Y)(c.A,{variant:"body2",display:"inline-block",children:(0,l.Y)($.A,{children:(0,y.f6)(n.average_price)})})]}):"-"})]}),(0,l.FD)(r.A,{display:"flex",justifyContent:"space-between",alignItems:"end",mb:1,children:[(0,l.Y)(eo,{help:"ÙÛÙ
ت آخرÛÙ Ù
عاÙ
ÙÙ Ø§ÙØ¬Ø§Ù
شد٠در بازار.",children:"ÙÛÙ
ت ÙØ¹ÙÛ"}),(0,l.Y)(r.A,{children:n.current_price?(0,l.FD)(l.FK,{children:[(0,l.Y)(c.A,{variant:"caption",display:"inline-block",color:"text.secondary",mr:.5,children:n.symbol.base_asset.symbol}),(0,l.Y)(c.A,{variant:"body2",display:"inline-block",children:(0,l.Y)($.A,{children:(0,y.f6)(n.current_price)})})]}):"-"})]}),(0,l.FD)(r.A,{display:"flex",justifyContent:"space-between",alignItems:"end",mb:1,children:[(0,l.Y)(eo,{help:"اگر در Ù
ÙÙØ¹Ûت Ø®Ø±ÛØ¯Ø ÙÛÙ
ت بازار Ø¨Ù Ø²ÛØ± اÛÙ ÙÛÙ
ت برسد ÛØ§ در Ù
ÙÙØ¹Ûت ÙØ±ÙØ´Ø ÙÛÙ
ت بازار Ø¨Ù Ø¨Ø§ÙØ§Û اÛÙ ÙÛÙ
ت Ø¨Ø±Ø³Ø¯Ø Ù
ÙÙØ¹Ûت ٠داراÛÛ Ø´Ù
ا ÙÛÚ©ÙØ¦Ûد Ø®ÙØ§Ùد شد.",children:"ÙÛÙ
ت ÙÛÚ©ÙÛÛØ¯ شدÙ"}),(0,l.Y)(r.A,{children:n.liquidation_price?(0,l.FD)(l.FK,{children:[(0,l.Y)(c.A,{variant:"caption",display:"inline-block",color:"text.secondary",mr:.5,children:n.symbol.base_asset.symbol}),(0,l.Y)(c.A,{variant:"body2",display:"inline-block",children:(0,l.Y)($.A,{children:(0,y.f6)(n.liquidation_price)})})]}):"-"})]}),(0,l.FD)(r.A,{display:"flex",justifyContent:"space-between",alignItems:"end",mb:1,children:[(0,l.Y)(eo,{help:"ÙØ±ÚÙ ÙØ³Ø¨Øª ØªØ¹ÙØ¯ Ú©Ù
تر Ø¨Ø§Ø´Ø¯Ø Ù
ÙÙØ¹Ûت Ø´Ù
ا Ø±ÛØ³Ú© Ø¨Ø§ÙØ§ØªØ±Û دارد. ÙÙØªÛ ÙØ³Ø¨Øª ØªØ¹ÙØ¯ ب٠1.1 برسد Ù
ÙÙØ¹Ûت Ø´Ù
ا ÙÛÚ©ÙØ¦Ûد Ù
ÛâØ´ÙØ¯.",children:"ÙØ³Ø¨Øª ØªØ¹ÙØ¯"}),(0,l.FD)(r.A,{children:[(0,l.Y)(et.A,{margin_ratio:n.margin_ratio,base_debt:n.base_debt,base_symbol:n.symbol.base_asset.symbol,base_total:n.base_total}),n.margin_ratio?(0,l.Y)(c.A,{variant:"body2",display:"inline-block",children:(0,l.Y)($.A,{children:n.margin_ratio?(0,y.f6)(n.margin_ratio):"-"})}):"-"]})]}),(0,l.FD)(r.A,{display:"flex",justifyContent:"space-between",alignItems:"end",mb:1,children:[(0,l.Y)(eo,{help:"Ù
ÙØ¯Ø§Ø± داراÛÛ Ú©Ù Ø¯Ø± اÛÙ Ù
ÙÙØ¹Ûت Ø¯Ø±Ú¯ÛØ± است.",children:"داراÛÛ Ø¯Ø±Ú¯ÛØ± Ù
ÙÙØ¹Ûت"}),(0,l.FD)(r.A,{children:[(0,l.Y)(h.A,{disabled:"closed"===n.status,sx:{ml:1},size:"small",onClick:()=>{i({type:Y.Cx,payload:n})},children:(0,l.Y)(v.A,{fontSize:"small"})}),n.balance?(0,l.FD)(l.FK,{children:[(0,l.Y)(c.A,{variant:"caption",display:"inline-block",color:"text.secondary",mr:.5,children:n.symbol.base_asset.symbol}),(0,l.Y)(c.A,{variant:"body2",display:"inline-block",children:(0,l.Y)($.A,{children:(0,y.f6)(n.balance)})})]}):"-"]})]}),(0,l.FD)(r.A,{display:"flex",justifyContent:"space-between",alignItems:"end",mb:1,children:[(0,l.Y)(eo,{help:"Ø³ÙØ¯ ÛØ§ Ø²ÛØ§Ù Ù
ÙÙØ¹Ûت + کارÙ
Ø²Ø¯ÙØ§",children:"Ø³ÙØ¯ / Ø²ÛØ§Ù"}),(0,l.Y)(r.A,{children:(0,l.Y)(f.ZI,{value:null==n?void 0:n.pnl,render:e=>(0,l.FD)(l.FK,{children:[(0,l.Y)(c.A,{variant:"caption",display:"inline-block",color:"text.secondary",mr:.5,children:n.symbol.base_asset.symbol}),(0,l.FD)(c.A,{variant:"body2",display:"inline-block",children:[X.x,Number(e)>0?"+":null,(0,l.Y)($.A,{children:(0,y.f6)(e)})]})]})})})]}),"closed"!==n.status&&(0,l.FD)(r.A,{display:"flex",justifyContent:"space-between",alignItems:"center",mb:1.5,children:[(0,l.Y)(eo,{help:"با ØªÙØ¸ÛÙ
ØØ¯ Ø³ÙØ¯ (TP) Ù
ÛâØªÙØ§ÙÛØ¯ Ø³ÙØ¯ Ø®ÙØ¯ را در ÙÛÙ
ت Ù
شخص برداشت Ú©ÙÛØ¯ ٠با ØªÙØ¸ÛÙ
ØØ¯ ضرر (SL) Ø±ÛØ³Ú© Ù
ÙÙØ¹Ûت را Ú©ÙØªØ±Ù Ú©ÙÛØ¯. ÙÙگاÙ
ÙØ¹Ø§Ù Ø´Ø¯Ù ØØ¯ Ø¶Ø±Ø±Ø Ú©Ù Ù
ÙÙØ¹Ûت بست٠شد٠٠تÙ
اÙ
ØØ¯ Ø³ÙØ¯ÙØ§Û ÙØ¹Ø§Ù ÙØºÙ Ù
ÛâØ´ÙÙØ¯.",children:"ØØ¯ Ø³ÙØ¯ / ØØ¯ ضرر"}),(0,l.Y)(ea,{target:(0,ei.K)(n)})]}),(0,l.Y)(r.A,{display:"flex",justifyContent:"space-between",alignItems:"end",gap:.5,children:"closed"===n.status?(0,l.FD)(l.FK,{children:[(0,l.Y)(r.A,{}),(0,l.Y)(u.A,{size:"small",variant:"outlined",color:"error",disabled:!0,children:"بست٠شد٠است"})]}):(0,l.FD)(l.FK,{children:[(0,l.Y)(g.A,{side:null==n?void 0:n.side,mutate:t,id:null==n?void 0:n.id,mobile:!0}),(0,l.Y)(en,{mutate:t,data:n})]})})]})}function eo(e){let{children:n,help:t}=e,[i,a]=(0,F.useState)(!1);return(0,l.Y)(m.x,{onClickAway:()=>{a(!1)},children:(0,l.Y)(b.A,{open:i,title:t,placement:"top",children:(0,l.FD)(r.A,{display:"flex",flexDirection:"row",alignItems:"center",children:[(0,l.Y)(c.A,{variant:"body2",color:"textSecondary",children:n}),(0,l.Y)(h.A,{sx:{ml:1},size:"small",onClick:()=>{a(!0)},children:(0,l.Y)(s.A,{fontSize:"small"})})]})})})}function ed(e){let{data:n,loading:t,mutate:i}=e;return t?(0,l.Y)(d.A,{variant:"rectangular",height:420}):S()(n)?(0,l.FD)(r.A,{p:4,color:"text.disabled",display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column",children:[(0,l.Y)(s.A,{s
1x:{mb:2,typography:"h4"}}),(0,l.Y)(c.A,{variant:"body1",gutterBottom:!0,textAlign:"center",children:"در اÛÙ ÙØØ¸Ù Ø´Ù
ا Ù
ÙÙØ¹Ûت باز ÙØ¯Ø§Ø±Ûد."}),(0,l.Y)(c.A,{variant:"body2",textAlign:"center",children:"Ù
ÙÙØ¹ÛتâÙØ§Û باز پس از ثبت در اÛÙ ÙØ³Ù
ت ÙÙ
Ø§ÛØ´ Ø¯Ø§Ø¯Ù Ø®ÙØ§Ùد شد."})]}):(0,l.Y)(o.A,{elevation:0,children:null==n?void 0:n.map(e=>(0,l.Y)(er,{data:e,mutate:i},e.created))})}var ec=t(23412),es=t(1648),eu=t(16393),em=t(13288),eh=t(53745),ep=t(48095),eb=t(7957),ey=t(91352),eA=t(41780);function ef(e){let{data:n,loading:t,mutate:i}=e;return t?(0,l.Y)(d.A,{variant:"rectangular",height:420}):(0,l.FD)(es.A,{children:[(0,l.FD)(ec.A,{children:[(0,l.Y)(eu.A,{children:(0,l.FD)(eh.A,{children:[(0,l.Y)(ep.A,{children:(0,l.Y)(c.A,{fontSize:14,children:"زÙ
ا٠بست٠شدÙ"})}),(0,l.Y)(ep.A,{children:"بازار"}),(0,l.Y)(ep.A,{children:(0,l.FD)(r.A,{display:"flex",flexDirection:"row",alignItems:"center",children:[(0,l.Y)(c.A,{fontSize:14,children:"ØØ¬Ù
"}),(0,l.FD)(eb.A,{fontSize:"small",children:[(0,l.Y)(eA.A,{children:"ØØ¬Ù
"}),(0,l.Y)(ey.A,{children:"ØØ¬Ù
ÛØ§ Ø§ÙØ¯Ø§Ø²Ù Ù
ÙÙØ¹Ûت برابر است با Ù
ÛØ²Ø§Ù ارز Ø¯ÛØ¬Ûتا٠Ù
عاÙ
Ù٠شد٠در ØÛ٠باز کرد٠Ù
ÙÙØ¹Ûت ضربدر ÙÛÙ
ت ÙØ¹ÙÛ Ø¨Ø§Ø²Ø§Ø±. ØØ¬Ù
Ù
ÙÙØ¹Ûت با آخرÛÙ ÙÛÙ
ت بازار تغÛÛØ± Ù
Û Ú©ÙØ¯."})]})]})}),(0,l.Y)(ep.A,{children:(0,l.FD)(r.A,{display:"flex",flexDirection:"row",alignItems:"center",children:[(0,l.Y)(c.A,{fontSize:14,children:"Ù
ÛØ§ÙÚ¯ÛÙ ÙÛÙ
ت ÙØ±Ùد"}),(0,l.FD)(eb.A,{fontSize:"small",children:[(0,l.Y)(eA.A,{children:"Ù
ÛØ§ÙÚ¯ÛÙ ÙÛÙ
ت ÙØ±Ùد"}),(0,l.Y)(ey.A,{children:"Ù
ÛØ§ÙÚ¯ÛÙ ÙÛÙ
ت Ø®Ø±ÛØ¯/ÙØ±ÙØ´ Ø§ÙØ¬Ø§Ù
Ø´Ø¯Ù Ø¨Ø±Ø§Û ÙØ±Ùد ب٠Ù
ÙÙØ¹Ûت."})]})]})}),(0,l.Y)(ep.A,{children:(0,l.FD)(r.A,{display:"flex",flexDirection:"row",alignItems:"center",children:[(0,l.Y)(c.A,{fontSize:14,children:"ÙÛÙ
ت ÙØ¹ÙÛ"}),(0,l.FD)(eb.A,{fontSize:"small",children:[(0,l.Y)(eA.A,{children:"ÙÛÙ
ت ÙØ¹ÙÛ"}),(0,l.Y)(ey.A,{children:"ÙÛÙ
ت آخرÛÙ Ù
عاÙ
ÙÙ Ø§ÙØ¬Ø§Ù
شد٠در بازار."})]})]})}),(0,l.Y)(ep.A,{children:(0,l.FD)(r.A,{display:"flex",flexDirection:"row",alignItems:"center",children:[(0,l.Y)(c.A,{fontSize:14,children:"ÙÛÙ
ت ÙÛÚ©ÙÛÛØ¯ شدÙ"}),(0,l.FD)(eb.A,{fontSize:"small",children:[(0,l.Y)(eA.A,{children:"ÙÛÙ
ت ÙÛÚ©ÙÛÛØ¯ شدÙ"}),(0,l.Y)(ey.A,{children:"اگر در Ù
ÙÙØ¹Ûت Ø®Ø±ÛØ¯Ø ÙÛÙ
ت بازار Ø¨Ù Ø²ÛØ± اÛÙ ÙÛÙ
ت برسد ÛØ§ در Ù
ÙÙØ¹Ûت ÙØ±ÙØ´Ø ÙÛÙ
ت بازار Ø¨Ù Ø¨Ø§ÙØ§Û اÛÙ ÙÛÙ
ت Ø¨Ø±Ø³Ø¯Ø Ù
ÙÙØ¹Ûت ٠داراÛÛ Ø´Ù
ا ÙÛÚ©ÙØ¦Ûد Ø®ÙØ§Ùد شد."})]})]})}),(0,l.Y)(ep.A,{children:(0,l.FD)(r.A,{display:"flex",flexDirection:"row",alignItems:"center",children:[(0,l.Y)(c.A,{fontSize:14,children:"ÙØ³Ø¨Øª ØªØ¹ÙØ¯"}),(0,l.FD)(eb.A,{fontSize:"small",children:[(0,l.Y)(eA.A,{children:"ÙØ³Ø¨Øª ØªØ¹ÙØ¯"}),(0,l.Y)(ey.A,{children:"ÙØ±ÚÙ ÙØ³Ø¨Øª ØªØ¹ÙØ¯ Ú©Ù
تر Ø¨Ø§Ø´Ø¯Ø Ù
ÙÙØ¹Ûت Ø´Ù
ا Ø±ÛØ³Ú© Ø¨Ø§ÙØ§ØªØ±Û دارد. ÙÙØªÛ ÙØ³Ø¨Øª ØªØ¹ÙØ¯ ب٠1.1 برسد Ù
ÙÙØ¹Ûت Ø´Ù
ا ÙÛÚ©ÙØ¦Ûد Ù
ÛâØ´ÙØ¯."})]})]})}),(0,l.Y)(ep.A,{children:(0,l.FD)(r.A,{display:"flex",flexDirection:"row",alignItems:"center",children:[(0,l.Y)(c.A,{fontSize:14,children:"داراÛÛ Ø¯Ø±Ú¯ÛØ± Ù
ÙÙØ¹Ûت"}),(0,l.FD)(eb.A,{fontSize:"small",children:[(0,l.Y)(eA.A,{children:"داراÛÛ Ø¯Ø±Ú¯ÛØ± Ù
ÙÙØ¹Ûت"}),(0,l.Y)(ey.A,{children:"Ù
ÙØ¯Ø§Ø± داراÛÛ Ú©Ù Ø¯Ø± اÛÙ Ù
ÙÙØ¹Ûت Ø¯Ø±Ú¯ÛØ± است."})]})]})}),(0,l.Y)(ep.A,{children:(0,l.FD)(r.A,{display:"flex",flexDirection:"row",alignItems:"center",children:[(0,l.Y)(c.A,{fontSize:14,children:"Ø³ÙØ¯ / Ø²ÛØ§Ù"}),(0,l.FD)(eb.A,{fontSize:"small",children:[(0,l.Y)(eA.A,{children:"Ø³ÙØ¯ / Ø²ÛØ§Ù"}),(0,l.Y)(ey.A,{children:"Ø³ÙØ¯ ÛØ§ Ø²ÛØ§Ù Ù
ÙÙØ¹Ûت + کارÙ
Ø²Ø¯ÙØ§"})]})]})}),(0,l.Y)(ep.A,{children:(0,l.FD)(r.A,{display:"flex",flexDirection:"row",alignItems:"center",children:[(0,l.Y)(c.A,{fontSize:14,children:"ØØ¯ Ø³ÙØ¯ / ØØ¯ ضرر"}),(0,l.FD)(eb.A,{fontSize:"small",children:[(0,l.Y)(eA.A,{children:"ØØ¯ Ø³ÙØ¯ / ØØ¯ ضرر ( Take Profit / Stop Loss )"}),(0,l.FD)(ey.A,{children:[(0,l.Y)(r.A,{component:"span",display:"block",mb:1,children:"با ØªÙØ¸ÛÙ
ØØ¯ Ø³ÙØ¯ (TP) Ù ØØ¯ ضرر (SL) Ù
ÛâØªÙØ§ÙÛØ¯ استراتÚÛ Ø®Ø±ÙØ¬ از Ù
ÙÙØ¹Ûت Ø®ÙØ¯ را از ÙØ¨Ù Ù
شخص Ú©ÙÛØ¯."}),(0,l.Y)(r.A,{component:"span",display:"block",mb:1,children:"ÙØ± ÛÚ© از ØØ¯ Ø³ÙØ¯ ÛØ§ ØØ¯ ضرر ÙØ§Û تعرÛ٠شد٠با Ø±Ø³ÛØ¯Ù ÙÛÙ
ت بازار ب٠ÙÛÙ
ت ÙØ¹Ø§ÙâØ³Ø§Ø²Û Ø¨Ù ØµÙØ±Øª Ø®ÙØ¯Ú©Ø§Ø± ÙØ¹Ø§Ù شد٠٠تÙ
اÙ
ÛØ§ Ø¨Ø®Ø´Û Ø§Ø² Ù
ÙÙØ¹Ûت را با Ø¨ÙØªØ±ÛÙ Ù
1ÛÙ
ت بازار Ù
ÛâØ¨ÙØ¯Ø¯. Ø´Ù
ا Ù
ÛâØªÙØ§ÙÛØ¯ ÙÛÙ
ت ÙØ¹Ø§ÙâØ³Ø§Ø²Û Ø±Ø§ Ø¨ØµÙØ±Øª Ù
شخص تعÛÛÙ Ú©Ø±Ø¯Ù ÛØ§ Ø¨ØµÙØ±Øª Ø¯Ø±ØµØ¯Û Ø§Ø² ÙÛÙ
ت Ø³ÙØ§Ø±Ø´ تعÛÛÙ ÙÙ
اÛÛØ¯."}),(0,l.Y)(r.A,{component:"span",display:"block",mb:1,children:"ØØ¯ ضرر Ø¨Ø±Ø§Û Ú©ÙØªØ±Ù Ø±ÛØ³Ú© Ø§Ø³ØªÙØ§Ø¯Ù Ù
ÛâØ´ÙØ¯. ÙÙگاÙ
ÙØ¹Ø§Ù Ø´Ø¯Ù ØØ¯ Ø¶Ø±Ø±Ø Ú©Ù Ù
ÙÙØ¹Ûت بست٠شد٠٠تÙ
اÙ
ØØ¯ Ø³ÙØ¯ÙØ§Û ÙØ¹Ø§Ù ÙØºÙ Ù
ÛâØ´ÙÙØ¯."}),(0,l.Y)(r.A,{component:"span",display:"block",children:"ØØ¯ Ø³ÙØ¯ Ø¨Ø±Ø§Û Ø§Ø³ØªØ±Ø§ØªÚÛ Ø¨Ø±Ø¯Ø§Ø´Øª Ø³ÙØ¯ است. Ù
ÛâØªÙØ§ÙÛØ¯ ÚÙØ¯ÛÙ ØØ¯ Ø³ÙØ¯ با Ù
ÙØ§Ø¯Ûر Ù
ختÙÙ ØªÙØ¸ÛÙ
Ú©ÙÛØ¯ تا Ø³ÙØ¯ Ø®ÙØ¯ را Ø¨Ù ØµÙØ±Øª Ù¾ÙکاÙÛ Ø¨Ø±Ø¯Ø§Ø´Øª Ú©ÙÛØ¯."})]}),(0,l.Y)(eA.A,{children:"Ù¾ÛØ´ÙÙØ§Ø¯Ùا"}),(0,l.FD)(ey.A,{children:[(0,l.Y)(r.A,{component:"span",display:"block",mb:.5,children:"â¢ ÙØ¨Ù از ÙØ±Ùد ب٠Ù
ÙÙØ¹ÛØªØ ÙÙ
ÛØ´Ù ØØ¯ ضرر Ø®ÙØ¯ را ØªÙØ¸ÛÙ
Ú©ÙÛØ¯."}),(0,l.Y)(r.A,{component:"span",display:"block",mb:.5,children:"⢠از ÚÙØ¯ ØØ¯ Ø³ÙØ¯ Ù¾ÙکاÙÛ Ø§Ø³ØªÙØ§Ø¯Ù Ú©ÙÛØ¯ تا Ø¨Ø®Ø´Û Ø§Ø² Ø³ÙØ¯ در Ù
Ø³ÛØ± ØØ±Ú©Øª ÙÛÙ
ت Ø°Ø®ÛØ±Ù Ø´ÙØ¯."}),(0,l.Y)(r.A,{component:"span",display:"block",mb:.5,children:"â¢ ÙØ§ØµÙÙ ØØ¯ Ø³ÙØ¯ Ù ØØ¯ ضرر را Ù
ØªÙØ§Ø³Ø¨ با ÙÙØ³Ø§Ùات داراÛÛ Ø§ÙØªØ®Ø§Ø¨ Ú©ÙÛØ¯Ø ÙØ§ØµÙÙ Ø¨Ø³ÛØ§Ø± ÙØ²Ø¯ÛÚ© Ù
Ù
ک٠است با ÙÙØ³Ø§Ùات Ø·Ø¨ÛØ¹Û بازار ÙØ¹Ø§Ù Ø´ÙØ¯."})]})]})]})}),(0,l.Y)(ep.A,{})]})}),(0,l.Y)(em.A,{children:null==n?void 0:n.map(e=>(0,l.Y)(x.A,{data:e,mutate:i},23))})]}),S()(n)&&(0,l.FD)(r.A,{p:4,color:"text.disabled",display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column",children:[(0,l.Y)(s.A,{sx:{mb:2,typography:"h4"}}),(0,l.Y)(c.A,{variant:"body1",gutterBottom:!0,textAlign:"center",children:"در اÛÙ ÙØØ¸Ù Ø´Ù
ا Ù
ÙÙØ¹Ûت باز ÙØ¯Ø§Ø±Ûد."}),(0,l.Y)(c.A,{variant:"body2",textAlign:"center",children:"Ù
ÙÙØ¹ÛتâÙØ§Û باز پس از ثبت در اÛÙ ÙØ³Ù
ت ÙÙ
Ø§ÛØ´ Ø¯Ø§Ø¯Ù Ø®ÙØ§Ùد شد."})]})]})}var ev=t(59312),eY=t(64836),ex=t(91408),eg=t(92784),eD=t(48627),eF=t(84179),ew=t(59371);function ek(e){let{mutate:n}=e,{state:{asset:t},dispatch:i}=(0,Y.rY)(),a=null==t?void 0:t.symbol.base_asset.precision,{data:o,mutate:s,loading:u}=(0,eF.A)("mp",null==t?void 0:t.symbol.name,null==t?void 0:t.id),m=(0,ex.Ik)().shape({amount:(0,ex.Yj)().required("Ø§ÙØªØ®Ø§Ø¨ اÛÙ ÙÛÙØ¯ Ø§ÙØ²Ø§Ù
Û Ø§Ø³Øª")}),[h,p]=(0,F.useState)(!1);async function b(e){try{p(!0),await (0,ew.F4)({id:null==t?void 0:t.id,coin:null==t?void 0:t.symbol.base_asset.symbol,amount:(0,y.OM)((0,y.Re)(e.amount)),type:"mp",symbol:null==t?void 0:t.symbol.name}),z.toast.success("ثبت شد"),s(),n(),v(),i({type:Y.Uf})}catch(e){(0,E.handleError)(e)}finally{p(!1)}}let{values:A,setFieldValue:f,resetForm:v,touched:x,errors:g,handleSubmit:D}=(0,eD.Wx)({initialValues:{amount:""},validationSchema:m,onSubmit:b}),w=(0,F.useMemo)(()=>{let e=new P.A((0,y.OM)((0,y.Re)(A.amount||"0"))),n=new P.A((0,y.OM)((0,y.Re)((null==o?void 0:o.balance)||"0"))).toFixed(a,P.A.ROUND_DOWN),t=new P.A(n).greaterThan(0)?e.times(100).dividedBy(n).toFixed(0):0;return I()(t)},[A.amount,a,o]);return(0,l.FD)("form",{onSubmit:D,noValidate:!0,children:[(0,l.FD)(r.A,{display:"flex",justifyContent:"space-between",children:[(0,l.Y)(c.A,{variant:"body2",display:"inline",children:"ØØ¯Ø§Ú©Ø«Ø± :"}),u?(0,l.Y)(d.A,{variant:"rectangular",width:100,height:24}):(0,l.FD)(r.A,{children:[(0,l.Y)(c.A,{variant:"body2",display:"inline",children:(0,l.Y)($.A,{children:(0,y.f6)(null==o?void 0:o.balance)})}),(0,l.Y)(c.A,{variant:"caption",color:"textSecondary",sx:{ml:1},children:null==t?void 0:t.symbol.base_asset.name_fa})]})]}),(0,l.Y)(G.A,{disabled:h,id:"amount",value:A.amount,onChange:e=>{let n=e.target.value;if(S()(n)||void 0===n)return void f("amount","");let t=(0,y.OM)((0,y.Re)(n));(0,y.Et)(t)&&f("amount",(0,y.f6)(t))},placeholder:null==t?void 0:t.symbol.base_asset.symbol,adornment:"Ù
ÙØ¯Ø§Ø±",error:x.amount&&!!g.amount,helperText:x.amount&&g.amount||" "}),(0,l.Y)(eg.A,{name:"slider",value:w,onChange:(e,n)=>{let t=new P.A((null==o?void 0:o.balance)||"0").toFixed(a,P.A.ROUND_DOWN),l=new P.A(n).times(t).dividedBy(100),i="";i=l.decimalPlaces()>a?l.toFixed(a,P.A.ROUND_DOWN):l.valueOf(),f("amount",(0,y.f6)(i))},disabled:u,type:"buy"}),(0,l.Y)(L.A,{variant:"contained",disableElevation:!0,fullWidth:!0,type:"submit",loading:h,children:"تاÛÛØ¯"})]})}function e_(e){let{mutate:n}=e,{state:{asset:t},dispatch:i}=(0,Y.rY)(),a=null==t?void 0:t.symbol.base_asset.precision,{data:o,mutate:s,loading:u}=(0,eF.A)("pm",null==t?void 0:t.symbol.name,null==t?void 0:t.id),m=(0,ex.Ik)().shape({amount:(0,ex.Yj)().required("Ø§ÙØªØ®Ø§Ø¨ اÛÙ ÙÛÙØ¯ Ø§ÙØ²Ø§Ù
Û Ø§Ø³Øª")}),[h,p]=(0,F.useState)(!1);async function b(e){try{p(!0),await (0,ew.F4)({id:t.id,coin:null==t?void 0:t.symbol.base_asset.symbol,amount:(0,y.OM)((0,y.Re)(e.amount)),type:"pm",symbol
1:null==t?void 0:t.symbol.name}),z.toast.success("ثبت شد"),s(),n(),v(),i({type:Y.Uf})}catch(e){(0,E.handleError)(e)}finally{p(!1)}}let{values:A,setFieldValue:f,resetForm:v,touched:x,errors:g,handleSubmit:D}=(0,eD.Wx)({initialValues:{amount:""},validationSchema:m,onSubmit:b}),w=(0,F.useMemo)(()=>{let e=new P.A((0,y.OM)((0,y.Re)(A.amount||"0"))),n=new P.A((0,y.OM)((0,y.Re)((null==o?void 0:o.balance)||"0"))).toFixed(a,P.A.ROUND_DOWN),t=new P.A(n).greaterThan(0)?e.times(100).dividedBy(n).toFixed(0):0;return I()(t)},[A.amount,a,o]);return(0,l.FD)("form",{onSubmit:D,noValidate:!0,children:[(0,l.FD)(r.A,{display:"flex",justifyContent:"space-between",children:[(0,l.Y)(c.A,{variant:"body2",display:"inline",children:"ØØ¯Ø§Ú©Ø«Ø± :"}),u?(0,l.Y)(d.A,{variant:"rectangular",width:100,height:24}):(0,l.FD)(r.A,{children:[(0,l.Y)(c.A,{variant:"body2",display:"inline",children:(0,l.Y)($.A,{children:(0,y.f6)(null==o?void 0:o.balance)})}),(0,l.Y)(c.A,{variant:"caption",color:"textSecondary",sx:{ml:1},children:null==t?void 0:t.symbol.base_asset.name_fa})]})]}),(0,l.Y)(G.A,{disabled:h,id:"amount",value:A.amount,onChange:e=>{let n=e.target.value;if(S()(n)||void 0===n)return void f("amount","");let t=(0,y.OM)((0,y.Re)(n));(0,y.Et)(t)&&f("amount",(0,y.f6)(t))},placeholder:null==t?void 0:t.symbol.base_asset.symbol,adornment:"Ù
ÙØ¯Ø§Ø±",error:x.amount&&!!g.amount,helperText:x.amount&&g.amount||" "}),(0,l.Y)(eg.A,{name:"slider",value:w,onChange:(e,n)=>{let t=new P.A((null==o?void 0:o.balance)||"0").toFixed(a,P.A.ROUND_DOWN),l=new P.A(n).times(t).dividedBy(100),i="";i=l.decimalPlaces()>a?l.toFixed(a,P.A.ROUND_DOWN):l.valueOf(),f("amount",(0,y.f6)(i))},disabled:u,type:"sell"}),(0,l.Y)(L.A,{variant:"contained",disableElevation:!0,fullWidth:!0,type:"submit",loading:h,children:"تاÛÛØ¯"})]})}function eO(e){let{mutate:n}=e,[t,i]=(0,F.useState)("increase");return(0,l.FD)(l.FK,{children:[(0,l.Y)(r.A,{sx:{display:"flex",alignItems:"center"},children:(0,l.Y)(r.A,{flexGrow:1,children:(0,l.FD)(k.A,{value:t,onChange:(e,n)=>{i(n)},textColor:"inherit",children:[(0,l.Y)(_.A,{label:"Ø§ÙØ²Ø§ÛØ´",value:"increase"}),(0,l.Y)(_.A,{label:"Ú©Ø§ÙØ´",value:"decrease"})]})})}),(0,l.Y)(O.A,{sx:{opacity:"0.6",mb:2}}),"increase"===t?(0,l.Y)(ek,{mutate:n}):(0,l.Y)(e_,{mutate:n})]})}var eC=t(15952);function eW(e){let{mutate:n}=e,{state:{open:t},dispatch:i}=(0,Y.rY)();return(0,l.Y)(eC.default,{open:t,onClose:()=>{i({type:Y.Uf})},disableEscapeKeyDown:!0,disableRestoreFocus:!0,maxWidth:"xs",title:"تغÛÛØ± Ù
ÙØ¯Ø§Ø± داراÛÛ Ø¯Ø±Ú¯ÛØ± در Ù
ÙÙØ¹Ûت",children:(0,l.Y)(eO,{mutate:n})})}var eS=t(29221),eR=t(92645);let eI=a()(()=>Promise.all([t.e(51537),t.e(94028)]).then(t.bind(t,94028)),{loadableGenerated:{webpack:()=>[94028]}}),eN=a()(()=>Promise.all([t.e(51537),t.e(22091)]).then(t.bind(t,22091)),{loadableGenerated:{webpack:()=>[22091]}}),eM=a()(()=>t.e(64633).then(t.bind(t,64633)),{loadableGenerated:{webpack:()=>[64633]}});function eL(){let{data:e,loading:n}=(0,eY.k)(),{mutateAllUserPositions:t}=(0,eS.A)(),i=(0,ev.$W)();return(0,l.Y)(Y.Ay,{children:(0,l.FD)(eR.Ay,{children:[i?(0,l.Y)(ed,{data:e,loading:n,mutate:t}):(0,l.Y)(ef,{data:e,loading:n,mutate:t}),(0,l.Y)(eW,{mutate:t}),(0,l.Y)(eI,{}),(0,l.Y)(eN,{}),(0,l.Y)(eM,{})]})})}},29221:(e,n,t)=>{t.d(n,{A:()=>r});var l=t(64836),i=t(1058),a=t(538);function r(){let{mutate:e}=(0,l.k)(),{mutate:n}=(0,a.A)({limit:10,offset:0}),{mutateAllUserOrders:t}=(0,i.A)(void 0,0),r=()=>{e(),n(),t()};return{mutateAllUserPositions:()=>{setTimeout(()=>{r(),setTimeout(()=>{r()},2e3)},500)}}}},41780:(e,n,t)=>{t.d(n,{A:()=>a});var l=t(18153),i=t(5067);function a(e){return(0,l.Y)(i.A,{variant:"subtitle1",fontWeight:500,gutterBottom:!0,children:e.children})}},52960:(e,n,t)=>{t.d(n,{A:()=>p});var l=t(18153),i=t(14232),a=t(75855),r=t(74441),o=t(62168),d=t(86531),c=t(81427),s=t(94504),u=t(44057);let m=(0,a.Ay)(d.A)(e=>{let{theme:n}=e;return"\n color: theme.palette.secondary.main;\n font-family: ".concat(u.J.style.fontFamily,";\n height: 4px;\n width: 100%;\n padding: 13px 0;\n display: inline-block;\n position: relative;\n cursor: pointer;\n touch-action: none;\n -webkit-tap-highlight-color: transparent;\n opacity: 1;\n\n &:hover {\n opacity: 1;\n }\n\n &.").concat(c.i.disabled," { \n pointer-events: none;\n cursor: default;\n color: #bdbdbd; \n }\n\n & .").concat(c.i.rail," {\n display: block;\n position: absolute;\n width: 100%;\n height: 4px;\n border-radius: 2px;\n background-color: currentColor;\n opacity: 0.38;\n }\n\n & .").concat(c.i.track," {\n display: block;\n position: absolute;\n height: 4px;\n border-radius: 2px;\n background-color: currentColor;\n }\n\n & .").concat(c.i.thumb," {\n position: absolute;\n width: 12px;\n height: 12px;\n margin-right: -6px;\n margin-top: -5px;\n box-sizing: border-box;\n border-radius: 50%;\n outline: 0;\n background-color: currentColor;\n\n :hover,\n &.").concat(c.i.focusVisible," {\n box-shadow: 0 0 0 0.25rem ").concat((0,r.X4)("light"===n.palette.mode?"#1976d2":"#90caf9",.15),";\n }\n\n &.").concat(c.i.active," {\n box-shadow: 0 0 0 0.25rem ").concat((0,r.X4)("light"===n.palette.mode?"#1976d2":"#90caf9",.3),";\n }\n }\n\n & .").concat(c.i.mark," {\n position: absolute;\n width: 4px;\n height: 4px;\n border-radius: 2px;\n background-color: currentColor;\n top: 50%;\n opacity: 0.7;\n transform: translateX(-50%);\n }\n\n & .").concat(c.i.markActive," {\n background-color: #fff;\n }\n\n & .").concat(c.i.markLabel," {\n font-family: inherit;\n font-size: 14px;\n display: block;\n position: relative;\n top: -1.6em;\n text-align: center;\n transform: translateX(-50%);\n }\n\n [&.").concat(c.i.markLabelActive,"]: {\n transform: 'translateY(-100%) scale(1)'\n },\n ")});function h(e){let{children:n,value:t}=e;return(0,l.Y)(o.A,{enterTouchDelay:0,leaveDelay:400,placement:"top",title:t,children:n})}let p=(0,i.memo)(e=>
1(0,l.Y)(m,{components:{ValueLabel:h},valueLabelDisplay:"auto",step:1,marks:[{value:25},{value:50},{value:75}],min:0,max:100,isRtl:!1,valueLabelFormat:e=>"".concat((0,s.f6)(e),"â%"),...e}))},71693:(e,n,t)=>{t.d(n,{A:()=>c});var l=t(18153),i=t(82772),a=t(84733),r=t(46513),o=t(5067),d=t(94504);function c(e){let{onBalanceClicked:n,data:t,prefix:c="Ù
ÙØ¬ÙدÛ",isFetching:s}=e;return(0,l.FD)(a.A,{display:"flex",alignItems:"end",justifyContent:"space-between",height:32,children:[(0,l.Y)(o.A,{variant:"caption",fontSize:14,color:"textSecondary",children:c}),s?(0,l.Y)(r.A,{variant:"rectangular",width:100,height:24}):(0,l.Y)(o.A,{onClick:n,variant:"caption",fontSize:14,fontWeight:500,sx:{direction:"rtl",cursor:n?"pointer":"unset"},children:(0,l.Y)(i.A,{children:"".concat((0,d.f6)(null==t?void 0:t.balance)," ").concat((null==t?void 0:t.hasOwnProperty("symbol"))?null==t?void 0:t.symbol:null==t?void 0:t.asset)})})]})}},84179:(e,n,t)=>{t.d(n,{A:()=>a});var l=t(75656),i=t(59371);function a(e,n,t){let{data:a,mutate:r,error:o,isLoading:d}=(0,l.Ay)(e&&n?["useMarginTransferBalance",e,n,t]:null,i.Q2);return{data:a,mutate:r,error:o,loading:d}}},89885:(e,n,t)=>{t.d(n,{A:()=>c});
1var l=t(18153),i=t(84733),a=t(37394),r=t(30656),o=t(81256);async function d(){return(await (0,a.ajax)({method:"GET",url:"/v1/accounts/fee/"})).data}function c(){let{data:e,isLoading:n}=(0,o.A)("user/fee",d);return n||(null==e?void 0:e.maker_fee)!=="0"||(null==e?void 0:e.taker_fee)!=="0"?null:(0,l.FD)(i.A,{bgcolor:e=>"rgba(".concat(e.vars.palette.info.mainChannel," / 0.05)"),color:e=>e.vars.palette.info.main,px:1,py:.2,typography:"caption",borderRadius:1,fontWeight:"300",width:1,mt:2,children:[(0,l.Y)(r.A,{fontSize:"inherit",sx:{mr:1,mb:-.4}}),"کارÙ
زد Ø®Ø±ÛØ¯ Ù ÙØ±ÙØ´ Ø´Ù
ا برابر"," ",(0,l.Y)(i.A,{component:"span",fontWeight:"400",children:"ØµÙØ±"})," ","است."]})}},91352:(e,n,t)=>{t.d(n,{A:()=>a});var l=t(18153),i=t(5067);function a(e){return(0,l.Y)(i.A,{color:"textSecondary",mb:2,children:e.children})}},92645:(e,n,t)=>{t.d(n,{Ay:()=>b,Iv:()=>c,XR:()=>r,cZ:()=>d,eN:()=>s,ef:()=>p,nC:()=>a,q7:()=>o});var l=t(18153),i=t(14232);let a="OPEN_TP_DIALOG",r="CLOSE_TP_DIALOG",o="OPEN_SL_DIALOG",d="CLOSE_SL_DIALOG",c="OPEN_PNL_EXPLAIN",s="CLOSE_PNL_EXPLAIN",u={tpOpen:!1,slOpen:!1,target:null,pnlExplainKind:null},m=(0,i.createContext)({state:u,dispatch:()=>null}),h=(e,n)=>{switch(n.type){case"OPEN_TPSL_DIALOG":case a:return{...e,tpOpen:!0,target:n.payload};case r:return{...e,tpOpen:!1};case o:return{...e,slOpen:!0,target:n.payload};case d:return{...e,slOpen:!1};case"CLOSE_TPSL_DIALOG":return{...e,tpOpen:!1,slOpen:!1};case c:return{...e,pnlExplainKind:n.payload};case s:return{...e,pnlExplainKind:null};default:return e}},p=()=>(0,i.useContext)(m),b=e=>{let{children:n}=e,[t,a]=(0,i.useReducer)(h,u);return(0,l.Y)(m.Provider,{value:{state:t,dispatch:a},children:n})}},92784:(e,n,t)=>{t.d(n,{A:()=>p});var l=t(18153),i=t(14232),a=t(75855),r=t(74441),o=t(62168),d=t(86531),c=t(81427),s=t(94504),u=t(82772);let m=(0,a.Ay)(d.A,{shouldForwardProp:e=>"type"!==e})(e=>{let{theme:n,type:t}=e;return"\n color: ".concat("sell"===t?n.vars.palette.sell:n.vars.palette.buy,";\n height: 4px;\n width: 100%;\n padding: 13px 0;\n display: inline-block;\n position: relative;\n cursor: pointer;\n touch-action: none;\n -webkit-tap-highlight-color: transparent;\n opacity: 1;\n\n &:hover {\n opacity: 1;\n }\n\n &.").concat(c.i.disabled," { \n pointer-events: none;\n cursor: default;\n color: #bdbdbd; \n }\n\n & .").concat(c.i.rail," {\n display: block;\n position: absolute;\n width: 100%;\n height: 4px;\n border-radius: 2px;\n background-color: currentColor;\n opacity: 0.38;\n }\n\n & .").concat(c.i.track," {\n display: block;\n position: absolute;\n height: 4px;\n border-radius: 2px;\n background-color: currentColor;\n }\n\n & .").concat(c.i.thumb," {\n position: absolute;\n width: 16px;\n height: 16px;\n margin-right: -6px;\n margin-top: -7px;\n box-sizing: border-box;\n border-radius: 50%;\n outline: 0;\n background-color: currentColor;\n\n :hover,\n &.").concat(c.i.focusVisible," {\n box-shadow: 0 0 0 0.25rem ").concat((0,r.X4)("light"===n.palette.mode?"#1976d2":"#90caf9",.15),";\n }\n\n &.").concat(c.i.active," {\n box-shadow: 0 0 0 0.25rem ").concat((0,r.X4)("light"===n.palette.mode?"#1976d2":"#90caf9",.3),";\n }\n }\n\n & .").concat(c.i.mark," {\n position: absolute;\n width: 4px;\n height: 4px;\n border-radius: 2px;\n background-color: currentColor;\n top: 50%;\n opacity: 0.7;\n transform: translateX(-50%);\n }\n\n & .").concat(c.i.markActive," {\n background-color: #fff;\n }\n\n & .").concat(c.i.markLabel," {\n font-family: inherit;\n font-size: 14px;\n display: block;\n position: relative;\n top: -1.6em;\n text-align: center;\n transform: translateX(-50%);\n }\n\n [&.").concat(c.i.markLabelActive,"]: {\n visibility: visible;\n transform: 'translateY(-100%) scale(1)'\n },\n ")});function h(e){let{children:n,value:t}=e;return(0,l.Y)(o.A,{enterTouchDelay:0,leaveDelay:400,placement:"top",title:t,children:n})}let p=(0,i.memo)(e=>(0,l.Y)(m,{components:{ValueLabel:h},valueLabelDisplay:"auto",step:1,marks:[{value:25},{value:50},{value:75}],min:0,max:100,isRtl:!1,valueLabelFormat:e=>(0,l.FD)(u.A,{children:["$",(0,s.f6)(e),"%"]}),...e}))}}]);
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.