PageSourceSearch

https://indx.money/v2/assets/assets-BepTZe96.js

js indx.money collected 2026-10-09 03:45:43 UTC 36,315 bytes, 3 lines download raw bytes

1import{X as ye,j as s,u as t,Y as ys,Z as As,O as Se,T as Ce,$ as We,a0 as Le,a1 as Ee,y as us,a2 as Fs,J as Ue,g as Ie,a3 as Te,a4 as C,a5 as Ze,a6 as hs,a7 as Hs,a8 as De,N as Be,a9 as $e,aa as Ss,I as ms,ab as W,h as cs,r as Xs,ac as xs,ad as qs,ae as Pe,af as Re,p as ze}from"./index-CVkPVKMu.js";import{r as l}from"./vendor-react-DJ1oPbzn.js";import{D as Ve}from"./date-input-BqqRv01A.js";import"./vendor-libs-CmRAaO7z.js";import"./vendor-chart-C3BTrSSY.js";const Ae=30;function Ws(i){return i.toISOString().slice(0,10)}function Fe(i=12){const o=new Date,h=[];for(let x=1;x<=i;x++){const N=new Date(Date.UTC(o.getUTCFullYear(),o.getUTCMonth()-x+1,0));h.push({year:N.getUTCFullYear(),month:N.getUTCMonth(),dateISO:Ws(N)})}return h}function He(i){const o=new Date(i);if(isNaN(o.getTime()))return i;const h=Ce(o.getTime()),x=N=>String(N).padStart(2,"0");return`${x(h.d)}.${x(h.mo)}.${h.y}, ${x(h.h)}:${x(h.mi)}`}function Xe({wmid:i,nick:o,holder:h,email:x,requestSnapshot:N,requestList:G}){const F=ye(),[y,L]=l.useState(()=>{try{return localStorage.getItem("indx.stmt.tab")==="custom"?"custom":"month"}catch{return"month"}}),[H,is]=l.useState(null),[v,Y]=l.useState(()=>Ws(new Date)),[E,K]=l.useState(null),[O,U]=l.useState(""),I=l.useRef(!0);l.useEffect(()=>()=>{I.current=!1},[]);const T=(a,d)=>`${a}:${d}`,Q=l.useCallback(async()=>{try{const a=await G();I.current&&is(a)}catch{I.current&&is([])}},[G]);l.useEffect(()=>{Q()},[Q]);const J=a=>{L(a);try{localStorage.setItem("indx.stmt.tab",a)}catch{}},X=Fe(),os=Ws(new Date),ps=(a,d)=>(H??[]).find(r=>r.kind===a&&r.date===d),Z=(H??[]).filter(a=>a.kind===1),bs=async(a,d,r)=>{const $=os,g={no:We($),issuedISO:$,holder:r.holder||h||o||"",holderAddress:r.holderAddress||void 0,wmid:i,email:r.email||x||"",kind:a===0?"month":"custom",periodLabel:a===0?As(F,Number(d.slice(0,4)),Number(d.slice(5,7))-1):ys(d),snapshots:[r],sourceNote:t("Леджеры операций по счёту в системе INDX (сделки, пополнения, выводы, комиссии) на момент фиксации."),notes:[r.moment.startsWith("00:00:00")?t("Снимок остатков сделан на {0} указанной даты; учтены все операции, завершённые до этого момента.",r.moment):t("Снимок остатков сделан на момент формирования справки ({0}); учтены все операции, завершённые до этого момента.",r.moment),t("Оценка в USD и EUR приведена справочно по указанным в таблице источникам и не является официальной котировкой торговой системы INDX."),t("Выписка подтверждает данные счёта на указанный момент, не является оценкой кредитоспособности и предназначена для личного использования владельца счёта.")],lang:F},rs=await Le(g),ss=Ee(g);try{const P=await us.statementSign(rs,ss,g.periodLabel);Fs(P.file,ss)}catch(P){Fs(rs,ss),U(t("Выписка сформирована, но заверить её не удалось: {0}",P instanceof Error?P.message:String(P)))}},D=async(a,d)=>{K(T(a,d)),U("");try{const r=await N(d,a);if(!I.current)return;await bs(a,d,r),await Q()}catch(r){I.current&&U(r instanceof Error?r.message:String(r))}finally{I.current&&K(null)}},q=(a,d)=>{const r=ps(a,d),$=E===T(a,d);return s.jsxs("span",{className:"stmt-acts",children:[r&&!$&&s.jsx("button",{className:"stmt-btn ico",disabled:E!=null,"aria-label":t("Сформировать заново — данные будут пересчитаны"),"data-hint":t("Сформировать заново — данные будут пересчитаны"),onClick:()=>void D(a,d),children:"↻"}),s.jsx("button",{className:r?"stmt-btn on":"stmt-btn",disabled:E!=null,onClick:()=>void D(a,d),children:$?t("Формируется…"):r?t("Скачать"):t("Сформировать")})]})};return s.jsxs("div",{className:"stmt",children:[s.jsxs("div",{className:"content-hero hero-assets stmt-hero",children:[s.jsx("span",{className:"content-hero-ico","aria-hidden":"true",children:s.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("path",{d:"M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z"}),s.jsx("path",{d:"M14 3v5h5"}),s.jsx("path",{d:"M9 13h6M9 17h4"})]})}),s.jsxs("div",{className:"stmt-hero-txt",children:[s.jsx("h2",{children:t("Выписка по счёту")}),s.jsx("small",{children:t("Справка об остатках на счёте в PDF")})]}),i&&s.jsxs("div",{className:"stmt-who",children:[o&&s.jsxs("span",{className:"stmt-tag who",children:[s.jsx("img",{alt:"",src:"https://events.web.money/open/avatar.aspx?t=Url&s=normal&w="+encodeURIComponent(i)}),o]}
1),s.jsxs("span",{className:"stmt-tag"+(o?"":" who"),children:[!o&&s.jsx("img",{alt:"",src:"https://events.web.money/open/avatar.aspx?t=Url&s=normal&w="+encodeURIComponent(i)}),"WMID ",i]})]})]}),s.jsxs("div",{className:"stmt-switch",children:[s.jsxs("div",{className:"ast-view",role:"group","aria-label":t("Вид выписки"),children:[s.jsx("button",{type:"button",className:y==="month"?"on":"","aria-pressed":y==="month",onClick:()=>J("month"),children:t("Ежемесячная")}),s.jsx("button",{type:"button",className:y==="custom"?"on":"","aria-pressed":y==="custom",onClick:()=>J("custom"),children:t("Настраиваемая")})]}),s.jsx("span",{className:"stmt-switch-hint",children:y==="month"?t("Остатки на последний день месяца, за 12 месяцев"):t("Остатки на 00:00:00 UTC выбранной даты")})]}),O&&s.jsx("div",{className:"stmt-error",children:O}),y==="month"&&s.jsx("div",{className:"stmt-card",children:s.jsxs("table",{className:"stmt-table",children:[s.jsx("thead",{children:s.jsxs("tr",{children:[s.jsx("th",{children:t("Дата")}),s.jsx("th",{children:t("Название")}),s.jsx("th",{className:"ta-r",children:t("Действие")})]})}),s.jsx("tbody",{children:X.map(a=>s.jsxs("tr",{children:[s.jsx("td",{children:ys(a.dateISO)}),s.jsx("td",{children:As(F,a.year,a.month)}),s.jsx("td",{className:"ta-r",children:q(0,a.dateISO)})]},a.dateISO))})]})}),y==="custom"&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"stmt-form",children:[s.jsxs("label",{className:"stmt-field",children:[s.jsx("span",{children:t("Дата")}),s.jsx(Ve,{value:v,max:os,min:"2015-01-01",onChange:Y,ariaLabel:t("Дата")})]}),s.jsx("button",{className:"stmt-btn primary",disabled:!v||E!=null,onClick:()=>void D(1,v),children:t("Сформировать")})]}),s.jsxs("div",{className:"stmt-rules",children:[s.jsx("b",{children:t("Правила:")}),s.jsxs("ol",{children:[s.jsx("li",{children:t("Остатки фиксируются на 00:00:00 UTC выбранной даты — учитываются все операции, завершённые до этого момента.")}),s.jsx("li",{children:t("Документ формируется в вашем браузере и заверяется сервисом документов INDX: в нём есть QR-код и PIN для проверки подлинности.")}),s.jsx("li",{children:t("Записи журнала доступны для повторной загрузки в течение {0} дней.",Ae)})]})]}),s.jsx("div",{className:"stmt-card",children:s.jsxs("table",{className:"stmt-table",children:[s.jsx("thead",{children:s.jsxs("tr",{children:[s.jsxs("th",{children:[t("Время формирования")," (",Se(),")"]}),s.jsx("th",{children:t("Название")}),s.jsx("th",{children:t("Статус")}),s.jsx("th",{className:"ta-r",children:t("Действие")})]})}),s.jsxs("tbody",{children:[H===null&&s.jsx("tr",{children:s.jsx("td",{colSpan:4,className:"stmt-empty",children:t("Загрузка…")})}),H!==null&&Z.length===0&&s.jsx("tr",{children:s.jsx("td",{colSpan:4,className:"stmt-empty",children:t("Записи не найдены")})}),Z.map(a=>s.jsxs("tr",{children:[s.jsx("td",{children:He(a.created)}),s.jsx("td",{children:t("Выписка ({0} — UTC)",ys(a.date))}),s.jsx("td",{children:E===T(1,a.date)?s.jsx("span",{className:"st-wait",children:t("Обработка")}):s.jsx("span",{className:"st-done",children:t("Сформировано")})}),s.jsx("td",{className:"ta-r",children:q(1,a.date)})]},a.date))]})]})})]})]})}const js=i=>"$"+(Math.abs(i)<.005?"0.00":i.toFixed(2)),_s=i=>{const[o,h,x]=i.split("-");return`${x}.${h}.${o}`},qe=()=>s.jsx("svg",{className:"ast-go-ico",width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:s.jsx("path",{d:"M14 4h6v6M20 4l-8 8M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5"})}),_e=i=>{const o=ze()==="ru",h=o?"ru":"en",x=o?encodeURIComponent("Криптовалюты"):"coins";return i.cgId?`https://www.coingecko.com/${h}/${x}/${encodeURIComponent(i.cgId)}`:`https://www.coingecko.com/${h}/search?query=${encodeURIComponent(i.coin)}`},Cs=()=>s.jsx("svg",{className:"ast-go-ico",width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.6",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:s.jsx("path",{d:"M7 17L17 7M9 7h8v8"})}),Gs=()=>s.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:s.jsx("path",{d:"M12 4v13M6 11l6 6 6-6"})}),Ys=()=>s.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:s.jsx("path",{d:"M12 20V7M6 13l6-6 6 6"})}),Ge=()=>s.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[s.jsx("circle",{cx:"12",cy:"12",r:"9"}),s.jsx("path",{d:"M12 7v5l3 2"})]}),Ks=i=>(i>0?"+":i<0?"−":"")+js(Math.abs(i)),Os=i=>(i>0?"+":i<0?"−":"")+cs(Math.round(Math.abs(i)*100)/100)+"%",Ye=["name","value","price","pnl"],Qs="(max-width: 760px)",Js="(max-width: 710px)";function et({assets:i,balance:o,chains:h,opsAllowed:x,instruments:N,stats:G,tpsl:F,fees:y,authed:L,wmid:H="",nick:is="",focusCoin:v,onDeposit:Y,onWithdraw:E,onHistory:K,onTrade:O,onOrders:U,onClose:I}){const[T,Q]=l.useState(()=>{try{return localStorage.getItem("indx.assets.tab")==="account"?"account":"spot"}catch{return"spot"}}),J=e=>{Q(e);try{localStorage.setItem("indx.assets.tab",e)}catch{}},[X,os]=l.useState(()=>{try{return localStorage.getItem("indx.assets.hideZero")!=="0"}catch{return!0}}),ps=e=>{os(e);try{localStorage.setItem("indx.assets.hideZero",e?"1":"0")}catch{}},[Z,bs]=l.useState(!1),[D,q]=l.useState(""),[a,d]=l.useState(null),[r,$]=l.useState(()=>{try{const e=localStorage.getItem("indx.assets.sortBy");return Ye.includes(e??"")?e:"name"}catch{return"name"}}),[g,rs]=l.useState(()=>{try{return localStorage.getItem("indx.assets.dir")||"asc"}catch{return"asc"}}),[ss,P]=l.useState(()=>{try{return localStorage.getItem("indx.assets.view")==="cards"?"cards":"table"}catch{return"table"}}),se=e=>{P(e);try{localStorage.setItem("indx.assets.view",e)}catch{}},[Ls,ee]=l.useState(()=>typeof window<"u"&&!!window.matchMedia&&window.matchMedia(Qs).matches);l.useEffect(()=>{if(!window.matchMedia)return;const e=window.matchMedia(Qs),n=()=>ee(e.matches);
1return e.addEventListener("change",n),()=>e.removeEventListener("change",n)},[]);const[es,te]=l.useState(()=>typeof window<"u"&&!!window.matchMedia&&window.matchMedia(Js).matches);l.useEffect(()=>{if(!window.matchMedia)return;const e=window.matchMedia(Js),n=()=>te(e.matches);return e.addEventListener("change",n),()=>e.removeEventListener("change",n)},[]);const[ne,ae]=l.useState(()=>{try{return localStorage.getItem("indx.assets.viewNarrow")==="table"?"table":"cards"}catch{return"cards"}}),ts=Ls?es?"cards":ne:ss,Es=e=>{if(!Ls){se(e);return}ae(e);try{localStorage.setItem("indx.assets.viewNarrow",e)}catch{}},ce=ts==="table",Ns=e=>{const n=e===r?g==="asc"?"desc":"asc":e==="name"?"asc":"desc";$(e),rs(n);try{localStorage.setItem("indx.assets.sortBy",e),localStorage.setItem("indx.assets.dir",n)}catch{}},ie=new Set(h.filter(Ue).map(e=>e.ticker)),oe=new Set(h.filter(Ie).map(e=>e.ticker)),Us=e=>e==="WMZ"||e==="WMG",ls=e=>x[e]!==!1,R=e=>ls(e)&&(Us(e)||ie.has(e)),z=e=>ls(e)&&(Us(e)||oe.has(e)),Is=R("WMZ")||R("USDT"),Ts=z("WMZ")||z("USDT"),V=t("Операции ввода и вывода временно недоступны"),re=e=>{const n=h.filter(c=>c.ticker===e);return n.length?n.some(c=>c.isActive&&c.isout)?t("Нет свободного остатка в горячих кошельках биржи по {0}",e):t("Вывод {0} отключён биржей",e):t("Для {0} не заведено ни одной сети вывода",e)},le=e=>h.filter(c=>c.ticker===e).length?t("Пополнение {0} отключено биржей",e):t("Для {0} не заведено ни одной сети пополнения",e),A=Te(N,"WMZ")??0,[de,vs]=l.useState(null);l.useEffect(()=>{try{localStorage.removeItem("indx.assets.cost")}catch{}},[]);const he=(e,n)=>{vs(null);const c=Number(n.replace(",",".").replace(/\s/g,""));n.trim()===""||!(c>0)||Math.abs(c-e.avg)<1e-4||us.costSet(e.symbolid,c)},Zs=l.useCallback(e=>{const n=N.find(_=>_.base===e.coin&&_.quote==="WMZ")??N.find(_=>_.base===e.coin),c=(n==null?void 0:n.price)??0,k=e.priceUsd&&e.priceUsd>0?e.priceUsd:C(c,A).toNumber(),S=e.priceEur&&e.priceEur>0?e.priceEur:0,j=Ze(e),w=C(k,j).toNumber(),M=e.avg,B=c>0,as=B?C(C(hs(c,M),j),A).toNumber():null,m=B&&M>0?C(Hs(hs(c,M),M),100).toNumber():null,p=n?G[n.symbolid]:void 0,f=(p==null?void 0:p.open24)??(p==null?void 0:p.op)??0,fs=f>0?C(C(hs(c,f),j),A).toNumber():null,Ms=f>0?C(Hs(hs(c,f),f),100).toNumber():null;return{priceWmz:c,priceUsd:k,priceEur:S,valueUsd:w,pnlUsd:as,pnlPct:m,av:M,todayUsd:fs,todayPct:Ms,held:j}},[N,A,G]),me=async(e,n=1)=>{try{return await us.statementAt(e,n)}catch(c){const k=new Date().toISOString().slice(0,10);if(e!==k)throw c;const S=t("INDX {0}",_s(e)),j=new Date,w=m=>String(m).padStart(2,"0"),M=`${_s(e)}, ${w(j.getUTCHours())}:${w(j.getUTCMinutes())} UTC`,B=5e-9,as=[...o?[{section:t("Счёт"),coin:"WMZ",name:"Webmoney",amount:o.wmz,locked:o.locked,blocked:0,priceUsd:1,priceSource:"Webmoney"}]:[],...i.filter(m=>m.amount>=B||m.locked>=B||m.rest>=B).map(m=>{const p=N.find(f=>f.base===m.coin&&f.quote==="WMZ");return{section:t("Портфель"),coin:m.coin,amount:Pe(m.amount,m.rest).toNumber(),locked:m.locked,blocked:m.rest,priceUsd:p?C(p.price,A).toNumber():null,priceSource:p?S:t("нет рынка")}})];return Re({dateISO:e,moment:M,rows:as,eurRate:null,eurRateNote:t("Курс евро на дату недоступен — оценка приведена только в USD")})}},gs=l.useRef(null),[Ds,Bs]=l.useState(null);l.useEffect(()=>{if(!v)return;Bs(v.coin);const e=window.setTimeout(()=>{var c;(c=gs.current)==null||c.scrollIntoView({block:"center",behavior:"smooth"})},60),n=window.setTimeout(()=>Bs(null),1600);return()=>{window.clearTimeout(e),window.clearTimeout(n)}},[v==null?void 0:v.n]);const xe=l.useMemo(()=>De(F,y),[F,y]),ns=l.useMemo(()=>i.map(e=>({a:e,...Zs(e)})),[i,Zs]),$s=l.useMemo(()=>C((o==null?void 0:o.wmz)??0,A).toNumber(),[o==null?void 0:o.wmz,A]),ks=l.useMemo(()=>ns.reduce((e,n)=>e+n.valueUsd,0)+$s,[ns,$s]),ws=l.useMemo(()=>ns.filter(e=>Be(e.a.coin,D)).filter(e=>$e(e.a)||!X&&e.a.category===2&&e.a.state===2).sort((e,n)=>{const c=j=>j??(g==="asc"?1/0:-1/0),k=(j,w)=>j==null&&w==null?0:c(j)-c(w),S=r==="name"?e.a.coin.localeCompare(n.a.coin):r==="price"?k(e.priceUsd||null,n.priceUsd||null):r==="pnl"?k(e.pnlUsd,n.pnlUsd):e.valueUsd-n.valueUsd;return g==="asc"?S:-S}),[ns,D,X,r,g]),u=e=>Z?"••••":e,ue=t("Себестоимость — средняя цена ваших покупок монеты в WMZ, пересчитывается при каждой покупке. ✎ — задать вручную: значение сохраняется в портфеле и становится базой для следующих покупок."),je=t("Весь остаток монеты и его оценка в $ по цене из столбца «Цена». Полоска — доля актива в портфеле."),Ps=t("Котировка CoinGecko в $. Если её нет — цена рынка монеты за WMZ на INDX, пересчитанная в $."),Rs=t("Спотовый PnL = (цена последней сделки на INDX − себестоимость) × остаток × курс WMZ к $. Процент — от себестоимости."),zs=t("PnL за 24ч = (цена последней сделки на INDX − цена 24 часа назад) × остаток × курс WMZ к $."),Vs=({a:e,priceUsd:n,priceEur:c,valueUsd:k,pnlUsd:S,pnlPct:j,av:w,todayUsd:M,todayPct:B,held:as})=>{const m=e.amount-e.locked,p=xe[e.coin]??0,f=Math.max(e.locked-p,0),fs=de===e.coin?s.jsx("input",{className:"cost-edit",autoFocus:!0,defaultValue:w>0?String(w):"",placeholder:"WMZ",onBlur:b=>he(e,b.target.value),onKeyDown:b=>{b.key==="Enter"&&b.target.blur(),b.key==="Escape"&&vs(null)}}):s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"cost-v",children:[w>0?cs(w):"—"," WMZ"]})," ",s.jsx("button",{className:"cost-pen",onClick:()=>vs(e.coin),"data-hint":t("Изменить себестоимость — сохраняется в портфеле и становится базой для следующих покупок"),children:"✎"})]}),Ms=O&&m>0?s.jsx(xs,{text:t("Открыть торги: лимитная заявка на это количество"),children:s.jsxs("button",{type:"button",className:"ast-go",onClick:()=>O(e.coin,m,"limit"),children:[u(W(m,e.coin)),s.jsx(Cs,{})]})}):s.jsx("b",{children:u(W(m,e.coin))}),_=n>0?s.jsx(xs,{text:t("Котировка {0} на CoinGecko — источник этой цены",e.coin),children:s.jsxs("a",{className:"ast-go ast-ext",href:_e(e),target:"_blank",rel:"noopener noreferrer",children:["$"+cs(n),c>0&&s.jsx("em",{children:" €"+cs(c)}),s.jsx(qe,{})]})}):s.jsx("b",{children:"—"}
1),pe=U&&f>0?s.jsx(xs,{text:t("Показать заявки по {0}",e.coin),children:s.jsxs("button",{type:"button",className:"ast-go",onClick:()=>U(e.coin,"plain"),children:[u(W(f,e.coin)),s.jsx(Cs,{})]})}):s.jsx("b",{children:u(W(f,e.coin))}),be=U&&p>0?s.jsx(xs,{text:t("Показать заявки TP/SL по {0}",e.coin),children:s.jsxs("button",{type:"button",className:"ast-go",onClick:()=>U(e.coin,"tpsl"),children:[u(W(p,e.coin)),s.jsx(Cs,{})]})}):s.jsx("b",{children:u(W(p,e.coin))}),Ne=M!=null?s.jsxs("b",{className:M>=0?"up":"down",children:[u(Ks(M)),s.jsx("em",{children:Os(B)})]}):s.jsx("b",{className:"muted",children:"—"}),ve=S!=null?s.jsxs("b",{className:S>=0?"up":"down",children:[u(Ks(S)),j!=null&&s.jsx("em",{children:Os(j)})]}):s.jsx("b",{className:"muted","data-hint":t("Торги по активу закрыты — сравнивать не с чем"),children:"—"}),ge=e.locked>=qs?s.jsx("small",{className:"ast-blocked","data-hint":t("Резерв под заявки и TP/SL: освободится после их исполнения или снятия"),children:t("в т.ч. заблокировано {0}",W(e.locked,e.coin))}):null,ke=b=>s.jsx("button",{className:"ast-btn dep",disabled:!R(e.coin),onClick:()=>Y(e.coin),"data-hint":R(e.coin)?t("Пополнить ")+e.coin:ls(e.coin)?le(e.coin):V,children:b==="both"?s.jsxs(s.Fragment,{children:[s.jsx(Gs,{}),s.jsx("span",{className:"lbl",children:t("Депозит")})]}):b?t("Депозит"):s.jsx(Gs,{})}),we=b=>s.jsx("button",{className:"ast-btn wd",disabled:!z(e.coin),onClick:()=>E(e.coin),"data-hint":z(e.coin)?t("Вывести ")+e.coin:ls(e.coin)?re(e.coin):V,children:b==="both"?s.jsxs(s.Fragment,{children:[s.jsx(Ys,{}),s.jsx("span",{className:"lbl",children:t("Вывод")})]}):b?t("Вывод"):s.jsx(Ys,{})}),fe=b=>s.jsx("button",{className:"ast-btn hist"+(b?"":" ico"),onClick:()=>K(e.coin),"data-hint":t("История операций по ")+e.coin,"aria-label":t("История операций по ")+e.coin,children:b?t("История"):s.jsx(Ge,{})}),Me=e.rest>=qs?s.jsx("small",{className:"ast-rest","data-hint":t("Остаток от пополнения: дробная часть меньше единицы учёта монеты — входит во «Всего», торговать им нельзя"),children:t("в т.ч. остаток от пополнения {0}",W(e.rest,e.coin))}):null;return{a:e,held:as,valueUsd:k,cost:fs,availEl:Ms,priceEl:_,bookEl:pe,tpEl:be,todayEl:Ne,pnlEl:ve,blocked:ge,restEl:Me,dep:ke,wd:we,hist:fe}},ds=(e,n,c="",k)=>s.jsx("th",{className:c,"aria-sort":r===e?g==="asc"?"ascending":"descending":"none",children:s.jsxs("button",{type:"button",className:"ast-th"+(r===e?" on":"")+(k?" has-hint":""),onClick:()=>Ns(e),"data-hint":k,children:[n,r===e&&s.jsx("span",{className:"sa",children:g==="asc"?" ↑":" ↓"})]})});return s.jsxs("div",{className:"content-page assets-page",children:[s.jsx("button",{className:"dep-back-btn content-back",onClick:I,children:t("← К торгам")}),s.jsxs("div",{className:"assets-shell",children:[s.jsxs("nav",{className:"assets-tabs",children:[s.jsxs("button",{className:T==="spot"?"on":"",onClick:()=>J("spot"),children:[s.jsx("svg",{className:"tab-ico",width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:s.jsx("path",{d:"M3 7h18v11a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1zM3 7l2-3h12l2 3M16 13h.01"})})," ",t("Активы")]}),s.jsxs("button",{className:T==="account"?"on":"",onClick:()=>J("account"),children:[s.jsx("svg",{className:"tab-ico",width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:s.jsx("path",{d:"M14 3v5h5M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8zM9 13h6M9 17h4"})})," ",t("Выписка по счёту")]})]}),s.jsxs("div",{className:"assets-main",children:[T==="spot"&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"assets-sum",children:[s.jsxs("div",{className:"as-cards",children:[s.jsxs("div",{className:"as-card as-card-pf",children:[s.jsxs("span",{className:"as-label",children:[s.jsx("span",{className:"as-ico pf","aria-hidden":"true",children:s.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("rect",{x:"3",y:"7",width:"18",height:"13",rx:"2"}),s.jsx("path",{d:"M8 7V5a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"}),s.jsx("path",{d:"M3 13h18"})]})}),t("Портфель")," ",s.jsx("span",{className:"as-tag",children:t("все активы")}),s.jsx("button",{className:"as-eye",onClick:()=>bs(e=>!e),"data-hint":Z?t("Показать суммы"):t("Скрыть суммы"),"aria-label":Z?t("Показать суммы"):t("Скрыть суммы"),"aria-pressed":Z,children:s.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[s.jsx("path",{d:"M1.5 12S5 5.5 12 5.5 22.5 12 22.5 12 19 18.5 12 18.5 1.5 12 1.5 12z"}),s.jsx("circle",{cx:"12",cy:"12",r:"3"}),Z&&s.jsx("path",{d:"M3.5 3.5l17 17"})]})})]}),s.jsxs("span",{className:"as-val","data-hint":t("Оценка по мировым котировкам CoinGecko. Биржевая оценка считается по ценам самой INDX и потому отличается."),children:[u(js(ks))," ",s.jsx("small",{children:"USD"})]}),o&&o.estimated>0&&s.jsxs("span",{className:"as-kv","data-hint":t("Оценка биржи: та же сумма по котировкам INDX — её показывает и шапка"),children:[s.jsx("span",{children:t("Цена портфеля по INDX")}),s.jsxs("b",{children:["≈ ",u(Ss(o.estimated)+" WMZ")]})]})]}),s.jsxs("div",{className:"as-card as-card-wmz",children:[s.jsxs("span",{className:"as-label",children:[s.jsx(ms,{id:0,code:"WMZ",size:18}),t("Баланс WMZ")," ",s.jsx("span",{className:"as-tag",children:t("счёт")})]}),o&&s.jsxs("span",{className:"as-kv",children:[s.jsx("span",{children:t("Доступно")}),s.jsx("b",{children:u(Ss(o.available)+" WMZ")})]}),o&&s.jsxs("span",{className:"as-kv",children:[s.jsx("span",{children:t("В заявках")}),s.jsx("b",{children:u(Ss(o.locked)+" WMZ")})]}),s.jsxs("div",{className:"as-avail-btns",children:[s.jsxs("button",{className:"ast-btn dep",disabled:!L||!R("WMZ"),onClick:()=>Y("WMZ"),"data-hint":R("WMZ")?t("Депозит WMZ через Webmoney"):V,children:[s.jsxs("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("path",{d:"M12 3v14"}),s.jsx("path",{d:"M6 11l6 6 6-6"}),s.jsx("path",{d:"M4 21h16"})]}),t("Депозит")]}),s.jsxs("button",{className:"ast-btn wd",disabled:!L||!z("WMZ"),onClick:()=>E("WMZ"),"data-hint":z("WMZ")?t("Вывод WMZ на WM-кошелёк"):V,children:[s.jsxs("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("path",{d:"M12 21V7"}),s.jsx("path",{d:"M6 13l6-6 6 6"}),s.jsx("path",{d:"M4 3h16"})]}),t("Вывод")]}),s.jsxs("button",{className:"ast-btn hist",disabled:!L,onClick:()=>K("WMZ"),"data-hint":t("История операций по ")+"WMZ",children:[s.jsxs("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("circle",{cx:"12",cy:"12",r:"9"}),s.jsx("path",{d:"M12 7v5l3 2"})]}),t("История")]})]})]})]}),s.jsxs("div",{className:"as-cta",children:[s.jsx("button",{className:"as-btn primary",disabled:!L||!Is,onClick:()=>d("deposit"),"data-hint":Is?t("Пополнение WMZ"):V,children:t("Пополнение")}),s.jsx("button",{className:"as-btn",disabled:!L||!Ts,onClick:()=>d("withdraw"),"data-hint":Ts?t("Вывод WMZ"):V,children:t("Вывод")})]})]}),L?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"assets-toolbar",children:[s.jsxs("div",{className:"fees-search",children:[s.jsx("span",{className:"ico",children:"⌕"}),s.jsx("input",{placeholder:t("Поиск актива"),value:D,onChange:e=>q(e.target.value),onKeyDown:e=>{e.key==="Escape"&&q("")}}),D&&s.jsx("button",{className:"fees-search-x",onClick:()=>q(""),"data-hint":t("Отменить ввод"),children:"✕"})]}),s.jsxs("label",{className:"as-check",children:[s.jsx("input",{type:"checkbox",checked:X,onChange:e=>ps(e.target.checked)})," ",t("Скрыть нулевые балансы")]}),s.jsxs("div",{className:"sort-ctrls",children:[s.jsxs("button",{className:"sort-btn"+(r==="name"?" on":""),onClick:()=>Ns("name"),"data-hint":t("Сортировать по алфавиту"),children:[s.jsx("span",{className:"sl",children:t("А-Я")}),r==="name"&&s.jsx("span",{className:"sa",children:g==="asc"?"â
1†‘":"↓"})]}),s.jsxs("button",{className:"sort-btn"+(r==="value"?" on":""),onClick:()=>Ns("value"),"data-hint":t("Сортировать по стоимости"),children:[s.jsx("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:s.jsx("path",{d:"M5 20V9M12 20V4M19 20v-8"})}),s.jsx("span",{className:"sl",children:t("Стоимость")}),r==="value"&&s.jsx("span",{className:"sa",children:g==="asc"?"↑":"↓"})]})]}),s.jsxs("div",{className:"ast-view",role:"group","aria-label":t("Вид списка"),children:[s.jsxs("button",{type:"button",className:(ts==="table"?"on":"")+(es?" off":""),"aria-pressed":ts==="table","aria-disabled":es||void 0,onClick:()=>{es||Es("table")},"data-hint":es?t("Таблица не помещается на таком узком экране — поверните устройство"):t("Показать таблицей"),children:[s.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:s.jsx("path",{d:"M4 6h16M4 12h16M4 18h16"})}),t("Таблица")]}),s.jsxs("button",{type:"button",className:ts==="cards"?"on":"","aria-pressed":ts==="cards",onClick:()=>Es("cards"),"data-hint":t("Показать карточками"),children:[s.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinejoin:"round",children:[s.jsx("rect",{x:"4",y:"4",width:"7",height:"7",rx:"1"}),s.jsx("rect",{x:"13",y:"4",width:"7",height:"7",rx:"1"}),s.jsx("rect",{x:"4",y:"13",width:"7",height:"7",rx:"1"}),s.jsx("rect",{x:"13",y:"13",width:"7",height:"7",rx:"1"})]}),t("Карточки")]})]})]}),ns.length?ws.length?ce?s.jsx("div",{className:"ast-table-wrap",children:s.jsxs("table",{className:"ast-table",children:[s.jsx("thead",{children:s.jsxs("tr",{children:[ds("name",t("Актив"),"l",ue),ds("value",t("Всего / ≈ $"),"",je),s.jsx("th",{children:t("Доступно")}),s.jsx("th",{className:"ast-c-book",children:t("В ордерах")}),ds("price",t("Цена за 1"),"",Ps),ds("pnl","PnL","",Rs+`
2
3`+zs),s.jsx("th",{className:"act"})]})}),s.jsx("tbody",{children:ws.map(e=>{const n=Vs(e),c=ks>0?n.valueUsd/ks*100:0;return s.jsxs("tr",{className:Ds===n.a.coin?"ast-row-focus":void 0,ref:v&&v.coin===n.a.coin?gs:void 0,children:[s.jsx("td",{className:"l",children:s.jsxs("div",{className:"ast-tc",children:[s.jsx(ms,{id:n.a.symbolid,code:n.a.coin,size:24}),s.jsxs("div",{children:[s.jsx("b",{className:"ast-tk",children:n.a.coin}),s.jsxs("small",{className:"cost-line",children:[t("себест.")," ",n.cost]})]})]})}),s.jsxs("td",{children:[s.jsx("b",{className:"ast-n",children:u(W(n.held,n.a.coin))}),s.jsx("small",{className:"ast-sub",children:u(js(n.valueUsd))}),n.restEl,n.blocked,s.jsx("i",{className:"ast-share",style:{width:Math.max(2,Math.min(100,c))+"%"},"data-hint":t("Доля портфеля: {0}%",cs(Math.round(c*10)/10))})]}),s.jsxs("td",{className:"ast-cell",children:[n.availEl,s.jsxs("small",{className:"ast-sub ast-book-sub",children:[t("В ордерах")," ",n.bookEl," · TP/SL ",n.tpEl]})]}),s.jsxs("td",{className:"ast-cell ast-c-book",children:[n.bookEl,s.jsxs("small",{className:"ast-sub",children:["TP/SL ",n.tpEl]})]}),s.jsx("td",{className:"ast-cell",children:n.priceEl}),s.jsxs("td",{className:"ast-cell ast-pnl",children:[s.jsxs("small",{className:"ast-sub",children:[t("за 24ч")," ",n.todayEl]}),n.pnlEl]}),s.jsx("td",{className:"act",children:s.jsxs("div",{className:"ast-acts",children:[n.dep("both"),n.wd("both"),n.hist(!1)]})})]},n.a.symbolid)})})]})}):s.jsx("div",{className:"ast-cards",children:ws.map(e=>{const n=Vs(e);return s.jsxs("div",{className:"ast-card"+(Ds===n.a.coin?" ast-card-focus":""),ref:v&&v.coin===n.a.coin?gs:void 0,children:[s.jsxs("div",{className:"ast-card-head",children:[s.jsx(ms,{id:n.a.symbolid,code:n.a.coin,size:30}),s.jsxs("div",{className:"ast-card-name",children:[s.jsx("b",{children:n.a.coin}),s.jsxs("small",{className:"cost-line",children:[t("себест.")," ",n.cost]})]}),s.jsxs("div",{className:"ast-card-amt",children:[s.jsx("b",{children:u(W(n.held,n.a.coin))}),s.jsx("small",{children:u(js(n.valueUsd))}),n.restEl,n.blocked]})]}),s.jsxs("div",{className:"ast-card-grid",children:[s.jsxs("div",{children:[s.jsx("span",{children:t("Доступно")}),n.availEl]}),s.jsxs("div",{children:[s.jsx("span",{"data-hint":Ps,children:t("Цена за 1")}),n.priceEl]}),s.jsxs("div",{children:[s.jsx("span",{children:t("В ордерах")}),n.bookEl]}),s.jsxs("div",{children:[s.jsx("span",{children:t("В ордерах TP/SL")}),n.tpEl]}),s.jsxs("div",{children:[s.jsx("span",{"data-hint":zs,children:t("PnL за 24ч")}),n.todayEl]}),s.jsxs("div",{children:[s.jsx("span",{"data-hint":Rs,children:t("Спотовый PnL")}),n.pnlEl]})]}),s.jsxs("div",{className:"ast-card-act",children:[n.dep(!0),n.wd(!0),n.hist(!0)]})]},n.a.symbolid)})}):s.jsxs("div",{className:"content-loading",children:[t("Ничего не найдено"),X?t(" (возможно, скрыты нулевые балансы)"):""]}):s.jsx("div",{className:"content-loading",children:t("Нет активов")})]}
3):s.jsx(Xs,{text:t("Войдите, чтобы увидеть свои активы, пополнять счёт и выводить средства.")})]}),T==="account"&&(L?s.jsx(Xe,{wmid:H,nick:is,requestSnapshot:me,requestList:us.statementList}):s.jsx(Xs,{text:t("Войдите, чтобы сформировать выписку по счёту")}))]})]}),a&&s.jsx("div",{className:"modal-overlay",children:s.jsxs("div",{className:"modal cfm",role:"dialog","aria-modal":"true","aria-labelledby":"op-title",children:[s.jsxs("div",{className:"cfm-head",children:[s.jsx("h2",{id:"op-title",children:a==="deposit"?t("Пополнение WMZ"):t("Вывод WMZ")}),s.jsx("button",{type:"button",className:"cfm-x",onClick:()=>d(null),"aria-label":t("Закрыть"),children:s.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round","aria-hidden":"true",children:s.jsx("path",{d:"M6 6l12 12M18 6L6 18"})})})]}),s.jsxs("div",{className:"cfm-tags",children:[s.jsxs("span",{className:"cfm-tag pair",children:[s.jsx(ms,{code:"WMZ",size:18}),"WMZ"]}),s.jsx("span",{className:"cfm-tag "+(a==="deposit"?"dep":"wd"),children:a==="deposit"?t("Пополнение"):t("Вывод")})]}),s.jsx("p",{className:"cfm-lead op2-lead",children:a==="deposit"?t("Выберите, откуда поступят средства."):t("Выберите, куда вывести средства.")}),s.jsx("div",{className:"op2-list",children:[{coin:"WMZ",cls:"wm",title:"Webmoney Transfer",desc:a==="deposit"?t("Пополнить счёт суммой через мерчант Webmoney"):t("Вывести WMZ на WM-кошелёк (Z…)"),ico:s.jsxs("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("rect",{x:"2.5",y:"6",width:"19",height:"12.5",rx:"2"}),s.jsx("path",{d:"M2.5 10h19M16.5 14h.5"})]})},{coin:"USDT",cls:"cr",title:t("Криптоактив"),desc:a==="deposit"?t("Пополнить криптовалютой по адресу сети (напр. USDT)"):t("Вывести в криптовалюте на адрес (напр. USDT)"),ico:s.jsxs("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("circle",{cx:"12",cy:"12",r:"9"}),s.jsx("path",{d:"M9 9.5h4a2 2 0 0 1 0 4H9M9 12h3.5a2 2 0 0 1 0 4H9M11 7v10.5"})]})}].map(e=>{const n=a==="deposit"?R(e.coin):z(e.coin);return s.jsxs("button",{type:"button",className:"op2-opt",disabled:!n,"data-hint":n?void 0:V,onClick:()=>{const c=a;d(null),c==="deposit"?Y(e.coin):E(e.coin)},children:[s.jsx("span",{className:"op2-ico "+e.cls,"aria-hidden":"true",children:e.ico}),s.jsxs("span",{className:"op2-txt",children:[s.jsx("b",{children:e.title}),s.jsx("small",{children:e.desc}),!n&&s.jsx("em",{children:t("временно недоступно")})]}),s.jsx("svg",{className:"op2-chev",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true",children:s.jsx("path",{d:"M9 6l6 6-6 6"})})]},e.coin)})}),s.jsx("div",{className:"cfm-foot op2-foot",children:s.jsx("button",{type:"button",className:"cfm-cancel",onClick:()=>d(null),children:t("Отмена")})})]})})]})}export{et as AssetsPage};

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.