PageSourceSearch

https://www.livelib.ru/_next/static/chunks/9047.31b2735f796eacc4.js

js livelib.ru collected 2026-10-01 08:36:28 UTC 3,929 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},o=(new e.Error).stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="c1c08ee2-b648-4357-9109-f4c47d528d52",e._sentryDebugIdIdentifier="sentry-dbid-c1c08ee2-b648-4357-9109-f4c47d528d52")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9047],{2558:(e,o,l)=>{"use strict";l.d(o,{D:()=>t,X:()=>a});let a=1,t=e=>"readpart"===e?"part":"all"},29047:(e,o,l)=>{"use strict";l.r(o),l.d(o,{BookReadTocModal:()=>T});var a=l(10749),t=l(66985),d=l(66025),n=l.n(d),r=l(4134),c=l(37333),i=l(68929),s=l(38863);let u=l(88658).zH.feature("BookReadTocModal");var k=l(2558),_=l(50370),p=l.n(_);let T=e=>{var o,l,d,_,T,m,B,R,y,v;let{artTextId:f,bookId:h,readType:b,currentPage:g,activeTocHighlightFromScroll:M,onTocNavigate:x,onClose:N}=e,{logEvent:w}=(0,r.aF)(),{data:I,isLoading:L,error:j}=(0,c.S)(f),E=(0,t.useMemo)(()=>{var e,o;let l=null!=(o=null==I||null==(e=I.payload)?void 0:e.data)?o:[];return"number"==typeof M&&M>=0&&M<l.length?M:function(e,o){let l=-1/0,a=-1;for(let t=0;t<e.length;t++){let d=e[t].page_number;!(d>o)&&d>l&&(l=d,a=t)}return a}(l,g)},[I,g,M]),C=(0,t.useMemo)(()=>{var e,o;let l=null!=(o=null==I||null==(e=I.payload)?void 0:e.data)?o:[];return 0===l.length?1:Math.min(...l.map(e=>e.level))},[null==I||null==(o=I.payload)?void 0:o.data]);(0,t.useEffect)(()=>{j&&u("NetworkError","Failed to load art text TOC").emit({originalError:j,extendedParams:{artTextId:f,component:"BookReadTocModal"}})},[j,f]);let S=(0,t.useCallback)((e,o)=>{var l,a,t,d;let n=null==(t=(null!=(d=null==I||null==(l=I.payload)?void 0:l.data)?d:[])[o])||null==(a=t.title)?void 0:a.trim();w("readfree.toc.element.click",{event_version:k.X,book_id:h,read_type:b,read_page:g,chapter_title:n&&""!==n?n:null}),N(),x(e,o)},[h,g,null==I||null==(l=I.payload)?void 0:l.data,w,N,x,b]);return(0,a.jsx)(s.N,{isOpen:!0,onClose:N,title:"Оглавление",size:"m",showCloseButton:!0,children:(0,a.jsxs)("div",{className:p().BookReadTocModal,children:[L&&(0,a.jsx)("div",{className:p().BookReadTocModalState,children:(0,a.jsx)(i.Fd,{mode:"blue"})}),!L&&j&&(0,a.jsx)("p",{className:p().BookReadTocModalState,children:"Не удалось загрузить оглавление. Попробуйте позже."}),!L&&!j&&(null!=(R=null==I||null==(_=I.payload)||null==(d=_.data)?void 0:d.length)?R:0)===0&&(0,a.jsx)("p",{className:p().BookReadTocModalState,children:"Оглавление пусто."}),!L&&!j&&(null!=(y=null==I||null==(m=I.payload)||null==(T=m.data)?void 0:T.length)?y:0)>0&&(0,a.jsx)("ul",{className:p().BookReadTocList,role:"list",children:(null!=(v=null==I||null==(B=I.payload)?void 0:B.data)?v:[]).map((e,o)=>{let l=e.level-C;return(0,a.jsx)("li",{className:p().BookReadTocItem,children:(0,a.jsx)(i.$n,{type:"button",className:n()(p().BookReadTocLink,{[p().BookReadTocLink_current]:o===E}),style:{paddingLeft:l>0?"".concat(24*l,"px"):0},onClick:()=>S(e.url,o),children:e.title})},"".concat(e.page_number,"-").concat(e.title,"-").concat(o))})})]})})}},37333:(e,o,l)=>{"use strict";l.d(o,{S:()=>n});var a=l(23488),t=l(49566),d=l(56798);let n=(e,o)=>(0,a.useQuery)({...(e=>({queryKey:d.l.artTexts.contents(e),queryFn:async()=>{let{data:o,error:l}=await t.m.GET("/api/art-texts/{art_text_id}/contents",{params:{path:{art_text_id:e}}});if(l)throw l;return o}}))(e),enabled:(null==o?void 0:o.enabled)!==!1&&!!e,staleTime:6e5,gcTime:36e5})},50370:e=>{e.exports={BookReadTocModal:"BookReadTocModal_BookReadTocModal__50Dvm",BookReadTocModalState:"BookReadTocModal_BookReadTocModalState__Y37lt",BookReadTocList:"BookReadTocModal_BookReadTocList___vI_g",BookReadTocItem:"BookReadTocModal_BookReadTocItem___cENh",BookReadTocLink:"BookReadTocModal_BookReadTocLink__1yIOA",BookReadTocLink_current:"BookReadTocModal_BookReadTocLink_current__N0Fg9"}}}]);

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.