1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[63],{19927:(e,r,n)=>{"use strict";n.r(r),n.d(r,{__N_SSP:()=>I,default:()=>H});var a,t,l=n(89142),i=n(29200);n(65878);var o=n(41629),s=n(6779),d=n(38206),c=n(24924),_=n(94070),u=n(75875),m=n(82208),h=n(31682),f=n.n(h);let p=()=>{let e,r=(0,u.Pj)(),{user:n}=(0,u.Pj)(),[a,t]=(0,_.useState)(0),[i,o]=(0,_.useState)(!1),[h,p]=(0,_.useState)(""),{formState:{errors:b},getFieldState:x,getValues:P,register:g,trigger:j}=(0,m.mN)({defaultValues:{name:n?.name??"",email:n?.email??"",phone_number:n?.phone_number&&(e=(n?.phone_number).match(/^(\+7)(\d{3})(\d{3})(\d{2})(\d{2})$/))?"+7 ("+e[2]+") "+e[3]+" - "+e[4]+" - "+e[5]:""}}),v=P(),N={name:g("name",{pattern:/.{1,32}/,required:!0}),email:g("email",{pattern:/^[a-zA-Z0-9][\-_\.\+\!\#\$\%\&\'\*\/\=\?\^\`\{\|]{0,1}([a-zA-Z0-9][\-_\.\+\!\#\$\%\&\'\*\/\=\?\^\`\{\|]{0,1})*[a-zA-Z0-9]@[a-zA-Z0-9][-\.]{0,1}([a-zA-Z][-\.]{0,1})*[a-zA-Z0-9]\.[a-zA-Z0-9]{1,}([\.\-]{0,1}[a-zA-Z]){0,}[a-zA-Z0-9]{0,}$/i}),phone_number:g("phone_number",{pattern:/^\+7\s\(\d\d\d\)\s\d\d\d\s-\s\d\d\s-\s\d\d$/g,required:!0})},w=(0,_.useRef)({email:null,name:null,phone_number:null}),E=async()=>new Promise(async e=>{await j(),e(0==[...Object.keys(w.current).map(e=>x(e).invalid?w.current[e]:null).filter(e=>null!==e)].length)}),k=async()=>{p("");let e=P();if(await E())try{let n;await (n={name:e.name,email:e.email,phone_number:e.phone_number.replace(/[^0-9+]/g,"")},s.LV.post(d.F.UPDATE_PROFILE,n)),t(+new Date),r.fetchUser()}catch(e){p("ÐÑибка пÑи запиÑи"),t(+new Date)}};return(0,l.jsxs)("div",{className:f().editForm,children:[(0,l.jsx)("div",{className:f().inputHolder,children:(0,l.jsx)(c.IH,{...N.name,ref:e=>{w.current.name=e,N.name.ref(e)},dataSaved:a,defaultValue:v.name,editable:!0,editingNow:i,error:!!h.length||void 0!==b.name,errorMessage:h.length?h:"ÐекоÑÑекÑное имÑ",label:"ÐаÑе имÑ",setEditingNow:o,submitData:k})}),(0,l.jsx)("div",{className:f().inputHolder,children:(0,l.jsx)(c.IH,{...N.phone_number,ref:e=>{w.current.phone_number=e,N.phone_number.ref(e)},dataSaved:a,defaultValue:v.phone_number,editable:!1,editingNow:i,error:!!h.length||void 0!==b.phone_number,errorMessage:h.length?h:"ÐекоÑÑекÑнÑй ÑелеÑон",label:"ТелеÑон",setEditingNow:o,submitData:k})}),(0,l.jsx)("div",{className:f().inputHolder,children:(0,l.jsx)(c.IH,{...N.email,ref:e=>{w.current.email=e,N.email.ref(e)},dataSaved:a,defaultValue:v.email,editable:!0,editingNow:i,error:!!h.length||void 0!==b.email,errorMessage:h.length?h:"ÐекоÑÑекÑнÑй адÑеÑ",label:"E-mail",setEditingNow:o,submitData:k})})]})};p.displayName="ProfileEdit";var b=n(53196),x=n.n(b),P=n(85266),g=n(46514),j=n.n(g);function v(){return(v=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(null,arguments)}let N=function(e){return _.createElement("svg",v({viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),a||(a=_.createElement("path",{d:"M12.004.508A11.996 11.996 0 1 0 24 12.504 12.011 12.011 0 0 0 12.004.508Zm0 21.581a9.585 9.585 0 1 1 9.585-9.585 9.6 9.6 0 0 1-9.585 9.585Z"})),t||(t=_.createElement("path",{d:"M12.822 7.19a1.16 1.16 0 0 0-1.63 0L6.69 11.655a1.16 1.16 0 0 0 0 1.63l4.503 4.503a1.139 1.139 0 0 0 .81.334c.307 0 .6-.12.82-.334l4.465-4.503a1.161 1.161 0 0 0 0-1.63L12.822 7.19Zm2.047 5.314-2.865 2.865-2.865-2.865 2.865-2.865 2.865 2.865Z"})))},w=()=>{let{user:e}=(0,u.Pj)();return(0,l.jsxs)("div",{className:j().mainBlock,children:[(0,l.jsxs)("div",{className:j().leftPart,children:[(0,l.jsx)("span",{className:j().blockHeader,children:"ÐÐ°Ð»Ð°Ð½Ñ Ð±Ð°Ð»Ð»Ð¾Ð²"}),(0,l.jsxs)("div",{className:j().bonusesData,children:[e?.bonus_count??0,(0,l.jsx)(N,{})]}),e?.bonus_expiration_date&&e?.bonus_count&&e?.bonus_count!==null&&e?.bonus_count>0?(0,l.jsxs)("div",{className:j().expirationData,children:[(0,l.jsx)("span",{children:"ÐейÑÑвÑÐµÑ Ð´Ð¾: "}),(0,l.jsx)("span",{children:(0,P.A)(new Date(e?.bonus_expiration_date),"dd.MM.yyyy")})]}):null]}),(0,l.jsxs)("div",{className:j().rightPart,children:[(0,l.jsxs)(c.o5,{color:"brown",weight:"normal",children:["ÐолÑÑиÑе кÑÑбек 5% на каждÑй заказ"," "]}),(0,l.jsx)(c.o5,{color:"brown",weight:"normal",children:"и оплаÑиÑе ими до 20% ÑледÑÑÑего заказа"}),(0,l.jsxs)("div",{className:j().buttonHolder,children:[(0,l.jsx)(c.$n,{
1className:j().toMenuButton,href:i.R.HOME,children:"ÐеÑейÑи в менÑ"}),(0,l.jsx)(x(),{className:j().toInfoLink,href:"/info/bonuses",children:"ÐодÑобнÑе ÑÑловиÑ"})]})]})]})};w.displayName="ProfileIntro";var E=n(74912),k=n.n(E);let y=(0,o.PA)(({recommendedProducts:e})=>{let r="ÐиÑнÑй кабинеÑ";return(0,l.jsxs)(c.PE,{classes:{main:k().body},description:r,recommendedProducts:e,title:r,children:[(0,l.jsx)("div",{className:"container",children:(0,l.jsx)("h1",{className:k().title,children:"ÐиÑнÑй кабинеÑ"})}),(0,l.jsx)("div",{className:"container",children:(0,l.jsxs)("div",{className:k().profileBody,children:[(0,l.jsx)("div",{className:k().profileLeftBlock,children:(0,l.jsx)(p,{})}),(0,l.jsx)("div",{className:k().profileRightBlock,children:(0,l.jsx)(w,{})})]})})]})});i.R.HOME;let H=y;var I=!0},31682:e=>{e.exports={editForm:"ProfileEdit_editForm__kUWDl",inputHolder:"ProfileEdit_inputHolder__h_mzX",changeControl:"ProfileEdit_changeControl__A_UWJ",error:"ProfileEdit_error__cYA2D"}},46514:e=>{e.exports={mainBlock:"ProfileIntro_mainBlock__QRMr7",leftPart:"ProfileIntro_leftPart__muKCS",rightPart:"ProfileIntro_rightPart__pp2yr",blockHeader:"ProfileIntro_blockHeader__CGhFp",bonusesData:"ProfileIntro_bonusesData__cXPhv",expirationData:"ProfileIntro_expirationData__F9SHx",buttonHolder:"ProfileIntro_buttonHolder__awOT_",toMenuButton:"ProfileIntro_toMenuButton__h8hsH",toInfoLink:"ProfileIntro_toInfoLink__AtGGg"}},65142:(e,r,n)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/profile",function(){return n(19927)}])},74912:e=>{e.exports={body:"Profile_body__JOdW3",profileBody:"Profile_profileBody__dy91K",profileLeftBlock:"Profile_profileLeftBlock__YQISf",profileRightBlock:"Profile_profileRightBlock__ZbCZm",title:"Profile_title__zL8Te"}}},e=>{e.O(0,[799,208,445,636,593,792],()=>e(e.s=65142)),_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.