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]="5e6ad40a-2108-417e-9cb2-3e1b14de5841",e._sentryDebugIdIdentifier="sentry-dbid-5e6ad40a-2108-417e-9cb2-3e1b14de5841")}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]="5e6ad40a-2108-417e-9cb2-3e1b14de5841",e._sentryDebugIdIdentifier="sentry-dbid-5e6ad40a-2108-417e-9cb2-3e1b14de5841")}catch(e){}(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5961],{64384:function(e,t,r){"use strict";r.d(t,{Z:function(){return o}});var n=r(75088),i=r(5201);function o(e){return(0,i.Z)(1,arguments),(0,n.Z)(e).getTime()}},27863:function(e,t,r){"use strict";r.d(t,{Z:function(){return s}});var n=r(48160),i=r(58034),o=r(5201);function s(e,t){return(0,o.Z)(2,arguments),function(e,t){(0,o.Z)(2,arguments);var r=(0,n.Z)(t);return(0,i.Z)(e,6e4*r)}(e,-(0,n.Z)(t))}},69334:function(e,t,r){"use strict";r.d(t,{u:function(){return h}});var n,i=r(59499),o=r(68067),s=r(50184),a={small:95,middle:210,full:248},c=((n={}).small="small",n.middle="middle",n.full="full",n),l=r(17490),u=r.n(l),d=r(85893);function _(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function m(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_(Object(r),!0).forEach(function(t){(0,i.Z)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var h=function(e){var t=e.content,r=e.title,n=e.direction,i=e.children,l=e.background,_=void 0===l?"dark":l,h=e.size,f=void 0===h?c.full:h,p=e.textLink,v=e.dataTestId,g=e.borderRadius,x=e.moveTooltipLeft,w=e.moveTooltipRight,j=e.moveArrowLeft,y=e.moveArrowRight,b=e.zIndex,T=(0,d.jsxs)("span",{children:[r&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("div",{className:u().title,children:r}),(0,d.jsx)("br",{})]}),p?(0,d.jsx)(s.a,{className:u().link,href:p,target:"_blank",dataTestId:"tooltip__link",children:t}):t]});return(0,d.jsx)(o.Z,{title:T,placement:void 0===n?"top":n,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:b}},slotProps:{tooltip:{"data-testid":void 0===v?"tooltip":v,sx:m(m(m({bgcolor:"dark"===_?"var(--palettes-gray-190)":"var(--text-secondary)",color:"dark"===_?"var(--text-secondary)":"var(--palettes-gray-190)",minWidth:"41px",maxWidth:{xs:"calc(100vw - 24px)",sm:a[f]},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!==g&&{borderRadius:"".concat(g,"px")}),void 0!==x&&{ml:"".concat(x,"px")}),void 0!==w&&{mr:"".concat(w,"px")})},arrow:{sx:m(m({color:"dark"===_?"var(--palettes-gray-190)":"var(--text-secondary)"},void 0!==j&&{ml:"".concat(j,"px")}),void 0!==y&&{mr:"".concat(y,"px")})}},children:(0,d.jsx)("span",{children:i})})}},4398:function(e,t,r){"use strict";r.d(t,{a:function(){return a}});var n=r(60312),i=r(77488),o=r.n(i),s=r(85893),a=function(){return(0,s.jsx)("div",{className:o().loaderContainer,children:(0,s.jsx)(n.D,{})})}},61568:function(e,t,r){"use strict";r.d(t,{Fh:function(){return b},iB:function(){return x},vv:function(){return y}});var n,i=r(59499),o=r(94184),s=r.n(o),a=r(11752),c=r.n(a),l=r(25675),u=r.n(l),d=r(67294),_=r(42467),m=r(89637),h=r(60312),f={small:{width:42,he
1ight:60},medium:{width:85,height:120},large:{width:113,height:160},extraLarge:{width:190,height:270},smallAudio:{width:42,height:42},betweenSmallAndMediumAudio:{width:60,height:60},mediumAudio:{width:85,height:85},largeAudio:{width:113,height:113},extraLargeAudio:{width:190,height:190},extraSmall:{width:24,height:36}},p=r(37371),v=r.n(p),g=r(85893),x=((n={}).small="small",n.medium="medium",n.large="large",n.extraLarge="extraLarge",n.smallAudio="smallAudio",n.betweenSmallAndMediumAudio="betweenSmallAndMediumAudio",n.mediumAudio="mediumAudio",n.largeAudio="largeAudio",n.extraLargeAudio="extraLargeAudio",n.extraSmall="extraSmall",n),w=function(e){if(!e)return null;var t=e.trim();return t?/^https?:\/\//i.test(t)?t.replace(/\/$/,""):"https://".concat(t.replace(/^\/+/,"")):null},j=function(){var e=(c()()||{}).publicRuntimeConfig;return w(null==e?void 0:e.host)||(window.location.origin?window.location.origin:"https://selfpub.dev")},y=function(e){if(!e)return e;if(/^(https?:)?\/\//i.test(e)||e.startsWith("blob:")||e.startsWith("data:"))return e.startsWith("//")?"https:".concat(e):e;var t=j();try{return new URL(e,t).toString()}catch(t){return e}},b=function(e){var t=e.pictureFile,r=void 0===t?null:t,n=e.pathToPicture,o=e.bookName,a=e.className,c=e.classNameImg,l=e.size,p=void 0===l?"medium":l,x=e.ageRating,w=e.censored,j=e.onClick,b=e.pathToFullSize,T=e.isLink,N=void 0===T||T,C=e.isLoading,S=e.forceShowIllustration,A=void 0!==S&&S,I=e.dataTestId,k=o.slice(0,1).toLocaleUpperCase(),O=f[p].width/3.6,B=f[p].height/11.25,R=f[p].width/7.5,D=(0,d.useMemo)(function(){return!!w&&!!A||!!(w&&!n)},[w,n,A]),P=(0,d.useMemo)(function(){return(!!x||!!w)&&!!A||!!((x||w)&&!n)},[w,n,A,x]);return(0,g.jsxs)("div",{className:s()("shadowLevel0",v().coverBlock,a,v()[p]),onClick:j,"data-testid":I,children:[void 0!==C&&C&&(0,g.jsx)("div",{className:v().loaderContainer,children:(0,g.jsx)(h.D,{})}),(0,g.jsxs)("div",{className:s()(v().illustrationWrapper,(0,i.Z)({},v().censored,x&&!w)),children:[D&&(0,g.jsx)(_.Q,{className:v().illustrationIcon,imageType:"censored",width:O,height:B}),P&&(0,g.jsx)(_.Q,{className:v().illustrationIcon,imageType:"ageRating",width:R,height:R})]}),function(){if(r){var e=URL.createObjectURL(r);return(0,g.jsx)(u(),{src:e,alt:o,width:f[p].width,height:f[p].height})}return n?(0,g.jsx)("a",{href:b||n,target:"_blank",rel:"noreferrer",className:s()(v().cover,v().coverImg,c,(0,i.Z)({},v().notLink,!N)),children:(0,g.jsx)(u(),{src:y(n),alt:o,width:f[p].width,height:f[p].height})}):(0,g.jsx)("div",{className:s()(v().cover,c,(0,i.Z)({},v()[p],p)),children:(0,g.jsx)(m.H1,{className:v().firstLetter,children:k})})}()]})}},33960:function(e,t,r){"use strict";r.d(t,{o:function(){return m}});var n=r(59499),i=r(94184),o=r.n(i),s=r(35407),a=r(42467),c=r(89637),l=r(61568),u=r(81029),d=r.n(u),_=r(85893),m=function(e){var t,r=e.className,i=e.illustrationName,u=e.illustrationHeight,m=e.illustrationWidth,h=e.illustrationFormat,f=e.isBookCover,p=e.bookCoverSize,v=void 0===p?l.iB.small:p,g=e.bookCoverPathToPicture,x=e.headTitle,w=e.title,j=e.subTitle,y=e.buttonText,b=e.buttonHandler,T=e.buttonHref,N=e.dataTestId;return(0,_.jsxs)("div",{className:o()(d().container,r),"data-testid":N,children:[i&&(0,_.jsx)(a.Q,{imageType:i,height:u,width:m,format:h}),f&&(0,_.jsx)(l.Fh,{bookName:null!=x?x:"",size:v,pathToPicture:g}),x&&(0,_.jsx)(c.H2,{className:o()(d().headTitle,(t={},(0,n.Z)(t,d().headTitleWithButton,y),(0,n.Z)(t,d().headTitleWithBookCover,f),t)),children:(0,_.jsx)(c.T,{children:x})}),(0,_.jsx)(c.K0,{className:o()(d().title,(0,n.Z)({},d().titleWithButton,y)),dataTestId:"no-content-stub-text",children:w}),j&&(0,_.jsx)(c.K0,{className:d().subTitle,children:(0,_.jsx)(c.T,{children:j})}),y&&(0,_.jsx)(s.z,{onClick:b,href:T,size:"large",dataTestId:"no-content-stub-button",children:(0,_.jsx)(c.T,{children:y})})]})}},95952:function(e,t,r){"use strict";r.d(t,{V:function(){return u}});var n=r(59499),i=r(94184),o=r.n(i),s=r(33960),a=r(20476),c=r.n(a),l=r(85893),u=function(e){var t=e.buttonText,r=e.buttonHref,i=e.isWrapper;return(0,l.jsx)("div",{className:o()((0,n.Z)({},c().wrapper,void 0===i||i)),children:(0,l.jsx)(s.o,{illustrationName:"403",illustrationHeight:114,illustrationWidth:249,headTitle:"ÐÑибка доÑÑÑпа",title:"У Ð²Ð°Ñ Ð½ÐµÑ Ð¿Ñав Ð´Ð»Ñ Ð¿ÑоÑмоÑÑа ÑÑой ÑÑÑаниÑÑ",buttonText:t,buttonHref:r})})}},88111:function(e,t,r){"use strict";r.r(t),r.d(t,{__N_SSP:function(){return eZ},default:function(){return eW}});var n,i,o,s,a,c=r(90116),l=r(64443),u=r(67294),d=r(14416),_=r(63602),m=r(89637),h=r(98237),f=r(50029),p=r(64687),v=r.n(p),g=r(4486),x=r(41773),w=r.n(x),j=r(85893),y=function(){return(0,j.jsx)("div",{className:w().root,children:(0,j.jsxs)(m.pf,{children:[(0,j.jsx)(g.J,{icon:"diamondNew",className:w().icon}),(0,j.jsx)("span",{className:w().text,children:"Ðовое"})]})})},b=r(25675),T=r.n(b),N=r(42467),C=r(45028),S=r(61876),A=r(42221),I=(0,S.hg)("achievements/updateAchievementGiftSeen",(n=(0,f.Z)(v().mark(function e(t){var r;return v().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r="updateAchievementGiftSeen",e.next=3,(0,A.B)({apiPointName:r,urlParam
1s:{giftType:t},body:{is_seen:!0}});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}},e)})),function(e){return n.apply(this,arguments)})),k=r(59325),O=r(59499),B=r(94184),R=r.n(B),D=r(4570),P=r(3490),F=r(50184),M=r(53418),L=r(69334),Z=r(4398),W=r(52444),G=r(52065),E=r(14929),z=r.n(E),Y=function(e){var t=e.level,r=(0,d.v9)(h.Uu).items,n=(0,D.YK)(r);return(0,j.jsx)("div",{className:z().wrapper,children:n.map(function(e){return(0,j.jsx)(F.a,{href:"".concat(P.x.achievements.index).concat((0,D.yQ)(e.metric_type)),className:z().itemLink,dataTestId:"progressSmallToDoList__link",children:(0,j.jsxs)("div",{className:z().item,children:[(0,j.jsxs)("div",{className:z().itemContent,children:[(0,j.jsx)(g.J,{icon:e.current_level>=t?"checkSuccessOutline":"checkSuccessInactive",width:24,height:24}),(0,j.jsx)(m.u5,{className:z().itemText,children:(0,D.$_)(e.metric_type)})]}),(0,j.jsx)(g.J,{icon:"chevronRightOutline16x16"})]})},e.metric_type)})})},U=r(63305),H=r.n(U),K=function(e){switch(e){case l.mQ.FIRST:return(0,j.jsxs)(m.u5,{className:H().aboutPromocode,children:["Ðа вÑе"," ",(0,j.jsx)(F.a,{href:P.x.services.index,dataTestId:"achievementGifrModal__servicesLink",children:"ÑÑлÑги"}),", кÑоме \xabРоÑÑ Ð¿ÑоÑмоÑÑов книги\xbb, по пÑомокодÑ:"]});case l.mQ.SECOND:return(0,j.jsxs)(m.u5,{className:H().aboutPromocode,children:["Ðа вÑÑ"," ",(0,j.jsx)(F.a,{href:P.x.services.index,dataTestId:"achievementGiftModal__adLink",children:(0,G.I)("ÑекламÑ")})," ","(кÑоме \xabРоÑÑ Ð¿ÑоÑмоÑÑов книги\xbb),"," ",(0,j.jsx)(F.a,{href:P.x.services.index,dataTestId:"achievementGiftModal__correctLink",children:(0,G.I)("коÑÑекÑÑÑÑ Ð¸ веÑÑÑкÑ")})," ",(0,G.I)("по пÑомокодÑ: ")]});default:return null}},Q=function(e){var t,r=e.isOpen,n=e.onRequestClose,i=e.isActive,o=e.level,s=e.gift,a=e.date,c=e.promocodeInfo,l=e.isExpiredPromocode,d=(0,u.useState)(!1),_=d[0],h=d[1],p=(0,D.pt)(null==s?void 0:s.gift_type),x=(t=(0,f.Z)(v().mark(function e(){return v().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(null!=s&&s.promo_code)){e.next=5;break}return e.next=3,navigator.clipboard.writeText(s.promo_code);case 3:h(!0),setTimeout(function(){return h(!1)},800);case 5:case"end":return e.stop()}},e)})),function(){return t.apply(this,arguments)});return(0,j.jsxs)(M.u_,{isOpen:r,shouldCloseOnEsc:!0,shouldCloseOnOverlayClick:!0,onRequestClose:n,className:R()(H().modal,(0,O.Z)({},H().disabledPromocode,l||(null==s?void 0:s.promo_code_is_used))),children:[(0,j.jsxs)(M.hz,{className:H().content,children:[(0,j.jsxs)("div",{className:H().pictureWrapper,children:[(0,j.jsx)(N.Q,{imageType:i?"gift":"giftInactive",width:112,height:112,format:"png"}),(0,j.jsxs)("div",{children:[(0,j.jsx)(N.Q,{imageType:i?"polygonActive":"polygonDisabled",width:32,height:32,className:H().polygon}),(0,j.jsx)(m.mj,{className:H().level,children:o})]})]}),i&&(s?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(m.H2,{className:H().title,children:"ÐодаÑок ваÑ!"}),(0,j.jsxs)("div",{children:[(0,j.jsx)(m.mj,{children:p}),K(s.gift_type)]}),s.promo_code&&!s.promo_code_is_used&&(0,j.jsxs)("div",{className:R()(H().promoWrapper,(0,O.Z)({},H().copied,_)),children:[(0,j.jsx)(m.pf,{children:s.promo_code}),(0,j.jsx)("div",{className:H().copy,onClick:x,children:(0,j.jsx)(L.u,{content:_?"СкопиÑовано!":"ÐопиÑоваÑÑ",direction:"bottom",children:(0,j.jsx)(g.J,{icon:"copy",width:24,height:24})})})]}),(0,j.jsxs)("div",{children:[a&&(0,j.jsxs)(m.Yd,{children:["ÐейÑÑвÑÐµÑ Ð´Ð¾ ",(0,W.UW)(a)]}),s.promo_code_is_used&&(0,j.jsx)(m.Yd,{children:c})]})]}):(0,j.jsx)(Z.a,{})),!i&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(m.H2,{children:"Ðак полÑÑиÑÑ Ð¿Ð¾Ð´Ð°Ñок"}),(0,j.jsxs)("div",{className:H().progressContent,children:[(0,j.jsxs)(m.u5,{className:H().reachLevel,children:["ÐоÑÑигниÑе ",o," ÑÑÐ¾Ð²ÐµÐ½Ñ Ð² пÑогÑеÑÑаÑ
:"," "]}),(0,j.jsx)(Y,{level:o})]})]})]}),l&&(0,j.jsx)("div",{className:R()(H().footer,H().expired),children:"ÐÑÑек ÑÑок дейÑÑÐ²Ð¸Ñ Ð¿Ñомокода"}),(null==s?void 0:s.promo_code_is_used)&&(0,j.jsx)("div",{className:R()(H().footer,H().used),children:"ÐÑ Ñже иÑполÑзовали пÑомокод"})]})},J=r(56561),q=r.n(J),V=function(e){var t,r=e.isActive,n=e.level,i=e.isNew,o=e.g
1iftType,s=(0,d.I0)(),a=(0,u.useState)(!1),c=a[0],l=a[1],_=(0,u.useState)(i),h=_[0],p=_[1],g=(0,u.useState)(null),x=g[0],w=g[1],b=(t=(0,f.Z)(v().mark(function e(){var t,n;return v().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(l(!0),!r){e.next=7;break}return e.next=4,s((0,C._)({giftType:o}));case 4:n=e.sent,(0,k.f)(n),w(null===(t=n.payload)||void 0===t?void 0:t.result);case 7:i&&h&&(p(!1),s(I(o)));case 8:case"end":return e.stop()}},e)})),function(){return t.apply(this,arguments)});return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)("div",{className:q().wrapper,onClick:b,children:[h&&r&&(0,j.jsx)(y,{}),(0,j.jsx)(T(),{src:"/components/Achievements/".concat(r?"achievementActiveGift":"achievementDisabledGift",".png"),width:188,height:144,alt:r?"achievementActiveGift":"achievementDisabledGift"}),(0,j.jsxs)("div",{children:[(0,j.jsx)(N.Q,{imageType:r?"polygonActive":"polygonDisabled",width:36,height:36,className:q().polygon}),(0,j.jsx)(m.mj,{className:q().level,children:n})]})]}),(0,j.jsx)(Q,{isOpen:c,onRequestClose:function(){return l(!1)},isActive:r,level:n,gift:x})]})},X=r(26654),$=r.n(X),ee=[l.mQ.FIRST,l.mQ.SECOND],et=ee.map(function(e){return{gift_type:e,gift_issued_datetime:0,is_seen:!0}}),er=function(){var e=(0,d.v9)(h.wP),t=e.items,r=e.errors,n=(0,u.useMemo)(function(){return et.map(function(e){return(null==t?void 0:t.find(function(t){return t.gift_type===e.gift_type}))||e})},[t]),i=(0,u.useMemo)(function(){return(0,c.Z)(n).sort(function(e,t){return ee.indexOf(e.gift_type)-ee.indexOf(t.gift_type)})},[n,ee]),o=(0,u.useMemo)(function(){return(null==t?void 0:t.map(function(e){return e.gift_type}))||[]},[t]);return(0,u.useEffect)(function(){null!=r&&r.length&&r.forEach(function(e){(0,_.x2)({message:e.messages[0]})})},[r]),(0,j.jsxs)("div",{"data-testid":"gifts-section",className:$().wrapper,children:[(0,j.jsx)("div",{className:$().titleWrapper,children:(0,j.jsx)(m.H3,{className:$().title,children:"ÐодаÑки"})}),(0,j.jsx)("div",{className:$().container,children:(0,j.jsx)("div",{className:$().grid,children:i.map(function(e,t){return(0,j.jsx)(V,{level:t+1,isActive:o.includes(e.gift_type),isNew:!e.is_seen,giftType:e.gift_type},e.gift_type)})})})]})},en=r(96486),ei=r(91314),eo=(i=(0,f.Z)(v().mark(function e(t){var r;return v().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r="updateAchievementProgressSeen",e.next=3,(0,A.B)({apiPointName:r,urlParams:{metricType:t},body:{is_seen:!0}});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}},e)})),function(e){return i.apply(this,arguments)}),es=r(11163),ea=r.n(es),ec=r(19440),el=r.n(ec),eu=function(e){var t=e.item,r=(0,u.useMemo)(function(){var e=t.count/t.next_level_count*100;return e>100?100:e},[t.count,t.next_level_count]),n=(0,u.useMemo)(function(){return t.count>t.next_level_count?t.next_level_count:t.count},[t.count,t.next_level_count]),i=t.current_level===ei.I2;return(0,j.jsxs)("div",{className:el().container,"data-testid":"progress-item-".concat(t.metric_type),onClick:function(){t.is_seen||eo((0,D.SJ)(t.metric_type)),ea().push("".concat(P.x.achievements.index).concat((0,D.yQ)(t.metric_type)))},children:[!t.is_seen&&(0,j.jsx)(y,{}),(0,j.jsxs)("div",{className:R()(el().polygonsContainer,(0,O.Z)({},el().inactive,0===t.current_level)),children:[(0,j.jsx)(g.J,{icon:"polygonBig",className:el().polygonBig,size:82}),(0,j.jsx)(g.J,{icon:"starBig",className:el().star,size:40}),t.current_level>0&&(0,j.jsxs)("div",{className:el().levelContainer,children:[(0,j.jsx)(g.J,{icon:"polygonSmall",className:el().polygonSmall,size:36}),(0,j.jsx)("div",{className:el().levelIndicator,children:(0,j.jsx)(L.u,{content:"ТекÑÑий ÑÑовенÑ",direction:"bottom",children:(0,j.jsx)(m.mj,{className:el().levelText,children:t.current_level})})})]})]}),(0,j.jsx)("div",{className:el().title,children:(0,j.jsx)(m.mj,{children:(0,D.$_)(t.metric_type)})}),(0,j.jsx)("div",{className:R()(el().progressBarLine,(0,O.Z)({},el().hidden,i)),children:(0,j.jsx)("div",{className:el().progressBarBackgroun
1d,children:(0,j.jsx)("div",{className:el().progressBarFill,style:{width:"".concat(i?100:r,"%")},"data-testid":"progress-bar"})})}),(0,j.jsxs)(m.OE,{className:R()(el().progressBarText,(0,O.Z)({},el().hidden,i)),children:[n," / ",t.next_level_count]})]})},ed=r(38739),e_=r(25018),em=r.n(e_),eh=function(){var e,t=(0,d.v9)(h.Uu),r=t.items,n=t.isFetching,i=t.errors,o=i&&(0,en.isArray)(i)&&(null===(e=i[0])||void 0===e?void 0:e.messages[0]),s=(0,D.YK)(r);return(0,j.jsxs)(j.Fragment,{children:[n&&(0,j.jsx)(Z.a,{}),!!o&&(0,j.jsx)(ed.b,{size:"medium",textInformation:o,type:ed.o.error,isWrapper:!0}),!!s.length&&(0,j.jsxs)("div",{"data-testid":"progress-section",children:[(0,j.jsx)(m.H3,{className:em().title,children:"ÐÑогÑеÑÑ"}),(0,j.jsx)(m.u5,{className:em().description,children:"ÐоÑÑигайÑе новÑе ÑÑовни и полÑÑайÑе подаÑки Ð¾Ñ Ð½Ð°Ñ"}),(0,j.jsx)("div",{className:em().sectionContainer,children:s.map(function(e){return(0,j.jsx)(eu,{item:e},e.metric_type)})})]})]})},ef=r(35407),ep=function(e,t){if(t)switch(e){case l.CY.FIRST_BOOK:return"ÐоздÑавлÑем Ñ Ð²Ð°Ñей пеÑвой книгой на ÐиÑÑеÑ! ÐÑодолжайÑе в Ñом же дÑÑ
е!";case l.CY.FIRST_AUDIOBOOK:return"ÐоздÑавлÑем, Ð²Ñ Ð¾Ð¿Ñбликовали пеÑвÑÑ Ð°ÑÐ´Ð¸Ð¾ÐºÐ½Ð¸Ð³Ñ Ð½Ð° ÐиÑÑеÑ! ÐÑÐ¾Ñ ÑоÑÐ¼Ð°Ñ Ð¿ÑивлеÑÐµÑ Ð½Ð¾Ð²ÑÑ Ð°ÑдиÑоÑиÑ.";case l.CY.FIRST_DRAFT:return"УÑа! ÐаÑа пеÑÐ²Ð°Ñ Ð³Ð»Ð°Ð²Ð° Ñже на ÐиÑÑеÑ!";case l.CY.NEW_AUTHOR:return"ÐоздÑавлÑем, Ð²Ñ Ñделали пеÑвÑй важнÑй Ñаг! Ð Ð°Ð´Ñ Ð²Ð¸Ð´ÐµÑÑ Ð²Ð°Ñ ÑÑеди авÑоÑов ÐиÑÑеÑ!";default:return""}switch(e){case l.CY.FIRST_BOOK:return"ÐпÑбликÑйÑе пеÑвÑÑ ÐºÐ½Ð¸Ð³Ñ, ÑÑÐ¾Ð±Ñ ÑиÑаÑели ÐиÑÑÐµÑ ÐµÐµ Ñвидели!";case l.CY.FIRST_AUDIOBOOK:return"ÐпÑбликÑйÑе пеÑвÑÑ Ð°ÑдиокнигÑ! Ðо ÑÑаÑиÑÑике, аÑдиоÑоÑÐ¼Ð°Ñ Ð¿ÑÐ¸Ð²Ð»ÐµÐºÐ°ÐµÑ Ð½Ð¾Ð²ÑÑ Ð°ÑдиÑоÑиÑ.";case l.CY.FIRST_DRAFT:return"ÐпÑбликÑйÑе ÐºÐ½Ð¸Ð³Ñ Ð² пÑоÑеÑÑе, ÑÑÐ¾Ð±Ñ Ð¿Ð¾Ð»ÑÑиÑÑ Ð½Ð°Ð³ÑадÑ!";default:return""}},ev=function(e){switch(e){case l.CY.FIRST_BOOK:return"".concat(P.x.myBooks.ebooks,"?state=unpublished");case l.CY.FIRST_AUDIOBOOK:return"".concat(P.x.myBooks.audiobooks,"?state=unpublished");case l.CY.FIRST_DRAFT:return"".concat(P.x.myBooks.stories,"?state=unpublished");default:return""}},eg=r(31554),ex=r.n(eg),ew=function(e){var t=e.isOpen,r=e.onRequestClose,n=e.isActive,i=e.rewardType;return(0,j.jsxs)(M.u_,{isOpen:t,shouldCloseOnEsc:!0,shouldCloseOnOverlayClick:!0,onRequestClose:r,className:ex().modal,children:[(0,j.jsx)(M.hz,{children:(0,j.jsxs)("div",{className:ex().picture,children:[(0,j.jsx)(eI,{rewardType:i,isActive:n,isBoldCaption:!0}),(0,j.jsx)(m.u5,{className:ex().caption,children:(0,G.I)(ep(i,n))})]})}),(0,j.jsxs)(M.mz,{className:ex().footer,children:[n&&(0,j.jsx)(ef.z,{look:"secondary",onClick:r,className:ex().button,dataTestId:"rewardModal__closeButton",children:"ÐакÑÑÑÑ"}),!n&&(0,j.jsx)(ef.z,{href:ev(i),className:ex().button,dataTestId:"rewardModal__createButton",children:"СоздаÑÑ"})]})]})},ej=(o=(0,f.Z)(v().mark(function e(t){var r;return v().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r="updateAchievementRewardSeen",e.next=3,(0,A.B)({apiPointName:r,urlParams:{rewardType:t},body:{is_seen:!0}});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}},e)})),function(e){return o.apply(this,arguments)}),ey=((s={}).firstBook="firstBook",s.firstAudiobook="firstAudiobook",s.firstDraft="firstDraft",s.newAuthor="newAuthor",s),eb=((a={}).FIRST_BOOK="first-book",a.FIRST_AUDIOBOOK="first-audiobook",a.FIRST_DRAFT="first-drat",a.NEW_AUTHOR="new-author",a),eT=function(e){switch(e){case l.CY.NEW_AUTHOR:return"ÐовÑй авÑоÑ";case l.CY.FIRST_BOOK:return"ÐеÑÐ²Ð°Ñ ÐºÐ½Ð¸Ð³Ð°";case l.CY.FIRST_AUDIOBOOK:return"ÐеÑÐ²Ð°Ñ Ð°Ñдиокнига";case l.CY.FIRST_DRAFT:return"ÐеÑÐ²Ð°Ñ Ð³Ð»Ð°Ð²Ð°";default:return""}},eN=function(e){switch(e){case l.CY.FIRST_BOOK:return ey.firstBook;case l.CY.FIRST_AUDIOBOOK:return ey.firstAudiobook;case l.CY.FIRST_DRAFT:return ey.firstDraft;case l.CY.NEW_AUTHOR:return ey.newAuthor}},eC=function(e){switch(e){case l.CY.FIRST_BOOK:return eb.FIRST_BOOK;case l.CY.FIRST_AUDIOBOOK:return eb.FIRST_AUDIOBOOK;case l.CY.FIRST_DRAFT:return eb.FIRST_DRAFT;case l.CY.NEW_AUTHOR:return eb.NEW_AUTHOR}},eS=r(11500),eA=r.n(eS),eI=function(e){var t=e.rewardType,r=e.isActive,n=e.isNew,i=e.isBoldCaption,o=(0,u.useState)(!1),s=o[0],a=o[1],c=(0,u.useState)(n),l=c[0],d=c[1],_=eN(t),h=r?"".concat(_,"Active"):"".concat(_,"Disabled");return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)("div",{className:R()(eA().wrapper,(0,O.Z)({},eA().inModal,i)),onClick:function(){i||a(!0),n&&(d(!1),ej(eC(t)))},children:[l&&r&&(0,j.jsx)(y,{}),(0,j.jsx)(T(),{src:"/components/Achievements/".concat(h,".png"),width:144,height:144,alt:h}),i?(0,j.jsx)(m.H2,{className:eA().text,children:eT(t)}):(0,j.jsx)(m.u5,{className:R()(eA().text,(0,O.Z)({},eA().inactiveText,!r)),children:eT(t)})]}),(0,j.jsx)(ew,{isOpen:s,onRequestClose:function(){a(!1)},isActive:r,rewardType:t})]})},ek=r(93370),eO=r.n(ek),eB=function(){var e,t=(0,d.v9)(h.Y6),r=t.items,n=t.isFetching,i=t.errors,o=i&&(0,en.isArray)(i)&&(null===(e=i[0])||void 0===e?void 0:e.messages[0]),s=Object.values(l.CY),a=null==r?void 0:r.map(function(e){return e.reward_type}),c=null==r?void 0:r.filter(function(e){return!e.is_seen}),u=null==c?void 0:c.map(function(e){return e.reward_type});return(0,j.jsxs)(j.Fragment,{children:[n&&(0,j.jsx)(Z.a,{}),!!o&&(0,j.jsx)(ed.b,{size:"medium",textInformation:o,type:ed.o.error,isWrapper:!0}),r&&(0,j.jsxs)("div",{"data-testid":"rewards-section",className:eO().wrapper,children:[(0,j.jsx)(m.H3,{className:eO().title,children:"ÐагÑадÑ"}),(0,j.jsx)("div",{className:eO().container,children:(0,j.jsx)("div",{className:eO().grid,children:s.map(function(e){return(0,j.jsx)(eI,{isActive:!!(null!=a&&a.includes(e)),rewardType:e,isNew:!!(null!=u&&u.includes(e))},e)})})})]})]})},eR=r(63690),eD=r(86252),eP=r.n(eD),eF=function(){return(0,j.jsxs)(eR.T,{"data-testid":"achievements-page",children:[(0,j.jsx)("div",{className:eP().pageTitleContainer,children:(0,j.jsx)(m.H1,{className:eP().heading,children:"ÐоÑÑижениÑ"})}),(0,j.jsx)(eh,{}),(0,j.jsx)(er,{}),(0,j.jsx)(eB,{})]})}
1,eM=r(95952),eL=r(36613),eZ=!0,eW=function(){return null===(0,d.v9)(eL.d).achievements?(0,j.jsx)(eM.V,{buttonText:"Ðа главнÑÑ",buttonHref:P.x.home,isWrapper:!1}):(0,j.jsx)(eF,{})}},98237:function(e,t,r){"use strict";r.d(t,{Uu:function(){return i},Y6:function(){return s},gy:function(){return o},wP:function(){return n}});var n=function(e){return e.achievements.achievementsGifts},i=function(e){return e.achievements.achievementProgressData},o=function(e){return e.achievements.achievementProgressDataForMetric},s=function(e){return e.achievements.achievementRewardsData}},52444:function(e,t,r){"use strict";r.d(t,{I5:function(){return d},JJ:function(){return l},Oy:function(){return _},Tm:function(){return u},UW:function(){return a},ZE:function(){return m},_n:function(){return f},cx:function(){return g},jV:function(){return c},lR:function(){return x},sr:function(){return v},zE:function(){return h}});var n=r(27863),i=r(64384),o=r(67336),s=r(81180),a=function(e){if(!e)return"";var t=(e.getMonth()+1).toString(),r=e.getDate().toString(),n=e.getFullYear();return t.length<2&&(t="0".concat(t)),r.length<2&&(r="0".concat(r)),[n,t,r].join("-")},c=function(e,t){return new Date(e).toJSON().slice(0,10).split("-").reverse().join(null!=t?t:".")},l=function(e){return new Date(e).toLocaleDateString(void 0,{year:"2-digit",day:"2-digit",month:"2-digit"})},u=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return new Date(e).toLocaleDateString(t,{year:"numeric",day:"2-digit",month:"2-digit",timeZone:"Europe/Moscow"})},d=function(e){return new Date(e).toLocaleString(void 0,{timeZone:"UTC",year:"2-digit",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})},_=function(e){var t=new Date(e);return"".concat(t.getDate()," ").concat(["ÑнваÑÑ","ÑевÑалÑ","маÑÑа","апÑелÑ","маÑ","иÑнÑ","иÑлÑ","авгÑÑÑа","ÑенÑÑбÑÑ","окÑÑбÑÑ","ноÑбÑÑ","декабÑÑ"][t.getMonth()]," ").concat(t.getFullYear())},m=function(e){var t;return(0,i.Z)((t=Number(e),(0,n.Z)(t,new Date(t).getTimezoneOffset())))},h=function(e){return new Date(e).toLocaleString("ru-RU",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1,timeZone:"Europe/Moscow"}).replaceAll(","," ")},f=function(e){return(0,s.Z)((0,o.Z)(e),"dd.MM.yy")},p=function(e){if(e instanceof Date)return{y:e.getFullYear(),m:e.getMonth(),d:e.getDate()};var t=e.trim(),r=t.match(/^(\d{2})[.\-](\d{2})[.\-](\d{4})$/);if(r)return{d:Number(r[1]),m:Number(r[2])-1,y:Number(r[3])};var n=t.match(/^(\d{4})-(\d{2})-(\d{2})/);if(n)return{y:Number(n[1]),m:Number(n[2])-1,d:Number(n[3])};var i=new Date(t);return{y:i.getFullYear(),m:i.getMonth(),d:i.getDate()}},v=function(e){var t=p(e);return new Date(t.y,t.m,t.d,0,0,0,0)},g=function(e){var t=new Date(e),r=t.getDate(),n=t.toLocaleDateString("ru-RU",{day:"numeric",month:"long"}).replace(/\d+/,"").trim();return"".concat(r," ").concat(n)},x=function(e){var t=new Date(e);return"".concat(t.toTimeString().slice(0,5))}},27883:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/achievements",function(){return r(88111)}])},17490:function(e){e.exports={link:"Tooltip_link__rAkgS",title:"Tooltip_title__Z0ec_"}},77488:function(e){e.exports={loaderContainer:"Loader_loaderContainer___b93i"}},37371:function(e){e.exports={coverBlock:"BookCover_coverBlock__uzymg",cover:"BookCover_cover__Lo3iT",coverImg:"BookCover_coverImg__1XJDF",illustrationIcon:"BookCover_illustrationIcon__ZvfhP",illustrationWrapper:"BookCover_illustrationWrapper__tN0Dv",censored:"BookCover_censored__SFHOV",firstLetter:"BookCover_firstLetter__XSqbs",small:"BookCover_small__hRdGW",medium:"BookCover_medium__LT9rU",large:"BookCover_large__O4sUM",extraLarge:"BookCover_extraLarge__7qogP",mediumAudio:"BookCover_mediumAudio__Em4_F",largeAudio:"BookCover_largeAudio__LhzZ8",extraLargeAudio:"BookCover_extraLargeAudio__11dtW",notLink:"BookCover_notLink__9wLEC",loaderContainer:"BookCover_loaderContainer__p1YUn"}},81029:function(e){e.exports={container:"NoContentStub_container__697do",headTitle:"NoContentStub_headTitle___d_BK",headTitleWithButton:"NoContentStub_headTitleWithButton__5FoAq",headTitleWithBookCover:"NoContentStub_headTitleWithBookCover__KPIv8",title:"NoContentStub_title__Gwdpe",titleWithButton:"NoContentStub_titleWithButton__o_sil",subTitle:"NoContentStub_subTitle__jl7On"}},56561:function(e){e.exports={wrapper:"AchievementGift_wrapper__BUSy8",polygon:"AchievementGift_polygon__49WPz",level:"AchievementGift_level__zF2xF"}},63305:function(e){e.exports={modal:"AchievementGiftModal_modal__HKisd",disabledPromocode:"AchievementGiftModal_disabledPromocode__1g4yW",content:"AchievementGiftModal_content__X9Zbk",pictureWrapper:"AchievementGiftModal_pictureWrapper__ErdP6",polygon:"AchievementGiftModal_polygon__owbV_",level:"AchievementGiftModal_level__Z4sO8",title:"AchievementGiftModal_title__xZDx9",promoWrapper:"AchievementGiftModal_promoWrapper__u8pQm",copied:"AchievementGiftModal_copied__72Xhd",flash:"AchievementGiftModal_flash__z8y_O",copy:"AchievementGiftModal_copy__u3Ihe",progressContent:"AchievementGiftModal_progressContent__HsTVv",reachLevel:"AchievementGiftModal_reachLevel__ai7CL",footer
1:"AchievementGiftModal_footer__u5U1X",expired:"AchievementGiftModal_expired__CZxjt",used:"AchievementGiftModal_used__Vxkjc",aboutPromocode:"AchievementGiftModal_aboutPromocode__t4899"}},26654:function(e){e.exports={titleWrapper:"GiftsSection_titleWrapper__0Pg0t",title:"GiftsSection_title__ogKqm",wrapper:"GiftsSection_wrapper__pLT_7",container:"GiftsSection_container__QViQ6",grid:"GiftsSection_grid__VBKcS"}},41773:function(e){e.exports={root:"NewBadge_root__g67cg",text:"NewBadge_text__0a6AF",icon:"NewBadge_icon__cxlXg"}},19440:function(e){e.exports={container:"ProgressItem_container__z9zZ2",polygonsContainer:"ProgressItem_polygonsContainer__hZIG5",inactive:"ProgressItem_inactive__REYz_",polygonBig:"ProgressItem_polygonBig__WnIcs",star:"ProgressItem_star__JtS0Q",levelContainer:"ProgressItem_levelContainer__KhyGh",polygonSmall:"ProgressItem_polygonSmall__RdR4e",levelIndicator:"ProgressItem_levelIndicator__8yO_c",levelText:"ProgressItem_levelText__OrPqJ",appear:"ProgressItem_appear__S2rab",title:"ProgressItem_title__G70Uz",progressBarLine:"ProgressItem_progressBarLine__ISSfa",progressBarBackgroun
1d:"ProgressItem_progressBarBackground__yg_9E",progressBarFill:"ProgressItem_progressBarFill__keMg0",fill:"ProgressItem_fill__WkMjQ",progressBarText:"ProgressItem_progressBarText__aN1Xn",hidden:"ProgressItem_hidden__p5Uzt"}},25018:function(e){e.exports={sectionContainer:"ProgressSection_sectionContainer__KV0TN",title:"ProgressSection_title___PIkN",description:"ProgressSection_description__5o_Nz"}},14929:function(e){e.exports={wrapper:"ProgressSmallToDoList_wrapper__7s02z",item:"ProgressSmallToDoList_item__FA_6u",itemLink:"ProgressSmallToDoList_itemLink__BNyeZ",itemContent:"ProgressSmallToDoList_itemContent__183bp",itemText:"ProgressSmallToDoList_itemText__hgjhS"}},11500:function(e){e.exports={wrapper:"Reward_wrapper__0Z1Xv",inModal:"Reward_inModal__UW9nG",text:"Reward_text__j_ak2",inactiveText:"Reward_inactiveText__mSFVR"}},31554:function(e){e.exports={modal:"RewardModal_modal__wO4nM",picture:"RewardModal_picture__Ro71w",caption:"RewardModal_caption__TMrNg",footer:"RewardModal_footer__C9H7m",button:"RewardModal_button__kbn4f"}},93370:function(e){e.exports={wrapper:"RewardsSection_wrapper___P3cA",container:"RewardsSection_container__soGvP",grid:"RewardsSection_grid__FG3zG",title:"RewardsSection_title__e6K09"}},86252:function(e){e.exports={pageTitleContainer:"AchievementsPage_pageTitleContainer__S20EZ",heading:"AchievementsPage_heading__M2lQw"}},20476:function(e){e.exports={wrapper:"Page403_wrapper__nS_re"}},19302:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(67294);function i(e,t,r){var i=this,o=(0,n.useRef)(null),s=(0,n.useRef)(0),a=(0,n.useRef)(null),c=(0,n.useRef)([]),l=(0,n.useRef)(),u=(0,n.useRef)(),d=(0,n.useRef)(e),_=(0,n.useRef)(!0);d.current=e;var m=!t&&0!==t&&"undefined"!=typeof window;if("function"!=typeof e)throw TypeError("Expected a function");t=+t||0;var h=!!(r=r||{}).leading,f=!("trailing"in r)||!!r.trailing,p="maxWait"in r,v=p?Math.max(+r.maxWait||0,t):null;return(0,n.useEffect)(function(){return _.current=!0,function(){_.current=!1}},[]),(0,n.useMemo)(function(){var e=function(e){var t=c.current,r=l.current;return c.current=l.current=null,s.current=e,u.current=d.current.apply(r,t)},r=function(e,t){m&&cancelAnimationFrame(a.current),a.current=m?requestAnimationFrame(e):setTimeout(e,t)},n=function(e){if(!_.current)return!1;var r=e-o.current,n=e-s.current;return!o.current||r>=t||r<0||p&&n>=v},g=function(t){return(a.current=null,f&&c.current)?e(t):(c.current=l.current=null,u.current)},x=function(){var e=Date.now();if(n(e))return g(e);if(_.current){var i=e-o.current,a=e-s.current,c=t-i;r(x,p?Math.min(c,v-a):c)}},w=function(){for(var d=[],m=0;m<arguments.length;m++)d[m]=arguments[m];var f=Date.now(),v=n(f);if(c.current=d,l.current=i,o.current=f,v){if(!a.current&&_.current)return s.current=o.current,r(x,t),h?e(o.current):u.current;if(p)return r(x,t),e(o.current)}return a.current||r(x,t),u.current};return w.cancel=function(){a.current&&(m?cancelAnimationFrame(a.current):clearTimeout(a.current)),s.current=0,c.current=o.current=l.current=a.current=null},w.isPending=function(){return!!a.current},w.flush=function(){return a.current?g(Date.now()):u.current},w},[h,p,t,v,f,m])}}},function(e){e.O(0,[5961],function(){e.E(2052)},5),e.O(0,[3662,5675,9593,2238,540,9081,2519,8410,1362,8067,3189,2675,7853,5579,5115,878,2888,9774,179],function(){return e(e.s=27883)}),_N_E=e.O()}]); 2//# sourceMappingURL=achievements-a6c94f608c00bb84.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.