1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2473],{2304:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/auth",function(){return t(64942)}])},77061:function(e,n,t){"use strict";var r=t(85893),a=t(67294),s=t(61903),o=t(90389);let i=(0,a.forwardRef)((e,n)=>{let{onChange:t,...a}=e;return(0,r.jsx)(o.oc,{...a,inputRef:n,onAccept:e=>t({target:{value:e}})})});i.displayName="MaskedInput";let l=e=>{let{imask:n,InputProps:t,...a}=e;return(0,r.jsx)(s.Z,{...a,InputProps:{inputComponent:i,...t},inputProps:n})};l.displayName="MaskedTextField",n.Z=l},13233:function(e,n,t){"use strict";var r=t(82729),a=t(68806),s=t(37887);function o(){let e=(0,r._)(["\n query {\n me {\n id\n email\n name\n roles\n login\n tableSettings\n chartsSettings\n passwordIsSet\n account {\n id\n name\n paidBefore\n tariff {\n id\n name\n description\n oneMonthPrice\n threeMonthPrice\n sixMonthPrice\n yearPrice\n usersQuantity\n wbAccountsQuantity\n ordersQuantity\n advantages\n errors\n }\n }\n accounts {\n id\n name\n }\n }\n }\n"]);return o=function(){return e},e}let i=(0,a.Ps)(o());n.Z=()=>{let{loading:e,error:n,data:t,refetch:r}=(0,s.a)(i),a=(null==t?void 0:t.me)||void 0;return{loading:e,error:n,user:a,reFetch:r}}},64942:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return M}});var r=t(85893),a=t(67294),s=t(65582),o=t(51233),i=t(15861),l=t(11163),c=t.n(l),u=t(82729),d=t(68806),g=t(50319),h=t(87357),p=t(88409),m=t(40044),x=t(18360),f=t(18972),v=t(61903),j=t(69417),S=t(93666),Z=t(77061);function k(){let e=(0,u._)(["\nmutation RegisterMutation($login: String!, $promocode: String, $utmsource: String) {\n register(login: $login, promocode: $promocode, utmsource: $utmsource)\n}\n"]);return k=function(){return e},e}function b(){let e=(0,u._)(["\n mutation AuthMutation($login: String!, $code: String, $pswd: String) {\n auth(login: $login, code: $code, pswd: $pswd) {\n accessToken,\n updateToken\n }\n }\n"]);return b=function(){return e},e}let w=(0,d.Ps)(k()),y=(0,d.Ps)(b()),_="";var C=()=>{let[e,n]=(0,a.useState)("+7"),[t,s]=(0,a.useState)("(000) 000-00-00"),[i,l]=(0,a.useState)(""),[u,{error:d,loading:k,data:b}]=(0,g.D)(w),[C,T]=(0,a.useState)("phone"),[$,I]=(0,a.useState)(0),[P,E]=(0,a.useState)(""),[M,{error:N,data:D}]=(0,g.D)(y),[F,R]=(0,a.useState)(0),[W,A]=(0,a.useState)("");if((0,a.useEffect)(()=>{if(!b)return;T("code");let e=b.register,n=()=>{e<0||D||I(--e)};n();let t=setInterval(n,1e3);return()=>clearInterval(t)},[b,D]),D)return localStorage.setItem("tokensCreatedAt",new Date().getTime().toString()),localStorage.setItem("atoken",D.auth.accessToken),localStorage.setItem("utoken",D.auth.updateToken),(0,S.XV)(),localStorage.removeItem("promocode"),c().push("/tables"),(0,r.jsx)("span",{children:"ÐÑполнÑÑ Ð²Ñ
од"});let z=e=>{n(e),"+7"===e&&s("(000) 000-00-00")},B=()=>{if((_=e+i.replace(/[^0-9]/g,"")).length<10)return;let n=localStorage.getItem("promocode"),t=(0,S.ej)("utmsource")||localStorage.getItem("utmsource");u({variables:{login:_,promocode:n,utmsource:t}}).catch(e=>console.error(e.message)).then(()=>{ym(95208014,"reachGoal","reg")})},O=e=>{E(e);let n=e.replace(/[^0-9]/g,"");6===n.length&&M({variables:{login:_,code:n}}).catch(e=>console.error(e.message))},Q=()=>{(_=e+i.replace(/[^0-9]/g,"")).length<10||M({variables:{login:_,pswd:W}}).catch(e=>console.error(e.message))},X=i.includes("_")||k||!i.length||1===F&&W.length<6;return(0,r.jsxs)(h.Z,{children:["phone"===C&&(0,r.jsxs)(o.Z,{spacing:3,children:[(0,r.jsxs)(p.Z,{value:F,onChange:(e,n)=>R(n),children:[(0,r.jsx)(m.Z,{label:"Ðо SMS"}),(0,r.jsx)(m.Z,{label:"ÐойÑи Ñ Ð¿Ð°Ñолем"})]}),(0,r.jsxs)(o.Z,{direction:"row",spacing:1,children:[(0,r.jsx)(x.Z,{value:e,onChange:e=>z(e.target.value),children:(0,r.jsx)(f.Z,{value:"+7",children:"+7"})}),(0,r.jsx)(Z.Z,{fullWidth:!0,label:"ÐÐ¾Ð¼ÐµÑ ÑелеÑона",value:i,autoFocus:!0,imask:{mask:t,lazy:!0},onChange:e=>l(e.target.value),error:!!d,helperText:null==d?void 0:d.message,onKeyDown:e=>{X||13!==e.keyCode||B()}})]}),1===F&&(0,r.jsx)(v.Z,{label:"ÐаÑолÑ",value:W,type:"password",onChange:e=>A(e.target.value),error:!!N,helperText:null==N?void 0:N.message,onKeyDown:e=>{X||13!==e.keyCode||Q()}}),1===F&&(0,r.jsx)(j.Z,{variant:"contained",disabled:X,onClick:Q,children:"ÐойÑи"}),0===F&&(0,r.jsx)(j.Z,{variant:"contained",disabled:X,onClick:B,children:"ÐолÑÑиÑÑ ÐºÐ¾Ð´"})]}),"code"===C&&(0,r.jsxs)(o.Z,{spacing:3,children:[(0,r.jsx)(o.Z,{direction:"row",spacing:1,children:(0,r.jsx)(Z.Z,{fullWidth:!0,label:"ÐведиÑе код",value:P,autoF
1ocus:!0,imask:{mask:"000-000",lazy:!1},onChange:e=>O(e.target.value),error:N&&!P.includes("_"),helperText:null==N?void 0:N.message})}),(0,r.jsxs)(j.Z,{variant:"contained",disabled:$>0,onClick:B,children:["ÐапÑоÑиÑÑ ÐºÐ¾Ð´ повÑоÑно",$>0?"ÑеÑез ".concat($," ÑекÑнд"):""]})]})]})},T=t(2664),$=t(27257),I=t(13233);let P={header:{ru:"ÐойÑи или заÑегиÑÑÑиÑоваÑÑÑÑ",en:"Login or register"},description:{ru:"Ð¡Ð°Ð¼Ð°Ñ Ð¿Ð¾Ð´ÑÐ¾Ð±Ð½Ð°Ñ ÑаблиÑа Ð´Ð»Ñ Ð°Ð½Ð°Ð»Ð¸Ð·Ð° пÑодаж Wildberries",en:"The most detailed table for Wildberries sales analysis"}},E=()=>{let{locale:e}=(0,a.useContext)($.R),n=(0,$.i)(e,P),{loading:t,user:l}=(0,I.Z)();return t?(0,r.jsx)(r.Fragment,{}):l?(c().push("/tables"),(0,r.jsx)(r.Fragment,{})):(0,r.jsx)(s.Z,{maxWidth:"sm",sx:{mt:5},children:(0,r.jsxs)(o.Z,{spacing:3,children:[(0,r.jsxs)(o.Z,{spacing:0,children:[(0,r.jsx)(i.Z,{variant:"h4",gutterBottom:!0,children:n("header")}),(0,r.jsx)(i.Z,{children:n("description")})]}),(0,r.jsx)(C,{})]})})};E.Layout=T.Z,E.authorize="EVERYBODY";var M=E}},function(e){e.O(0,[1962,8584,6395,389,7681,9774,2888,179],function(){return e(e.s=2304)}),_N_E=e.O()}]);
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.