1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[318],{67804:function(e,t,r){"use strict";r.r(t);var n=r(85893),o=r(67294),a=r(99011),i=r(35487),s=r(57016),c=r(62558);r(8984),r(55479);var l=r(78684),u=r.n(l);a.GlobalWorkerOptions.workerSrc="/pdf.worker.min.mjs",t.default=e=>{let{selectedPdfUrl:t,pageNumber:r,setPageNumber:a,documentId:l,propertyId:d}=e,[f,p]=(0,o.useState)(null),[m,_]=(0,o.useState)(null),[h,w]=(0,o.useState)(!1),[g,v]=(0,o.useState)(1),[C,V]=(0,o.useState)(1),[x,b]=(0,o.useState)(!1),k=(0,o.useRef)(null),z=(0,o.useRef)(null),E=(0,o.useRef)([]),j=(0,o.useRef)(null),y=(0,o.useRef)(!1),P=(0,o.useCallback)(()=>k.current?(k.current.clientWidth-40)*g:null,[g]);(0,o.useEffect)(()=>{let e=()=>{_(P())};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[P]);let N=(0,o.useCallback)(e=>{if(!e||e<1||!E.current)return;b(!0);let t=E.current[e-1];if(t&&z.current){V(e);let r=t.offsetTop;z.current.scrollTo({top:r-20,behavior:"smooth"}),setTimeout(()=>{b(!1)},500)}else t||setTimeout(()=>N(e),100)},[]);(0,o.useEffect)(()=>{if(!h||!f||!z.current)return;let e={root:z.current,rootMargin:"-10% 0px -10% 0px",threshold:.3};return j.current=new IntersectionObserver(e=>{let t=null,r=0;e.forEach(e=>{if(e.isIntersecting&&e.intersectionRatio>r){let n=parseInt(e.target.getAttribute("data-page-number"));n&&(t=n,r=e.intersectionRatio)}}),t&&t!==C&&!x&&(V(t),a&&(y.current=!0,a(t)))},e),E.current.forEach(e=>{e&&j.current.observe(e)}),()=>{j.current&&j.current.disconnect()}},[h,f,C,x,a]);let I=()=>{v(e=>Math.min(e+.1,3))},L=()=>{v(e=>Math.max(e-.1,.25))},S=(0,o.useCallback)(e=>{(e.ctrlKey||e.metaKey)&&(e.preventDefault(),0>(e.deltaY||e.detail||e.wheelDelta)?I():L())},[]);return(0,o.useEffect)(()=>{let e=k.current;if(e)return e.addEventListener("wheel",S,{passive:!1}),()=>{e.removeEventListener("wheel",S)}},[S]),(0,o.useEffect)(()=>{E.current=[],w(!1),v(1),V(1),b(!1),y.current=!1,j.current&&j.current.disconnect()},[t]),(0,o.useEffect)(()=>{h&&r&&f&&(y.current?y.current=!1:N(r))},[r,h,N]),(0,n.jsx)("div",{className:u().docViewerContainer,ref:k,children:t&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:u().zoomControls,children:[(0,n.jsx)("button",{className:u().zoomButton,onClick:L,disabled:g<=.25,title:"Zoom Out",children:"â"}),(0,n.jsxs)("span",{className:u().zoomLevel,children:[Math.round(100*g),"%"]}),(0,n.jsx)("button",{className:u().zoomButton,onClick:I,disabled:g>=3,title:"Zoom In",children:"+"}),(0,n.jsx)("button",{className:u().zoomButton,onClick:()=>{v(1)},title:"Fit to Width",children:"Fit"})]}),h&&(0,n.jsxs)("div",{className:u().pageIndicator,children:["Page ",C," of ",f]}),(0,n.jsx)("div",{className:u().pdfViewerContainer,ref:z,children:(0,n.jsx)(i.Z,{file:(()=>{if(!t)return null;try{if(!new URL(t).hostname.endsWith("disclosures.io"))return t;let e=encodeURIComponent(t),r="".concat("https://api.clodo.ai","/api/v1/docs/").concat(l,"/proxy-fetch-url/?property_id=").concat(d,"&url=").concat(e),n=localStorage.getItem("token");n&&(r+="&token=".concat(n));try{let e=(0,c.ay)(window.location.href);e&&(r+="&share=".concat(e))}catch(e){console.warn("Error extracting share token:",e)}return r}catch(e){return console.warn("Invalid URL:",e),t}})(),onLoadSuccess:e=>{let{numPages:t}=e;p(t),w(!0);let n=r||1;V(n),a&&(n>t?a(t):a(n)),E.current=Array(t).fill(null),r&&r>1&&setTimeout(()=>{N(r)},300)},loading:(0,n.jsx)("div",{className:u().loading,children:"Loading PDF..."}),children:Array.from(Array(f),(e,t)=>(0,n.jsx)("div",{className:u().pageWrapper,ref:e=>{E.current[t]=e},"data-page-number":t+1,id:"pdf-page-".concat(t+1),children:(0,n.jsx)(s.Z,{pageNumber:t+1,width:m,style:{display:"block",margin:"0 auto"},renderTextLayer:!0,renderAnnotationLayer:!0},"pdf-page-content-".concat(t+1))},"page_".concat(t+1)))})}),(0,n.jsx)("div",{className:u().zoomInstructions,children:"Hold Cmd/Ctrl + scroll to zoom"})]})})}},78684:function(e){e.exports={docViewerContainer:"PdfViewer_docViewerContainer__1zVuQ",pdfViewerContainer:"PdfViewer_pdfViewerContainer__ql4nV",pageWrapper:"PdfViewer_pageWrapper__AXS7j",loading:"PdfViewer_loading__bfktq",zoomControls:"PdfViewer_zoomControls__rB_be",zoomButton:"PdfViewer_zoomButton__BXZWz",zoomLevel:"PdfViewer_zoomLevel__EWefY",pageIndicator:"PdfViewer_pageIndicator__E0fkl",zoomInstructions:"PdfViewer_zoomInstructions__VJTxV",controlsContainer:"PdfViewer_controlsContainer__Sponk",paginationControls:"PdfViewer_paginationControls__VWZv_",closeButton:"PdfViewer_closeButton__EyAYx",pdfC
1anvas:"PdfViewer_pdfCanvas__OtysM"}}}]);
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.