PageSourceSearch

https://selfpub.ru/_next/static/chunks/pages/account/profile-1d86022f693acbd1.js

js selfpub.ru collected 2026-10-03 23:27:40 UTC 57,052 bytes, 2 lines download raw bytes

1try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="d828823b-2016-4b01-a61f-56d3112d368b",e._sentryDebugIdIdentifier="sentry-dbid-d828823b-2016-4b01-a61f-56d3112d368b")}catch(e){}try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="d828823b-2016-4b01-a61f-56d3112d368b",e._sentryDebugIdIdentifier="sentry-dbid-d828823b-2016-4b01-a61f-56d3112d368b")}catch(e){}(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2771],{32385:function(e,t,n){"use strict";n.d(t,{k:function(){return u}});var r=n(59499),a=n(94184),i=n.n(a),o=n(67294),s=n(46445),l=n.n(s),c=n(69334),d=n(85893),u=function(e){var t,n,a=e.view,s=e.titleTooltip,u=e.infoTooltip,p=e.tooltipColor,f=e.className,m=e.size,_=e.dataTestId,h=(0,o.useState)(!1),x=h[0],b=h[1],v=(0,o.useState)(!1),g=v[0],T=v[1],j=(0,d.jsx)("span",{children:u});return(0,d.jsx)("div",{className:i()("g-col-12",f),children:(0,d.jsx)(c.u,{content:j,title:s,background:p,size:m,children:(0,d.jsx)("span",{onMouseEnter:function(){return b(!0)},onMouseLeave:function(){return b(!1)},onMouseDown:function(){return T(!0)},onMouseUp:function(){return T(!1)},"data-testid":null!=_?_:"element-hover",children:"accent"===(void 0===a?"accent":a)?(0,d.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 18 18",width:"16",height:"16",className:l().svgIcon,children:(0,d.jsx)("path",{fill:"#FF4C00",fillRule:"evenodd",d:"M1 9c0-4.416 3.584-8 8-8s8 3.584 8 8-3.584 8-8 8-8-3.584-8-8Zm10.456-.6-.72.736c-.4.408-.688.776-.832 1.352a3.67 3.67 0 0 0-.104.912H8.2V11a3.198 3.198 0 0 1 .936-2.264l.992-1.008c.368-.352.544-.88.44-1.44a1.593 1.593 0 0 0-1.112-1.224A1.613 1.613 0 0 0 7.48 6.08c-.096.296-.344.52-.656.52h-.24a.693.693 0 0 1-.656-.896A3.206 3.206 0 0 1 8.512 3.44c1.216-.192 2.376.44 3.096 1.44.944 1.304.664 2.704-.152 3.52ZM9.8 13v1.6H8.2V13h1.6Z",clipRule:"evenodd",className:i()((t={},(0,r.Z)(t,l().accent,x),(0,r.Z)(t,l().isClickedAccent,g),t))})}):(0,d.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 18 18",width:"16",height:"16",className:l().svgIcon,children:(0,d.jsx)("path",{fill:"#9D9C9F",fillRule:"evenodd",d:"M1 9c0-4.416 3.584-8 8-8s8 3.584 8 8-3.584 8-8 8-8-3.584-8-8Zm1.6 0c0 3.528 2.872 6.4 6.4 6.4 3.528 0 6.4-2.872 6.4-6.4 0-3.528-2.872-6.4-6.4-6.4A6.408 6.408 0 0 0 2.6 9Zm7.2 3.2v1.6H8.2v-1.6h1.6ZM5.944 6.464a3.202 3.202 0 0 1 3.544-2.232c1.392.208 2.488 1.384 2.68 2.776.183 1.29-.531 1.914-1.22 2.515-.127.
111-.253.22-.372.333a2.811 2.811 0 0 0-.264.272l-.012.016-.012.016c-.08.096-.16.2-.224.312-.008.012-.014.024-.02.036a1.7 1.7 0 0 0-.244.892H8.2c0-.4.064-.728.16-1 .004-.01.005-.02.007-.028.003-.01.005-.019.009-.028a.16.16 0 0 1 .016-.032.16.16 0 0 0 .016-.032 2.665 2.665 0 0 1 .224-.44c0-.004.002-.006.004-.008s.004-.004.004-.008c.272-.41.638-.691.98-.954.49-.378.933-.718.98-1.35.064-.776-.496-1.52-1.256-1.68a1.602 1.602 0 0 0-1.84 1.024c-.112.304-.376.536-.704.536h-.16a.725.725 0 0 1-.696-.936Z",clipRule:"evenodd",className:i()((n={},(0,r.Z)(n,l().default,x),(0,r.Z)(n,l().isClickedDefault,g),n))})})})})})}},66709:function(e,t,n){"use strict";n.d(t,{E:function(){return m}});var r=n(59499),a=n(94184),i=n.n(a),o=n(32385),s=n(61092),l=n.n(s),c=n(89637),d=n(85893);function u(e){var t,n,a=e.labelText,s=e.name,u=e.onChange,p=e.checked,f=e.value,m=e.className,_=e.sizeTooltip,h=e.titleTooltip,x=e.tooltipInfo,b=e.viewInfo,v=e.content,g=e.innerContent,T=e.isNotBlock,j=e.isLocked,w=e.isFlex,y=e.mode,k=e.isWrapper,I=e.dataTestId,N="radio_".concat(void 0===s?0:s);return(0,d.jsxs)("label",{htmlFor:N,className:i()(l().label,m,(t={},(0,r.Z)(t,l().notActive,!p),(0,r.Z)(t,l().isNotBlock,T),(0,r.Z)(t,l().group,"group"===y),(0,r.Z)(t,l().wrapper,k),(0,r.Z)(t,l().disableWrapper,k&&j),(0,r.Z)(t,l().activeWrapper,k&&p),(0,r.Z)(t,l().disableActiveWrapper,k&&p&&j),t)),children:[(0,d.jsxs)("div",{className:i()(l().itemRadio,(0,r.Z)({},l().itemRadioBlock,!(void 0===w||w))),"data-testid":I||N,children:[(0,d.jsx)("input",{className:i()("visually-hidden",l().input,(0,r.Z)({},l().activeDisableInput,j&&p)),type:"radio",id:N,onChange:function(){u(f)},checked:p,disabled:j}),(0,d.jsxs)("div",{className:i()(l().textWrapper,(n={},(0,r.Z)(n,l().disableInput,j),(0,r.Z)(n,l().isWrapper,k),n)),children:[k?(0,d.jsx)(c.mj,{className:i()((0,r.Z)({},l().disableText,j)),children:a}):a,g&&(0,d.jsx)(c.OE,{className:i()(l().innerContent,(0,r.Z)({},l().disableText,j)),children:g})]}),p&&v&&(0,d.jsx)("div",{className:l().content,children:v})]}),x&&(0,d.jsx)(o.k,{className:l().infoTooltip,titleTooltip:h,infoTooltip:x,view:b,size:_,dataTestId:"".concat(I||N,"__info")})]})}var p=n(23460),f=n.n(p);function m(e){var t=e.items,n=e.onChange,a=e.className,o=e.groupClassName,s=e.isNotBlock,l=e.value,c=e.isLocked,p=e.isFlexGroup,m=e.mode,_=e.isWrapper,h=t.map(function(e){var t=e.value,r=e.label,i=e.sizeTooltip,o=e.titleTooltip,p=e.tooltipInfo,f=e.viewInfo,h=e.content,x=e.innerContent,b=e.disabled,v=e.isFlex,g=e.dataTestId;return(0,d.jsx)(u,{name:t,labelText:r,checked:t===l,onChange:n,value:t,className:a,titleTooltip:o,tooltipInfo:p,viewInfo:f,innerContent:x,sizeTooltip:i,content:h,isNotBlock:s,isLocked:c||b,isFlex:v,mode:m,isWrapper:_,dataTestId:g},t)});return(0,d.jsx)("div",{className:i()(o,(0,r.Z)({},f().flex,p)),children:h})}},69334:function(e,t,n){"use strict";n.d(t,{u:function(){return m}});var r,a=n(59499),i=n(68067),o=n(50184),s={small:95,middle:210,full:248},l=((r={}).small="small",r.middle="middle",r.full="full",r),c=n(17490),d=n.n(c),u=n(85893);function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach(function(t){(0,a.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var m=function(e){var t=e.content,n=e.title,r=e.direction,a=e.children,c=e.background,p=void 0===c?"dark":c,m=e.size,_=void 0===m?l.full:m,h=e.textLink,x=e.dataTestId,b=e.borderRadius,v=e.moveTooltipLeft,g=e.moveTooltipRight,T=e.moveArrowLeft,j=e.moveArrowRight,w=e.zIndex,y=(0,u.jsxs)("span",{children:[n&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("div",{className:d().title,children:n}),(0,u.jsx)("br",{})]}),h?(0,u.jsx)(o.a,{className:d().link,href:h,target:"_blank",dataTestId:"tooltip__link",children:t}):t]});return(0,u.jsx)(i.Z,{title:y,placement:void 0===r?"top":r,arrow:!0,enterTouchDelay:0,leaveTouchDelay:5e4,PopperProps:{modifiers:[{name:"flip",enabled:!0,options:{boundary:"viewport",fallbackPlacements:["bottom","top"]}},{name:"preventOverflow",enabled:!0,options:{boundary:"viewport",rootBoundary:"viewport",padding:12,tether:!0}}],style:{zIndex:w}},slotProps:{tooltip:{"data-testid":void 0===x?"tooltip":x,sx:f(f(f({bgcolor:"dark"===p?"var(--palettes-gray-190)":"var(--text-secondary)",color:"dark"===p?"var(--text-secondary)":"var(--palettes-gray-190)",minWidth:"41px",maxWidth:{xs:"calc(100vw - 24px)",sm:s[_]},boxSizing:"border-box",overflowWrap:"anywhere",wordBreak:"break-word",minHeight:"34px",padding:"8px",fontSize:"14px",fontWeight:400,lineHeight:"18px",letterSpacing:"0.25px",marginBottom:"7px !important"},void 0!==b&&{borderRadius:"".concat(b,"px")}),void 0!==v&&{ml:"".concat(v,"px")}),void 0!==g&&{mr:"".concat(g,"px")})},arrow:{sx:f(f({color:"dark"===p?"var(--palettes-gray-190)":"var(--text-secondary)"},void 0!==T&&{ml:"".concat(T,"px")}),void 0!==j&&{mr:"".concat(j,"px")})}},children:(0,u.jsx)("span",{children:a})})}},68715:function(e,t,n){"use strict";n.d(t,{q:function(){return u}});var r=n(59499),a=n(94184),i=n.n(a),o=n(89637),s=n(91972),l=n(49924),c=n.n(l),d=n(85893),u=function(e){var t,n=e.type,a=e.text,l=e.dataTestId,u=e.className,p=e.textClassName;return(0,d.jsx)("div",{className:i()(c().wrapper,u,(t={},(0,r.Z)(t,c().active,n===s.K.active),(0,r.Z)(t,c().inActive,n===s.K.inActive),(0,r.Z)(t,c().accent,n===s.K.accent),(0,r.Z)(t,c().intense,n===s.K.intense),(0,r.Z)(t,c().success,n===s.K.success),t)),"data-testid":l,children:(0,d.jsx)(o.OE,{className:i()(c().text,p),children:a})})}},91972:function(e,t,n){"use strict";n.d(t,{K:function(){return a}});var r,a=((r={}).active="active",r.inActive="inActive",r.accent="accent",r.intense="intense",r.success="success",r)},58142:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSP:function(){return eH},default:function(){return eq}});var r,a,i,o,s,l,c,d=n(59499),u=n(94184),p=n.n(u),f=n(42119),m=n(50029),_=n(64687),h=n.n(_),x={image:{mime:["image/jpeg","image/png"],illustration:"variantsImage"}},b=n(67294),v=n(32512),g=n(35407),T=n(89637),j=n(83204),w=n.n(j),y=n(85893);function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function I(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?k(Object(n),!0).forEach(function(t){(0,d.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var N=function(e){var t,n=e.className,r=e.type,a=e.title,i=e.caption,o=e.illustrationUrl,s=e.onChange,l=e.debouncedValidate,c=e.isMulti,u=e.dataTestId,f=e.isDisable,_=(0,b.useCallback)((t=(0,m.Z)(h().mark(function e(t){return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!c){e.next=5;break}return e.next=3,s(t);case 3:e.next=7;break;case 5:return e.next=7,s(t[0]);case 7:l&&l();case 8:case"end":return e.stop()}},e)})),function(e){return t.apply(this,arguments)}),[s,l]),j=(0,v.uI)({multiple:c,onDrop:_,accept:x[r].mime}),k=j.getRootProps,N=j.isDragActive,C=j.getInputProps;return(0,y.jsx)("div",{className:w().wrapper,"data-testid":u,children:(0,y.jsxs)("div",I(I({},k()),{},{className:p()(w().uploader,n,(0,d.Z)({},w().isActive,N)),children:[(0,y.jsx)("input",I(I({},C()),{},{disabled:f,"data-testid":"".concat(u,"--input")})),a&&(0,y.jsx)(T.pf,{children:a}),i&&(0,y.jsx)(T.OE,{className:w().caption,children:i}),o&&(0,y.jsx)("div",{className:w().imgPreviewWrapper,children:(0,y.jsx)("img",{src:o,alt:"Пример изображения для загрузки","data-testid":"profile_loadImage",width:200})}),(0,y.jsx)(g.z,{className:w().button,size:"medium",dataTestId:"profile_button-chooseFile",disabled:f,children:"Выбрать файл"})]}))})},C=n(4486),P=n(40901),S=n.n(P),D=function(e){var t=e.src,n=e.alt,r=e.onRemove,a=e.isHideCloseButton,i=e.dataTestId;return t?(0,y.jsxs)("div",{className:S().uploadImageWrapper,children:[!a&&(0,y.jsx)("div",{onClick:r,"aria-label":"Удалить изображение",className:S().imgIconWrapper,role:"button",tabIndex:0,"data-testid":"uploadedImagePreview__remove--button",children:(0,y.jsx)(C.J,{className:S().imgIcon,icon:"closeOutline24x24",color:"var(--text-secondary)",isWrapperNeeded:!0,width:16,height:16})}),(0,y.jsx)("img",{className:S().uploadImage,src:t,alt:n,"data-testid":i})]}):null},E=n(14416),R=n(16310),W=n(38739),Z=n(2079),O=n(97708),A=n(62754),U=n(87025),V=n(60312),M=n(63690),B=n(42880),F=n(9953),L=n(98767),H=n(15789),q=n(18918),z=n(52444),K=n(97208),G=n.n(K),J=function(e){var t=e.moderation_comment,n=e.dataTestId,r=e.className;return(0,y.jsxs)("div",{className:p()(["g-col-12",G().moderationComment,r]),"data-testid":n,children:[(0,y.jsxs)("div",{className:G().moderationCommentTitleWrapper,children:[(0,y.jsx)(C.J,{className:G().moderationCommentIcon,icon:"errorOutline24x24",color:"var(--palettes-orange-100)",width:24,height:24}),(0,y.jsx)(T.mj,{children:"Комментарий модератора"})]}),(0,y.jsx)(T.OE,{className:G().moderationCommentText,children:t&&(0,y.jsx)(T.T,{children:t})})]})},Y=((r=Y||{}).basic="basic",r.pending_advanced="pending_advanced",r.advanced="advanced",r),X=((a=X||{}).unverified="UNVERIFIED",a.verified="VERIFIED",a.rejected="REJECTED",a),Q=((i=Q||{}).none="undefined",i.disabled="DISABLED",i.offer="OFFER",i.active="ACTIVE",i.pending="PENDING",i),$=((o={}).natural="natural_person",o.selfEmployed="self_employed",o.individualEntrepreneur="individual_entrepreneur",o.nonResident="non_resident",o),ee=n(50184),et=n(66709),en=n(69334),er="ИНН",ea=n(89481),ei=n.n(ea),eo=function(e){var t=e.className,n=e.taxes,r=e.chosenTax,a=e.onChangeTax,i=e.inn,o=e.onChangeInn,s=e.snils,l=e.onChangeSnils,c=e.innError,d=e.snilsError;return(0,y.jsxs)("div",{className:t,children:[(0,y.jsxs)("div",{className:ei().title,children:[(0,y.jsx)(T.mj,{dataTestId:"taxStatus__title",children:"Налоговый статус"}),(0,y.jsx)(en.u,{content:"Как вы планируете выводить полученное вознаграждение: на личную карту физического лица, на расчетный счет или карту ИП, или как самозанятый",borderRadius:8,children:(0,y.jsx)(C.J,{icon:"infoOutline24x24",color:"var(--palettes-gray-120)",dataTestId:"taxStatus__tooltip--icon"})})]}),(0,y.jsx)("div",{className:ei().radioGroupWrapper,children:(0,y.jsx)(et.E,{items:n,value:r,onChange:function(e){return a(e)}})}),(0,y.jsxs)("div",{className:ei().inputsWrapper,children:[(0,y.jsxs)("div",{children:[(0,y.jsx)(A.o,{labelText:er,value:i,onChange:function(e){return o(e)},errorMessage:c.length?c:"",dataTestId:"taxStatus__inn--input"}),(0,y.jsxs)(T.Yd,{className:ei().inputCaption,children:["Узнать свой"," ",(0,y.jsx)(ee.a,{href:"https://service.nalog.ru/inn.do",target:"_blank",dataTestId:"taxStatus__inn--link",children:er})]})]}),r===$.natural&&(0,y.jsx)(A.o,{labelText:"СНИЛС",value:s,onChange:function(e){return l(e)},errorMessage:d.length?d:"",dataTestId:"taxStatus__snils--input"})]})]})},es=n(34574),el={moderation:"Ваш профиль в процессе проверки. Мы сообщим вам, как только проверка будет завершена",serverError:"Попробуйте повторить отправку позже",under18:"Обратите внимание: вы можете подтвердить профиль на платформе Литрес Авторы только по достижении совершеннолетия. До 18 лет вы можете публиковать произведения бесплатно"}
1,ec=[es._.submitted,es._.unverified],ed=[{value:$.natural,label:"Физическое лицо"},{value:$.selfEmployed,label:"Самозанятый"},{value:$.individualEntrepreneur,label:"Индивидуальный предприниматель"}],eu=R.Ry().shape({first_name:R.Z_().min(1).max(250,"Максимум ".concat(250," символов")).required("Введите имя"),last_name:R.Z_().min(1).max(250,"Максимум ".concat(250," символов")).required("Введите фамилию"),middle_name:R.Z_(),birthday:R.Z_().min(1).required("Выберите дату рождения"),serialNumber:R.Z_().min(1).max(10,"Максимум ".concat(10," символов")).required("Введите серию и номер"),whom_issued:R.Z_().min(1).max(150,"Максимум ".concat(150," символов")).required("Заполните поле"),when_issued:R.Z_().min(1).required("Выберите дату выдачи документа"),photo_with_document:R.Z_().min(1).required("Загрузите файл"),document_scan:R.Z_().min(1).required("Загрузите файл"),additional_scan:R.Z_(),subdivision_code:R.Z_().min(1).max(6,"Максимум ".concat(6," символов")).required("Введите код подразделения")}),ep=function(e){var t,n=e.isVerifiedProfile,r=e.hasServerError,a=e.isLoading,i=e.isDisableSendModerationButton,o=e.agreement,s=e.resident_country,l=e.countries,c=e.document_scan,u=e.additional_scan,m=e.photo_with_document,_=e.checkboxText,h=e.setAgreement,x=e.setCountry,v=e.sendProfileFieldClickAnalytics,j=e.handleDocumentsUpload,w=e.handleSelfieUpload,k=e.handleRemoveImage,I=e.submitToModeration,P=e.email,R=e.isUnder18User,K=e.amountOfAvailableChecks,G=e.setDocumentTypeValue,Y=e.taxes,X=e.chosenTax,Q=e.onChangeTax,$=e.inn,ee=e.onChangeInn,et=e.snils,en=e.onChangeSnils,er=e.innError,ea=e.snilsError,ei=(0,E.v9)(F.tM),es=(0,E.v9)(B.P7),ec=ei.first_name,ed=void 0===ec?"":ec,ep=ei.last_name,ef=void 0===ep?"":ep,em=ei.middle_name,e_=ei.birthday,eh=void 0===e_?"":e_,ex=ei.moderation_comment,eb=es.serial_number,ev=void 0===eb?"":eb,eg=es.whom_issued,eT=void 0===eg?"":eg,ej=es.when_issued,ew=void 0===ej?"":ej,ey=es.type,ek=es.subdivision_code,eI=(0,E.I0)(),eN=ev.replace(/\s+/g,""),eC=(0,f.V)({last_name:ef,first_name:ed,middle_name:em,serialNumber:eN,whom_issued:eT,birthday:eh,when_issued:ew,document_scan:c,additional_scan:u,photo_with_document:m,subdivision_code:ek},eu),eP=eC.validationErrors,eS=eC.debouncedValidate,eD=(0,b.useMemo)(function(){return new Date(new Date().getFullYear(),11,31)},[]),eE=(0,b.useMemo)(function(){return new Date},[]),eR=!!(i||!ef||!ed||!eh||!ev||!ew||!eT||(null==s?void 0:s.value)==="RU"&&!ek||eN.length>10);return(0,y.jsxs)(M.T,{isShortWidth:!0,children:[!K&&(0,y.jsx)(W.b,{className:S().rejectAlert,type:W.o.error,textInformation:"Не удалось распознать. Заполните форму вручную и отправьте на проверку",isWrapper:!0}),(0,y.jsx)(T.H1,{className:p()(S().title,(t={},(0,d.Z)(t,S().titleNotVerified,!n),(0,d.Z)(t,S().rejectedTitle,!!ex),t)),dataTestId:"profile_header",children:"Профиль"}),r&&(0,y.jsx)(W.b,{className:S().serverErrorAlert,type:W.o.error,title:"Не получилось отправить документы на проверку",textInformation:el.serverError,isWrapper:!0}),R&&(0,y.jsx)(W.b,{className:S().serverErrorAlert,type:W.o.info,textInformation:el.under18,isWrapper:!0}),"string"==typeof ex&&(0,y.jsx)(J,{className:S().moderationComment,moderation_comment:ex,dataTestId:"profile_moderationComment"}),(0,y.jsx)(T.H4,{className:S().personalDataTitle,dataTestId:"profile_personalDataTitle",children:"Личные данные"}),(0,y.jsx)(A.o,{labelText:"Email",value:P,isDisabled:!0,dataTestId:"profile_email"}),(0,y.jsx)(A.o,{className:S().field,labelText:"Фамилия",onChange:function(e){eI((0,q.ZQ)(e))},errorMessage:eP.last_name,debouncedValidate:function(){eS("last_name")},value:ef,dataTestId:"profile_lastName",isDisabled:a}),(0,y.jsx)(A.o,{className:S().field,labelText:"Имя",onChange:function(e){eI((0,q.lC)(e))},errorMessage:eP.first_name,debouncedValidate:function(){eS("first_name")},value:ed,dataTestId:"profile_firstName",isDisabled:a}),(0,y.jsx)(A.o,{className:S().field,labelText:"Отчество",helpText:"Если у вас нет отчества в документах, оставьте это поле пустым",onChange:function(e){eI((0,q.ab)(e))},errorMessage:eP.middle_name,debouncedValidate:function(){eS("middle_name")},value:em,dataTestId:"profile_middleName",isDisabled:a}),(0,y.jsx)(O.a,{className:S().datepicker,value:eh,labelText:"Дата рождения",maxDate:eD,disable:[{from:eE,to:eD}],errorMessage:eP.birthday,debouncedValidate:function(){eS("birthday")},onChange:function(e){eI((0,q.H$)((0,z.UW)(e[0])))},icon:!0,dataTestId:"profile_birthday",isDisabled:a}),(0,y.jsx)(U.c,{className:S().select,id:"resident_country",labelText:"Страна резиденства",options:l,value:s,onChange:x,isDisabled:a,dataTestId:"profile_residentCountry",onClick:function(){return v("resident_country")}}),(0,y.jsx)(T.H4,{className:S().personalDataTitle,dataTestId:"profile_documentTypeTitle",children:"Паспорт"}),(0,y.jsx)(U.c,{id:"document_type",className:S().documentType,labelText:"Документ",options:H.u,value:ey,onChange:G,isDisabled:a,dataTestId:"profile_documentType",onClick:function(){return v("document_type")}}),(0,y.jsx)(A.o,{labelText:"Серия и номер",className:S().field,onChange:function(e){eI((0,L.Km)(e))},errorMessage:eP.serialNumber,debouncedValidate:function(){eS("serialNumber")},value:eN,dataTestId:"profile_serialNumberDocument",isDisabled:a}),(0,y.jsx)(A.o,{className:S().field,labelText:"Кем выдан",onChange:function(e){eI((0,L.Z5)(e))},errorMessage:eP.whom_issued,debouncedValidate:function(){eS("whom_issued")},value:eT,dataTestId:"profile_whomIssuedDocument",isDisabled:a}),(0,y.jsx)(O.a,{className:S().datepicker,value:ew,disable:[{from:eE,to:eD}],debouncedValidate:function(){eS("when_issued")},errorMessage:eP.when_issued,onChange:function(e){eI((0,L.nP)((0,z.UW)(e[0])))},labelText:"Дата выдачи",icon:!0,dataTestId:"profile_whenIssuedDocument",isDisabled:a}),(null==s?void 0:s.value)==="RU"&&(0,y.jsx)(A.o,{className:S().field,labelText:"Код подразделения",onChange:function(e){eI((0,L.Sv)(e))},errorMessage:eP.subdivision_code,debouncedValidate:function(){eS("subdivision_code")},value:ek,dataTestId:"profile_subdivisionCode",isDisabled:a}),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(T.H4,{className:S().personalDataTitle,dataTestId:"profile_photoTitle",children:"Фотографии доÐ
1ºÑƒÐ¼ÐµÐ½Ñ‚ов"}),(0,y.jsxs)("div",{className:S().photographyDescription,children:[(0,y.jsx)(C.J,{className:S().icon,icon:"lockOutline24x24",width:24,height:24,color:"var(--palettes-green-100)",dataTestId:"profile_photoIcon"}),(0,y.jsxs)(T.OE,{dataTestId:"profile_photoSecurityCaption",children:["Мы не храним фотографии документов. ",(0,y.jsx)("br",{})," Они удаляются сразу после проверки профиля"]})]}),(0,y.jsxs)("div",{className:S().loadFileWrapper,children:[(0,y.jsx)(N,{type:"image",onChange:j,title:"Фото или сканы документа",caption:"На изображениях должны быть видны серия, номер, дата и место выдачи",debouncedValidate:function(){eS("photo_with_document")},illustrationUrl:"/components/ProfilePage/passportScan.png",dataTestId:"profile_photoWithDocument",isMulti:!0,isDisable:a}),(0,y.jsx)(N,{type:"image",onChange:w,title:"Сделайте селфи",caption:"На изображении должно быть хорошо видно ваше лицо",debouncedValidate:function(){eS("document_scan")},illustrationUrl:"/components/ProfilePage/passportSelfie.png",dataTestId:"profile_documentScan",isDisable:a})]}
1),(0,y.jsxs)("div",{className:S().uploadBlock,children:[(0,y.jsx)(D,{src:c,alt:"document_scan",onRemove:function(){return k("document_scan")},isHideCloseButton:a,dataTestId:"profile__image--document"}),(0,y.jsx)(D,{src:u,alt:"additional_scan",onRemove:function(){return k("additional_scan")},isHideCloseButton:a,dataTestId:"profile__image--additional"}),(0,y.jsx)(D,{src:m,alt:"photo_with_document",onRemove:function(){return k("photo_with_document")},isHideCloseButton:a,dataTestId:"profile__image--selfie"})]}),(null==s?void 0:s.value)==="RU"&&(0,y.jsx)(eo,{className:S().taxBlock,taxes:Y,chosenTax:X,onChangeTax:function(e){return Q(e)},inn:$,onChangeInn:function(e){return ee(e)},snils:et,onChangeSnils:function(e){return en(e)},innError:er,snilsError:ea}),a?(0,y.jsxs)("div",{className:S().loadingContainer,children:[(0,y.jsx)("div",{className:S().loaderWrapper,children:(0,y.jsx)(V.D,{})}),(0,y.jsxs)("div",{children:[(0,y.jsx)(T.H3,{className:S().loadingTitle,children:"Проверяем фото и данные"}),(0,y.jsx)(T.OE,{className:S().loadingDescription,children:"Это может занять несколько минут"})]})]}):(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(Z.X,{className:S().checkbox,labelText:_,id:"agreement",name:"agreement",checked:o,onChange:h,dataTestId:"profile_agreementCheck",isDisabled:a}),(0,y.jsx)(g.z,{className:S().field,disabled:eR,onClick:I,isLoading:a,dataTestId:"profile_button-sentToModeration",children:"Отправить на проверку"})]})]})]})},ef=n(3490),em=n(72363),e_=n(84035),eh=function(e){var t,n;return null!==(t=null===(n=H.h.find(function(t){return t.value===e}))||void 0===n?void 0:n.label)&&void 0!==t?t:""},ex=function(e){var t,n;if(e.errors.length>0)throw Error((null===(n=e.errors[0])||void 0===n||null===(n=n.messages)||void 0===n?void 0:n[0])||"Ошибка проверки статуса");return null!==(t=e.result.profile_check_status)&&void 0!==t?t:null},eb=n(63602),ev=n(36613),eg=n(30667),eT=n(77314),ej=n(85927),ew=n(24832),ey=function(e){var t=new FormData;return Object.keys(e).map(function(n){var r=e[n];Array.isArray(r)?r.map(function(e){t.append(n,e)}):t.append(n,r)}),t},ek=n(42221),eI=function(e){switch(e){case"image/png":return"png";case"image/webp":return"webp";default:return"jpg"}},eN=function(e,t){var n=eI(t);return e.includes(".")?e.replace(/\.[^.]+$/,".".concat(n)):"".concat(e,".").concat(n)},eC=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.92;return new Promise(function(r){e.toBlob(function(e){return r(e)},t,n)})},eP=(s=(0,m.Z)(h().mark(function e(t){var n,r,a;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!=typeof createImageBitmap){e.next=11;break}return e.prev=1,e.next=4,createImageBitmap(t,{imageOrientation:"none"});case 4:return n=e.sent,e.abrupt("return",{source:n,width:n.width,height:n.height,cleanup:function(){return n.close()}});case 8:throw e.prev=8,e.t0=e.catch(1),e.t0;case 11:return r=URL.createObjectURL(t),e.prev=12,e.next=15,new Promise(function(e,t){var n=new Image;n.onload=function(){return e(n)},n.onerror=function(){return t(Error("Не удалось загрузить изображение"))},n.src=r});case 15:return a=e.sent,e.abrupt("return",{source:a,width:a.naturalWidth,height:a.naturalHeight,cleanup:function(){return URL.revokeObjectURL(r)}});case 19:throw e.prev=19,e.t1=e.catch(12),URL.revokeObjectURL(r),e.t1;case 23:case"end":return e.stop()}},e,null,[[1,8],[12,19]])})),function(e){return s.apply(this,arguments)}),eS=function(e,t,n,r){switch(t){case 2:e.transform(-1,0,0,1,n,0);return;case 3:e.transform(-1,0,0,-1,n,r);return;case 4:e.transform(1,0,0,-1,0,r);return;case 5:e.transform(0,1,1,0,0,0);return;case 6:e.transform(0,1,-1,0,r,0);return;case 7:e.transform(0,-1,-1,0,r,n);return;case 8:e.transform(0,-1,1,0,0,n);return;default:return}},eD=(l=(0,m.Z)(h().mark(function e(t){var n,r,a,i,o,s,l,c,d,u,p,f;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.arrayBuffer();case 3:if(!((n=new DataView(e.sent)).byteLength<4||65496!==n.getUint16(0,!1))){e.next=7;break}return e.abrupt("return",1);case 7:r=2;
1case 8:if(!(r<n.byteLength)){e.next=57;break}if(!(r+2>n.byteLength)){e.next=11;break}return e.abrupt("return",1);case 11:if(a=n.getUint16(r,!1),r+=2,65505!==a){e.next=47;break}if(!(r+2>n.byteLength)){e.next=16;break}return e.abrupt("return",1);case 16:if(!((i=n.getUint16(r,!1))<8||r+i>n.byteLength)){e.next=19;break}return e.abrupt("return",1);case 19:if(!((r+=2)+4>n.byteLength)){e.next=22;break}return e.abrupt("return",1);case 22:if(!(1165519206!==n.getUint32(r,!1))){e.next=24;break}return e.abrupt("return",1);case 24:if(!((r+=6)+8>n.byteLength)){e.next=27;break}return e.abrupt("return",1);case 27:if(o=18761===n.getUint16(r,!1),s=n.getUint32(r+4,o),!((l=r+s)+2>n.byteLength)){e.next=32;break}return e.abrupt("return",1);case 32:c=n.getUint16(l,o),l+=2,d=0;case 35:if(!(d<c)){e.next=46;break}if(!((u=l+12*d)+12>n.byteLength)){e.next=39;break}return e.abrupt("return",1);case 39:if(274!==n.getUint16(u,o)){e.next=43;break}return p=n.getUint16(u+8,o),e.abrupt("return",p||1);case 43:d++,e.next=35;break;case 46:case 57:return e.abrupt("return",1);case 47:if(!((65280&a)!=65280)){e.next=49;break}return e.abrupt("break",57);case 49:if(!(r+2>n.byteLength)){e.next=51;break}return e.abrupt("return",1);case 51:if(!((f=n.getUint16(r,!1))<2)){e.next=54;break}return e.abrupt("return",1);case 54:r+=f,e.next=8;break;case 60:return e.prev=60,e.t0=e.catch(0),e.abrupt("return",1);case 63:case"end":return e.stop()}},e,null,[[0,60]])})),function(e){return l.apply(this,arguments)}),eE=(c=(0,m.Z)(h().mark(function e(t){var n,r,a,i,o,s,l,c,d,u;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,t.type.startsWith("image/")){e.next=3;break}return e.abrupt("return",t);case 3:return e.next=5,eD(t);case 5:if(1!==(n=e.sent)){e.next=8;break}return e.abrupt("return",t);case 8:return e.next=10,eP(t);case 10:if(r=e.sent,e.prev=11,a=r.source,i=r.width,o=r.height,s=[5,6,7,8].includes(n),(l=document.createElement("canvas")).width=s?o:i,l.height=s?i:o,c=l.getContext("2d")){e.next=20;break}return e.abrupt("return",t);case 20:var p;return eS(c,n,i,o),c.drawImage(a,0,0,i,o),d="image/jpeg"===(p=t.type)||"image/png"===p||"image/webp"===p?p:"image/jpeg",e.next=25,eC(l,d);case 25:if(u=e.sent){e.next=28;break}return e.abrupt("return",t);case 28:return e.abrupt("return",new File([u],eN(t.name,d),{type:d,lastModified:Date.now()}));case 29:return e.prev=29,r.cleanup(),e.finish(29);case 32:e.next=37;break;case 34:return e.prev=34,e.t0=e.catch(0),e.abrupt("return",t);case 37:case"end":return e.stop()}},e,null,[[0,34],[11,,29,32]])})),function(e){return c.apply(this,arguments)}),eR=n(58895),eW=R.Ry().shape({photo_with_document:R.Z_().min(1).required("Загрузите файл"),document_scan:R.Z_().min(1).required("Загрузите файл"),additional_scan:R.Z_()}),eZ=function(){var e,t,n,r,a,i,o,s,l,c,d,u=(0,E.I0)(),p=(0,E.v9)(F.tM),_=(0,E.v9)(ev.d),x=(0,E.v9)(B.P7),v=(0,b.useState)(!1),g=v[0],T=v[1],j=(0,b.useState)(!1),w=j[0],y=j[1],k=(0,b.useState)(!1),I=k[0],N=k[1],C=(0,b.useState)(!1),P=C[0],S=C[1],D=(0,b.useState)(!1),R=D[0],W=D[1],Z=(0,b.useState)($.natural),O=Z[0],A=Z[1],U=(0,b.useState)(""),V=U[0],M=U[1],q=(0,b.useState)(""),z=q[0],K=q[1],G=(0,b.useState)(""),J=G[0],Y=G[1],X=(0,b.useState)(""),Q=X[0],ee=X[1],et=(0,b.useState)(!1),en=et[0],er=et[1],ea=p.status,ei=void 0===ea?es._.new:ea,eo=p.moderation_comment,el=p.amount_of_available_checks,ed=p.last_name,eu=p.first_name,ep=p.middle_name,ef=p.birthday,eh=_.id,eI=x.resident_country,eN=x.document_scan,eC=void 0===eN?"":eN,eP=x.additional_scan,eS=void 0===eP?"":eP,eD=x.photo_with_document,eZ=void 0===eD?"":eD,eO=x.uploadedAdditionalScan,eA=x.uploadedDocument,eU=x.uploadedPhotoWithDocument,eV=x.serial_number,eM=void 0===eV?"":eV,eB=x.whom_issued,eF=void 0===eB?"":eB,eL=x.when_issued,eH=void 0===eL?"":eL,eq=x.type,ez=x.subdivision_code,eK=x.profile_check_status,eG={birthday:x.birthday||ef||"",first_name:x.first_name||eu||"",last_name:x.last_name||ed||"",middle_name:x.middle_name||ep||"",serial_number:(null===(d=x.serial_number)||void 0===d?void 0:d.replace(/\s+/g,""))||eM.replace(/\s+/g,"")||"",subdivision_code:x.subdivision_code||ez||"",whom_issued:x.whom_issued||eF||"",when_issued:x.when_issued||eH||"",snils:x.snils||J||"",inn:x.inn||V||"",type:O.toLocaleUpperCase()},eJ=(0,f.V)({document_scan:eC,additional_scan:eS,photo_with_document:eZ},eW),eY=eJ.debouncedValidate,eX=eJ.validateAllFieldsAsync,eQ=(0,b.useRef)(null),e$=(0,b.useRef)(0),e0=(null==eI?void 0:eI.value)==="RU";(0,b.useEffect)(function(){return function(){var e;null===(e=eQ.current)||void 0===e||e.abort()}},[]);var e1=ei===es._.verified,e2=ec.includes(ei),e4=ei===es._.rejected&&!el||!!eS,e8=!g||!eC||!eZ||w,e6=(e=(0,m.Z)(h().mark(function e(){var t;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t="saveProfile",e.abrupt("return",(0,ek.B)({apiPointName:t,urlParam
1s:{profileId:eh||0},body:{birthday:ef||"",first_name:eu||"",last_name:ed||"",middle_name:null!=ep?ep:""}}));case 2:case"end":return e.stop()}},e)})),function(){return e.apply(this,arguments)}),e3=(t=(0,m.Z)(h().mark(function e(){var t,n;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n={resident_country:null!==(t=null==eI?void 0:eI.value)&&void 0!==t?t:"RU"},!e4){e.next=4;break}return e.next=4,e6();case 4:return eF.trim()&&(n.whom_issued=eF),eH.trim()&&(n.when_issued=eH),eM.trim()&&(n.serial_number=eM.replace(/\s+/g,"")),null!=eq&&eq.value.trim()&&(n.type=eq.value),V.trim()&&(n.inn=V),J.trim()&&(n.snils=J),ez&&(n.subdivision_code=ez.replace(/\s+/g,"")),eA&&(n.document_scan=eA),eU&&(n.photo_with_document=eU),eO&&(n.additional_scan=eO),e.abrupt("return",(0,ek.B)({apiPointName:"saveDocument",body:ey(n),urlParams:{profileId:eh||0}}));case 15:case"end":return e.stop()}},e)})),function(){return t.apply(this,arguments)}),e5=(0,b.useCallback)((n=(0,m.Z)(h().mark(function e(t){return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,ek.B)({apiPointName:"getAccountAICheckStatus",urlParams:{profileId:eh||0},signal:t}));case 1:case"end":return e.stop()}},e)})),function(e){return n.apply(this,arguments)}),[eh]),e9=(r=(0,m.Z)(h().mark(function e(t){return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t.profile_check_status){e.next=2;break}return e.abrupt("return",null);case 2:if(!(t.profile_check_status!==es.b.wait)){e.next=4;break}return e.abrupt("return",t);case 4:return e.abrupt("return",te());case 5:case"end":return e.stop()}},e)})),function(e){return r.apply(this,arguments)}),e7=(0,b.useCallback)((0,m.Z)(h().mark(function e(){var t,n,r,a,i,o;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:null===(t=eQ.current)||void 0===t||t.abort(),eQ.current=new AbortController,n=eQ.current.signal,r=0;case 4:if(!(r<100)){e.next=21;break}if(!n.aborted){e.next=7;break}return e.abrupt("return",null);case 7:return e.next=9,e5(n);case 9:if(!((a=e.sent).errors.length>0)){e.next=12;break}throw Error((null===(i=a.errors[0])||void 0===i||null===(i=i.messages)||void 0===i?void 0:i[0])||"Ошибка проверки статуса");case 12:if(!((o=a.result.profile_check_status)&&o!==es.b.wait)){e.next=15;break}return e.abrupt("return",a.result);case 15:if(!(r<99)){e.next=18;break}return e.next=18,(0,eR.V)(3e3);case 18:r++,e.next=4;break;case 21:return e.abrupt("return",null);case 22:case"end":return e.stop()}},e)})),[e5]),te=(0,b.useCallback)((0,m.Z)(h().mark(function e(){var t;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,e5();case 2:if(!(ex(t=e.sent)!==es.b.wait)){e.next=6;break}return e.abrupt("return",t.result);case 6:return e.abrupt("return",e7());case 7:case"end":return e.stop()}},e)})),[e5,e7]),tt=(a=(0,m.Z)(h().mark(function e(t){return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!((null==t?void 0:t.profile_check_status)===es.b.reject&&t.user_is_under_18)){e.next=9;break}return W(!0),e.next=4,u((0,ej.V)({profileId:eh||0}));case 4:return e.next=6,u((0,ew.E)());case 6:return e.next=8,u((0,eg.Q)());case 8:case 32:return e.abrupt("return");case 9:e.t0=null==t?void 0:t.profile_check_status,e.next=e.t0===es.b.success?12:e.t0===es.b.reject?20:e.t0===es.b.sentToManualModeration?28:e.t0===es.b.error?33:void 0===e.t0?33:35;break;case 12:return e.next=14,u((0,ej.V)({profileId:eh||0}));case 14:return e.next=16,u((0,ew.E)());case 16:return e.next=18,u((0,eg.Q)());case 18:return(0,eb.s$)({message:"Профиль подтвержден",options:{position:"top-center"}}),e.abrupt("return");case 20:return e.next=22,u((0,ej.V)({profileId:eh||0}));case 22:return e.next=24,u((0,ew.E)());case 24:return e.next=26,u((0,eg.Q)());case 26:return N(!0),e.abrupt("return");case 28:return e.next=30,u((0,ej.V)({profileId:eh||0}));case 30:return e.next=32,u((0,ew.E)());case 33:return S(!0),e.abrupt("return");case 35:S(!0);case 36:case"end":return e.stop()}},e)})),function(e){return a.apply(this,arguments)}),tn=(0,b.useCallback)((0,m.Z)(h().mark(function e(){var t,n,r;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=++e$.current,y(!0),e.prev=2,e.next=5,te();case 5:if(n=e.sent,!(t!==e$.current)){e.next=8;break}return e.abrupt("return");case 8:return e.next=10,tt(n);case 10:e.next=17;break;case 12:if(e.prev=12,e.t0=e.catch(2),!(t!==e$.current||null!==(r=eQ.current)&&void 0!==r&&r.signal.aborted)){e.
1next=16;break}return e.abrupt("return");case 16:S(!0);case 17:return e.prev=17,y(!1),e.finish(17);case 20:case"end":return e.stop()}},e,null,[[2,12,17,20]])})),[te]);(0,b.useEffect)(function(){if(eh&&ei===es._.submittedToAI)return tn(),function(){var e;e$.current+=1,null===(e=eQ.current)||void 0===e||e.abort()}},[eh,ei,tn]),(0,b.useEffect)(function(){V.length>12&&K("Укажите не более 12 символов. Только цифры."),V.length<=12&&0!==V.length&&K(""),0!==V.length||e0||K("")},[V]),(0,b.useEffect)(function(){O===$.natural&&(J.length>11&&ee("Укажите не более 11 символов. Только цифры."),J.length<=11&&0!==J.length&&ee("")),0===J.length&&O!==$.natural&&ee(""),0!==J.length||e0||ee("")},[J,O]);var tr=(i=(0,m.Z)(h().mark(function e(t){var n,r,a,i;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,ek.B)({apiPointName:"postPayoutTemplate",body:ey(t)});case 2:return n=e.sent,e.next=5,n.errors;case 5:(r=e.sent).length>0&&(i=null===(a=r.find(function(e){return"selfpub_backend_errors"===e.field}))||void 0===a?void 0:a.messages[0],(0,eb.x2)({message:i||"Ошибка при отправке формы",options:{position:"top-center",autoClose:5e3,closeOnClick:!0}}));case 7:case"end":return e.stop()}},e)})),function(e){return i.apply(this,arguments)}),ta=(o=(0,m.Z)(h().mark(function e(t){var n,r,a,i;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,ek.B)({apiPointName:"patchPayoutTemplateByUserId",body:ey(t),urlParams:{userId:null!=eh?eh:0}});case 2:return n=e.sent,e.next=5,n.errors;case 5:(r=e.sent).length>0&&(i=null===(a=r.find(function(e){return"selfpub_backend_errors"===e.field}))||void 0===a?void 0:a.messages[0],(0,eb.x2)({message:i||"Ошибка при отправке формы",options:{position:"top-center",autoClose:5e3,closeOnClick:!0}}));case 7:case"end":return e.stop()}},e)})),function(e){return o.apply(this,arguments)}),ti=(s=(0,m.Z)(h().mark(function e(){var t,n,r,a;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return S(!1),N(!1),e.next=4,eX();case 4:if(t=e.sent,!e0){e.next=12;break}if(0!==V.length){e.next=9;break}return K("Укажите свой ИНН"),e.abrupt("return");case 9:if(!(0===J.length&&O===$.natural)){e.next=12;break}return ee("Укажите свой СНИЛС"),e.abrupt("return");case 12:if(!(t||z||Q)){e.next=14;break}return e.abrupt("return");case 14:return y(!0),e.prev=15,e.next=18,e3();case 18:if(!((r=e.sent).errors.length>0)){e.next=22;break}return N(!0),e.abrupt("return");case 22:return(0,em.I)({action:"profile_sent_success",goalParams:{user_id:null!==(n=_.uuid)&&void 0!==n?n:""}}),(0,e_.nv)({event_type:"sent_moderation_success",event_parameters:{profile_id:String(eh)}},_),e.next=26,e9(r.result);case 26:return a=e.sent,e.next=29,tt(a);case 29:if(!(!en&&eK!==es.b.reject&&eK!==es.b.error)){e.next=35;break}return er(!0),e.next=33,tr(eG);case 33:e.next=37;break;case 35:return e.next=37,ta(eG);case 37:e.next=42;break;case 39:e.prev=39,e.t0=e.catch(15),S(!0);case 42:return e.prev=42,y(!1),e.finish(42);case 45:case"end":return e.stop()}},e,null,[[15,39,42,45]])})),function(){return s.apply(this,arguments)}),to=(l=(0,m.Z)(h().mark(function e(t){var n,r;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if((n=t?t instanceof File?[t]:Array.isArray(t)?t:Array.from(t):[]).length){e.next=3;break}return e.abrupt("return");case 3:return n.length>2&&(N(!1),(0,eb.x2)({message:"Можно выбрать не более 2 файлов",options:{position:"top-center"}})),e.next=6,Promise.all(n.map(function(e){return eE(e)}));case 6:return r=e.sent,e.next=9,u((0,eT.y)(r));case 9:case"end":return e.stop()}},e)})),function(e){return l.apply(this,arguments)}),ts=(c=(0,m.Z)(h().mark(function e(t){var n;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,eE(t);case 4:return n=e.sent,e.next=7,u((0,eT.x)(n));case 7:case"end":return e.stop()}},e)})),function(e){return c.apply(this,arguments)});return(0,b.useEffect)(function(){(0,e_.nv)({event_type:"profile_view",event_parameters:{profile_id:String(eh)}},_,!0)},[eh,_]),(0,b.useEffect)(function(){eK===es.b.success&&setTimeout(function(){ta(eG)},1e3)},[eK]),{countries:H.h,status:ei,moderation_comment:eo,userProfile:_,resident_country:eI,document_scan:eC,additional_scan:eS,photo_with_document:eZ,agreement:g,isLoading:w,isShowValidation:I,hasServerError:P,isVerifiedProfile:e1,isModerationStatus:e2,isDisableSendModerationButton:e8,setAgreement:T,setCountry:function(e){e&&u((0,L.ve)(e))},submitToModeration:ti,handleDocumentsUpload:to,handleSelfieUpload:ts,handleRemoveImage:function(e){u((0,L.af)(e))},debouncedValidate:eY,sendProfileFieldClickAnalytics:function(e){(0,e_.nv)({event_type:"profile_fill_click",event_parameters:{profile_id:String(eh),profile_field:e}},_)}
1,serial_number:eM,isManualViewStatus:e4,isUnder18User:R,amount_of_available_checks:el,setDocumentTypeValue:function(e){e&&u((0,L.RU)(e))},profileTax:O,setProfileTax:A,inn:V,setInn:M,snils:J,setSnils:Y,innError:z,snilsError:Q}},eO=n(68715),eA=n(91972),eU=function(e){var t=e.isVerifiedProfile,n=e.hasServerError,r=e.isShowValidation,a=e.isLoading,i=e.isDisableSendModerationButton,o=e.agreement,s=e.resident_country,l=e.countries,c=e.document_scan,u=e.additional_scan,f=e.photo_with_document,m=e.checkboxText,_=e.setAgreement,h=e.setCountry,x=e.sendProfileFieldClickAnalytics,b=e.handleDocumentsUpload,v=e.handleSelfieUpload,j=e.handleRemoveImage,w=e.debouncedValidate,k=e.submitToModeration,I=e.isUnder18User,P=e.taxes,E=e.chosenTax,R=e.onChangeTax,O=e.inn,A=e.onChangeInn,B=e.snils,F=e.onChangeSnils,L=e.innError,H=e.snilsError;return(0,y.jsxs)(M.T,{isShortWidth:!0,children:[(0,y.jsxs)(T.H1,{className:p()(S().title,(0,d.Z)({},S().titleNotVerified,!t)),dataTestId:"profile_header",children:["Профиль"," ",(0,y.jsx)(eO.q,{textClassName:S().status,type:eA.K.inActive,text:"Не подтверждён",dataTestId:"profile__status"})]}),n&&(0,y.jsx)(W.b,{className:S().serverErrorAlert,type:W.o.error,title:"Не получилось отправить документы на проверку",textInformation:el.serverError,isWrapper:!0}),I&&(0,y.jsx)(W.b,{className:S().serverErrorAlert,type:W.o.info,textInformation:el.under18,isWrapper:!0}),(0,y.jsx)(T.OE,{className:S().descriptionTitle,children:"После подтверждения профиля, вам будет доступно:"}),(0,y.jsxs)("div",{className:S().featureRow,"data-testid":"profile_featureRow",children:[(0,y.jsx)(C.J,{className:S().icon,icon:"lockOutline24x24",width:24,height:24}),(0,y.jsx)(T.OE,{children:"Публикация платных книг"})]}),(0,y.jsxs)("div",{className:S().featureRow,"data-testid":"profile_featureRow",children:[(0,y.jsx)(C.J,{className:S().icon,icon:"lockOutline24x24",width:24,height:24}),(0,y.jsx)(T.OE,{children:"Получение роялти"})]}),(0,y.jsx)(T.H3,{className:S().descriptionTitle,dataTestId:"profile_confirmTitle",children:"Подтвердить профиль"}),(0,y.jsx)(U.c,{className:S().select,id:"resident_country",labelText:"Страна резиденства",options:l,value:s,onChange:h,isDisabled:a,dataTestId:"profile_residentCountry",onClick:function(){return x("resident_country")}}),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)("div",{className:S().photoTitleWrapper,children:[(0,y.jsx)(T.H4,{dataTestId:"profile_photoTitle",children:"Загрузите фотографии"}),(0,y.jsx)(en.u,{content:"Мы не храним файлы, они удаляются после проверки профиля",borderRadius:8,children:(0,y.jsx)(C.J,{className:S().infoIcon,icon:"infoOutline24x24",color:"var(--palettes-gray-120)",dataTestId:"profile_photoTooltip--icon"})})]}),(0,y.jsxs)("div",{className:S().loadFileWrapper,children:[(0,y.jsx)(N,{type:"image",onChange:b,title:"Фото или сканы документа",caption:"На изображениях должны быть видны серия, номер, дата и место выдачи",debouncedValidate:function(){w("document_scan")},illustrationUrl:"/components/ProfilePage/passportScan.png",dataTestId:"profile_documentScan",isMulti:!0,isDisable:a}),(0,y.jsx)(N,{type:"image",onChange:v,title:"Сделайте селфи",caption:"На изображении должно быть хорошо видно ваше лицо",debouncedValidate:function(){w("photo_with_document")},illustrationUrl:"/components/ProfilePage/passportSelfie.png",dataTestId:"profile_photoWithDocument",isDisable:a})]}
1),(0,y.jsxs)("div",{className:S().uploadBlock,children:[(0,y.jsx)(D,{src:c,alt:"document_scan",onRemove:function(){return j("document_scan")},isHideCloseButton:a,dataTestId:"profile__image--document"}),(0,y.jsx)(D,{src:u,alt:"additional_scan",onRemove:function(){return j("additional_scan")},isHideCloseButton:a,dataTestId:"profile__image--additional"}),(0,y.jsx)(D,{src:f,alt:"photo_with_document",onRemove:function(){return j("photo_with_document")},isHideCloseButton:a,dataTestId:"profile__image--selfie"})]}),r&&(0,y.jsx)(T.OE,{className:S().validationText,dataTestId:"profile__validationText",children:"Нужно переснять документ. На загруженном фото документ нечитаем — данные не видны или размыты. Сделайте новое фото и загрузите его снова."}),(null==s?void 0:s.value)==="RU"&&(0,y.jsx)(eo,{className:S().taxBlock,taxes:P,chosenTax:E,onChangeTax:function(e){return R(e)},inn:O,onChangeInn:function(e){return A(e)},snils:B,onChangeSnils:function(e){return F(e)},innError:L,snilsError:H}),a?(0,y.jsxs)("div",{className:S().loadingContainer,children:[(0,y.jsx)("div",{className:S().loaderWrapper,children:(0,y.jsx)(V.D,{})}),(0,y.jsxs)("div",{children:[(0,y.jsx)(T.H3,{className:S().loadingTitle,children:"Проверяем фото и данные"}),(0,y.jsx)(T.OE,{className:S().loadingDescription,children:"Это может занять несколько минут"})]})]}):(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(Z.X,{className:S().checkbox,labelText:m,id:"agreement",name:"agreement",checked:o,onChange:_,dataTestId:"profile_agreementCheck",isDisabled:a}),(0,y.jsx)(g.z,{className:S().field,disabled:i,onClick:k,isLoading:a,dataTestId:"profile_button-sentToModeration",children:"Отправить на проверку"})]})]})]})},eV=function(e){var t,n=e.moderation_comment,r=e.isVerifiedProfile,a=e.profile;return(0,y.jsxs)(M.T,{isShortWidth:!0,children:[(0,y.jsxs)(T.H1,{className:p()(S().title,(t={},(0,d.Z)(t,S().titleNotVerified,!r),(0,d.Z)(t,S().rejectedTitle,!!n),t)),dataTestId:"profile_header",children:["Профиль"," ",(0,y.jsx)(eO.q,{textClassName:S().status,type:eA.K.active,text:"На модерации",dataTestId:"profile__status"})]}),(0,y.jsx)(W.b,{className:S().alert,isWrapper:!0,type:W.o.info,textInformation:el.moderation,dataTestId:"profile_alert"}),(0,y.jsxs)("div",{className:p()(S().singleInformationSection),"data-testid":"profile__section--email",children:[(0,y.jsx)(T.Yd,{className:S().sectionTitle,children:"Электронная почта"}),(0,y.jsx)(T.u5,{children:a.email})]})]})},eM=n(10961),eB=n(52065),eF=function(e){var t,n=e.moderation_comment,r=e.isVerifiedProfile,a=e.profile,i=e.passportNumber;return(0,y.jsxs)(M.T,{isShortWidth:!0,children:[(0,y.jsxs)(T.H1,{className:p()(S().title,(t={},(0,d.Z)(t,S().titleNotVerified,!r),(0,d.Z)(t,S().rejectedTitle,!!n),t)),dataTestId:"profile_header",children:["Профиль"," ",(0,y.jsx)(eO.q,{textClassName:S().status,type:eA.K.success,text:"Подтверждён",dataTestId:"profile__status"})]}),(0,y.jsxs)("div",{className:S().informationSectionWrapper,children:[(0,y.jsxs)("div",{className:S().informationSection,"data-testid":"profile__section--email",children:[(0,y.jsx)(T.Yd,{className:S().sectionTitle,children:"Электронная почта"}),(0,y.jsx)(T.u5,{children:a.email})]}),(0,y.jsxs)("div",{className:S().informationSection,"data-testid":"profile__section--fullName",children:[(0,y.jsx)(T.Yd,{className:S().sectionTitle,children:"ФИО"}),(0,y.jsx)(T.u5,{children:(0,eM.m)(a.name||"—")})]}),(0,y.jsxs)("div",{className:S().informationSection,"data-testid":"profile__section--country",children:[(0,y.jsx)(T.Yd,{className:S().sectionTitle,children:"Страна резидентства"}),(0,y.jsx)(T.u5,{children:eh(a.resident_country||"")})]})]}),(0,y.jsx)(T.H3,{className:S().passportTitle,dataTestId:"profile_documentTypeTitle",children:"Паспорт"}),(0,y.jsxs)("div",{className:p()(S().singleInformationSection),"data-testid":"profile__section--passport",children:[(0,y.jsx)(T.Yd,{className:S().sectionTitle,children:"Серия и номер"}),(0,y.jsx)(T.u5,{children:i||"—"})]}),(0,y.jsxs)(T.u5,{className:S().verifiedText,dataTestId:"profile_changesCaption",children:[(0,eB.I)("Если вы хотите внести изменения в данные профиля, напишите")," ",(0,y.jsx)(ee.a,{href:ef.x.feedback.index,dataTestId:"profile_changesCaptionLink",children:"в службу поддержки"})]})]})},eL=function(){var e=eZ(),t=e.countries,n=e.moderation_comment,r=e.userProfile,a=e.resident_country,i=e.document_scan,o=e.additional_scan,s=e.photo_with_document,l=e.agreement,c=e.isLoading,d=e.isShowValidation,u=e.hasServerError,p=e.isVerifiedProfile,f=e.isModerationStatus,m=e.isManualVie
1wStatus,_=e.isDisableSendModerationButton,h=e.setAgreement,x=e.setCountry,b=e.submitToModeration,v=e.handleDocumentsUpload,g=e.handleSelfieUpload,j=e.handleRemoveImage,w=e.debouncedValidate,k=e.sendProfileFieldClickAnalytics,I=e.serial_number,N=e.isUnder18User,C=e.amount_of_available_checks,P=e.setDocumentTypeValue,S=e.profileTax,D=e.setProfileTax,E=e.inn,R=e.setInn,W=e.snils,Z=e.setSnils,O=e.innError,A=e.snilsError,U=(null==a?void 0:a.value)==="RU"?ef.x.offer.index:ef.x.offer_non_resident.index,V=(0,y.jsxs)(T.OE,{"data-testid":"profile_agreementText",children:["Я ознакомился с"," ",(0,y.jsx)(ee.a,{href:ef.x.privacy.index,target:"_blank",dataTestId:"profile_servicesPolicyLink",children:"Политикой"})," ","и",(0,y.jsxs)(ee.a,{href:U,target:"_blank",dataTestId:"profile_offerLink",children:[" ","Лицензионным договором-офертой"," "]}),"включая прохождение процедуры подтверждения профиля"]});return p?(0,y.jsx)(eF,{moderation_comment:n,isVerifiedProfile:p,profile:r,passportNumber:I}):f?(0,y.jsx)(eV,{moderation_comment:n,isVerifiedProfile:p,profile:r}):m?(0,y.jsx)(ep,{isVerifiedProfile:p,hasServerError:u,isLoading:c,isDisableSendModerationButton:_,agreement:l,resident_country:a,countries:t,document_scan:i,additional_scan:o,photo_with_document:s,checkboxText:V,setAgreement:h,setCountry:x,sendProfileFieldClickAnalytics:k,handleDocumentsUpload:v,handleSelfieUpload:g,handleRemoveImage:j,submitToModeration:b,email:r.email,isUnder18User:N,amountOfAvailableChecks:C,setDocumentTypeValue:P,taxes:ed,chosenTax:S,onChangeTax:function(e){return D(e)},inn:E,onChangeInn:function(e){return R(e)},snils:W,onChangeSnils:function(e){return Z(e)},innError:O,snilsError:A}):(0,y.jsx)(eU,{isVerifiedProfile:p,hasServerError:u,isShowValidation:d,isLoading:c,isDisableSendModerationButton:_,agreement:l,resident_country:a,countries:t,document_scan:i,additional_scan:o,photo_with_document:s,checkboxText:V,setAgreement:h,setCountry:x,sendProfileFieldClickAnalytics:k,handleDocumentsUpload:v,handleSelfieUpload:g,handleRemoveImage:j,debouncedValidate:w,submitToModeration:b,isUnder18User:N,taxes:ed,chosenTax:S,onChangeTax:function(e){return D(e)},inn:E,onChangeInn:function(e){return R(e)},snils:W,onChangeSnils:function(e){return Z(e)},innError:O,snilsError:A})},eH=!0;function eq(){return(0,y.jsx)(eL,{})}},10961:function(e,t,n){"use strict";n.d(t,{m:function(){return r}});var r=function(e){return e.split(" ").map(function(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}).join(" ").trim()}},58895:function(e,t,n){"use strict";n.d(t,{V:function(){return r}});var r=function(e){return new Promise(function(t){return setTimeout(t,e)})}},25845:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/account/profile",function(){return n(58142)}])},46445:function(e){e.exports={accent:"Info_accent__rmsFA",isClickedAccent:"Info_isClickedAccent__I4WtP",default:"Info_default__QuCiZ",isClickedDefault:"Info_isClickedDefault__PywR1",svgIcon:"Info_svgIcon__3AAfU"}},61092:function(e){e.exports={label:"Radio_label__hLyRp",notActive:"Radio_notActive__dK8XO",isNotBlock:"Radio_isNotBlock__r3SWI",itemRadio:"Radio_itemRadio__tMlgB",itemRadioBlock:"Radio_itemRadioBlock__vcvps",wrapper:"Radio_wrapper__NUr0t",textWrapper:"Radio_textWrapper__evuBA",group:"Radio_group___NXIr",isWrapper:"Radio_isWrapper__Nw93a",activeWrapper:"Radio_activeWrapper__FBlnG",disableWrapper:"Radio_disableWrapper__STt3W",disableActiveWrapper:"Radio_disableActiveWrapper__1rvcW",input:"Radio_input__Y3e1e",activeDisableInput:"Radio_activeDisableInput__xhQgu",disableText:"Radio_disableText__cE7hL",disableInput:"Radio_disableInput__5UYnI",infoTooltip:"Radio_infoTooltip__rAGzM",content:"Radio_content__XT2E3",innerContent:"Radio_innerContent__uCrGe"}},23460:function(e){e.exports={flex:"RadioGroup_flex__OPXL4"}},17490:function(e){e.exports={link:"Tooltip_link__rAkgS",title:"Tooltip_title__Z0ec_"}},49924:function(e){e.exports={wrapper:"Status_wrapper__rBRYg",text:"Status_text__ajm8u",active:"Status_active__IV_IN",inActive:"Status_inActive__mIOx2",accent:"Status_accent__xTwsr",intense:"Status_intense__B87Dr",success:"Status_success__KGNtB"}},83204:function(e){e.exports={wrapper:"FileUploaderCard_wrapper__lK_F3",uploader:"FileUploaderCard_uploader__mVUOd",isActive:"FileUploaderCard_isActive__oI0d7",caption:"FileUploaderCard_caption__y6lFD",imgPreviewWrapper:"FileUploaderCard_imgPreviewWrapper__6CdkR",button:"FileUploaderCard_button__Mrfwm"}},97208:function(e){e.exports={moderationComment:"ModerationComment_moderationComment__X04mQ",moderationCommentTitleWrapper:"ModerationComment_moderationCommentTitleWrapper___Bysl",moderationCommentIcon:"ModerationComment_moderationCommentIcon___wynL",moderationCommentText:"ModerationComment_moderationCommentText__Q3bCt"}},89481:function(e){e.exports={title:"TaxStatus_title__rC8Tv",radioGroupWrapper:"TaxStatus_radioGroupWrapper__n_elg",input
1sWrapper:"TaxStatus_inputsWrapper__4Y5qC",inputCaption:"TaxStatus_inputCaption__LdXQJ"}},40901:function(e){e.exports={alert:"Profile_alert__bwT0n",rejectAlert:"Profile_rejectAlert__MhGRb",title:"Profile_title__VGGer",titleNotVerified:"Profile_titleNotVerified__F0cLI",rejectedTitle:"Profile_rejectedTitle__6HWMp",status:"Profile_status__lsNVw",serverErrorAlert:"Profile_serverErrorAlert__QNzD2",moderationComment:"Profile_moderationComment__nwlrX",personalDataTitle:"Profile_personalDataTitle__8fK3s",documentType:"Profile_documentType__UyGrB",photographyDescription:"Profile_photographyDescription__RSa0e",informationSectionWrapper:"Profile_informationSectionWrapper__fjfq2",informationSection:"Profile_informationSection__kRP_5",sectionTitle:"Profile_sectionTitle__KYYsS",passportTitle:"Profile_passportTitle__e0TeP",singleInformationSection:"Profile_singleInformationSection__01W9P",descriptionTitle:"Profile_descriptionTitle__K30JJ",featureRow:"Profile_featureRow__5wPOb",field:"Profile_field__MxjGB",datepicker:"Profile_datepicker__CJCi1",select:"Profile_select__PTP4R",photoTitleWrapper:"Profile_photoTitleWrapper__W22TG",infoIcon:"Profile_infoIcon__6bSKd",verifiedText:"Profile_verifiedText__mZNx8",icon:"Profile_icon__jZxJ6",loadFileWrapper:"Profile_loadFileWrapper__V4Aon",uploadBlock:"Profile_uploadBlock__6OKTq",uploadImageWrapper:"Profile_uploadImageWrapper__fm_v3",imgIconWrapper:"Profile_imgIconWrapper__KRz1F",imgIcon:"Profile_imgIcon__EMtjB",uploadImage:"Profile_uploadImage__xjqBS",validationText:"Profile_validationText__vtjC4",loadingContainer:"Profile_loadingContainer__A0LQr",loaderWrapper:"Profile_loaderWrapper__RJ0Ae",loadingTitle:"Profile_loadingTitle__R7z_S",loadingDescription:"Profile_loadingDescription__NMp6f",checkbox:"Profile_checkbox__XOhWr",taxBlock:"Profile_taxBlock__GZN7_"}}},function(e){e.O(0,[2771],function(){e.E(2052)},5),e.O(0,[5675,9593,2238,540,9081,2519,8410,1362,8067,3525,9027,4839,3189,2675,7853,5579,5115,878,7781,2888,9774,179],function(){return e(e.s=25845)}),_N_E=e.O()}]);
2//# sourceMappingURL=profile-1d86022f693acbd1.js.map

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.