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]="499f2d53-6417-414a-84c7-e5b880a9c4aa",e._sentryDebugIdIdentifier="sentry-dbid-499f2d53-6417-414a-84c7-e5b880a9c4aa")}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]="499f2d53-6417-414a-84c7-e5b880a9c4aa",e._sentryDebugIdIdentifier="sentry-dbid-499f2d53-6417-414a-84c7-e5b880a9c4aa")}catch(e){}(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5766],{69024:function(e,t,n){"use strict";n.d(t,{m:function(){return r}});var r=function(e){return{art_id:Number(e.id),type:e.is_draft_book?"story":"book",published:e.is_published?1:0}}},12146:function(e,t,n){"use strict";n.d(t,{a:function(){return u}});var r=n(59499),a=n(3753),o=n(4486),i=n(92912),s=n.n(i),l=n(85893);function c(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 d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach(function(t){(0,r.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var u=function(e){var t=e.hasValue,n=e.isFocused,r=e.selectProps,i=!t&&!n&&!r.inputValue&&!r["aria-errormessage"];return(0,l.jsxs)(a.c.Control,d(d({},e),{},{children:[i&&(0,l.jsx)("span",{className:s().searchIcon,children:(0,l.jsx)(o.J,{icon:"searchOutline24x24",width:24,height:24,color:"70778F"})}),e.children]}))}},22461:function(e,t,n){"use strict";n.d(t,{h:function(){return j}});var r=n(59499),a=n(94184),o=n.n(a),i=n(77191),s=n(36864),l=n(35556),c=n(89637),d=n(50983),u=n.n(d),p=n(85893);function m(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?m(Object(n),!0).forEach(function(t){(0,r.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var _=function(e){var t=(0,s.Z)({},((0,i.Z)(e),e)),n=t.innerProps,r=t.innerRef,a=t.data;return(0,p.jsxs)("div",f(f({},n),{},{ref:r,className:"".concat(u().option," ").concat(a.isDisabled?u().optionDisabled:""),onClick:function(e){var t;if(a.isDisabled){e.preventDefault(),e.stopPropagation();return}null===(t=n.onClick)||void 0===t||t.call(n,e)},children:[(0,p.jsxs)("div",{children:[(0,p.jsxs)(c.u5,{className:u().title,children:[(0,p.jsx)("span",{className:u().titleText,children:a.art_title}),(0,p.jsxs)("span",{className:u().id,children:["(ID: ",a.art_id,")"]})]}),(0,p.jsx)(c.u5,{className:u().authorName,children:a.art_authors.map(function(e){return e.full_name}).join(", ")})]}),(0,p.jsxs)("div",{children:["ebook"===a.art_type&&(0,p.jsx)(l._,{labelType:"text",labelText:"ТекÑÑ"}),"audiobook"===a.art_type&&(0,p.jsx)(l._,{labelType:"audio",labelText:"ÐÑдио"}),"draft"===a.art_type&&(0,p.jsx)(l._,{labelType:"draft",labelText:"Ðнига в пÑоÑеÑÑе"})]})]}))},h=n(35685),g=n(51626),v=n(12146),x=n(92912),b=n.n(x);function y(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 C(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?y(Object(n),!0).forEach(function(t){(0,r.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var j=function(e){var t=e.fetchItems,n=e.isMulti,a=e.onChange,i=e.onSelectClick,s=e.placeholder,l=e.value,c=e.maxCount,d=void 0===c?5:c,u=e.errorMessage,m=e.helpText,f=e.isLocked,x=e.defaultOptions,y=e.isServices,j=e.isGenresTagsRecAB,k=e.timeoutMs,D=t&&k?(0,g.D)(t,k):t;return(0,p.jsxs)("div",{onClick:i,children:[(0,p.jsx)(h.Z,{isMulti:void 0===n||n,loadOptions:D,defaultOptions:x,onChange:function(e){e&&!Array.isArray(e)?a([e]):a(e||[])},loadingMessage:function(){return"ÐагÑÑзка"},noOptionsMessage:function(){return"ÐиÑего не найдено"},placeholder:s,value:l,isOptionDisabled:function(){return!!d&&l.length>=d},className:o()("select-container",{withError:u}),components:C(C({},y?{Option:_}:{}),j?{Control:v.a}:{}),classNamePrefix:"select",instanceId:1,isDisabled:f,styles:f?{multiValueRemove:function(e,t){return t.data.label?C(C({},e),{},{display:"none"}):e}}:void 0,"aria-errormessage":u}),!y&&(0,p.jsxs)("div",{className:b().counterWrapper,children:[!f&&(0,p.jsx)("div",{className:o()(b().helpText,(0,r.Z)({},b().withError,u)),children:u||m}),!f&&d>0&&(0,p.jsxs)("div",{className:o()(b().lengthCounter,(0,r.Z)({},b().counterWithError,u)),children:[l.length,"/",d]})]})]})}},67448:function(e,t,n){"use strict";n.d(t,{q:function(){return p}});var r=n(59499),a=n(94423),o=n(94184),i=n.n(o),s=n(25675),l=n.n(s),c=n(59083),d=n.n(c),u=n(85893),p=function(e){var t=e.name,n=e.pathToPicture,o=e.size,s=void 0===o?"s":o,c=e.dimension,p=void 0===c?56:c,m=e.className,f=e.isWithBorder,_=e.dataTestId,h=void 0===_?"avatar-image":_,g=e.isLitres,v=t.slice(0,1).toLocaleUpperCase(),x=null==n?void 0:n.startsWith("http");return n?(0,u.jsx)("div",{className:i()((0,r.Z)({},d()[s],d()[s]),m),"data-testid":h,children:(0,u.jsx)(l(),{loader:x?function(e){return(0,a.X)(e,{fit:"crop",ar:"1:1"})}:void 0,src:g?"".concat("https://cdn.litres.ru").concat(n):n,alt:t,width:p,height:p,className:i()(m,d().image,(0,r.Z)({},d().withBorder,void 0!==f&&f))})}):(0,u.jsx)("div",{className:i()(d().wrapper,(0,r.Z)({},d()[s],d()[s]),m),"data-testid":h,children:v})}},94421:function(e,t,n){"use strict";n.d(t,{V:function(){return m}});var r=n(94184),a=n.n(r),o=n(35407),i=n(4486),s=n(42467),l=n(53418),c=n(89637),d=n(81321),u=n.n(d),p=n(85893),m=function(e){var t=e.className,n=e.isOpen,r=e.illustrationType,d=e.titleText,m=e.bodyText,f=e.leftButtonText,_=e.leftButtonIconType,h=e.onClickLeftButton,g=e.rightButtonText,v=e.rightButtonIconType,x=e.onClickRightButton;return(0,p.jsx)(l.u_,{className:a()(u().dialogWrapper,t),isOpen:n,children:(0,p.jsxs)("div",{className:u().dialogContentContainer,children:[(0,p.jsx)(s.Q,{className:u().dialogIllustration,imageType:void 0===r?"warningRed56x56":r,width:56,height:56}),(0,p.jsx)(c.mj,{className:u().dialogTitleText,children:d}),(0,p.jsx)(c.OE,{className:u().dialogBodyText,children:m}),(0,p.jsxs)("div",{className:u().dialogButtonsContainer,children:[(0,p.jsxs)(o.z,{size:"small",look:"secondary",onClick:h,dataTestId:"dialog__leftButton",children:[_&&(0,p.jsx)(i.J,{className:u().dialogIcon,icon:_}),f]}),(0,p.jsxs)(o.z,{size:"small",onClick:x,dataTestId:"dialog__rightButton",children:[v&&(0,p.jsx)(i.J,{className:u().dialogIcon,icon:v}),g]})]})]})})}},13174:function(e,t,n){"use strict";n.d(t,{P:function(){return f}});var r=n(59499),a=n(94184),o=n.n(a),i=n(18896),s=n(4486),l=n(69334),c=n(89637),d=n(60312),u=n(56592),p=n.n(u),m=n(85893),f=function(e){var t=e.isModerator,n=e.isLoading,a=e.onDeleteFile,u=e.className,f=e.isLocked,_=e.file,h=e.dataTestId,g=_.title,v=_.isError,x=_.errorText,b=_.link;return(0,m.jsxs)("div",{className:o()(p().wrapper,u),"data-testid":void 0===h?"miniFile--wrapper":h,children:[(0,m.jsx)("div",{className:o()((0,r.Z)({},p().errorIcon,v)),children:(0,m.jsx)(s.J,{icon:"fileOutline24x24",size:24})}),v?(0,m.jsx)(l.u,{content:x||"ÐÑибка загÑÑзки",children:(0,m.jsx)(c.iO,{className:o()(p().text,p().error),children:g})}):(0,m.jsx)("a",{href:b,rel:"noreferrer",target:"_blank",className:p().titleLink,children:(0,m.jsx)(c.iO,{className:p().text,children:g})}),!t&&!f&&(0,m.jsx)("div",{className:p().iconTrash,children:n?(0,m.jsxs)("div",{className:p().loader,children:[(0,m.jsx)(c.iO,{children:(0,m.jsx)(c.T,{children:"ÐагÑÑзка..."})}),(0,m.jsx)(d.D,{})]}):(0,m.jsx)("div",{children:(0,m.jsx)(i.L,{onClick:function(){a&&!f&&a(_)},icon:"union16Ñ
16",iconSize:16,dataTestId:"miniFile__deleteButton"})})})]})}},82864:function(e,t,n){"use strict";n.d(t,{e:function(){return d}});var r=n(94184),a=n.n(r),o=n(4486),i=n(89637),s=n(24386),l=n.n(s),c=n(85893),d=function(e){var t=e.info,n=e.className,r=e.icon,s=e.dataTestId;return(0,c.jsxs)("div",{className:a()(n,l().wrapper),"data-testid":void 0===s?"attention-label":s,children:[!!r&&(0,c.jsx)(o.J,{icon:r,className:l().icon}),(0,c.jsx)(i.mj,{className:l().info,children:t})]})}},97910:function(e,t,n){"use strict";n.d(t,{g:function(){return d}});var r=n(59499),a=n(94184),o=n.n(a),i=n(4486),s=n(31002),l=n.n(s),c=n(85893),d=function(e){var t=e.text,n=e.onClick,a=e.textIsSwitched,s=e.isSwitch,d=e.className,u=e.disabled,p=e.dataTestId;return(0,c.jsxs)("button",{type:"button",className:o()(l().button,(0,r.Z)({},l().isSwitch,s),d),onClick:n,disabled:u,"data-testid":void 0===p?"switcher-button":p,children:[s&&(0,c.jsx)(i.J,{icon:"doneOutline16x16",size:16,className:l().icon}),(0,c.jsx)("span",{className:l().text,children:s?a:t})]})}},9682:function(e,t,n){"use strict";n.d(t,{t:function(){return c}});var r=n(59499),a=n(94184),o=n.n(a),i=n(72300),s=n.n(i),l=n(85893),c=function(e){var t=e.itemList,
1n=e.name,a=e.value,i=e.disabled,c=e.onChange,d=e.className,u=e.isHandlingNumbers,p=void 0===u||u,m=e.dataTestId,f=function(e){c(p?parseInt(e.target.value):e.target.value)},_=function(e){e.currentTarget.value.toString()===a&&c(p?parseInt(e.currentTarget.value):e.currentTarget.value)};return(0,l.jsx)("div",{className:o()(s().wrapper,d,(0,r.Z)({},s().disabled,i)),"data-testid":void 0===m?"toggle-group":m,children:t.map(function(e){var t=e.value,c=e.label;return(0,l.jsxs)("label",{className:o()(s().labelItem,(0,r.Z)({},s().checked,t.toString()===a)),children:[(0,l.jsx)("input",{type:"radio",name:n,className:s().radioItem,onChange:f,onClick:_,value:t,checked:t.toString()===a,disabled:i,"data-testid":"toggle-group-option-".concat(t)}),c]},t)})})}},57660:function(e,t,n){"use strict";n.d(t,{Ox:function(){return r},mL:function(){return a},sC:function(){return o},sT:function(){return i}});var r="ÐведиÑе название жанÑа или вÑбеÑиÑе из ÑпиÑка. ÐÑавилÑно вÑбÑаннÑе жанÑÑ Ð¿Ð¾Ð¼Ð¾Ð³ÑÑ ÑиÑаÑелÑм найÑи Ð²Ð°Ñ Ð¿Ð¾Ð´ÐºÐ°ÑÑ Ð² каÑалоге.",a="ÐанÑÑ",o="ÐÑбеÑиÑе до 3 жанÑов",i="ÐведиÑе жанÑ"},66593:function(e,t,n){"use strict";n.d(t,{X:function(){return v}});var r=n(94184),a=n.n(r),o=n(50184),i=n(89637),s=n(59499),l=n(23157),c=n(12146),d=n(50421),u=n.n(d),p=n(85893);function m(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?m(Object(n),!0).forEach(function(t){(0,s.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var _=function(e){var t=e.isMulti,n=e.onChange,r=e.onSelectClick,o=e.placeholder,i=e.value,d=e.maxCount,m=e.errorMessage,_=e.helpText,h=e.isLocked,g=e.allGenres,v=e.isGenresTagsRecAB;return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(l.ZP,{className:a()("select-container",{withError:m}),classNamePrefix:"select",value:i,isMulti:void 0===t||t,isOptionDisabled:function(){return!!i&&i.length>=d},onChange:n,onFocus:r,options:g,placeholder:o,noOptionsMessage:function(){return"ÐиÑего не найдено"},instanceId:1,isDisabled:h,styles:h?{multiValueRemove:function(e,t){return t.data.label?f(f({},e),{},{display:"none"}):e}}:void 0,filterOption:function(e,t){return(!t||"ÐопÑлÑÑнÑе жанÑÑ"!==e.data.groupLabel)&&(!t||e.label.toLowerCase().includes(t.toLowerCase()))},components:f({},v?{Control:c.a}:{}),"aria-errormessage":m}),(0,p.jsxs)("div",{className:u().helpTextWrapper,children:[!h&&(0,p.jsx)("div",{className:a()(u().helpText,(0,s.Z)({},u().withError,m)),children:m||_}),!h&&(0,p.jsxs)("div",{className:a()(u().lengthCounter,(0,s.Z)({},u().counterWithError,m)),children:[(null==i?void 0:i.length)||0,"/",d]})]})]})},h=n(30918),g=n.n(h),v=function(e){var t=e.validationErrors,n=e.isLocked,r=e.className,s=e.onChange,l=e.onSelectClick,c=e.value,d=e.maxLength,u=e.config,m=e.faqLinkConfig,f=e.allGenres,h=e.isGenresTagsRecAB;return(0,p.jsxs)("div",{className:a()("shadowLevel0",g().container,r),"data-testid":"art-genres-section",id:"genres",children:[(0,p.jsxs)("div",{className:g().headerWrapper,children:[!!u.title&&(0,p.jsx)(i.H3,{className:g().header,children:(0,p.jsx)(i.T,{children:u.title})}),(null==m?void 0:m.linkTitle)&&(0,p.jsx)(o.a,{href:m.link,target:"_blank",className:g().prompt,dataTestId:"artGenres__faqLink",children:(0,p.jsx)(i.T,{children:m.linkTitle})})]}),(0,p.jsx)("div",{className:g().genresInput,"data-testid":"genres-select",children:(0,p.jsx)(_,{onChange:s,onSelectClick:l,placeholder:u.placeholder,value:c,maxCount:d,errorMessage:null==t?void 0:t.genres,isLocked:n,allGenres:f,isGenresTagsRecAB:h})})]})}},69178:function(e,t,n){"use strict";n.d(t,{Eb:function(){return a},Mh:function(){return r},uP:function(){return o}});var r={0:"ÐÑоизведение Ð¼Ð¾Ð¶ÐµÑ ÑодеÑжаÑÑ Ð¾Ð¿ÑавданнÑе жанÑом ÑпизодиÑеÑкие ненаÑÑÑалиÑÑиÑеÑкие изобÑÐ°Ð¶ÐµÐ½Ð¸Ñ Ð¸Ð»Ð¸ опиÑÐ°Ð½Ð¸Ñ ÑизиÑеÑкого или пÑиÑ
ологиÑеÑкого наÑÐ¸Ð»Ð¸Ñ Ð¿Ñи ÑÑловии ÑоÑÑÑÐ°Ð´Ð°Ð½Ð¸Ñ Ðº жеÑÑве наÑÐ¸Ð»Ð¸Ñ Ð¸ Ð¿Ð¾Ð±ÐµÐ´Ñ Ð´Ð¾Ð±Ñа над злом.",6:"РпÑоизведении допÑÑÑÐ¸Ð¼Ñ Ð½ÐµÐ½Ð°ÑÑÑалиÑÑиÑеÑкие изобÑÐ°Ð¶ÐµÐ½Ð¸Ñ Ð¸Ð»Ð¸ опиÑÐ°Ð½Ð¸Ñ Ð·Ð°Ð±Ð¾Ð»ÐµÐ²Ð°Ð½Ð¸Ð¹ Ñеловека, неÑÑаÑÑнÑÑ
ÑлÑÑаев, аваÑий, каÑаÑÑÑÐ¾Ñ Ð»Ð¸Ð±Ð¾ наÑилÑÑÑвенной ÑмеÑÑи без демонÑÑÑаÑии иÑ
поÑледÑÑвий.",12:"РпÑоизведении могÑÑ Ð¿ÑиÑÑÑÑÑвоваÑÑ ÑÑÐµÐ½Ñ Ð½Ð°ÑÐ¸Ð»Ð¸Ñ Ð¸Ð»Ð¸ ÑбийÑÑва, опиÑÐ°Ð½Ð¸Ñ Ð±Ð¾Ð»ÐµÐ·Ð½ÐµÐ¹, каÑаÑÑÑоÑ, но без подÑобноÑÑей. УпоÑÑебление алкоголÑ, Ñабака и наÑкоÑиÐ
1ºÐ¾Ð² Ð¼Ð¾Ð¶ÐµÑ Ð¿ÑиÑÑÑÑÑвоваÑÑ, но должно оÑÑждаÑÑÑÑ. ÐÐ¾Ð¶ÐµÑ Ð¿ÑиÑÑÑÑÑвоваÑÑ ÑÑ
емаÑиÑное опиÑание обÑÑÑий и поÑелÑев мÑжÑин и женÑин.",16:"ÐÑоизведение Ð¼Ð¾Ð¶ÐµÑ ÑодеÑжаÑÑ ÑÑÐµÐ½Ñ Ð±Ð¾Ð»ÐµÐ·Ð½ÐµÐ¹, каÑаÑÑÑÐ¾Ñ Ð±ÐµÐ· подÑобнÑÑ
опиÑаний. ÐаÑилие, ÑпоÑÑебление Ð°Ð»ÐºÐ¾Ð³Ð¾Ð»Ñ Ð¸ наÑкоÑиков Ð¼Ð¾Ð¶ÐµÑ Ð±ÑÑÑ Ð¾Ð¿Ð¸Ñано, но должно оÑÑждаÑÑÑÑ. ÐогÑÑ Ð¿ÑиÑÑÑÑÑвоваÑÑ Ð³ÑÑбÑе Ñлова кÑоме маÑеÑнÑÑ
. ÐедопÑÑÑимо налиÑие опиÑÐ°Ð½Ð¸Ñ ÑÑен ÑекÑÑалÑнÑÑ
оÑноÑений Ñ Ð°Ð½Ð°ÑомиÑеÑкими подÑобноÑÑÑми.",18:"ÐÑоизведение Ð¼Ð¾Ð¶ÐµÑ ÑодеÑжаÑÑ Ð½Ð°ÑÑÑалиÑÑиÑеÑкое опиÑание болезней, каÑаÑÑÑоÑ, ÑÑÐµÐ½Ñ ÑпоÑÑÐµÐ±Ð»ÐµÐ½Ð¸Ñ Ð°Ð»ÐºÐ¾Ð³Ð¾Ð»Ñ Ð¸ наÑкоÑиков, наÑÑÑалиÑÑиÑеÑкое опиÑание половÑÑ
оÑноÑений, опиÑание неÑÑадиÑионнÑÑ
взаимооÑноÑений, неÑензÑÑнÑÑ Ð±ÑанÑ."},a=function(e){return{obsceneLanguage:"Ð ÑекÑÑе ".concat(e?"ÑанÑика":"книги"," еÑÑÑ Ð½ÐµÑензÑÑÐ½Ð°Ñ Ð»ÐµÐºÑика"),lgbt:"ÐÑÑÑеÑаеÑÑÑ Ñпоминание неÑÑадиÑионнÑÑ
ÑекÑÑалÑнÑÑ
ÑÑÑановок",lgbtnotice:"Я подÑвеÑждаÑ, ÑÑо в пÑоизведении не ÑодеÑжиÑÑÑ"}},o=[{value:0,label:"0+"},{value:6,label:"6+"},{value:12,label:"12+"},{value:16,label:"16+"},{value:18,label:"18+"}]},49927:function(e,t,n){"use strict";n.d(t,{f:function(){return b}});var r,a=n(94184),o=n.n(a),i=n(14416),s=n(9682),l=n(89637),c=n(91157),d=n(59499),u=n(3490),p=n(50184),m=n(17710),f=((r={}).obsceneLanguage="obsceneLanguage",r.lgbt="lgbt",r.lgbtnotice="lgbtnotice",r),_=n(20614),h=n.n(_),g=n(85893),v=function(e){var t=e.hasObsceneLanguage,n=e.isLgbt,r=void 0!==n&&n,a=e.isLgbtRulesAccepted,i=void 0!==a&&a,s=e.onChangeObsceneLanguage,c=e.isLocked,_=e.onChangeLgbtSettings,v=e.onAcceptLgbtRules,x=e.hasLgbtConflicts,b=e.switchersDescription;return(0,g.jsxs)("div",{children:[(0,g.jsxs)("div",{className:h().switcherContainer,children:[(0,g.jsx)(m.T,{isActive:t,isDisabled:c,switcherHandler:function(){return s(!t)},dataTestId:"obscene-language-switcher"}),(0,g.jsx)("span",{className:h().switcherText,"data-testid":"artPgRate__obsceneLanguage--text",children:(0,g.jsx)(l.T,{children:b[f.obsceneLanguage]})})]}),(0,g.jsxs)("div",{className:h().switcherContainer,children:[(0,g.jsx)(m.T,{isActive:r,isDisabled:c,switcherHandler:function(){return _(!r)},dataTestId:"non-traditional-sexual-attitudes-switcher"}),(0,g.jsx)("span",{className:h().switcherText,"data-testid":"artPgRate__lgbt--text",children:(0,g.jsx)(l.T,{children:b[f.lgbt]})})]}),r&&(0,g.jsxs)("div",{className:h().switcherContainer,children:[(0,g.jsx)(m.T,{isActive:i,isDisabled:c,switcherHandler:function(){return v(!i)},dataTestId:"lgbt-switcher"}),(0,g.jsxs)("span",{className:h().switcherText,"data-testid":"artPgRate__lgbtNotice--text",children:[(0,g.jsx)(l.T,{children:b.lgbtnotice})," ",(0,g.jsx)(p.a,{href:u.x.faq.lgbtRestrictions,dataTestId:"lgbt-link",children:"пÑопаганда ÐÐÐТ"}),(0,g.jsx)(l.Yd,{className:o()((0,d.Z)({},h().isHighlighted,x)),children:"ÐаннÑй пÑÐ½ÐºÑ ÑвлÑеÑÑÑ Ð¾Ð±ÑзаÑелÑнÑм"})]})]})]})},x=n(69178),b=function(e){var t=e.onChangeAge,n=e.age,r=void 0===n?"":n,a=e.className,d=e.hasObsceneLanguage,u=e.onChangeObsceneLanguage,p=e.isLocked,m=e.isLgbt,f=e.isLgbtRulesAccepted,_=e.onChangeLgbtSettings,b=e.onAcceptLgbtRules,y=e.hasLgbtConflicts,C=e.ageRatingsDescription,j=void 0===C?x.Mh:C,k=e.switchersDescription,D=e.onClick,w=r?r.toString():"0",N=j[w],T=p||d||m,E=(0,i.v9)(c.gU).is_free_fanfic;return(0,g.jsxs)("div",{className:o()("shadowLevel0",h().ageContainer,a),"data-testid":"age-rating-section",id:"age",onClick:D,children:[(0,g.jsx)(l.H3,{className:h().h3,children:(0,g.jsx)(l.T,{children:"ÐозÑаÑÑной ÑейÑинг"})}),(0,g.jsx)(v,{hasObsceneLanguage:d,isLocked:p,onChangeObsceneLanguage:u,isLgbt:m,isLgbtRulesAccepted:f,onAcceptLgbtRules:b,onChangeLgbtSettings:_,hasLgbtConflicts:y,switchersDescription:k||(0,x.Eb)(!!E)}),(0,g.jsx)(s.t,{itemList:x.uP,name:"age-rating-field",value:w,disabled:T,onChange:function(e){return t(e)},className:h().toggleGroup}),N&&(0,g.jsx)(l.iO,{className:h().ageDescription,dataTestId:"artPgRate__ageDescription--text",children:(0,g.jsx)(l.T,{children:N})})]})}},13762:function(e,t,n){"use strict";n.d(t,{Nd:function(){return a},qB:function(){return i},sD:function(){return r},xU:function(){return o}});var r="Теги",a="ÐÑбеÑиÑе до 5 Ñегов",o="ÐведиÑе Ñег",i='ÐведиÑе Ñлово или ÑÑазÑ, напÑÐ¸Ð¼ÐµÑ âвампиÑÑâ или âÑазвиÑие бизнеÑа". Теги помогаÑÑ ÑиÑаÑелÑм найÑи подкаÑÑ Ð² каÑалоге по опоÑнÑм Ñловам.'},43493:function(e,t,n){"use strict";n.d(t,{e:function(){return y}});var r=n(59499),a=n(94184),o=n.n(a),i=n(50184),s=n(89637),l=n(50029),c=n(64687),d=n.n(c),u=n(67294),p=n(14416),m=n(22461),f=n(91157),_=n(42221),h=n(35627),g=n(85893),v=function(e){var t,n,r=e.errorMessage,a=e.helpText,o=e.isLocked,i=e.placeholder,s=e.maxCount,c=e.showOnlyHiddenTags,v=e.onChange,x=e.onSelectClick,b=e.value,y=e.isGenresTagsRecAB,C=(0,u.useState)([]),j=C[0],k=C[1],D=(0,p.v9)(f.we),w=(t=(0,l.Z)(d().mark(function e(t){var n,r;return d().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n="tagsAutocomplete",e.next=3,(0,_.B)({apiPointName:n,queryParams:{term:t,page:1,page_size:40,is_hidden:c}});case 3:return r=e.sent.result,e.abrupt("return",(0,h.ok)(r.results));case 6:case"end":return e.stop()}},e)})),function(e){return t.apply(this,arguments)}),N=(n=(0,l.Z)(d().mark(function e(){var t,n;return d().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t="tagsByGenres",e.next=3,(0,_.B)({apiPointName:t,queryParams:{genres:D?D.map(function(e){return e.value}).join(","):void 0,limit:40}});case 3:n=e.sent.result,k((0,h.ok)(n));case 6:case"end":return e.stop()}},e)})),function(){return n.apply(this,arguments)});return(0,u.useEffect)(function(){y&&N()},[D]),(0,g.jsx)(m.h,{fetchItems:w,defaultOptions:y?j:void 0,onChange:v,placeholder:i,value:b||[],maxCount:s,errorMessage:r,helpText:a,isLocked:o,onSelectClick:x,isGenresTagsRecAB:y})},x=n(79417),b=n.n(x),y=function(e){var t=e.validationErrors,n=e.isLocked,a=e.className,l=e.onChange,c=e.onSelectClick,d=e.value,u=e.showOnlyHiddenTags,p=e.areValidationErrorsHidden,m=e.maxCount,f=e.config,_=e.faqLinkConfig,h=e.isGenresTagsRecAB;return(0,g.jsxs)("div",{className:o()("shadowLevel0",b().container,a),"data-testid":"art-tags-section",id:"tags",children:[(0,g.jsxs)("div",{className:b().headerWrapper,children:[f.title&&(0,g.jsx)(s.H3,{className:b().header,children:(0,g.jsx)(s.T,{children:"Теги"})}),(null==_?void 0:_.linkTitle)&&(0,g.jsx)(i.a,{href:_.link,className:o()(b().prompt,(0,r.Z)({},b().hide,!_.linkTitle)),target:"_blank",dataTestId:"artTags__faqLink",children:(0,g.jsx)(s.T,{children:_.linkTitle})})]}),(0,g.jsx)("div",{className:b().tagsInput,"data-testid":"tags-select",children:(0,g.jsx)(v,{showOnlyHiddenTags:u,errorMessage:p?void 0:null==t?void 0:t.tags,maxCount:m,placeholder:f.placeholder,isLocked:n,onChange:l,onSelectClick:c,value:d,isGenresTagsRecAB:h})})]})}},3658:function(e,t,n){"use strict";n.d(t,{ZV:function(){return r},zA:function(){return a}});
1var r="Ðазвание",a="ÐÑбÑанное название поÑом можно бÑÐ´ÐµÑ Ð¸Ð·Ð¼ÐµÐ½Ð¸ÑÑ"},26938:function(e,t,n){"use strict";n.d(t,{q:function(){return p}});var r=n(59499),a=n(94184),o=n.n(a),i=n(50184),s=n(62754),l=n(89637),c=n(58671),d=n.n(c),u=n(85893),p=function(e){var t=e.debouncedValidate,n=e.validationErrors,a=e.serverError,c=e.className,p=e.value,m=e.onChange,f=e.onBlur,_=e.isLocked,h=e.config,g=e.faqLinkConfig,v=e.fieldName,x=e.onInputClick;return(0,u.jsxs)("div",{className:o()("shadowLevel0",c,d().wrapper),"data-testid":"art-title-section",id:"title",children:[(0,u.jsxs)("div",{className:d().head,children:[!!h.title&&(0,u.jsx)(l.H3,{className:d().title,children:h.title}),!!(null!=g&&g.linkTitle)&&(0,u.jsx)(i.a,{className:d().link,href:g.link,target:"_blank",dataTestId:"artTitle__faqLink",children:g.linkTitle})]}),!!h.subtitle&&(0,u.jsx)(l.iO,{className:d().subheader,children:h.subtitle}),(0,u.jsx)(s.o,{className:o()(d().input,(0,r.Z)({},d().isSubtitle,!!h.subtitle)),isDisabled:_,type:"text",placeholder:h.placeholder,value:void 0===p?"":p,debouncedValidate:t,errorMessage:(null==n?void 0:n[v])||a,onChange:m,onBlur:f,onClick:x,dataTestId:"art-title-input"})]})}},18246:function(e,t,n){"use strict";n.d(t,{x:function(){return _}});var r=n(59499),a=n(94184),o=n.n(a),i=n(20165),s=n(66709),l=n(17710),c=n(89637),d=n(18839),u=[{label:"Ркниге Ð½ÐµÑ Ð¼ÑзÑкалÑнÑÑ
ÑÑагменÑов",value:d.V.noMusicFragments},{label:"Ркниге пÑиÑÑÑÑÑвÑÑÑ Ð¼ÑзÑкалÑнÑе ÑÑагменÑÑ",value:d.V.hasMusicFragments}],p=n(81589),m=n.n(p),f=n(85893),_=function(e){var t,n=e.value,a=void 0===n?d.V.noMusicFragments:n,p=e.isLocked,_=e.audioResponsibilityAccepted,h=e.onChangeAudioFragmentsRights,g=e.onAcceptAudioResponsibility,v=e.isAudioResponsibilityWarningHighlighted,x=e.className;return(0,f.jsxs)("div",{className:o()(m().audioBookAudioFragmentsContainer,x),"data-testid":"audioFragments-section",children:[(0,f.jsx)(c.H3,{className:m().audioBookAudioFragmentsHeading,children:"ÐÑзÑкалÑнÑе вÑÑавки"}),(0,f.jsx)(s.E,{className:m().audioBookAudioFragmentsSwitcherGroup,items:u,onChange:h,value:a,isLocked:p}),a===d.V.hasMusicFragments&&(0,f.jsxs)("div",{className:m().audioBookAudioFragmentsSwitcherContainer,children:[(0,f.jsx)(l.T,{isActive:_||!1,isDisabled:p,switcherHandler:function(){g(!_)}}),(0,f.jsxs)("div",{className:m().audioBookAudioFragmentsSwitcherTextContainer,children:[(0,f.jsx)(c.OE,{children:"Я пÑÐ¸Ð½Ð¸Ð¼Ð°Ñ Ð½Ð° ÑÐµÐ±Ñ Ð¾ÑвеÑÑÑвенноÑÑÑ Ð·Ð° пÑава на мÑзÑкалÑнÑе ÑÑагменÑÑ"}),(0,f.jsx)(c.Yd,{className:o()((t={},(0,r.Z)(t,m().isHighlighted,v),(0,r.Z)(t,i.As,v),t)),children:"ÐаннÑй пÑÐ½ÐºÑ ÑвлÑеÑÑÑ Ð¾Ð±ÑзаÑелÑнÑм"})]})]})]})}},18839:function(e,t,n){"use strict";n.d(t,{V:function(){return a}});var r,a=((r={}).hasMusicFragments="hasMusicFragments",r.noMusicFragments="noMusicFragments",r)},44169:function(e,t,n){"use strict";n.d(t,{e:function(){return _}});var r=n(59499),a=n(94184),o=n.n(a),i=n(20165),s=n(50184),l=n(35407),c=n(4486),d=n(62754),u=n(89637),p=n(96248),m=n.n(p),f=n(85893),_=function(e){var t=e.annotationState,n=e.debouncedValidate,a=e.validationErrors,p=e.isModerator,_=e.className,h=e.isLocked,g=e.onBlur,v=e.onChange,x=e.onInputClick,b=e.faqLink,y=void 0===b?"":b,C=e.isAIGenerate,j=e.aiGenerateText,k=e.isAIGenerateButtonLocked,D=e.annotationAIGenerationCount,w=e.isAIGenerateError,N=e.isAIGenerateButtonLoading,T=e.onClickAIGenerate;return(0,f.jsxs)("div",{className:o()("shadowLevel0",_,m().wrapper),onBlur:g,id:"annotation","data-testid":"book-annotation-section",children:[(0,f.jsxs)("div",{className:m().head,children:[(0,f.jsx)(u.H3,{className:m().title,children:"ÐнноÑаÑиÑ"}),!p&&y&&(0,f.jsx)(s.a,{className:m().link,href:y,target:"_blank",dataTestId:"bookAnnotation__faqLink",children:"Ðак пÑавилÑно напиÑаÑÑ Ð°Ð½Ð½Ð¾ÑаÑиÑ"})]}),!!C&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)("div",{className:m().aiGenerateWrapper,children:[(0,f.jsx)(u.OE,{className:m().aiGenerateText,children:j}),(0,f.jsxs)("div",{className:m().aiGenerateBlock,children:[(0,f.jsx)(l.z,{className:m().aiGenerateButton,size:"small",icon:"aiOutline16x16",disabled:k,isLoading:N,onClick:function(){T&&T()},dataTestId:"bookAnnotation__generateButton",children:"СгенеÑиÑоваÑÑ"}),(0,f.jsxs)("div",{children:[(0,f.jsx)(c.J,{className:m().aiGenerateIcon,icon:"aiCountOutline16x16"}),(0,f.jsxs)(u.OE,{className:m().aiGenerateCounter,children:[D,"/",i.y$," ","генеÑаÑий"]})]})]})]}),!!w&&(0,f.jsx)(u.pf,{className:m().aiGenerateError,children:"Ðе ÑдалоÑÑ ÑгенеÑиÑоваÑÑ Ð°Ð½Ð½Ð¾ÑаÑиÑ, попÑобÑйÑе позже"})]}
1),(0,f.jsx)(d.o,{className:o()(m().input,m().isAnnotation,(0,r.Z)({},m().isModerator,p)),maxLength:1e3,type:"textarea",resizable:!0,withLengthCounter:!h,helpText:h?void 0:"Ðе менÑÑе 70 Ñимволов",value:t,debouncedValidate:n,errorMessage:null==a?void 0:a.annotation,onChange:v,isDisabled:h,dataTestId:"book-annotation-input",onClick:x})]})}},61568:function(e,t,n){"use strict";n.d(t,{Fh:function(){return j},iB:function(){return x},vv:function(){return C}});var r,a=n(59499),o=n(94184),i=n.n(o),s=n(11752),l=n.n(s),c=n(25675),d=n.n(c),u=n(67294),p=n(42467),m=n(89637),f=n(60312),_={small:{width:42,height: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}},h=n(37371),g=n.n(h),v=n(85893),x=((r={}).small="small",r.medium="medium",r.large="large",r.extraLarge="extraLarge",r.smallAudio="smallAudio",r.betweenSmallAndMediumAudio="betweenSmallAndMediumAudio",r.mediumAudio="mediumAudio",r.largeAudio="largeAudio",r.extraLargeAudio="extraLargeAudio",r.extraSmall="extraSmall",r),b=function(e){if(!e)return null;var t=e.trim();return t?/^https?:\/\//i.test(t)?t.replace(/\/$/,""):"https://".concat(t.replace(/^\/+/,"")):null},y=function(){var e=(l()()||{}).publicRuntimeConfig;return b(null==e?void 0:e.host)||(window.location.origin?window.location.origin:"https://selfpub.dev")},C=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=y();try{return new URL(e,t).toString()}catch(t){return e}},j=function(e){var t=e.pictureFile,n=void 0===t?null:t,r=e.pathToPicture,o=e.bookName,s=e.className,l=e.classNameImg,c=e.size,h=void 0===c?"medium":c,x=e.ageRating,b=e.censored,y=e.onClick,j=e.pathToFullSize,k=e.isLink,D=void 0===k||k,w=e.isLoading,N=e.forceShowIllustration,T=void 0!==N&&N,E=e.dataTestId,I=o.slice(0,1).toLocaleUpperCase(),A=_[h].width/3.6,O=_[h].height/11.25,S=_[h].width/7.5,P=(0,u.useMemo)(function(){return!!b&&!!T||!!(b&&!r)},[b,r,T]),F=(0,u.useMemo)(function(){return(!!x||!!b)&&!!T||!!((x||b)&&!r)},[b,r,T,x]);return(0,v.jsxs)("div",{className:i()("shadowLevel0",g().coverBlock,s,g()[h]),onClick:y,"data-testid":E,children:[void 0!==w&&w&&(0,v.jsx)("div",{className:g().loaderContainer,children:(0,v.jsx)(f.D,{})}),(0,v.jsxs)("div",{className:i()(g().illustrationWrapper,(0,a.Z)({},g().censored,x&&!b)),children:[P&&(0,v.jsx)(p.Q,{className:g().illustrationIcon,imageType:"censored",width:A,height:O}),F&&(0,v.jsx)(p.Q,{className:g().illustrationIcon,imageType:"ageRating",width:S,height:S})]}),function(){if(n){var e=URL.createObjectURL(n);return(0,v.jsx)(d(),{src:e,alt:o,width:_[h].width,height:_[h].height})}return r?(0,v.jsx)("a",{href:j||r,target:"_blank",rel:"noreferrer",className:i()(g().cover,g().coverImg,l,(0,a.Z)({},g().notLink,!D)),children:(0,v.jsx)(d(),{src:C(r),alt:o,width:_[h].width,height:_[h].height})}):(0,v.jsx)("div",{className:i()(g().cover,l,(0,a.Z)({},g()[h],h)),children:(0,v.jsx)(m.H1,{className:g().firstLetter,children:I})})}()]})}},68783:function(e,t,n){"use strict";n.d(t,{s:function(){return C}});var r=n(59499),a=n(84035),o=n(94184),i=n.n(o),s=n(42119),l=n(67294),c=n(14416),d=n(16310),u=n(18896),p=n(62754),m=n(17710),f=n(89637),_=n(36613),h=n(41594),g=n(13418),v=n.n(g),x=n(85893);function b(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 y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach(function(t){(0,r.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var C=function(e){var t=(0,c.v9)(_.d),n=e.className,o=e.marked,g=e.title,b=void 0===g?"Title":g,C=e.commentChangeHandler,j=e.isModerator,k=e.moderatorComment,D=void 0===k?"":k,w=e.id,N=e.tabType,T=e.artId,E=e.isProfile,I=void 0!==E&&E,A=e.dataTestId,O=(0,l.useState)(void 0!==o&&o),S=O[0],P=O[1],F=d.Ry().shape({comment:d.Z_().min(1).required("ÐаполниÑе комменÑаÑий")}),L=(0,l.useState)(!1),B=L[0],Z=L[1],R=(0,l.useState)(D),M=R[0],z=R[1],W=(0,c.I0)(),G=(0,l.useMemo)(function(){return{comment:M}},[M]),V=(0,s.V)(G,F),U=V.validationErrors,H=V.debouncedValidate;return(0,x.jsxs)("div",{className:n,"data-testid":A,children:[(0,x.jsxs)("div",{className:i()(v().wrapper,(0,r.Z)({},v().borderRadius,B)),children:[j&&(0,x.jsx)(m.T,{isActive:S,switcherHandler:function(){P(!S),W((0,h.JM)({id:Number(w),comment:M})),w&&N&&C&&C({id:w,title:b,tab:N,comment:M},!S),j&&(S?(0,a.nv)({event_type:"drop_mod_comment_click",event_parameters:y(y({mod_item:I?"profile":"art"},I?{profile_id:T||0}:{art_id:T||0}),{},{option:b})},t):(0,a.nv)({event_type:"add_mod_comment_click",event_parameters:y(y({mod_item:I?"profile":"art"},I?{profile_id:T||0}:{art_id:T||0}),{},{option:b})},t))},className:v().switcher,size:"s"}),(0,x.jsx)(u.L,{isTextBodyM:!0,onClick:function(){Z(!B)},isFullWidth:!0,icon:B?"chevronUpOutline16x16":"chevronDownOutline16x16",iconSize:16,iconColor:"var(--palettes-gray-160)",className:v().color,dataTestId:"comment__button--toggle",children:b})]}),B&&!j&&(0,x.jsx)(f.iO,{className:i()(v().comment),dataTestId:"comment__text--moderator",children:D}),B&&j&&(0,x.jsx)("div",{className:i()(v().commentModerator),children:(0,x.jsx)(p.o,{type:"textarea",labelText:"ÐомменÑаÑий",value:M,debouncedValidate:function(){H("comment")},errorMessage:U.comment,onChange:function(e){z(e),W((0,h.yV)({id:Number(w),comment:e})),w&&N&&C&&C({id:w,title:b,tab:N,comment:e},S)},isDisabled:!S,dataTestId:"comment__commentInput"})})]})}},29934:function(e,t,n){"use strict";n.d(t,{a:function(){return u}});var r=n(67294),a=n(35407),o=n(62754),i=n(53418),s=n(89637),l=n(55310),c=n.n(l),d=n(85893),u=function(e){var t=e.onSubmit,n=e.onDecline,l=e.passphrase,u=void 0===l?"УÐÐÐÐТЬ":l,p=e.selectedEntity,m=e.title,f=e.description,_=(0,r.useState)(""),h=_[0],g=_[1],v=(0,r.useState)(""),x=v[0],b=v[1];return(0,d.jsxs)("form",{onSubmit:function(e){e.preventDefault(),h.trim()===u?t(p):b("ÐапиÑиÑе ".concat(u))},children:[(0,d.jsx)(i.r6,{children:(0,d.jsx)(s.mj,{children:m})}),(0,d.jsxs)("div",{className:c().deleteEntityDialogContent,children:[(0,d.jsx)(s.iO,{children:f}),(0,d.jsxs)(s.iO,{children:["ÐапиÑиÑе ",(0,d.jsx)("b",{children:u})," Ð´Ð»Ñ Ð¿Ð¾Ð´ÑвеÑждениÑ:"]}),(0,d.jsx)(o.o,{className:c().deleteEntityDialogInput,onChange:function(e){b(""),g(e)},value:h,type:"text",errorMessage:x,dataTestId:"deleteEntityDialog__input"})]}),(0,d.jsxs)(i.mz,{className:c().deleteEntityDialogFooter,children:[(0,d.jsx)(a.z,{look:"tertiary",size:"medium",onClick:function(){g(""),b(""),n()},dataTestId:"button--cancel",children:"ÐÑмена"}),(0,d.jsx)(a.z,{size:"medium",type:"submit",dataTestId:"button--confirm",children:"ÐодÑвеÑдиÑÑ"})]})]})}},38452:function(e,t,n){"use strict";n.d(t,{D:function(){return k}});var r=n(50029),a=n(64687),o=n.n(a),i=n(67294),s=n(14416),l=n(3490),c=n(50184),d=n(35407),u=n(53418),p=n(89637),m=n(89074),f=n(90494),_=n(90976),h=n(64910),g=n(89473),v=n(24832),x=n(59325),b=n(42221),y=n(35448),C=n.n(y),j=n(85893),k=function(e){var t,n,a,y=e.isOpen,k=e.ofertaSlug,D=e.isReload,w=(0,s.v9)(_.KH),N=(0,s.I0)(),T=(t=(0,r.Z)(o().mark(function e(){var t;return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,N((0,g.f)(k||"offer"));case 2:t=e.sent,(0,x.f)(t);case 4:case"end":return e.stop()}},e)})),function(){return t.apply(this,arguments)}),E=(n=(0,r.Z)(o().mark(function e(){var t,n;return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t="acceptAnOffer",e.next=3,(0,b.B)({apiPointName:t,body:k?{oferta_slug:k}:{}});case 3:n=e.sent,(0,x.f)(n);case 5:case"end":return e.stop()}},e)})),function(){return n.apply(this,arguments)}),I=(a=(0,r.Z)(o().mark(function e(){return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,E();case 2:N((0,v.E)()),D&&window.location.reload();case 4:case"end":return e.stop()}},e)})),function(){return a.apply(this,arguments)});return(0,i.useEffect)(function(){return T(),function(){N((0,h.Vn)())}},[]),(0,j.jsxs)(u.u_,{isOpen:y,title:"ÐÐ·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð¿Ñавил пÑблиÑной оÑеÑÑÑ",className:C().modalCustomStyle,shouldCloseOnOverlayClick:!1,shouldCloseOnEsc:!1,children:[(0,j.jsx)("div",{className:C().wrapperOffer,children:w?(0,j.jsx)(f.G,{className:C().offerPageBackgroun
1d,staticTitle:w.name,staticText:w.text}):(0,j.jsx)(m.x,{})}),(0,j.jsxs)(p.iO,{className:C().goToFormText,children:[(0,j.jsx)(p.T,{children:"ÐÑли Ñ Ð²Ð°Ñ Ð½Ðµ оÑоÑмлен ÑÑаÑÑÑ ÑамозанÑÑого или ÐÐ,"})," ",(0,j.jsx)(c.a,{href:l.x.statistics.naturalPerson,dataTestId:"dialogOffer__formLink",children:"заполниÑе ÑоÑмÑ"}),"."]}),(0,j.jsx)(u.mz,{className:C().footerModal,children:(0,j.jsx)(d.z,{onClick:I,size:"medium",dataTestId:"dialogOffer__acceptButton",children:"ÐÑинÑÑÑ"})})]})}},54507:function(e,t,n){"use strict";n.d(t,{L:function(){return m}});var r=n(59499),a=n(94184),o=n.n(a),i=n(4486),s=n(82864),l=n(97910),c=n(89637),d=n(68746),u=n.n(d),p=n(85893),m=function(e){var t,n,a,d=e.title,m=e.royaltyRate,f=e.price,_=e.items,h=e.isActive,g=e.onClick,v=e.className,x=e.shouldHideButton,b=e.directAgreementRoyalty,y=e.hasDirectAgreement,C=e.isLocked,j=e.dataTestId,k=void 0===j?"book-licence-card":j,D=e.isDisabled,w=void 0!==D&&D,N=e.shouldHidePercent,T=e.isExclusive,E=e.isHundredPercentRoyalty,I=e.hundredPercentRoyaltyPrice,A=e.isHundredPercentRoyaltyEmptyPrice,O=e.isAudio,S=e.isVipDraft,P=_.map(function(e){var t=e.key,n=e.text;return(0,p.jsxs)("div",{className:u().item,children:[(0,p.jsx)("div",{className:u().icon,children:(0,p.jsx)(i.J,{icon:"doneOutline16x16",size:16})}),(0,p.jsx)(c.YS,{className:u().caption,children:n})]},t)});return(0,p.jsxs)("div",{className:o()("shadowLevel0",u().wrapper,(0,r.Z)({},u().wrapperActive,h),(0,r.Z)({},u().noPrice,void 0===f),v),"data-testid":k,children:[void 0!==T&&T&&(0,p.jsx)(s.e,{info:"ÐЫШРРÐЯÐТÐ",className:o()(u().exclusiveLabel,(0,r.Z)({},u().isOnBorder,h)),icon:"aiOutline16x16"}),(0,p.jsxs)("div",{className:u().contentWrapper,children:[(0,p.jsxs)("div",{className:u().head,children:[(0,p.jsx)(c.mj,{className:o()(u().title,(0,r.Z)({},u().disabled,w)),children:d}),(0,p.jsxs)(c.iO,{className:o()(u().subtitle,(t={},(0,r.Z)(t,u().container,y),(0,r.Z)(t,u().disabled,w),t)),children:[E&&m&&(0,p.jsxs)(p.Fragment,{children:["ÐолÑÑайÑе"," ",(0,p.jsxs)("strong",{className:u().oldPercent,children:[m,"%"]})," ",(0,p.jsx)("strong",{children:"100%"})," ÑоÑлÑи Ñ ",(0,p.jsx)("br",{})," пÑодажи"," ",O?"аÑдиокниги":"ÑлекÑÑонной книги"]}),!!m&&!y&&!E&&!S&&(0,p.jsxs)(p.Fragment,{children:["ÐолÑÑайÑе ",(0,p.jsxs)("strong",{children:[m,"%"]})," ÑоÑлÑи Ñ Ð¿Ñодажи",(0,p.jsx)("br",{})," ",O?"аÑдиокниги":"ÑлекÑÑонной книги"]}),S&&(0,p.jsxs)(p.Fragment,{children:["ÐолÑÑайÑе ",(0,p.jsxs)("strong",{children:[m,"%"]})," ÑоÑлÑи Ñ Ð¿Ñодажи"]}),!m&&(0,p.jsx)(p.Fragment,{children:" РаÑпÑоÑÑÑанÑеÑÑÑ Ð±ÐµÑплаÑно "}),!!m&&y&&(0,p.jsxs)(c.iO,{className:u().container,children:[" ",b," "]})]})]}),!y&&f&&!N&&(0,p.jsxs)("div",{className:o()(u().priceBlock,(0,r.Z)({},u().disabled,w)),children:[E&&!A&&(0,p.jsx)(c.mj,{className:u().oldPrice,children:f}),(0,p.jsx)(c.H2,{className:o()(u().price,(n={},(0,r.Z)(n,u().disabled,w),(0,r.Z)(n,u().emptyPrice,A),n)),children:I||f})]}),!x&&(0,p.jsx)("div",{className:u().buttonWrapper,children:(0,p.jsx)(l.g,{text:"ÐÑбÑаÑÑ",textIsSwitched:"ÐÑбÑано",onClick:g,isSwitch:h,disabled:C||w,className:o()((a={},(0,r.Z)(a,u().disabledButton,w),(0,r.Z)(a,u().isActive,h),a)),dataTestId:"".concat(k,"-button")})}),(0,p.jsx)("div",{className:u().itemsWrapper,children:P})]})]})}},83486:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});var r=n(59499),a=n(94184),o=n.n(a),i=n(67294),s=n(50184),l=n(35407),c=n(18896),d=n(4486),u=n(62754),p=n(26411),m=n(76891),f=n.n(m),_=n(85893),h=function(e){var t=e.isModerator,n=e.isCancelButton,a=e.items,m=e.className,h=e.onRemoveLink,g=e.onAddLink,v=e.isLocked,x=e.isPublicationSubmitted,b=e.hasError,y=e.errorClassName,C=(0,i.useState)(!1),j=C[0],k=C[1],D=(0,i.useState)(""),w=D[0],N=D[1],T=(0,i.useState)(""),E=T[0],I=T[1];(0,i.useEffect)(function(){!x||a.length||(0,p.d)(w)?I(""):I("ÐобавÑÑе коÑÑекÑнÑÑ ÑÑÑлкÑ"),b&&I("ÐобавÑÑе коÑÑекÑнÑÑ ÑÑÑлкÑ")},[x,a,b]);var A=a.map(function(e){var n=e.textLink,r=e.value;return(0,_.jsxs)("div",{className:f().linkItem,"data-testid":"linkUploader__item",children:[(0,_.jsx)(d.J,{size:24,icon:"linkInOutline24x24"}),(0,_.jsx)(s.a,{href:n,target:"_blank",className:f().link,dataTestId:"linkUploader__link",children:n}),!t&&!v&&(0,_.jsx)(c.L,{iconSize:24,icon:"delete24x24",className:f().buttonRemove,onClick:function(){return h(r)},dataTestId:"linkUploader__removeButton"})]},r)}),O=A.length>=10;return(0,_.jsxs)("div",{className:o()(f().wrapperBlock,m),children:[A,t||j||v?!t&&!v&&a.length<10&&(0,_.jsx)(c.L,{icon:"plusOutline24x24",iconSize:24,iconPosition:"left",className:f().functionButton,onClick:function(){return k(!1)},dataTestId:"linkUploader__addButton",children:"ÐобавиÑÑ ÑÑÑлкÑ"}):(0,_.jsx)("div",{className:f().wrapper,children:(0,_.jsxs)("form",{onSubmit:function(e){e.preventDefault()},children:[(0,_.jsx)(u.o,{className:o()(f().input,(0,r.Z)({}
1,y||"",!!E)),labelText:"СÑÑлка",type:"text",onChange:function(e){return N(e)},value:w,errorMessage:E,dataTestId:"link-uploader-input"}),(0,_.jsxs)("div",{className:f().button,children:[(0,_.jsx)(l.z,{look:"primary",size:"small",className:f().buttonSave,type:"submit",onClick:function(){(0,p.d)(w)?(g(w),N(""),I("")):I("ÐобавÑÑе коÑÑекÑнÑÑ ÑÑÑлкÑ")},disabled:O,dataTestId:"link-uploader-save-button",children:"СоÑ
ÑаниÑÑ"}),n&&(0,_.jsx)(l.z,{look:"tertiary",size:"small",className:f().buttonReset,onClick:function(){return k(!0)},dataTestId:"link-uploader-cancel-button",children:"ÐÑмениÑÑ"})]})]})})]})}},83535:function(e,t,n){"use strict";n.d(t,{B:function(){return p},R:function(){return u}});var r=n(67294),a=n(38739),o=n(35407),i=n(13174),s=n(89637),l=n(65489),c=n.n(l),d=n(85893),u=5,p=function(e){var t=e.items,n=e.isModerator,l=e.isLocked,p=e.onChange,m=e.onDeleteFile,f=e.maxNumberFiles,_=void 0===f?u:f,h=e.className,g=e.isLoading,v=e.buttonLook,x=e.accept,b=e.description,y=e.isLoadFileButtonDisabled,C=e.isShowAlert,j=e.onClick,k=e.dataTestId,D=(0,r.useRef)(null),w=x.split(",.").join(", ").toUpperCase().substr(1),N=t.map(function(e){return(0,d.jsx)(i.P,{file:e,isModerator:n,isLoading:g,onDeleteFile:m,isLocked:l},e.id)}),T=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.length<_;null!==D.current&&e&&D.current.click(),j&&j()};return(0,d.jsxs)("div",{className:h,children:[C&&(0,d.jsx)(a.b,{className:c().alert,type:a.o.error,size:"medium",isWrapper:!0,textInformation:"ÐагÑÑзиÑе Ñайл"}),n?null:(0,d.jsxs)("div",{className:c().buttonBlock,children:[(0,d.jsx)("div",{children:(0,d.jsx)(o.z,{onClick:function(){return T()},className:c().button,size:"small",look:void 0===v?"secondary":v,disabled:y||l,isLoading:g,dataTestId:"miniFileUploader__button--choose",children:"ÐÑбÑаÑÑ Ñайл"})}),(0,d.jsx)(s.YS,{className:c().caption,dataTestId:"miniFileUploader__caption--description",children:(0,d.jsx)(s.T,{children:null!=b?b:"Ðо ".concat(_," ÑоÑмаÑа ").concat(w,", ÑÐ°Ð·Ð¼ÐµÑ Ñайла до 20 MB")})})]}),(0,d.jsx)("input",{type:"file",id:"file",ref:D,style:{display:"none"},accept:x,onChange:p,"data-testid":void 0===k?"file-input":k}),N]})}},6686:function(e,t,n){"use strict";n.d(t,{K:function(){return d}});var r=n(59499),a=n(94184),o=n.n(a),i=n(89637),s=n(36107),l=n.n(s),c=n(85893),d=function(e){var t=e.royaltyRate,n=e.price,a=e.isActive,s=e.className,d=e.cardDataTestId,u=e.isAudio;return(0,c.jsx)("div",{className:o()("shadowLevel0",l().wrapper,(0,r.Z)({},l().wrapperActive,a),s),"data-testid":void 0===d?"non-standard-royalty-rate-licence-card":d,children:(0,c.jsxs)("div",{className:l().contentWrapper,children:[(0,c.jsx)("div",{className:l().head,children:(0,c.jsx)(i.iO,{className:o()(l().subtitle,l().disabled),children:(0,c.jsxs)(c.Fragment,{children:[u?"ÐолÑÑайÑе ":"",(0,c.jsxs)("strong",{children:[t,"%"]})," ÑоÑлÑи Ñ Ð¿Ñодажи",(0,c.jsx)("br",{})," ",u?"аÑдиокниги":"ÑлекÑÑонной книги"]})})}),n&&(0,c.jsx)("div",{className:o()(l().priceBlock,l().disabled),children:(0,c.jsx)(i.H2,{className:o()(l().price),children:n})})]})})}},91695:function(e,t,n){"use strict";n.d(t,{P:function(){return p}});var r=n(59499),a=n(94184),o=n.n(a),i=n(35407),s=n(4486),l=n(89637),c=n(16077),d=n.n(c),u=n(85893),p=function(e){var t,n=e.buttonText,a=e.buttonHandler,c=e.buttonClose,p=e.status,m=e.className,f=e.header,_=e.description,h=e.position;return(0,u.jsxs)("div",{className:o()(d().root,"shadowLevel2",m,(t={},(0,r.Z)(t,d().mainWithoutButton,"error"===p),(0,r.Z)(t,d().positionTopRight,"topRight"===h),(0,r.Z)(t,d().positionBottomRight,"bottomRight"===h),t)),children:[(0,u.jsxs)("div",{className:d().leftWrapper,children:["success"===p&&(0,u.jsx)(s.J,{icon:"checkCircleOutline24x24",size:24,color:"var(--palettes-green-100)"}),"error"===p&&(0,u.jsx)(s.J,{icon:"errorOutline24x24",size:24,color:"var(--aliases-error)"}),"warning"===p&&(0,u.jsx)(s.J,{icon:"infoOutline24x24",size:24,color:"var(--palettes-blue-100)"}),(0,u.jsx)(l.mj,{className:d().header,children:(0,u.jsx)(l.T,{children:f})}),(0,u.jsx)(l.OE,{className:d().subHeader,children:"string"==typeof _?(0,u.jsx)(l.T,{children:_}):_}),n&&!!a&&(0,u.jsx)(i.z,{onClick:a,size:"small",className:d().turnButton,dataTestId:"notification__button",children:(0,u.jsx)(l.iO,{className:d().buttonText,children:n})})]}),(0,u.jsx)(s.J,{onClick:c,icon:"closeOutline24x24",size:24,className:d().closeIcon})]})}},67958:function(e,t,n){"use strict";n.d(t,{B:function(){return U}});var r=n(59499),a=n(67282),o=n(94184),i=n.n(o),s=n(20165),l=n(67294),c=n(15948),d=n(35407),u=n(89637),p=n(85795),m=n(17674),f=n(90116),_=function(e,t,n){var r=(0,f.Z)(e),a=r.splice(t,1),o=(0,m.Z)(a,1)[0];return r.splice(n,0,o),r},h=n(50029),g=n(64687),v=n.n(g),x=n(40886),b=function(e){var t=e.lastIndexOf(".");return t<=0?{name:e,extension:""}:{name:e.slice(0,t),extension:e.slice(t)}},y=n(4486),C=n(42467),j=n(60312),k=n(57850),D=n.n(k),w=n(85893),N=function(e){var t=e.errors;return(0,w.jsx)("div",{className:i()(D().audioCardErrorsContainer,s.As),children:t.map(function(e){return(0,w.jsx)(u.YS,{className:D().audioCardError,children:e},e)})})},T=function(e){if(!Number.isFinite(e)||e<0)return"0:00";
1var t=Math.floor(e),n=Math.floor(t/3600),r=Math.floor(t%3600/60),a=t%60;return n?"".concat(n,":").concat(String(r).padStart(2,"0"),":").concat(String(a).padStart(2,"0")):"".concat(r,":").concat(String(a).padStart(2,"0"))},E=n(97062),I=n.n(E),A=function(e,t,n){return Math.min(Math.max(e,t),n)},O=function(e){var t,n=e.audioFile,a=e.fragmentEndSeconds,o=e.isDisabled,s=e.isVisible,c=e.onDurationChange,d=e.onFragmentEndChange,u=(0,l.useRef)(null),p=(0,l.useState)(""),m=p[0],f=p[1],_=(0,l.useState)(0),g=_[0],x=_[1],b=(0,l.useState)(0),y=b[0],C=b[1],j=(0,l.useState)(!1),k=j[0],D=j[1],N=(0,l.useState)(!1),E=N[0],O=N[1];(0,l.useEffect)(function(){var e,t=n.file;if(t instanceof Blob){var r=URL.createObjectURL(t);return f(r),function(){URL.revokeObjectURL(r)}}f(null!==(e=n.link)&&void 0!==e?e:"")},[n.file,n.link]),(0,l.useEffect)(function(){x(0),C(0),D(!1),O(!1)},[m]),(0,l.useEffect)(function(){return function(){var e;null===(e=u.current)||void 0===e||e.pause()}},[]);var S=(t=(0,h.Z)(v().mark(function e(){var t;return v().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(!(t=u.current)||o||!g)){e.next=3;break}return e.abrupt("return");case 3:if(t.paused){e.next=6;break}return t.pause(),e.abrupt("return");case 6:return t.currentTime>=g&&(t.currentTime=0,C(0)),e.prev=7,e.next=10,t.play();case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(7),D(!1);case 15:case"end":return e.stop()}},e,null,[[7,12]])})),function(){return t.apply(this,arguments)}),P=function(e){var t=u.current;if(t&&g&&!o){var n=A(e,0,g);t.currentTime=n,C(n)}},F=g?A(a/g*100,0,100):0,L=g?A(y/g*100,0,100):0,B=12*(1-2*F/100),Z="calc(\n ".concat(F,"%\n ").concat(B>=0?"+":"-","\n ").concat(Math.abs(B),"px\n )");(0,l.useEffect)(function(){if(!s){var e;null===(e=u.current)||void 0===e||e.pause()}},[s]);var R=T(g),M="".concat(R.length,"ch");return(0,w.jsxs)("div",{className:I().root,children:[!!m&&(0,w.jsx)("audio",{ref:u,src:m,preload:"metadata",onLoadedMetadata:function(e){var t=e.currentTarget.duration;if(!Number.isFinite(t)||t<=0){O(!0);return}x(t),c(t)},onTimeUpdate:function(e){return C(e.currentTarget.currentTime)},onPlay:function(){return D(!0)},onPause:function(){return D(!1)},onEnded:function(){return D(!1)},onError:function(){O(!0)}}),s&&(0,w.jsxs)("div",{className:I().player,children:[(0,w.jsx)("button",{type:"button",className:i()(I().playButton,(0,r.Z)({},I().pauseButton,k)),onClick:S,disabled:o||!g||E,"aria-label":k?"ÐоÑÑавиÑÑ Ð½Ð° паÑзÑ":"ÐоÑпÑоизвеÑÑи"}),(0,w.jsx)("span",{className:i()(I().time,I().currentTime),style:{width:M},children:T(y)}),(0,w.jsxs)("div",{className:I().timeline,onPointerDown:function(e){var t=e.currentTarget.getBoundingClientRect();P(A((e.clientX-t.left)/t.width,0,1)*g)},onKeyDown:function(e){("ArrowLeft"===e.key||"ArrowRight"===e.key)&&(e.preventDefault(),P(y+("ArrowRight"===e.key?5:-5)))},role:"slider",tabIndex:o?-1:0,"aria-label":"ÐозиÑÐ¸Ñ Ð²Ð¾ÑпÑоизведениÑ","aria-valuemin":0,"aria-valuemax":Math.floor(g),"aria-valuenow":Math.floor(y),children:[(0,w.jsx)("span",{className:I().track}),(0,w.jsx)("span",{className:I().fragmentTrack,style:{width:Z}}),(0,w.jsx)("span",{className:I().playbackMarker,style:{left:"".concat(L,"%")}}),(0,w.jsx)("input",{className:I().fragmentRange,type:"range",min:Math.min(1,g),max:Math.max(g,1),step:1,value:A(a,0,Math.max(g,1)),onChange:function(e){return d(Number(e.target.value))},disabled:o||!g||E,"aria-label":"ÐÐ¾Ð½ÐµÑ Ð±ÐµÑплаÑного ÑÑагменÑа","aria-valuetext":T(a)}),(0,w.jsxs)("span",{className:I().fragmentTooltip,style:{left:Z},role:"tooltip",children:[(0,w.jsx)("span",{className:I().fragmentTooltipLabel,children:"ÐÐ¾Ð½ÐµÑ ÑÑагменÑа"}),(0,w.jsx)("strong",{className:I().fragmentTooltipTime,children:T(a)})]})]}),(0,w.jsx)("span",{className:i()(I().time,I().durationTime),children:R}),(0,w.jsx)("span",{className:I().fragmentHint,children:"ÐеÑеÑаÑиÑе гÑаниÑÑ, ÑÑÐ¾Ð±Ñ Ð¸Ð·Ð¼ÐµÐ½Ð¸ÑÑ Ð´Ð»Ð¸ÑелÑноÑÑÑ"})]})]})};function S(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 P(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?S(Object(n),!0).forEach(function(t){(0,r.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var F=function(e){var t,n=e.audioFile,r=e.isDisabled,a=e.isFreeFragmentFile,o=e.previewLengthSeconds,i=e.dragHandleProps,s=e.onDeleteFile,c=e.onSaveFreeFragment,p=n.errors,m=n.isLoading,f=(0,x.a)(n),_=b(f),g=_.name,k=_.extension,E=(0,l.useRef)(null),I=(0,l.useRef)(null),A=(0,l.useRef)(null),S=(0,l.useRef)(!1),F=(0,l.useState)(!1),L=F[0],B=F[1],Z=(0,l.useState)(0),R=Z[0],M=Z[1],z=(0,l.useState)(null!=o?o:null),W=z[0],G=z[1],V=(0,l.useState)(null!=o?o:null),U=V[0],H=V[1],q=(0,l.useState)(!1),Y=q[0],J=q[1],K=(0,l.useState)(!1),X=K[0],Q=K[1],$=null===U?null:U<10?"Ðлина ознакомиÑелÑного ÑÑагменÑа не Ð¼Ð¾Ð¶ÐµÑ Ð±ÑÑÑ Ð¼ÐµÐ½ÑÑе ".concat(10," ÑекÑнд"):U>300?"Ðлина ознакомиÑелÑного ÑÑагменÑа не Ð¼Ð¾Ð¶ÐµÑ Ð±ÑÑÑ Ð±Ð¾Ð»ÑÑе ".concat(300," ÑекÑнд"):null,ee=null!==$,et=!!(n.file||n.link),en=a&&!m&&!(null!=p&&p.length)&&et;(0,l.useLayoutEffect)(function(){var e=E.current,t=I.current,n=A.current;if(e&&t&&n){var r=function(){B(t.scrollWidth+n.offsetWidth>e.clientWidth)};r();var a=new ResizeObserver(r);return a.observe(e),function(){a.disconnect()}}},[g,k]),(0,l.useEffect)(function(){S.current=!1,M(0),G(null),H(null),J(!1)},[n.id,a]),(0,l.useEffect)(function(){a&&null!=o&&(G(o),H(o))},[a,o]);var er=(t=(0,h.Z)(v().mark(function e(){var t;return v().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(!R||null===U||ee||X)){e.next=2;break}return e.abrupt("return");case 2:return t=Math.min(R,Math.max(1,Math.round(U))),Q(!0),e.prev=4,e.next=7,c({endSeconds:t});case 7:if(e.sent){e.next=10;break}return e.abrupt("return");case 10:G(t),H(t),J(!1);case 13:return e.prev=13,Q(!1),e.finish(13);case 16:case"end":return e.stop()}},e,null,[[4,,13,16]])})),function(){return t.apply(this,arguments)}),ea=Y?U:W,eo=R&&null!==ea?Math.round(ea/R*100):null;return(0,w.jsxs)("div",{className:D().audioCardContainer,"data-testid":"audioCard",children:[(0,w.jsxs)("div",{className:D().audioCardHeader,children:[(0,w.jsx)("div",P(P({className:D().audioCardDragIcon,title:"ÐзмениÑÑ Ð¿Ð¾ÑÑдок Ñайла"},i),{},{children:(0,w.jsx)(y.J,{icon:"dragSortingOutline16x16",color:"var(--palettes-gray-60)"})})),(0,w.jsx)("div",{className:D().audioCardIllustration,children:(0,w.jsx)(C.Q,{width:41,height:41,imageType:"mp3"})}),(0,w.jsxs)("div",{className:D().audioCardTextContainer,children:[(0,w.jsx)("div",{title:f,children:(0,w.jsx)(u.pf,{children:(0,w.jsxs)("span",{ref:E,className:D().audioCardFileNameContent,children:[(0,w.jsx)("span",{ref:I,className:D().audioCardFileNameBase,children:g}),(0,w.jsx)("span",{className:D().audioCardFileNameSuffix,children:L?"...".concat(k):k}),(0,w.jsx)("span",{ref:A,className:D().audioCardFileExtensionMeasure,"aria-hidden":!0,children:k})]})})}),en&&(0,w.jsxs)("div",{className:D().freeFragmentSummary,children:[(0,w.jsx)("span",{className:D().desktopSummaryLabel,children:"ÐеÑплаÑнÑй ÑÑагменÑ:"}),(0,w.jsx)("span",{className:D().time,children:T(ea||0)})," ",!Y&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)("span",{className:D().time,children:["(",eo,"% Ð¾Ñ Ñайла)"]}),(0,w.jsx)(d.z,{className:D().editFreeFragmentButton,onClick:function(){H(W),J(!0)},disabled:r,dataTestId:"button_change_free_fragment",children:"ÐзмениÑÑ"})]})]}),!!(null!=p&&p.length)&&(0,w.jsx)(N,{errors:p})]}),(0,w.jsx)("div",{className:D().audioCardControlsContainer,children:m?(0,w.jsxs)("span",{className:D().audioCardLoading,children:[(0,w.jsx)("span",{className:D().audioCardLoadingTextContainer,children:"ÐагÑÑзка..."}),(0,w.jsx)(j.D,{})]}):(0,w.jsx)("div",{className:D().audioCardDeleteFileControl,onClick:function(){r||s(n)},"data-testid":"audioCard__button--delete",children:(0,w.jsx)(y.J,{icon:"delete24x24",size:24,color:"var(--palettes-gray-60)"})})})]}),en&&(0,w.jsxs)("div",{className:D().freeFragmentEditor,hidden:!Y,children:[(0,w.jsx)(O,{audioFile:n,fragmentEndSeconds:null!=U?U:0,isDisabled:r,isVisible:Y,onDurationChange:function(e){var t=Math.max(1,Math.floor(e)),n=function(e){return Math.min(t,Math.max(1,Math.round(e)))},r=n(null!=o?o:Math.min(e,300,Math.max(10,Math.round(.24*e))));
1null!=o||S.current||(S.current=!0,c({endSeconds:r}).then(function(e){e||(S.current=!1)},function(){S.current=!1})),M(e),G(function(e){return n(null!=e?e:r)}),H(function(e){return n(null!=e?e:r)})},onFragmentEndChange:H}),(0,w.jsxs)("div",{className:D().freeFragmentActions,children:[(0,w.jsx)(d.z,{size:"small",onClick:er,isLoading:X,disabled:r||X||!R||null===U||ee,dataTestId:"button_save_free_fragment",children:"СоÑ
ÑаниÑÑ"}),(0,w.jsx)(d.z,{size:"small",look:"secondary",onClick:function(){H(W),J(!1)},disabled:r||X||null===W,dataTestId:"button_cancel_free_fragment",children:"ÐÑмениÑÑ"})]}),$&&(0,w.jsx)("span",{className:D().rangeError,children:$})]})]})},L=n(73842),B=n(53418),Z=n(99982),R=n.n(Z),M=function(e){var t=e.isOpened,n=e.onClose;return(0,w.jsxs)(B.u_,{className:R().modalWrapper,isOpen:t,onRequestClose:n,children:[(0,w.jsx)(B.r6,{children:(0,w.jsx)(u.mj,{children:"ЧÑо важно знаÑÑ?"})}),(0,w.jsxs)("div",{className:R().audioRecommendationDialogContentContainer,children:[(0,w.jsx)(u.pf,{children:"ФоÑÐ¼Ð°Ñ Ð¸ ÑайлÑ"}),(0,w.jsxs)("ul",{className:R().text,children:[(0,w.jsx)(u.OE,{Tag:"li",children:(0,w.jsx)(u.T,{children:"Ðо ".concat(L.TX," Ñайлов, MP3, до 170 MB каждÑй")})}),(0,w.jsx)(u.OE,{Tag:"li",children:(0,w.jsx)(u.T,{children:"РекомендÑемÑй биÑÑÐµÐ¹Ñ 128 кбиÑ/Ñ, ÑÑеÑео"})}),(0,w.jsx)(u.OE,{Tag:"li",children:(0,w.jsx)(u.T,{children:"Ðдна глава = один Ñайл, до 3 ÑаÑов"})})]}),(0,w.jsx)(u.pf,{className:R().title,children:"ÐзвÑÑка"}),(0,w.jsx)(u.OE,{className:R().text,children:"ÐÑдиокнига должна бÑÑÑ Ð¾Ð·Ð²ÑÑена живÑм Ñеловеком."}),(0,w.jsx)(u.pf,{className:R().title,children:"Ð¤Ð¾Ð½Ð¾Ð²Ð°Ñ Ð¼ÑзÑка"}),(0,w.jsx)(u.OE,{className:R().text,children:"Public Domain (\xabÐбÑеÑÑвенное доÑÑоÑние\xbb) или Ñ Ð¿Ð¾Ð´ÑвеÑждÑннÑми пÑавами на иÑполÑзование."}),(0,w.jsx)(u.pf,{className:R().title,children:"ФÑагменÑ"}),(0,w.jsxs)(u.OE,{className:R().text,children:["ÐзнакомиÑелÑнÑй ÑÑÐ°Ð³Ð¼ÐµÐ½Ñ ÑоздаÑÑÑÑ Ð°Ð²ÑомаÑиÑеÑки."," "]})]}),(0,w.jsx)(B.mz,{className:R().audioRecommendationDialogFooter,children:(0,w.jsx)(d.z,{look:"primary",size:"small",onClick:n,dataTestId:"button--good",children:"ХоÑоÑо"})})]})},z=n(46391),W=n.n(z);function G(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 V(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?G(Object(n),!0).forEach(function(t){(0,r.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):G(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var U=function(e){var t=e.className,n=e.audioFiles,o=e.previewLengthSeconds,m=e.onUploadFiles,f=e.onDeleteFile,h=e.onReorderAudioFiles,g=e.onSaveFreeFragment,v=e.isLoading,x=e.errorMessage,b=e.isLocked,y=(0,l.useState)(!1),C=y[0],j=y[1],k=(0,l.useState)(!1),D=k[0],N=k[1],T=function(e){var t;(null===(t=n[0])||void 0===t?void 0:t.id)===e.id&&N(!0),f(e)};return(0,w.jsxs)("div",{className:i()(W().phonogrammDownloadComponentContainer,t,(0,r.Z)({},s.As,!!x)),"data-testid":"audioUploader__wrapper",children:[(0,w.jsx)(u.H3,{children:"Ð¤Ð°Ð¹Ð»Ñ Ð°Ñдиокниги"}),(0,w.jsxs)(u.OE,{className:W().phonogrammDownloadText,children:[(0,w.jsx)(d.z,{look:"tertiary",size:"small",onClick:function(){return j(!0)},className:W().phonogrammDownloadRecommendationsAlertOpenDialogButton,dataTestId:"audioUploader__importantInfoButton",children:"ÐÐ°Ð¶Ð½Ð°Ñ Ð¸Ð½ÑоÑмаÑиÑ"})," ","о загÑÑзке аÑдиоÑайлов"]}),!!n.length&&(0,w.jsx)(c.Z5,{onDragEnd:function(e){if(e.destination&&!v){var t,r,a=_(n,e.source.index,e.destination.index);(null===(t=n[0])||void 0===t?void 0:t.id)!==(null===(r=a[0])||void 0===r?void 0:r.id)&&N(!0),h(a)}},children:(0,w.jsx)(c.bK,{droppableId:"droppable",children:function(e){return(0,w.jsxs)("div",V(V({},e.droppableProps),{},{ref:e.innerRef,className:W().phonogrammDownloadComponentAudioFilesContainer,children:[n.map(function(e,t){var n;return(0,w.jsx)(c._l,{draggableId:String(e.id),index:t,isDragDisabled:!!(null!==(n=e.errors)&&void 0!==n&&n.length)||v||b,children:function(n,r){return(0,w.jsx)("div",V(V({ref:n.innerRef},n.draggableProps),{},{children:(0,w.jsx)(F,{audioFile:e,isDisabled:r.isDragging||b,isFreeFragmentFile:0===t,previewLengthSeconds:0!==t||D?null:o,dragHandleProps:n.dragHandleProps,onDeleteFile:T,onSaveFreeFragment:g})}))}},e.id)}),e.placeholder]}))}})}),(0,w.jsxs)("div",{className:W().phonogrammDownloadDownloadFilesBlock,children:[(0,w.jsx)(p.b,{accept:".mp3",uploaderButtonText:"ÐÑбÑаÑÑ ÑайлÑ",multiple:!0,onFileChange:function(e){e.target.files&&(m(Array.from(e.target.files).map(function(e,t){return{file:e,isLoading:!0,ordering:t,id:(0,a.DM)(),uuid:(0,a.DM)(),file_name:e.name}})),e.target.value="")},isLocked:b,isLoading:v,customUploadComponent:(0,w.jsx)(d.z,{disabled:b,size:"small",look:"secondary",isLoading:v,dataTestId:"audioUploader__chooseFilesButton",children:"ÐÑбÑаÑÑ ÑайлÑ"})}),(0,w.jsx)(u.Yd,{children:"Ðо 500 Ñайлов ÑоÑмаÑа MP3, ÑÐ°Ð·Ð¼ÐµÑ Ñайла до 170 MB"}),!!x&&(0,w.jsx)(u.OE,{className:W().phonogrammValidationError,children:x})]}),(0,w.jsx)(M,{isOpened:C,onClose:function(){return j(!1)}})]})}},90494:function(e,t,n){"use strict";n.d(t,{G:function(){return l}});var r=n(67294),a=n(89637),o=n(58401),i=n.n(o),s=n(85893),l=function(e){var t=e.staticT
1itle,n=e.staticText,o=e.className,l=e.withToc,c=(0,r.useRef)(null),d=(0,r.useState)([]),u=d[0],p=d[1],m=(0,r.useState)(!1),f=m[0],_=m[1],h=(0,r.useMemo)(function(){return"h2, h3, h4, h5, h6"},[]);(0,r.useEffect)(function(){if(l){var e=c.current;if(e){var t=Array(7).fill(0),n=[];Array.from(e.querySelectorAll(h)).forEach(function(e,r){var a=Number(e.tagName.substring(1));if(!(a<2)&&!(a>6)){t[a]+=1;for(var o=a+1;o<=6;o+=1)t[o]=0;for(var i=[],s=3;s<=a;s+=1)t[s]>0&&i.push(t[s]);var l=i.join(".");if(!e.id){var c=(e.textContent||"section").trim().toLowerCase().replace(/[^a-zA-Zа-ÑÐ-Я0-9\s-_]/g,"").replace(/\s+/g,"-").slice(0,64);e.id="".concat(c||"section","-").concat(r+1)}n.push({id:e.id,text:e.textContent||"",level:a,numberLabel:l})}}),p(n)}}},[n,l,h]),(0,r.useEffect)(function(){var e=function(){_(window.scrollY>200)};return window.addEventListener("scroll",e,{passive:!0}),e(),function(){window.removeEventListener("scroll",e)}},[]);var g=function(e){var t,n=null===(t=c.current)||void 0===t?void 0:t.querySelector("#".concat(CSS.escape(e)));if(n){var r=n.getBoundingClientRect().top+window.scrollY;window.scrollTo({top:Math.max(r-120,0),behavior:"smooth"})}};return(0,s.jsxs)("section",{className:o,children:[(0,s.jsx)(a.H1,{className:i().title,children:t}),l&&u.length>0&&(0,s.jsxs)("nav",{className:i().toc,"aria-label":"СодеÑжание",children:[(0,s.jsx)("h3",{className:i().tocTitle,children:"СÐÐÐÐ ÐÐÐÐÐ"}),(0,s.jsx)("ul",{className:i().tocList,children:u.map(function(e){return(0,s.jsx)("li",{className:i()["tocLevel".concat(e.level)],children:(0,s.jsxs)("a",{href:"#".concat(e.id),onClick:function(t){t.preventDefault(),g(e.id)},children:[e.numberLabel&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:i().tocNumber,children:e.numberLabel})," "]}),(0,s.jsx)("span",{className:i().tocText,children:e.text})]})},e.id)})})]}),(0,s.jsx)("div",{ref:c,dangerouslySetInnerHTML:{__html:n}}),f&&(0,s.jsxs)("div",{className:i().scrollButtons,"aria-label":"ÐавигаÑÐ¸Ñ Ð¿ÑокÑÑÑки",children:[(0,s.jsx)("button",{type:"button",className:i().scrollButton,onClick:function(){window.scrollTo({top:0,behavior:"smooth"})},"aria-label":"ÐвеÑÑ
",children:"â²"}),(0,s.jsx)("button",{type:"button",className:i().scrollButton,onClick:function(){var e=document.documentElement.scrollHeight||document.body.scrollHeight;window.scrollTo({top:e,behavior:"smooth"})},"aria-label":"Ðниз",children:"â¼"})]})]})}},25869:function(e,t,n){"use strict";n.d(t,{DO:function(){return o},FC:function(){return u},V7:function(){return i},_H:function(){return l},aM:function(){return c},bK:function(){return a},co:function(){return d},yG:function(){return s}});var r=n(17610),a=[{id:"",name:"ÐаÑвка на ÑаÑÑмоÑÑении",value:r.s.reviewByModerator},{id:"",name:"ÐÑказ Ð¾Ñ Ð¿ÑоизводÑÑва",value:r.s.canceledProduction},{id:"",name:"РпÑоизводÑÑве",value:r.s.productionStart},{id:"",name:"ÐпÑбликовано",value:r.s.published},{id:"",name:"ÐпÑбликовано",value:r.s.unpublishing},{id:"",name:"СнÑÑо Ñ Ð¿ÑбликаÑии",value:r.s.remoteUnpublished},{id:"",name:"ÐÑибка",value:r.s.failure},{id:"",name:"ÐаÑвка на Ñоздание",value:r.s.applicationProduction},{id:"",name:"РпÑоизводÑÑво",value:r.s.productionSend},{id:"",name:"ÐÐ¶Ð¸Ð´Ð°ÐµÑ Ð¼Ð¾Ð´ÐµÑаÑиÑ",value:r.s.awaitingModeration},{id:"",name:"РоÑеÑеди на модеÑаÑиÑ",value:r.s.queue},{id:"",name:"РоÑеÑеди на модеÑаÑиÑ",value:r.s.bookOnModeration},{id:"",name:"ÐÑклонено модеÑаÑоÑом",value:r.s.rejected},{id:"",name:"ÐозвÑаÑено на доÑабоÑкÑ",value:r.s.rework},{id:"",name:"ÐоÑово к ÑозданиÑ",value:r.s.readyToCreate},{id:"",name:"ÐоÑово к ÑозданиÑ",value:r.s.ready},{id:"",name:"Ðа модеÑаÑии",value:r.s.pending},{id:"",name:"Ðа модеÑаÑии",value:r.s.uploaded},{id:"",name:"ÐÑклонено модеÑаÑоÑом",value:r.s.canceled},{id:"",name:"РпÑоизводÑÑве",value:r.s.production},{id:"",name:"СнÑÑо Ñ Ð¿ÑбликаÑии",value:r.s.unpublished},{id:"",name:"ÐмпоÑÑ Ð´Ð°Ð½Ð½ÑÑ
",value:r.s.importing},{id:"",name:"ÐÑдиокнига не ÑÑÑеÑÑвÑеÑ",value:r.s.notExists},{id:"",name:"ÐÑÑÑ Ð½ÐµÐ¾Ð¿ÑбликованнÑе изменениÑ",value:r.s.draft}],o=[r.s.rejected,r.s.notExists,r.s.canceled,r.s.rework],i=[r.s.published,r.s.unpublishing],s=[r.s.unpublished,r.s.remoteUnpublished],l=55,c=170,d=20,u=55},51270:function(e,t,n){"use strict";n.d(t,{a:function(){return s}});var r,a=((r={}).mac="mac",r.windows="windows",r),o=n(32290),i=function(e,t,n){var r,i=n||(o.V5?a.mac:a.windows);return!!e&&(r=e.size,(i===a.mac?r/1e6:r/1048576)<=t)},s=function(e,t){return e.some(function(e){return!i(e,t,o.V5?a.mac:a.windows)})}},63043:function(e,t,n){"use strict";n.d(t,{x:function(){return a}});var r=n(25869),a=function(e){return!!e&&e.length<=r._H}},64729:function(e,t,n){"use strict";n.d(t,{f:function(){return a}});var r,a=((r={}).draft="draft",r.free="free",r.exclusive="exclusive",r.nonExclusive="non_exclusive",r.authorExclusive="author_exclusive",r)},4205:function(e,t,n){"use strict";n.d(t,{z:function(){return r}});var r=function(e){return e.map(function(e){return{employee_id:e.id||e.employee_id||0,type_id:e.type_id}})}},44358:function(e,t,n){"use strict";n.d(t,{T:function(){return i}});var r=n(59499);function a(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 o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?a(Object(n),!0).forEach(function(t){(0,r.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var i=function(e){return Array.isArray(e)&&0!==e.length?e.map(function(e){return o(o({},e),{},{id:e.employee_id||e.id})}):[]}},89406:function(e,t,n){"use strict";n.d(t,{j:function(){return b}});var r=n(59499),a=n(84035),o=n(94184),i=n.n(o),s=n(67294),l=n(67448),c=n(89637),d=n(39424),u=n(74202),p=n(35407),m=n(18896),f=n(269),_=n.n(f),h=n(85893),g=function(e){var t=e.isDisabled,n=e.handleSelectEmployee,r=e.controlType;if(!r)return d.Tb("controlType for ArtEmployeeActionControl is not defined"),null;switch(r){case u.Z.addNewEmployeeFromList:return(0,h.jsx)(p.z,{look:"tertiary",size:"small",className:_().artEmployeeCardButton,disabled:t,onClick:n,dataTestId:"select-person-button",children:"ÐÑбÑаÑÑ"});case u.Z.changeArtAuthor:return(0,h.jsx)(m.L,{iconPosition:"left",icon:"authorSwitchOutline24x24",isActive:!t,onClick:n,className:_().artEmployeeCardIcon,dataTestId:"change-person-button",children:"СмениÑÑ Ð°Ð²ÑоÑа"});case u.Z.unlinkEmployeeFromArt:return(0,h.jsx)(m.L,{iconPosition:"left",icon:"linkOffOutline24x24",isActive:!t,onClick:n,className:_().artEmployeeCardIcon,dataTestId:"unlink-person-button",children:"ÐÑвÑзаÑÑ"});default:return d.Tb("Incorrect controlType for ArtEmployeeActionControl is provided"),null}},v=n(74053),x=n.n(v),b=function(e){var t,n=e.onSelectEmployee,o=e.employeeInfo,d=e.className,u=e.isDisabled,p=e.employeeRoleType,m=e.controlType,f=e.employeeRoleValue,_=e.showEmployeeArts,v=e.artId,b=e.userProfile,y=e.dataTestId,C=o.first_name,j=o.last_name,k=o.middle_name,D=o.published_books_count,w=o.published_drafts_count,N=o.is_coauthor,T=(0,s.useCallback)(function(){n&&n(o),window.location.pathname.includes("/moderation/")&&(0,a.nv)({event_type:"change_author_click",event_parameters:{mod_item:"art",art_id:v||""}},b)},[n,o,v,b]);return(0,h.jsx)("div",{className:i()(x().artEmployeeCardContainer,d),children:(0,h.jsxs)("div",{className:x().artEmployeeCardContent,"data-testid":void 0===y?"artEmployeeCard__content":y,
1children:[(0,h.jsx)(l.q,{className:x().avatar,name:j}),(0,h.jsxs)("div",{className:x().artEmployeeCardWrapper,children:[(0,h.jsxs)("div",{className:i()((t={},(0,r.Z)(t,x().artEmployeeCardUserNameWrapper,!p),(0,r.Z)(t,x().artEmployeeCardEmployeeRoleWrapper,!p),(0,r.Z)(t,x().artEmployeeCardWithoutRole,void 0===f),t)),children:[f&&(0,h.jsx)(c.iO,{className:x().artEmployeeCardRole,children:f}),(0,h.jsxs)(c.K0,{className:i()(x().artEmployeeCardName,(0,r.Z)({},x().shortName,u)),children:[C," ",k," ",j]}),_&&(0,h.jsx)(c.iO,{className:x().artsCount,children:D||w?"ÐпÑбликовано книг: ".concat(null!=D?D:0,", книг в пÑоÑеÑÑе: ").concat(null!=w?w:0):"ÐÐµÑ Ð¾Ð¿ÑбликованнÑÑ
книг"})]}),!u&&!N&&(0,h.jsx)(g,{controlType:m,handleSelectEmployee:T,isDisabled:u})]})]})})}},31208:function(e,t,n){"use strict";n.d(t,{M:function(){return Q}});var r,a=n(39424),o=n(72363),i=n(84035),s=n(94184),l=n.n(s),c=n(96486),d=n(90116),u=n(59499),p=n(50029),m=n(64687),f=n.n(m),_=n(69024),h=n(67294),g=n(14416),v=n(36613),x=n(42221),b=n(74202);function y(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 C(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach(function(t){(0,u.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var j=function(e){var t,n,r=e.artId,s=e.artType,l=e.employees,c=e.employeesRoles,u=e.changeEmployeesList,m=e.meta,y=e.authorGroup,j=(0,g.v9)(v.d),k=(0,h.useMemo)(function(){return c&&c.author?c.author.id:0},[c]),D=(0,h.useMemo)(function(){return c?Object.values(c):[]},[c]),w=(0,h.useState)(b.B.none),N=w[0],T=w[1],E=(0,h.useState)(!1),I=E[0],A=E[1],O=(0,h.useState)(null),S=O[0],P=O[1],F=(0,h.useState)([]),L=F[0],B=F[1],Z=(0,h.useState)([]),R=Z[0],M=Z[1],z=(0,h.useRef)(null),W=(0,h.useRef)(null),G=(t=(0,p.Z)(f().mark(function e(t){var n,a,o,i;return f().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return A(!0),n="getEmployeesRolesForBook",A(!0),e.next=5,(0,x.B)({apiPointName:n,queryParams:{art_id:r,type_id:t,art_type:s}});case 5:o=(a=e.sent).result,(i=a.errors).length>0?M(i.map(function(e){return e.messages}).flat()):B(o.map(function(e){return C(C({},e),{},{employee_id:e.id})})),A(!1);case 10:case"end":return e.stop()}},e)})),function(e){return t.apply(this,arguments)}),V=function(){M([]),T(b.B.selectRole)},U=function(){M([]),T(b.B.addEmployee)},H=function(){return T(b.B.none)},q=(n=(0,p.Z)(f().mark(function e(t){var n,r,o,i,s;return f().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t.last_name){e.next=2;break}return e.abrupt("return");case 2:return M([]),A(!0),n="sendEmployee",e.next=7,(0,x.B)({apiPointName:n,body:t});case 7:if(o=(r=e.sent).result,!((i=r.errors).length>0)){e.next=15;break}M(i.map(function(e){return e.messages}).flat()),e.next=23;break;case 15:if(!S){e.next=22;break}return s=C(C({},o),{},{employee_id:o.id,type_id:S}),u([].concat((0,d.Z)(l),[s])),e.next=20,Y(s);case 20:e.next=23;break;case 22:a.Tb("Unhandled exception in handleAddPerson");case 23:A(!1),H();case 25:case"end":return e.stop()}},e)})),function(e){return n.apply(this,arguments)}),Y=function(e){switch(z.current){case b.Z.addNewEmployeeFromList:var t=l.find(function(t){return t.id===e.id&&t.type_id===S});if(S&&!t){var n,r=C(C({},e),{},{type_id:S});u([].concat((0,d.Z)(l),[r]));var s=(0,_.m)(m);(0,o.I)({action:"person_add_success",goalParams:C(C({},s),{},{author_group:y||"none",user_id:null!==(n=j.uuid)&&void 0!==n?n:""})}),m.is_draft_book&&(0,i.nv)({event_type:"person_add_success",event_parameters:{type:"story",author_group:y||"none"}},j)}else a.Tb("No selected role provided in handleSelectUserFromList");break;case b.Z.changeArtAuthor:var c=l.find(function(t){return t.id===e.id&&t.type_id===S}),p=W.current;if(p&&!c){var f=l.filter(function(e){return e.id!==p.id||e.type_id!==
1p.type_id});u([C(C({},e),{},{type_id:k})].concat((0,d.Z)(f)))}else a.Tb("No exAuthor provided or hasSameAuthorWithRoleInList is incorrect in EEditEmployeeActionType.changeArtAuthor case in handleSelectUserFromList");break;case b.Z.unlinkEmployeeFromArt:break;default:a.Tb("No EEditEmployeeActionType provided in handleSelectUserFromList")}H(),z.current=null};return{openedModal:N,isLoading:I,usersForSelection:L,errors:R,authorRoleId:k,cardRoles:D,openCreatePersonModal:function(){M([]),T(b.B.createEmployee)},openAddPersonModal:U,closeModals:H,handleSelectPersonRole:function(e){P(e.id),U(),G(e.id)},handleAddPerson:q,handleSelectUserFromList:Y,handleAddNewEmployee:function(){l.length?(z.current=b.Z.addNewEmployeeFromList,V()):(z.current=b.Z.addNewEmployeeFromList,G(k),P(k),U())},handleChangeArtAuthor:function(e){z.current=b.Z.changeArtAuthor,W.current=e,P(k),G(k),U()},handleUnlinkPersonFromArt:function(e){z.current=b.Z.unlinkEmployeeFromArt,u(l.filter(function(t){return t.id!==e.id||t.type_id!==e.type_id})),z.current=null}}},k=n(38739),D=n(35407),w=n(89637),N=n(89406),T=n(42119),E=n(16310),I=n(62754),A=n(53418),O=((r={}).name="name",r.lastName="last_name",r.middleName="middle_name",r),S=n(4187),P=n.n(S),F=n(85893),L=E.Ry().shape({surname:E.Z_().required("Ðоле \xabФамилиÑ\xbb обÑзаÑелÑное. ÐÑли Ð²Ð°Ñ Ð¿Ñевдоним ÑоÑÑÐ¾Ð¸Ñ Ð¸Ð· одного Ñлова, впиÑиÑе его в поле \xabФамилиÑ\xbb.").max(50,"ÐакÑимÑм 50 Ñимволов")}),B=function(e){var t,n=e.onSubmit,r=e.onDecline,a=e.errors,o=e.onFieldChange,i=e.isLoading,s=(0,h.useState)(""),l=s[0],c=s[1],d=(0,h.useState)(""),u=d[0],m=d[1],_=(0,h.useState)(""),g=_[0],v=_[1],x=(0,h.useState)(""),b=x[0],y=x[1],C=(0,T.V)({surname:u},L),j=C.validationErrors,N=C.validateAllFieldsAsync,E=C.debouncedValidate,S=(t=(0,p.Z)(f().mark(function e(t){return f().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t.preventDefault(),y(""),e.next=4,N();case 4:if(!(Object.keys(j).length>0)){e.next=8;break}return e.abrupt("return");case 8:n({first_name:l.trim(),middle_name:g.trim(),last_name:u.trim()},!0);case 9:case"end":return e.stop()}},e)})),function(e){return t.apply(this,arguments)}),B=function(e){return function(t){switch(y(""),e){case O.name:c(t),o&&o("lastName",t);break;case O.middleName:v(t),o&&o("middleName",t);break;case O.lastName:m(t),o&&o("lastName",t)}}};return(0,F.jsx)(A.u_,{className:P().addEmployeeDialogContainer,title:"СоздаÑÑ Ð¿ÐµÑÑонÑ",isOpen:!0,onRequestClose:r,width:"544px",children:(0,F.jsxs)("form",{onSubmit:S,children:[(0,F.jsxs)("div",{className:P().addEmployeeDialogContent,children:[(0,F.jsx)(w.K0,{className:P().addEmployeeDialogSubtitle,children:"УкажиÑе наÑÑоÑÑее Ð¸Ð¼Ñ Ð¸Ð»Ð¸ пÑевдоним"}),(0,F.jsx)(I.o,{value:l,labelText:"ÐмÑ",type:"text",onChange:B(O.name),className:P().addEmployeeDialogInput,dataTestId:"addEmployeeDialog__nameInput"}),(0,F.jsx)(I.o,{value:u,labelText:"ФамилиÑ",type:"text",onChange:B(O.lastName),className:P().addEmployeeDialogInput,debouncedValidate:function(){E("surname")},errorMessage:j.surname,dataTestId:"addEmployeeDialog__surnameInput"}),(0,F.jsx)(I.o,{value:g,labelText:"ÐÑÑеÑÑво (необÑзаÑелÑно)",type:"text",className:P().addEmployeeDialogInput,onChange:B(O.middleName),dataTestId:"addEmployeeDialog__middleNameInput"}),(b||a&&a.length>0)&&(0,F.jsx)(k.b,{className:P().addEmployeeDialogAlert,type:k.o.error,textInformation:"ÐÑ Ñже Ñоздавали пеÑÑÐ¾Ð½Ñ Ñ Ñаким именем. ÐакÑойÑе ÑÑо окно и вÑбеÑиÑе нÑжнÑÑ Ð² ÑпиÑке пеÑÑон"})]}),(0,F.jsxs)(A.mz,{children:[(0,F.jsx)(D.z,{onClick:function(){r()},className:P().addEmployeeDialogCancelButton,look:"tertiary",size:"medium",disabled:i,dataTestId:"addEmployeeDialog__cancelButton",children:"ÐÑмениÑÑ"}),(0,F.jsx)(D.z,{type:"submit",size:"medium",isLoading:i,dataTestId:"addEmployeeDialog__createButton",children:"СоздаÑÑ"})]})]})})},Z=n(67282),R=n(18896),M=n(42467),z=n(89074),W=n(59640),G=n.n(W),V=function(e){var t=e.employeesForSelection,n=e.title,r=e.onSelectEmployee,a=e.onAddNewEmployee,o=e.onDecline,i=e.isLoading,s=e.showEmployeesArts,l=e.canAddCoauthor,c=e.onInviteCoauthor,d=e.userProfile;return i?(0,F.jsx)(A.u_,{title:"ÐÑбÑаÑÑ Ð¿ÐµÑÑонÑ",className:G().selectEmployeeDialogRoot,shouldCloseOnOverlayClick:!0,shouldCloseOnEsc:!0,isOpen:!0,onRequestClose:o,children:(0,F.jsx)("div",{className:G().selectEmployeeDialogContent,children:(0,F.jsx)(z.x,{})})}):(0,F.jsx)(A.u_,{title:"ÐÑбÑаÑÑ Ð¿ÐµÑÑонÑ",className:G().selectEmployeeDialogRoot,shouldCloseOnOverlayClick:!0,shouldCloseOnEsc:!0,isOpen:!0,width:"544px",onRequestClose:o,children:t.length>0?(0,F.jsxs)("div",{children:[(0,F.jsx)(w.iO,{className:G().selectEmployeeDialogText,children:void 0===n?"ÐÑбеÑиÑе пеÑÑÐ¾Ð½Ñ Ð¸Ð· Ñанее ÑозданнÑÑ
или ÑоздайÑе новÑÑ":n}),(0,F.jsx)("div",{className:G().selectEmployeeDialogPersonsBlock,children:t.map(function(e){var t=(0,Z.DM)();return(0,F.jsx)("div",{children:(0,F.jsx)(N.j,{showEmployeeArts:s,employeeInfo:e,employeeRoleType:e.type_id,onSelectEmployee:r,controlType:b.Z.addNewEmployeeFrom
1List,userProfile:d})},t)})}),(0,F.jsx)("div",{className:G().selectEmployeeDialogFunctionButton,children:(0,F.jsx)(R.L,{icon:"plusOutline24x24",iconPosition:"left",iconSize:24,onClick:a,dataTestId:"selectEmployeeDialog__createPerson--button",children:"СоздаÑÑ Ð¿ÐµÑÑонÑ"})}),l&&(0,F.jsxs)("div",{className:G().inviteBlock,children:[(0,F.jsx)(w.Yd,{className:G().caption,dataTestId:"selectEmployeeDialog__caption--coauthorInvite",children:"ÐÑиглаÑиÑе ÑоавÑоÑа, ÑÑÐ¾Ð±Ñ Ð°Ð²ÑомаÑиÑеÑки ÑазделиÑÑ Ñ Ð½Ð¸Ð¼Ð¸ ÑоÑлÑи"}),(0,F.jsx)(D.z,{look:"secondary",size:"medium",className:G().inviteButton,onClick:function(){o(),c&&c()},dataTestId:"selectEmployeeDialog__button--addCoauthor",children:"ÐобавиÑÑ ÑоавÑоÑа"})]}),(0,F.jsx)(A.mz,{className:G().selectEmployeeDialogFooter,children:(0,F.jsx)(D.z,{onClick:o,look:"tertiary",size:"medium",dataTestId:"selectEmployeeDialog__button--cancel",children:"ÐÑмениÑÑ"})})]}):(0,F.jsx)("div",{className:G().selectEmployeeDialogCap,children:(0,F.jsxs)("div",{className:G().selectEmployeeDialogContent,children:[(0,F.jsx)(M.Q,{width:112,height:112,imageType:"persons",className:G().selectEmployeeDialogImage}),(0,F.jsx)(w.H2,{className:G().selectEmployeeDialogH2,children:"ÐÐµÑ Ð¿ÐµÑÑон"}),(0,F.jsx)(w.K0,{className:G().selectEmployeeDialogTextContent,children:"ÐÐ»Ñ Ð²ÑбÑанной Ñоли Ð½ÐµÑ Ð´Ð¾ÑÑÑпнÑÑ
пеÑÑон"}),(0,F.jsx)(D.z,{size:"medium",look:"primary",onClick:a,dataTestId:"selectEmployeeDialog__button--addPerson",children:"СоздаÑÑ Ð¿ÐµÑÑонÑ"})]})})})},U=n(66709),H=n(48200),q=n.n(H),Y=function(e){var t=e.onSubmit,n=e.onDecline,r=e.employeesRoles,a=e.canAddCoauthor,o=e.onInviteCoauthor,s=e.artId,l=e.userProfile,c=(0,h.useState)(r.author.id),d=c[0],u=c[1],p=Object.values(r).map(function(e){return{value:e.id,label:e.name}});return(0,F.jsxs)(A.u_,{title:"ÐÑбÑаÑÑ ÑолÑ",className:q().selectRoleDialogContainer,isOpen:!0,onRequestClose:n,children:[(0,F.jsxs)("div",{className:q().selectRoleDialogContent,children:[(0,F.jsx)(w.iO,{children:"ÐÑбеÑиÑе ÑÐ¾Ð»Ñ ÑÑаÑÑника"}),(0,F.jsx)("div",{className:q().selectRoleDialogRadioGroup,children:(0,F.jsx)(U.E,{isNotBlock:!0,items:p,onChange:function(e){u(e)},value:d})}),a&&(0,F.jsxs)("div",{className:q().inviteBlock,children:[(0,F.jsx)(w.Yd,{className:q().caption,dataTestId:"getRole__caption--coauthorInvite",children:"ÐÑиглаÑиÑе ÑоавÑоÑа, ÑÑÐ¾Ð±Ñ Ð°Ð²ÑомаÑиÑеÑки ÑазделиÑÑ Ñ Ð½Ð¸Ð¼Ð¸ ÑоÑлÑи"}),(0,F.jsx)(D.z,{look:"secondary",size:"medium",className:q().inviteButton,onClick:function(){n(),o&&o()},dataTestId:"getRole__button--addCoauthor",children:"ÐобавиÑÑ ÑоавÑоÑа"})]})]}),(0,F.jsxs)(A.mz,{children:[(0,F.jsx)(D.z,{onClick:function(){n()},className:q().selectRoleDialogCancelButton,look:"tertiary",size:"medium",dataTestId:"button--cancel",children:"ÐÑмениÑÑ"}),(0,F.jsx)(D.z,{size:"medium",onClick:function(){var e=Object.values(r).find(function(e){return e.id===d});e&&t(e),(0,i.nv)({event_type:"choose_person_click",event_parameters:{mod_item:"art",art_id:s}},l)},dataTestId:"button--select",children:"ÐÑбÑаÑÑ"})]})]})},J=function(e){var t=e.openedDialog,n=e.employeesForSelection,r=e.employeesRoles,o=e.isLoading,i=e.isLocked,s=e.onSelectEmployeeFromList,l=e.onAddNewEmployee,c=e.onCloseDialogs,d=e.onAddEmployee,u=e.errors,p=e.onFieldChange,m=e.onSelectEmployeeRole,f=e.showEmployeesArts,_=e.canAddCoauthor,h=e.onInviteCoauthor,g=e.artId,v=e.userProfile;switch(t){case b.B.addEmployee:return(0,F.jsx)(V,{title:"ÐÑбеÑиÑе пеÑÑÐ¾Ð½Ñ Ð¸Ð· Ñанее ÑозданнÑÑ
или ÑоздайÑе новÑÑ",isLoading:o,employeesForSelection:n,onSelectEmployee:s,onAddNewEmployee:l,onDecline:c,isLocked:i,showEmployeesArts:f,canAddCoauthor:_,onInviteCoauthor:h,userProfile:v});case b.B.createEmployee:return(0,F.jsx)(B,{onSubmit:d,onDecline:c,errors:u,onFieldChange:p,isLoading:o});case b.B.selectRole:return(0,F.jsx)(Y,{onSubmit:m,onDecline:c,employeesRoles:r,canAddCoauthor:_,onInviteCoauthor:h,artId:g,userProfile:v});case b.B.none:return null;default:return a.Tb("Wrong openedDialog value in ArtEmployeesModals component provided"),null}},K=n(13424),X=n.n(K),Q=function(e){var t=e.artId,n=e.artEmployees,r=e.isAlertVisible,s=e.alertText,d=e.isLocked,u=e.employeesRoles,p=e.onChangeEmployeesList,m=e.className,f=e.artType,_=e.onAddNewEmployee,g=e.onSelectEmployee,v=e.onSelectEmployeeRole,x=e.showEmployeesArts,y=e.canAddCoauthor,C=e.onInviteCoauthor,T=e.userProfile,E=e.isDraft,I=e.authorGroup,A=e.meta;(0,h.useEffect)(function(){(0,c.isEmpty)(u)&&a.Tb("Empty role object provided to ArtEmployees component")},[u]);var O=j({artId:t,artType:f,employeesRoles:u,changeEmployeesList:p,employees:n,meta:A||{},authorGroup:I}),S=O.isLoading,P=O.openedModal,L=O.usersForSelection,B=O.errors,Z=O.cardRoles,R=O.authorRoleId,M=O.openCreatePersonModal,z=O.handleAddNewEmployee,W=O.handleChangeArtAuthor,G=O.handleUnlinkPersonFromArt,V=O.handleAddPerson,U=O.closeModals,H=O.handleSelectPersonRole,q=O.handleSelectUserFromList,Y=(0,h.useMemo)(function(){return n.sort(function(e,t){return e.type_id===R&&t.type_id!==R?-1:e.type_id!==R&&t.type_id===R?1:e.type_id===R&&t.type_id===R?e.is_coauthor?1:-1:0})},[n]);return(0,F.jsxs)("div",{className:l()("shadowLevel0",X().artEmployeesComponentContainer,m),"data-testid":"art-persons-section",id:"employees",children:[(0,F.jsx)(w.H3,{children:"ÐвÑÐ¾Ñ Ð¸ ÑÑаÑÑники"}),(0,F.jsxs)("div",{className:X().artEmployeesComponentContent,children:[s&&r&&(0,F.jsx)(k.b,{size:"small",type:k.o.error,isWrapper:!0,textInformation:s}),Y.length>0&&Y.map(function(e,n){var r,a=e.type_id,o=a===R&&0===n,i=null===(r=Z.find(function(e){return e.id===a}))||void 0===r?void 0:r.name;return(0,F.jsx)(N.j,{showEmployeeArts:x,employeeInfo:e,employeeRoleType:a,employeeRoleValue:i,onSelectEmployee:function(e){g&&g(),o?W(e):G(e)},isDisabled:d,controlType:o?b.Z.changeArtAuthor:b.Z.unlinkEmployeeFromArt,artId:t,userProfile:T},"".concat(e.id,"_").concat(a))})]}),(0,F.jsx)("div",{className:X().artEmployeesComponentCaptionContainer,children:(0,F.jsx)(D.z,{className:X().button,size:"small",onClick:function(){_&&_(),z(),(0,i.nv)({event_type:"add_person_click",event_parameters:{mod_item:"art",art_id:t}},T);var e,n="analytics:person_add_start:draft:".concat(t),r="1"===localStorage.getItem(n);E&&!r&&((0,i.nv)({event_type:"person_add_start",event_parameters:{type:"story",author_group:I||"none"}},T),(0,o.I)({action:"person_add_start",goalParams:{type:"story",author_group:I||"none",user_id:null!==(e=null==T?void 0:T.uuid)&&void 0!==e?e:""}}),localStorage.setItem(n,"1"))},dataTestId:"add-person-button",disabled:d,children:"ÐобавиÑÑ ÑÑаÑÑника"})}),(0,F.jsx)(J,{showEmployeesArts:x,isLoading:S,isLocked:d,openedDialog:P,employeesRoles:u,onCloseDialogs:U,onSelectEmployeeRole:function(e){H(e),v&&v(e)}
1,onAddNewEmployee:M,onAddEmployee:V,onSelectEmployeeFromList:q,employeesForSelection:L,errors:B,canAddCoauthor:y,onInviteCoauthor:C,artId:t,userProfile:T})]})}},74202:function(e,t,n){"use strict";n.d(t,{B:function(){return i},Z:function(){return o}});var r,a,o=((r={}).addNewEmployeeFromList="addNewEmployeeFromList",r.changeArtAuthor="changeArtAuthor",r.unlinkEmployeeFromArt="unlinkEmployeeFromArt",r),i=((a={}).createEmployee="createEmployee",a.selectRole="selectRole",a.addEmployee="addEmployee",a.none="None",a)},91634:function(e,t,n){"use strict";n.d(t,{f:function(){return D}});var r=n(90116),a=n(94184),o=n.n(a),i=n(59499),s=n(20165),l=n(23157),c=n(3490),d=n(50184),u=n(89637),p=n(75659),m=n.n(p),f=n(85893),_=function(e){var t=e.classname,n=e.isGlossaryValid,r=e.glossaryValidationErrors,a=e.glossaryInputCurrentValue,p=e.handleChangeGlossary,_=e.handleInputChange,h=e.handleKeyDown,g=e.handleBlur,v=e.glossaryFilledValues,x=e.isLocked;return(0,f.jsxs)("div",{className:o()(t,(0,i.Z)({},s.As,!n)),children:[(0,f.jsx)(u.mj,{className:m().glossaryTitle,children:"СловаÑÑ ÑдаÑений"}),(0,f.jsx)(u.OE,{children:"ÐобавÑÑе ÑникалÑнÑе Ñлова из ваÑего ÑекÑÑа ÑеÑез запÑÑÑÑ, ÑÑÐ¾Ð±Ñ ÑлÑÑÑиÑÑ Ð¾Ð·Ð²ÑÑкÑ."}),(0,f.jsxs)("div",{className:m().glossaryInputWrapper,"data-testid":"glossary-select",children:[(0,f.jsx)(l.ZP,{className:o()(m().glossarySelect,"select-container",{withError:!n}),classNamePrefix:"select",components:{DropdownIndicator:null},inputValue:a,isMulti:!0,menuIsOpen:!1,onChange:p,onInputChange:_,onKeyDown:h,onBlur:g,placeholder:"ÐÑимеÑ: Ðол+ина, ÐипеÑ+он",value:v,isClearable:!1,isDisabled:x}),!!r.length&&r.map(function(e){return(0,f.jsx)(u.Yd,{className:m().glossaryInputCaption,Tag:"span",children:e},e)}),0===r.length&&(0,f.jsxs)("p",{className:m().notes,"data-testid":"glossary__notes",children:["ÐеÑед ÑдаÑной глаÑной ÑÑавÑÑе знак \xab+\xbb. УкажиÑе вÑе ÑоÑÐ¼Ñ Ñлова Ñ ÑдаÑениÑми Ð´Ð»Ñ Ð¿ÑавилÑной озвÑÑки в единÑÑвенном и множеÑÑвенном ÑиÑле. ÐÐ»Ñ Ñлова \xabÐеле+он\xbb ÑкажиÑе, напÑимеÑ: Ðеле+он, Ðеле+она, Ðеле+онÑ, Ðеле+оном, Ðеле+оне, Ðеле+онÑ, Ðеле+онов, Ðеле+онам, Ðеле+онов, Ðеле+онами, Ðеле+онаÑ
."," ",(0,f.jsx)(d.a,{href:c.x.faq.glossaryaudio,dataTestId:"glossary-requirements-link",children:"ÐодÑобнее"})]})]})]})},h=n(7619),g=n(33242),v=function(e){return null!=e&&e.length?e.reduce(function(e,t){return[].concat((0,r.Z)(e),[t.value.trim()])},[]).join(","):""},x=n(36458),b=n(33675),y=n(67294),C=n(87025),j=n(74402),k=n.n(j),D=function(e){var t=e.voicesOptions,n=e.genderVoice,a=e.onChangeGenderVoice,i=e.onChangeGlossary,s=e.glossary,l=e.isLocked,c=e.handleChangeDisablePublicationButton,d=(0,b.kP)(),p=d.glossaryInputCurrentValue,m=d.glossaryFilledValues,j=d.isGlossaryValid,D=d.handleAddWord,w=d.handleChangeGlossary,N=d.handleInputChange,T=d.glossaryValidationErrors;(0,y.useEffect)(function(){null==c||c(!j)},[c,j]);var E=function(){if(i){var e=(0,h.N)(p),t=(0,g.k)([].concat((0,r.Z)(s||m),(0,r.Z)(e)));i({words:v(t),valid:!(0,x.A)(t).length})}D()};return(0,f.jsxs)("div",{className:o()("shadowLevel0",k().section),"data-testid":"audioConfiguration__section",children:[(0,f.jsx)(u.H3,{className:k().h3,children:"ÐаÑÑÑойÑе озвÑÑÐºÑ Ð²Ð°Ñей книги"}),(0,f.jsx)(u.mj,{className:k().subtitle,children:"ÐÑбеÑиÑе голоÑ"}),(0,f.jsx)(C.c,{value:t.find(function(e){return e.voiceType===n})||t[0],options:t,onChange:a,className:k().select,isDisabled:l,dataTestId:"audioConfiguration__voiceSelect"}),(0,f.jsx)(_,{isGlossaryValid:j,glossaryValidationErrors:T,glossaryInputCurrentValue:p,handleChangeGlossary:function(e){w(e),i&&i({words:e?v((0,r.Z)(e)):"",valid:!!e&&!(0,x.A)((0,r.Z)(e)).length})},handleInputChange:N,handleKeyDown:function(e){","===e.key&&e.preventDefault(),b.AS.includes(e.key)&&p.length>=b.vz&&E()},handleBlur:function(){p&&E()},glossaryFilledValues:s||m,isLocked:l})]})}},73842:function(e,t,n){"use strict";n.d(t,{Hy:function(){return M},TX:function(){return R},Zg:function(){return V},_1:function(){return U},aQ:function(){return G},ck:function(){return H},eb:function(){return W},ew:function(){return z},oU:function(){return q},rE:function(){return Y}});var r,a,o,i,s,l,c,d,u,p,m,f,_,h,g,v,x,b,y,C,j,k,D,w,N,T,E,I,A,O,S,P=n(59499),F=n(25869),L=n(17610),B=n(58563),Z=n(8635),R=500,M=3,z=30,W={price:"ÐÑбеÑиÑе ÑÐµÐ½Ñ Ð°Ñдиокниги",files:"ÐагÑÑзиÑе ÑÐ°Ð¹Ð»Ñ ÑоногÑаммÑ",noReaderName:"УкажиÑе Ð¸Ð¼Ñ Ð¸ ÑÐ°Ð¼Ð¸Ð»Ð¸Ñ ÑÑеÑа или пÑевдоним",readerNameMaxLength:"ФÐÐ/пÑевдоним ÑÑеÑа не Ð´Ð¾Ð»Ð¶Ð½Ñ Ð¿ÑевÑÑаÑÑ ".concat(z," Ñимволов"),readerNameMinLength:"ФÐÐ/пÑевдоним ÑÑеÑа не менÑÑе ".concat(M," Ñимволов"),proofDocuments:"ÐагÑÑзиÑе Ñкан/ÑоÑо ÑоглаÑÐµÐ½Ð¸Ñ Ñ Ð¿ÑоизводиÑелем",filesError:"ÐедопÑÑÑимое Ð¸Ð¼Ñ Ð¸Ð»Ð¸ ÑÐ°Ð·Ð¼ÐµÑ Ñайла",filesName:"Ðазвание Ñайла не должно пÑевÑÑаÑÑ ".concat(F._H," Ñимволов"),filesType:"ÐевеÑнÑй ÑоÑÐ¼Ð°Ñ Ñайла"},G={price:[],files:[],readersName:[],proofDocuments:[],license:[],musical_fragments:[]},V=(S={},(0,P.Z)(S,L.zT.free,(s={},(0,P.Z)(s,Z.FV.basic,(r={},(0,P.Z)(r,B.oC.free,0),(0,P.Z)(r,B.oC.exclusive,25),(0,P.Z)(r,B.oC.nonExclusive,20),r)),(0,P.Z)(s,Z.FV.advanced,(a={},(0,P.Z)(a,B.oC.free,0),(0,P.Z)(a,B.oC.exclusive,40),(0,P.Z)(a,B.oC.nonExclusive,25),a)),(0,P.Z)(s,Z.FV.individual_80,(o={},(0,P.Z)(o,B.oC.free,0),(0,P.Z)(o,B.oC.exclusive,40),(0,P.Z)(o,B.oC.nonExclusive,25),o)),(0,P.Z)(s,Z.FV.individual_90,(i={},(0,P.Z)(i,B.oC.free,0),(0,P.Z)(i,B.oC.exclusive,40),(0,P.Z)(i,B.oC.nonExclusive,25),i)),s)),(0,P.Z)(S,L.zT.moderatedAudio,(p={},(0,P.Z)(p,Z.FV.basic,(l={},(0,P.Z)(l,B.oC.free,0),(0,P.Z)(l,B.oC.exclusive,25),(0,P.Z)(l,B.oC.nonExclusive,20),l)),(0,P.Z)(p,Z.FV.advanced,(c={},(0,P.Z)(c,B.oC.free,0),(0,P.Z)(c,B.oC.exclusive,40),(0,P.Z)(c,B.oC.nonExclusive,25),c)),(0,P.Z)(p,Z.FV.individual_80,(d={},(0,P.Z)(d,B.oC.free,0),(0,P.Z)(d,B.oC.exclusive,40),(0,P.Z)(d,B.oC.nonExclusive,25),d)),(0,P.Z)(p,Z.FV.individual_90,(u={},(0,P.Z)(u,B.oC.free,0),(0,P.Z)(u,B.oC.exclusive,40),(0,P.Z)(u,B.oC.nonExclusive,25),u)),p)),(0,P.Z)(S,L.zT.commerce,(g={},(0,P.Z)(g,Z.FV.basic,(m={},(0,P.Z)(m,B.oC.free,0),(0,P.Z)(m,B.oC.exclusive,25),(0,P.Z)(m,B.oC.nonExclusive,20),m)),(0,P.Z)(g,Z.FV.advanced,(f={},(0,P.Z)(f,B.oC.free,0),(0,P.Z)(f,B.oC.exclusive,40),(0,P.Z)(f,B.oC.nonExclusive,25),f)),(0,P.Z)(g,Z.FV.individual_80,(_={},(0,P.Z)(_,B.oC.free,0),(0,P.Z)(_,B.oC.exclusive,40),(0,P.Z)(_,B.oC.nonExclusive,25),_)),(0,P.Z)(g,Z.FV.individual_90,(h={},(0,P.Z)(h,B.oC.free,0),(0,P.Z)(h,B.oC.exclusive,40),(0,P.Z)(h,B.oC.nonExclusive,25),h)),g)),(0,P.Z)(S,L.zT.reader,(C={},(0,P.Z)(C,Z.FV.basic,(v={},(0,P.Z)(v,B.oC.free,0),(0,P.Z)(v,B.oC.exclusive,25),(0,P.Z)(v,B.oC.nonExclusive,20),v)),(0,P.Z)(C,Z.FV.advanced,(x={},(0,P.Z)(x,B.oC.free,0),(0,P.Z)(x,B.oC.exclusive,40),(0,P.Z)(x,B.oC.nonExclusive,25),x)),(0,P.Z)(C,Z.FV.individual_80,(b={},(0,P.Z)(b,B.oC.free,0),(0,P.Z)(b,B.oC.exclusive,40),(0,P.Z)(b,B.oC.nonExclusive,25),b)),(0,P.Z)(C,Z.FV.individual_90,(y={},(0,P.Z)(y,B.oC.free,0),(0,P.Z)(y,B.oC.exclusive,40),(0,P.Z)(y,B.oC.nonExclusive,25),y)),C)),(0,P.Z)(S,L.zT.phonogram,(N={},(0,P.Z)(N,Z.FV.basic,(j={},(0,P.Z)(j,B.oC.free,0),(0,P.Z)(j,B.oC.exclusive,40),(0,P.Z)(j,B.oC.nonExclusive,30),j)),(0,P.Z)(N,Z.FV.advanced,(k={},(0,P.Z)(k,B.oC.free,0),(0,P.Z)(k,B.oC.exclusive,45),(0,P.Z)(k,B.oC.nonExclusive,35),k)),(0,P.Z)(N,Z.FV.individual_80,(D={},(0,P.Z)(D,B.oC.free,0),(0,P.Z)(D,B.oC.exclusive,50),(0,P.Z)(D,B.oC.nonExclusive,40),D)),(0,P.Z)(N,Z.FV.individual_90,(w={},(0,P.Z)(w,B.oC.free,0),(0,P.Z)(w,B.oC.exclusive,55),(0,P.Z)(w,B.oC.nonExclusive,45),w)),N)),(0,P.Z)(S,L.zT.master,(O={},(0,P.Z)(O,Z.FV.basic,(T={},(0,P.Z)(T,B.oC.free,0),(0,P.Z)(T,B.oC.exclusive,40),(0,P.Z)(T,B.oC.nonExclusive,30),T)),(0,P.Z)(O,Z.FV.advanced,(E={},(0,P.Z)(E,B.oC.free,0),(0,P.Z)(E,B.oC.exclusive,45),(0,P.Z)(E,B.oC.nonExclusive,35),E)),(0,P.Z)(O,Z.FV.individual_80,(I={},(0,P.Z)(I,B.oC.free,0),(0,P.Z)(I,B.oC.exclusive,50),(0,P.Z)(I,B.oC.nonExclusive,40),I)),(0,P.Z)(O,Z.FV.individual_90,(A={},(0,P.Z)(A,B.oC.free,0),(0,P.Z)(A,B.oC.exclusive,55),(0,P.Z)(A,B.oC.nonExclusive,45),A)),O)),S),U=[L.s.canceled,L.s.rejected,L.s.rework],H=[{value:"Ðеважно",label:"Ðеважно",voiceType:L.$G.any,voiceName:L.pi.any},{value:"ÐÑжÑкой",label:"ÐÑжÑкой",voiceType:L.$G.man,voiceName:L.pi.man},{value:"ÐенÑкий",label:"ÐенÑкий",voiceType:L.$G.woman,voiceName:L.pi.woman}],q={value:"17",label:"199.00 â½"},Y={value:"11",label:"299.00 â½"}},7619:function(e,t,n){"use strict";n.d(t,{N:function(){return a}});var r=function(e){return e.replace(/[^a-zA-Zа-ÑÐ-ЯÑÐ+]/gi,"").trim()},a=function(e){var t=[];return e?(e.includes(",")?t=e.split(","):t.push(e),t.map(function(e){return{label:r(e),value:r(e)}})):[{label:e,value:e}]}},33242:function(e,t,n){"use strict";n.d(t,{k:function(){return r}});var r=function(e){return Array.from(new Set(e.map(function(e){return JSON.stringify(e)}))).map(function(e){return JSON.parse(e)})}},40886:function(e,t,n){"use strict";n.d(t,{a:function(){return r}});var r=function(e){var t;return e.original_name?e.original_name:e.file_name?e.file_name:null!==(t=e.file)&&void 0!==t&&t.name?e.file.name:"Ðазвание Ñайла"}},36458:function(e,t,n){"use strict";n.d(t,{A:function(){return o}});var r=n(33675),a=n(87714),o=function(e){var t=[];return e.forEach(function(e){var n=e.value;if(n.split("+").length-1>1){t.push("Ð Ñлове ".concat(n," не Ð¼Ð¾Ð¶ÐµÑ Ð±ÑÑÑ Ð±Ð¾Ð»ÑÑе одного Ñимвола +"));return}if(!a.oZ.test(n)){t.push("Слово ".concat(n," ÑодеÑÐ¶Ð¸Ñ Ð½ÐµÐ´Ð¾Ð¿ÑÑÑимÑе ÑÐ¸Ð¼Ð²Ð¾Ð»Ñ Ð¸ ÑиÑÑÑ"));return}if(!n.includes("+")){t.push("ÐобавÑÑе в Ñлово ".concat(n," Ñимвол +"));return}n.length<r.vz&&t.push("Слово ".concat(n," должно бÑÑÑ Ð´Ð»Ð¸Ð½Ð½ÐµÐµ ").concat(r.vz," Ñимволов"))}),t}},33675:function(e,t,n){"use strict";n.d(t,{AS:function(){return l},kP:function(){return d},vz:function(){return c}});var r=n(90116),a=n(36458),o=n(67294),i=n(7619),s=n(33242),l=["Enter","Tab",","],c=3,d=function(){var e=(0,o.useState)(""),t=e[0],n=e[1],d=(0,o.useState)([]),u=d[0],p=d[1],m=t.length>=c,f=(0,o.useMemo)(function(){return(0,a.A)(u)},[u]);return{glossaryInputCurrentValue:t,glossaryFilledValues:u,isGlossaryValid:(0,o.useMemo)(function(){return 0===f.length},[f]),handleAddWord:function(){if(t){var e=(0,i.N)(t);p(function(t){return(0,s.k)([].concat((0,r.Z)(t),(0,r.Z)(e)))}),n("")}}
1,handleKeyDown:function(e){if(t&&l.includes(e.key)&&t.length>=c){var a=(0,i.N)(t);p(function(e){return(0,s.k)([].concat((0,r.Z)(e),(0,r.Z)(a)))}),n(""),e.preventDefault()}},handleChangeGlossary:function(e){e&&p((0,s.k)((0,r.Z)(e)))},handleInputChange:function(e,t){"input-change"===t.action&&n(e)},isGlossaryButtonDisabled:m,glossaryValidationErrors:f,setGlossaryFilledValues:p}}},73505:function(e,t,n){"use strict";n.d(t,{N:function(){return S}});var r=n(59499),a=n(50029),o=n(64687),i=n.n(o),s=n(72363),l=n(9996),c=n.n(l),d=n(51270),u=n(17610),p=n(3799),m=n(32777),f=n(52275),_=n(68467),h=n(97230),g=n(58021),v=n(90415),x=n(67294),b=n(14416),y=n(95684),C=n(67386),j=n(21138),k=n(36613),D=n(72701),w=n(41594),N=n(71758),T=n(23907),E=n(88632),I=n(41945);function A(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 O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?A(Object(n),!0).forEach(function(t){(0,r.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var S=function(){var e,t,n,r,o,l=(0,b.I0)(),A=(0,b.v9)(C.Rt),S=(0,b.v9)(C.MY),P=(0,b.v9)(C.rM),F=(0,b.v9)(k.d),L=(0,b.v9)(j.Qq),B=A.constructor_config,Z=A.user_background_image,R=A.is_constructor,M=A.cover_type,z=(0,x.useState)(""),W=z[0],G=z[1],V=String(S.id),U=(0,x.useRef)((null==B||null===(r=B.name)||void 0===r?void 0:r.visible)&&(null===(o=B.title)||void 0===o?void 0:o.visible)),H=(0,x.useMemo)(function(){var e=L.author.id;return P.filter(function(t){return t.type_id===e})},[A,L]);(0,x.useEffect)(function(){var e,t;U.current=!!(null!=B&&null!==(e=B.name)&&void 0!==e&&e.visible&&null!==(t=B.title)&&void 0!==t&&t.visible)},[A]);var q=(e=(0,a.Z)(i().mark(function e(t){var n,r,a,o,c,d,p,m,f,_;return i().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(A.can_edit_cover){e.next=2;break}return e.abrupt("return");case 2:return n=t.generatedImg,r=t.backgroundImg,a=t.name,o=t.coverParams,c=t.isConstructor,(d=new FormData).append("user_image",n),r&&d.append("user_background_image",r),d.append("name",a||"cover.jpeg"),e.next=9,l((0,T.e)({body:d,audioId:V}));case 9:(p=e.sent).payload.errors.length?G(p.payload.errors[0].messages[0]):(l((0,T.e)({audioId:V,body:{constructor_config:o,is_constructor:!!c}})),l((0,N.n)({audioId:V})),f={art_id:V,type:"audio",user_type:"",source:u.dJ.master},_="cover_upload_success",(0,s.I)({action:_,goalParams:O(O({},f),{},{user_id:null!==(m=F.uuid)&&void 0!==m?m:""})}));case 11:case"end":return e.stop()}},e)})),function(t){return e.apply(this,arguments)}),Y=function(e){var t=e.isAdult,n=e.isObscene,r=e.coverFile;if(r){var o=new FileReader;o.onload=function(e){if(null!==e.target&&"string"==typeof e.target.result){var o=new Image;o.src=e.target.result,o.onload=function(){var e,s,d=new m.fabric.Image(o,{hasBorders:!1,centeredScaling:!0,transparentCorners:!1}),u=f.Tb/f.jR>o.width/o.height,p=u?d.scaleToWidth(f.Tb):d.scaleToHeight(f.jR),_=0,g=0;d.width&&d.height&&(u?g=-(f.Tb*d.height/d.width-f.jR)/2:_=-(f.jR*d.width/d.height-f.Tb)/2);var v=c()(O({},B),{image:{scale:p.scaleY||1,left:_,top:g,zoom:1},title:{visible:!1},name:{visible:!1},adult:{top:y.dT,left:y.GP},obscene:{top:y.dT,left:y.Vk}});(0,h.h)({canvasWidthPx:f.Tb,canvasHeightPx:f.jR,imgUrl:o.src,coverParams:c()(O({},f.BZ),v),isAdult:t||!1,isObscene:n||!1,title:"",authors:H,isRandomBgImageUsed:!1}).then((e=(0,a.Z)(i().mark(function e(t){var n,r;return i().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,I.b)(t.fabricCanvasWithImages,f.Tb,f.jR);case 2:return n=e.sent,l((0,D.gc)(n)),r=(0,I.t)({currentConfig:O(O({},f.BZ),v),canvasImage:t.canvasFabricImage,adultImage:t.adultFabricImage,obsceneImage:t.obsceneFabricImage,zoom:1,scale:p.scaleX||1}),e.abrupt("return",{coverParams:r,generatedFile:n});case 6:case"end":return e.stop()}},e)})),function(t){return e.apply(this,arguments)})).then((s=(0,a.Z)(i().mark(function e(t){return i().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(l((0,D.Ph)(!0)),!V){e.next=4;break}return e.next=4,q({generatedImg:t.generatedFile,coverParams:t.coverParams,backgroundImg:r,name:r.name});case 4:l((0,D.Ph)(!1)),setTimeout(function(){l((0,D.gc)(null))},6e3);case 6:case"end":return e.stop()}},e)})),function(e){return s.apply(this,arguments)}))}}},o.readAsDataURL(r)}},J=(t=(0,a.Z)(i().mark(function e(t){var n,r,o,s,d,u,m,g,v;return i().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return d=t.isAdult,u=t.isObscene,m=t.name,g=t.employeesList,l((0,D.Ph)(!0)),v=O(O({},f.BZ),B),e.next=5,(0,h.h)({canvasWidthPx:f.Tb,canvasHeightPx:f.jR,imgUrl:Z&&M===p.E6.aiGenerated?Z:(0,_.h)(Z),coverParams:c()(O({},B),{adult:{top:null!=B&&null!==(n=B.adult)&&void 0!==n&&n.top?B.adult.top:y.dT,left:null!=B&&null!==(r=B.adult)&&void 0!==r&&r.left?B.adult.left:y.GP},obscene:{top:null!=B&&null!==(o=B.obscene)&&void 0!==o&&o.top?B.obscene.top:y.dT,left:null!=B&&null!==(s=B.obscene)&&void 0!==s&&s.left?B.obscene.left:y.Vk}}),isAdult:d,isObscene:u,title:U.current&&m||"",authors:g?(0,E.g)(g,L.author.id):[],isRandomBgImageUsed:A.is_constructor||!1}).then(function(){var e=(0,a.Z)(i().mark(function e(t){var n,r,a,o,s,c,d;return i().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=t.adultFabricImage,s=t.obsceneFabricImage,e.next=4,(0,I.b)(t.fabricCanvasWithImages,f.Tb,f.jR);case 4:return c=e.sent,l((0,D.gc)(c)),d=(0,I.t)({currentConfig:O({}
1,B),canvasImage:t.canvasFabricImage,adultImage:o,obsceneImage:s,bookNameImage:U.current?t.bookNameFabricImage:void 0,authorImage:U.current?t.authorTextFabricImage:void 0,zoom:null==B||null===(n=B.image)||void 0===n?void 0:n.zoom,scale:null==B||null===(r=B.image)||void 0===r?void 0:r.scale,randomBgIdx:R?null==B||null===(a=B.image)||void 0===a?void 0:a.randomBgIdx:0}),e.abrupt("return",{file:c,coverParams:d});case 8:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()).then(function(){var e=(0,a.Z)(i().mark(function e(t){return i().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return v=t.coverParams,e.next=3,q({generatedImg:t.file,coverParams:v,name:A.name,isConstructor:R});case 3:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}());case 5:l((0,D.Ph)(!1));case 6:case"end":return e.stop()}},e)})),function(e){return t.apply(this,arguments)}),K=function(){G(""),l((0,w.Z9)(null))},X=(n=(0,a.Z)(i().mark(function e(t){var n,r;return i().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t.name.endsWith("png")||t.name.endsWith("jpg")||t.name.endsWith("JPG")||t.name.endsWith("jpeg")){e.next=4;break}return G(v.hB.type),e.abrupt("return");case 4:return n=(0,d.a)([t],v.WB),e.next=7,(0,g.m)(t,f.YB,f.DS);case 7:r=e.sent,!n&&r?(Y({isAdult:(S.age||0)>=18,isObscene:S.obscene_language,coverFile:t}),K()):n?G(v.hB.size):r||G(v.hB.dimension);case 9:case"end":return e.stop()}},e)})),function(e){return n.apply(this,arguments)});return{coverError:W,clearCoverErrors:K,handleSaveCoverWithCoverFileParam:X,handleSaveCoverWithBookMetaParams:function(e){var t=e.isAdult,n=e.isObscene,r=e.name,a=r;a=U.current?r||S.book_name:"",J({isAdult:void 0!==t?t:(S.age||0)>=18,isObscene:void 0!==n?n:S.obscene_language,name:a,employeesList:(0,E.g)(P,L.author.id)})},handleSaveCoverWithAuthorMetaChanges:function(e){J({isAdult:(S.age||0)>=18,isObscene:S.obscene_language,name:U.current&&S.book_name||"",employeesList:(0,E.g)(e,L.author.id)})}}}},14441:function(e,t,n){"use strict";n.d(t,{V:function(){return c}});var r=n(67282),a=n(14416),o=n(18839),i=n(67386),s=n(72701),l=n(35627),c=function(){var e=(0,a.v9)(i.O6),t=(0,a.v9)(i.MY),n=(0,a.I0)(),c=(0,r.DM)();return{changeAudioLawStatus:function(e){n((0,s.cO)(e))},addProofDocument:function(e){n((0,s.bW)({link:"",id:c,file_name:String(e.name),isLoading:!1,ordering:0}))},deleteProofDocument:function(t){var r=e.filter(function(e){return e.id===t.id})[0];n((0,s.LD)(r))},updateGenres:function(e){var t=(0,l.Ju)(e);n((0,s.zZ)(t))},updateTags:function(e){var t=(0,l.Ju)(e);n((0,s.Uo)(t))},updateEmployees:function(e){n((0,s.es)(e))},acceptAudioResponsibility:function(e){n((0,s.mM)(e)),n((0,s.O4)(!e))},changeAudioFragments:function(e){var r=e===o.V.hasMusicFragments,a=t.agreed_with_audio_responsibility;n((0,s.Ix)(r)),n((0,s.O4)(r&&!a))}}}},86657:function(e,t,n){"use strict";n.d(t,{p:function(){return T}});var r,a=n(59499),o=n(50029),i=n(64687),s=n.n(i),l=n(39424),c=n(72363),d=n(5785),u=(r=(0,o.Z)(s().mark(function e(t,n){var r;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=JSON.stringify({employees:n}),e.abrupt("return",(0,d.h)("/api/audio/master/".concat(t,"/employees/"),{method:"PATCH",body:r,headers:{"Content-Type":"application/json"}}));case 2:case"end":return e.stop()}},e)})),function(e,t){return r.apply(this,arguments)}),p=n(17610),m=n(4205),f=n(14416),_=n(87714),h=n(18839),g=n(36613),v=n(45569),x=n(83336),b=n(10350),y=n(87117),C=n(24690),j=n(35627),k=n(15832),D=n(58334);function w(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 N(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach(function(t){(0,a.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var T=function(e){var t,n,r,a,i,d,w,T,E,I=(0,f.I0)(),A=(0,f.v9)(g.d),O=(t=(0,o.Z)(s().mark(function t(n){var r;return s().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=(0,k.L)(n).trim().replace(_.wI,""),t.next=3,I((0,y.p)({audioBookId:e,meta:{book_name:r}}));case 3:case"end":return t.stop()}},t)})),function(e){return t.apply(this,arguments)}),S=(n=(0,o.Z)(s().mark(function t(n){var r;return s().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=(0,k.L)(n||"").trim().replace(_.wI,""),t.next=3,I((0,y.p)({audioBookId:e,meta:{annotation:(0,D.Q)(r)}}));case 3:case"end":return t.stop()}},t)})),function(e){return n.apply(this,arguments)}),P=(r=(0,o.Z)(s().mark(function t(n){return s().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,I((0,y.p)({audioBookId:e,meta:{phonogram_legal_status:n}}));case 2:case"end":return t.stop()}},t)})),function(e){return r.apply(this,arguments)});return{updateAudioBookName:O,updateAudioBookAnnotation:S,updateAudioBookTags:(a=(0,o.Z)(s().mark(function t(n){var r;return s().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!(n.length>=1)){t.next=4;break}return r=(0,j.$5)(n),t.next=4,I((0,y.p)({audioBookId:e,meta:{tags:r}}));case 4:case"end":return t.stop()}},t)})),function(e){return a.apply(this,arguments)}),updateAudioBookGenres:(i=(0,o.Z)(s().mark(function t(n){var r;return s().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!(n.length>=1)){t.next=4;break}return r=(0,j.$5)(n),t.next=4,I((0,y.p)({audioBookId:e,meta:{genres:r}}));case 4:case"end":return t.stop()}},t)})),function(e){return i.apply(this,arguments)}),updateAudioBookLawStatus:P,addAudioBookProofDocument:(d=(0,o.Z)(s().mark(function t(n){return s().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,I((0,v.y)({audioBookId:e,document:n}));case 2:I((0,b.N)({bookId:e}));case 3:case"end":return t.stop()}},t)})),function(e){return d.apply(this,arguments)}),deleteAudioBookProofDocument:(w=(0,o.Z)(s().mark(function t(n){return s().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,I((0,x.L)({audioBookId:e,documentId:n.id}));case 2:case"end":return t.stop()}},t)})),function(e){return w.apply(this,arguments)}),updateAudioBookEmployees:(T=(0,o.Z)(s().mark(function t(n){var r,a,o,i;return s().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return a=(0,m.z)(n),t.next=3,u(e,a);case 3:if(t.sent.ok){t.next=7;break}return l.Tb("updateAudioBookEmployees error"),t.abrupt("return",!1);case 7:return o={art_id:e,type:"audio",user_type:"",source:p.dJ.master},i="person_add_success",(0,c.I)({action:i,goalParams:N(N({},o),{},{user_id:null!==(r=A.uuid)&&void 0!==r?r:""})}),t.abrupt("return",!0);case 11:case"end":return t.stop()}},t)})),function(e){return T.apply(this,arguments)}),updateAudioFragments:function(t,n){var r=t===h.V.hasMusicFragments;n?I((0,C.h)({audioBookId:e,meta:{has_musical_fragments:r}})):I((0,y.p)({audioBookId:e,meta:{has_musical_fragments:r}}))},updateAudioResponsibilityAccepted:function(t,n){n?I((0,C.h)({audioBookId:e,meta:{agreed_with_audio_responsibility:t}})):I((0,y.p)({audioBookId:e,meta:{agreed_with_audio_responsibility:t}}))},updateAudioBookPreviewLength:(E=(0,o.Z)(s().mark(function t(n,r){var a,o;return s().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!r){t.next=6;break}return t.next=4,I((0,C.h)({audioBookId:e,meta:{preview_length_seconds:n}}));case 4:return a=t.sent,t.abrupt("return",0===a.payload.errors.length);case 6:return t.next=8,I((0,y.p)({audioBookId:e,meta:{preview_length_seconds:n}}));
1case 8:if(o=t.sent,y.p.fulfilled.match(o)){t.next=11;break}return t.abrupt("return",!1);case 11:return t.abrupt("return",0===o.payload.errors.length);case 14:return t.prev=14,t.t0=t.catch(0),t.abrupt("return",!1);case 17:case"end":return t.stop()}},t,null,[[0,14]])})),function(e,t){return E.apply(this,arguments)})}}},99533:function(e,t,n){"use strict";n.d(t,{l:function(){return Q}});var r=n(50029),a=n(59499),o=n(64687),i=n.n(o),s=n(72363),l=n(84035),c=n(17610),d=n(3799),u=n(94184),p=n.n(u),m=n(5349),f=n(6619),_=n(67294),h=n(66709),g=n(66890),v=n(89637),x=n(15182),b=n.n(x),y=n(85893),C=function(e){var t=e.isModeratorMode,n=e.id,r=e.cover,a=e.onChangeSource,o=e.onAddLink,i=e.onRemoveLink,s=e.isLocked,l=e.hasPublishTries,c=r.proof_choice||d.OG.FROM_INTERNET,u=(0,_.useState)(c),x=u[0],C=u[1],j=(r.proof_links||[]).map(function(e){return{textLink:e,value:e}}),k=function(e){C(e),a(e)},D=[{value:d.OG.FROM_INTERNET,label:"ÐзÑл в инÑеÑнеÑе",content:(0,y.jsx)(f.A,{isModerator:t,links:j,onRemoveLink:i,onAddLink:o,isLocked:s,isPublicationSubmitted:l}),isFlex:!1},{value:d.OG.OWNER_ARCHIVE,label:"ÐаÑиÑовал Ñам или ÑоÑо из лиÑного аÑÑ
ива",content:(0,y.jsx)(m.s,{}),isFlex:!1},{value:d.OG.PURCHASED,label:"ÐÑплена или наÑиÑована на заказ",content:(0,y.jsx)("p",{children:"Я подÑвеÑÐ¶Ð´Ð°Ñ Ð½Ð°Ð»Ð¸Ñие пÑав на иÑполÑзованное изобÑажение и неÑÑ Ð¿Ð¾Ð»Ð½ÑÑ ÑÑидиÑеÑкÑÑ Ð¾ÑвеÑÑÑвенноÑÑÑ Ð·Ð° его иÑполÑзование."}),isFlex:!1}];return n?(0,y.jsx)(g.A,{children:(0,y.jsxs)("div",{className:p()("shadowLevel0",b().container),"data-testid":"coverSource__wrapper",children:[(0,y.jsx)(v.H3,{children:"ÐÑава на обложкÑ"}),(0,y.jsx)("div",{className:b().content,children:(0,y.jsx)(h.E,{items:D,onChange:function(e){return k(e)},value:x,isLocked:s})})]})}):null},j=n(73505),k=n(90116),D=n(14416),w=n(23907),N=function(e,t){var n=(0,D.I0)(),r=t.proof_links?(0,k.Z)(t.proof_links):[];return{handleChangeAudioCoverSource:function(t){e&&n((0,w.e)({audioId:e,body:{proof_choice:t}}))},handleAddAudioCoverProofLink:function(t){e&&n((0,w.e)({audioId:e,body:{proof_links:[].concat((0,k.Z)(r),[t])}}))},handleDeleteAudioCoverProofLink:function(t){e&&n((0,w.e)({audioId:e,body:{proof_links:r.filter(function(e){return e!==t})}}))}}},T=n(13306),E=n(95315),I=n(9996),A=n.n(I),O=n(52275),S=n(67386),P=n(21138),F=n(72701),L=n(88632),B=n(42153);function Z(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}var R=function(){var e,t=(0,D.v9)(S.MY),n=(0,D.v9)(S.Rt),o=(0,D.v9)(S.rM),s=(0,D.v9)(P.Qq),l=t.obscene_language,c=t.age,d=t.book_name,u=t.id,p=n.constructor_config,m=18===c||!!l,f=(0,D.I0)();return{createRandomCover:(e=(0,r.Z)(i().mark(function e(){var n,r,c,_,h;return i().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return f((0,F.r9)(!0)),O.BZ.title.top=0,e.next=4,(0,B.u)({ageBookCover:m,obsceneLanguage:!!l,title:d||"",employees:(0,L.g)(o,s.author.id),canvasWidthPx:O.Tb,canvasHeightPx:O.jR,constructorConfig:A()(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Z(Object(n),!0).forEach(function(t){(0,a.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Z(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},O.BZ),p||{})});case 4:if(r=(n=e.sent).file,c=n.randomImageFile,_=n.coverParams,!u){e.next=19;break}return f((0,F.gc)(r)),(h=new FormData).append("user_image",r),h.append("user_background_image",c),h.append("name","cover.jpeg"),h.append("is_constructor",String(!0)),e.next=17,f((0,w.e)({audioId:String(t.id),body:h}));case 17:0===e.sent.payload.errors.length?f((0,w.e)({audioId:String(u),body:{constructor_config:_,is_constructor:!0}})):f((0,F.gc)(null));case 19:return e.abrupt("return",{newCover:r});case 20:case"end":return e.stop()}},e)})),function(){return e.apply(this,arguments)})}},M=n(5924),z=n(20165),W=n(11163),G=n(3490),V=n(94421),U=n(61568),H=n(36613),q=n(49764),Y=n.n(q);function J(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 K(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?J(Object(n),!0).forEach(function(t){(0,a.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):J(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var X=(0,y.jsxs)(y.Fragment,{children:["JPG или PNG, не менее ",(0,y.jsx)("b",{children:"500\xd7500px."})," Ð Ð°Ð·Ð¼ÐµÑ Ñайла до 20 MB."]}),Q=function(e){var t,n=e.isDisabled,a=e.hasPublishTries,o=(0,D.v9)(H.d),u=(0,D.v9)(S.MY),p=(0,D.v9)(S.Rt),m=(0,D.v9)(S.ug),f=(0,D.v9)(S.rM),h=(0,D.v9)(S.dF),g=(0,D.v9)(S.dp),v=u.id,x=void 0===v?0:v,b=p.name,k=p.last_cover_download_date,w=(0,_.useState)(!1),I=w[0],A=w[1],O=(0,_.useState)(b||E.Lt),P=O[0],L=O[1],B=(0,_.useState)(P.split(".").reverse()[0]||"jpg"),Z=B[0],q=B[1],J=(0,W.useRouter)(),Q=(0,D.I0)(),$=(0,_.useRef)(!1),ee=Z.endsWith("jpeg")||Z.endsWith("jpg")?"jpgFile":"png",et=N(String(x),p),en=et.handleChangeAudioCoverSource,er=et.handleAddAudioCoverProofLink,ea=et.handleDeleteAudioCoverProofLink,eo=R().createRandomCover,ei=(0,j.N)(),es=ei.handleSaveCoverWithCoverFileParam,el=ei.coverError;(0,_.useEffect)(function(){g&&!h&&($.current||p.user_image||($.current=!0,ec()))},[g,h,p.user_image]);var ec=(t=(0,r.Z)(i().mark(function e(){return i().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return A(!1),Q((0,F.Ph)(!0)),e.next=4,eo();case 4:Q((0,F.Ph)(!1));case 5:case"end":return e.stop()}},e)})),function(){return t.apply(this,arguments)}),ed=(0,M.g)(p,u,f),eu=ed.aiGenerateErrorMessage,ep=ed.handleGenerateYandexCover;return(0,y.jsxs)("div",{className:Y().audioMasterCoverContainer,children:[(0,y.jsx)(T.I,{cover:p,coverSize:p.is_square_cover?U.iB.extraLargeAudio:U.iB.extraLarge,errorMessage:el,isLoading:m||!p.user_image,isCoverLoading:m||!p.user_image,isLocked:n,isModeratorMode:!1,imageType:ee,caption:X,downloadDate:k,onFileInputChange:function(e){var t;if(null!==(t=e.target.files)&&void 0!==t&&t.length){var n=e.target.files[0];L(n.name),q(n.type),Q((0,F.r9)(!1)),es(n)}},onSelectFileClick:function(){var e,t={art_id:x,type:"audio",user_type:"",source:c.dJ.master};(0,s.I)({action:"master_cover_click_upload",goalParams:K(K({},t),{},{user_id:null!==(e=o.uuid)&&void 0!==e?e:""})}),(0,l.tV)("add_cover_click",o,u)},onClickCover:function(){J.push("".concat(G.x.audioBooks.index).concat(String(x),"/cover-editor/"))},fileName:P,aiGenerateErrorMessage:eu,onYandexGenerate:function(){ep(),(0,l.tV)("create_ai_cover_click",o,u)},className:el||eu?z.As:void 0}),!p.is_constructor&&p.cover_type!==d.E6.aiGenerated&&(0,y.jsx)(C,{onChangeSource:en,onAddLink:er,onRemoveLink:ea,cover:p,id:x,isLocked:n,hasPublishTries:!!a}),(0,y.jsx)(V.V,{className:Y().audioMasterCoverDialog,isOpen:I,illustrationType:"warningYellow56x56",titleText:"СгенеÑиÑоваÑÑ Ð½Ð¾Ð²ÑÑ Ð¾Ð±Ð»Ð¾Ð¶ÐºÑ?",bodyText:"ÐагÑÑÐ¶ÐµÐ½Ð½Ð°Ñ Ð¾Ð±Ð»Ð¾Ð¶ÐºÐ° и наÑÑÑойки в ÑедакÑоÑе ÑбÑоÑÑÑÑÑ Ð¸ заменÑÑÑÑ ÑгенеÑиÑованной обложкой",leftButtonText:"ÐÑмена",onClickLeftButton:function(){A(!1)},rightButtonText:"СгенеÑиÑоваÑÑ",onClickRightButton:ec})]})}},37083:function(e,t,n){"use strict";n.d(t,{EP:function(){return _},SO:function(){return p},Ub:function(){return c},hd:function(){return f},ug:function(){return d},wX:function(){return u},zO:function(){return m},zd:function(){return h}});var r=n(31955),a=n(22751),o=n(3490),i=n(50184),s=n(89637),l=n(85893),c=[{key:"1",text:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(s.T,{children:"ÑвелиÑение ÑоÑлÑи "}),(0,l.jsx)(i.a,{target:"_blank",href:o.x.status.index,dataTestId:"licenceCard__link--status",children:"до 25%"})]})},{key:"2",text:"пÑбликаÑÐ¸Ñ Ð½Ð° лÑбой плоÑадке"}],d=[{key:"1",text:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(s.T,{children:"ÑвелиÑение ÑоÑлÑи "}),(0,l.jsx)(i.a,{target:"_blank",href:o.x.status.index,dataTestId:"licenceCard__link--status",children:"до 35%"})]})},{key:"2",text:"пÑбликаÑÐ¸Ñ Ð½Ð° лÑбой плоÑадке"}],u=[{key:"1",text:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(s.T,{children:"ÑвелиÑение ÑоÑлÑи "}),(0,l.jsx)(i.a,{target:"_blank",href:o.x.status.index,dataTestId:"licenceCard__link--status",children:"до 45%"})]})},{key:"2",text:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(s.T,{children:"пÑбликаÑÐ¸Ñ ÑолÑко на ÐиÑÑÐµÑ Ð¸ Ñ "}),(0,l.jsx)(i.a,{target:"_blank",href:o.x.domains.index,dataTestId:"licenceCard__link--partners",children:"паÑÑнеÑов"})]})},{key:"3",text:"пÑбликаÑÐ¸Ñ Ð² Ñазделе ÑкÑклÑзивов"},{key:"4",text:"заÑиÑа Ð¾Ñ Ð¿Ð¸ÑаÑов"}],p=[{key:"1",text:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(s.T,{children:"ÑвелиÑение ÑоÑлÑи "}),(0,l.jsx)(i.a,{target:"_blank",href:o.x.status.index,dataTestId:"licenceCard__link--status",children:"до 40%"})]})},{key:"2",text:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(s.T,{children:"пÑбликаÑÐ¸Ñ ÑолÑко на ÐиÑÑÐµÑ Ð¸ Ñ "}),(0,l.jsx)(i.a,{target:"_blank",href:o.x.domains.index,dataTestId:"licenceCard__link--partners",children:"паÑÑнеÑов"})]})},{key:"3",text:"пÑбликаÑÐ¸Ñ Ð² Ñазделе ÑкÑклÑзивов"},{key:"4",text:"заÑиÑа Ð¾Ñ Ð¿Ð¸ÑаÑов"}],m=u.slice(1),f=d.slice(1),_={id:(0,a.z)(),value:"yes"===r.Z.get("recommended_price")?"299.00":"199.00",isRecommended:!0},h=149},13306:function(e,t,n){"use strict";n.d(t,{I:function(){return x}});var r=n(94184),a=n.n(r),o=n(3799),i=n(68467),s=n(35407),l=n(89637),c=n(38601),d=n.n(c),u=n(85893),p=function(e){var t=e.className,n=e.dataTestId,r=e.errorMessage,o=e.onGenerate,i=e.isDisabled;return(0,u.jsxs)("div",{className:a()(d().wrapper,t),"data-testid":n,children:[(0,u.jsx)(l.mj,{className:d().title,children:"ÐÐ-обложка"}),(0,u.jsx)(l.OE,{className:d().description,children:"СоздайÑе ÑникалÑнÑÑ Ð¾Ð±Ð»Ð¾Ð¶ÐºÑ, коÑоÑÑÑ ÑгенеÑиÑÑÐµÑ Ð¸ÑкÑÑÑÑвеннÑй инÑÐµÐ»Ð»ÐµÐºÑ Ð½Ð° оÑнове анноÑаÑии"}),(0,u.jsx)(s.z,{className:d().button,size:"small",icon:"aiOutline16x16",onClick:o,isLoading:i,dataTestId:"generate-button",children:"СгенеÑиÑоваÑÑ"}),r&&(0,u.jsx)(l.pf,{className:d().error,children:r})]})},m=n(90415),f=n(5285),_=n(61568),h=n(55298),g=n(60341),v=n.n(g),x=function(e){var t=e.className,n=e.cover,r=e.coverSize,c=e.isLoading,d=e.isCoverLoading,g=e.isLocked,x=e.isModeratorMode,b=e.errorMessage,y=e.imageType,C=e.downloadDate,j=e.caption,k=e.onFileInputChange,D=e.onSelectFileClick,w=e.onClickCover,N=e.fileName,T=e.aiGenerateErrorMessage,E=e.onYandexGenerate,I=n.name,A=n.user_image,O=n.cover_content_size,S=(0,f.s)({isLocked:g,isModeratorMode:x,isConstructor:n.is_constructor}),P=!n.is_constructor&&!b&&!!A&&n.cover_type!==o.E6.aiGenerated;return(0,u.jsxs)("div",{className:a()("shadowLevel0",v().root,t),"data-testid":"cover-section",id:"cover",children:[(0,u.jsx)(l.H3,{className:v().headline,children:"Ðбложка"}),(0,u.jsxs)("div",{className:v().wrapper,children:[(0,u.jsx)("div",{className:v().imageContainer,children:(0,u.jsx)(_.Fh,{bookName:I||"",size:r,pictureFile:n.currentCoverFile||void 0,pathToPicture:n.user_image,isLoading:d&&!n.currentCoverFile,pathToFullSize:n.user_image?(0,i.h)(n.user_image):void 0,isLink:x,onClick:function(){!w||g||d||w()}})}),(0,u.jsxs)("div",{className:v().fileUploaderWrapper,children:[x&&n.is_constructor&&(0,u.jsx)(l.H4,{className:v().titleForModeration,children:"Фон из генеÑаÑоÑа обложек"}),S!==m._W.default&&(0,u.jsx)(l.OE,{className:v().bodyText,children:S}),(0,u.jsx)(h.l,{className:v().fileUploader,type:"image",caption:j,title:N,isFile:P,buttonText:"ÐагÑÑзиÑÑ Ñайл",isLoading:c,buttonLook:"secondary",accept:".jpg, .png",onCh
1ange:k,imageType:y,errorMessage:b,fileSize:O,downloadDate:C,onFileClick:function(){window.open(String(A),"_blank")},onSelectFileClick:D,isLocked:g||x}),!g&&(0,u.jsx)(s.z,{look:"secondary",size:"small",onClick:w,disabled:c,dataTestId:"open-in-editor-button",children:"ÐÑкÑÑÑÑ Ð² ÑедакÑоÑе"}),!g&&!x&&(0,u.jsx)(p,{className:v().generateRandomCoverBanner,dataTestId:"masterAICover__generateBanner",errorMessage:T,onGenerate:function(){E&&E()},isDisabled:c||d})]})]})]})}},42153:function(e,t,n){"use strict";n.d(t,{u:function(){return _}});var r,a=n(50029),o=n(64687),i=n.n(o),s=n(32777),l=n(52275),c=n(68467),d=n(66086),u=n(41945),p=n(97230),m=n(93432),f=function(){var e=Math.floor(20*Math.random()+1);return{path:"/covers/other/"+"INDEX.png".replace("INDEX",String(e)),idx:"other/"+e}},_=(r=(0,a.Z)(i().mark(function e(t){var n,r,a,o,_,h,g,v,x,b,y,C,j,k,D,w;return i().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.ageBookCover,r=t.obsceneLanguage,a=t.title,o=t.employees,_=t.canvasWidthPx,h=t.canvasHeightPx,g=t.constructorConfig,v="",x=0,x=(b=f()).idx,v=b.path,g.image.randomBgIdx=x,g.title.visible=!0,g.title.fill=l.l,g.name.visible=!0,g.name.fill=l.l,g.title.isBgVisible=!1,g.name.isBgVisible=!1,g.title.fontSize=(0,d.n1)(a),g.image.top=l.BZ.image.top,g.image.left=l.BZ.image.left,g.image.zoom=l.BZ.image.zoom,g.image.scale=l.BZ.image.scale,g.title.top=0,y=function(e){var t=e.templateType,n=e.imageHeight,r=e.textType,a=e.textHeight;g.title.template=t,g.image.height=n,g[r].height=a},e.next=22,(0,p.h)({canvasWidthPx:_,canvasHeightPx:h,imgUrl:v?(0,c.h)(v):void 0,coverParams:g,isAdult:n,isObscene:r,title:a,authors:o,isRandomBgImageUsed:!0,isRandomTitleCoordinate:!0,shouldShowAuthors:!0,shouldShowTitle:!0,onChangeTitleTemplate:y});case 22:return j=(C=e.sent).canvasFabricImage||new s.fabric.Image,_/h>(j.width||0)/(j.height||1)?j.scaleToWidth(_):j.scaleToHeight(h),e.next=28,(0,u.b)(C.fabricCanvasWithImages,_,h);case 28:return k=e.sent,D=(0,u.t)({currentConfig:g,canvasImage:j,adultImage:C.adultFabricImage,obsceneImage:C.obsceneFabricImage,bookNameImage:C.bookNameFabricImage,authorImage:C.authorTextFabricImage,zoom:g.image.zoom||1,scale:j.scaleX,randomBgIdx:x}),e.next=32,(0,m.T)(v);case 32:return w=e.sent,e.abrupt("return",{file:k,randomImageFile:w,coverParams:D});case 34:case"end":return e.stop()}},e)})),function(e){return r.apply(this,arguments)})},5924:function(e,t,n){"use strict";n.d(t,{g:function(){return R}});var r=n(50029),a=n(59499),o=n(64687),i=n.n(o),s=n(39424),l=n(72363),c=n(94184),d=n.n(c),u=n(9996),p=n.n(u),m=n(3799),f=n(32777),_=n(52275),h=n(95315),g=n(20165),v=n(11163),x=n(67294),b=n(14416),y=n(95684),C=n(21138),j=n(36613),k=n(72701),D=n(41594),w=n(63665),N=n(71758),T=n(23907),E=n(25463),I=n(88632),A=n(41945),O=n(58895),S=n(97230),P=n(82513),F=n.n(P),L=n(85893);function B(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 Z(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?B(Object(n),!0).forEach(function(t){(0,a.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):B(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var R=function(e,t,n){var o,c,u=(0,b.v9)(j.d),P=(0,b.v9)(C.Qq),B=(0,b.I0)(),R=(0,v.useRouter)(),M=(0,x.useState)(""),z=M[0],W=M[1],G=R.pathname.includes("cover-editor"),V=G?"cover_editor_ai_click":"master_ai_cover_click",U=G?"cover_editor_ai_success":"master_ai_cover_success",H=G?"cover_editor_ai_error":"master_ai_cover_error",q=function(a){var o=new Image;o.src=a,o.onload=function(){var a,s,l=new f.fabric.Image(o,{hasBorders:!1,centeredScaling:!0,transparentCorners:!1}),c=_.Tb/_.jR>o.width/o.height,d=0,u=0;l.width&&l.height&&(c?u=-(_.Tb*l.height/l.width-_.jR)/2:d=-(_.jR*l.width/l.height-_.Tb)/2);var m=p()(e.constructor_config||_.BZ,{image:{scale:0,left:d,top:u},adult:{top:y.dT,left:y.GP},obscene:{top:y.dT,left:y.Vk},title:{visible:!0},name:{visible:!0}});(0,S.h)({canvasWidthPx:_.Tb,canvasHeightPx:_.jR,imgUrl:o.src,coverParams:Z(Z({},m),{},{image:Z(Z({},m.image),{},{scale:0}),title:Z(Z({},m.title),{},{visible:!0}),name:Z(Z({},m.name),{},{visible:!0})}),isAdult:!!(t.age&&t.age>=18),isObscene:t.obscene_language,title:t.book_name||"",authors:(0,I.g)(n,P.author.id),isRandomBgImageUsed:!1,bookId:t.id,shouldShowTitle:m.title.visible||!1,shouldShowAuthors:m.name.visible||!1}).then((a=(0,r.Z)(i().mark(function e(t){var n,r,a;return i().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,A.b)(t.fabricCanvasWithImages,_.Tb,_.jR);case 2:return r=e.sent,B((0,k.gc)(r)),a=(0,A.t)({currentConfig:m,canvasImage:t.canvasFabricImage,adultImage:t.adultFabricImage,obsceneImage:t.obsceneFabricImage,bookNameImage:t.bookNameFabricImage,authorImage:t.authorTextFabricImage,zoom:1,scale:(null===(n=t.canvasFabricImage)||void 0===n?void 0:n.scaleX)||0}),e.abrupt("return",{coverParams:a,generatedFile:r});case 6:case"end":return e.stop()}},e)})),function(e){return a.apply(this,arguments)})).then((s=(0,r.Z)(i().mark(function n(r){var a;return i().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return(a=new FormData).append("user_image",r.generatedFile),a.append("name",e.name||"cover.jpeg"),a.append("is_constructor",String(!1)),n.next=6,B((0,T.e)({audio
1Id:String(t.id),body:a}));case 6:if(0!==n.sent.payload.errors.length){n.next=14;break}return n.next=10,B((0,T.e)({audioId:String(t.id),body:{constructor_config:r.coverParams}}));case 10:return n.next=12,B((0,N.n)({audioId:String(t.id)}));case 12:n.next=16;break;case 14:W(h.g3),B((0,k.gc)(null));case 16:B((0,k.Ph)(!1));case 17:case"end":return n.stop()}},n)})),function(e){return s.apply(this,arguments)}))}},Y=(o=(0,r.Z)(i().mark(function e(){var n,r,a;return i().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B((0,w.i)({audioId:t.id?String(t.id):""}));case 2:if((n=e.sent).payload.result.status!==m.KP.inProgress){e.next=8;break}return e.next=6,(0,O.V)(1e3);case 6:return e.next=8,Y();case 8:if(n.payload.result.status===m.KP.error&&(W(n.payload.result.errors[0]),(0,l.I)({action:H,goalParams:{user_id:null!==(r=u.uuid)&&void 0!==r?r:""}}),B((0,k.Ph)(!1)),B((0,k.bz)({isMasterSaving:!1,isMasterSaved:!1}))),n.payload.result.status!==m.KP.ok){e.next=16;break}return(0,l.I)({action:U,goalParams:{user_id:null!==(a=u.uuid)&&void 0!==a?a:""}}),e.next=13,B((0,N.n)({audioId:String(t.id)}));case 13:q(e.sent.payload.result.user_image),B((0,D.UQ)(m.E6.aiGenerated));case 16:case"end":return e.stop()}},e)})),function(){return o.apply(this,arguments)}),J=function(){if(!G){var e=document.getElementById("annotation");e&&(e.tabIndex=-1,e.focus())}};return{aiGenerateErrorMessage:z,handleGenerateYandexCover:(c=(0,r.Z)(i().mark(function e(){var n,r,o,c;return i().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if((0,l.I)({action:V,goalParams:{user_id:null!==(n=u.uuid)&&void 0!==n?n:""}}),W(""),B((0,k.Ph)(!0)),!(!t.annotation||t.annotation.length<g.vV)){e.next=7;break}return W((0,L.jsxs)(L.Fragment,{children:["ÐаполниÑе"," ",(0,L.jsx)("span",{onClick:J,className:d()((0,a.Z)({},F().annotationWord,!G)),children:"анноÑаÑиÑ"})," ","ÑÑÐ¾Ð±Ñ ÑгенеÑиÑоваÑÑ Ð¾Ð±Ð»Ð¾Ð¶ÐºÑ"]})),B((0,k.Ph)(!1)),e.abrupt("return",!1);case 7:return e.prev=7,e.next=10,B((0,E.U)({audioId:t.id?String(t.id):""}));case 10:if((r=e.sent).payload.result.success){e.next=18;break}return W(r.payload.result.errors[0]),B((0,k.Ph)(!1)),(0,l.I)({action:H,goalParams:{user_id:null!==(o=u.uuid)&&void 0!==o?o:""}}),e.abrupt("return",!1);case 18:return e.next=20,(0,O.V)(1e4);case 20:return e.next=22,Y();case 22:return e.abrupt("return",!0);case 23:e.next=32;break;case 25:return e.prev=25,e.t0=e.catch(7),s.Tb(e.t0),W(h.g3),B((0,k.Ph)(!1)),(0,l.I)({action:H,goalParams:{user_id:null!==(c=u.uuid)&&void 0!==c?c:""}}),e.abrupt("return",!1);case 32:case"end":return e.stop()}},e,null,[[7,25]])})),function(){return c.apply(this,arguments)})}}},60524:function(e,t,n){"use strict";n.d(t,{E:function(){return i}});var r=n(3490),a=n(38739),o=n(85893),i=function(e){var t=e.obsceneWordsCount,n=e.moderationId,i=e.className,s=e.dataTestId;return(0,o.jsx)(a.b,{className:i,type:t?a.o.error:a.o.info,textInformation:"ÐбнаÑÑÐ¶ÐµÐ½Ñ Ð·Ð°Ð¼ÐµÑаниÑ: ".concat(t),isWrapper:!0,buttonText:"ÐоÑмоÑÑеÑÑ",onButtonClick:function(){var e="".concat(r.x.moderation.book.new).concat(n,"/content-scan");window.open(e,"_blank")},dataTestId:s})}},3287:function(e,t,n){"use strict";n.d(t,{H:function(){return G}});var r=n(59499),a=n(50029),o=n(64687),i=n.n(o),s=n(72363),l=n(84035),c=n(69024),d=n(94184),u=n.n(d),p=n(17999),m=n(17674),f=function(e,t){var n=e.split("."),r=(0,m.Z)(n,2),a=r[0],o=r[1];return a.length>t?"".concat(a.slice(0,t),"....").concat(o):e},_=n(60524),h=n(20165),g=n(67294),v=n(14416),x=n(38739),b=n(89637),y=n(55298),C=n(86477),j=n(91157),k=n(36613),D=n(41594),w=n(76547),N=n(77589),T=n(39961),E=n(69878),I=function(e){var t=e.name,n=void 0===t?"":t,r=e.type,a=n.match(/[^.]+$/i),o=new Blob([e],{type:r});return{fileName:n,type:r,ext:a?a[0]:"",content:o}},A=n(58895),O=n(50184),S=n(35407),P=n(53418),F=n(54724),L=n.n(F),B=n(85893),Z=function(e){var t=e.onClose;return(0,B.jsxs)(P.u_,{isOpen:!0,onRequestClose:t,shouldCloseOnEsc:!0,shouldCloseOnOverlayClick:!0,className:L().container,children:[(0,B.jsx)(P.r6,{children:(0,B.jsx)(b.H3,{className:L().title,children:"СделайÑе ÑÑение Ñдобнее"})}),(0,B.jsxs)("div",{className:L().wrapper,children:[(0,B.jsx)(x.b,{type:x.o.info,textInformation:"ÐÑли в книге ÑолÑко ÑекÑÑ, загÑÑзиÑе DOCX или FB2. PDF Ð¼Ð¾Ð¶ÐµÑ Ð½Ðµ пÑойÑи модеÑаÑиÑ",isWrapper:!0}),(0,B.jsx)(b.OE,{className:L().text,children:"DOCX и FB2 Ñдобнее Ð´Ð»Ñ ÑÑÐµÐ½Ð¸Ñ Ñ Ð¼Ð¾Ð±Ð¸Ð»ÑнÑÑ
ÑÑÑÑойÑÑв и доÑÑÑпнее Ð´Ð»Ñ ÑиÑаÑелей."}),(0,B.jsxs)(b.OE,{children:["ÐÑли возникли ÑложноÑÑи Ñ Ð·Ð°Ð³ÑÑзкой DOCX или FB2, напиÑиÑе в поддеÑÐ¶ÐºÑ Ð½Ð°"," ",(0,B.jsx)(O.a,{href:"mailto:[email protected]",dataTestId:"pdfDialog__supportLink",children:"[email protected]"}),". ÐÑ Ð¿Ð¾Ð¼Ð¾Ð¶ÐµÐ¼."]})]}),(0,B.jsx)(P.mz,{children:(0,B.jsx)(S.z,{size:"medium",look:"primary",onClick:t,className:L().button,dataTestId:"pdfDialog__closeButton",children:"ÐакÑÑÑÑ"})})]})},R=n(29348),M=n.n(R);function z(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 W(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?z(Object(n),!0).forEach(function(t){(0,r.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var G=function(e){var t,n=e.isModerator,o=e.className,d=e.errorClassName,m=e.infoAlertMessage,O=e.isEdit,S=e.isLocked,P=e.onFileClick,F=e.onSelectFileClick,L=e.onSuccessUpload,R=e.validationErrors,z=e.obsceneWordsCount,G=e.isAutofillAB,V=e.buttonLook,U=e.captionProp,H=e.isHideEditorButton,q=e.acceptProp,Y=e.type,J=(0,v.v9)(j.gU),K=(0,v.v9)(j.Oe),X=(0,v.v9)(j.uv),Q=J.file,$=J.id,ee=void 0===$?0:$,et=J.is_draft_book,en=J.characters_number,er=J.file_content_size,ea=J.download_date,eo=J.foul_words,ei=void 0===eo?0:eo,es=J.is_free_fanfic,el=J.is_new_editor_available,ec=J.is_created_in_editor,ed=J.was_created_from_audio,eu=(0,v.v9)(k.d),ep=(0,g.useState)(!1),em=ep[0],ef=ep[1],e_=null==Q?void 0:Q.name.toLowerCase().endsWith("pdf"),eh=[{id:"1",info:et?(0,B.jsx)("span",{className:M().listItem,children:"Ð ÑоÑмаÑе DOCX и FB2"}):(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)("b",{className:M().listItem,children:"DOCX, FB2"}),"\xa0 â Ñдобнее Ð´Ð»Ñ ÑÑÐµÐ½Ð¸Ñ Ñ Ð¼Ð¾Ð±Ð¸Ð»ÑнÑÑ
ÑÑÑÑойÑÑв"]})},{id:"2",info:(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)("b",{className:M().listItem,children:"PDF"}),"\xa0 â подÑ
Ð¾Ð´Ð¸Ñ ÑолÑко Ð´Ð»Ñ ÐºÐ¾Ð¼Ð¸ÐºÑов или книг Ñ Ð±Ð¾Ð»ÑÑим колиÑеÑÑвом иллÑÑÑÑаÑий"]})},{id:"3",info:(0,B.jsx)("span",{className:M().listItem,children:"Ð Ð°Ð·Ð¼ÐµÑ Ñайла до 70 ÐÐ"})}],eg=(0,B.jsx)("ul",{className:M().list,children:eh.map(function(e){return et&&"2"===e.id?null:(0,B.jsx)("li",{children:e.info},e.id)})}),ev=(0,v.I0)(),ex=(0,g.useState)(!1),eb=ex[0],ey=ex[1],eC=(0,g.useState)(void 0),ej=eC[0],ek=eC[1],eD=void 0!==m&&m.length>0,ew=null==Q?void 0:Q.name.split(".").pop(),eN=Q&&("ERROR"===Q.status||"INVALID"===Q.status),eT=!!(null!=Q&&Q.name)&&!eN;(0,g.useEffect)(function(){eN?ek(C.c.fileConverting):null!=Q&&Q.name&&!e_&&Number(en)<h.Zc&&!eD&&ek(es?C.c.fileCharactersNumber.replace("ваÑÑ ÐºÐ½Ð¸Ð³Ñ","Ð²Ð°Ñ ÑанÑик"):C.c.fileCharactersNumber)},[]),(0,g.useEffect)(function(){K&&!eT&&ek("ÐагÑÑзиÑе Ñайл ".concat(es?"ÑанÑика":"книги"))},[K]);var eE=(t=(0,a.Z)(i().mark(function e(t){var n,r,o,d,u,m,f,_;return i().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(null!==(n=t.target.files)&&void 0!==n&&n.length)){e.next=41;break}if(!(q&&!t.target.files[0].name.toLowerCase().endsWith(q))){e.next=4;break}return ek("ÐаннÑй Ñип Ñайла не поддеÑживаеÑÑÑ"),e.abrupt("return",Promise.reject());case 4:if(o=t.target.files[0].name.toLowerCase().endsWith("pdf"),d=t.target.files[0].name.toLowerCase().endsWith("docx")||t.target.files[0].name.toLowerCase().endsWith("fb2"),!(et&&!d)){e.next=9;break}return ek("ÐаннÑй Ñип Ñайла не поддеÑживаеÑÑÑ"),e.abrupt("return",Promise.reject());case 9:if(!(t.target.files[0].size>h.ul)){e.next=14;break}return ek(C.c.getFileSizeError(h.C1)),e.abrupt("return",Promise.reject());case 14:o&&ek("");case 15:return ev((0,D.F9)(t.target.files[0].name)),ey(!0),u=I(t.target.files[0]),(m=new FormData).append("content",t.target.files[0]),m.append("is_draft",JSON.stringify(!1)),m.append("file_name",u.fileName),e.next=24,ev((0,E.W)({body:m,bookId:ee}));case 24:if(!(null!==(r=(f=e.sent.payload.errors)[0])&&void 0!==r&&r.messages[0])){e.next=32;break}return ek(f[0].messages[0]),ev((0,D.oA)({name:t.target.files[0].name,status:p.u.error,content:"",characters_number:null,invalid_constructions:!1})),ey(!1),ev((0,D.Ag)({isMasterSaving:!1,isMasterSaved:!1})),e.abrupt("return");case 32:if(ev((0,D.Iu)(!1)),o){e.next=37;break}return _=function(){var e=(0,a.Z)(i().mark(function e(){var t,n,r,o,d;return i().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ev((0,T.I)({bookId:ee}));case 2:if(t=e.sent.payload.result,n=function(){var e=(0,a.Z)(i().mark(function e(){var t;return i().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ev((0,N.A)({bookId:ee}));case 2:if("IN_PROCESS"!==(t=e.sent.payload.result).processing_status){e.next=10;break}return e.next=7,(0,A.V)(1e3);case 7:n(),e.next=11;break;case 10:"OK"===t.processing_status&&t.characters_number<h.Zc&&!eD&&ek(es?C.c.fileCharactersNumber.replace("ваÑÑ ÐºÐ½Ð¸Ð³Ñ","Ð²Ð°Ñ ÑанÑик"):C.c.fileCharactersNumber);case 11:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),"OK"!==t.status){e.next=13;break}return ev((0,D.oA)(t)),ek(""),e.next=10,n();case 10:L&&L(),e.next=21;break;case 13:if(!("NEW"===t.status||"CONVERTING"===t.status)){e.next=20;break}return e.next=16,(0,A.V)(500);case 16:return e.next=18,_();case 18:e.next=21;break;case 20:("ERROR"===t.status||"INVALID"===t.status)&&(o="art_file_upload_error",d=(0,c.m)(J),(0,l.Th)(o,eu,J),(0,s.I)({action:o,goalParams:W(W({},d),{},{user_id:null!==(r=eu.uuid)&&void 0!==r?r:""})}),ev((0,D.oA)(t)),ek(C.c.fileConverting));case 21:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),e.next=37,_();case 37:return o&&(ef(!0),ev((0,D.Ag)({isMasterSaving:!1,isMasterSaved:!0}
1)),L&&L()),e.next=40,ev((0,w.w)({bookId:String(ee)}));case 40:ey(!1);case 41:case"end":return e.stop()}},e)})),function(e){return t.apply(this,arguments)}),eI=".docx,.fb2"+String(et?"":",.pdf");return(0,B.jsxs)("div",{className:u()("shadowLevel0",o,M().wrapper,(0,r.Z)({},d||"",!!ej)),"data-testid":"book-file-uploader-section",id:"file",children:[(0,B.jsx)("div",{className:M().head,children:(0,B.jsx)(b.H3,{className:M().title,children:(0,B.jsx)(b.T,{children:es?"Файл ÑанÑика":ed?"Файл книги":"ТекÑÑ"})})}),n&&!e_&&(0,B.jsx)(_.E,{className:M().obsceneAlert,obsceneWordsCount:z||0,moderationId:X.id||0,"data-testid":"book-file-uploader-obscene-words-alert"}),eD&&!S&&(0,B.jsx)(x.b,{type:x.o.info,size:"small",isWrapper:!0,textInformation:m,className:M().alert}),n&&(0,B.jsx)(x.b,{className:M().obsceneAlert,type:0===ei?x.o.info:x.o.error,size:"small",isWrapper:!0,textInformation:"ФакÑиÑеÑкое налиÑие неÑензÑÑной бÑани: ".concat(ei||0)}),(0,B.jsx)(y.l,{id:String(ee),isFile:eT,isEdit:O,isDraft:et,buttonText:"ÐагÑÑзиÑÑ Ñайл",buttonLook:V||"secondary",isModerator:n,caption:U||eg,imageType:ec?"bookFile":"docx"===ew?"docxFile":"fb2"===ew?"fb2File":"pdf"===ew?"pdfFile":"bookFile",title:f((null==Q?void 0:Q.name)||"",45),isLocked:S,onChange:eE,errorMessage:ej||void 0,accept:q||eI,isLoading:eb,fileSize:er,downloadDate:ea,onFileClick:P,onSelectFileClick:function(){F&&F(),(0,l.Th)("add_file_click",eu,J)},type:Y||"book",fileContainerClassName:M().fileContainer,validationErrors:R,isFileError:!!eN,isAutofillAB:G,isHideEditorButton:H}),!(null!=Q&&Q.name.toLowerCase().endsWith("pdf"))&&!el&&(0,B.jsx)(x.b,{className:M().mobileText,type:x.o.info,textInformation:(0,B.jsx)(b.T,{children:"РедакÑÐ¾Ñ ".concat(es?"ÑанÑика":"книги"," недоÑÑÑпен в мобилÑной веÑÑии.")}),isWrapper:!0}),em&&(0,B.jsx)(Z,{onClose:function(){ef(!1)}})]})}},5349:function(e,t,n){"use strict";n.d(t,{s:function(){return s}});var r=n(89637),a=n(47544),o=n.n(a),i=n(85893),s=function(){return(0,i.jsx)(r.iO,{className:o().explanationContent,children:"Я подÑвеÑÐ¶Ð´Ð°Ñ Ð½Ð°Ð»Ð¸Ñие пÑав на иÑполÑзованное изобÑажение и неÑÑ Ð¿Ð¾Ð»Ð½ÑÑ ÑÑидиÑеÑкÑÑ Ð¾ÑвеÑÑÑвенноÑÑÑ Ð·Ð° его иÑполÑзование."})}},6619:function(e,t,n){"use strict";n.d(t,{A:function(){return u}});var r=n(20165),a=n(3490),o=n(50184),i=n(89637),s=n(83486),l=n(47544),c=n.n(l),d=n(85893),u=function(e){var t=e.links,n=e.onRemoveLink,l=e.onAddLink,u=e.isModerator,p=e.isLocked,m=e.isPublicationSubmitted,f=e.hasError;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(i.iO,{className:c().content,children:["УкажиÑе ÑÑÑÐ»ÐºÑ Ð½Ð° изобÑажение в инÑеÑнеÑе. ÐÑли иÑполÑзовано неÑколÑко изобÑажений Ð´Ð»Ñ ÐºÐ¾Ð»Ð»Ð°Ð¶Ð°, ÑкажиÑе ÑÑÑÐ»ÐºÑ Ð½Ð° каждое оÑделÑно."," ",(0,d.jsx)(o.a,{className:c().contentLink,href:a.x.faq.restrictions,target:"_blank",dataTestId:"license-link",children:"Ðожно иÑполÑзоваÑÑ ÑолÑко изобÑÐ°Ð¶ÐµÐ½Ð¸Ñ Ñ Ð»Ð¸Ñензией CC0."})]}),(0,d.jsx)(s.Z,{isLocked:p,isModerator:u,items:t,onRemoveLink:n,onAddLink:l,isPublicationSubmitted:m,hasError:f,errorClassName:r.As})]})}},5285:function(e,t,n){"use strict";n.d(t,{s:function(){return a}});var r=n(90415),a=function(e){var t=e.isLocked,n=e.isModeratorMode,a=e.isConstructor,o=e.isAI;return t?r._W.moderationStatus:o?r._W.ai:n?a?r._W.forModerator:"":r._W.default}},74707:function(e,t,n){"use strict";n.d(t,{Ad:function(){return g},Dn:function(){return o},EG:function(){return _},GM:function(){return m},KT:function(){return v},S9:function(){return h},TM:function(){return i},Ui:function(){return s},WX:function(){return a},cK:function(){return l},gY:function(){return x},hp:function(){return u},i:function(){return c},k3:function(){return y},kX:function(){return f},qN:function(){return d},sH:function(){return b},xE:function(){return p}});var r=n(20165),a=[r.jm.royaltyPercentage50,r.jm.anyStore],o=[r.jm.royaltyPercentage70,r.jm.litresAndPartnersOnly,r.jm.exclusivesSection,r.jm.protection],i=[r.jm.royaltyPercentage50,r.jm.anyStore],s=[r.jm.royaltyPercentage70,r.jm.litresAndPartnersOnly,r.jm.exclusivesSection,r.jm.protection],l=[r.jm.royaltyPercentage60,r.jm.anyStore],c=[r.jm.royaltyPercentage80,r.jm.litresAndPartnersOnly,r.jm.exclusivesSection,r.jm.protection],d=[r.jm.royaltyPercentage70,r.jm.anyStore],u=[r.jm.royaltyPercentage80,r.jm.litresAndPartnersOnly,r.jm.exclusivesSection,r.jm.protection],p=[r.jm.royaltyPercentage80,r.jm.anyStore],m=[r.jm.royaltyPercentage90,r.jm.litresAndPartnersOnly,r.jm.exclusivesSection,r.jm.protection],f='ÐоÑле нажаÑÐ¸Ñ Ð½Ð° "ÐпÑбликоваÑÑ" веÑнÑÑÑÑÑ Ðº лиÑензии книги в пÑоÑеÑÑе бÑÐ´ÐµÑ Ð½ÐµÐ²Ð¾Ð·Ð¼Ð¾Ð¶Ð½Ð¾',_="ÐоÑле пÑбликаÑии Ð²Ñ ÑможеÑе вноÑиÑÑ Ð»ÑбÑе Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð² ÐºÐ½Ð¸Ð³Ñ ÑолÑко Ñо ÑледÑÑÑего меÑÑÑа",h="17",g="11",v="0",x={value:v,label:"ÐеÑплаÑно"},b="ÐÑбеÑиÑе Ñип лиÑензии Ð´Ð»Ñ ÑаÑпÑоÑÑÑÐ°Ð½ÐµÐ½Ð¸Ñ Ð²Ð°Ñей ÑлекÑÑонной книги и заÑабаÑÑвайÑе пÑоÑÐµÐ½Ñ ÑоÑлÑи Ñ ÐºÐ°Ð¶Ð´Ð¾Ð¹ пÑодажи",y="ÐÑбеÑиÑе Ñип лиÑензии Ð´Ð»Ñ ÑаÑпÑоÑÑÑÐ°Ð½ÐµÐ½Ð¸Ñ Ð²Ð°Ñей книги в пÑоÑеÑÑе и заÑабаÑÑвайÑе пÑоÑÐµÐ½Ñ ÑоÑлÑи Ñ ÐºÐ°Ð¶Ð´Ð¾Ð¹ пÑодажи"},22751:function(e,t,n){"use strict";n.d(t,{z:function(){return o}});var r=n(31955),a=n(74707),o=function(){return"yes"===r.Z.get("recommended_price")?Number(a.Ad):Number(a.S9)}},20036:function(e,t,n){"use strict";n.d(t,{f:function(){return eu}});var r=n(59499),a=n(94184),o=n.n(a),i=n(35407),s=n(53418),l=n(89637),c=n(48698),d=n.n(c),u=n(85893),p=function(e){var t=e.onClick,n=e.onClose;return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("div",{className:d().wrapper,children:[(0,u.jsx)(l.H3,{className:d().title,children:"ÐзмениÑÑ ÑпоÑоб пÑбликаÑии?"}),(0,u.jsx)(l.u5,{children:"ÐаполненнÑе Ð¿Ð¾Ð»Ñ Ð¸ загÑÑженнÑе ÑÐ°Ð¹Ð»Ñ Ð±ÑдÑÑ ÑдаленÑ"})]}),(0,u.jsxs)(s.mz,{children:[(0,u.jsx)(i.z,{size:"medium",look:"secondary",onClick:n,dataTestId:"bookTypeDialog__cancelButton",children:"ÐÑмениÑÑ"}),(0,u.jsx)(i.z,{size:"medium",onClick:t,dataTestId:"bookTypeDialog__changeButton",children:"ÐзмениÑÑ"})]})]})},m=n(72449),f=n(29934),_=n(42467),h=n(33597),g=n.n(h),v=function(e){var t=e.onClose,n=e.dataTestId;return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)(s.r6,{className:g().header,children:[(0,u.jsx)("div",{className:g().successBlock,"data-testid":void 0===n?"success__block":n,
1children:(0,u.jsx)(_.Q,{imageType:"successUnion",width:112,className:g().illustration})}),(0,u.jsx)(l.mj,{className:g().title,children:"ÐаÑвка оÑпÑавлена"})]}),(0,u.jsxs)("div",{className:g().modalBody,children:[(0,u.jsxs)(l.u5,{children:["ÐÑ Ð¿Ð¾Ð»ÑÑили ваÑÑ Ð·Ð°ÑÐ²ÐºÑ Ð½Ð° Ñазделение ÑоÑлÑи Ñ ÑоавÑоÑом. ",(0,u.jsx)("br",{})," ",(0,u.jsx)("br",{})," РекомендÑем дождаÑÑÑÑ Ð¾ÑвеÑа ÑлÑÐ¶Ð±Ñ Ð¿Ð¾Ð´Ð´ÐµÑжки и поÑле Ð´Ð¾Ð±Ð°Ð²Ð»ÐµÐ½Ð¸Ñ ÑоавÑоÑа оÑпÑавиÑÑ ÐºÐ½Ð¸Ð³Ñ Ð½Ð° модеÑаÑиÑ."]}),(0,u.jsx)(i.z,{look:"secondary",size:"medium",grow:!0,onClick:t,className:g().button,dataTestId:"success__button--ok",children:"ХоÑоÑо"})]})]})},x=n(88525),b=n.n(x),y=function(e){var t=e.onClose,n=e.onGenerate;return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("div",{className:b().wrapper,children:[(0,u.jsx)(_.Q,{className:b().illustration,imageType:"warningYellow56x56",width:56,height:56}),(0,u.jsx)(l.mj,{className:b().title,children:"СгенеÑиÑоваÑÑ Ð°Ð½Ð½Ð¾ÑаÑиÑ?"}),(0,u.jsx)(l.OE,{className:b().text,children:"ÐаÑа ÑекÑÑÐ°Ñ Ð°Ð½Ð½Ð¾ÑаÑÐ¸Ñ ÑоÑÑÑÑÑÑ Ð¸ замениÑÑÑ Ð½Ð¾Ð²Ð¾Ð¹"})]}),(0,u.jsxs)("div",{className:b().footer,children:[(0,u.jsx)(i.z,{className:b().closeButton,onClick:t,size:"small",look:"secondary",dataTestId:"button--cancel",children:"ÐÑмена"}),(0,u.jsx)(i.z,{size:"small",onClick:n,dataTestId:"button--generate",children:"СгенеÑиÑоваÑÑ"})]})]})},C=n(50029),j=n(64687),k=n.n(j),D=n(67282),w=n(42119),N=n(11163),T=n(67294),E=n(14416),I=n(16310),A=n(38739),O=n(62754),S=n(83535),P=n(67386),F=n(36613),L=n(42221),B="ÐакÑимÑм 50 Ñимволов",Z="ÐÑо поле должно ÑодеÑжаÑÑ Ð±ÑквÑ",R=/[A-Za-z\u0400-\u04FF]/,M=n(37295),z=n.n(M),W=I.Ry().shape({surname:I.Z_().required("УкажиÑе ÑÐ°Ð¼Ð¸Ð»Ð¸Ñ ÑоавÑоÑа").max(50,B).matches(R,{message:Z,excludeEmptyString:!0}),name:I.Z_().required("УкажиÑе Ð¸Ð¼Ñ ÑоавÑоÑа").max(50,B).matches(R,{message:Z,excludeEmptyString:!0}),middleName:I.Z_().max(50,B).matches(R,{message:Z,excludeEmptyString:!0}),litresLink:I.Z_().required("ÐÑÑавÑÑе ÑÑÑÐ»ÐºÑ Ð½Ð° ÑÑÑаниÑÑ Ð°Ð²ÑоÑа на ÐиÑÑеÑ"),royaltyPercentage:I.Z_().matches(/^\d+$/,"ÐÑо поле должно ÑодеÑжаÑÑ ÑолÑко ÑиÑÑÑ ")}),G=function(e){var t,n=e.onSuccess,a=e.shouldWarnSync,c=(0,T.useState)(""),d=c[0],p=c[1],m=(0,T.useState)(""),f=m[0],_=m[1],h=(0,T.useState)(""),g=h[0],v=h[1],x=(0,T.useState)(""),b=x[0],y=x[1],j=(0,T.useState)(""),I=j[0],B=j[1],Z=(0,T.useState)(!1),R=Z[0],M=Z[1],G=(0,T.useState)(!1),V=G[0],U=G[1],H=(0,T.useState)([]),q=H[0],Y=H[1],J=(0,T.useState)(),K=J[0],X=J[1],Q=(0,T.useState)(""),$=Q[0],ee=Q[1],et=(0,E.v9)(F.d),en=(0,E.v9)(P.MY),er=et.email,ea=en.book_id,eo=(0,N.useRouter)().query.bookId,ei=(0,w.V)({surname:d,name:f,middleName:g,litresLink:b,royaltyPercentage:I},W),es=ei.validationErrors,el=ei.validateAllFieldsAsync,ec=ei.debouncedValidate,ed=(t=(0,C.Z)(k().mark(function e(){var t,r,a,o;return k().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,el();case 2:if(t=e.sent,K){e.next=7;break}return ee(""),U(!0),e.abrupt("return");case 7:if(t){e.next=18;break}return M(!1),r="ÐобавиÑÑ ÑоавÑоÑа ".concat(d," ").concat(f," ").concat(g," ").concat(b," \nÐÐ¾Ð»Ñ ÑоавÑоÑа ").concat(I,"%"),a=new FormData,K&&(a.append("type","coauthor"),a.append("book_id",eo||ea),a.append("email",er),a.append("feedback_file",K),a.append("feedback",r)),o="sendFeedback",e.next=15,(0,L.B)({apiPointName:o,body:a});case 15:0===e.sent.errors.length?n():M(!0);case 18:case"end":return e.stop()}},e)})),function(){return t.apply(this,arguments)});return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(s.r6,{children:(0,u.jsx)(l.mj,{children:"ÐобавиÑÑ ÑоавÑоÑа"})}),(0,u.jsxs)("div",{className:z().modalBody,children:[a&&(0,u.jsx)(A.b,{className:z().warnSyncAlert,type:A.o.info,textInformation:"УказаннÑе наÑÑÑойки бÑдÑÑ Ð½Ð°ÑледоваÑÑÑÑ Ð´Ð»Ñ ÑвÑзанной веÑÑии книги",isWrapper:!0,dataTestId:"digital-book-audio-coauthor-alert"}),(0,u.jsx)(l.iO,{className:z().text,children:"ЧÑÐ¾Ð±Ñ Ð°Ð²ÑомаÑиÑеÑки ÑазделиÑÑ ÑоÑлÑи Ñ Ð´ÑÑгим авÑоÑом, заполниÑе ÑоÑмÑ:"}),(0,u.jsx)(O.o,{labelText:"Ð¤Ð°Ð¼Ð¸Ð»Ð¸Ñ ÑоавÑоÑа",value:d,onChange:function(e){p(e)},errorMessage:es.surname,debouncedValidate:function(){ec("surname")},className:o()((0,r.Z)({},z().inputError,es.surname)),dataTestId:"inviteCoauthor__input--surname"}),(0,u.jsx)(O.o,{labelText:"ÐÐ¼Ñ ÑоавÑоÑа",value:f,onChange:function(e){_(e)},errorMessage:es.name,debouncedValidate:function(){ec("name")},className:o()((0,r.Z)({},z().inputError,es.name)),dataTestId:"inviteCoauthor__input--name"}),(0,u.jsx)(O.o,{labelText:"ÐÑÑеÑÑво ÑоавÑоÑа (еÑли еÑÑÑ)",value:g,onChange:function(e){v(e)},errorMessage:es.middleName,debouncedValidate:function(){ec("middleName")},dataTestId:"inviteCoauthor__input--middleName"}),(0,u.jsx)(O.o,{labelText:"СÑÑлка на ÑоавÑоÑа",value:b,onChange:function(e){y(e)},errorMessage:es.litresLink,debouncedValidate:function(){ec("litresLink")},className:o()((0,r.Z)({},z().linkError,es.litresLink)),dataTestId:"inviteCoauthor__input--link"}),(0,u.jsx)(l.Yd,{className:o()(z().caption,(0,r.Z)({}
1,z().error,es.litresLink)),dataTestId:"inviteCoauthor__caption--linkHint",children:"СÑÑлка на ÑÑÑаниÑÑ Ð°Ð²ÑоÑа на ÐиÑÑеÑ"}),(0,u.jsxs)("div",{className:z().royaltyPercentage,children:[(0,u.jsx)(O.o,{labelText:"ÐÐ¾Ð»Ñ ÑоÑлÑи ÑоавÑоÑа",value:I,onChange:function(e){if(Number(e.replace(/\D/g,""))>100){B("100");return}B(e.replace(/\D/g,"").slice(0,3))},errorMessage:es.royaltyPercentage,debouncedValidate:function(){ec("royaltyPercentage")},type:"number",dataTestId:"inviteCoauthor__input--royalty"}),(0,u.jsx)("span",{className:o()(z().percent,(0,r.Z)({},z().percentIsVisible,I.length>0)),children:"%"})]}),(0,u.jsx)(l.OE,{className:z().description,dataTestId:"inviteCoauthor__text--fileDescription",children:"ÐагÑÑзиÑе Ñкан договоÑа Ñ ÑоавÑоÑом:"}),(V||$)&&(0,u.jsx)(A.b,{type:A.o.error,size:"small",isWrapper:!0,textInformation:$||"ÐагÑÑзиÑе Ñайл",className:z().alert}),(0,u.jsx)(S.B,{items:q,onChange:function(e){M(!1),U(!1);var t,n=null===(t=e.target.files)||void 0===t?void 0:t.item(0),r=(0,D.DM)();if(null!==n&&n){var a=n.name.toLowerCase(),o=["pdf","docx","doc"].some(function(e){return a.endsWith(e)});o||ee("ÐевеÑнÑй ÑоÑÐ¼Ð°Ñ Ñайла"),o&&(Y([{id:r,title:n.name,value:1,isError:!1,errorText:void 0}]),X(n),ee("")),e.target.value=""}},buttonLook:"primary",onDeleteFile:function(){Y([]),X(void 0)},accept:".pdf,.docx,.doc",description:"1 Ñайл ÑоÑмаÑа PDF, DOCX или DOC."})]}),(0,u.jsxs)(s.mz,{className:z().footer,children:[(0,u.jsx)(l.iO,{className:o()(z().serverError,(0,r.Z)({},z().errorIsVisible,R)),children:"ÐÑоизоÑла оÑибка. ÐопÑобÑйÑе еÑе Ñаз."}),(0,u.jsx)(i.z,{look:"primary",size:"medium",onClick:ed,dataTestId:"inviteCoauthor__button--submit",children:"ÐÑпÑавиÑÑ"})]})]})},V=n(27448),U=n.n(V),H=function(e){var t=e.onSubmit,n=e.onDecline,r=e.isLoading,a=e.selectedChapter,o=(0,T.useState)((null==a?void 0:a.name)||""),c=o[0],d=o[1],p=(0,T.useState)(""),m=p[0],f=p[1];return(0,u.jsxs)("div",{className:U().renameDraftChapterModalWrapper,"data-testid":"renameDraftChapterDialog",children:[(0,u.jsx)(s.r6,{children:(0,u.jsx)(l.mj,{children:"ÐеÑеименоваÑÑ Ð³Ð»Ð°Ð²Ñ"})}),(0,u.jsx)("div",{className:U().renameDraftChapterModalBody,children:(0,u.jsx)(O.o,{maxLength:100,withLengthCounter:!0,labelText:"ÐведиÑе название главÑ",value:c,onChange:function(e){d(e),f("")},errorMessage:m,dataTestId:"renameDraftChapterDialog__input"})}),(0,u.jsxs)(s.mz,{className:U().renameDraftChapterModalFooter,children:[(0,u.jsx)(i.z,{size:"medium",look:"tertiary",onClick:n,disabled:r,dataTestId:"button--cancel",children:"ÐÑмена"}),(0,u.jsx)(i.z,{size:"medium",onClick:function(){c.trim()?c.length>100?f("СлиÑком длинное название главÑ"):(f(""),t(c)):f("ÐведиÑе название главÑ")},isLoading:r,dataTestId:"button--save",children:"СоÑ
ÑаниÑÑ"})]})]})},q=n(81369),Y=n(3114),J=n(9858),K=n(9922),X=n(90243),Q=n(69049),$=n(97708),ee=n(4486),et=n(66709),en=n(87025),er=n(91157),ea=n(52444),eo=n(34605),ei=n(8461),es=n.n(ei),el=function(e){var t=e.selectedChapter,n=e.selectedDraftPublicationDate,a=e.onSetSelectedDraftPublicationDate,c=e.onSubmit,d=e.isLoading,p=e.onDecline,f=e.errors,_=e.selectedDraftPublicationTime,h=e.onSetSelectedDraftPublicationTime,g=(0,E.v9)(er.gU),v=(0,T.useMemo)(function(){return Math.ceil((Date.now()+eo.yJ)/eo.yJ)*eo.yJ},[]),x=(0,T.useMemo)(function(){return(0,X.cr)(v,X.lf)},[v]),b=(0,T.useMemo)(function(){return new Date(x.year,x.month-1,x.day)},[x]),y=x.hour,C=(0,T.useMemo)(function(){return n?(0,ea.sr)(n):null},[n]),j=(0,T.useMemo)(function(){return C&&(0,q.Z)(C,b)?Q.p.filter(function(e){return Number(e.value)>=y}):Q.p},[C,b,y]);(0,T.useEffect)(function(){if(C&&(0,q.Z)(C,b)){var e=Number(_||0);Number.isFinite(e)&&e<y&&h(String(y))}},[C,b,y,_,h]);var k=j.find(function(e){return e.value===_}),D=(0,T.useState)(m.d.regular),w=D[0],N=D[1],I=(0,T.useState)(""),O=I[0],S=I[1],P=w===m.d.regular||!g.is_published,F=(0,T.useMemo)(function(){return null!=t&&t.max_publication_date?new Date(t.max_publication_date):(0,Y.Z)(eo.OH,eo.T9)},[null==t?void 0:t.max_publication_date]);return(0,T.useEffect)(function(){Array.isArray(f)&&f[0]&&S(f[0]),!Array.isArray(f)&&f&&S(f)},[f]),(0,T.useEffect)(function(){n&&N(m.d.planned)},[]),(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(s.r6,{children:(0,u.jsx)(l.mj,{children:"ÐаÑа пÑбликаÑии главÑ"})}),(0,u.jsxs)("div",{className:es().selectDraftPublicationDialogBody,
1children:[(0,u.jsx)(l.u5,{children:"ÐÑбеÑиÑе, когда опÑбликоваÑÑ Ð³Ð»Ð°Ð²Ñ:"}),(0,u.jsx)(et.E,{items:eo.jW,onChange:function(e){N(e),S("")},value:w}),w!==m.d.regular&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("div",{className:es().selectDraftPublicationDialogDatePickerContainer,children:[(0,u.jsx)($.a,{labelText:"ÐаÑа пÑбликаÑии главÑ",value:n,onChange:function(e){a((0,ea.UW)(e[0])),S("")},isDisabled:P,errorMessage:O,minDate:b,maxDate:eo.QF,disable:[{from:eo.OH,to:(0,J.Z)(b,1)},{from:F,to:eo.QF}],dataTestId:"selectDraftPublicationDateDialog__datepicker"},w),(0,u.jsx)(ee.J,{icon:"calendar24x24",size:20,className:o()(es().selectDraftPublicationDialogDatePickerIcon,(0,r.Z)({},es().disabled,P))})]}),(0,u.jsx)(en.c,{labelText:"ÐÑÐµÐ¼Ñ (мÑк)",placeholder:"ÐÑÐµÐ¼Ñ (мÑк)",isDisabled:P,options:j,value:k,onChange:function(e){return h((null==e?void 0:e.value)||"")}}),!g.is_published&&(0,u.jsx)(A.b,{className:es().alert,type:A.o.info,isWrapper:!0,textInformation:"ÐÑ ÑможеÑе ÑÑÑановиÑÑ Ð´Ð°ÑÑ Ð¿ÑбликаÑии поÑле пеÑвой ÑÑпеÑной модеÑаÑии книги в пÑоÑеÑÑе"}),n&&(0,u.jsx)(A.b,{className:es().alert,type:A.o.info,isWrapper:!0,textInformation:"ÐоÑле вÑбоÑа даÑÑ Ð¾Ð¿ÑбликÑйÑе Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ ÐºÐ½Ð¸Ð³Ð¸ в пÑоÑеÑÑе, ÑÑÐ¾Ð±Ñ Ð½Ð¾Ð²Ð°Ñ Ð³Ð»Ð°Ð²Ð° вÑÑла в вÑбÑаннÑй денÑ."})]})]}),(0,u.jsxs)(s.mz,{className:es().selectDraftPublicationDialogFooter,children:[(0,u.jsx)(i.z,{size:"medium",look:"tertiary",onClick:p,disabled:d,dataTestId:"button--cancel",children:"ÐÑмена"}),(0,u.jsx)(i.z,{size:"medium",onClick:function(){if(w===m.d.regular){c(w);return}if(!n){S("ÐÑбеÑиÑе даÑÑ Ð¿ÑбликаÑии");return}if((0,K.J)(n,_)<v){S("ÐаÑа и вÑÐµÐ¼Ñ Ð´Ð¾Ð»Ð¶Ð½Ñ Ð±ÑÑÑ Ð½Ðµ Ñанее Ñем ÑеÑез 1 ÑаÑ");return}c(w)},isLoading:d,dataTestId:"button--schedule",children:"ÐапланиÑоваÑÑ"})]})]})},ec=n(37007),ed=n.n(ec),eu=function(e){var t,n=e.openedDialog,a=e.isLoading,i=e.onCloseDialogs,l=e.errors,c=e.onChangeChapterName,d=e.onDeleteChapter,_=e.selectedChapter,h=e.selectedDraftPublicationDate,g=e.onSetPublicationDate,x=e.onSubmitPublicationDate,b=e.onCoauthorInvitedSuccess,C=e.onClickAIGenerate,j=e.shouldWarnSync,k=e.selectedDraftPublicationTime,D=e.onSetSelectedDraftPublicationTime,w=e.onChangeBookType;return(0,u.jsxs)(s.u_,{isOpen:n!==m.o.none,onRequestClose:n===m.o.generateYandexAnnotationDialog?void 0:i,shouldCloseOnEsc:!0,shouldCloseOnOverlayClick:!0,className:o()((t={},(0,r.Z)(t,ed().renameDraftChapterDialog,n===m.o.renameDraftDialog),(0,r.Z)(t,ed().generateYandexAnnotationDialog,n===m.o.generateYandexAnnotationDialog),(0,r.Z)(t,ed().bookTypeDialog,n===m.o.bookTypeDialog),t)),focusLockUIClassName:n===m.o.renameDraftDialog?ed().renameDraftChapterDialog:void 0,children:[n===m.o.renameDraftDialog&&(0,u.jsx)(H,{onSubmit:c,onDecline:i,isLoading:a,selectedChapter:_}),n===m.o.deleteChapterDraft&&(0,u.jsx)(f.a,{onDecline:i,onSubmit:d,selectedEntity:_||void 0,title:"Удаление главÑ",description:"ÐÑ ÑобиÑаеÑеÑÑ ÑдалиÑÑ Ð³Ð»Ð°Ð²Ñ. Ðна Ñак же бÑÐ´ÐµÑ Ñдалена из обÑего Ñайла книги."}),n===m.o.selectPublicationDateDialog&&(0,u.jsx)(el,{selectedChapter:_,selectedDraftPublicationDate:h,selectedDraftPublicationTime:k,isLoading:a,onSubmit:x,onDecline:i,onSetSelectedDraftPublicationDate:g,onSetSelectedDraftPublicationTime:D,errors:l}),n===m.o.inviteCoauthorDialog&&(0,u.jsx)(G,{onSuccess:b,shouldWarnSync:j}),n===m.o.coauthorInviteSuccessDialog&&(0,u.jsx)(v,{onClose:i}),n===m.o.generateYandexAnnotationDialog&&(0,u.jsx)(y,{onClose:i,onGenerate:C}),n===m.o.bookTypeDialog&&(0,u.jsx)(p,{onClose:i,onClick:w})]})}},9e4:function(e,t,n){"use strict";n.d(t,{e1:function(){return r}});var r=function(e){return e.bookPrice.bookPrices}},20884:function(e,t,n){"use strict";n.d(t,{n:function(){return r}});var r=function(e){return e.genres.allGenres}},38851:function(e,t,n){"use strict";n.d(t,{$:function(){return r},w:function(){return a}});var r=function(e,t){return void 0===t?0:Math.floor(100*Number(e*t/125.5))/100},a=function(e){return Math.floor(e-25.5*e/100)}},59325:function(e,t,n){"use strict";n.d(t,{f:function(){return i}});var r=n(39424),a=n(63602),o=function(e,t){r.Tb("Frontend received a custom error from the backend",{extra:{error:t}}),(0,a.x2)({message:e,options:{position:"top-center"}})},i=function(e,t,n){var i=null===(s=e.payload)||void 0===s||null===(s=s.errors)||void 0===s?void 0:s.length;if(i){var s,l,c,d,u=e.payload.errors[0];if(null!==(d=u.messages)&&void 0!==d&&d.length){o(u.messages[0],u),n&&n();return}}var p=null===(l=e.error)||void 0===l?void 0:l.message;p&&(404===e.status?(0,a.x2)({message:"ÐÑибка 404. ÐбÑаÑиÑеÑÑ Ð² ÑеÑ
1
поддеÑжкÑ.",options:{position:"top-center"}}):(r.Tb("Frontend recieved error from the backend after generating an incorrect URL",{extra:{error:e.error}}),console.trace(e.error)),n&&n());var m=null===(c=e.errors)||void 0===c?void 0:c.length;if(m){var f,_=e.errors[0];if(null!==(f=_.messages)&&void 0!==f&&f.length){o(_.messages[0],_),n&&n();return}}!t||i||p||m||t()}},37473:function(e,t,n){"use strict";n.d(t,{W:function(){return s}});var r=n(17610),a=n(73842),o=n(58563),i=n(8635),s=function(e,t,n){if(e===r.zT.commerce||e===r.zT.withoutAudiobook)return{nonExclusiveRoyaltyPercent:0,exclusiveRoyaltyPercent:0};var s=t===i.FV.advanced||t===i.FV.individual_80||t===i.FV.individual_90?t:i.FV.basic;return e===r.zT.master&&n!==r.m0.selfVoiced?t===i.FV.advanced||t===i.FV.individual_80||t===i.FV.individual_90?{nonExclusiveRoyaltyPercent:25,exclusiveRoyaltyPercent:40}:{nonExclusiveRoyaltyPercent:20,exclusiveRoyaltyPercent:25}:{nonExclusiveRoyaltyPercent:a.Zg[e][s][o.oC.nonExclusive],exclusiveRoyaltyPercent:a.Zg[e][s][o.oC.exclusive]}}},15832:function(e,t,n){"use strict";n.d(t,{L:function(){return a}});var r=n(87714),a=function(e){return e.replace(r.pF," ")}},26411:function(e,t,n){"use strict";n.d(t,{d:function(){return r}});var r=function(e){return e.startsWith("https://")||e.startsWith("http://")}},92912:function(e){e.exports={counterWrapper:"AutocompleteSelect_counterWrapper__Ov3nC",helpText:"AutocompleteSelect_helpText__RZ6vj",withError:"AutocompleteSelect_withError__fXg8f",lengthCounter:"AutocompleteSelect_lengthCounter__B74zW",counterWithError:"AutocompleteSelect_counterWithError__LKKtd",helpTextWrapper:"AutocompleteSelect_helpTextWrapper__pflYi",searchIcon:"AutocompleteSelect_searchIcon__hp7e7"}},59083:function(e){e.exports={wrapper:"Avatar_wrapper__60nv9",image:"Avatar_image__10nJj",withBorder:"Avatar_withBorder__fNXW9",xs:"Avatar_xs__zMXWX",s:"Avatar_s__qk20Z",m:"Avatar_m__oVUbo",l:"Avatar_l__lUWSY"}},81321:function(e){e.exports={dialogWrapper:"Dialog_dialogWrapper__HIKrj",dialogContentContainer:"Dialog_dialogContentContainer__upA2G",dialogIllustration:"Dialog_dialogIllustration__vJr2C",dialogTitleText:"Dialog_dialogTitleText__LzROt",dialogBodyText:"Dialog_dialogBodyText__6QVhI",dialogButtonsContainer:"Dialog_dialogButtonsContainer__emnye",dialogIcon:"Dialog_dialogIcon__dydUE"}},56592:function(e){e.exports={list:"MiniFile_list__6BuzE",wrapper:"MiniFile_wrapper__k_mrc",text:"MiniFile_text__4C66j",error:"MiniFile_error__Oq5SX",errorIcon:"MiniFile_errorIcon__8hsPi",loader:"MiniFile_loader__yMkYd",iconTrash:"MiniFile_iconTrash__I4YY3",titleLink:"MiniFile_titleLink__yaBtl"}},24386:function(e){e.exports={wrapper:"NewLabel_wrapper__CP54s",icon:"NewLabel_icon__RaduG",info:"NewLabel_info__WIBWJ"}},31002:function(e){e.exports={button:"SwitcherButton_button__PDmmq",isSwitch:"SwitcherButton_isSwitch__38B_G",icon:"SwitcherButton_icon__MXv1z",text:"SwitcherButton_text__L3Qn3"}},72300:function(e){e.exports={wrapper:"ToggleGroup_wrapper___JdIP",labelItem:"ToggleGroup_labelItem__iqJFB",radioItem:"ToggleGroup_radioItem__GEb7i",checked:"ToggleGroup_checked__JAsp1",disabled:"ToggleGroup_disabled__zN4EN"}},30918:function(e){e.exports={container:"ArtGenres_container__wk12v",headerWrapper:"ArtGenres_headerWrapper__ESrRM",header:"ArtGenres_header__IeFUy",prompt:"ArtGenres_prompt__ftkM3",genresInput:"ArtGenres_genresInput__Dh3ny"}},50421:function(e){e.exports={helpTextWrapper:"GenresAutoSelect_helpTextWrapper__3IaNf",helpText:"GenresAutoSelect_helpText__sspcS",withError:"GenresAutoSelect_withError__9sPRj",lengthCounter:"GenresAutoSelect_lengthCounter__P_LI7",counterWithError:"GenresAutoSelect_counterWithError__VbqT6"}},20614:function(e){e.exports={ageContainer:"ArtPgRatePanel_ageContainer__Yy_rK",h3:"ArtPgRatePanel_h3__hyJ2w",switcherContainer:"ArtPgRatePanel_switcherContainer__OdsAr",switcherText:"ArtPgRatePanel_switcherText__2g93E",toggleGroup:"ArtPgRatePanel_toggleGroup__equ_O",ageDescription:"ArtPgRatePanel_ageDescription__b7oJc",isHighlighted:"ArtPgRatePanel_isHighlighted__TmrMT"}},79417:function(e){e.exports={container:"ArtTags_container__lp73U",headerWrapper:"ArtTags_headerWrapper__YCqtM",header:"ArtTags_header__SUMBm",prompt:"ArtTags_prompt__hhJR5",hide:"ArtTags_hide__SE9va",helpText:"ArtTags_helpText__028wS",tagsInput:"ArtTags_tagsInput__LnqYB"}},58671:function(e){e.exports={wrapper:"ArtTitle_wrapper__jOB8C",head:"ArtTitle_head__HtHIG",title:"ArtTitle_title__N8JnF",link:"ArtTitle_link__4pjW6",input:"ArtTitle_input__MICwr",isSubtitle:"ArtTitle_isSubtitle__QVtGK",subheader:"ArtTitle_subheader__PrKS_"}},81589:function(e){e.exports={audioBookAudioFragmentsContainer:"AudioBookAudioFragments_audioBookAudioFragmentsContainer___tVPL",audioBookAudioFragmentsHeading:"AudioBookAudioFragments_audioBookAudioFragmentsHeading__7l7Ra",audioBookAudioFragmentsSwitcherGroup:"AudioBookAudioFragments_audioBookAudioFragmentsSwitcherGroup__zi1y_",audioBookAudioFragmentsSwitcherContainer:"AudioBookAudioFragments_audioBookAudioFragmentsSwitcherContainer__GAwck",audio
1BookAudioFragmentsSwitcherTextContainer:"AudioBookAudioFragments_audioBookAudioFragmentsSwitcherTextContainer__L2iwB",isHighlighted:"AudioBookAudioFragments_isHighlighted__Qpek3"}},96248:function(e){e.exports={wrapper:"BookAnnotation_wrapper__KBKXd",head:"BookAnnotation_head__QSDan",title:"BookAnnotation_title__cx20R",link:"BookAnnotation_link__DwyyY",aiGenerateWrapper:"BookAnnotation_aiGenerateWrapper__9otpF",aiGenerateBlock:"BookAnnotation_aiGenerateBlock__KUOz4",aiGenerateButton:"BookAnnotation_aiGenerateButton__8aMRK",aiGenerateText:"BookAnnotation_aiGenerateText__84i9M",aiGenerateIcon:"BookAnnotation_aiGenerateIcon__PtSnL",aiGenerateCounter:"BookAnnotation_aiGenerateCounter__oICga",aiGenerateError:"BookAnnotation_aiGenerateError__A9R7t",input:"BookAnnotation_input__M0cK9",isAnnotation:"BookAnnotation_isAnnotation__ad1ge",isModerator:"BookAnnotation_isModerator__G9zVQ"}},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"}},13418:function(e){e.exports={wrapper:"Comment_wrapper__nOoQ5",borderRadius:"Comment_borderRadius__P8T4s",switcher:"Comment_switcher__XDypJ",color:"Comment_color__SWZbM",comment:"Comment_comment__hosGb",commentModerator:"Comment_commentModerator__5Kdj3"}},55310:function(e){e.exports={deleteEntityDialogFooter:"DeleteEntityDialog_deleteEntityDialogFooter__fpL0e",deleteEntityDialogContent:"DeleteEntityDialog_deleteEntityDialogContent__VloHK",deleteEntityDialogInput:"DeleteEntityDialog_deleteEntityDialogInput__AM2Uz"}},35448:function(e){e.exports={modalCustomStyle:"DialogOffer_modalCustomStyle___vS3K",wrapperOffer:"DialogOffer_wrapperOffer__MxmDJ",goToFormText:"DialogOffer_goToFormText__Eyb_m",offerPageBackground:"DialogOffer_offerPageBackground__iojsS",footerModal:"DialogOffer_footerModal___9UYE"}},68746:function(e){e.exports={wrapper:"LicenceCard_wrapper__Thcz5",noPrice:"LicenceCard_noPrice__UjtL_",contentWrapper:"LicenceCard_contentWrapper__o0eF5",exclusiveLabel:"LicenceCard_exclusiveLabel__xyR7l",isOnBorder:"LicenceCard_isOnBorder__7o7cU",head:"LicenceCard_head__UA_0x",title:"LicenceCard_title__kcCt9",subtitle:"LicenceCard_subtitle__QFJd7",container:"LicenceCard_container__jcMVH",itemsWrapper:"LicenceCard_itemsWrapper__DW06M",item:"LicenceCard_item__AUKKJ",caption:"LicenceCard_caption__TaX2x",icon:"LicenceCard_icon__8eX4S",priceBlock:"LicenceCard_priceBlock__KBwNW",price:"LicenceCard_price__i81Gm",income:"LicenceCard_income__A7ND2",buttonWrapper:"LicenceCard_buttonWrapper__i_Ec_",isActive:"LicenceCard_isActive__dZaGr",disabled:"LicenceCard_disabled__D1gHT",disabledButton:"LicenceCard_disabledButton__Zeeid",wrapperActive:"LicenceCard_wrapperActive__tsBgQ",oldPercent:"LicenceCard_oldPercent__pBgdq",oldPrice:"LicenceCard_oldPrice__6Ax5b",emptyPrice:"LicenceCard_emptyPrice__MyYtR"}},76891:function(e){e.exports={wrapper:"LinkUploader_wrapper__E4p_m",input:"LinkUploader_input__DIyDZ",button:"LinkUploader_button__ZU940",buttonSave:"LinkUploader_buttonSave__pKOUc",linkItem:"LinkUploader_linkItem__HMTVw",link:"LinkUploader_link__wQZM_",buttonRemove:"LinkUploader_buttonRemove__gUzhz",buttonReset:"LinkUploader_buttonReset__RNgOi",wrapperBlock:"LinkUploader_wrapperBlock__Z82oL"}},65489:function(e){e.exports={alert:"MiniFileUploader_alert__dhRgR",buttonBlock:"MiniFileUploader_buttonBlock__OPnky",button:"MiniFileUploader_button__4Eenm",caption:"MiniFileUploader_caption__Vr2CW",description:"MiniFileUploader_description___TGgV"}},36107:function(e){e.exports={wrapper:"NonStandardRoyaltyRateLicenceCard_wrapper__7Hosi",contentWrapper:"NonStandardRoyaltyRateLicenceCard_contentWrapper__LHsvZ",head:"NonStandardRoyaltyRateLicenceCard_head__P9a3S",subtitle:"NonStandardRoyaltyRateLicenceCard_subtitle__SL_ZO",priceBlock:"NonStandardRoyaltyRateLicenceCard_priceBlock__q_26k",price:"NonStandardRoyaltyRateLicenceCard_price__iHvdP",disabled:"NonStandardRoyaltyRateLicenceCard_disabled__k6wlU",wrapperActive:"NonStandardRoyaltyRateLicenceCard_wrapperActive__f5pHe"}},16077:function(e){e.exports={root:"Notification_root___WdZ1",mainWithoutButton:"Notification_mainWithoutButton__oz8C_",positionTopRight:"Notification_positionTopRight__eI_HN",positionBottomRight:"Notification_positionBottomRight__g54SF",leftWrapper:"Notification_leftWrapper__XlVt5",header:"Notification_header__jwDSL",subHeader:"Notification_subHeader__Iv8vR",turnButton:"Notification_turnButton__JlFay",buttonText:"Notification_buttonText__p_zfp",closeIcon:"Notification_closeIcon__InX7p"}},57850:function(e){e.exports={audioCardContainer:"AudioCard_audioCardContainer__uAhr3",audioCardHeader:"AudioCard_audioCardHeader__juvzI",audioCardDragIcon:"AudioCard_audioCardDragIcon__RIOMp",audioCardIllustration:"AudioCard_audioCardIllustration__IA2JW",audioCardTextContainer:"AudioCard_audioCardTextContainer__kq2nR",audioCardFileNameContent:"AudioCard_audioCardFileNameContent__RCqff",audioCardFileNameBase:"AudioCard_audioCardFileNameBase__PZBVx",freeFragmentSummary:"AudioCard_freeFragmentSummary__FzXxC",time:"AudioCard_time__XHTwd",editFreeFragmentButton:"AudioCard_editFreeFragmentButton__3FJ9v",audioCardControlsContainer:"AudioCard_audioCardControlsContainer__U8ero",audioCardLoading:"AudioCard_audioCardLoading__TfCGG",audioCardError:"AudioCard_audioCardError__adfkP",audioCardLoadingTextContainer:"AudioCard_audioCardLoadingTextContainer__Wqo_L",audioCardDeleteFileControl:"AudioCard_audioCardDeleteFileControl__fHkW7",freeFragmentEditor:"AudioCard_freeFragmentEditor__A5FL5",freeFragmentActions:"AudioCard_freeFragmentActions__YJ6z7",audioCardFileNameSuffix:"AudioCard_audioCardFileNameSuffix__E9PP5",desktopSummaryLabel:"AudioCard_desktopSummaryLabel__zriRS",rangeError:"AudioCard_rangeError__K_8ky"}},97062:function(e){e.exports={root:"FreeFragmentPlayer_root__mhCx2",player:"FreeFragmentPlayer_player__F6ip8",playButton:"FreeFragmentPlayer_playButton__u74gA",pauseButton:"FreeFragmentPlayer_pauseButton__y2jwf",time:"FreeFragmentPlayer_time__Lh_Qt",currentTime:"FreeFragmentPlayer_
1currentTime__2yAdr",durationTime:"FreeFragmentPlayer_durationTime__NTLpz",fragmentHint:"FreeFragmentPlayer_fragmentHint__KWama",timeline:"FreeFragmentPlayer_timeline__rz4_5",track:"FreeFragmentPlayer_track__wmWz0",fragmentTrack:"FreeFragmentPlayer_fragmentTrack__dfmqH",playbackMarker:"FreeFragmentPlayer_playbackMarker__YPYpz",fragmentRange:"FreeFragmentPlayer_fragmentRange__q1XDR",fragmentTooltip:"FreeFragmentPlayer_fragmentTooltip__ybFxb",fragmentTooltipLabel:"FreeFragmentPlayer_fragmentTooltipLabel__bjy1N",fragmentTooltipTime:"FreeFragmentPlayer_fragmentTooltipTime__cUwrY"}},99982:function(e){e.exports={modalWrapper:"AudioRecommendationsDialog_modalWrapper__ard3F",audioRecommendationDialogContentContainer:"AudioRecommendationsDialog_audioRecommendationDialogContentContainer__LDftk",audioRecommendationDialogFooter:"AudioRecommendationsDialog_audioRecommendationDialogFooter__08lQ_",title:"AudioRecommendationsDialog_title__u0Xyw",text:"AudioRecommendationsDialog_text__WaEoz"}},46391:function(e){e.exports={phonogrammDownloadComponentContainer:"PhonogrammDownload_phonogrammDownloadComponentContainer__dzgnF",phonogrammDownloadComponentAudioFilesContainer:"PhonogrammDownload_phonogrammDownloadComponentAudioFilesContainer__Dh2Cb",phonogrammDownloadDownloadFilesBlock:"PhonogrammDownload_phonogrammDownloadDownloadFilesBlock__tFIP1",phonogrammValidationError:"PhonogrammDownload_phonogrammValidationError__HEWw0",phonogrammDownloadText:"PhonogrammDownload_phonogrammDownloadText__RsuS5",phonogrammDownloadRecommendationsAlertOpenDialogButton:"PhonogrammDownload_phonogrammDownloadRecommendationsAlertOpenDialogButton__w4HDB"}},58401:function(e){e.exports={title:"StaticInfo_title__NDOpy",toc:"StaticInfo_toc__ecTfX",tocTitle:"StaticInfo_tocTitle__6i_8t",tocList:"StaticInfo_tocList__W1GGE",tocNumber:"StaticInfo_tocNumber__KfNYv",tocText:"StaticInfo_tocText__Rpx2f",scrollButtons:"StaticInfo_scrollButtons__F_Aov",scrollButton:"StaticInfo_scrollButton__91Xht"}},269:function(e){e.exports={artEmployeeCardButton:"ArtEmployeeActionControl_artEmployeeCardButton__L2fpU",artEmployeeCardIcon:"ArtEmployeeActionControl_artEmployeeCardIcon__HhhT2"}},74053:function(e){e.exports={artEmployeeCardContainer:"ArtEmployeeCard_artEmployeeCardContainer__gV8S4",artEmployeeCardContent:"ArtEmployeeCard_artEmployeeCardContent__5_qqk",avatar:"ArtEmployeeCard_avatar__xz_rt",artEmployeeCardWrapper:"ArtEmployeeCard_artEmployeeCardWrapper__Faugr",artEmployeeCardName:"ArtEmployeeCard_artEmployeeCardName__FOrtC",shortName:"ArtEmployeeCard_shortName__OLAa4",artEmployeeCardUserNameWrapper:"ArtEmployeeCard_artEmployeeCardUserNameWrapper__mEzaI",artEmployeeCardRole:"ArtEmployeeCard_artEmployeeCardRole__euDPt",artEmployeeCardWithoutRole:"ArtEmployeeCard_artEmployeeCardWithoutRole__qVY2O",artEmployeeCardEmployeeRoleWrapper:"ArtEmployeeCard_artEmployeeCardEmployeeRoleWrapper___nVy_",artsCount:"ArtEmployeeCard_artsCount__DzRGJ"}},13424:function(e){e.exports={artEmployeesComponentContainer:"ArtEmployees_artEmployeesComponentContainer__z63iL",artEmployeesComponentContent:"ArtEmployees_artEmployeesComponentContent__l_j0e",artEmployeesComponentCaptionContainer:"ArtEmployees_artEmployeesComponentCaptionContainer__szSen",button:"ArtEmployees_button__uRgBC"}},4187:function(e){e.exports={addEmployeeDialogContainer:"AddEmployeeDialog_addEmployeeDialogContainer__CWacw",addEmployeeDialogContent:"AddEmployeeDialog_addEmployeeDialogContent__WQzgZ",addEmployeeDialogSubtitle:"AddEmployeeDialog_addEmployeeDialogSubtitle__Hxy_J",addEmployeeDialogInput:"AddEmployeeDialog_addEmployeeDialogInput__iBHyI",addEmployeeDialogCancelButton:"AddEmployeeDialog_addEmployeeDialogCancelButton__gyMXg",addEmployeeDialogAlert:"AddEmployeeDialog_addEmployeeDialogAlert__Nzzkf",addEmployeeDialogFooter:"AddEmployeeDialog_addEmployeeDialogFooter__yn0wu"}},59640:function(e){e.exports={selectEmployeeDialogRoot:"SelectEmployeeDialog_selectEmployeeDialogRoot___E46F",selectEmployeeDialogText:"SelectEmployeeDialog_selectEmployeeDialogText__7kPBk",selectEmployeeDialogPersonsBlock:"SelectEmployeeDialog_selectEmployeeDialogPersonsBlock__hqsIJ",selectEmployeeDialogFunctionButton:"SelectEmployeeDialog_selectEmployeeDialogFunctionButton__xI5A7",selectEmployeeDialogCap:"SelectEmployeeDialog_selectEmployeeDialogCap__D5_0Q",selectEmployeeDialogContent:"SelectEmployeeDialog_selectEmployeeDialogContent__rs3gq",selectEmployeeDialogImage:"SelectEmployeeDialog_selectEmployeeDialogImage__bB9_J",selectEmployeeDialogH2:"SelectEmployeeDialog_selectEmployeeDialogH2__eNHjL",selectEmployeeDialogTextContent:"SelectEmployeeDialog_selectEmployeeDialogTextContent__Gc_OA",inviteBlock:"SelectEmployeeDialog_inviteBlock__ABNk8",caption:"SelectEmployeeDialog_caption__ekieB",inviteButton:"SelectEmployeeDialog_inviteButton__b5yrL"}},48200:function(e){e.exports={selectRoleDialogContainer:"SelectRoleDialog_selectRoleDialogContainer__kE8Y8",selectRoleDialogContent:"SelectRoleDialog_selectRoleDialogContent__QAc5X",selectRoleDialogRadioGroup:"SelectRoleDialog_selectRoleDialogRadioGroup__JhTKs",selectRoleDialogCancelButton:"SelectRoleDialog_selectRoleDialogCancelButton__MFubn",inviteBlock:"SelectRoleDialog_inviteBlock__3WyVm",caption:"SelectRoleDialog_caption__HdPg1",inviteButton:"SelectRoleDialog_inviteButton__K1vPF"}},74402:function(e){e.exports={section:"AudioConfigurationSection_section__QcrR0",h3:"AudioConfigurationSection_h3__ES3Nh",subtitle:"AudioConfigurationSection_subtitle__Zvc3C",select:"AudioConfigurationSection_select__vPwKM"}},75659:function(e){e.exports={glossaryTitle:"Glossary_glossaryTitle__xUCkJ",glossaryInputWrapper:"Glossary_glossaryInputWrapper__Zmxx5",glossaryInputCaption:"Glossary_glossaryInputCaption__J5_7Z",glossarySelect:"Glossary_glossarySelect__NdQfE",glossaryButton:"Glossary_glossaryButton__rjvAj",notes:"Glossary_notes__ArM8w"}},15182:function(e){e.exports={container:"AudioCoverSource_container__lGEF7",subheader:"AudioCoverSource_subheader__QB0Fs",content:"AudioCoverSource_content__depVD",explanationContent:"AudioCoverSource_explanationContent__V_cln",coverSourceFileUploader:"AudioCoverSource_coverSourceFileUploader__a1XRM"}},49764:function(e){e.exports={audioMasterCoverContainer:"AudioMasterCoverSegment_audioMasterCoverContainer__LeQWx",audioMasterCoverDialog:"AudioMasterCoverSegment_audioMasterCoverDialog__zAUzi"}},38601:function(e){e.exports={wrapper:"GenerateYandexCoverBlock_wrapper__K23OX",title:"GenerateYandexCoverBlock_title__dmDDZ",description:"GenerateYandexCoverBlock_description__vBh8R",button:"GenerateYandexCoverBlock_button__LzYHy",error:"GenerateYandexCoverBlock_error__DilF1"}},60341:function(e){e.exports={root:"MasterAICoverLoader_root__qmkhi",headline:"MasterAICoverLoader_headline__v925q",wrapper:"MasterAICoverLoader_wrapper__Z8srh",imageContainer:"MasterAICoverLoader_imageContainer__ogvU7",fileUploaderWrapper:"MasterAICoverLoader_fileUploaderWrapper__zSb0c",titleForModeration:"MasterAICoverLoader_titleForModeration__x8Nx3",bodyText:"MasterAICoverLoader_bodyText___zrIV",fileUploader:"MasterAICoverLoader_fileUploader__bS6s9",generateRandomCoverBanner:"MasterAICoverLoader_generateRandomCoverBanner__mGZxx"}},29348:function(e){e.exports={wrapper:"BookFileUploader_wrapper__9r7K4",head:"BookFileUploader_head__QlDFW",title:"BookFileUploader_title__q_rkV",obsceneAlert:"BookFileUploader_obsceneAlert__WZybB",alert:"BookFileUploader_alert__U9Sw1",mobileText:"BookFileUploader_mobileText__4PIjK",fileContainer:"BookFileUploader_fileContainer__u2qhi",list:"BookFileUploader_list__24jKr",listItem:"BookFileUploader_listItem__s7QGX"}},47544:function(e){e.exports={container:"CoverSource_container__PZQAb",subheader:"CoverSource_subheader__0Ucgt",content:"CoverSource_content__sRoRu",contentLink:"CoverSource_contentLink__aXMct",explanationContent:"CoverSource_explanationContent__N4
1Cis",coverSourceFileUploader:"CoverSource_coverSourceFileUploader__WTM8m"}},54724:function(e){e.exports={container:"PdfDialog_container__mj9Ax",title:"PdfDialog_title__3FUK8",wrapper:"PdfDialog_wrapper__hLqM8",text:"PdfDialog_text__4I6W0",button:"PdfDialog_button__2WZYj"}},48698:function(e){e.exports={wrapper:"BookTypeDialog_wrapper__hdwbj",title:"BookTypeDialog_title__LM_K8"}},33597:function(e){e.exports={header:"CoauthorInviteSuccessDialog_header__S3Ltl",successBlock:"CoauthorInviteSuccessDialog_successBlock__V_6Gm",illustration:"CoauthorInviteSuccessDialog_illustration__rKNaS",title:"CoauthorInviteSuccessDialog_title__Mo5Vw",modalBody:"CoauthorInviteSuccessDialog_modalBody__ZE1BF",button:"CoauthorInviteSuccessDialog_button__Fr0AW",footer:"CoauthorInviteSuccessDialog_footer___iCig"}},88525:function(e){e.exports={wrapper:"generateYandexAnnotationDialog_wrapper__taMx5",title:"generateYandexAnnotationDialog_title__zpeBt",text:"generateYandexAnnotationDialog_text__cDMAh",footer:"generateYandexAnnotationDialog_footer__4Wveh",closeButton:"generateYandexAnnotationDialog_closeButton__IrWrs"}},37295:function(e){e.exports={modalBody:"InviteCoauthorDialog_modalBody__f478k",warnSyncAlert:"InviteCoauthorDialog_warnSyncAlert__nWgrb",text:"InviteCoauthorDialog_text__eLhXq",inputError:"InviteCoauthorDialog_inputError__F8CtE",error:"InviteCoauthorDialog_error__ZcTZV",caption:"InviteCoauthorDialog_caption___5AO3",footer:"InviteCoauthorDialog_footer__wL9Sm",percent:"InviteCoauthorDialog_percent__lJJSJ",percentIsVisible:"InviteCoauthorDialog_percentIsVisible__ttsQ7",description:"InviteCoauthorDialog_description__GoWLV",alert:"InviteCoauthorDialog_alert__sp1xB",serverError:"InviteCoauthorDialog_serverError__ayGhG",errorIsVisible:"InviteCoauthorDialog_errorIsVisible__YTQHQ",royaltyPercentage:"InviteCoauthorDialog_royaltyPercentage__YXvqJ"}},37007:function(e){e.exports={renameDraftChapterDialog:"PublicationDialogsManager_renameDraftChapterDialog__zhguA",generateYandexAnnotationDialog:"PublicationDialogsManager_generateYandexAnnotationDialog__eWeEH",bookTypeDialog:"PublicationDialogsManager_bookTypeDialog__R6Pm2"}},27448:function(e){e.exports={renameDraftChapterModalWrapper:"RenameDraftChapterDialog_renameDraftChapterModalWrapper__x2xXY",renameDraftChapterModalBody:"RenameDraftChapterDialog_renameDraftChapterModalBody__94V3p",renameDraftChapterModalFooter:"RenameDraftChapterDialog_renameDraftChapterModalFooter__ERA21"}},8461:function(e){e.exports={selectDraftPublicationDialogBody:"SelectDraftPublicationDateDialog_selectDraftPublicationDialogBody__C6gRG",selectDraftPublicationDialogAlert:"SelectDraftPublicationDateDialog_selectDraftPublicationDialogAlert__kddrx",selectDraftPublicationDialogFooter:"SelectDraftPublicationDateDialog_selectDraftPublicationDialogFooter__EXjzX",selectDraftPublicationDialogDatePickerContainer:"SelectDraftPublicationDateDialog_selectDraftPublicationDialogDatePickerContainer__7_K5O",selectDraftPublicationDialogDatePickerIcon:"SelectDraftPublicationDateDialog_selectDraftPublicationDialogDatePickerIcon__agVC3",disabled:"SelectDraftPublicationDateDialog_disabled__aFcc_",alert:"SelectDraftPublicationDateDialog_alert__04HDk"}},50983:function(e){e.exports={option:"ArtOption_option__TRY8P",optionDisabled:"ArtOption_optionDisabled__d1Fm9",authorName:"ArtOption_authorName__clkU_",title:"ArtOption_title__cA4HN",titleText:"ArtOption_titleText__iusfi",id:"ArtOption_id__2EHiM"}}}]); 2//# sourceMappingURL=5766-0ae426f154a9ec74.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.