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,EAAY8B,EAAWqa,GAAmBA,EAAkB,EAAID,QAAuDA,EAAiB,KACxIjc,EAAakc,QAAyDA,EAAmBra,EAAWoa,GAAkBA,EAAiB,EAAI,KAgBjJ,MAAQhe,UAAWwf,EAAgBjW,YAAakW,GAAqBvhB,EAAOwhB,EAAY,GAAOxhB,EAAO,CAAC,YAAa,gBACpH,OAEA,gBAAoB,IAAK,CAAE8B,UAAW,EAAK,uBAAwBA,GAAYuC,KAAMR,EAAa,SAAMvB,EAAWgQ,QAlBnH,SAAiBhS,GACbA,EAAMiS,iBACD7M,EAAW9B,IAAeC,IAG3BwH,EACAA,EAAY,CACRzH,YACAC,eAIJ+I,EAAY5I,SAASH,GAE7B,GAKI,gBAAoB2b,GAAM9b,OAAO0K,OAAO,CAAC,EAAGoT,EAAW,CAAE5I,WAAY,6BAA8B6G,+BAA+B,EAAOO,uBAAuB,EAAO3G,iBAAiB,KAChM,CvBgCI,GAASjU,EAAmB,0EAA0EkB,KwBlE1G,gCAAsC,e","sources":["webpack://taina-validator-web-app/./node_modules/make-event-props/dist/esm/index.js","webpack://taina-validator-web-app/./node_modules/make-cancellable-promise/dist/esm/index.js","webpack://taina-validator-web-app/./node_modules/clsx/dist/clsx.m.js","webpack://taina-validator-web-app/./node_modules/tiny-warning/dist/tiny-warning.esm.js","webpack://taina-validator-web-app/./node_modules/react-pdf/dist/esm/DocumentContext.js","webpack://taina-validator-web-app/./node_modules/react-pdf/dist/esm/Message.js","webpack://taina-validator-web-app/./node_modules/react-pdf/dist/esm/LinkService.js","webpack://taina-validator-web-app/./node_modules/react-pdf/dist/esm/PasswordResponses.js","webpack://taina-validator-web-app/./node_modules/react-pdf/dist/esm/shared/utils.js","webpack://taina-validator-web-app/./node_modules/react-pdf/dist/esm/shared/hooks/useResolver.js","webpack://taina-validator-web-app/./node_modules/react-pdf/dist/esm/shared/propTypes.js","webpack://taina-validator-web-app/./node_modules/react-pdf/dist/esm/Document.js","webpack://taina-validator-web-app/./node_modules/react-pdf/dist/esm/OutlineContext.js","webpack://taina-validator-web-app/./node_modules/react-pdf/dist/esm/Ref.js","webpack://taina-validator-web-app/./node_modules/react-pdf/dist/esm/shared/hooks/useCachedValue.js","webpack://taina-validator-web-app/./node_modules/react-pdf/dist/esm/shared/hooks/useDocumentContext.js","webpack://taina-validator-web-app/./node_modules/react-pdf/dist/esm/shared/hooks/useOutlineContext.js","webpack://taina-validator-web-app/./node_modules/react-pdf/dist/esm/OutlineItem.js","webpack://taina-validator-web-app/./node_modules/react-pdf/dist/esm/Outline.js","webpack://taina-validator-web-app/./node_modules/merge-refs/dist/esm/index.js","webpack://taina-validator-web-app/./node_modules/react-pdf/dist/esm/PageContext.js","webpack://taina-validator-web-app/./node_modules/react-pdf/dist/esm/shared/constants.js","webpack://taina-validator-web-app/./node_modules/react-pdf/dist/esm/shared/structTreeUtils.js","webpack://taina-validator-web-app/./node_modules/react-pdf/dist/esm/StructTreeItem.js","webpack://taina-validator-web-app/./node_modules/react-pdf/dist/esm/shared/hooks/usePageContext.js","webpack://taina-validator-web-app/./node_modules/react-pdf/dist/esm/StructTree.js","webpack://taina-validator-web-app/./node_modules/react-pdf/dist/esm/Page/PageCanvas.js","webpack://taina-validator-web-app/./node_modules/react-pdf/dist/esm/Page/PageSVG.js","webpack://taina-validator-web-app/./node_modules/react-pdf/dist/esm/Page/TextLayer.js","webpack://taina-validator-web-app/./node_modules/react-pdf/dist/esm/Page/AnnotationLayer.js","webpack://taina-validator-web-app/./node_modules/react-pdf/dist/esm/Page.js","webpack://taina-validator-web-app/./node_modules/react-pdf/dist/esm/Thumbnail.js","webpack://taina-validator-web-app/./node_modules/react-pdf/dist/esm/index.js"],"sourcesContent":["var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\n// As defined on the list of supported events: https://reactjs.org/docs/events.html\nexport var clipboardEvents = ['onCopy', 'onCut', 'onPaste'];\nexport var compositionEvents = [\n 'onCompositionEnd',\n 'onCompositionStart',\n 'onCompositionUpdate',\n];\nexport var focusEvents = ['onFocus', 'onBlur'];\nexport var formEvents = ['onInput', 'onInvalid', 'onReset', 'onSubmit'];\nexport var imageEvents = ['onLoad', 'onError'];\nexport var keyboardEvents = ['onKeyDown', 'onKeyPress', 'onKeyUp'];\nexport var mediaEvents = [\n 'onAbort',\n 'onCanPlay',\n 'onCanPlayThrough',\n 'onDurationChange',\n 'onEmptied',\n 'onEncrypted',\n 'onEnded',\n 'onError',\n 'onLoadedData',\n 'onLoadedMetadata',\n 'onLoadStart',\n 'onPause',\n 'onPlay',\n 'onPlaying',\n 'onProgress',\n 'onRateChange',\n 'onSeeked',\n 'onSeeking',\n 'onStalled',\n 'onSuspend',\n 'onTimeUpdate',\n 'onVolumeChange',\n 'onWaiting',\n];\nexport var mouseEvents = [\n 'onClick',\n 'onContextMenu',\n 'onDoubleClick',\n 'onMouseDown',\n 'onMouseEnter',\n 'onMouseLeave',\n 'onMouseMove',\n 'onMouseOut',\n 'onMouseOver',\n 'onMouseUp',\n];\nexport var dragEvents = [\n 'onDrag',\n 'onDragEnd',\n 'onDragEnter',\n 'onDragExit',\n 'onDragLeave',\n 'onDragOver',\n 'onDragStart',\n 'onDrop',\n];\nexport var selectionEvents = ['onSelect'];\nexport var touchEvents = ['onTouchCancel', 'onTouchEnd', 'onTouchMove', 'onTouchStart'];\nexport var pointerEvents = [\n 'onPointerDown',\n 'onPointerMove',\n 'onPointerUp',\n 'onPointerCancel',\n 'onGotPointerCapture',\n 'onLostPointerCapture',\n 'onPointerEnter',\n 'onPointerLeave',\n 'onPointerOver',\n 'onPointerOut',\n];\nexport var uiEvents = ['onScroll'];\nexport var wheelEvents = ['onWheel'];\nexport var animationEvents = [\n 'onAnimationStart',\n 'onAnimationEnd',\n 'onAnimationIteration',\n];\nexport var transitionEvents = ['onTransitionEnd'];\nexport var otherEvents = ['onToggle'];\nexport var changeEvents = ['onChange'];\nexport var allEvents = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], clipboardEvents, true), compositionEvents, true), focusEvents, true), formEvents, true), imageEvents, true), keyboardEvents, true), mediaEvents, true), mouseEvents, true), dragEvents, true), selectionEvents, true), touchEvents, true), pointerEvents, true), uiEvents, true), wheelEvents, true), animationEvents, true), transitionEvents, true), changeEvents, true), otherEvents, true);\n/**\n * Returns an object with on-event callback props curried with provided args.\n * @param {Object} props Props passed to a component.\n * @param {Function=} getArgs A function that returns argument(s) on-event callbacks\n * shall be curried with.\n */\nexport default function makeEventProps(props, getArgs) {\n var eventProps = {};\n allEvents.forEach(function (eventName) {\n var eventHandler = props[eventName];\n if (!eventHandler) {\n return;\n }\n if (getArgs) {\n eventProps[eventName] = (function (event) {\n return eventHandler(event, getArgs(eventName));\n });\n }\n else {\n eventProps[eventName] = eventHandler;\n }\n });\n return eventProps;\n}\n","export default function makeCancellablePromise(promise) {\n var isCancelled = false;\n var wrappedPromise = new Promise(function (resolve, reject) {\n promise\n .then(function (value) { return !isCancelled && resolve(value); })\n .catch(function (error) { return !isCancelled && reject(error); });\n });\n return {\n promise: wrappedPromise,\n cancel: function () {\n isCancelled = true;\n },\n };\n}\n","function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e))for(t=0;t {\n invariant(this.pdfDocument, 'PDF document not loaded.');\n invariant(dest, 'Destination is not specified.');\n if (typeof dest === 'string') {\n this.pdfDocument.getDestination(dest).then(resolve);\n }\n else if (Array.isArray(dest)) {\n resolve(dest);\n }\n else {\n dest.then(resolve);\n }\n }).then((explicitDest) => {\n invariant(Array.isArray(explicitDest), `\"${explicitDest}\" is not a valid destination array.`);\n const destRef = explicitDest[0];\n new Promise((resolve) => {\n invariant(this.pdfDocument, 'PDF document not loaded.');\n if (destRef instanceof Object) {\n this.pdfDocument\n .getPageIndex(destRef)\n .then((pageIndex) => {\n resolve(pageIndex);\n })\n .catch(() => {\n invariant(false, `\"${destRef}\" is not a valid page reference.`);\n });\n }\n else if (typeof destRef === 'number') {\n resolve(destRef);\n }\n else {\n invariant(false, `\"${destRef}\" is not a valid destination reference.`);\n }\n }).then((pageIndex) => {\n const pageNumber = pageIndex + 1;\n invariant(this.pdfViewer, 'PDF viewer is not initialized.');\n invariant(pageNumber >= 1 && pageNumber <= this.pagesCount, `\"${pageNumber}\" is not a valid page number.`);\n this.pdfViewer.scrollPageIntoView({\n dest: explicitDest,\n pageIndex,\n pageNumber,\n });\n });\n });\n }\n navigateTo(dest) {\n this.goToDestination(dest);\n }\n goToPage(pageNumber) {\n const pageIndex = pageNumber - 1;\n invariant(this.pdfViewer, 'PDF viewer is not initialized.');\n invariant(pageNumber >= 1 && pageNumber <= this.pagesCount, `\"${pageNumber}\" is not a valid page number.`);\n this.pdfViewer.scrollPageIntoView({\n pageIndex,\n pageNumber,\n });\n }\n addLinkAttributes(link, url, newWindow) {\n link.href = url;\n link.rel = this.externalLinkRel || DEFAULT_LINK_REL;\n link.target = newWindow ? '_blank' : this.externalLinkTarget || '';\n }\n getDestinationHash() {\n return '#';\n }\n getAnchorUrl() {\n return '#';\n }\n setHash() {\n // Intentionally empty\n }\n executeNamedAction() {\n // Intentionally empty\n }\n cachePageRef() {\n // Intentionally empty\n }\n isPageVisible() {\n return true;\n }\n isPageCached() {\n return true;\n }\n executeSetOCGState() {\n // Intentionally empty\n }\n}\n","// As defined in https://github.com/mozilla/pdf.js/blob/d9fac3459609a807be6506fb3441b5da4b154d14/src/shared/util.js#L371-L374\nconst PasswordResponses = {\n NEED_PASSWORD: 1,\n INCORRECT_PASSWORD: 2,\n};\nexport default PasswordResponses;\n","import invariant from 'tiny-invariant';\nimport warning from 'tiny-warning';\n/**\n * Checks if we're running in a browser environment.\n */\nexport const isBrowser = typeof document !== 'undefined';\n/**\n * Checks whether we're running from a local file system.\n */\nexport const isLocalFileSystem = isBrowser && window.location.protocol === 'file:';\n/**\n * Checks whether a variable is defined.\n *\n * @param {*} variable Variable to check\n */\nexport function isDefined(variable) {\n return typeof variable !== 'undefined';\n}\n/**\n * Checks whether a variable is defined and not null.\n *\n * @param {*} variable Variable to check\n */\nexport function isProvided(variable) {\n return isDefined(variable) && variable !== null;\n}\n/**\n * Checks whether a variable provided is a string.\n *\n * @param {*} variable Variable to check\n */\nexport function isString(variable) {\n return typeof variable === 'string';\n}\n/**\n * Checks whether a variable provided is an ArrayBuffer.\n *\n * @param {*} variable Variable to check\n */\nexport function isArrayBuffer(variable) {\n return variable instanceof ArrayBuffer;\n}\n/**\n * Checks whether a variable provided is a Blob.\n *\n * @param {*} variable Variable to check\n */\nexport function isBlob(variable) {\n invariant(isBrowser, 'isBlob can only be used in a browser environment');\n return variable instanceof Blob;\n}\n/**\n * Checks whether a variable provided is a data URI.\n *\n * @param {*} variable String to check\n */\nexport function isDataURI(variable) {\n return isString(variable) && /^data:/.test(variable);\n}\nexport function dataURItoByteString(dataURI) {\n invariant(isDataURI(dataURI), 'Invalid data URI.');\n const [headersString = '', dataString = ''] = dataURI.split(',');\n const headers = headersString.split(';');\n if (headers.indexOf('base64') !== -1) {\n return atob(dataString);\n }\n return unescape(dataString);\n}\nexport function getDevicePixelRatio() {\n return (isBrowser && window.devicePixelRatio) || 1;\n}\nconst allowFileAccessFromFilesTip = 'On Chromium based browsers, you can use --allow-file-access-from-files flag for debugging purposes.';\nexport function displayCORSWarning() {\n warning(!isLocalFileSystem, `Loading PDF as base64 strings/URLs may not work on protocols other than HTTP/HTTPS. ${allowFileAccessFromFilesTip}`);\n}\nexport function displayWorkerWarning() {\n warning(!isLocalFileSystem, `Loading PDF.js worker may not work on protocols other than HTTP/HTTPS. ${allowFileAccessFromFilesTip}`);\n}\nexport function cancelRunningTask(runningTask) {\n if (runningTask && runningTask.cancel)\n runningTask.cancel();\n}\nexport function makePageCallback(page, scale) {\n Object.defineProperty(page, 'width', {\n get() {\n return this.view[2] * scale;\n },\n configurable: true,\n });\n Object.defineProperty(page, 'height', {\n get() {\n return this.view[3] * scale;\n },\n configurable: true,\n });\n Object.defineProperty(page, 'originalWidth', {\n get() {\n return this.view[2];\n },\n configurable: true,\n });\n Object.defineProperty(page, 'originalHeight', {\n get() {\n return this.view[3];\n },\n configurable: true,\n });\n return page;\n}\nexport function isCancelException(error) {\n return error.name === 'RenderingCancelledException';\n}\nexport function loadFromFile(file) {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.onload = () => {\n if (!reader.result) {\n return reject(new Error('Error while reading a file.'));\n }\n resolve(reader.result);\n };\n reader.onerror = (event) => {\n if (!event.target) {\n return reject(new Error('Error while reading a file.'));\n }\n const { error } = event.target;\n if (!error) {\n return reject(new Error('Error while reading a file.'));\n }\n switch (error.code) {\n case error.NOT_FOUND_ERR:\n return reject(new Error('Error while reading a file: File not found.'));\n case error.SECURITY_ERR:\n return reject(new Error('Error while reading a file: Security error.'));\n case error.ABORT_ERR:\n return reject(new Error('Error while reading a file: Aborted.'));\n default:\n return reject(new Error('Error while reading a file.'));\n }\n };\n reader.readAsArrayBuffer(file);\n });\n}\n","import { useReducer } from 'react';\nfunction reducer(state, action) {\n switch (action.type) {\n case 'RESOLVE':\n return { value: action.value, error: undefined };\n case 'REJECT':\n return { value: false, error: action.error };\n case 'RESET':\n return { value: undefined, error: undefined };\n default:\n return state;\n }\n}\nexport default function useResolver() {\n return useReducer((reducer), { value: undefined, error: undefined });\n}\n","import PropTypes from 'prop-types';\nimport { allEvents } from 'make-event-props';\nimport { PDFDataRangeTransport } from 'pdfjs-dist';\nimport { isDefined } from './utils';\nimport LinkService from '../LinkService';\nexport const eventProps = (() => {\n const result = {};\n allEvents.forEach((eventName) => {\n result[eventName] = PropTypes.func;\n });\n return result;\n})();\nconst isTypedArray = PropTypes.oneOfType([\n PropTypes.instanceOf(Int8Array),\n PropTypes.instanceOf(Uint8Array),\n PropTypes.instanceOf(Uint8ClampedArray),\n PropTypes.instanceOf(Int16Array),\n PropTypes.instanceOf(Uint16Array),\n PropTypes.instanceOf(Int32Array),\n PropTypes.instanceOf(Uint32Array),\n PropTypes.instanceOf(Float32Array),\n PropTypes.instanceOf(Float64Array),\n]);\nconst fileTypes = [\n PropTypes.string,\n PropTypes.instanceOf(ArrayBuffer),\n PropTypes.shape({\n data: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.instanceOf(ArrayBuffer),\n PropTypes.arrayOf(PropTypes.number.isRequired),\n isTypedArray,\n ]).isRequired,\n }),\n PropTypes.shape({\n range: PropTypes.instanceOf(PDFDataRangeTransport).isRequired,\n }),\n PropTypes.shape({\n url: PropTypes.string.isRequired,\n }),\n];\nif (typeof Blob !== 'undefined') {\n fileTypes.push(PropTypes.instanceOf(Blob));\n}\nexport const isClassName = PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.arrayOf(PropTypes.string),\n]);\nexport const isFile = PropTypes.oneOfType(fileTypes);\nexport const isLinkService = PropTypes.instanceOf(LinkService);\nexport const isLinkTarget = PropTypes.oneOf(['_self', '_blank', '_parent', '_top']);\nexport const isPage = PropTypes.shape({\n commonObjs: PropTypes.shape({}).isRequired,\n getAnnotations: PropTypes.func.isRequired,\n getTextContent: PropTypes.func.isRequired,\n getViewport: PropTypes.func.isRequired,\n render: PropTypes.func.isRequired,\n});\nexport const isPageIndex = function isPageIndex(props, propName, componentName) {\n const { [propName]: pageIndex, pageNumber, pdf } = props;\n if (!isDefined(pdf)) {\n return null;\n }\n if (isDefined(pageIndex)) {\n if (typeof pageIndex !== 'number') {\n return new Error(`\\`${propName}\\` of type \\`${typeof pageIndex}\\` supplied to \\`${componentName}\\`, expected \\`number\\`.`);\n }\n if (pageIndex < 0) {\n return new Error(`Expected \\`${propName}\\` to be greater or equal to 0.`);\n }\n const { numPages } = pdf;\n if (pageIndex + 1 > numPages) {\n return new Error(`Expected \\`${propName}\\` to be less or equal to ${numPages - 1}.`);\n }\n }\n else if (!isDefined(pageNumber)) {\n return new Error(`\\`${propName}\\` not supplied. Either pageIndex or pageNumber must be supplied to \\`${componentName}\\`.`);\n }\n // Everything is fine\n return null;\n};\nexport const isPageNumber = function isPageNumber(props, propName, componentName) {\n const { [propName]: pageNumber, pageIndex, pdf } = props;\n if (!isDefined(pdf)) {\n return null;\n }\n if (isDefined(pageNumber)) {\n if (typeof pageNumber !== 'number') {\n return new Error(`\\`${propName}\\` of type \\`${typeof pageNumber}\\` supplied to \\`${componentName}\\`, expected \\`number\\`.`);\n }\n if (pageNumber < 1) {\n return new Error(`Expected \\`${propName}\\` to be greater or equal to 1.`);\n }\n const { numPages } = pdf;\n if (pageNumber > numPages) {\n return new Error(`Expected \\`${propName}\\` to be less or equal to ${numPages}.`);\n }\n }\n else if (!isDefined(pageIndex)) {\n return new Error(`\\`${propName}\\` not supplied. Either pageIndex or pageNumber must be supplied to \\`${componentName}\\`.`);\n }\n // Everything is fine\n return null;\n};\nexport const isPdf = PropTypes.oneOfType([\n PropTypes.shape({\n getDestination: PropTypes.func.isRequired,\n getOutline: PropTypes.func.isRequired,\n getPage: PropTypes.func.isRequired,\n numPages: PropTypes.number.isRequired,\n }),\n PropTypes.bool,\n]);\nexport const isRef = PropTypes.oneOfType([\n PropTypes.func,\n PropTypes.exact({\n current: PropTypes.any,\n }),\n]);\nexport const isRenderMode = PropTypes.oneOf(['canvas', 'none', 'svg']);\nexport const isRotate = PropTypes.oneOf([0, 90, 180, 270]);\n","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\n/**\n * Loads a PDF document. Passes it to all children.\n */\nimport React, { forwardRef, useCallback, useEffect, useImperativeHandle, useMemo, useRef, } from 'react';\nimport PropTypes from 'prop-types';\nimport makeEventProps from 'make-event-props';\nimport makeCancellable from 'make-cancellable-promise';\nimport clsx from 'clsx';\nimport invariant from 'tiny-invariant';\nimport warning from 'tiny-warning';\nimport * as pdfjs from 'pdfjs-dist';\nimport DocumentContext from './DocumentContext';\nimport Message from './Message';\nimport LinkService from './LinkService';\nimport PasswordResponses from './PasswordResponses';\nimport { cancelRunningTask, dataURItoByteString, displayCORSWarning, isArrayBuffer, isBlob, isBrowser, isDataURI, loadFromFile, } from './shared/utils';\nimport useResolver from './shared/hooks/useResolver';\nimport { eventProps, isClassName, isFile, isRef } from './shared/propTypes';\nconst { PDFDataRangeTransport } = pdfjs;\nconst defaultOnPassword = (callback, reason) => {\n switch (reason) {\n case PasswordResponses.NEED_PASSWORD: {\n // eslint-disable-next-line no-alert\n const password = prompt('Enter the password to open this PDF file.');\n callback(password);\n break;\n }\n case PasswordResponses.INCORRECT_PASSWORD: {\n // eslint-disable-next-line no-alert\n const password = prompt('Invalid password. Please try again.');\n callback(password);\n break;\n }\n default:\n }\n};\nconst Document = forwardRef(function Document(_a, ref) {\n var { children, className, error = 'Failed to load PDF file.', externalLinkRel, externalLinkTarget, file, inputRef, imageResourcesPath, loading = 'Loading PDF…', noData = 'No PDF file specified.', onItemClick, onLoadError: onLoadErrorProps, onLoadProgress, onLoadSuccess: onLoadSuccessProps, onPassword = defaultOnPassword, onSourceError: onSourceErrorProps, onSourceSuccess: onSourceSuccessProps, options, renderMode, rotate } = _a, otherProps = __rest(_a, [\"children\", \"className\", \"error\", \"externalLinkRel\", \"externalLinkTarget\", \"file\", \"inputRef\", \"imageResourcesPath\", \"loading\", \"noData\", \"onItemClick\", \"onLoadError\", \"onLoadProgress\", \"onLoadSuccess\", \"onPassword\", \"onSourceError\", \"onSourceSuccess\", \"options\", \"renderMode\", \"rotate\"]);\n const [sourceState, sourceDispatch] = useResolver();\n const { value: source, error: sourceError } = sourceState;\n const [pdfState, pdfDispatch] = useResolver();\n const { value: pdf, error: pdfError } = pdfState;\n const linkService = useRef(new LinkService());\n const pages = useRef([]);\n const viewer = useRef({\n // Handling jumping to internal links target\n scrollPageIntoView: (args) => {\n const { dest, pageNumber, pageIndex = pageNumber - 1 } = args;\n // First, check if custom handling of onItemClick was provided\n if (onItemClick) {\n onItemClick({ dest, pageIndex, pageNumber });\n return;\n }\n // If not, try to look for target page within the .\n const page = pages.current[pageIndex];\n if (page) {\n // Scroll to the page automatically\n page.scrollIntoView();\n return;\n }\n warning(false, `An internal link leading to page ${pageNumber} was clicked, but neither was provided with onItemClick nor it was able to find the page within itself. Either provide onItemClick to and handle navigating by yourself or ensure that all pages are rendered within .`);\n },\n });\n useImperativeHandle(ref, () => ({\n linkService,\n pages,\n viewer,\n }), []);\n /**\n * Called when a document source is resolved correctly\n */\n function onSourceSuccess() {\n if (onSourceSuccessProps) {\n onSourceSuccessProps();\n }\n }\n /**\n * Called when a document source failed to be resolved correctly\n */\n function onSourceError() {\n if (!sourceError) {\n // Impossible, but TypeScript doesn't know that\n return;\n }\n warning(false, sourceError.toString());\n if (onSourceErrorProps) {\n onSourceErrorProps(sourceError);\n }\n }\n function resetSource() {\n sourceDispatch({ type: 'RESET' });\n }\n useEffect(resetSource, [file, sourceDispatch]);\n const findDocumentSource = useCallback(() => __awaiter(this, void 0, void 0, function* () {\n if (!file) {\n return null;\n }\n // File is a string\n if (typeof file === 'string') {\n if (isDataURI(file)) {\n const fileByteString = dataURItoByteString(file);\n return { data: fileByteString };\n }\n displayCORSWarning();\n return { url: file };\n }\n // File is PDFDataRangeTransport\n if (file instanceof PDFDataRangeTransport) {\n return { range: file };\n }\n // File is an ArrayBuffer\n if (isArrayBuffer(file)) {\n return { data: file };\n }\n /**\n * The cases below are browser-only.\n * If you're running on a non-browser environment, these cases will be of no use.\n */\n if (isBrowser) {\n // File is a Blob\n if (isBlob(file)) {\n const data = yield loadFromFile(file);\n return { data };\n }\n }\n // At this point, file must be an object\n invariant(typeof file === 'object', 'Invalid parameter in file, need either Uint8Array, string or a parameter object');\n invariant('data' in file || 'range' in file || 'url' in file, 'Invalid parameter object: need either .data, .range or .url');\n // File .url is a string\n if ('url' in file && typeof file.url === 'string') {\n if (isDataURI(file.url)) {\n const { url } = file, otherParams = __rest(file, [\"url\"]);\n const fileByteString = dataURItoByteString(url);\n return Object.assign({ data: fileByteString }, otherParams);\n }\n displayCORSWarning();\n }\n return file;\n }), [file]);\n useEffect(() => {\n const cancellable = makeCancellable(findDocumentSource());\n cancellable.promise\n .then((nextSource) => {\n sourceDispatch({ type: 'RESOLVE', value: nextSource });\n })\n .catch((error) => {\n sourceDispatch({ type: 'REJECT', error });\n });\n return () => {\n cancelRunningTask(cancellable);\n };\n }, [findDocumentSource, sourceDispatch]);\n useEffect(() => {\n if (typeof source === 'undefined') {\n return;\n }\n if (source === false) {\n onSourceError();\n return;\n }\n onSourceSuccess();\n }, \n // Ommitted callbacks so they are not called every time they change\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [source]);\n /**\n * Called when a document is read successfully\n */\n function onLoadSuccess() {\n if (!pdf) {\n // Impossible, but TypeScript doesn't know that\n return;\n }\n if (onLoadSuccessProps) {\n onLoadSuccessProps(pdf);\n }\n pages.current = new Array(pdf.numPages);\n linkService.current.setDocument(pdf);\n }\n /**\n * Called when a document failed to read successfully\n */\n function onLoadError() {\n if (!pdfError) {\n // Impossible, but TypeScript doesn't know that\n return;\n }\n warning(false, pdfError.toString());\n if (onLoadErrorProps) {\n onLoadErrorProps(pdfError);\n }\n }\n function resetDocument() {\n pdfDispatch({ type: 'RESET' });\n }\n useEffect(resetDocument, [pdfDispatch, source]);\n function loadDocument() {\n if (!source) {\n return;\n }\n const documentInitParams = options\n ? Object.assign(Object.assign({}, source), options) : source;\n const destroyable = pdfjs.getDocument(documentInitParams);\n if (onLoadProgress) {\n destroyable.onProgress = onLoadProgress;\n }\n if (onPassword) {\n destroyable.onPassword = onPassword;\n }\n const loadingTask = destroyable;\n loadingTask.promise\n .then((nextPdf) => {\n pdfDispatch({ type: 'RESOLVE', value: nextPdf });\n })\n .catch((error) => {\n if (loadingTask.destroyed) {\n return;\n }\n pdfDispatch({ type: 'REJECT', error });\n });\n return () => {\n loadingTask.destroy();\n };\n }\n useEffect(loadDocument, \n // Ommitted callbacks so they are not called every time they change\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [options, pdfDispatch, source]);\n useEffect(() => {\n if (typeof pdf === 'undefined') {\n return;\n }\n if (pdf === false) {\n onLoadError();\n return;\n }\n onLoadSuccess();\n }, \n // Ommitted callbacks so they are not called every time they change\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [pdf]);\n function setupLinkService() {\n linkService.current.setViewer(viewer.current);\n linkService.current.setExternalLinkRel(externalLinkRel);\n linkService.current.setExternalLinkTarget(externalLinkTarget);\n }\n useEffect(setupLinkService, [externalLinkRel, externalLinkTarget]);\n function registerPage(pageIndex, ref) {\n pages.current[pageIndex] = ref;\n }\n function unregisterPage(pageIndex) {\n delete pages.current[pageIndex];\n }\n const childContext = useMemo(() => ({\n imageResourcesPath,\n linkService: linkService.current,\n onItemClick,\n pdf,\n registerPage,\n renderMode,\n rotate,\n unregisterPage,\n }), [imageResourcesPath, onItemClick, pdf, renderMode, rotate]);\n const eventProps = useMemo(() => makeEventProps(otherProps, () => pdf), [otherProps, pdf]);\n function renderChildren() {\n return React.createElement(DocumentContext.Provider, { value: childContext }, children);\n }\n function renderContent() {\n if (!file) {\n return React.createElement(Message, { type: \"no-data\" }, typeof noData === 'function' ? noData() : noData);\n }\n if (pdf === undefined || pdf === null) {\n return (React.createElement(Message, { type: \"loading\" }, typeof loading === 'function' ? loading() : loading));\n }\n if (pdf === false) {\n return React.createElement(Message, { type: \"error\" }, typeof error === 'function' ? error() : error);\n }\n return renderChildren();\n }\n return (React.createElement(\"div\", Object.assign({ className: clsx('react-pdf__Document', className), ref: inputRef, style: {\n ['--scale-factor']: '1',\n } }, eventProps), renderContent()));\n});\nconst isFunctionOrNode = PropTypes.oneOfType([PropTypes.func, PropTypes.node]);\nDocument.propTypes = Object.assign(Object.assign({}, eventProps), { children: PropTypes.node, className: isClassName, error: isFunctionOrNode, externalLinkRel: PropTypes.string, externalLinkTarget: PropTypes.oneOf(['_self', '_blank', '_parent', '_top']), file: isFile, imageResourcesPath: PropTypes.string, inputRef: isRef, loading: isFunctionOrNode, noData: isFunctionOrNode, onItemClick: PropTypes.func, onLoadError: PropTypes.func, onLoadProgress: PropTypes.func, onLoadSuccess: PropTypes.func, onPassword: PropTypes.func, onSourceError: PropTypes.func, onSourceSuccess: PropTypes.func, options: PropTypes.shape({\n canvasFactory: PropTypes.any,\n canvasMaxAreaInBytes: PropTypes.number,\n cMapPacked: PropTypes.bool,\n CMapReaderFactory: PropTypes.any,\n cMapUrl: PropTypes.string,\n disableAutoFetch: PropTypes.bool,\n disableFontFace: PropTypes.bool,\n disableRange: PropTypes.bool,\n disableStream: PropTypes.bool,\n docBaseUrl: PropTypes.string,\n enableXfa: PropTypes.bool,\n filterFactory: PropTypes.any,\n fontExtraProperties: PropTypes.bool,\n httpHeaders: PropTypes.object,\n isEvalSupported: PropTypes.bool,\n isOffscreenCanvasSupported: PropTypes.bool,\n length: PropTypes.number,\n maxImageSize: PropTypes.number,\n ownerDocument: PropTypes.any,\n password: PropTypes.string,\n pdfBug: PropTypes.bool,\n rangeChunkSize: PropTypes.number,\n StandardFontDataFactory: PropTypes.any,\n standardFontDataUrl: PropTypes.string,\n stopAtErrors: PropTypes.bool,\n useSystemFonts: PropTypes.bool,\n useWorkerFetch: PropTypes.bool,\n verbosity: PropTypes.number,\n withCredentials: PropTypes.bool,\n worker: PropTypes.any,\n }), rotate: PropTypes.number });\nexport default Document;\n","import { createContext } from 'react';\nexport default createContext(null);\n","export default class Ref {\n constructor({ num, gen }) {\n this.num = num;\n this.gen = gen;\n }\n toString() {\n let str = `${this.num}R`;\n if (this.gen !== 0) {\n str += this.gen;\n }\n return str;\n }\n}\n","import { useRef } from 'react';\nimport { isDefined } from '../utils';\nexport default function useCachedValue(getter) {\n const ref = useRef();\n const currentValue = ref.current;\n if (isDefined(currentValue)) {\n return () => currentValue;\n }\n return () => {\n const value = getter();\n ref.current = value;\n return value;\n };\n}\n","import { useContext } from 'react';\nimport DocumentContext from '../../DocumentContext';\nexport default function useDocumentContext() {\n return useContext(DocumentContext);\n}\n","import { useContext } from 'react';\nimport OutlineContext from '../../OutlineContext';\nexport default function useOutlineContext() {\n return useContext(OutlineContext);\n}\n","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport invariant from 'tiny-invariant';\nimport Ref from './Ref';\nimport useCachedValue from './shared/hooks/useCachedValue';\nimport useDocumentContext from './shared/hooks/useDocumentContext';\nimport useOutlineContext from './shared/hooks/useOutlineContext';\nexport default function OutlineItem(props) {\n const documentContext = useDocumentContext();\n invariant(documentContext, 'Unable to find Document context. Did you wrap in ?');\n const outlineContext = useOutlineContext();\n invariant(outlineContext, 'Unable to find Outline context.');\n const mergedProps = Object.assign(Object.assign(Object.assign({}, documentContext), outlineContext), props);\n const { item, linkService, onItemClick, pdf } = mergedProps, otherProps = __rest(mergedProps, [\"item\", \"linkService\", \"onItemClick\", \"pdf\"]);\n invariant(pdf, 'Attempted to load an outline, but no document was specified.');\n const getDestination = useCachedValue(() => {\n if (typeof item.dest === 'string') {\n return pdf.getDestination(item.dest);\n }\n return item.dest;\n });\n const getPageIndex = useCachedValue(() => __awaiter(this, void 0, void 0, function* () {\n const destination = yield getDestination();\n if (!destination) {\n throw new Error('Destination not found.');\n }\n const [ref] = destination;\n return pdf.getPageIndex(new Ref(ref));\n }));\n const getPageNumber = useCachedValue(() => __awaiter(this, void 0, void 0, function* () {\n const pageIndex = yield getPageIndex();\n return pageIndex + 1;\n }));\n function onClick(event) {\n event.preventDefault();\n if (onItemClick) {\n Promise.all([getDestination(), getPageIndex(), getPageNumber()]).then(([dest, pageIndex, pageNumber]) => {\n onItemClick({\n dest,\n pageIndex,\n pageNumber,\n });\n });\n }\n else {\n linkService.goToDestination(item.dest);\n }\n }\n function renderSubitems() {\n if (!item.items || !item.items.length) {\n return null;\n }\n const { items: subitems } = item;\n return (React.createElement(\"ul\", null, subitems.map((subitem, subitemIndex) => (React.createElement(OutlineItem, Object.assign({ key: typeof subitem.dest === 'string' ? subitem.dest : subitemIndex, item: subitem }, otherProps))))));\n }\n return (React.createElement(\"li\", null,\n React.createElement(\"a\", { href: \"#\", onClick: onClick }, item.title),\n renderSubitems()));\n}\nconst isDestination = PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.any)]);\nOutlineItem.propTypes = {\n item: PropTypes.shape({\n dest: isDestination,\n items: PropTypes.arrayOf(PropTypes.shape({\n dest: isDestination,\n title: PropTypes.string,\n })),\n title: PropTypes.string,\n }).isRequired,\n};\n","var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport React, { useEffect, useMemo } from 'react';\nimport PropTypes from 'prop-types';\nimport makeCancellable from 'make-cancellable-promise';\nimport makeEventProps from 'make-event-props';\nimport clsx from 'clsx';\nimport invariant from 'tiny-invariant';\nimport warning from 'tiny-warning';\nimport OutlineContext from './OutlineContext';\nimport OutlineItem from './OutlineItem';\nimport { cancelRunningTask } from './shared/utils';\nimport useDocumentContext from './shared/hooks/useDocumentContext';\nimport useResolver from './shared/hooks/useResolver';\nimport { eventProps, isClassName, isPdf, isRef } from './shared/propTypes';\nexport default function Outline(props) {\n const documentContext = useDocumentContext();\n invariant(documentContext, 'Unable to find Document context. Did you wrap in ?');\n const mergedProps = Object.assign(Object.assign({}, documentContext), props);\n const { className, inputRef, onItemClick, onLoadError: onLoadErrorProps, onLoadSuccess: onLoadSuccessProps, pdf } = mergedProps, otherProps = __rest(mergedProps, [\"className\", \"inputRef\", \"onItemClick\", \"onLoadError\", \"onLoadSuccess\", \"pdf\"]);\n invariant(pdf, 'Attempted to load an outline, but no document was specified.');\n const [outlineState, outlineDispatch] = useResolver();\n const { value: outline, error: outlineError } = outlineState;\n /**\n * Called when an outline is read successfully\n */\n function onLoadSuccess() {\n if (typeof outline === 'undefined' || outline === false) {\n return;\n }\n if (onLoadSuccessProps) {\n onLoadSuccessProps(outline);\n }\n }\n /**\n * Called when an outline failed to read successfully\n */\n function onLoadError() {\n if (!outlineError) {\n // Impossible, but TypeScript doesn't know that\n return;\n }\n warning(false, outlineError.toString());\n if (onLoadErrorProps) {\n onLoadErrorProps(outlineError);\n }\n }\n function resetOutline() {\n outlineDispatch({ type: 'RESET' });\n }\n useEffect(resetOutline, [outlineDispatch, pdf]);\n function loadOutline() {\n if (!pdf) {\n // Impossible, but TypeScript doesn't know that\n return;\n }\n const cancellable = makeCancellable(pdf.getOutline());\n const runningTask = cancellable;\n cancellable.promise\n .then((nextOutline) => {\n outlineDispatch({ type: 'RESOLVE', value: nextOutline });\n })\n .catch((error) => {\n outlineDispatch({ type: 'REJECT', error });\n });\n return () => cancelRunningTask(runningTask);\n }\n useEffect(loadOutline, [outlineDispatch, pdf]);\n useEffect(() => {\n if (outline === undefined) {\n return;\n }\n if (outline === false) {\n onLoadError();\n return;\n }\n onLoadSuccess();\n }, \n // Ommitted callbacks so they are not called every time they change\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [outline]);\n const childContext = useMemo(() => ({\n onItemClick,\n }), [onItemClick]);\n const eventProps = useMemo(() => makeEventProps(otherProps, () => outline), [otherProps, outline]);\n if (!outline) {\n return null;\n }\n function renderOutline() {\n if (!outline) {\n return null;\n }\n return (React.createElement(\"ul\", null, outline.map((item, itemIndex) => (React.createElement(OutlineItem, { key: typeof item.dest === 'string' ? item.dest : itemIndex, item: item })))));\n }\n return (React.createElement(\"div\", Object.assign({ className: clsx('react-pdf__Outline', className), ref: inputRef }, eventProps),\n React.createElement(OutlineContext.Provider, { value: childContext }, renderOutline())));\n}\nOutline.propTypes = Object.assign(Object.assign({}, eventProps), { className: isClassName, inputRef: isRef, onItemClick: PropTypes.func, onLoadError: PropTypes.func, onLoadSuccess: PropTypes.func, pdf: isPdf });\n","/**\n * A function that merges React refs into one.\n * Supports both functions and ref objects created using createRef() and useRef().\n *\n * Usage:\n * ```tsx\n *
\n * ```\n *\n * @param {(React.Ref | undefined)[]} inputRefs Array of refs\n * @returns {React.Ref | React.RefCallback} Merged refs\n */\nexport default function mergeRefs() {\n var inputRefs = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n inputRefs[_i] = arguments[_i];\n }\n var filteredInputRefs = inputRefs.filter(Boolean);\n if (filteredInputRefs.length <= 1) {\n var firstRef = filteredInputRefs[0];\n return firstRef || null;\n }\n return function mergedRefs(ref) {\n filteredInputRefs.forEach(function (inputRef) {\n if (typeof inputRef === 'function') {\n inputRef(ref);\n }\n else if (inputRef) {\n inputRef.current = ref;\n }\n });\n };\n}\n","import { createContext } from 'react';\nexport default createContext(null);\n","// From pdfjs-dist/lib/web/struct_tree_layer_builder.js\nexport const PDF_ROLE_TO_HTML_ROLE = {\n // Document level structure types\n Document: null,\n DocumentFragment: null,\n // Grouping level structure types\n Part: 'group',\n Sect: 'group',\n Div: 'group',\n Aside: 'note',\n NonStruct: 'none',\n // Block level structure types\n P: null,\n // H,\n H: 'heading',\n Title: null,\n FENote: 'note',\n // Sub-block level structure type\n Sub: 'group',\n // General inline level structure types\n Lbl: null,\n Span: null,\n Em: null,\n Strong: null,\n Link: 'link',\n Annot: 'note',\n Form: 'form',\n // Ruby and Warichu structure types\n Ruby: null,\n RB: null,\n RT: null,\n RP: null,\n Warichu: null,\n WT: null,\n WP: null,\n // List standard structure types\n L: 'list',\n LI: 'listitem',\n LBody: null,\n // Table standard structure types\n Table: 'table',\n TR: 'row',\n TH: 'columnheader',\n TD: 'cell',\n THead: 'columnheader',\n TBody: null,\n TFoot: null,\n // Standard structure type Caption\n Caption: null,\n // Standard structure type Figure\n Figure: 'figure',\n // Standard structure type Formula\n Formula: null,\n // standard structure type Artifact\n Artifact: null,\n};\nexport const HEADING_PATTERN = /^H(\\d+)$/;\n","import { HEADING_PATTERN, PDF_ROLE_TO_HTML_ROLE } from './constants';\nexport function isPdfRole(role) {\n return role in PDF_ROLE_TO_HTML_ROLE;\n}\nexport function isStructTreeNode(node) {\n return 'children' in node;\n}\nexport function isStructTreeNodeWithOnlyContentChild(node) {\n if (!isStructTreeNode(node)) {\n return false;\n }\n return node.children.length === 1 && 0 in node.children && 'id' in node.children[0];\n}\nexport function getRoleAttributes(node) {\n const attributes = {};\n if (isStructTreeNode(node)) {\n const { role } = node;\n const matches = role.match(HEADING_PATTERN);\n if (matches) {\n attributes.role = 'heading';\n attributes['aria-level'] = Number(matches[1]);\n }\n else if (isPdfRole(role)) {\n const htmlRole = PDF_ROLE_TO_HTML_ROLE[role];\n if (htmlRole) {\n attributes.role = htmlRole;\n }\n }\n }\n return attributes;\n}\nexport function getBaseAttributes(node) {\n const attributes = {};\n if (isStructTreeNode(node)) {\n if (node.alt !== undefined) {\n attributes['aria-label'] = node.alt;\n }\n if (node.lang !== undefined) {\n attributes.lang = node.lang;\n }\n if (isStructTreeNodeWithOnlyContentChild(node)) {\n const [child] = node.children;\n if (child) {\n const childAttributes = getBaseAttributes(child);\n return Object.assign(Object.assign({}, attributes), childAttributes);\n }\n }\n }\n else {\n if ('id' in node) {\n attributes['aria-owns'] = node.id;\n }\n }\n return attributes;\n}\nexport function getAttributes(node) {\n if (!node) {\n return null;\n }\n return Object.assign(Object.assign({}, getRoleAttributes(node)), getBaseAttributes(node));\n}\n","import React, { useMemo } from 'react';\nimport PropTypes from 'prop-types';\nimport { getAttributes, isStructTreeNode, isStructTreeNodeWithOnlyContentChild, } from './shared/structTreeUtils';\nexport default function StructTreeItem({ className, node }) {\n const attributes = useMemo(() => getAttributes(node), [node]);\n const children = useMemo(() => {\n if (!isStructTreeNode(node)) {\n return null;\n }\n if (isStructTreeNodeWithOnlyContentChild(node)) {\n return null;\n }\n return node.children.map((child, index) => {\n return (\n // eslint-disable-next-line react/no-array-index-key\n React.createElement(StructTreeItem, { key: index, node: child }));\n });\n }, [node]);\n return (React.createElement(\"span\", Object.assign({ className: className }, attributes), children));\n}\nStructTreeItem.propTypes = {\n node: PropTypes.oneOfType([\n PropTypes.shape({\n children: PropTypes.object,\n role: PropTypes.string,\n }),\n PropTypes.shape({\n id: PropTypes.string,\n type: PropTypes.string,\n }),\n ]).isRequired,\n};\n","import { useContext } from 'react';\nimport PageContext from '../../PageContext';\nexport default function usePageContext() {\n return useContext(PageContext);\n}\n","import React, { useEffect } from 'react';\nimport makeCancellable from 'make-cancellable-promise';\nimport invariant from 'tiny-invariant';\nimport warning from 'tiny-warning';\nimport StructTreeItem from './StructTreeItem';\nimport usePageContext from './shared/hooks/usePageContext';\nimport useResolver from './shared/hooks/useResolver';\nimport { cancelRunningTask } from './shared/utils';\nexport default function StructTree() {\n const pageContext = usePageContext();\n invariant(pageContext, 'Unable to find Page context.');\n const { onGetStructTreeError: onGetStructTreeErrorProps, onGetStructTreeSuccess: onGetStructTreeSuccessProps, } = pageContext;\n const [structTreeState, structTreeDispatch] = useResolver();\n const { value: structTree, error: structTreeError } = structTreeState;\n const { customTextRenderer, page } = pageContext;\n function onLoadSuccess() {\n if (!structTree) {\n // Impossible, but TypeScript doesn't know that\n return;\n }\n if (onGetStructTreeSuccessProps) {\n onGetStructTreeSuccessProps(structTree);\n }\n }\n function onLoadError() {\n if (!structTreeError) {\n // Impossible, but TypeScript doesn't know that\n return;\n }\n warning(false, structTreeError.toString());\n if (onGetStructTreeErrorProps) {\n onGetStructTreeErrorProps(structTreeError);\n }\n }\n function resetAnnotations() {\n structTreeDispatch({ type: 'RESET' });\n }\n useEffect(resetAnnotations, [structTreeDispatch, page]);\n function loadStructTree() {\n if (customTextRenderer) {\n // TODO: Document why this is necessary\n return;\n }\n if (!page) {\n return;\n }\n const cancellable = makeCancellable(page.getStructTree());\n const runningTask = cancellable;\n cancellable.promise\n .then((nextStructTree) => {\n structTreeDispatch({ type: 'RESOLVE', value: nextStructTree });\n })\n .catch((error) => {\n structTreeDispatch({ type: 'REJECT', error });\n });\n return () => cancelRunningTask(runningTask);\n }\n useEffect(loadStructTree, [customTextRenderer, page, structTreeDispatch]);\n useEffect(() => {\n if (structTree === undefined) {\n return;\n }\n if (structTree === false) {\n onLoadError();\n return;\n }\n onLoadSuccess();\n }, \n // Ommitted callbacks so they are not called every time they change\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [structTree]);\n if (!structTree) {\n return null;\n }\n return React.createElement(StructTreeItem, { className: \"react-pdf__Page__structTree structTree\", node: structTree });\n}\n","import React, { useCallback, useEffect, useMemo, useRef } from 'react';\nimport mergeRefs from 'merge-refs';\nimport invariant from 'tiny-invariant';\nimport warning from 'tiny-warning';\nimport * as pdfjs from 'pdfjs-dist';\nimport StructTree from '../StructTree';\nimport usePageContext from '../shared/hooks/usePageContext';\nimport { cancelRunningTask, getDevicePixelRatio, isCancelException, makePageCallback, } from '../shared/utils';\nimport { isRef } from '../shared/propTypes';\nconst ANNOTATION_MODE = pdfjs.AnnotationMode;\nexport default function PageCanvas(props) {\n const pageContext = usePageContext();\n invariant(pageContext, 'Unable to find Page context.');\n const mergedProps = Object.assign(Object.assign({}, pageContext), props);\n const { _className, canvasBackground, devicePixelRatio: devicePixelRatioProps, onRenderError: onRenderErrorProps, onRenderSuccess: onRenderSuccessProps, page, renderForms, renderTextLayer, rotate, scale, } = mergedProps;\n const { canvasRef } = props;\n const canvasElement = useRef(null);\n invariant(page, 'Attempted to render page canvas, but no page was specified.');\n const devicePixelRatio = devicePixelRatioProps || getDevicePixelRatio();\n /**\n * Called when a page is rendered successfully.\n */\n function onRenderSuccess() {\n if (!page) {\n // Impossible, but TypeScript doesn't know that\n return;\n }\n if (onRenderSuccessProps) {\n onRenderSuccessProps(makePageCallback(page, scale));\n }\n }\n /**\n * Called when a page fails to render.\n */\n function onRenderError(error) {\n if (isCancelException(error)) {\n return;\n }\n warning(false, error.toString());\n if (onRenderErrorProps) {\n onRenderErrorProps(error);\n }\n }\n const renderViewport = useMemo(() => page.getViewport({ scale: scale * devicePixelRatio, rotation: rotate }), [devicePixelRatio, page, rotate, scale]);\n const viewport = useMemo(() => page.getViewport({ scale, rotation: rotate }), [page, rotate, scale]);\n function drawPageOnCanvas() {\n if (!page) {\n return;\n }\n // Ensures the canvas will be re-rendered from scratch. Otherwise all form data will stay.\n page.cleanup();\n const { current: canvas } = canvasElement;\n if (!canvas) {\n return;\n }\n canvas.width = renderViewport.width;\n canvas.height = renderViewport.height;\n canvas.style.width = `${Math.floor(viewport.width)}px`;\n canvas.style.height = `${Math.floor(viewport.height)}px`;\n canvas.style.visibility = 'hidden';\n const renderContext = {\n annotationMode: renderForms ? ANNOTATION_MODE.ENABLE_FORMS : ANNOTATION_MODE.ENABLE,\n canvasContext: canvas.getContext('2d', { alpha: false }),\n viewport: renderViewport,\n };\n if (canvasBackground) {\n renderContext.background = canvasBackground;\n }\n const cancellable = page.render(renderContext);\n const runningTask = cancellable;\n cancellable.promise\n .then(() => {\n canvas.style.visibility = '';\n onRenderSuccess();\n })\n .catch(onRenderError);\n return () => cancelRunningTask(runningTask);\n }\n useEffect(drawPageOnCanvas, \n // Ommitted callbacks so they are not called every time they change\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [\n canvasBackground,\n canvasElement,\n devicePixelRatio,\n page,\n renderForms,\n renderViewport,\n viewport,\n ]);\n const cleanup = useCallback(() => {\n const { current: canvas } = canvasElement;\n /**\n * Zeroing the width and height cause most browsers to release graphics\n * resources immediately, which can greatly reduce memory consumption.\n */\n if (canvas) {\n canvas.width = 0;\n canvas.height = 0;\n }\n }, [canvasElement]);\n useEffect(() => cleanup, [cleanup]);\n return (React.createElement(\"canvas\", { className: `${_className}__canvas`, dir: \"ltr\", ref: mergeRefs(canvasRef, canvasElement), style: {\n display: 'block',\n userSelect: 'none',\n } }, renderTextLayer ? React.createElement(StructTree, null) : null));\n}\nPageCanvas.propTypes = {\n canvasRef: isRef,\n};\n","import React, { useEffect, useMemo } from 'react';\nimport makeCancellable from 'make-cancellable-promise';\nimport invariant from 'tiny-invariant';\nimport warning from 'tiny-warning';\nimport * as pdfjs from 'pdfjs-dist';\nimport usePageContext from '../shared/hooks/usePageContext';\nimport useResolver from '../shared/hooks/useResolver';\nimport { cancelRunningTask, isCancelException, makePageCallback } from '../shared/utils';\nexport default function PageSVG() {\n const pageContext = usePageContext();\n invariant(pageContext, 'Unable to find Page context.');\n const { _className, onRenderSuccess: onRenderSuccessProps, onRenderError: onRenderErrorProps, page, rotate, scale, } = pageContext;\n const [svgState, svgDispatch] = useResolver();\n const { value: svg, error: svgError } = svgState;\n invariant(page, 'Attempted to render page SVG, but no page was specified.');\n /**\n * Called when a page is rendered successfully\n */\n function onRenderSuccess() {\n if (!page) {\n // Impossible, but TypeScript doesn't know that\n return;\n }\n if (onRenderSuccessProps) {\n onRenderSuccessProps(makePageCallback(page, scale));\n }\n }\n /**\n * Called when a page fails to render\n */\n function onRenderError() {\n if (!svgError) {\n // Impossible, but TypeScript doesn't know that\n return;\n }\n if (isCancelException(svgError)) {\n return;\n }\n warning(false, svgError.toString());\n if (onRenderErrorProps) {\n onRenderErrorProps(svgError);\n }\n }\n const viewport = useMemo(() => page.getViewport({ scale, rotation: rotate }), [page, rotate, scale]);\n function resetSVG() {\n svgDispatch({ type: 'RESET' });\n }\n useEffect(resetSVG, [page, svgDispatch, viewport]);\n function renderSVG() {\n if (!page) {\n return;\n }\n const cancellable = makeCancellable(page.getOperatorList());\n cancellable.promise\n .then((operatorList) => {\n const svgGfx = new pdfjs.SVGGraphics(page.commonObjs, page.objs);\n svgGfx\n .getSVG(operatorList, viewport)\n .then((nextSvg) => {\n svgDispatch({ type: 'RESOLVE', value: nextSvg });\n })\n .catch((error) => {\n svgDispatch({ type: 'REJECT', error });\n });\n })\n .catch((error) => {\n svgDispatch({ type: 'REJECT', error });\n });\n return () => cancelRunningTask(cancellable);\n }\n useEffect(renderSVG, [page, svgDispatch, viewport]);\n useEffect(() => {\n if (svg === undefined) {\n return;\n }\n if (svg === false) {\n onRenderError();\n return;\n }\n onRenderSuccess();\n }, \n // Ommitted callbacks so they are not called every time they change\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [svg]);\n function drawPageOnContainer(element) {\n if (!element || !svg) {\n return;\n }\n // Append SVG element to the main container, if this hasn't been done already\n if (!element.firstElementChild) {\n element.appendChild(svg);\n }\n const { width, height } = viewport;\n svg.setAttribute('width', `${width}`);\n svg.setAttribute('height', `${height}`);\n }\n const { width, height } = viewport;\n return (React.createElement(\"div\", { className: `${_className}__svg`, \n // Note: This cannot be shortened, as we need this function to be called with each render.\n ref: (ref) => drawPageOnContainer(ref), style: {\n display: 'block',\n backgroundColor: 'white',\n overflow: 'hidden',\n width,\n height,\n userSelect: 'none',\n } }));\n}\n","import React, { useCallback, useEffect, useLayoutEffect, useMemo, useRef } from 'react';\nimport makeCancellable from 'make-cancellable-promise';\nimport clsx from 'clsx';\nimport invariant from 'tiny-invariant';\nimport warning from 'tiny-warning';\nimport * as pdfjs from 'pdfjs-dist';\nimport usePageContext from '../shared/hooks/usePageContext';\nimport useResolver from '../shared/hooks/useResolver';\nimport { cancelRunningTask } from '../shared/utils';\nfunction isTextItem(item) {\n return 'str' in item;\n}\nexport default function TextLayer() {\n const pageContext = usePageContext();\n invariant(pageContext, 'Unable to find Page context.');\n const { customTextRenderer, onGetTextError, onGetTextSuccess, onRenderTextLayerError, onRenderTextLayerSuccess, page, pageIndex, pageNumber, rotate, scale, } = pageContext;\n const [textContentState, textContentDispatch] = useResolver();\n const { value: textContent, error: textContentError } = textContentState;\n const layerElement = useRef(null);\n const endElement = useRef();\n invariant(page, 'Attempted to load page text content, but no page was specified.');\n warning(parseInt(window.getComputedStyle(document.body).getPropertyValue('--react-pdf-text-layer'), 10) === 1, 'TextLayer styles not found. Read more: https://github.com/wojtekmaj/react-pdf#support-for-text-layer');\n /**\n * Called when a page text content is read successfully\n */\n function onLoadSuccess() {\n if (!textContent) {\n // Impossible, but TypeScript doesn't know that\n return;\n }\n if (onGetTextSuccess) {\n onGetTextSuccess(textContent);\n }\n }\n /**\n * Called when a page text content failed to read successfully\n */\n function onLoadError() {\n if (!textContentError) {\n // Impossible, but TypeScript doesn't know that\n return;\n }\n warning(false, textContentError.toString());\n if (onGetTextError) {\n onGetTextError(textContentError);\n }\n }\n function resetTextContent() {\n textContentDispatch({ type: 'RESET' });\n }\n useEffect(resetTextContent, [page, textContentDispatch]);\n function loadTextContent() {\n if (!page) {\n return;\n }\n const cancellable = makeCancellable(page.getTextContent());\n const runningTask = cancellable;\n cancellable.promise\n .then((nextTextContent) => {\n textContentDispatch({ type: 'RESOLVE', value: nextTextContent });\n })\n .catch((error) => {\n textContentDispatch({ type: 'REJECT', error });\n });\n return () => cancelRunningTask(runningTask);\n }\n useEffect(loadTextContent, [page, textContentDispatch]);\n useEffect(() => {\n if (textContent === undefined) {\n return;\n }\n if (textContent === false) {\n onLoadError();\n return;\n }\n onLoadSuccess();\n }, \n // Ommitted callbacks so they are not called every time they change\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [textContent]);\n /**\n * Called when a text layer is rendered successfully\n */\n const onRenderSuccess = useCallback(() => {\n if (onRenderTextLayerSuccess) {\n onRenderTextLayerSuccess();\n }\n }, [onRenderTextLayerSuccess]);\n /**\n * Called when a text layer failed to render successfully\n */\n const onRenderError = useCallback((error) => {\n warning(false, error.toString());\n if (onRenderTextLayerError) {\n onRenderTextLayerError(error);\n }\n }, [onRenderTextLayerError]);\n function onMouseDown() {\n const end = endElement.current;\n if (!end) {\n return;\n }\n end.classList.add('active');\n }\n function onMouseUp() {\n const end = endElement.current;\n if (!end) {\n return;\n }\n end.classList.remove('active');\n }\n const viewport = useMemo(() => page.getViewport({ scale, rotation: rotate }), [page, rotate, scale]);\n function renderTextLayer() {\n if (!page || !textContent) {\n return;\n }\n const { current: layer } = layerElement;\n if (!layer) {\n return;\n }\n layer.innerHTML = '';\n const textContentSource = page.streamTextContent({ includeMarkedContent: true });\n const parameters = {\n container: layer,\n textContentSource,\n viewport,\n };\n const cancellable = pdfjs.renderTextLayer(parameters);\n const runningTask = cancellable;\n cancellable.promise\n .then(() => {\n const end = document.createElement('div');\n end.className = 'endOfContent';\n layer.append(end);\n endElement.current = end;\n const hasMarkedContent = Boolean(layer.querySelector('.markedContent'));\n const layerChildren = hasMarkedContent\n ? layer.querySelectorAll('.markedContent > *:not(.markedContent')\n : layer.children;\n if (customTextRenderer) {\n let index = 0;\n textContent.items.forEach((item, itemIndex) => {\n if (!isTextItem(item)) {\n return;\n }\n const child = layerChildren[index];\n if (!child) {\n return;\n }\n const content = customTextRenderer(Object.assign({ pageIndex,\n pageNumber,\n itemIndex }, item));\n child.innerHTML = content;\n index += item.str && item.hasEOL ? 2 : 1;\n });\n }\n // Intentional immediate callback\n onRenderSuccess();\n })\n .catch(onRenderError);\n return () => cancelRunningTask(runningTask);\n }\n useLayoutEffect(renderTextLayer, [\n customTextRenderer,\n onRenderError,\n onRenderSuccess,\n page,\n pageIndex,\n pageNumber,\n textContent,\n viewport,\n ]);\n return (\n // eslint-disable-next-line jsx-a11y/no-static-element-interactions\n React.createElement(\"div\", { className: clsx('react-pdf__Page__textContent', 'textLayer'), onMouseUp: onMouseUp, onMouseDown: onMouseDown, ref: layerElement }));\n}\n","import React, { useEffect, useMemo, useRef } from 'react';\nimport makeCancellable from 'make-cancellable-promise';\nimport clsx from 'clsx';\nimport invariant from 'tiny-invariant';\nimport warning from 'tiny-warning';\nimport * as pdfjs from 'pdfjs-dist';\nimport useDocumentContext from '../shared/hooks/useDocumentContext';\nimport usePageContext from '../shared/hooks/usePageContext';\nimport useResolver from '../shared/hooks/useResolver';\nimport { cancelRunningTask } from '../shared/utils';\nexport default function AnnotationLayer() {\n const documentContext = useDocumentContext();\n invariant(documentContext, 'Unable to find Document context. Did you wrap in ?');\n const pageContext = usePageContext();\n invariant(pageContext, 'Unable to find Page context.');\n const mergedProps = Object.assign(Object.assign({}, documentContext), pageContext);\n const { imageResourcesPath, linkService, onGetAnnotationsError: onGetAnnotationsErrorProps, onGetAnnotationsSuccess: onGetAnnotationsSuccessProps, onRenderAnnotationLayerError: onRenderAnnotationLayerErrorProps, onRenderAnnotationLayerSuccess: onRenderAnnotationLayerSuccessProps, page, pdf, renderForms, rotate, scale = 1, } = mergedProps;\n const [annotationsState, annotationsDispatch] = useResolver();\n const { value: annotations, error: annotationsError } = annotationsState;\n const layerElement = useRef(null);\n invariant(page, 'Attempted to load page annotations, but no page was specified.');\n warning(parseInt(window.getComputedStyle(document.body).getPropertyValue('--react-pdf-annotation-layer'), 10) === 1, 'AnnotationLayer styles not found. Read more: https://github.com/wojtekmaj/react-pdf#support-for-annotations');\n function onLoadSuccess() {\n if (!annotations) {\n // Impossible, but TypeScript doesn't know that\n return;\n }\n if (onGetAnnotationsSuccessProps) {\n onGetAnnotationsSuccessProps(annotations);\n }\n }\n function onLoadError() {\n if (!annotationsError) {\n // Impossible, but TypeScript doesn't know that\n return;\n }\n warning(false, annotationsError.toString());\n if (onGetAnnotationsErrorProps) {\n onGetAnnotationsErrorProps(annotationsError);\n }\n }\n function resetAnnotations() {\n annotationsDispatch({ type: 'RESET' });\n }\n useEffect(resetAnnotations, [annotationsDispatch, page]);\n function loadAnnotations() {\n if (!page) {\n return;\n }\n const cancellable = makeCancellable(page.getAnnotations());\n const runningTask = cancellable;\n cancellable.promise\n .then((nextAnnotations) => {\n annotationsDispatch({ type: 'RESOLVE', value: nextAnnotations });\n })\n .catch((error) => {\n annotationsDispatch({ type: 'REJECT', error });\n });\n return () => {\n cancelRunningTask(runningTask);\n };\n }\n useEffect(loadAnnotations, [annotationsDispatch, page, renderForms]);\n useEffect(() => {\n if (annotations === undefined) {\n return;\n }\n if (annotations === false) {\n onLoadError();\n return;\n }\n onLoadSuccess();\n }, \n // Ommitted callbacks so they are not called every time they change\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [annotations]);\n function onRenderSuccess() {\n if (onRenderAnnotationLayerSuccessProps) {\n onRenderAnnotationLayerSuccessProps();\n }\n }\n function onRenderError(error) {\n warning(false, `${error}`);\n if (onRenderAnnotationLayerErrorProps) {\n onRenderAnnotationLayerErrorProps(error);\n }\n }\n const viewport = useMemo(() => page.getViewport({ scale, rotation: rotate }), [page, rotate, scale]);\n function renderAnnotationLayer() {\n if (!pdf || !page || !annotations) {\n return;\n }\n const { current: layer } = layerElement;\n if (!layer) {\n return;\n }\n const clonedViewport = viewport.clone({ dontFlip: true });\n const parameters = {\n annotations,\n annotationStorage: pdf.annotationStorage,\n div: layer,\n downloadManager: null,\n imageResourcesPath,\n linkService,\n page,\n renderForms,\n viewport: clonedViewport,\n };\n layer.innerHTML = '';\n try {\n pdfjs.AnnotationLayer.render(parameters);\n // Intentional immediate callback\n onRenderSuccess();\n }\n catch (error) {\n onRenderError(error);\n }\n return () => {\n // TODO: Cancel running task?\n };\n }\n useEffect(renderAnnotationLayer, \n // Ommitted callbacks so they are not called every time they change\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [annotations, imageResourcesPath, linkService, page, renderForms, viewport]);\n return (React.createElement(\"div\", { className: clsx('react-pdf__Page__annotations', 'annotationLayer'), ref: layerElement }));\n}\n","var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport React, { useEffect, useMemo, useRef } from 'react';\nimport PropTypes from 'prop-types';\nimport makeCancellable from 'make-cancellable-promise';\nimport makeEventProps from 'make-event-props';\nimport clsx from 'clsx';\nimport mergeRefs from 'merge-refs';\nimport invariant from 'tiny-invariant';\nimport warning from 'tiny-warning';\nimport PageContext from './PageContext';\nimport Message from './Message';\nimport PageCanvas from './Page/PageCanvas';\nimport PageSVG from './Page/PageSVG';\nimport TextLayer from './Page/TextLayer';\nimport AnnotationLayer from './Page/AnnotationLayer';\nimport { cancelRunningTask, isProvided, makePageCallback } from './shared/utils';\nimport useDocumentContext from './shared/hooks/useDocumentContext';\nimport useResolver from './shared/hooks/useResolver';\nimport { eventProps, isClassName, isPageIndex, isPageNumber, isPdf, isRef, isRenderMode, isRotate, } from './shared/propTypes';\nconst defaultScale = 1;\nexport default function Page(props) {\n const documentContext = useDocumentContext();\n invariant(documentContext, 'Unable to find Document context. Did you wrap in ?');\n const mergedProps = Object.assign(Object.assign({}, documentContext), props);\n const { _className = 'react-pdf__Page', _enableRegisterUnregisterPage = true, canvasBackground, canvasRef, children, className, customTextRenderer, devicePixelRatio, error = 'Failed to load the page.', height, inputRef, loading = 'Loading page…', noData = 'No page specified.', onGetAnnotationsError: onGetAnnotationsErrorProps, onGetAnnotationsSuccess: onGetAnnotationsSuccessProps, onGetStructTreeError: onGetStructTreeErrorProps, onGetStructTreeSuccess: onGetStructTreeSuccessProps, onGetTextError: onGetTextErrorProps, onGetTextSuccess: onGetTextSuccessProps, onLoadError: onLoadErrorProps, onLoadSuccess: onLoadSuccessProps, onRenderAnnotationLayerError: onRenderAnnotationLayerErrorProps, onRenderAnnotationLayerSuccess: onRenderAnnotationLayerSuccessProps, onRenderError: onRenderErrorProps, onRenderSuccess: onRenderSuccessProps, onRenderTextLayerError: onRenderTextLayerErrorProps, onRenderTextLayerSuccess: onRenderTextLayerSuccessProps, pageIndex: pageIndexProps, pageNumber: pageNumberProps, pdf, registerPage, renderAnnotationLayer: renderAnnotationLayerProps = true, renderForms = false, renderMode = 'canvas', renderTextLayer: renderTextLayerProps = true, rotate: rotateProps, scale: scaleProps = defaultScale, unregisterPage, width } = mergedProps, otherProps = __rest(mergedProps, [\"_className\", \"_enableRegisterUnregisterPage\", \"canvasBackground\", \"canvasRef\", \"children\", \"className\", \"customTextRenderer\", \"devicePixelRatio\", \"error\", \"height\", \"inputRef\", \"loading\", \"noData\", \"onGetAnnotationsError\", \"onGetAnnotationsSuccess\", \"onGetStructTreeError\", \"onGetStructTreeSuccess\", \"onGetTextError\", \"onGetTextSuccess\", \"onLoadError\", \"onLoadSuccess\", \"onRenderAnnotationLayerError\", \"onRenderAnnotationLayerSuccess\", \"onRenderError\", \"onRenderSuccess\", \"onRenderTextLayerError\", \"onRenderTextLayerSuccess\", \"pageIndex\", \"pageNumber\", \"pdf\", \"registerPage\", \"renderAnnotationLayer\", \"renderForms\", \"renderMode\", \"renderTextLayer\", \"rotate\", \"scale\", \"unregisterPage\", \"width\"]);\n const [pageState, pageDispatch] = useResolver();\n const { value: page, error: pageError } = pageState;\n const pageElement = useRef(null);\n invariant(pdf, 'Attempted to load a page, but no document was specified.');\n const pageIndex = isProvided(pageNumberProps) ? pageNumberProps - 1 : pageIndexProps !== null && pageIndexProps !== void 0 ? pageIndexProps : null;\n const pageNumber = pageNumberProps !== null && pageNumberProps !== void 0 ? pageNumberProps : (isProvided(pageIndexProps) ? pageIndexProps + 1 : null);\n const rotate = rotateProps !== null && rotateProps !== void 0 ? rotateProps : (page ? page.rotate : null);\n const scale = useMemo(() => {\n if (!page) {\n return null;\n }\n // Be default, we'll render page at 100% * scale width.\n let pageScale = 1;\n // Passing scale explicitly null would cause the page not to render\n const scaleWithDefault = scaleProps !== null && scaleProps !== void 0 ? scaleProps : defaultScale;\n // If width/height is defined, calculate the scale of the page so it could be of desired width.\n if (width || height) {\n const viewport = page.getViewport({ scale: 1, rotation: rotate });\n if (width) {\n pageScale = width / viewport.width;\n }\n else if (height) {\n pageScale = height / viewport.height;\n }\n }\n return scaleWithDefault * pageScale;\n }, [height, page, rotate, scaleProps, width]);\n function hook() {\n return () => {\n if (!isProvided(pageIndex)) {\n // Impossible, but TypeScript doesn't know that\n return;\n }\n if (_enableRegisterUnregisterPage && unregisterPage) {\n unregisterPage(pageIndex);\n }\n };\n }\n useEffect(hook, [_enableRegisterUnregisterPage, pdf, pageIndex, unregisterPage]);\n /**\n * Called when a page is loaded successfully\n */\n function onLoadSuccess() {\n if (onLoadSuccessProps) {\n if (!page || !scale) {\n // Impossible, but TypeScript doesn't know that\n return;\n }\n onLoadSuccessProps(makePageCallback(page, scale));\n }\n if (_enableRegisterUnregisterPage && registerPage) {\n if (!isProvided(pageIndex) || !pageElement.current) {\n // Impossible, but TypeScript doesn't know that\n return;\n }\n registerPage(pageIndex, pageElement.current);\n }\n }\n /**\n * Called when a page failed to load\n */\n function onLoadError() {\n if (!pageError) {\n // Impossible, but TypeScript doesn't know that\n return;\n }\n warning(false, pageError.toString());\n if (onLoadErrorProps) {\n onLoadErrorProps(pageError);\n }\n }\n function resetPage() {\n pageDispatch({ type: 'RESET' });\n }\n useEffect(resetPage, [pageDispatch, pdf, pageIndex]);\n function loadPage() {\n if (!pdf || !pageNumber) {\n return;\n }\n const cancellable = makeCancellable(pdf.getPage(pageNumber));\n const runningTask = cancellable;\n cancellable.promise\n .then((nextPage) => {\n pageDispatch({ type: 'RESOLVE', value: nextPage });\n })\n .catch((error) => {\n pageDispatch({ type: 'REJECT', error });\n });\n return () => cancelRunningTask(runningTask);\n }\n useEffect(loadPage, [pageDispatch, pdf, pageIndex, pageNumber, registerPage]);\n useEffect(() => {\n if (page === undefined) {\n return;\n }\n if (page === false) {\n onLoadError();\n return;\n }\n onLoadSuccess();\n }, \n // Ommitted callbacks so they are not called every time they change\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [page, scale]);\n const childContext = useMemo(() => \n // Technically there cannot be page without pageIndex, pageNumber, rotate and scale, but TypeScript doesn't know that\n page && isProvided(pageIndex) && pageNumber && isProvided(rotate) && isProvided(scale)\n ? {\n _className,\n canvasBackground,\n customTextRenderer,\n devicePixelRatio,\n onGetAnnotationsError: onGetAnnotationsErrorProps,\n onGetAnnotationsSuccess: onGetAnnotationsSuccessProps,\n onGetStructTreeError: onGetStructTreeErrorProps,\n onGetStructTreeSuccess: onGetStructTreeSuccessProps,\n onGetTextError: onGetTextErrorProps,\n onGetTextSuccess: onGetTextSuccessProps,\n onRenderAnnotationLayerError: onRenderAnnotationLayerErrorProps,\n onRenderAnnotationLayerSuccess: onRenderAnnotationLayerSuccessProps,\n onRenderError: onRenderErrorProps,\n onRenderSuccess: onRenderSuccessProps,\n onRenderTextLayerError: onRenderTextLayerErrorProps,\n onRenderTextLayerSuccess: onRenderTextLayerSuccessProps,\n page,\n pageIndex,\n pageNumber,\n renderForms,\n renderTextLayer: renderTextLayerProps,\n rotate,\n scale,\n }\n : null, [\n _className,\n canvasBackground,\n customTextRenderer,\n devicePixelRatio,\n onGetAnnotationsErrorProps,\n onGetAnnotationsSuccessProps,\n onGetStructTreeErrorProps,\n onGetStructTreeSuccessProps,\n onGetTextErrorProps,\n onGetTextSuccessProps,\n onRenderAnnotationLayerErrorProps,\n onRenderAnnotationLayerSuccessProps,\n onRenderErrorProps,\n onRenderSuccessProps,\n onRenderTextLayerErrorProps,\n onRenderTextLayerSuccessProps,\n page,\n pageIndex,\n pageNumber,\n renderForms,\n renderTextLayerProps,\n rotate,\n scale,\n ]);\n const eventProps = useMemo(() => makeEventProps(otherProps, () => page ? (scale ? makePageCallback(page, scale) : undefined) : page), [otherProps, page, scale]);\n const pageKey = `${pageIndex}@${scale}/${rotate}`;\n const pageKeyNoScale = `${pageIndex}/${rotate}`;\n function renderMainLayer() {\n switch (renderMode) {\n case 'none':\n return null;\n case 'svg':\n return React.createElement(PageSVG, { key: `${pageKeyNoScale}_svg` });\n case 'canvas':\n default:\n return React.createElement(PageCanvas, { key: `${pageKey}_canvas`, canvasRef: canvasRef });\n }\n }\n function renderTextLayer() {\n if (!renderTextLayerProps) {\n return null;\n }\n return React.createElement(TextLayer, { key: `${pageKey}_text` });\n }\n function renderAnnotationLayer() {\n if (!renderAnnotationLayerProps) {\n return null;\n }\n /**\n * As of now, PDF.js 2.0.943 returns warnings on unimplemented annotations in SVG mode.\n * Therefore, as a fallback, we render \"traditional\" AnnotationLayer component.\n */\n return React.createElement(AnnotationLayer, { key: `${pageKey}_annotations` });\n }\n function renderChildren() {\n return (React.createElement(PageContext.Provider, { value: childContext },\n renderMainLayer(),\n renderTextLayer(),\n renderAnnotationLayer(),\n children));\n }\n function renderContent() {\n if (!pageNumber) {\n return React.createElement(Message, { type: \"no-data\" }, typeof noData === 'function' ? noData() : noData);\n }\n if (pdf === null || page === undefined || page === null) {\n return (React.createElement(Message, { type: \"loading\" }, typeof loading === 'function' ? loading() : loading));\n }\n if (pdf === false || page === false) {\n return React.createElement(Message, { type: \"error\" }, typeof error === 'function' ? error() : error);\n }\n return renderChildren();\n }\n return (React.createElement(\"div\", Object.assign({ className: clsx(_className, className), \"data-page-number\": pageNumber, ref: mergeRefs(inputRef, pageElement), style: {\n ['--scale-factor']: `${scale}`,\n backgroundColor: canvasBackground || 'white',\n position: 'relative',\n minWidth: 'min-content',\n minHeight: 'min-content',\n } }, eventProps), renderContent()));\n}\nconst isFunctionOrNode = PropTypes.oneOfType([PropTypes.func, PropTypes.node]);\nPage.propTypes = Object.assign(Object.assign({}, eventProps), { canvasBackground: PropTypes.string, canvasRef: isRef, children: PropTypes.node, className: isClassName, customTextRenderer: PropTypes.func, devicePixelRatio: PropTypes.number, error: isFunctionOrNode, height: PropTypes.number, imageResourcesPath: PropTypes.string, inputRef: isRef, loading: isFunctionOrNode, noData: isFunctionOrNode, onGetTextError: PropTypes.func, onGetTextSuccess: PropTypes.func, onLoadError: PropTypes.func, onLoadSuccess: PropTypes.func, onRenderError: PropTypes.func, onRenderSuccess: PropTypes.func, onRenderTextLayerError: PropTypes.func, onRenderTextLayerSuccess: PropTypes.func, pageIndex: isPageIndex, pageNumber: isPageNumber, pdf: isPdf, renderAnnotationLayer: PropTypes.bool, renderForms: PropTypes.bool, renderMode: isRenderMode, renderTextLayer: PropTypes.bool, rotate: isRotate, scale: PropTypes.number, width: PropTypes.number });\n","var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport React from 'react';\nimport clsx from 'clsx';\nimport invariant from 'tiny-invariant';\nimport Page from './Page';\nimport { isProvided } from './shared/utils';\nimport useDocumentContext from './shared/hooks/useDocumentContext';\nexport default function Thumbnail(props) {\n const documentContext = useDocumentContext();\n invariant(documentContext, 'Unable to find Document context. Did you wrap in ?');\n const mergedProps = Object.assign(Object.assign({}, documentContext), props);\n const { className, linkService, onItemClick, pageIndex: pageIndexProps, pageNumber: pageNumberProps, } = mergedProps;\n const pageIndex = isProvided(pageNumberProps) ? pageNumberProps - 1 : pageIndexProps !== null && pageIndexProps !== void 0 ? pageIndexProps : null;\n const pageNumber = pageNumberProps !== null && pageNumberProps !== void 0 ? pageNumberProps : (isProvided(pageIndexProps) ? pageIndexProps + 1 : null);\n function onClick(event) {\n event.preventDefault();\n if (!isProvided(pageIndex) || !pageNumber) {\n return;\n }\n if (onItemClick) {\n onItemClick({\n pageIndex,\n pageNumber,\n });\n }\n else {\n linkService.goToPage(pageNumber);\n }\n }\n const { className: classNameProps, onItemClick: onItemClickProps } = props, pageProps = __rest(props, [\"className\", \"onItemClick\"]);\n return (\n /* eslint-disable-next-line jsx-a11y/anchor-is-valid */\n React.createElement(\"a\", { className: clsx('react-pdf__Thumbnail', className), href: pageNumber ? '#' : undefined, onClick: onClick },\n React.createElement(Page, Object.assign({}, pageProps, { _className: \"react-pdf__Thumbnail__page\", _enableRegisterUnregisterPage: false, renderAnnotationLayer: false, renderTextLayer: false }))));\n}\n","import * as pdfjs from 'pdfjs-dist';\nimport Document from './Document';\nimport Outline from './Outline';\nimport Page from './Page';\nimport Thumbnail from './Thumbnail';\nimport useDocumentContext from './shared/hooks/useDocumentContext';\nimport useOutlineContext from './shared/hooks/useOutlineContext';\nimport usePageContext from './shared/hooks/usePageContext';\nimport { displayWorkerWarning } from './shared/utils';\ndisplayWorkerWarning();\npdfjs.GlobalWorkerOptions.workerSrc = 'pdf.worker.js';\nexport { pdfjs, Document, Outline, Page, Thumbnail, useDocumentContext, useOutlineContext, usePageContext, };\n"],"names":["__spreadArray","to","from","pack","arguments","length","ar","i","l","Array","prototype","slice","call","concat","allEvents","makeEventProps","props","getArgs","eventProps","forEach","eventName","eventHandler","event","makeCancellablePromise","promise","isCancelled","Promise","resolve","reject","then","value","catch","error","cancel","r","e","t","f","n","isArray","condition","message","createContext","Message","children","type","className","propTypes","isRequired","LinkService","constructor","this","externalLinkEnabled","externalLinkRel","undefined","externalLinkTarget","isInPresentationMode","pdfDocument","pdfViewer","setDocument","setViewer","setExternalLinkRel","setExternalLinkTarget","setHistory","pagesCount","numPages","page","currentPageNumber","rotation","goToDestination","dest","getDestination","explicitDest","destRef","Object","getPageIndex","pageIndex","pageNumber","scrollPageIntoView","navigateTo","goToPage","addLinkAttributes","link","url","newWindow","href","rel","target","getDestinationHash","getAnchorUrl","setHash","executeNamedAction","cachePageRef","isPageVisible","isPageCached","executeSetOCGState","NEED_PASSWORD","INCORRECT_PASSWORD","isBrowser","document","isLocalFileSystem","window","location","protocol","isDefined","variable","isProvided","isDataURI","isString","test","dataURItoByteString","dataURI","headersString","dataString","split","indexOf","atob","unescape","allowFileAccessFromFilesTip","displayCORSWarning","cancelRunningTask","runningTask","makePageCallback","scale","defineProperty","get","view","configurable","isCancelException","name","reducer","state","action","useResolver","useReducer","result","isTypedArray","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","fileTypes","ArrayBuffer","data","range","PDFDataRangeTransport","Blob","push","isClassName","isFile","isPdf","commonObjs","getAnnotations","getTextContent","getViewport","render","getOutline","getPage","isRef","current","isRenderMode","isRotate","__awaiter","thisArg","_arguments","P","generator","fulfilled","step","next","rejected","done","apply","__rest","s","p","hasOwnProperty","getOwnPropertySymbols","propertyIsEnumerable","defaultOnPassword","callback","reason","prompt","Document","forwardRef","_a","ref","file","inputRef","imageResourcesPath","loading","noData","onItemClick","onLoadError","onLoadErrorProps","onLoadProgress","onLoadSuccess","onLoadSuccessProps","onPassword","onSourceError","onSourceErrorProps","onSourceSuccess","onSourceSuccessProps","options","renderMode","rotate","otherProps","sourceState","sourceDispatch","source","sourceError","pdfState","pdfDispatch","pdf","pdfError","linkService","useRef","pages","viewer","args","scrollIntoView","useImperativeHandle","useEffect","findDocumentSource","useCallback","isBlob","reader","FileReader","onload","Error","onerror","code","NOT_FOUND_ERR","SECURITY_ERR","ABORT_ERR","readAsArrayBuffer","loadFromFile","otherParams","fileByteString","assign","registerPage","unregisterPage","cancellable","nextSource","toString","documentInitParams","destroyable","onProgress","loadingTask","nextPdf","destroyed","destroy","childContext","useMemo","style","DocumentContext","Provider","isFunctionOrNode","canvasFactory","canvasMaxAreaInBytes","cMapPacked","CMapReaderFactory","cMapUrl","disableAutoFetch","disableFontFace","disableRange","disableStream","docBaseUrl","enableXfa","filterFactory","fontExtraProperties","httpHeaders","isEvalSupported","isOffscreenCanvasSupported","maxImageSize","ownerDocument","password","pdfBug","rangeChunkSize","StandardFontDataFactory","standardFontDataUrl","stopAtErrors","useSystemFonts","useWorkerFetch","verbosity","withCredentials","worker","Ref","num","gen","str","useCachedValue","getter","currentValue","useDocumentContext","useContext","useOutlineContext","OutlineContext","OutlineItem","documentContext","outlineContext","mergedProps","item","destination","getPageNumber","onClick","preventDefault","all","title","items","subitems","map","subitem","subitemIndex","key","renderSubitems","isDestination","Outline","outlineState","outlineDispatch","outline","outlineError","nextOutline","itemIndex","mergeRefs","inputRefs","_i","filteredInputRefs","filter","Boolean","PDF_ROLE_TO_HTML_ROLE","DocumentFragment","Part","Sect","Div","Aside","NonStruct","H","Title","FENote","Sub","Lbl","Span","Em","Strong","Link","Annot","Form","Ruby","RB","RT","RP","Warichu","WT","WP","L","LI","LBody","Table","TR","TH","TD","THead","TBody","TFoot","Caption","Figure","Formula","Artifact","HEADING_PATTERN","isStructTreeNode","node","isStructTreeNodeWithOnlyContentChild","getRoleAttributes","attributes","role","matches","match","Number","isPdfRole","htmlRole","getBaseAttributes","alt","lang","child","childAttributes","id","getAttributes","StructTreeItem","index","usePageContext","PageContext","StructTree","pageContext","onGetStructTreeError","onGetStructTreeErrorProps","onGetStructTreeSuccess","onGetStructTreeSuccessProps","structTreeState","structTreeDispatch","structTree","structTreeError","customTextRenderer","getStructTree","nextStructTree","ANNOTATION_MODE","PageCanvas","_className","canvasBackground","devicePixelRatio","devicePixelRatioProps","onRenderError","onRenderErrorProps","onRenderSuccess","onRenderSuccessProps","renderForms","renderTextLayer","canvasRef","canvasElement","renderViewport","viewport","cleanup","canvas","width","height","Math","floor","visibility","renderContext","annotationMode","ENABLE_FORMS","ENABLE","canvasContext","getContext","alpha","background","dir","display","userSelect","PageSVG","svgState","svgDispatch","svg","svgError","getOperatorList","operatorList","objs","getSVG","nextSvg","element","firstElementChild","appendChild","setAttribute","drawPageOnContainer","backgroundColor","overflow","TextLayer","onGetTextError","onGetTextSuccess","onRenderTextLayerError","onRenderTextLayerSuccess","textContentState","textContentDispatch","textContent","textContentError","layerElement","endElement","parseInt","getComputedStyle","body","getPropertyValue","nextTextContent","useLayoutEffect","layer","innerHTML","textContentSource","streamTextContent","includeMarkedContent","parameters","container","end","createElement","append","layerChildren","querySelector","querySelectorAll","isTextItem","content","hasEOL","onMouseUp","classList","remove","onMouseDown","add","AnnotationLayer","onGetAnnotationsError","onGetAnnotationsErrorProps","onGetAnnotationsSuccess","onGetAnnotationsSuccessProps","onRenderAnnotationLayerError","onRenderAnnotationLayerErrorProps","onRenderAnnotationLayerSuccess","onRenderAnnotationLayerSuccessProps","annotationsState","annotationsDispatch","annotations","annotationsError","nextAnnotations","clonedViewport","clone","dontFlip","annotationStorage","div","downloadManager","defaultScale","Page","_enableRegisterUnregisterPage","onGetTextErrorProps","onGetTextSuccessProps","onRenderTextLayerErrorProps","onRenderTextLayerSuccessProps","pageIndexProps","pageNumberProps","renderAnnotationLayer","renderAnnotationLayerProps","renderTextLayerProps","rotateProps","scaleProps","pageState","pageDispatch","pageError","pageElement","pageScale","scaleWithDefault","nextPage","pageKey","pageKeyNoScale","renderChildren","renderMainLayer","position","minWidth","minHeight","propName","componentName","Thumbnail","classNameProps","onItemClickProps","pageProps"],"sourceRoot":""}