1import{A as tt,ag as at,u as vt,r as s,a as St,j as e,B as d,S as o,b as m,T as c,c as x,d as It,e as Ue,I as Ge,g as Oe,W as Ct,f as Wt,h as Tt,ah as kt,D as Rt,F as zt,G as _t,ai as Et,aj as Pt,ak as At}from"./index-As3zlcOR.js";import{c as Bt}from"./index-DRaLiETI.js";import{g as u}from"./getApiErrorMessage-DR0OohFW.js";import{g as Ke,b as Mt}from"./index-CPNIQfge.js";import{g as Dt,a as Xe}from"./user-B4wl1FNt.js";import{A as $t}from"./AttachEmailDialog-DSgCZuJw.js";import{P as Lt}from"./PageContainer-CGC41YuB.js";import{u as G}from"./useTheme-3zm8pSYU.js";import{C as rt,a as st}from"./CardContent-BZB-CXOP.js";import{A as Ye}from"./Avatar-B4LTgf3r.js";import{I as Nt}from"./IconCircleCheck-C1nuU324.js";import{c as O}from"./createReactComponent-BnRF18_V.js";import{I as Je}from"./IconBrandTelegram-BTEENTsO.js";import{I as se}from"./IconLink-B9OQnUfN.js";import{I as Qe}from"./IconShieldCheck-DZk04NU8.js";import{I as Vt}from"./IconChevronRight-dOLvoBxm.js";import{I as Ft}from"./IconUserCircle-CePmF0S2.js";import{A as f}from"./Alert-BqiQyW8v.js";import{I as qt}from"./IconTrash-C5KixXKR.js";import{T as S}from"./TextField-CE4qvalX.js";import{I as Ze}from"./InputAdornment-W3byaCyk.js";import{D as Ht}from"./Divider-M48fK5WT.js";import{I as Ut}from"./IconButton-DpcYAU_w.js";import{I as Gt}from"./IconUnlink-DnUEoohl.js";import{I as Ot}from"./IconExternalLink-BHT15l0o.js";import{I as Kt}from"./IconInfoCircle-C9af8VBM.js";import{I as Xt}from"./IconAffiliate-roqBHsTK.js";import{C as Yt}from"./Chip-B1JPT7ms.js";import"./createSvgIcon-DT_Vud9G.js";import"./createSvgIcon-BrfSxsSj.js";import"./Modal-yYyyeUon.js";import"./ownerWindow-BN2rbQ_G.js";import"./ownerDocument-DW-IO8s5.js";import"./useSlot-BH39ahzT.js";import"./Portal-iuCx0l49.js";import"./Grow-kSU8lMPt.js";import"./DialogContent-B6qOF9Vc.js";import"./Paper-Cyoq1L3S.js";import"./CircularProgress-BZGcKZGt.js";import"./index-CugiW-tf.js";import"./InputBase-D-14TpxP.js";import"./dividerClasses-BPwR0GYz.js";async function Jt(r){const n=new FormData;n.append("avatar",r);const i=await tt.post("/profiles/main/avatar/",n,{headers:{"Content-Type":"multipart/form-data"}});return at(i.data),i.data}async function Qt(){const r=await tt.delete("/profiles/main/avatar/");return at(r.data),r.data}var Zt=O("camera","IconCamera",[["path",{d:"M5 7h1a2 2 0 0 0 2 -2a1 1 0 0 1 1 -1h6a1 1 0 0 1 1 1a2 2 0 0 0 2 2h1a2 2 0 0 1 2 2v9a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-9a2 2 0 0 1 2 -2",key:"svg-0"}],["path",{d:"M9 13a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-1"}]]),ea=O("circle-x","IconCircleX",[["path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M10 10l4 4m0 -4l-4 4",key:"svg-1"}]]),ta=O("lock","IconLock",[["path",{d:"M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-6z",key:"svg-0"}],["path",{d:"M11 16a1 1 0 1 0 2 0a1 1 0 0 0 -2 0",key:"svg-1"}],["path",{d:"M8 11v-4a4 4 0 1 1 8 0v4",key:"svg-2"}]]),aa=O("phone","IconPhone",[["path",{d:"M5 4h4l2 5l-2.5 1.5a11 11 0 0 0 5 5l1.5 -2.5l5 2v4a2 2 0 0 1 -2 2a16 16 0 0 1 -15 -15a2 2 0 0 1 2 -2",key:"svg-0"}]]);const ra=r=>r?new Intl.DateTimeFormat("ru-RU",{dateStyle:"medium",timeStyle:"short"}).format(new Date(r)):"",ne=r=>{let i=r.replace(/\D/g,"");i.startsWith("8")&&(i=`7${i.slice(1)}`),!i.startsWith("7")&&i.length>0&&(i=`7${i}`),i=i.slice(0,11);const p=i.slice(1),t=p.slice(0,3),b=p.slice(3,6),w=p.slice(6,8),T=p.slice(8,10);let g=i.length?"+7":"";return t&&(g+=` (${t}`),t.length===3&&(g+=")"),b&&(g+=` ${b}`),w&&(g+=`-${w}`),T&&(g+=`-${T}`),g},sa=r=>{const n=r.replace(/\D/g,"");return n?n.length===10?`+7${n}`:n.length===11&&n.startsWith("8")?`+7${n.slice(1)}`:n.length===11&&n.startsWith("7")?`+${n}`:r:""},et=r=>{const n=r.replace(/\D/g,"");return n?n.length===10&&n[0]==="9"||n.length===11&&(n.startsWith("79")||n.startsWith("89")):!0},nt=(r,n)=>({success:{color:r.palette.success.main,bg:m(r.palette.success.main,.08),border:m(r.palette.success.main,.18)},warning:{color:r.palette.warning.main,bg:m(r.palette.warning.main,.09),border:m(r.palette.warning.main,.2)},danger:{color:r.palette.error.main,bg:m(r.palette.error.main,.08),border:m(r.palette.error.main,.18)},neutral:{color:r.palette.text.secondary,bg:m(r.palette.text.primary,.035),border:r.palette.divider},processing:{color:r.palette.info.main,bg:m(r.palette.info.main,.08),border:m(r.palette.info.main,.18)}})[n],it=({label:r,tone:n="neutral",icon:i})=>{const p=G(),t=nt(p,n);return e.jsx(Yt,{size:"small",icon:i,label:r,sx:{height:26,borderRadius:"999px",fontSize:12,fontWeight:700,color:t.color,bgcolor:t.bg,border:`1px solid ${t.border}`,"& .MuiChip-icon":{color:t.color,ml:"8px"}}})},U=({title:r,subtitle:n,icon:i,children:p})=>{const t=G();return e.jsx(rt,{elevation:0,sx:{height:"100%",borderRadius:"16px",border:`1px solid ${m(t.palette.primary.main,.12)}`,bgcolor:"background.paper",boxShadow:"none"},children:e.jsx(st,{sx:{p:{xs:1.4,sm:1.6},"&:last-child":{pb:{xs:1.4,sm:1.6}}},children:e.jsxs(o,{spacing:1.15,children:[e.jsxs(o,{direction:"row",spacing:1,alignItems:"center",children:[e.jsx(d,{sx:{width:30,height:30,display:"grid",placeItems:"center",borderRadius:"10px",bgcolor:m(t.palette.primary.main,.08),color:"primary.main",flex:"0 0 auto"},children:i}),e.jsxs(d,{minWidth:0,children:[e.jsx(c,{sx:{fontSize:14.5,lineHeight:"19px",fontWeight:800},children:r}),n?e.jsx(c,{sx:{mt:.1,fontSize:12,lineHeight:"15px",color:"text.secondary"},children:n}):null]})]}),p]})})})},ie=({label:r,value:n})=>e.jsxs(o,{direction:"row",justifyContent:"space-between",spacing:2,alignItems:"center",children:[e.jsx(c,{sx:{fontSize:13,color:"text.secondary"},children:r}),e.jsx(d,{sx:{fontSize:13,fontWeight:700,textAlign:"right",minWidth:0},children:n})]}),oe=({status:r,reason:n,action:i,tone:p="neutral"})=>{const t=G(),b=nt(t,p);return e.jsxs(d,{sx:{border:`1px solid ${b.border}`,borderRadius:"14px",p:1.25,bgcolor:b.bg},children:[e.jsxs(o,{direction:"row",spacing:1,alignItems:"center",flexWrap:"wrap",useFlexGap:!0,children:[e.jsx(it,{label:r,tone:p}),e.jsx(c,{sx:{fontSize:12.5,color:"text.secondary",minWidth:0},children:n})]}),i?e.jsx(c,{sx:{mt:.65,fontSize:12.5,lineHeight:"17px",fontWeight:850},children:i}):null]})},Oa=()=>{var qe,He;const r=G(),n=vt(),[i,p]=s.useState(!1),{user:t,setUserFromProfile:b,reloadUser:w}=St(),T=s.useRef(null),[g,le]=s.useState((t==null?void 0:t.name)||""),[M,ce]=s.useState(ne((t==null?void 0:t.phone_formatted)||(t==null?void 0:t.phone)||"")),[k,de]=s.useState(""),[h,me]=s.useState(""),[y,xe]=s.useState(""),[R,ot]=s.useState(!1),[pe,he]=s.useState(""),[ge,D]=s.useState(""),[fe,ue]=s.useState(""),[be,z]=s.useState(""),[je,$]=s.useState(""),[ye,L]=s.useState(""),[we,I]=s.useState(""),[ve,v]=s.useState(""),[N,K]=s.useState(""),[j,Se]=s.useState(null),[X,Ie]=s.useState(""),[Ce,_]=s.useState(""),[We,Y]=s.useState(""),[V,Te]=s.useState(!1),[E,ke]=s.useState(!1),[Re,F]=s.useState(!1),[P,C]=s.useState(!1),[ze,_e]=s.useState(!0),[J,Ee]=s.useState(!1),[Pe,lt]=s.useState(!1),ct=Dt(t),W=!!((t==null?void 0:t.email_verified)??(t==null?void 0:t.is_email_verified)),A=!!((t==null?void 0:t.telegram_connected)??((t==null?void 0:t.bot_active)&&(t==null?void 0:t.chat_id))),Ae=ra(t==null?void 0:t.last_password_change_at),Q=et(M),dt=g.trim().length>0&&Q&&!V,mt=!!k&&h.length>=8&&h===y&&k!==h&&!E;s.useEffect(()=>{le((t==null?void 0:t.name)||""),ce(ne((t==null?void 0:t.phone_formatted)||(t==null?void 0:t.phone)||""))},[t==null?void 0:t.name,t==null?void 0:t.phone,t==null?void 0:t.phone_formatted]);const Z=s.useCallback(async()=>{_e(!0),_("");try{Se(await Ke())}catch(a){_(u(a,"Ðе ÑдалоÑÑ Ð¿ÑовеÑиÑÑ ÑеÑеÑалÑнÑÑ Ð¿ÑивÑзкÑ."))}finally{_e(!1)}},[]);s.useEffect(()=>{Z()}
1,[Z]);const xt=async a=>{a.preventDefault();const l=X.trim();if(!(!l||j!=null&&j.attribution.is_bound)){Ee(!0),_(""),Y("");try{await Mt(l),Ie(""),Se(await Ke()),Y("РеÑеÑалÑнÑй код пÑивÑзан к ваÑÐµÐ¼Ñ Ð°ÐºÐºÐ°ÑнÑÑ.")}catch(H){_(u(H,"Ðе ÑдалоÑÑ Ð¿ÑивÑзаÑÑ ÑеÑеÑалÑнÑй код."))}finally{Ee(!1)}}},pt=async a=>{if(a.preventDefault(),D(""),he(""),!g.trim()){D("ÐведиÑе имÑ.");return}if(!et(M)){D("ÐÑовеÑÑÑе Ð½Ð¾Ð¼ÐµÑ ÑелеÑона.");return}Te(!0);try{const l=await kt({name:g.trim(),phone:sa(M)});b(l),he("ÐÑоÑÐ¸Ð»Ñ Ð¾Ð±Ð½Ð¾Ð²Ð»Ñн.")}catch(l){D(u(l,"Ðе ÑдалоÑÑ ÑоÑ
ÑаниÑÑ Ð¿ÑоÑилÑ. ÐопÑобÑйÑе еÑÑ Ñаз."))}finally{Te(!1)}},[Be,Me]=s.useState(""),[ee,De]=s.useState(""),[$e,q]=s.useState(""),[Le,B]=s.useState(""),[te,Ne]=s.useState(!1),[ae,Ve]=s.useState(!1),Fe=async()=>{q(""),B(""),Ne(!0);try{const a=await Rt({});if(a.already_verified){await w(),B("ÐоÑÑа Ñже подÑвеÑждена.");return}Me(a.verification_token||""),B(`Ðод оÑпÑавлен на ${a.email_masked||"ваÑÑ Ð¿Ð¾ÑÑÑ"}.`)}catch(a){q(u(a,"Ðе ÑдалоÑÑ Ð¾ÑпÑавиÑÑ ÐºÐ¾Ð´"))}finally{Ne(!1)}},ht=async a=>{a.preventDefault(),q(""),B(""),Ve(!0);try{const l=await zt({verification_token:Be,code:ee.trim()});_t(l),await w(),De(""),Me(""),B("ÐоÑÑа подÑвеÑждена.")}catch(l){q(u(l,"Ðе ÑдалоÑÑ Ð¿Ð¾Ð´ÑвеÑдиÑÑ Ð¿Ð¾ÑÑÑ"))}finally{Ve(!1)}},gt=async a=>{if(a.preventDefault(),z(""),ue(""),h!==y){z("ÐаÑоли не ÑовпадаÑÑ.");return}if(h.length<8){z("ÐовÑй паÑÐ¾Ð»Ñ Ð´Ð¾Ð»Ð¶ÐµÐ½ бÑÑÑ Ð½Ðµ коÑоÑе 8 Ñимволов.");return}if(k===h){z("ÐовÑй паÑÐ¾Ð»Ñ Ð½Ðµ должен ÑовпадаÑÑ Ñ ÑекÑÑим.");return}ke(!0);try{const l=await Bt({old_password:k,new_password:h,new_password_confirm:y});de(""),me(""),xe(""),ue(l.detail||"ÐаÑÐ¾Ð»Ñ Ð¸Ð·Ð¼ÐµÐ½Ñн. ТепеÑÑ Ð¸ÑполÑзÑйÑе новÑй паÑÐ¾Ð»Ñ Ð¿Ñи вÑ
оде."),await w()}catch(l){z(u(l,"Ðе ÑдалоÑÑ Ð¸Ð·Ð¼ÐµÐ½Ð¸ÑÑ Ð¿Ð°ÑолÑ. ÐопÑобÑйÑе еÑÑ Ñаз."))}finally{ke(!1)}},ft=async a=>{var H;const l=(H=a.target.files)==null?void 0:H[0];if(l){L(""),$(""),F(!0);try{const re=await Jt(l);b(re),$("ÐваÑÐ°Ñ Ð·Ð°Ð³ÑÑжен.")}catch(re){L(u(re,"Ðе ÑдалоÑÑ Ð·Ð°Ð³ÑÑзиÑÑ Ð°Ð²Ð°ÑаÑ."))}finally{F(!1),a.target.value=""}}},ut=async()=>{L(""),$(""),F(!0);try{const a=await Qt();b(a),$("ÐваÑÐ°Ñ ÑдалÑн.")}catch(a){L(u(a,"Ðе ÑдалоÑÑ ÑдалиÑÑ Ð°Ð²Ð°ÑаÑ."))}finally{F(!1)}},bt=async()=>{I(""),v(""),K(""),C(!0);const a=window.open("about:blank","_blank");try{const l=await Et();K(l.bot_url),v("СÑÑлка Ñоздана. ÐÑкÑойÑе боÑа и нажмиÑе Start."),a?a.location.href=l.bot_url:window.location.assign(l.bot_url)}catch(l){a==null||a.close(),I(u(l,"Ðе ÑдалоÑÑ ÑоздаÑÑ ÑÑÑÐ»ÐºÑ Ð¿ÑивÑзки."))}finally{C(!1)}},jt=()=>{if(!N)return;window.open(N,"_blank")||window.location.assign(N)},yt=async()=>{I(""),v(""),C(!0);try{await Pt();const a=await w();a!=null&&a.telegram_connected||a!=null&&a.bot_active&&(a!=null&&a.chat_id)?v("Telegram пÑивÑзан."):v("Telegram пока не пÑивÑзан. ÐÑли Ñже нажали Start, пÑовеÑÑÑе ÑÑаÑÑÑ ÐµÑÑ Ñаз.")}catch(a){I(u(a,"Ðе ÑдалоÑÑ Ð¿ÑовеÑиÑÑ Telegram."))}finally{C(!1)}},wt=async()=>{if(window.confirm("ÐÑвÑзаÑÑ Telegram Ð¾Ñ Ð°ÐºÐºÐ°ÑнÑа WBRay?")){I(""),v(""),C(!0);try{const a=await At();b(a.user),K(""),v("Telegram оÑвÑзан.")}catch(a){I(u(a,"Ðе ÑдалоÑÑ Ð¾ÑвÑзаÑÑ Telegram."))}finally{C(!1)}}};return e.jsxs(Lt,{title:"ÐÑоÑÐ¸Ð»Ñ Ð¸ безопаÑноÑÑÑ",description:"ÐÑоÑÐ¸Ð»Ñ Ð¸ безопаÑноÑÑÑ WBRay",children:[e.jsx(d,{sx:{width:"100%",mx:"auto",px:{xs:0,sm:1},py:{xs:1.25,md:2}},children:e.jsxs(o,{spacing:1.25,children:[t!=null&&t.needs_email?e.jsx(rt,{elevation:0,sx:{borderRadius:"24px",border:`1px solid ${m(r.palette.warning.main,.35)}`,background:m(r.palette.warning.main,.08)},children:e.jsx(st,{sx:{p:{xs:1.75,sm:2.15}},children:e.jsxs(o,{direction:{xs:"column",sm:"row"},spacing:1.5,alignItems:{xs:"flex-start",sm:"center"},justifyContent:"space-between",children:[e.jsxs(d,{minWidth:0,children:[e.jsx(c,{sx:{fontSize:16,fontWeight:700},children:"ÐобавÑÑе поÑÑÑ"}),e.jsx(c,{sx:{mt:.4,fontSize:13,color:"text.secondary"},children:"ÐккаÑÐ½Ñ Ñоздан ÑеÑез Telegram. ÐоÑÑа нÑжна, ÑÑÐ¾Ð±Ñ Ð·Ð°Ñ
одиÑÑ Ñ ÐºÐ¾Ð¼Ð¿ÑÑÑеÑа и не поÑеÑÑÑÑ Ð´Ð¾ÑÑÑп. ÐÑли аккаÑÐ½Ñ WBRay Ñ Ð²Ð°Ñ Ñже еÑÑÑ â обÑединим иÑ
."})]}),e.jsx(x,{variant:"contained",onClick:()=>p(!0),sx:{borderRadius:"14px",fontWeight:700,minHeight:46,px:2.2,whiteSpace:"nowrap"},children:"ÐобавиÑÑ Ð¿Ð¾ÑÑÑ"})]})})}):null,e.jsx(d,{sx:{borderRadius:"18px",bgcolor:It,color:Ue,px:{xs:1.5,md:2},py:{xs:1.4,md:1.5}
1,boxShadow:"0 18px 44px rgba(19,17,32,.22)"},children:e.jsxs(o,{direction:{xs:"column",md:"row"},spacing:{xs:1.4,md:2},alignItems:{xs:"stretch",md:"center"},justifyContent:"space-between",children:[e.jsxs(o,{direction:"row",spacing:1.35,alignItems:"center",minWidth:0,children:[e.jsx(Ye,{src:(t==null?void 0:t.avatar_url)||void 0,sx:{width:46,height:46,fontSize:16,fontWeight:800,bgcolor:"rgba(255,255,255,.1)",color:Ue,border:`1px solid ${Ge}`,flex:"0 0 auto"},children:Xe(t)}),e.jsxs(d,{minWidth:0,children:[e.jsx(c,{sx:{fontSize:17,lineHeight:1.15,fontWeight:800,letterSpacing:"-0.01em"},noWrap:!0,children:ct}),e.jsx(c,{sx:{mt:.15,fontSize:12.5,color:Oe,wordBreak:"break-word"},children:(t==null?void 0:t.email_masked)||(t==null?void 0:t.email)||"email не Ñказан"}),e.jsx(o,{direction:"row",spacing:.5,flexWrap:"wrap",useFlexGap:!0,sx:{mt:.7},children:[{ok:W,label:W?"Email подÑвеÑждÑн":"Email не подÑвеÑждÑн",icon:W?e.jsx(Nt,{size:13}):e.jsx(ea,{size:13})},{ok:A,label:A?"Telegram пÑивÑзан":"Telegram не пÑивÑзан",icon:A?e.jsx(Je,{size:13}):e.jsx(se,{size:13})},{ok:!0,label:"ÐаÑÐ¾Ð»Ñ ÑÑÑановлен",icon:e.jsx(Qe,{size:13})}].map(a=>e.jsxs(o,{direction:"row",spacing:.4,alignItems:"center",sx:{px:.8,py:.25,borderRadius:"999px",fontSize:11.5,fontWeight:700,color:a.ok?"#7BE8C8":"#FFC98B",bgcolor:a.ok?"rgba(14,158,131,.16)":"rgba(255,176,32,.16)",border:`1px solid ${a.ok?"rgba(123,232,200,.28)":"rgba(255,201,139,.3)"}`},children:[a.icon,e.jsx(c,{sx:{fontSize:11.5,fontWeight:700,lineHeight:1.2,color:"inherit"},children:a.label})]},a.label))})]})]}),e.jsxs(o,{direction:"row",spacing:1.5,alignItems:"center",sx:{flexShrink:0,px:1.35,py:.9,borderRadius:"14px",bgcolor:"rgba(255,255,255,.05)",border:`1px solid ${Ge}`},children:[e.jsxs(d,{minWidth:0,children:[e.jsx(c,{sx:{fontSize:10,fontWeight:700,color:Oe,letterSpacing:".07em"},children:(((qe=t==null?void 0:t.units)==null?void 0:qe.display_name)||"Rays").toUpperCase()}),e.jsx(c,{sx:{fontSize:22,fontWeight:800,lineHeight:1.15,letterSpacing:"-0.02em",fontVariantNumeric:"tabular-nums"},children:new Intl.NumberFormat("ru-RU").format(((He=t==null?void 0:t.units)==null?void 0:He.balance)??0)})]}),e.jsx(x,{onClick:()=>n("/rays"),endIcon:e.jsx(Vt,{size:16,stroke:2.2}),sx:{height:36,px:1.6,borderRadius:"11px",fontWeight:800,whiteSpace:"nowrap",color:"#fff",background:Ct,boxShadow:Wt,"&:hover":{background:Tt}},children:"ÐополниÑÑ"})]})]})}),e.jsxs(d,{sx:{minWidth:0,display:"grid",gridTemplateColumns:{xs:"1fr",lg:"minmax(0, 1.1fr) minmax(330px, 0.9fr)"},gap:1.25,alignItems:"start"},children:[e.jsxs(o,{spacing:1.25,minWidth:0,children:[e.jsx(d,{id:"profile-details",children:e.jsxs(U,{title:"ÐÑоÑилÑ",subtitle:"ÐмÑ, аваÑÐ°Ñ Ð¸ конÑакÑнÑй номеÑ",icon:e.jsx(Ft,{size:19}),children:[pe?e.jsx(f,{severity:"success",variant:"outlined",children:pe}):null,ge?e.jsx(f,{severity:"error",variant:"outlined",children:ge}):null,je?e.jsx(f,{severity:"success",variant:"outlined",children:je}):null,ye?e.jsx(f,{severity:"error",variant:"outlined",children:ye}):null,e.jsxs(o,{direction:{xs:"column",sm:"row"},spacing:1.25,alignItems:{xs:"flex-start",sm:"center"},children:[e.jsx(Ye,{src:(t==null?void 0:t.avatar_url)||void 0,sx:{width:64,height:64,bgcolor:"primary.main",fontSize:20,fontWeight:800},children:Xe(t)}),e.jsxs(o,{direction:"row",spacing:.9,alignItems:"center",flexWrap:"wrap",useFlexGap:!0,children:[e.jsx(x,{variant:"outlined",size:"small",startIcon:e.jsx(Zt,{size:16}),onClick:()=>{var a;return(a=T.current)==null?void 0:a.click()},disabled:Re,sx:{borderRadius:"12px",fontWeight:800,textTransform:"none"},children:"ÐагÑÑзиÑÑ"}),e.jsx(x,{variant:"text",size:"small",color:"error",startIcon:e.jsx(qt,{size:16}),onClick:ut,disabled:Re||!(t!=null&&t.avatar_url),sx:{borderRadius:"12px",fontWeight:800,textTransform:"none"},children:"УдалиÑÑ"}),e.jsx("input",{ref:T,hidden:!0,type:"file",accept:"image/jpeg,image/png,image/webp",onChange:ft})]})]}),e.jsx(d,{component:"form",onSubmit:pt,children:e.jsxs(o,{spacing:1.1,children:[e.jsx(S,{size:"small",label:"ÐмÑ",value:g,onChange:a=>le(a.target.value),onBlur:()=>lt(!0),fullWidth:!0,disabled:V,error:Pe&&!g.trim(),helperText:Pe&&!g.trim()?"ÐведиÑе имÑ.":" "}),e.jsx(S,{size:"small",label:"ТелеÑон",value:M,onChange:a=>ce(ne(a.target.value)),fullWidth:!0,disabled:V,placeholder:"+7 (999) 000-00-00",inputProps:{inputMode:"tel"},error:!Q,helperText:Q?"ФоÑмаÑ: +7 999 000-00-00":"ÐÑовеÑÑÑе Ð½Ð¾Ð¼ÐµÑ ÑелеÑона.",InputProps:{startAdornment:e.jsx(Ze,{position:"start",children:e.jsx(aa,{size:16})})}}),e.jsx(x,{type:"submit",variant:"contained",disabled:!dt,sx:{alignSelf:"flex-start",borderRadius:"12px",fontWeight:800,textTransform:"none"},children:V?"СоÑ
ÑанÑем...":"СоÑ
ÑаниÑÑ Ð¿ÑоÑилÑ"})]})})]})}),e.jsx(d,{id:"security",children:e.jsxs(U,{title:"ÐезопаÑноÑÑÑ",subtitle:"Email и паÑÐ¾Ð»Ñ Ð°ÐºÐºÐ°ÑнÑа",icon:e.jsx(ta,{size:19}),children:[e.jsxs(o,{spacing:1,children:[e.jsx(ie,{label:"Email",value:e.jsx(c,{sx:{fontSize:13,fontWeight:700,wordBreak:"break-word"},children:(t==null?void 0:t.email_masked)||(t==null?void 0:t.email)||"Ðе Ñказан"})}),e.jsx(ie,{label:"СÑаÑÑÑ email",value:e.jsx(it,{label:W?"ÐодÑвеÑждÑн":"ТÑебÑеÑÑÑ Ð´ÐµÐ¹ÑÑвие",tone:W?"success":"warning"})}),W?null:e.jsx(d,{sx:{mt:.5,p:1.5,borderRadius:"14px",border:`1px solid ${m(r.palette.warning.main,.35)}`,bgcolor:m(r.palette.warning.main,.06)},children:e.jsxs(o,{spacing:1.1,children:[e.jsx(c,{sx:{fontSize:13,lineHeight:"18px"},children:"ÐодÑвеÑдиÑе поÑÑÑ, ÑÑÐ¾Ð±Ñ Ð¼Ñ Ð¼Ð¾Ð³Ð»Ð¸ воÑÑÑановиÑÑ Ð´Ð¾ÑÑÑп, еÑли Ð²Ñ Ð·Ð°Ð±ÑдеÑе паÑолÑ."}),Le?e.jsx(f,{severity:"success",variant:"outlined",children:Le}):null,$e?e.jsx(f,{severity:"error",variant:"outlined",children:$e}):null,Be?e.jsxs(d,{component:"form",onSubmit:ht,children:[e.jsxs(o,{direction:{xs:"column",sm:"row"},spacing:1,children:[e.jsx(S,{size:"small",label:"Ðод из пиÑÑма",value:ee,onChange:a=>De(a.target.value),autoComplete:"one-time-code",inputProps:{inputMode:"numeric"},disabled:ae,fullWidth:!0}),e.jsx(x,{type:"submit",variant:"contained",disabled:!ee.trim()||ae,sx:{borderRadius:"12px",fontWeight:700,textTransform:"none",minWidth:140},children:ae?"ÐÑовеÑÑÑâ¦":"ÐодÑвеÑдиÑÑ"})]}),e.jsx(x,{onClick:Fe,disabled:te,size:"small",sx:{mt:.6,textTransform:"none",fontWeight:800},children:"ÐÑпÑавиÑÑ ÐºÐ¾Ð´ повÑоÑно"})]}):e.jsx(x,{onClick:Fe,variant:"contained",disabled:te,sx:{alignSelf:"flex-start",borderRadius:"12px",fontWeight:700,textTransform:"none"},children:te?"ÐÑпÑавлÑÑâ¦":"ÐÑпÑавиÑÑ ÐºÐ¾Ð´ на поÑÑÑ"})]})}),Ae?e.jsx(ie,{label:"ÐоÑледнее изменение паÑолÑ",value:e.jsx(c,{sx:{fontSize:13,fontWeight:700},children:Ae})}):null]}),e.jsx(Ht,{}),fe?e.jsx(f,{severity:"success",variant:"outlined",children:fe}):null,be?e.jsx(f,{severity:"error",variant:"outlined",children:be}):null,e.jsx(d,{component:"form",onSubmit:gt,children:e.jsxs(o,{spacing:1.1,children:[e.jsx(S,{size:"small",label:"ТекÑÑий паÑолÑ",type:R?"text":"password",value:k,onChange:a=>de(a.target.value),autoComplete:"current-password",fullWidth:!0,required:!0,disabled:E}),e.jsx(S,{size:"small",label:"ÐовÑй паÑолÑ",type:R?"text":"password",value:h,onChange:a=>me(a.target.value),autoComplete:"new-password",fullWidth:!0,required:!0,disabled:E,error:!!(h&&h.length<8),helperText:(h&&h.length<8,"ÐинимÑм 8 Ñимволов."),InputProps:{endAdornment:e.jsx(Ze,{position:"end",children:e.jsx(Ut,{size:"small",onClick:()=>ot(a=>!a),"aria-label":R?"СкÑÑÑÑ Ð¿Ð°ÑолÑ":"ÐоказаÑÑ Ð¿Ð°ÑолÑ",children:e.jsx(c,{variant:"caption",fontWeight:950,children:R?"СкÑÑÑÑ":"ÐоказаÑÑ"})})})}}),e.jsx(S,{size:"small",label:"ÐовÑоÑиÑе новÑй паÑолÑ",type:R?"text":"password",value:y,onChange:a=>xe(a.target.value),autoComplete:"new-password",fullWidth:!0,required:!0,disabled:E,error:!!(y&&h!==y),helperText:y&&h!==y?"ÐаÑоли не ÑовпадаÑÑ.":"ÐовÑоÑиÑе новÑй паÑолÑ."}),e.jsx(x,{type:"submit",variant:"contained",disabled:!mt,sx:{alignSelf:"flex-start",borderRadius:"12px",fontWeight:800,textTransform:"none"},children:E?"ÐенÑем паÑолÑ...":"ÐзмениÑÑ Ð¿Ð°ÑолÑ"})]})})]})})]}),e.jsxs(o,{spacing:1.25,minWidth:0,children:[e.jsxs(U,{title:"Telegram",subtitle:"Ð£Ð²ÐµÐ´Ð¾Ð¼Ð»ÐµÐ½Ð¸Ñ Ð¸ важнÑе ÑобÑÑÐ¸Ñ Ð°ÐºÐºÐ°ÑнÑа",icon:e.jsx(Je,{size:19}),children:[ve?e.jsx(f,{severity:"success",variant:"outlined",children:ve}):null,we?e.jsx(f,{severity:"error",variant:"outlined",children:we}):null,A?e.jsx(oe,{tone:"success",status:"ÐÑивÑзан",reason:t!=null&&t.telegram_username?`@${t.telegram_username}`:"Telegram подклÑÑÑн к аккаÑнÑÑ.",action:"ÐÐ¾Ñ ÑÐ¼Ð¾Ð¶ÐµÑ Ð¾ÑпÑавлÑÑÑ ÑÐ²ÐµÐ´Ð¾Ð¼Ð»ÐµÐ½Ð¸Ñ Ð¿Ð¾ ваÑÐµÐ¼Ñ Ð°ÐºÐºÐ°ÑнÑÑ."}):e.jsx(oe,{tone:"warning",status:"Ðе пÑивÑзан",reason:"Ð£Ð²ÐµÐ´Ð¾Ð¼Ð»ÐµÐ½Ð¸Ñ Ð² Telegram пока не подклÑÑенÑ.",action:"ÐодклÑÑиÑе Telegram â наÑиÑлим +20 Rays и бÑдем пÑиÑÑлаÑÑ Ð²Ð°Ð¶Ð½Ñе ÑообÑениÑ."}),e.jsxs(o,{direction:{xs:"column",sm:"row"},spacing:1,flexWrap:"wrap",useFlexGap:!0,children:[A?e.jsx(x,{variant:"outlined",color:"error",startIcon:e.jsx(Gt,{size:17}),onClick:wt,disabled:P,sx:{borderRadius:"12px",fontWeight:800,textTransform:"none"},children:P?"ÐÑвÑзÑваем...":"ÐÑвÑзаÑÑ"}):e.jsx(x,{variant:"contained",startIcon:e.jsx(se,{size:17}),onClick:bt,disabled:P,sx:{borderRadius:"12px",fontWeight:800,textTransform:"none"},children:P?"СоздаÑм ÑÑÑлкÑ...":"ÐÑивÑзаÑÑ Telegram"}),e.jsx(x,{variant:"outlined",startIcon:e.jsx(Qe,{size:17}),onClick:yt,disabled:P,sx:{borderRadius:"12px",fontWeight:800,textTransform:"none"},children:"ÐÑовеÑиÑÑ ÑÑаÑÑÑ"}),N?e.jsx(x,{type:"button",variant:"text",startIcon:e.jsx(Ot,{size:17}),onClick:jt,sx:{borderRadius:"12px",fontWeight:800,textTransform:"none"},children:"ÐÑкÑÑÑÑ Ð±Ð¾Ñа"}):null]}),e.jsx(d,{sx:{border:`1px solid ${m(r.palette.info.main,.18)}`,borderRadius:"14px",p:1.25,bgcolor:m(r.palette.info.main,.045)},children:e.jsxs(o,{direction:"row",spacing:1,alignItems:"flex-start",children:[e.jsx(Kt,{size:17,color:r.palette.info.main}),e.jsx(c,{sx:{fontSize:12.5,lineHeight:"17px",color:"text.secondary"},children:"ÐÑивÑзка вÑполнÑеÑÑÑ ÑеÑез оÑиÑиалÑнÑй Ð±Ð¾Ñ WBRay. ÐÑкÑойÑе ÑÑÑÐ»ÐºÑ Ð¸ нажмиÑе Start."})]})})]}),e.jsxs(U,{title:"РеÑеÑалÑÐ½Ð°Ñ Ð¿ÑивÑзка",subtitle:"ÐÑо пÑиглаÑил Ð²Ð°Ñ Ð² WBRay",icon:e.jsx(Xt,{size:19}),children:[We?e.jsx(f,{severity:"success",variant:"outlined",children:We}):null,Ce?e.jsx(f,{severity:"error",variant:"outlined",children:Ce}):null,ze&&!j?e.jsx(c,{sx:{fontSize:12.5,color:"text.secondary"},children:"ÐÑовеÑÑем пÑивÑзкÑâ¦"}):j!=null&&j.attribution.is_bound?e.jsx(oe,{tone:"success",status:"ÐÑивÑзан",reason:j.attribution.referrer_display||"РеÑеÑÐµÑ WBRay",action:"ÐÑивÑзка поÑÑоÑÐ½Ð½Ð°Ñ Ð¸ пÑименÑеÑÑÑ Ðº ÑледÑÑÑим подÑ
одÑÑим пополнениÑм."}):e.jsx(d,{component:"form",onSubmit:xt,children:e.jsxs(o,{spacing:1,children:[e.jsx(c,{sx:{fontSize:12.5,lineHeight:"17px",color:"text.secondary"},children:"ÐÑли Ð²Ð°Ñ Ð¿ÑиглаÑил полÑзоваÑÐµÐ»Ñ Ð¸Ð»Ð¸ паÑÑнÑÑ WBRay, введиÑе его код. ÐÑивÑзаÑÑ Ð´ÑÑгой код позже нелÑзÑ."}),e.jsxs(o,{direction:{xs:"column",sm:"row"},spacing:1,children:[e.jsx(S,{size:"small",label:"РеÑеÑалÑнÑй код",value:X,onChange:a=>{Ie(a.target.value),_(""),Y("")},inputProps:{maxLength:32,autoComplete:"off"},helperText:"РегиÑÑÑ Ñимволов ÑÑиÑÑваеÑÑÑ",disabled:J,fullWidth:!0}),e.jsx(x,{type:"submit",variant:"contained",startIcon:e.jsx(se,{size:16}),disabled:!X.trim()||J,sx:{minWidth:130,minHeight:40,borderRadius:"12px",fontWeight:800,textTransform:"none"},children:J?"ÐÑивÑзÑваемâ¦":"ÐÑивÑзаÑÑ"})]})]})}),!j&&!ze?e.jsx(x,{onClick:Z,size:"small",sx:{alignSelf:"flex-start",textTransform:"none",fontWeight:800},children:"ÐÑовеÑиÑÑ ÐµÑÑ Ñаз"}):null]})]})]})]})}),e.jsx($t,{open:i,onClose:()=>p(!1)})]})};export{Oa as default};
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.