1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4604],{24604:(e,t,n)=>{n.r(t),n.d(t,{Document:()=>O,Outline:()=>U,Page:()=>eo,PasswordResponses:()=>y,Thumbnail:()=>ei,pdfjs:()=>r,useDocumentContext:()=>I,useOutlineContext:()=>F,usePageContext:()=>H});var r=n(53553),o=n(37876),i=n(14232),a=n(69241),u=Object.prototype.hasOwnProperty;function l(e,t,n){for(n of e.keys())if(s(n,t))return n}function s(e,t){var n,r,o;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&s(e[r],t[r]););return -1===r}if(n===Set){if(e.size!==t.size)return!1;for(r of e)if((o=r)&&"object"==typeof o&&!(o=l(t,o))||!t.has(o))return!1;return!0}if(n===Map){if(e.size!==t.size)return!1;for(r of e)if((o=r[0])&&"object"==typeof o&&!(o=l(t,o))||!s(r[1],t.get(o)))return!1;return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return -1===r}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return -1===r}if(!n||"object"==typeof e){for(n in r=0,e)if(u.call(e,n)&&++r&&!u.call(t,n)||!(n in t)||!s(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!=e&&t!=t}function c(e){let t=!1;return{promise:new Promise((n,r)=>{e.then(e=>!t&&n(e)).catch(e=>!t&&r(e))}),cancel(){t=!0}}}let d=["onCopy","onCut","onPaste","onCompositionEnd","onCompositionStart","onCompositionUpdate","onFocus","onBlur","onInput","onInvalid","onReset","onSubmit","onLoad","onError","onKeyDown","onKeyPress","onKeyUp","onAbort","onCanPlay","onCanPlayThrough","onDurationChange","onEmptied","onEncrypted","onEnded","onError","onLoadedData","onLoadedMetadata","onLoadStart","onPause","onPlay","onPlaying","onProgress","onRateChange","onSeeked","onSeeking","onStalled","onSuspend","onTimeUpdate","onVolumeChange","onWaiting","onClick","onContextMenu","onDoubleClick","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop","onSelect","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart","onPointerDown","onPointerMove","onPointerUp","onPointerCancel","onGotPointerCapture","onLostPointerCapture","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut","onScroll","onWheel","onAnimationStart","onAnimationEnd","onAnimationIteration","onTransitionEnd","onChange","onToggle"];function f(e,t){let n={};for(let r of d){let o=e[r];o&&(t?n[r]=e=>o(e,t(r)):n[r]=o)}return n}function p(e,t){if(!e)throw Error("Invariant failed")}var g=n(68547);let h=(0,i.createContext)(null);class m{constructor(){this.externalLinkEnabled=!0,this.externalLinkRel=void 0,this.externalLinkTarget=void 0,this.isInPresentationMode=!1,this.pdfDocument=void 0,this.pdfViewer=void 0}setDocument(e){this.pdfDocument=e}setViewer(e){this.pdfViewer=e}setExternalLinkRel(e){this.externalLinkRel=e}setExternalLinkTarget(e){this.externalLinkTarget=e}setHash(){}setHistory(){}get pagesCount(){return this.pdfDocument?this.pdfDocument.numPages:0}get page(){return p(this.pdfViewer,"PDF viewer is not initialized."),this.pdfViewer.currentPageNumber||0}set page(e){p(this.pdfViewer,"PDF viewer is not initialized."),this.pdfViewer.currentPageNumber=e}get rotation(){return 0}set rotation(e){}addLinkAttributes(e,t,n){e.href=t,e.rel=this.externalLinkRel||"noopener noreferrer nofollow",e.target=n?"_blank":this.externalLinkTarget||""}goToDestination(e){return new Promise(t=>{p(this.pdfDocument,"PDF document not loaded."),p(e,"Destination is not specified."),"string"==typeof e?this.pdfDocument.getDestination(e).then(t):Array.isArray(e)?t(e):e.then(t)}).then(e=>{p(Array.isArray(e),`"${e}" is not a valid destination array.`);let t=e[0];new Promise(e=>{p(this.pdfDocument,"PDF document not loaded."),t instanceof Object?this.pdfDocument.getPageIndex(t).then(t=>{e(t)}).catch(()=>{p(!1,`"${t}" is not a valid page reference.`)}):"number"==typeof t?e(t):p(!1,`"${t}" is not a valid destination reference.`)}).then(t=>{let n=t+1;p(this.pdfViewer,"PDF viewer is not initialized."),p(n>=1&&n<=this.pagesCount,`"${n}" is not a valid page number.`),this.pdfViewer.scrollPageIntoView({dest:e,pageIndex:t,pageNumber:n})})})}goToPage(e){p(this.pdfViewer,"PDF viewer is not initialized."),p(e>=1&&e<=this.pagesCount,`"${e}" is not a valid page number.`),this.pdfViewer.scrollPageIntoView({pageIndex:e-1,pageNumber:e})}goToXY(){}cachePageRef(){}getDestinationHash(){return"#"}getAnchorUrl(){return"#"}executeNamedAction(){}executeSetOCGState(){}isPageVisible(){return!0}isPageCached(){return!0}navigateTo(e){this.goToDestination(e)}}function E({children:e,type:t}){return(0,o.jsx)("div",{className:`react-pdf__message react-pdf__message--${t}`,children:e})}let y={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};function v(e,t){switch(t.type){case"RESOLVE":return{value:t.value,error:void 0};case"REJECT":return{value:!1,error:t.error};case"RESET":return{value:void 0,error:void 0};default:return e}}function w(){return(0,i.useReducer)(v,{value:void 0,error:void 0})}let b="u">typeof window,x=b&&"file:"===window.location.protocol;function S(e){return null!=e}function T(e){return"string"==typeof e&&/^data:/.test(e)}function R(e){p(T(e),"Invalid data URI.");let[t="",n=""]=e.split(",");return -1!==t.split(";").indexOf("base64")?atob(n):unescape(n)}let P="On Chromium based browsers, you can use --allow-file-access-from-files flag for debugging purposes.";function L(){g(!x,`Loading PDF as base64 strings/URLs may not work on protocols other than HTTP/HTTPS. ${P}`)}function C(e){(null==e?void 0:e.cancel)&&e.cancel()}function D(e,t){return Object.defineProperty(e,"width",{get(){return this.getViewport({scale:t}).width},configurable:!0}),Object.defineProperty(e,"height",{get(){return this.getViewport({scale:t}).height},configurable:!0}),Object.defineProperty(e,"originalWidth",{get(){return this.getViewport({scale:1}).width},configurable:!0}),Object.defineProperty(e,"originalHeight",{get(){return this.getViewport({scale:1}).height},configurable:!0}),e}function A(e){return"AbortException"===e.name||"RenderingCancelledException"===e.name}let{PDFDataRangeTransport:k}=r,j=(e,t)=>{switch(t){case y.NEED_PASSWORD:e(prompt("Enter the password to open this PDF file."));break;case y.INCORRECT_PASSWORD:e(prompt("Invalid password. Please try again."))}};function _(e){return"object"==typeof e&&null!==e&&("data"in e||"range"in e||"url"in e)}let O=(0,i.forwardRef)(function({children:e,className:t,error:n="Failed to load PDF file.",externalLinkRel:u,externalLinkTarget:l,file:d,inputRef:y,imageResourcesPath:v,loading:x="Loading PDFâ¦",noData:S="No PDF file specified.",onItemClick:P,onLoadError:D,onLoadProgress:A,onLoadSuccess:O,onPassword:M=j,onSourceError:N,onSourceSuccess:V,options:I,renderMode:F,rotate:$,scale:U,...W},G){let[H,B]=w(),{value:z,error:J}=H,[q,K]=w(),{value:Y,error:X}=q,Q=(0,i.useRef)(new m),Z=(0,i.useRef)([]),ee=(0,i.useRef)(void 0),et=(0,i.useRef)(void 0);d&&d!==ee.current&&_(d)&&(g(!s(d,ee.current),'File prop passed to <Document /> changed, but it\'s equal to previous one. This might result in unnecessary reloads. Consider memoizing the value passed to "file" prop.'),ee.current=d),I&&I!==et.current&&(g(!s(I,et.current),'Options prop passed to <Document /> changed, but it\'s equal to previous one. This might result in unnecessary reloads. Consider memoizing the value passed to "options" prop.'),et.current=I);let en=(0,i.useRef)({scrollPageIntoView:e=>{let{dest:t,pageNumber:n,pageIndex:r=n-1}=e;if(P)return void P({dest:t,pageIndex:r,pageNumber:n});let o=Z.current[r];o?o.scrollIntoView():g(!1,`An internal link leading to page ${n} was clicked, but neither <Document> was provided with onItemClick nor it was able to find the page within itself. Either provide onItemClick to <Document>
1 and handle navigating by yourself or ensure that all pages are rendered within <Document>.`)}});(0,i.useImperativeHandle)(G,()=>({linkService:Q,pages:Z,viewer:en}),[]),(0,i.useEffect)(function(){B({type:"RESET"})},[d,B]);let er=(0,i.useCallback)(async()=>{if(!d)return null;if("string"==typeof d)return T(d)?{data:R(d)}:(L(),{url:d});if(d instanceof k)return{range:d};if(d instanceof ArrayBuffer)return{data:d};if(b&&(p(b,"isBlob can only be used in a browser environment"),d instanceof Blob))return{data:await new Promise((e,t)=>{let n=new FileReader;n.onload=()=>{if(!n.result)return t(Error("Error while reading a file."));e(n.result)},n.onerror=e=>{if(!e.target)return t(Error("Error while reading a file."));let{error:n}=e.target;if(!n)return t(Error("Error while reading a file."));switch(n.code){case n.NOT_FOUND_ERR:return t(Error("Error while reading a file: File not found."));case n.SECURITY_ERR:return t(Error("Error while reading a file: Security error."));case n.ABORT_ERR:return t(Error("Error while reading a file: Aborted."));default:return t(Error("Error while reading a file."))}},n.readAsArrayBuffer(d)})};if(p("object"==typeof d,"Invalid parameter in file, need either Uint8Array, string or a parameter object"),p(_(d),"Invalid parameter object: need either .data, .range or .url"),"url"in d&&"string"==typeof d.url){if(T(d.url)){let{url:e,...t}=d;return{data:R(e),...t}}L()}return d},[d]);(0,i.useEffect)(()=>{let e=c(er());return e.promise.then(e=>{B({type:"RESOLVE",value:e})}).catch(e=>{B({type:"REJECT",error:e})}),()=>{C(e)}},[er,B]),(0,i.useEffect)(()=>{if(void 0!==z){if(!1===z)return void(J&&(g(!1,J.toString()),N&&N(J)));V&&V()}},[z]),(0,i.useEffect)(function(){K({type:"RESET"})},[K,z]),(0,i.useEffect)(function(){if(!z)return;let e=I?{...z,...I}:z,t=r.getDocument(e);return A&&(t.onProgress=A),M&&(t.onPassword=M),t.promise.then(e=>{t.destroyed||K({type:"RESOLVE",value:e})}).catch(e=>{t.destroyed||K({type:"REJECT",error:e})}),()=>{t.destroy()}},[I,K,z]),(0,i.useEffect)(()=>{if(void 0!==Y){if(!1===Y)return void(X&&(g(!1,X.toString()),D&&D(X)));Y&&(O&&O(Y),Z.current=Array(Y.numPages),Q.current.setDocument(Y))}},[Y]),(0,i.useEffect)(function(){Q.current.setViewer(en.current),Q.current.setExternalLinkRel(u),Q.current.setExternalLinkTarget(l)},[u,l]);let eo=(0,i.useCallback)((e,t)=>{Z.current[e]=t},[]),ei=(0,i.useCallback)(e=>{delete Z.current[e]},[]),ea=(0,i.useMemo)(()=>({imageResourcesPath:v,linkService:Q.current,onItemClick:P,pdf:Y,registerPage:eo,renderMode:F,rotate:$,scale:U,unregisterPage:ei}),[v,P,Y,eo,F,$,U,ei]),eu=(0,i.useMemo)(()=>f(W,()=>Y),[W,Y]);return(0,o.jsx)("div",{className:(0,a.A)("react-pdf__Document",t),ref:y,...eu,children:function(){if(!d)return(0,o.jsx)(E,{type:"no-data",children:"function"==typeof S?S():S});if(null==Y)return(0,o.jsx)(E,{type:"loading",children:"function"==typeof x?x():x});if(!1===Y)return(0,o.jsx)(E,{type:"error",children:"function"==typeof n?n():n});if(!(null==ea?void 0:ea.pdf))throw Error("pdf is undefined");let t="function"==typeof e?e(ea):e;return(0,o.jsx)(h.Provider,{value:ea,children:t})}()})}),M=(0,i.createContext)(null);class N{constructor({num:e,gen:t}){this.num=e,this.gen=t}toString(){let e=`${this.num}R`;return 0!==this.gen&&(e+=this.gen),e}}function V(e){let t=(0,i.useRef)(void 0),n=t.current;return void 0!==n?()=>n:()=>{let n=e();return t.current=n,n}}function I(){return(0,i.useContext)(h)}function F(){return(0,i.useContext)(M)}function $(e){let t=I(),n=F();p(n,"Unable to find Outline context.");let{item:r,linkService:i,onItemClick:a,pdf:u,...l}={...t,...n,...e};p(u,"Attempted to load an outline, but no document was specified. Wrap <Outline /> in a <Document /> or pass explicit `pdf` prop.");let s=V(()=>"string"==typeof r.dest?u.getDestination(r.dest):r.dest),c=V(async()=>{let e=await s();if(!e)throw Error("Destination not found.");let[t]=e;return u.getPageIndex(new N(t))}),d=V(async()=>await c()+1);return(0,o.jsxs)("li",{children:[(0,o.jsx)("a",{href:"#",onClick:function(e){e.preventDefault(),p(a||i,"Either onItemClick callback or linkService must be defined in order to navigate to an outline item."),a?Promise.all([s(),c(),d()]).then(([e,t,n])=>{a({dest:e,pageIndex:t,pageNumber:n})}):i&&i.goToDestination(r.dest)},children:r.title}),function(){if(!r.items||!r.items.length)return null;let{items:e}=r;return(0,o.jsx)("ul",{children:e.map((e,t)=>(0,o.jsx)($,{item:e,pdf:u,...l},"string"==typeof e.dest?e.dest:t))})}()]})}function U(e){let{className:t,inputRef:n,onItemClick:r,onLoadError:u,onLoadSuccess:l,pdf:s,...d}={...I(),...e};p(s,"Attempted to load an outline, but no document was specified. Wrap <Outline /> in a <Document /> or pass explicit `pdf` prop.");let[h,m]=w(),{value:E,error:y}=h;(0,i.useEffect)(function(){m({type:"RESET"})},[m,s]),(0,i.useEffect)(function(){let e=c(s.getOutline());return e.promise.then(e=>{m({type:"RESOLVE",value:e})}).catch(e=>{m({type:"REJECT",error:e})}),()=>C(e)},[m,s]),(0,i.useEffect)(()=>
1{if(void 0!==E){if(!1===E)return void(y&&(g(!1,y.toString()),u&&u(y)));void 0!==E&&!1!==E&&l&&l(E)}},[E]);let v=(0,i.useMemo)(()=>({onItemClick:r}),[r]),b=(0,i.useMemo)(()=>f(d,()=>E),[d,E]);return E?(0,o.jsx)("div",{className:(0,a.A)("react-pdf__Outline",t),ref:n,...b,children:(0,o.jsx)(M.Provider,{value:v,children:E?(0,o.jsx)("ul",{children:E.map((e,t)=>(0,o.jsx)($,{item:e,pdf:s},"string"==typeof e.dest?e.dest:t))}):null})}):null}function W(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e.filter(Boolean);return n.length<=1?n[0]||null:function(e){for(var t=0;t<n.length;t++){var r=n[t];"function"==typeof r?r(e):r&&(r.current=e)}}}let G=(0,i.createContext)(null);function H(){return(0,i.useContext)(G)}function B(){let e=I(),t=H();p(t,"Unable to find Page context.");let{filterAnnotations:n,imageResourcesPath:u,linkService:l,onGetAnnotationsError:s,onGetAnnotationsSuccess:d,onRenderAnnotationLayerError:f,onRenderAnnotationLayerSuccess:h,page:m,pdf:E,renderForms:y,rotate:v,scale:b=1}={...e,...t};p(E,"Attempted to load page annotations, but no document was specified. Wrap <Page /> in a <Document /> or pass explicit `pdf` prop."),p(m,"Attempted to load page annotations, but no page was specified."),p(l,"Attempted to load page annotations, but no linkService was specified.");let[x,S]=w(),{value:T,error:R}=x,P=(0,i.useRef)(null);g(1===Number.parseInt(window.getComputedStyle(document.body).getPropertyValue("--react-pdf-annotation-layer"),10),"AnnotationLayer styles not found. Read more: https://github.com/wojtekmaj/react-pdf#support-for-annotations"),(0,i.useEffect)(function(){S({type:"RESET"})},[S,m]),(0,i.useEffect)(function(){if(!m)return;let e=c(m.getAnnotations());return e.promise.then(e=>{S({type:"RESOLVE",value:e})}).catch(e=>{S({type:"REJECT",error:e})}),()=>{C(e)}},[S,m]),(0,i.useEffect)(()=>{if(void 0!==T){if(!1===T)return void(R&&(g(!1,R.toString()),s&&s(R)));T&&d&&d(T)}},[T]);let L=(0,i.useMemo)(()=>m.getViewport({scale:b,rotation:v}),[m,v,b]);return(0,i.useEffect)(function(){if(!E||!m||!l||!T)return;let{current:e}=P;if(!e)return;let t=L.clone({dontFlip:!0}),o={accessibilityManager:null,annotationCanvasMap:null,annotationEditorUIManager:null,annotationStorage:E.annotationStorage,commentManager:null,div:e,l10n:null,linkService:l,page:m,structTreeLayer:null,viewport:t},i={annotations:n?n({annotations:T}):T,annotationStorage:E.annotationStorage,div:e,imageResourcesPath:u,linkService:l,page:m,renderForms:y,viewport:t};e.innerHTML="";try{new r.AnnotationLayer(o).render(i),h&&h()}catch(e){g(!1,`${e}`),f&&f(e)}return()=>{}},[T,n,u,l,m,E,y,L]),(0,o.jsx)("div",{className:(0,a.A)("react-pdf__Page__annotations","annotationLayer"),ref:P})}let z={Document:null,DocumentFragment:null,Part:"group",Sect:"group",Div:"group",Aside:"note",NonStruct:"none",P:null,H:"heading",Title:null,FENote:"note",Sub:"group",Lbl:null,Span:null,Em:null,Strong:null,Link:"link",Annot:"note",Form:"form",Ruby:null,RB:null,RT:null,RP:null,Warichu:null,WT:null,WP:null,L:"list",LI:"listitem",LBody:null,Table:"table",TR:"row",TH:"columnheader",TD:"cell",THead:"columnheader",TBody:null,TFoot:null,Caption:null,Figure:"figure",Formula:null,Artifact:null},J=/^H(\d+)$/;function q(e){return"children"in e}function K(e){return!!q(e)&&1===e.children.length&&0 in e.children&&"id"in e.children[0]}function Y({className:e,node:t}){let n=(0,i.useMemo)(()=>t?{...function(e){let t={};if(q(e)){let{role:n}=e,r=n.match(J);if(r)t.role="heading",t["aria-level"]=Number(r[1]);else if(n in z){let e=z[n];e&&(t.role=e)}}return t}(t),...function e(t){let n={};if(q(t)){if(void 0!==t.alt&&(n["aria-label"]=t.alt),void 0!==t.lang&&(n.lang=t.lang),K(t)){let[r]=t.children;if(r){let t=e(r);return{...n,...t}}}}else"id"in t&&(n["aria-owns"]=t.id);return n}(t)}:null,[t]),r=(0,i.useMemo)(()=>!q(t)||K(t)?null:t.children.map((e,t)=>(0,o.jsx)(Y,{node:e},t)),[t]);return(0,o.jsx)("span",{className:e,...n,children:r})}function X(){let e=H();p(e,"Unable to find Page context.");let{onGetStructTreeError:t,onGetStructTreeSuccess:n}=e,[r,a]=w(),{value:u,error:l}=r,{customTextRenderer:s,page:d}=e;return((0,i.useEffect)(function(){a({type:"RESET"})},[a,d]),(0,i.useEffect)(function(){if(s||!d)return;let e=c(d.getStructTree());return e.promise.then(e=>{a({type:"RESOLVE",value:e})}).catch(e=>{a({type:"REJECT",error:e})}),()=>C(e)},[s,d,a]),(0,i.useEffect)(()=>
1{if(void 0!==u){if(!1===u)return void(l&&(g(!1,l.toString()),t&&t(l)));u&&n&&n(u)}},[u]),u)?(0,o.jsx)(Y,{className:"react-pdf__Page__structTree structTree",node:u}):null}let Q=r.AnnotationMode;function Z(e){let t=H();p(t,"Unable to find Page context.");let{_className:n,canvasBackground:r,devicePixelRatio:a=b&&window.devicePixelRatio||1,onRenderError:u,onRenderSuccess:l,page:s,renderForms:c,renderTextLayer:d,pageColors:f,rotate:h,scale:m}={...t,...e},{canvasRef:E}=e;p(s,"Attempted to render page canvas, but no page was specified.");let y=(0,i.useRef)(null);function v(e){!A(e)&&(g(!1,e.toString()),u&&u(e))}let w=(0,i.useMemo)(()=>s.getViewport({scale:m*a,rotation:h}),[a,s,h,m]),x=(0,i.useMemo)(()=>s.getViewport({scale:m,rotation:h}),[s,h,m]);(0,i.useEffect)(function(){if(!s)return;s.cleanup();let{current:e}=y;if(!e)return;e.width=w.width,e.height=w.height,e.style.width=`${Math.floor(x.width)}px`,e.style.height=`${Math.floor(x.height)}px`,e.style.visibility="hidden";let t={annotationMode:c?Q.ENABLE_FORMS:Q.ENABLE,canvas:e,canvasContext:e.getContext("2d",{alpha:!1}),pageColors:f,viewport:w};r&&(t.background=r);let n=s.render(t);return n.promise.then(()=>{e.style.visibility="",s&&l&&l(D(s,m))}).catch(v),()=>C(n)},[r,s,f,c,w,x]);let S=(0,i.useCallback)(()=>{let{current:e}=y;e&&(e.width=0,e.height=0)},[]);return(0,i.useEffect)(()=>S,[S]),(0,o.jsx)("canvas",{className:`${n}__canvas`,dir:"ltr",ref:W(E,y),style:{display:"block",userSelect:"none"},children:d?(0,o.jsx)(X,{}):null})}let ee=new Set(["base","embed","iframe","link","meta","object","script","style","template"]),et=new Set(["action","formaction","href","poster","src","xlink:href"]);function en(e){return e.nodeType===Node.ELEMENT_NODE&&e instanceof HTMLElement}function er(){let e=H();p(e,"Unable to find Page context.");let{customTextRenderer:t,onGetTextError:n,onGetTextSuccess:u,onRenderTextLayerError:l,onRenderTextLayerSuccess:s,page:d,pageIndex:f,pageNumber:h,rotate:m,scale:E}=e;p(d,"Attempted to load page text content, but no page was specified.");let[y,v]=w(),{value:b,error:x}=y,S=(0,i.useRef)(null);g(1===Number.parseInt(window.getComputedStyle(document.body).getPropertyValue("--react-pdf-text-layer"),10),"TextLayer styles not found. Read more: https://github.com/wojtekmaj/react-pdf#support-for-text-layer"),(0,i.useEffect)(function(){v({type:"RESET"})},[d,v]),(0,i.useEffect)(function(){if(!d)return;let e=c(d.getTextContent());return e.promise.then(e=>{v({type:"RESOLVE",value:e})}).catch(e=>{v({type:"REJECT",error:e})}),()=>C(e)},[d,v]),(0,i.useEffect)(()=>{if(void 0!==b){if(!1===b)return void(x&&(g(!1,x.toString()),n&&n(x)));b&&u&&u(b)}},[b]);let T=(0,i.useCallback)(()=>{s&&s()},[s]),R=(0,i.useCallback)(e=>{!A(e)&&(g(!1,e.toString()),l&&l(e))},[l]),P=(0,i.useMemo)(()=>d.getViewport({scale:E,rotation:m}),[d,m,E]);return(0,i.useLayoutEffect)(function(){if(!d||!b)return;let{current:e}=S;if(!e)return;e.innerHTML="";let n=d.streamTextContent({includeMarkedContent:!0}),o=new r.TextLayer({container:e,textContentSource:n,viewport:P});return o.render().then(()=>{let n=document.createElement("div");n.className="endOfContent",e.append(n);let r=e.querySelectorAll('[role="presentation"]');if(t){let e=0;b.items.forEach((n,o)=>{let i,a;if(!("str"in n))return;let u=r[e];if(!u)return;let l=t({pageIndex:f,pageNumber:h,itemIndex:o,...n});(i=document.createElement("template")).innerHTML=l,a=document.createDocumentFragment(),Array.from(i.content.childNodes).forEach(e=>{a.append(function e(t){var n;if(en(t)&&!(en(t)&&ee.has(t.tagName.toLowerCase()))){let n;return n=document.createElement(t.tagName.toLowerCase()),Array.from(t.attributes).forEach(e=>{let t=e.name.toLowerCase();t.startsWith("on")||"srcdoc"===t||et.has(t)&&function(e){let t="";for(let n of e){let e=n.charCodeAt(0);e<=32||127===e||(t+=n.toLowerCase())}return t.startsWith("javascript:")||t.startsWith("vbscript:")}(e.value)||n.setAttribute(e.name,e.value)}),Array.from(t.childNodes).forEach(t=>{n.append(e(t))}),n}return document.createTextNode(null!=(n=t.textContent)?n:"")}(e))}),u.replaceChildren(a),e+=n.str&&n.hasEOL?2:1})}T()}).catch(R),()=>C(o)},[t,R,T,d,f,h,b,P]),(0,o.jsx)("div",{className:(0,a.A)("react-pdf__Page__textContent","textLayer"),onMouseUp:function(){let e=S.current;e&&e.classList.remove("selecting")},onMouseDown:function(){let e=S.current;e&&e.classList.add("selecting")},ref:S})}function eo(e){let{_className:t="react-pdf__Page",_enableRegisterUnregisterPage:n=!0,canvasBackgroun
1d:r,canvasRef:u,children:l,className:s,customRenderer:d,customTextRenderer:h,devicePixelRatio:m,error:y="Failed to load the page.",filterAnnotations:v,height:b,inputRef:x,loading:T="Loading pageâ¦",noData:R="No page specified.",onGetAnnotationsError:P,onGetAnnotationsSuccess:L,onGetStructTreeError:A,onGetStructTreeSuccess:k,onGetTextError:j,onGetTextSuccess:_,onLoadError:O,onLoadSuccess:M,onRenderAnnotationLayerError:N,onRenderAnnotationLayerSuccess:V,onRenderError:F,onRenderSuccess:$,onRenderTextLayerError:U,onRenderTextLayerSuccess:H,pageColors:z,pageIndex:J,pageNumber:q,pdf:K,registerPage:Y,renderAnnotationLayer:X=!0,renderForms:Q=!1,renderMode:ee="canvas",renderTextLayer:et=!0,rotate:en,scale:eo=1,unregisterPage:ei,width:ea,...eu}={...I(),...e},[el,es]=w(),{value:ec,error:ed}=el,ef=(0,i.useRef)(null);p(K,"Attempted to load a page, but no document was specified. Wrap <Page /> in a <Document /> or pass explicit `pdf` prop.");let ep=S(q)?q-1:null!=J?J:null,eg=null!=q?q:S(J)?J+1:null,eh=null!=en?en:ec?ec.rotate:null,em=(0,i.useMemo)(()=>{if(!ec)return null;let e=1,t=null!=eo?eo:1;if(ea||b){let t=ec.getViewport({scale:1,rotation:eh});ea?e=ea/t.width:b&&(e=b/t.height)}return t*e},[b,ec,eh,eo,ea]);(0,i.useEffect)(function(){return()=>{S(ep)&&n&&ei&&ei(ep)}},[n,K,ep,ei]),(0,i.useEffect)(function(){es({type:"RESET"})},[es,K,ep]),(0,i.useEffect)(function(){if(!K||!eg)return;let e=c(K.getPage(eg));return e.promise.then(e=>{es({type:"RESOLVE",value:e})}).catch(e=>{es({type:"REJECT",error:e})}),()=>C(e)},[es,K,eg]),(0,i.useEffect)(()=>{if(void 0!==ec){if(!1===ec)return void(ed&&(g(!1,ed.toString()),O&&O(ed)));!function(){if(M){if(!ec||!em)return;M(D(ec,em))}if(n&&Y){if(!S(ep)||!ef.current)return;Y(ep,ef.current)}}()}},[ec,em]);let eE=(0,i.useMemo)(()=>S(ep)&&eg&&S(eh)&&S(em)?{_className:t,canvasBackground:r,customTextRenderer:h,devicePixelRatio:m,filterAnnotations:v,onGetAnnotationsError:P,onGetAnnotationsSuccess:L,onGetStructTreeError:A,onGetStructTreeSuccess:k,onGetTextError:j,onGetTextSuccess:_,onRenderAnnotationLayerError:N,onRenderAnnotationLayerSuccess:V,onRenderError:F,onRenderSuccess:$,onRenderTextLayerError:U,onRenderTextLayerSuccess:H,page:ec,pageColors:z,pageIndex:ep,pageNumber:eg,renderForms:Q,renderTextLayer:et,rotate:eh,scale:em}:null,[t,r,h,m,v,P,L,A,k,j,_,N,V,F,$,U,H,ec,z,ep,eg,Q,et,eh,em]),ey=(0,i.useMemo)(()=>f(eu,()=>ec?em?D(ec,em):void 0:ec),[eu,ec,em]),ev=`${ep}@${em}/${eh}`;return(0,o.jsx)("div",{className:(0,a.A)(t,s),"data-page-number":eg,ref:W(x,ef),style:{"--scale-round-x":"1px","--scale-round-y":"1px","--scale-factor":"1","--user-unit":`${em}`,"--total-scale-factor":"calc(var(--scale-factor) * var(--user-unit))",backgroundColor:r||"white",position:"relative",minWidth:"min-content",minHeight:"min-content"},...ey,children:function(){if(!eg)return(0,o.jsx)(E,{type:"no-data",children:"function"==typeof R?R():R});if(null===K||null==ec)return(0,o.jsx)(E,{type:"loading",children:"function"==typeof T?T():T});if(!1===K||!1===ec)return(0,o.jsx)(E,{type:"error",children:"function"==typeof y?y():y});if(!(null==eE?void 0:eE.page))throw Error("page is undefined");let e="function"==typeof l?l(eE):l;return(0,o.jsxs)(G.Provider,{value:eE,children:[function(){switch(ee){case"custom":return p(d,'renderMode was set to "custom", but no customRenderer was passed.'),(0,o.jsx)(d,{},`${ev}_custom`);case"none":return null;default:return(0,o.jsx)(Z,{canvasRef:u},`${ev}_canvas`)}}(),et?(0,o.jsx)(er,{},`${ev}_text`):null,X?(0,o.jsx)(B,{},`${ev}_annotations`):null,e]})}()})}function ei(e){let{className:t,linkService:n,onItemClick:r,pageIndex:i,pageNumber:u,pdf:l}={...I(),...e};p(l,"Attempted to load a thumbnail, but no document was specified. Wrap <Thumbnail /> in a <Document /> or pass explicit `pdf` prop.");let s=S(u)?u-1:null!=i?i:null,c=null!=u?u:S(i)?i+1:null,{className:d,onItemClick:f,...g}=e;return(0,o.jsx)("a",{className:(0,a.A)("react-pdf__Thumbnail",t),href:c?"#":void 0,onClick:function(e){e.preventDefault(),S(s)&&c&&(p(r||n,"Either onItemClick callback or linkService must be defined in order to navigate to an outline item."),r?r({pageIndex:s,pageNumber:c}):n&&n.goToPage(c))},children:(0,o.jsx)(eo,{...g,_className:"react-pdf__Thumbnail__page",_enableRegisterUnregisterPage:!1,renderAnnotationLayer:!1,renderTextLayer:!1})})}
1g(!x,`Loading PDF.js worker may not work on protocols other than HTTP/HTTPS. ${P}`),r.GlobalWorkerOptions.workerSrc="pdf.worker.mjs"},68547:e=>{e.exports=function(){}}}]);
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.