1!function(){try{var 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]="24ac8b6d-c777-4d4a-97db-fc52561683da",e._sentryDebugIdIdentifier="sentry-dbid-24ac8b6d-c777-4d4a-97db-fc52561683da")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1505],{21505:(e,t,n)=>{n.r(t),n.d(t,{PDFThumbnailsBar:()=>f});var r=n(72549),a=n(5773),l=n(17390),s=n(13099),o=n(18972),c=n(8687),i=n(1654),d=n(40545);function u(e){let{count:t=6}=e;return(0,r.jsx)("div",{className:"flex h-full flex-col items-center space-y-2 overflow-y-auto [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden","data-sentry-component":"PDFThumbnailsBarSkeleton","data-sentry-source-file":"pdf-thumbnails-bar.tsx",children:Array.from({length:t}).map((e,t)=>(0,r.jsx)("div",{className:"relative w-full ".concat(0===t?"border-2":""),children:(0,r.jsx)(s.E,{className:"aspect-3/4 w-full rounded bg-gray-300"})},t))})}function f(e){let{document:t}=e,n=(0,d.useRef)(null),{currentPage:f,setCurrentPage:m,setIsNavigating:b}=(0,a.R)(),[h,p]=(0,d.useState)([]),[g,w]=(0,d.useState)(!0),[y,v]=(0,d.useState)(0);return((0,d.useEffect)(()=>{let e=(0,c.ko)(t.optimized_blob_url,t.blob_url);e&&(async()=>{w(!0);try{let t=(0,l.pU)(e),n=(0,i.getDocument)({url:t,cMapUrl:"https://cdn.jsdelivr.net/npm/pdfjs-dist@".concat(i.version,"/cmaps/"),standardFontDataUrl:"https://cdn.jsdelivr.net/npm/pdfjs-dist@".concat(i.version,"/standard_fonts/"),wasmUrl:"https://cdn.jsdelivr.net/npm/pdfjs-dist@".concat(i.version,"/wasm/")}),r=await n.promise,a=r.numPages;if(v(a),a<=1)return void w(!1);p(Array(a).fill("")),w(!1);for(let e=1;e<=a;e++)try{let t=await r.getPage(e),n=t.getViewport({scale:.3}),a=window.document.createElement("canvas"),l=a.getContext("2d");if(!l)continue;a.height=n.height,a.width=n.width,await t.render({canvasContext:l,viewport:n}).promise.catch(()=>{});let s=a.toDataURL("image/jpeg",.7);p(t=>{let n=t.slice();return n[e-1]=s,n});try{t.cleanup()}catch(e){}await new Promise(e=>setTimeout(e,0))}catch(e){}}catch(e){}finally{}})()},[t.optimized_blob_url,t.blob_url]),(0,d.useEffect)(()=>{if(!n.current||f<=0||0===h.length)return;let e=setTimeout(()=>{try{var e,t;let r=null==(e=n.current)?void 0:e.querySelector('[data-page="'.concat(f,'"]'));if(!r)return;let a=r.getBoundingClientRect(),l=null==(t=n.current)?void 0:t.getBoundingClientRect();if(!l)return;a.top>=l.top&&a.bottom<=l.bottom||r.scrollIntoView({behavior:"smooth",block:"nearest"})}catch(e){}},100);return()=>clearTimeout(e)},[f,h.length]),g)?(0,r.jsx)(u,{}):y<=1?null:(0,r.jsx)("div",{className:"flex max-h-full flex-col overflow-y-auto [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",ref:n,"data-sentry-component":"PDFThumbnailsBar","data-sentry-source-file":"pdf-thumbnails-bar.tsx",children:(0,r.jsx)("div",{className:"flex flex-1 flex-col items-center p-2",children:0===y&&0===h.length?(0,r.jsx)(u,{}):Array.from({length:y||h.length}).map((e,t)=>{let n=h[t],a=t+1,l=f===a;return(0,r.jsxs)("button",{"data-page":a,className:(0,o.cn)("mb-2 w-full cursor-pointer rounded border-2 p-0.5 transition-all duration-200 focus:outline-none",l?"scale-[1.02] border-primary shadow-lg":"border-transparent hover:ring-1 hover:ring-[#CD2F92]/70 focus:ring-1 focus:ring-[#CD2F92]"),onClick:()=>{b(!0),m(a)},"aria-label":"Go to page ".concat(a),children:[n?(0,r.jsx)("img",{src:n,alt:"Page ".concat(a," thumbnail"),className:"h-auto w-full rounded-sm object-contain",loading:"lazy"}):(0,r.jsx)(s.E,{className:"aspect-3/4 w-full rounded bg-gray-300"}),(0,r.jsxs)("div",{className:"mt-1 text-center text-xs",children:["Page ",a]})]},"thumb_".concat(a))})})})}}}]);
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.