1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="5abaebd7-77f0-e7af-a660-157181126aac")}catch(e){}}(); 2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,58189,e=>{e.q("/_next/static/media/cute-cat.0quzicz43m1fh.png")},256868,e=>{"use strict";var t=e.i(50270);let a=t.z.object({email:t.z.string().optional(),token:t.z.string().optional(),book:t.z.string().optional(),reason:t.z.string().optional(),purchaseFrom:t.z.string().optional()});e.s(["oneClickSignUpSearchParamsSchema",0,a])},423245,(e,t,a)=>{var r=e.r(766986).GenIcon;t.exports.FcGoogle=function(e){return r({tag:"svg",attr:{version:"1.1",x:"0px",y:"0px",viewBox:"0 0 48 48",enableBackground:"new 0 0 48 48"},child:[{tag:"path",attr:{fill:"#FFC107",d:"M43.611,20.083H42V20H24v8h11.303c-1.649,4.657-6.08,8-11.303,8c-6.627,0-12-5.373-12-12\r\n c0-6.627,5.373-12,12-12c3.059,0,5.842,1.154,7.961,3.039l5.657-5.657C34.046,6.053,29.268,4,24,4C12.955,4,4,12.955,4,24\r\n c0,11.045,8.955,20,20,20c11.045,0,20-8.955,20-20C44,22.659,43.862,21.35,43.611,20.083z"},child:[]},{tag:"path",attr:{fill:"#FF3D00",d:"M6.306,14.691l6.571,4.819C14.655,15.108,18.961,12,24,12c3.059,0,5.842,1.154,7.961,3.039l5.657-5.657\r\n C34.046,6.053,29.268,4,24,4C16.318,4,9.656,8.337,6.306,14.691z"},child:[]},{tag:"path",attr:{fill:"#4CAF50",d:"M24,44c5.166,0,9.86-1.977,13.409-5.192l-6.19-5.238C29.211,35.091,26.715,36,24,36\r\n c-5.202,0-9.619-3.317-11.283-7.946l-6.522,5.025C9.505,39.556,16.227,44,24,44z"},child:[]},{tag:"path",attr:{fill:"#1976D2",d:"M43.611,20.083H42V20H24v8h11.303c-0.792,2.237-2.231,4.166-4.087,5.571\r\n c0.001-0.001,0.002-0.001,0.003-0.002l6.19,5.238C36.971,39.205,44,34,44,24C44,22.659,43.862,21.35,43.611,20.083z"},child:[]}]})(e)}},983764,(e,t,a)=>{var r=e.r(766986).GenIcon;t.exports.HiOutlineMail=function(e){return r({tag:"svg",attr:{fill:"none",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"},child:[]}]})(e)}},712281,371502,723003,845037,e=>{"use strict";var t=e.i(843476),a=e.i(155873),r=e.i(256868),i=e.i(662892),n=e.i(885786),s=e.i(805262);e.i(749398);var l=e.i(988157);e.i(558515);var o=e.i(107565),c=e.i(271645),d=e.i(321384),u=e.i(710241),m=e.i(347799),h=e.i(923923),x=e.i(423245),p=e.i(983764);e.i(519100);var g=e.i(367604),f=e.i(945060);let b=({type:e,onClick:a,title:r,className:i,disabled:n,loading:s,...l})=>{let o="myNovel"===e;return(0,t.jsxs)("button",{type:"button",className:(0,f.cn)("relative","flex items-center justify-center","px-3 py-2","w-full min-h-12 h-12 rounded-[40px] text-white text-base font-medium",{"bg-[#131314] border border-white border-solid text-white dark:bg-white dark:border-none dark:text-black":"google"===e,"bg-[#fff] text-black border border-solid border-black dark:border-none":"apple"===e,"bg-[#fff] text-black border border-solid border-black dark:border-gray-200 dark:bg-black dark:text-white":o,"bg-primary-main":"email"===e},s&&"cursor-wait",i),onClick:a,disabled:n,...l,children:[(0,t.jsxs)("div",{className:(0,f.cn)("absolute top-1/2 left-2 -translate-y-1/2",o&&"mx-2"),children:["google"===e&&(0,t.jsx)(x.FcGoogle,{size:32}),"apple"===e&&(0,t.jsx)(h.FaApple,{className:"text-black",size:32}),"email"===e&&(0,t.jsx)(p.HiOutlineMail,{className:"text-white pl-3",size:32}),o&&(0,t.jsx)(g.Logo,{logoNameLightIconClassName:"hidden dark:hidden",logoNameDarkIconClassName:"hidden",logoIconClassName:"block",withLink:!1})]}),(0,t.jsx)("span",{style:{paddingLeft:32+16*!!o,marginRight:o?4:void 0},className:"line-clamp-1 text-start",children:r})]})};var v=e.i(217255);let y=({className:e,inlineForm:r=!1,oneClickParams:n})=>{let{authTexts:l}=(0,i.useServices)(),o=(0,d.useSocialCallbackUrl)(),{setCursorWaitStatus:c,isActive:h,unsetCursorWaitStatus:x}=(0,m.useCursorWaitStatus)(),{trackRegistrationAttemptEvent:p}=(0,a.useTrackAnalyticEventsByType)();return s.config.isAppleAuthEnabled?(0,t.jsx)(b,{type:"apple",className:e,onClick:()=>{c(),p({method:"apple"}),(0,v.signIn)("apple",{callbackUrl:o({method:"login",from:(0,u.getRedirectFromParameter)(),inlineForm:r,email:n?.email,token:n?.token,purchaseFrom:n?.purchaseFrom})}).catch(e=>{console.error(e),x()})},title:l.authModalTexts.loginWith.getT({label:"Apple"}),"data-testid":"login-by-apple-button",disabled:h,loading:h}):null},w=({className:e,inlineForm:r=!1,oneClickParams:n})=>{let{authTexts:s}=(0,i.useServices)(),l=(0,d.useSocialCallbackUrl)(),{setCursorWaitStatus:o,isActive:c,unsetCursorWaitStatus:h}=(0,m.useCursorWaitStatus)(),{trackRegistrationAttemptEvent:x}=(0,a.useTrackAnalyticEventsByType)();return(0,t.jsx)(b,{type:"google",className:e,onClick:()=>{o(),x({method:"google"}),(0,v.signIn)("google",{callbackUrl:l({method:"login",from:(0,u.getRedirectFromParameter)(),inlineForm:r,email:n.email,token:n.token,purchaseFrom:n?.purchaseFrom})}).catch(e=>{console.error(e),h()})},title:s.authModalTexts.loginWith.getT({label:"Google"}),"data-testid":"login-by-google-button",disabled:c,loading:c})};e.s(["LoginModalSection",0,({onGoToRegistration:e,showHeaderElements:d=!0,inl
2ineForm:u=!1,showSwitchButtons:m=!1,reason:h,location:x,welcome:p})=>{let g=(0,n.useValidatedSearchParams)(r.oneClickSignUpSearchParamsSchema),{authTexts:f}=(0,i.useServices)(),{trackRegistrationInterestEvent:b,trackRegistrationPromptEvent:v}=(0,a.useTrackAnalyticEventsByType)(),{authModalTexts:k}=f;return(0,c.useEffect)(()=>{x&&b({location:x}),v({reason:h})},[]),(0,t.jsxs)(t.Fragment,{children:[d&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(l.H4,{className:"mb-6",children:p?k.titleRegWith.getT({label:s.config.brandName}):k.titleLoginWith.getT({label:s.config.brandName})}),g.reason&&(0,t.jsx)("div",{className:"py-5 pt-0",children:(0,t.jsx)(o.HelperText,{type:"error",className:"mt-1 pl-2.5 text-md font-medium",children:g.reason})})]}),(0,t.jsx)(y,{className:"mb-4",inlineForm:u,oneClickParams:g}),(0,t.jsx)(w,{inlineForm:u,oneClickParams:g}),m&&(0,t.jsxs)("div",{className:"w-full flex flex-col items-center justify-center text-gray-500 dark:text-white",children:[(0,t.jsx)("p",{className:"mr-1",children:k.dontHaveAcc.t}),(0,t.jsx)("button",{type:"button",className:"mr-1 text-primary-main dark:text-primary-main hover:underline cursor-pointer whitespace-nowrap",onClick:e,"data-testid":"toggle-register-modal-button",children:k.registration.t})]})]})}],371502),e.s([],712281),e.s(["RegistrationModalSection",0,({onGoToLogin:e,showHeaderElements:r=!0,children:n,inlineForm:o=!1,location:h,reason:x,showSwitchButtons:p=!1,showButtons:g=!0,showEmailSignUp:y=!1,hideEmailButton:w,headerMessage:k,oneClickParams:N})=>{let{authTexts:j}=(0,i.useServices)(),{authModalTexts:S}=j,T=(0,d.useSocialCallbackUrl)(),{setCursorWaitStatus:I,isActive:C,unsetCursorWaitStatus:E}=(0,m.useCursorWaitStatus)(),{trackRegistrationAttemptEvent:A,trackRegistrationInterestEvent:M,trackRegistrationPromptEvent:_}=(0,a.useTrackAnalyticEventsByType)();return(0,c.useEffect)(()=>{h&&M({location:h}),_({reason:x})},[]),(0,t.jsxs)(t.Fragment,{children:[r&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(l.H4,{className:"mb-2.5",children:S.titleRegWith.getT({label:s.config.brandName})}),(0,t.jsx)("div",{className:"text-base text-gray-500 dark:text-white mb-6 w-full md:w-[80%] text-center mx-auto",children:S.regAdvantages.t}),k]}),g&&(0,t.jsxs)(t.Fragment,{children:[s.config.isAppleAuthEnabled&&(0,t.jsx)(b,{type:"apple",className:"mb-4",onClick:()=>{s.config.isAppleAuthEnabled&&(A({method:"apple"}),(0,v.signIn)("apple",{callbackUrl:T({method:"registration",from:(0,u.getRedirectFromParameter)(),inlineForm:o,email:N?.email,token:N?.token,purchaseFrom:N?.purchaseFrom})}).catch(e=>{console.error(e),E()}))},title:S.registerWithText.getT({label:"Apple"}),"data-testid":"register-by-apple-button",disabled:C,loading:C}),(0,t.jsx)(b,{type:"google",className:(0,f.cn)((o||n)&&"mb-4"),onClick:()=>{I(),A({method:"google"}),(0,v.signIn)("google",{callbackUrl:T({method:"registration",from:(0,u.getRedirectFromParameter)(),inlineForm:o,email:N?.email,token:N?.token,purchaseFrom:N?.purchaseFrom})}).catch(e=>{console.error(e),E()})},title:S.registerWithText.getT({label:"Google"}),"data-testid":"register-by-google-button",disabled:C,loading:C}),y&&(0,t.jsxs)("div",{className:"flex flex-col gap-2 mt-6",children:[(0,t.jsx)("div",{className:"text-base text-[#6D7885] dark:text-white",children:"or"}),!w&&(0,t.jsx)("button",{type:"button",className:"text-primary-main dark:text-primary-main hover:underline cursor-pointer whitespace-nowrap",onClick:e,"data-testid":"toggle-regiloginster-modal-button",children:S.regByEmailBtn.t})]})]}),n,p&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"text-base text-[#6D7885] dark:text-white",children:S.doYouHaveAnAccount.t}),(0,t.jsx)("button",{type:"button",className:"mb-2 text-primary-main dark:text-primary-main hover:underline cursor-pointer whitespace-nowrap",onClick:e,"data-testid":"toggle-regiloginster-modal-button",children:S.loginEnter.t})]})]})}],723003),e.s([],845037)},229207,e=>{"use strict";e.s(["BOOKS_VIEW_HISTORY_INFINITY_QUERY_KEY",0,"BOOKS_VIEW_HISTORY_INFINITY","COOKIE_STORAGE_BOOK_VIEWS_KEY",0,"viewedBooks","INFINITY_BOOKS_QUERY_KEY",0,"INFINITY_BOOKS","INFINITY_BOOKS_SEARCH_QUERY_KEY",0,"INFINITY_BOOKS_SEARCH_QUERY","INFINITY_BOOKS_SIMPLE_QUERY_KEY",0,"INFINITY_BOOKS_SIMPLE_QUERY","LAST_READ_WIDGETS_TYPE",0,"last_read","MOBILE_SMALL_CARD_WIDTH",0,120])},426766,e=>{"use strict";var t,a,r,i,n,s,l=e.i(843476),o=e.i(945060),c=e.i(271645);e.i(558515);var d=e.i(107565);function u(){return(u=Object.assign.bind()).apply(null,arguments)}let m=function(e){return c.createElement("svg",u({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none"},e),t||(t=c.createElement("path",{fill:"#B8C1CC",d:"M16.872 2c1.783 0 2.43.186 3.082.534s1.163.86 1.512 1.512c.348.652.534 1.299.534 3.082v9.744c0 1.783-.186 2.43-.534 3.082a3.64 3.64 0 0 1-1.512 1.512c-.652.348-1.299.534-3.082.534H7.128c-1.783 0-2.43-.186-3.082-.534a3.64 3.64 0 0 1-1.512-1.512C2.186 19.302 2 18.655 2 16.872V7.128c0-1.783.186-2.43.534-3.082a3.64 3.64 0 0 1 1.512-1.512C4.698 2.186 5.345 2 7.128 2zm.564 2H6.564c-.892 0-1.215.093-1.54.267-.327.174-.583.43-.757.756S4 5.673 4 6.563v10.873c0 .892.093 1.215.267 1.54.174.327.43.583.756.757s.65.267 1.54.267h10.873c.892 0 1.215-.093 1.54-.267.327-.174.583-.43.757-.756s.267-.65.267-1.54V6.563c0-.892-.093-1.215-.267-1.54a1.8 1.8 0 0 0-.756-.757c-.326-.174-.65-.267-1.54-.267"})))};
2function h(){return(h=Object.assign.bind()).apply(null,arguments)}let x=function(e){return c.createElement("svg",h({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none"},e),a||(a=c.createElement("rect",{width:18,height:18,x:3,y:3,fill:"#FBFBFB",stroke:"#FBFBFB",strokeWidth:2,rx:3})),r||(r=c.createElement("path",{fill:"#19191A",d:"M15.494 8.756a.89.89 0 0 1 1.248 0 .87.87 0 0 1 0 1.238l-5.295 5.25a.89.89 0 0 1-1.247 0l-2.942-2.917a.87.87 0 0 1 0-1.237.89.89 0 0 1 1.248 0l2.317 2.298z"})))};function p(){return(p=Object.assign.bind()).apply(null,arguments)}let g=function(e){return c.createElement("svg",p({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none"},e),i||(i=c.createElement("rect",{width:18,height:18,x:3,y:3,fill:"#fff",stroke:"#6D6F71",strokeWidth:2,rx:3})))};function f(){return(f=Object.assign.bind()).apply(null,arguments)}let b=function(e){return c.createElement("svg",f({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none"},e),n||(n=c.createElement("rect",{width:18,height:18,x:3,y:3,fill:"currentColor",stroke:"currentColor",strokeWidth:2,rx:3})),s||(s=c.createElement("path",{fill:"#fff",d:"M15.494 8.756a.89.89 0 0 1 1.248 0 .87.87 0 0 1 0 1.238l-5.295 5.25a.89.89 0 0 1-1.247 0l-2.942-2.917a.87.87 0 0 1 0-1.237.89.89 0 0 1 1.248 0l2.317 2.298z"})))},v=(0,c.forwardRef)(({label:e,className:t,name:a="-",labelClassName:r,value:i,onChange:n,error:s,disabled:u,checkboxContainerClassName:h},p)=>{let[f,v]=(0,c.useState)(!1),y=(0,c.useMemo)(()=>`checkbox-${a}`,[a]),w=n?i:f;return(0,l.jsxs)("div",{className:t,children:[(0,l.jsxs)("div",{className:(0,o.cn)("flex items-start",h),children:[(0,l.jsxs)("div",{className:(0,o.cn)("min-w-6 min-h-6 relative cursor-pointer mr-2"),children:[(0,l.jsx)("input",{ref:p,id:y,type:"checkbox",checked:w,className:(0,o.cn)("absolute inset-0 opacity-0 cursor-pointer w-full h-full",u&&"cursor-not-allowed"),onChange:e=>{let t=e.target.checked;v(t),n?.(t)},disabled:u}),(0,l.jsxs)("div",{className:(0,o.cn)({hidden:!w}),children:[(0,l.jsx)(x,{className:"hidden dark:block"}),(0,l.jsx)(b,{className:"block dark:hidden text-primary-main"})]}),(0,l.jsxs)("div",{className:(0,o.cn)({hidden:w}),children:[(0,l.jsx)(m,{className:"hidden dark:block"}),(0,l.jsx)(g,{className:"block dark:hidden"})]})]}),(0,l.jsx)("label",{className:(0,o.cn)("text-gray-main dark:text-gray-300 cursor-pointer",u&&"cursor-not-allowed",r),htmlFor:y,children:e})]}),s&&(0,l.jsx)(d.HelperText,{type:"error",className:(0,o.cn)("mt-1 pl-2.5"),children:s})]})});e.s(["default",0,v],426766)},976551,e=>{"use strict";e.s(["addElementToArray",0,({id:e,array:t=[],maxArrayLength:a=10})=>{let r=[...t],i=r.indexOf(e);return -1!==i?r.splice(i,1):r.length<a||r.pop(),r.unshift(e),r},"safeParseBooksViews",0,e=>{try{return JSON.parse(e)}catch(e){return[]}}])},558515,107565,e=>{"use strict";var t=e.i(945060),a=e.i(271645);e.s(["HelperText",0,({element:e="p",type:r,children:i,className:n})=>(0,a.createElement)(e,{className:(0,t.cn)("text-xs",{"text-error-main dark:text-error-500":"error"===r,"text-info-main dark:text-info-500":"info"===r},n)},i)],107565),e.s([],558515)},331916,(e,t,a)=>{var r=e.r(766986).GenIcon;t.exports.AiOutlineEye=function(e){return r({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 0 0 0 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"},child:[]}]})(e)}},510526,(e,t,a)=>{var r=e.r(766986).GenIcon;t.exports.AiOutlineEyeInvisible=function(e){return r({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 0 0 0-51.5zm-63.57-320.64L836 122.88a8 8 0 0 0-11.32 0L715.31 232.2Q624.8
26 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 0 0 0 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 0 0 0 11.31L155.17 889a8 8 0 0 0 11.31 0l712.15-712.12a8 8 0 0 0 0-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 0 0-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 0 1 146.2-106.69L401.31 546.2A112 112 0 0 1 396 512z"},child:[]},{tag:"path",attr:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 0 0 227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 0 1-112 112z"},child:[]}]})(e)}},685553,163981,5316,e=>{"use strict";var t=e.i(843476),a=e.i(331916),r=e.i(510526),i=e.i(945060),n=e.i(271645);e.i(558515);var s=e.i(107565);let l=({isError:e,inputClassName:t})=>(0,i.cn)("disabled:bg-gray-100 disabled:text-gray-500 dark:disabled:bg-gray-700 dark:disabled:text-gray-500","focus:bg-white focus:border-[1px] focus:shadow-lg dark:focus:bg-gray-700 focus:outline-none","disabled:cursor-not-allowed","disabled:shadow-none hover:shadow-lg","text-gray-900 dark:text-gray-200","border-black/12 dark:border-gray-700","bg-gray-100 dark:bg-gray-800","border-[0.5px] outline-0 rounded-[10px]","transition duration-300 ease-in-out",{"border-error-main dark:border-gray-700 bg-error-300 dark:bg-gray-800":e},t),o=({size:e,isError:t,withLeftIcon:a,inputClassName:r,withoutLabel:n=!1})=>(0,i.cn)(l({isError:t}),(({size:e,withLeftIcon:t,inputClassName:a,withoutLabel:r=!1})=>(0,i.cn)("h-12 pl-5","w-full pr-4 py-2 pb-1.5",{"h-14":"large"===e,"pt-1.5":r,"pt-[26px]":!r},a,{"!pl-10":t}))({size:e,withLeftIcon:a,withoutLabel:n}),r);e.s(["getInputClassName",0,o,"getStylingClassName",0,l],163981);let c=(0,n.forwardRef)(({label:e,helperText:l,leftIcon:c,rightIcon:d,errors:u=null,size:m="large",name:h="",value:x,onChange:p,type:g="text",disabled:f,className:b,placeholder:v,inputClassName:y,...w},k)=>
2{let[N,j]=(0,n.useState)(!1),[S,T]=(0,n.useState)(!1),[I,C]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{x&&!S&&T(!0)},[x,S]),(0,t.jsxs)("div",{className:(0,i.cn)("relative w-full",b),children:[(0,t.jsxs)("div",{className:"relative",children:[e&&(0,t.jsx)("label",{htmlFor:h,className:(0,i.cn)("absolute transition-all text-gray-700 dark:text-gray-300 left-5 top-1/2 transform -translate-y-1/2 text-center pointer-events-none",{"left-10":c,"top-4 text-xs text-gray-600":N||S,"hover:cursor-not-allowed pointer-events-auto":f}),children:e}),(0,t.jsx)("input",{ref:k,type:"password"===g&&I?"text":g,value:x,onChange:e=>{p&&p(e.target.value)},name:h,placeholder:v,className:o({size:m,isError:!!u?.length,withLeftIcon:!!c,inputClassName:y,withoutLabel:!e}),...w,onFocus:()=>{j(!0)},onBlur:e=>{j(!1),T(""!==e.target.value)},disabled:f}),c&&(0,t.jsx)("span",{className:"absolute left-3 top-1/2 -translate-y-1/2",children:c}),"password"!==g?null:(0,t.jsx)("button",{className:"absolute right-4 top-1/2 my-[-8px] text-gray-500 cursor-pointer",onClick:()=>{C(!I)},type:"button",children:I?(0,t.jsx)(r.AiOutlineEyeInvisible,{size:20}):(0,t.jsx)(a.AiOutlineEye,{size:20})}),d&&"password"!==g&&(0,t.jsx)("span",{className:"absolute right-4 top-1/2 my-[-8px] text-gray-500",children:d})]}),l&&(0,t.jsx)("p",{className:"text-gray-700 dark:text-gray-400 text-xs mt-1 pl-2.5",children:l}),u&&u.length?u?.map(e=>(0,t.jsx)(s.HelperText,{type:"error",className:"mt-1 pl-2.5",children:e},e)):null]})});c.displayName="Input",e.s(["Input",0,c],5316),e.s([],685553)},540038,428091,e=>{"use strict";var t=e.i(843476),a=e.i(207670);e.s(["Divider",0,({className:e,vertical:r=!1})=>(0,t.jsx)("hr",{className:(0,a.default)("border-solid box-border","dark:border-[#292A2B] border-black/12",{"w-full border-t":!r,"inline-block w-[1px] border-l":r},e)})],428091),e.s([],540038)},96226,e=>{"use strict";e.s(["constructFrom",0,function(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}])},363367,534048,256689,178538,270447,384192,e=>{"use strict";let t={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function a(e){return (t={})=>{let a=t.width?String(t.width):e.defaultWidth;return e.formats[a]||e.formats[e.defaultWidth]}}e.s(["buildFormatLongFn",0,a],534048);let r={date:a({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:a({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:a({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},i={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function n(e){return(t,a)=>{let r;if("formatting"===(a?.context?String(a.context):"standalone")&&e.formattingValues){let t=e.defaultFormattingWidth||e.defaultWidth,i=a?.width?String(a.width):t;r=e.formattingValues[i]||e.formattingValues[t]}else{let t=e.defaultWidth,i=a?.width?String(a.width):e.defaultWidth;r=e.values[i]||e.values[t]}return r[e.argumentCallback?e.argumentCallback(t):t]}}e.s(["buildLocalizeFn",0,n],256689);let s={ordinalNumber:(e,t)=>{let a=Number(e),r=a%100;if(r>20||r<10)switch(r%10){case 1:return a+"st";
2case 2:return a+"nd";case 3:return a+"rd"}return a+"th"},era:n({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:n({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:n({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:n({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:n({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function l(e){return(t,a={})=>{let r,i=a.width,n=i&&e.matchPatterns[i]||e.matchPatterns[e.defaultMatchWidth],s=t.match(n);if(!s)return null;let l=s[0],o=i&&e.parsePatterns[i]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(o)?function(e,t){for(let a=0;a<e.length;a++)if(t(e[a]))return a}(o,e=>e.test(l)):function(e,t){for(let a in e)if(Object.prototype.hasOwnProperty.call(e,a)&&t(e[a]))return a}(o,e=>e.test(l));return r=e.valueCallback?e.valueCallback(c):c,{value:r=a.valueCallback?a.valueCallback(r):r,rest:t.slice(l.length)}}}function o(e){return(t,a={})=>{let r=t.match(e.matchPattern);if(!r)return null;let i=r[0],n=t.match(e.parsePattern);if(!n)return null;let s=e.valueCallback?e.valueCallback(n[0]):n[0];return{value:s=a.valueCallback?a.valueCallback(s):s,rest:t.slice(i.length)}}}e.s(["buildMatchFn",0,l],178538),e.s(["buildMatchPatternFn",0,o],270447);let c={code:"en-US",formatDistance:(e,a,r)=>{let i,n=t[e];if(i="string"==typeof n?n:1===a?n.one:n.other.replace("{{count}}",a.toString()),r?.addSuffix)if(r.comparison&&r.comparison>0)return"in "+i;else return i+" ago";return i},formatLong:r,formatRelative:(e,t,a,r)=>i[e],localize:s,match:{ordinalNumber:o({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:l({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:l({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:l({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:l({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:l({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};e.s(["enUS",0,c],384192),e.s(["defaultLocale",0,c],363367)},511048,e=>{"use strict";let t={};
2e.s(["getDefaultOptions",0,function(){return t}])},74327,e=>{"use strict";var t=e.i(435684);e.s(["getTimezoneOffsetInMilliseconds",0,function(e){let a=(0,t.toDate)(e),r=new Date(Date.UTC(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),a.getMinutes(),a.getSeconds(),a.getMilliseconds()));return r.setUTCFullYear(a.getFullYear()),e-r}])},680390,e=>{"use strict";var t=e.i(435684),a=e.i(511048);e.s(["startOfWeek",0,function(e,r){let i=(0,a.getDefaultOptions)(),n=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0,s=(0,t.toDate)(e),l=s.getDay();return s.setDate(s.getDate()-(7*(l<n)+l-n)),s.setHours(0,0,0,0),s}])},191613,e=>{"use strict";var t=e.i(843476),a=e.i(43726),r=e.i(90451),i=e.i(203306),n=e.i(945060);e.i(93691);var s=e.i(731665),l=e.i(304251),o=e.i(907456),c=e.i(618566),d=e.i(271645);e.i(712281);var u=e.i(371502);e.i(845037);var m=e.i(723003);e.s(["AuthorizationDialog",0,()=>{let e,{checkIsDialogOpen:h,onCloseDialog:x,getDialogState:p,getUpdateCurrentDialogStateHandler:g,onUpdateCurrentDialog:f}=(0,i.useDialogs)(),b=(0,c.useSearchParams)(),v=b.get(a.AUTHORIZED_DIALOG_SEARCH_PARAM_TYPE),y=(e=(0,r.useRouter)(),t=>{let r=((e,t=[])=>{let a=new URLSearchParams(e);return t.forEach(e=>{a.delete(e)}),a})(t,[a.AUTHORIZED_DIALOG_SEARCH_PARAM_TYPE]).toString(),i=`${window.location.origin}${window.location.pathname}`;r?e.replace(`${i}?${r}`):e.replace(i)}),w=h("AUTHORIZATION"),k=p("AUTHORIZATION")?.type,N=p("AUTHORIZATION")?.location,j=p("AUTHORIZATION")?.reason,S=p("AUTHORIZATION")?.withClose===void 0,T=!!p("AUTHORIZATION")?.welcome,I=p("AUTHORIZATION")?.fullscreen===void 0||p("AUTHORIZATION")?.fullscreen,C=g({name:"AUTHORIZATION",state:{type:"registration",location:N,reason:j}}),E=g({name:"AUTHORIZATION",state:{type:"login",location:N,reason:j}});return(0,d.useEffect)(()=>{v&&["login","registration"].includes(v)&&k!==v&&(f({name:"AUTHORIZATION",state:{type:v,location:N,reason:j}}),y(b))},[v]),(0,t.jsxs)(s.Modal,{className:"tablet:py-6 overflow-auto",isOpen:w,onClose:x,withClose:S,withClickOutside:S,fullscreen:I,backdropClassName:"!z-auth-backdrop",modalContainerClassName:"!z-inside-modal","data-testid":"authorization-dialog",scrollLockClassName:"body-lock-auth",children:[I&&(0,t.jsx)(o.ModalFullscreanHeader,{className:"mb-6",onClose:x,withClose:S,withLogoLink:!1}),(0,t.jsxs)(l.ModalContent,{className:"flex flex-col justify-start items-center h-full px-6 pb-6",children:[(0,t.jsx)("div",{className:(0,n.cn)("mb-[70px] tablet:hidden",!I&&"mb-[40px]")}),"login"===k?(0,t.jsx)(u.LoginModalSection,{onGoToRegistration:C,onClose:x,location:N,reason:j,welcome:T}):(0,t.jsx)(m.RegistrationModalSection,{onGoToLogin:E,location:N,reason:j})]})]})}],191613)},372744,e=>{"use strict";var t=e.i(96226);e.s(["constructNow",0,function(e){return(0,t.constructFrom)(e,Date.now())}])},809637,897284,416398,e=>{"use strict";var t=e.i(372744),a=e.i(574386),r=e.i(8470),i=e.i(435684);function n(e){return t=>{let a=(e?Math[e]:Math.trunc)(t);return 0===a?0:a}}function s(e,t){return(0,i.toDate)(e)-(0,i.toDate)(t)}e.s(["getRoundingMethod",0,n],897284),e.s(["differenceInMilliseconds",0,s],416398);var l=e.i(363367),o=e.i(511048),c=e.i(74327);e.s(["formatDistanceToNow",0,function(e,d){return function(e,t,d){let u,m,h,x,p=(0,o.getDefaultOptions)(),g=d?.locale??p.locale??l.defaultLocale,f=(0,a.compareAsc)(e,t);if(isNaN(f))throw RangeError("Invalid time value");let b=Object.assign({},d,{addSuffix:d?.addSuffix,comparison:f});f>0?(u=(0,i.toDate)(t),m=(0,i.toDate)(e)):(u=(0,i.toDate)(e),m=(0,i.toDate)(t));let v=(x=s(m,u)/1e3,n(void 0)(x)),y=Math.round((v-((0,c.getTimezoneOffsetInMilliseconds)(m)-(0,c.getTimezoneOffsetInMilliseconds)(u))/1e3)/60);if(y<2)if(d?.includeSeconds)if(v<5)return g.formatDistance("lessThanXSeconds",5,b);else if(v<10)return g.formatDistance("lessThanXSeconds",10,b);else if(v<20)return g.formatDistance("lessThanXSeconds",20,b);else if(v<40)return g.formatDistance("halfAMinute",0,b);else if(v<60)return g.formatDistance("lessThanXMinutes",1,b);else return g.formatDistance("xMinutes",1,b);else if(0===y)return g.formatDistance("lessThanXMinutes",1,b);else return g.formatDistance("xMinutes",y,b);if(y<45)return g.formatDistance("xMinutes",y,b);if(y<90)return g.formatDistance("aboutXHours",1,b);if(y<r.minutesInDay){let e=Math.round(y/60);return g.formatDistance("aboutXHours",e,b)}if(y<2520)return g.formatDistance("xDays",1,b);else if(y<r.minutesInMonth){let e=Math.round(y/r.minutesInDay);return g.formatDistance("xDays",e,b)}else if(y<2*r.minutesInMonth)return h=Math.round(y/r.minutesInMonth),g.formatDistance("aboutXMonths",h,b);if((h=function(e,t){var r;let n,s,l,o=(0,i.toDate)(e),c=(0,i.toDate)(t),d=(0,a.compareAsc)(o,c),u=Math.abs((s=(0,i.toDate)(o),l=(0,i.toDate)(c),12*(s.getFullYear()-l.getFullYear())+(s.getMonth()-l.getMonth())));if(u<1)n=0;else{let t,s,l,m;1===o.getMonth()&&o.getDate()>27&&o.setDate(30),o.setMonth(o.getMonth()-d*u);let h=(0,a.compareAsc)(o,c)===-d;r=(0,i.toDate)(e),+(t=(0,i.toDate)(r),(s=(0,i.toDate)(t)).setHours(23,59,59,999),s)==+(m=(l=(0,i.toDate)(t)).getMonth(),l.setFullYear(l.getFullYear(),m+1,0),l.setHours(23,59,59,999),l)&&1===u&&1===(0,a.compareAsc)(e,c)&&(h=!1),n=d*(u-Number(h))}return 0===n?0:n}(m,u))<12){let e=Math.round(y/r.minutesInMonth);return g.formatDistance("xMonths",e,b)}{let e=h%12,t=Math.trunc(h/12);return e<3?g.formatDistance("aboutXYears",t,b):e<9?g.formatDistance("overXYears",t,b):g.formatDistance("almostXYears",t+1,b)}}(e,(0,t.constructNow)(e),d)}],809637)},849606,e=>{"use strict";var t=e.i(809637),a=e.i(359155);e.s(["renderDateWithDistance",0,(e,r)=>r?(0,t.formatDistanceToNow)(new Date(r),{addSuffix:!0,locale:(0,a.getDateFnsLocalesByLanguage)(e)}):null])},173582,e=>{"use strict";var t=e.i(843476);e.i(919555);var a=e.i(803131);e.i(957e3);var r=e.i(704296),i=e.i(662892),n=e.i(421025),s=e.i(959879),l=e.i(505859),o=e.i(957333),c=e.i(945060);e.i(540038);var d=e.i(428091);e.i(21262);var u=e.i(909590),m=e.i(271645),h=e.i(303292);e.i(687271);var x=e.i(566934),p=e.i(849606);e.i(700185);var g=e.i(566509);e.i(129714);var f=e.i(923554),f=f,b=e.i(772673),b=b,v=e.i(520635),v=v;e.i(992782);var y=e.i(786641);let w=({notification:e,className:a,onClick:r})=>{let n,{url:s,id:l,type:o,message:d,sentAt:m,isRead:w}=e,{accountRoutes:k,notificationTexts:N,language:j}=(0,i.useServices)(),{prevLocationRef:S}=(0,h.useAnalyticsContext)();return(0,t.jsxs)(y.Link,{href:s||k.notificationById.build(l).getRaw(),withUnderline:!1,className:"w-full relative",onClick:()=>{s&&(S.current="notice"),r?.()},children:[!w&&(0,t.jsx)("div",{className:"w-1.5 h-1.5 rounded-full absolute right-0 top-6 bg-primary-main"}
2),(0,t.jsxs)("div",{className:(0,c.cn)("px-6 py-4 flex flex-row",a),children:[(n="book_major_update"===o?b.default:"book_published"===o?f.default:v.default,(0,t.jsx)("div",{className:(0,c.cn)("-ml-3 w-10 h-10 mr-5",["book_major_update","book_published"].includes(o)?"text-gray-main dark:text-gray-400":"text-primary-main"),children:(0,t.jsx)(n,{})})),(0,t.jsxs)("div",{className:"flex flex-col gap-1 flex-1",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:["custom"===o&&(0,t.jsx)(u.Typography,{className:(0,c.cn)("!text-[15px]/[21px]",!w&&"font-medium"),children:N.notificationFromAdministration.t}),(0,t.jsx)(x.ChapterText,{lang:j,readerFontSize:"sm",className:(0,c.cn)("line-clamp-2 !text-[15px]/[21px] xl:!text-[15px]/[21px]",!w&&"font-medium"),children:(0,t.jsx)("div",{dangerouslySetInnerHTML:{__html:d}})})]}),(0,t.jsxs)("div",{className:"flex flex-row justify-between flex-1 items-center",children:[(0,t.jsx)(u.Typography,{color:"secondary",className:"text-xs",children:(0,p.renderDateWithDistance)(j,m)}),(0,t.jsx)(g.Button,{variant:"text",className:"block xl:hidden !text-[15px]/[21px]",size:"small",children:N.moreDetails.t})]})]})]})]})},k="notificationsNextObserver";e.s(["Notifications",0,({isDesktopView:e=!1,className:h,children:x,onNotificationClick:p})=>{let{data:g,isLoading:f,hasNextPage:b,fetchNextPage:v,isFetchingNextPage:y,error:N}=(()=>{let e=(0,s.useIsAuthorized)(),{notificationApi:t}=(0,i.useServices)();return(0,l.useCachedInfinityQuery)([o.NOTIFICATIONS_QUERY_KEY],({pageParam:e})=>t.getNotifications({page:e}),{enabled:e,initialPageParam:1,getNextPageParam:(e,t,a)=>{if(!(a>=e?.meta?.lastPage))return a+1}})})(),{notificationTexts:j}=(0,i.useServices)(),S=(0,m.useRef)(!0),T=(0,m.useMemo)(()=>(S.current=b,g&&g.pages)?g.pages.reduce((e,t)=>[...e,...t.data],[]):[],[g]);if((0,m.useEffect)(()=>{let t=document.getElementById(k);if(!t||e)return;let a=new IntersectionObserver(([e])=>{(0,m.startTransition)(()=>{e.isIntersecting&&b&&S.current&&(S.current=!1,v())})});return a.observe(t),()=>{t&&!e&&a.unobserve(t)}},[T]),f)return(0,t.jsx)("div",{className:"w-full flex items-center justify-center",children:(0,t.jsx)(a.Spinner,{})});if(!g&&(0,n.isUnexpectedServerError)(N))return(0,t.jsx)(r.UnexpectedError,{});let I=e?T.slice(0,5):T;return I.length?(0,t.jsxs)("div",{className:(0,c.cn)("w-full flex flex-col items-start",h),children:[I.map(e=>(0,t.jsxs)(m.Fragment,{children:[(0,t.jsx)(w,{notification:e,onClick:p}),(0,t.jsx)(d.Divider,{className:"xl:block"})]},e.id)),y&&(0,t.jsx)("div",{className:"w-full flex items-center justify-center",children:(0,t.jsx)(a.Spinner,{})}),(0,t.jsx)("div",{className:"h-[1px] bg-transparent w-full",id:k}),x]}):(0,t.jsx)("div",{className:"w-full flex items-center justify-center",children:(0,t.jsx)(u.Typography,{children:j.noInformation.t})})}],173582)},250158,(e,t,a)=>{var r=e.r(766986).GenIcon;t.exports.GoMoon=function(e){return r({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M14.768 3.96v.001l-.002-.005a9.08 9.08 0 0 0-.218-.779c-.13-.394.21-.8.602-.67.29.096.575.205.855.328l.01.005A10.002 10.002 0 0 1 12 22a10.002 10.002 0 0 1-9.162-5.985l-.004-.01a9.722 9.722 0 0 1-.329-.855c-.13-.392.277-.732.67-.602.257.084.517.157.78.218l.004.002A9 9 0 0 0 14.999 6a9.09 9.09 0 0 0-.231-2.04ZM16.5 6c0 5.799-4.701 10.5-10.5 10.5-.426 0-.847-.026-1.26-.075A8.5 8.5 0 1 0 16.425 4.74c.05.413.075.833.075 1.259Z"},child:[]}]})(e)}},357083,(e,t,a)=>{var r=e.r(766986).GenIcon;t.exports.LuSun=function(e){return r({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"4"},child:[]},{tag:"path",attr:{d:"M12 2v2"},child:[]},{tag:"path",attr:{d:"M12 20v2"},child:[]},{tag:"path",attr:{d:"m4.93 4.93 1.41 1.41"},child:[]},{tag:"path",attr:{d:"m17.66 17.66 1.41 1.41"},child:[]},{tag:"path",attr:{d:"M2 12h2"},child:[]},{tag:"path",attr:{d:"M20 12h2"},child:[]},{tag:"path",attr:{d:"m6.34 17.66-1.41 1.41"},child:[]},{tag:"path",attr:{d:"m19.07 4.93-1.41 1.41"},child:[]}]})(e)}},845823,206191,738243,e=>{"use strict";var t=e.i(843476),a=e.i(250158),r=e.i(357083),i=e.i(662892),n=e.i(945060),s=e.i(363178),l=e.i(271645);e.i(318612);var o=e.i(389624);let c=(0,l.memo)(({className:e,size:c=24})=>{let{commonTexts:d}=(0,i.useServices)(),{theme:u,setTheme:m}=(0,s.useTheme)(),[h,x]=(0,l.useState)(!1),[p,g]=(0,l.useState)(!1),f="dark"===u;(0,l.useEffect)(()=>{x(!0),g(window?.matchMedia("(prefers-color-scheme: dark)").matches)},[]);return h?(0,t.jsx)(o.IconButton,{className:(0,n.cn)(e),onClick:()=>{"system"===u?m(p?"light":"dark"):m(f?"light":"dark")},"data-testid":"theme-toggle-button","aria-label":f?d.theme.dark.t:d.theme.light.t,children:("system"===u?p:f)?(0,t.jsx)(r.LuSun,{size:c}):(0,t.jsx)(a.GoMoon,{size:c})}):(0,t.jsx)(o.IconButton,{className:e,style:{width:c,height:c},children:"Â "})});c.displayName="ThemeToggle",e.s(["ThemeToggle",0,c],845823);var d=e.i(90451),u=e.i(207670);e.i(992782);var m=e.i(786641);e.i(627759);var h=e.i(742257);e.i(582430);var x=e.i(119325);e.s(["ListItemLink",0,({element:e="li",title:a,caption:r,className:i,left:n,right:s,linkClassName:l,titleClassName:o,captionClassName:c,onClick:p,href:g,iconLeftClassName:f,iconRightClassName:b,...v})=>{let y=(0,d.useRouter)();return(0,t.jsx)(h.ListItemContainer,{className:i,element:e,children:(0,t.jsx)(m.Link,{prefetch:!1,...v,href:g,onClick:e=>{e.preventDefault(),p?.(e),"string"==typeof g&&y.push(g)},className:(0,u.default)("flex items-center overflow-hidden text-base truncate",l),withUnderline:!1,children:(0,t.jsx)(x.ListItemContent,{titleClassName:o,captionClassName:c,title:a,caption:r,left:n,right:s,iconLeftClassName:f,iconRightClassName:b})})})}],206191),e.s([],738243)},556528,e=>{"use strict";var t=e.i(895002);e.s(["LibraryIcon",()=>t.default])},991601,(e,t,a)=>{var r=e.r(766986).GenIcon;t.exports.PiCaretRightBold=function(e){return r({tag:"svg",attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M184.49,136.49l-80,80a12,12,0,0,1-17-17L159,128,87.51,56.49a12,12,0,1,1,17-17l80,80A12,12,0,0,1,184.49,136.49Z"},child:[]}]})(e)}},302241,314281,e=>{"use strict";var t=e.i(843476),a=e.i(88653),r=e.i(846932),i=e.i(945060);e.i(180447);var n=e.i(33441),s=e.i(746582);e.s(["HorizontalDrawer",0,({isOpen:e,className:l,onClose:o,children:c,direction:d,onAnimationComplete:u,lockBodyClass:m})=>{(0,s.useScrollLock)(e,m);let h="left"===d;return(0,t.jsx)(a.AnimatePresence,{children:e&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.Backdrop,{onClose:o}),(0,t.jsx)(r.motion.div,{initial:{x:h?"-100%":"100%"},animate:{x:0},exit:{x:h?"-100%":"100%"},dragElastic:h?{left:0}:{right:0},drag:"x",dragConstraints:h?{right:0,left:0}:{left:0},dragSnapToOrigin:!0,onDragEnd:(e,t)=>{h&&t.offset.x<-100&&o(),!h&&t.offset.x>100&&o()},transition:{type:"tween",duration:.3,easings:["easeInOut"]},className:(0,i.cn)("fixed top-0 bottom-0",{"right-0 rounded-l-lg":!h,"left-0 rounded-r-lg":h},"z-modal","flex flex-col w-full","bg-background-paper shadow-lg",l),onAnimationComplete:({x:e})=>{u&&u(0!==e)},children:c})]})})}],314281),e.s([],302241)},951976,204161,65203,e=>{"use strict";var t=e.i(843476),a=e.i(834974),r=e.i(991601),i=e.i(959879),n=e.i(662892),s=e.i(453311),l=e.i(229207),o=e.i(976551);e.i(919555);var c=e.i(803131),d=e.i(921134),u=e.i(945060);e.i(992782);var m=e.i(786641);e.i(21262);var h=e.i(909590),x=e.i(271645);e.i(803207);var p=e.i(510376);e.s(["BooksViewHistorySection",0,({onClose:e})=>{let{commonTexts:g,bookRoutes:f}
2=(0,n.useServices)(),{data:b,isLoading:v}=((e=1)=>{let{bookApi:t,cookieStorage:a}=(0,n.useServices)(),r=(0,i.useIsAuthorized)();return(0,s.useCachedHttpQuery)(["BOOKS_VIEW_HISTORY",e],async()=>{if(r)return a.remove(l.COOKIE_STORAGE_BOOK_VIEWS_KEY),t.getBooksViewHistory({page:+e||1});let i=await a.get(l.COOKIE_STORAGE_BOOK_VIEWS_KEY),n=i?(0,o.safeParseBooksViews)(i):[];return n.length?t.getBooks({ids:n,relations:["author","tags"],sortBy:"latest"}).then(e=>{let{data:t,...a}=e;return{data:t.sort((e,t)=>n.indexOf(e.id)-n.indexOf(t.id)),...a}}):Promise.resolve({data:[],links:{first:"",last:"",next:"",prev:""},meta:{currentPage:0,from:0,lastPage:0,links:[],path:"",perPage:15,to:0,total:0}})},{staleTime:0})})(),y=(0,x.useRef)(!1),{mutateAsync:w}=(0,d.useUpdateUserMutation)(),k=(0,a.useRouter)();return(0,t.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"books-view-history-section",children:[(0,t.jsxs)("div",{className:"flex flex-row justify-between",children:[(0,t.jsx)(h.Typography,{color:"secondary",className:"uppercase",children:g.navHistory.t}),b?.data&&b?.data?.length>3&&(0,t.jsxs)(m.Link,{href:f.booksViewHistory.getPathname(),className:(0,u.cn)("px-3 font-normal text-gray-main dark:text-gray-400 flex flex-row gap-2 items-center"),withUnderline:!1,onClick:e,"data-testid":"books-view-history-page-all-url",children:[g.all.t,(0,t.jsx)(r.PiCaretRightBold,{size:14})]})]}),(0,t.jsx)("div",{className:"flex flex-row gap-1.5 min-h-[60px] min-w-full overflow-auto scrollbar-hide",children:(()=>{if(v||!b)return(0,t.jsx)("div",{className:"w-full h-full flex items-center justify-center",children:(0,t.jsx)(c.Spinner,{})});let{data:a}=b;return 0===a.length?(0,t.jsx)("div",{className:"w-full h-full flex items-center justify-center",children:(0,t.jsx)(h.Typography,{className:"text-sm",children:g.noInformation.t})}):a.map(a=>{let r=async()=>{y.current||(y.current=!0,w({lang:a.lang},{onSuccess:()=>{k.push(f.book.build(a.slug).getRaw(void 0,a.lang)),e()},onSettled:()=>{y.current=!1}}))};return(0,t.jsx)(p.BookCardItemV2,{book:a,onClick:r},a.id)})})()})]})}],204161),e.s([],951976);var g=e.i(277701);e.s(["HomeIcon",()=>g.default],65203)},476821,e=>{"use strict";var t=e.i(490859);e.s(["SearchBookIcon",()=>t.default])},170686,539174,e=>{"use strict";var t=e.i(843476),a=e.i(945060);e.i(738243);var r=e.i(206191),i=e.i(618566);e.s(["NavigationDrawerListItem",0,({className:e,...n})=>{let s=(0,i.usePathname)()===n.href;return(0,t.jsx)(r.ListItemLink,{"data-disable-progress":!0,className:(0,a.cn)("pl-3 py-2 pr-2",{"rounded-lg bg-white dark:bg-gray-800":s},e),...n})}],539174),e.s([],170686)},732493,23132,e=>{"use strict";var t=e.i(843476),a=e.i(207670);e.s(["Avatar",0,function({className:e,children:r,...i}){return(0,t.jsx)("div",{className:(0,a.default)("rounded-full overflow-hidden",e),...i,children:r})}],23132),e.s([],732493)},870994,901676,e=>{"use strict";var t=e.i(843476),a=e.i(662892),r=e.i(945060);e.i(992782);var i=e.i(786641);e.s(["BookLink",0,({children:e,book:n,className:s,withUnderline:l,disabled:o,disableProgress:c,...d})=>{let{bookRoutes:u}=(0,a.useServices)();return(0,t.jsx)(i.Link,{className:(0,r.cn)(o&&"pointer-events-none",s),href:u.book.build(n.slug).getRaw(void 0,n.lang),withUnderline:l,"aria-disabled":o,...c?{"data-disable-progress":!0}:{},...d,children:e})}],901676),e.s([],870994)},803207,708582,122673,510376,e=>{"use strict";var t=e.i(843476),a=e.i(819509),r=e.i(200781),i=e.i(849836),n=e.i(306266);e.i(293262);var s=e.i(689308),l=e.i(662892),o=e.i(945060);e.i(129714);var c=e.i(9242);e.i(21262);var d=e.i(909590),u=e.i(271645),m=e.i(623279);let h=({book:e,className:a,isHaveValidSubscription:r,label:i})=>e?(0,t.jsx)(d.Typography,{className:(0,o.cn)("font-medium text-[10px] leading-[18px] tracking-[0.22px]",e.isFinished?"text-primary-700":"text-[#1BAE2C]",a),children:[i,(()=>{if(!e||!e.price)return null;let{price:t,isPurchased:a,isFinished:i}=e;return a||t.amount<=0||i&&r?null:(0,m.formatPrice)(t,e.lang)})()].filter(Boolean).join(" ⢠")}):null;e.s(["BookCardItemPriceV2",0,h],708582),e.s([],122673),e.i(870994);var x=e.i(901676);let p=(0,u.memo)(({className:e,book:u,viewport:m="desktop",buttonClassName:p,onClick:g,counter:f,disabled:b=!1,setPreviewBook:v,onDesktopClick:y,eager:w=!1})=>{let{bookTexts:k,bookRoutes:N}=(0,l.useServices)(),j=(0,i.useBookImageAlt)(u),S="desktop"===m,T=(0,r.useIsUserHaveValidSubscription)(),I=(0,t.jsxs)("div",{className:(0,o.cn)("flex flex-col w-full max-w-[104px]",e),children:[(0,t.jsxs)("div",{className:"rounded-l-[3px] rounded-r-[8px] border border-solid border-white/[7%] w-[104px] h-[154px] relative",children:[(0,t.jsx)("div",{className:"bg-gradient-to-l from-black via-black/[30%] to-transparent h-full w-1 absolute z-[11] opacity-30 left-[1px]"}),(0,t.jsx)("div",{className:"rounded-l-[3px] rounded-r-[8px] bg-gradient-to-b from-black to-transparent h-[32%] w-full absolute z-[11] opacity-50 top-0"}),(0,t.jsxs)("div",{className:"absolute top-0.5 left-0 right-0 z-[12] overflow-hidden flex flex-row justify-between items-center px-[5px]",children:[(0,t.jsxs)("div",{className:"flex flex-row items-center gap-[3px] text-white",children:[(0,t.jsx)(c.ViewsEyeIcon,{width:16,height:16}),(0,t.jsx)(d.Typography,{className:"text-[10px] leading-[18px] font-medium",children:(0,n.formatLikes)(u.viewsCount)})]}),(0,t.jsxs)("div",{className:"flex flex-row items-center gap-[3px] text-white",children:[(0,t.jsx)(a.FaRegComment,{size:12}),(0,t.jsx)(d.Typography,{className:"text-[10px] leading-[18px] font-medium",children:(0,n.formatLikes)(u.commentsCount||0)})]})]}),f,(0,t.jsx)(s.Image,{img:u?.cover,size:"md",width:104,height:154,alt:j,className:"object-cover w-full rounded-l-[3px] rounded-r-[8px]",loading:w?"eager":"lazy"}),(0,t.jsx)("div",{className:"bg-gradient-to-t from-black via-black/[45.5%] to-transparent h-[60%] w-full absolute z-[11] -bottom-0.5 rounded-bl-[3px] rounded-br-[8px]"}),(0,t.jsxs)("div",{className:(0,o.cn)("flex flex-col gap-1 absolute bottom-0 left-0 right-0 z-[12] pl-3 pr-1 pb-1"),children:[(0,t.jsx)(d.Typography,{className:(0,o.cn)("text-white font-bold leading-none text-ellipsis overflow-hidden line-clamp-3 text-xs"),children:u.title}),(0,t.jsx)(d.Typography,{className:(0,o.cn)("text-white font-normal truncate overflow-hidden text-[#BFBFBF] text-[10px]"),children:k.byAuthor.getT
2({name:u.author?.name||""})})]})]}),(0,t.jsx)("div",{className:"flex justify-center items-center flex-row flex-wrap","data-testid":`${m}-view-book-price`,children:(0,t.jsx)(h,{book:u,className:"text-center",isHaveValidSubscription:T,label:u.isFinished?k.bookStatusCompleted.t:k.bookStatusOngoing.t})})]});return S?(0,t.jsx)(x.BookLink,{book:u,withUnderline:!1,"data-testid":"genres-book-card-link",className:p,onClick:e=>{(y||g)&&(e?.stopPropagation(),e?.preventDefault()),y?.(),g?.()},disabled:b,children:I}):(0,t.jsx)("button",{type:"button",onClick:()=>{window.navigator.onLine&&v?g?g():v(u):(N.book.build(u.slug).push(void 0,void 0,u.lang),window.navigator.onLine&&g?.())},className:(0,o.cn)("text-start",p),"data-testid":"genres-book-card-button",disabled:b,children:I})});p.displayName="BookCardItemV2",e.s(["BookCardItemV2",0,p],510376),e.s([],803207)},683645,e=>{"use strict";var t=e.i(850612);e.s(["CarretBottomIcon",()=>t.default])},627070,e=>{"use strict";e.s(["formatNumberToLocaleString",0,(e,t)=>Number(e).toLocaleString(t)])},543917,e=>{"use strict";e.s(["mapReaderFontSizeToClassName",0,{"2xs":"!text-[10px]/[16px] xl:!text-[12px]/[18px]",xs:"!text-[12px]/[18px] xl:!text-[14px]/[21px]",sm:"!text-[14px]/[21px] xl:!text-[16px]/[24px]",md:"!text-[16px]/[24px] xl:!text-[18px]/[27px]",lg:"!text-[18px]/[27px] xl:!text-[20px]/[30px]",xl:"!text-[20px]/[30px] xl:!text-[22px]/[32px]","2xl":"!text-[22px]/[32px] xl:!text-[24px]/[36px]"},"mapReaderFontSizeToNext",0,{"2xs":"xs",xs:"sm",sm:"md",md:"lg",lg:"xl",xl:"2xl","2xl":null},"mapReaderFontSizeToParagraphMarginClassName",0,{"2xs":"[&_p]:mb-[0.3rem]",xs:"[&_p]:mb-[0.3rem]",sm:"[&_p]:mb-[0.3rem]",md:"[&_p]:mb-[0.3rem]",lg:"[&_p]:mb-[0.3rem]",xl:"[&_p]:mb-[0.3rem]","2xl":"[&_p]:mb-[0.3rem]"},"mapReaderFontSizeToPrev",0,{"2xs":null,xs:"2xs",sm:"xs",md:"sm",lg:"md",xl:"lg","2xl":"xl"},"mapReaderFontSizeToTitleClassName",0,{"2xs":"[&_h1]:!text-[14px]/[21px] xl:[&_h1]:!text-[22px]/[28px]",xs:"[&_h1]:!text-[18px]/[27px] xl:[&_h1]:!text-[25px]/[32px]",sm:"[&_h1]:!text-[22px]/[33px] xl:[&_h1]:!text-[28px]/[35px]",md:"[&_h1]:!text-[24px]/[36px] xl:[&_h1]:!text-[32px]/[40px]",lg:"[&_h1]:!text-[26px]/[39px] xl:[&_h1]:!text-[36px]/[45px]",xl:"[&_h1]:!text-[28px]/[42px] xl:[&_h1]:!text-[40px]/[50px]","2xl":"[&_h1]:!text-[30px]/[45px] xl:[&_h1]:!text-[42px]/[52px]"},"mapReaderFontSizeToTitleMarginClassName",0,{"2xs":"[&_h1]:mb-5",xs:"[&_h1]:mb-6",sm:"[&_h1]:mb-7",md:"[&_h1]:mb-8",lg:"[&_h1]:mb-9",xl:"[&_h1]:mb-10","2xl":"[&_h1]:mb-11"},"readerFontsSettingsOptions",0,[{value:"font-roboto",label:"Roboto"},{value:"font-pt-serif",label:"PT Serif"},{value:"font-roboto-mono",label:"Roboto mono"},{value:"font-shantell-sans",label:"Shantell Sans"}]])},566934,e=>{"use strict";var t=e.i(843476),a=e.i(207670),r=e.i(543917),i=e.i(271645);let n=({className:e,lang:i,children:n,style:s,hyphens:l=!0,fontFamilyOption:o=r.readerFontsSettingsOptions[0],readerFontSize:c="md",withIndent:d=!0,highlightUrl:u=!1,...m},h)=>{let x=r.mapReaderFontSizeToClassName[c],p=r.mapReaderFontSizeToParagraphMarginClassName[c];return(0,t.jsx)("div",{ref:h,lang:i,style:s,className:(0,a.default)("w-full","[&_p:last-of-type]:mb-0",d&&"[&_p]:indent-7",u&&"[&_a]:text-primary-main hover:[&_a]:underline",{"hyphens-auto":l,"hyphens-none":!l},r.mapReaderFontSizeToTitleMarginClassName[c],r.mapReaderFontSizeToTitleClassName[c],p,o.value,x,e),...m,children:n})},s=(0,i.forwardRef)(n);e.s(["ChapterText",0,s,"ChapterTextWithoutRef",0,n])},687271,e=>{"use strict";e.i(566934),e.s([])},957e3,e=>{"use strict";e.i(704296),e.s([])},421025,e=>{"use strict";e.i(666661);var t=e.i(213940);e.s(["isUnexpectedServerError",0,e=>e&&e instanceof t.ExceptionError&&[500,503].includes(e.status)])},539910,657200,143765,270964,e=>{"use strict";var t=e.i(271645);e.s(["default",0,()=>((0,t.useEffect)(()=>{let e=e=>{e.preventDefault()};return window.addEventListener("contextmenu",e),()=>{window.removeEventListener("contextmenu",e)}},[]),null)],657200),e.s(["default",0,()=>{(0,t.useEffect)(()=>{let e=e=>{e.preventDefault()};return document.addEventListener("selectstart",e),()=>{document.removeEventListener("selectstart",e)}},[])}],143765),e.i(637149);var a=e.i(662892),r=e.i(805262);let i=` 3 font-size: 40px; 4 color: red; 5 font-weight: bold; 6 text-align: center; 7 `;e.s(["default",0,()=>{let{commonTexts:e}=(0,a.useServices)();(0,t.useEffect)(()=>
7{if(r.config.isDev)return;let t=setInterval(()=>{console.clear(),console.log(`%c ${e.noCopyText.t}`,i)},1e3);return()=>{r.config.isDev||clearInterval(t)}},[])}],270964),e.s([],539910)},207088,e=>{"use strict";var t=e.i(843476),a=e.i(662892),r=e.i(203306);e.i(700185);var i=e.i(566509);e.s(["LoginButton",0,({location:e,reason:n,isWebView:s,onClick:l})=>{let{commonTexts:o}=(0,a.useServices)(),{onOpenDialog:c}=(0,r.useDialogs)();return(0,t.jsx)(i.Button,{onClick:()=>{s?l?.():c({name:"AUTHORIZATION",state:{type:"login",location:e,reason:n}})},className:"font-medium px-3 py-2 min-h-fit h-fit text-base/5","data-testid":"login-auth-button",children:o.loginBtn.t})}])},275516,121386,e=>{"use strict";var t=e.i(843476),a=e.i(662892),r=e.i(203306),i=e.i(945060);e.i(700185);var n=e.i(566509);e.s(["MobileAuthButtons",0,({className:e,buttonSize:s="small",location:l,reason:o,isWebView:c,onClick:d})=>{let{commonTexts:u}=(0,a.useServices)(),{onOpenDialog:m}=(0,r.useDialogs)();return(0,t.jsx)("div",{className:(0,i.cn)("flex gap-x-3",e),children:(0,t.jsx)(n.Button,{className:"px-3 text-sm",size:s,onClick:()=>{c?d?.():m({name:"AUTHORIZATION",state:{type:"login",location:l,reason:o}})},"data-testid":"mobile-login-auth-button",children:u.loginBtn.t})})}
7],121386),e.s([],275516)},903248,(e,t,a)=>{var r=e.r(766986).GenIcon;t.exports.IoChevronBackSharp=function(e){return r({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"square",strokeMiterlimit:"10",strokeWidth:"48",d:"M328 112 184 256l144 144"},child:[]}]})(e)}},51454,52040,52452,e=>{"use strict";var t=e.i(843476);e.i(666661);var a=e.i(869986),r=e.i(994814),i=e.i(903248),n=e.i(155873),s=e.i(662892),l=e.i(50270),o=e.i(945060);e.i(700185);var c=e.i(566509);e.i(318612);var d=e.i(389624);e.i(129714);var u=e.i(513724);e.s(["SearchIcon",()=>u.default],52040);var u=u;e.i(685553);var m=e.i(5316),h=e.i(271645),x=e.i(653145);let p=(0,h.forwardRef)(({q:e="",onBackButtonClick:p,className:g,wrapperClassName:f,inputPlaceholder:b,showBackButton:v=!1,inputClassName:y="h-10",id:w,inputId:k,onSubmit:N,searchIconClassName:j,submitButtonClassName:S,backButtonClassName:T,minSizeCheck:I=!0,triggerValidationOnMount:C=!1},E)=>{let{commonTexts:A,searchRoutes:M}=(0,s.useServices)(),_=((e=!0)=>{let{errorTexts:t,commonTexts:a}=(0,s.useServices)();return e?l.z.object({q:l.z.string({required_error:t.requiredField.getT({field:a.search.t})}).min(3,{message:t.minLengthField.getT({field:a.search.t,length:3})})}):l.z.object({q:l.z.string({required_error:t.requiredField.getT({field:a.search.t})})})})(I),{trackSearchEvent:O}=(0,n.useTrackAnalyticEventsByType)(),{control:D,handleSubmit:F,getValues:R,reset:B,formState:{errors:P},trigger:z,watch:H}=(0,a.useForm)({resolver:(0,r.zodResolver)(_),defaultValues:{q:e}}),L=H();return(0,h.useImperativeHandle)(E,()=>{if(!I)return{getValues:R};let{q:e}=R();return{getValues:e?.length<3?()=>({q:""}):R}},[L]),(0,h.useEffect)(()=>{B({q:e})},[e]),(0,h.useEffect)(()=>{C&&z("q")},[]),(0,t.jsx)("form",{onSubmit:F(({q:e})=>{(document.activeElement?.blur(),O({searchQuery:e}),N)?N(e):M.search.push({q:e})}),className:(0,o.cn)(g),id:w?String(w):void 0,children:(0,t.jsxs)("div",{className:(0,o.cn)("flex gap-4 w-full",f),children:[v&&(0,t.jsx)(d.IconButton,{className:(0,o.cn)("dark:text-white text-primary-main flex xl:hidden items-center",T),onClick:p,children:(0,t.jsx)(i.IoChevronBackSharp,{size:24})}),(0,t.jsx)(x.Controller,{control:D,name:"q",render:({field:e})=>(0,t.jsx)(m.Input,{leftIcon:(0,t.jsx)(u.default,{className:(0,o.cn)("!text-gray-700 dark:!text-gray-300 size-4",j)}),placeholder:b||A.search.t,inputClassName:(0,o.cn)("py-1.5 px-2",y),errors:P?.q,...e,id:k,type:"search"})}),(0,t.jsx)(c.Button,{className:(0,o.cn)("flex xl:hidden",S),size:"medium",variant:"tonal",type:"submit","data-testid":"search-input-submit-button",children:(0,t.jsx)(u.default,{className:"!text-gray-700 dark:!text-gray-300",width:16,height:16})})]})})});p.displayName="SearchForm",e.s(["SearchForm",0,p],52452),e.s([],51454)},367325,e=>{"use strict";var t=e.i(50270);let a=t.z.object({q:t.z.string().default("")}),r=a.extend({page:t.z.coerce.number().optional().default(1),tab:t.z.enum(["books","authors"]).default("authors")});e.s(["searchPageSearchParamsQuerySchema",0,a,"searchPageSearchParamsSchema",0,r])},328367,114368,751423,853309,488275,e=>{"use strict";var t=e.i(843476),a=e.i(959879);e.i(273867);var r=e.i(163029);let i=()=>{let{isHaveSubscription:e}=(0,r.useAuthContext)();return e};e.s(["useIsUserHaveSubscription",0,i],114368);var n=e.i(307566);e.i(666661);var s=e.i(909832),l=e.i(751398),o=e.i(155873),c=e.i(755713),d=e.i(662892),u=e.i(203306);e.i(683174);var m=e.i(572958),h=e.i(945060);e.i(21262);var x=e.i(909590),p=e.i(618566),g=e.i(271645);let f=(0,g.forwardRef)(({className:e,id:a},r)=>{let{orderTexts:i}=(0,d.useServices)(),s=(0,p.usePathname)(),{onOpenDialog:l}=(0,u.useDialogs)(),g=(0,c.useAuthorizedUser)(),{trackSubscriptionInterestEvent:f}=(0,o.useTrackAnalyticEventsByType)();if(n.IGNORED_PWA_PATHS.some(e=>s.includes(e)))return null;let b="max-[400px]:text-[12px] max-[400px]:leading-[16px] text-[14px] leading-[20px]";return(0,t.jsx)("button",{className:(0,h.cn)("w-full bg-[#F4C2C2] border-b border-[#80535C] py-1.5",e),id:a,ref:r,type:"button",onClick:()=>{g&&f({location:"top_banner",userId:g.id}),l({name:"SUBSCRIPTIONS_DIALOG",state:{location:"top_banner"}})},children:(0,t.jsxs)("div",{className:"mx-auto flex flex-row container max-[576px]:px-4 gap-2.5 items-center justify-center",children:[(0,t.jsx)(x.Typography,{className:(0,h.cn)("text-black dark:text-black tracking-[0.1px] font-pt-serif",b,m.pTSerif.variable),children:i.topBanner.title.t}),(0,t.jsx)("div",{children:(0,t.jsx)("div",{className:(0,h.cn)("bg-[#B76E79] text-white dark:text-white standard-letter-spacing px-4 py-[2px] rounded-[15p
7x] hover:opacity-75 active:opacity-90 drop-shadow-[0_1px_1px_#80535C] w-max",b),children:i.topBanner.getPremiumPlus.t})})]})})});e.s(["SubscriptionPromo",0,f],751423),e.s([],853309);var b=e.i(113195);let v=({className:e,additionalHeight:a=0})=>(0,t.jsx)("div",{style:{height:n.HEADER_HEIGHT+a},className:(0,h.cn)("w-full",e),id:n.HEADER_STUB_ID});e.s(["BaseHeader",0,({animated:e=!1,children:r,className:o,containerClassName:c,fixed:d,stubClassName:u,style:m={},withShadow:x=!0,isWebView:y})=>{let w=(0,g.useRef)(null),k=(0,g.useRef)(null),N=(()=>{let[e,{on:t,off:a}]=(0,s.useToggle)(!0);return(0,l.useWindowScroll)({initiate:t,scrollBottomCB:a,scrollTopCB:t}),e})(),j=(0,a.useIsAuthorized)(),S=i(),T=(0,p.usePathname)(),{isNativeWebView:I}=(0,b.useWebViewContext)(),C=j&&!S&&!I,[E,A]=(0,g.useState)(C?n.DEFAULT_PROMO_BANNER_HEIGHT:0);return((0,g.useEffect)(()=>{let e=document.getElementById(n.PAGE_HEADER_ID);if(!e)return;let t=t=>{if("height"===t.propertyName){let t=Number(getComputedStyle(e).height);if(0===t)return void e.classList.add("pointer-events-none");64===t&&e.classList.remove("pointer-events-none")}};return e.addEventListener("transitionend",t),()=>{e&&e.removeEventListener("transitionend",t)}},[]),(0,g.useEffect)(()=>{w.current&&A(Number.parseFloat(getComputedStyle(w.current).height))},[]),y)?null:(0,t.jsxs)(t.Fragment,{children:[d&&(0,t.jsx)(v,{className:u,additionalHeight:E}),(0,t.jsxs)("header",{style:{...m,minHeight:n.HEADER_HEIGHT},className:(0,h.cn)("flex flex-col items-center justify-center xl:px-4","bg-background-default dark:text-white",x&&"shadow-md dark:shadow-white/10",{"min-h-[64px] xl:min-h-[64px]":N&&e||!e,"h-0 xl:min-h-[64px]":!N&&e},"xl:lock-scroll-container-px-4",{"fixed z-appBar top-0 left-0 right-0":d},d&&C&&"!h-fit",o),id:n.PAGE_HEADER_ID,children:[C&&!(T.includes(n.AUTH_PATH_PREFIX)||T.includes(n.READER_PATH_PREFIX))&&(0,t.jsxs)("div",{children:[(0,t.jsx)(f,{ref:w}),(0,t.jsx)(f,{ref:k,className:"fixed left-0 top-0 right-0"})]}),(0,t.jsx)("div",{className:(0,h.cn)("container mx-auto px-4 xl:px-0 py-2 flex items-center",c),style:{height:n.HEADER_HEIGHT},children:r})]})]})}],488275),e.s([],328367)}]); 8 9//# debugId=5abaebd7-77f0-e7af-a660-157181126aac
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.