import "./index.css";
import {NoopLogger as $26Zo0$NoopLogger, PdfActionType as $26Zo0$PdfActionType, calculateSize as $26Zo0$calculateSize, swap as $26Zo0$swap} from "@unionpdf/models";
import {jsx as $26Zo0$jsx, jsxs as $26Zo0$jsxs} from "react/jsx-runtime";
import $26Zo0$react, {useContext as $26Zo0$useContext, useState as $26Zo0$useState, useRef as $26Zo0$useRef, useEffect as $26Zo0$useEffect, useMemo as $26Zo0$useMemo, createContext as $26Zo0$createContext, useCallback as $26Zo0$useCallback} from "react";

function $parcel$exportWildcard(dest, source) {
  Object.keys(source).forEach(function(key) {
    if (key === 'default' || key === '__esModule' || dest.hasOwnProperty(key)) {
      return;
    }

    Object.defineProperty(dest, key, {
      enumerable: true,
      get: function get() {
        return source[key];
      }
    });
  });

  return dest;
}
function $parcel$export(e, n, v, s) {
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
var $b303505768f2368e$exports = {};
var $6e4b5bac317f07c8$exports = {};

$parcel$export($6e4b5bac317f07c8$exports, "PdfNavigator", () => $6e4b5bac317f07c8$export$c50b8951719f4254);

const $6e4b5bac317f07c8$var$LOG_SOURCE = "PdfNavigator";
const $6e4b5bac317f07c8$var$LOG_CATEGORY = "Navigate";
class $6e4b5bac317f07c8$export$c50b8951719f4254 {
    constructor(logger = new (0, $26Zo0$NoopLogger)()){
        this.logger = logger;
        this.currPageIndex = 0;
        this.listeners = [];
    }
    gotoPage(data, source) {
        this.logger.debug($6e4b5bac317f07c8$var$LOG_SOURCE, $6e4b5bac317f07c8$var$LOG_CATEGORY, `${source} try to navigate to `, data);
        if (this.currPageIndex === data.pageIndex) return;
        this.currPageIndex = data.pageIndex;
        this.emit({
            kind: "GotoPage",
            data: data
        }, source);
    }
    emit(evt, source) {
        for (const listener of this.listeners)try {
            if (listener.source !== source) listener.handler(evt, source);
        } catch (e) {
            this.logger.error($6e4b5bac317f07c8$var$LOG_SOURCE, $6e4b5bac317f07c8$var$LOG_CATEGORY, "error happens when calling navigator listener: ", e);
        }
    }
    addEventListener(source, handler) {
        const index = this.listeners.findIndex((_listener)=>{
            return _listener.source === source;
        });
        if (index === -1) this.listeners.push({
            source: source,
            handler: handler
        });
    }
    removeEventListener(source, handler) {
        const index = this.listeners.findIndex((_listener)=>{
            return _listener.source === source && _listener.handler === handler;
        });
        if (index !== -1) this.listeners.splice(index, 1);
    }
}


var $1073897fabf29df3$exports = {};

$parcel$export($1073897fabf29df3$exports, "PdfNavigatorContext", () => $1073897fabf29df3$export$caa2ab773e33e5e);
$parcel$export($1073897fabf29df3$exports, "PdfNavigatorContextProvider", () => $1073897fabf29df3$export$e54912d9d6938cde);
$parcel$export($1073897fabf29df3$exports, "usePdfNavigator", () => $1073897fabf29df3$export$5783548f96893eea);


const $1073897fabf29df3$export$caa2ab773e33e5e = /*#__PURE__*/ (0, $26Zo0$react).createContext(null);
function $1073897fabf29df3$export$e54912d9d6938cde(props) {
    const { children: children , navigator: navigator  } = props;
    return /*#__PURE__*/ (0, $26Zo0$jsx)($1073897fabf29df3$export$caa2ab773e33e5e.Provider, {
        value: navigator,
        children: children
    });
}
function $1073897fabf29df3$export$5783548f96893eea() {
    return (0, $26Zo0$useContext)($1073897fabf29df3$export$caa2ab773e33e5e);
}


var $86b30a910630ea4a$exports = {};

$parcel$export($86b30a910630ea4a$exports, "PdfApplication", () => $86b30a910630ea4a$export$2b57e2eec3927466);


var $6169e2edbe1b2846$exports = {};

$parcel$export($6169e2edbe1b2846$exports, "PdfApplicationMode", () => $6169e2edbe1b2846$export$d428584fab51ca5c);
$parcel$export($6169e2edbe1b2846$exports, "PdfApplicationContext", () => $6169e2edbe1b2846$export$176a77a47ca6f551);
$parcel$export($6169e2edbe1b2846$exports, "PdfApplicationContextProvider", () => $6169e2edbe1b2846$export$97649174a84438ac);
$parcel$export($6169e2edbe1b2846$exports, "usePdfApplication", () => $6169e2edbe1b2846$export$8140ffd75f17fcde);


let $6169e2edbe1b2846$export$d428584fab51ca5c;
(function(PdfApplicationMode) {
    PdfApplicationMode[PdfApplicationMode["Read"] = 0] = "Read";
    PdfApplicationMode[PdfApplicationMode["Edit"] = 1] = "Edit";
})($6169e2edbe1b2846$export$d428584fab51ca5c || ($6169e2edbe1b2846$export$d428584fab51ca5c = {}));
const $6169e2edbe1b2846$export$176a77a47ca6f551 = /*#__PURE__*/ (0, $26Zo0$react).createContext({
    mode: $6169e2edbe1b2846$export$d428584fab51ca5c.Read
});
function $6169e2edbe1b2846$export$97649174a84438ac(props) {
    const { children: children , mode: mode  } = props;
    return /*#__PURE__*/ (0, $26Zo0$jsx)($6169e2edbe1b2846$export$176a77a47ca6f551.Provider, {
        value: {
            mode: mode
        },
        children: children
    });
}
function $6169e2edbe1b2846$export$8140ffd75f17fcde() {
    return (0, $26Zo0$useContext)($6169e2edbe1b2846$export$176a77a47ca6f551);
}


function $86b30a910630ea4a$export$2b57e2eec3927466(props) {
    const { mode: mode , children: children , ...rest } = props;
    return /*#__PURE__*/ (0, $26Zo0$jsx)("div", {
        className: `pdf__application ${mode === (0, $6169e2edbe1b2846$export$d428584fab51ca5c).Edit ? "pdf__application--edit" : "pdf__application--read"}`,
        ...rest,
        children: /*#__PURE__*/ (0, $26Zo0$jsx)((0, $6169e2edbe1b2846$export$97649174a84438ac), {
            mode: mode,
            children: children
        })
    });
}



var $160fce9cb522dfc3$exports = {};

$parcel$export($160fce9cb522dfc3$exports, "PdfDocument", () => $160fce9cb522dfc3$export$d46c104bc6d5cb7e);



var $868e6beb025e0594$exports = {};

$parcel$export($868e6beb025e0594$exports, "PdfEngineContext", () => $868e6beb025e0594$export$656d74ab10d4ec31);
$parcel$export($868e6beb025e0594$exports, "PdfEngineContextProvider", () => $868e6beb025e0594$export$ac36c6f7cf6ec8da);
$parcel$export($868e6beb025e0594$exports, "usePdfEngine", () => $868e6beb025e0594$export$6dabc89b58a60ab3);


const $868e6beb025e0594$export$656d74ab10d4ec31 = /*#__PURE__*/ (0, $26Zo0$react).createContext(null);
function $868e6beb025e0594$export$ac36c6f7cf6ec8da(props) {
    const { children: children , engine: engine  } = props;
    return /*#__PURE__*/ (0, $26Zo0$jsx)($868e6beb025e0594$export$656d74ab10d4ec31.Provider, {
        value: engine,
        children: children
    });
}
function $868e6beb025e0594$export$6dabc89b58a60ab3() {
    return (0, $26Zo0$useContext)($868e6beb025e0594$export$656d74ab10d4ec31);
}


var $1735914b47eebfb2$exports = {};

$parcel$export($1735914b47eebfb2$exports, "defaultTheme", () => $1735914b47eebfb2$export$164de7ab8df77ef0);
$parcel$export($1735914b47eebfb2$exports, "ThemeContext", () => $1735914b47eebfb2$export$2c657da244d00bd6);
$parcel$export($1735914b47eebfb2$exports, "ThemeContextProvider", () => $1735914b47eebfb2$export$59c2a5d3b0139bc8);
$parcel$export($1735914b47eebfb2$exports, "useTheme", () => $1735914b47eebfb2$export$93d4e7f90805808f);



const $1735914b47eebfb2$export$164de7ab8df77ef0 = {};
const $1735914b47eebfb2$export$2c657da244d00bd6 = /*#__PURE__*/ (0, $26Zo0$createContext)($1735914b47eebfb2$export$164de7ab8df77ef0);
function $1735914b47eebfb2$export$59c2a5d3b0139bc8(props) {
    const { theme: theme , children: children  } = props;
    return /*#__PURE__*/ (0, $26Zo0$jsx)($1735914b47eebfb2$export$2c657da244d00bd6.Provider, {
        value: theme,
        children: children
    });
}
function $1735914b47eebfb2$export$93d4e7f90805808f() {
    return (0, $26Zo0$useContext)($1735914b47eebfb2$export$2c657da244d00bd6);
}


var $33b41438855052f4$exports = {};

$parcel$export($33b41438855052f4$exports, "PdfDocumentContext", () => $33b41438855052f4$export$fee7bd7de68330f1);
$parcel$export($33b41438855052f4$exports, "PdfDocumentContextProvider", () => $33b41438855052f4$export$f1798209adbb5a03);
$parcel$export($33b41438855052f4$exports, "usePdfDocument", () => $33b41438855052f4$export$3a01b9f380b97660);


const $33b41438855052f4$export$fee7bd7de68330f1 = /*#__PURE__*/ (0, $26Zo0$react).createContext(null);
function $33b41438855052f4$export$f1798209adbb5a03(props) {
    const { children: children , doc: doc  } = props;
    return /*#__PURE__*/ (0, $26Zo0$jsx)($33b41438855052f4$export$fee7bd7de68330f1.Provider, {
        value: doc,
        children: children
    });
}
function $33b41438855052f4$export$3a01b9f380b97660() {
    return (0, $26Zo0$useContext)($33b41438855052f4$export$fee7bd7de68330f1);
}


function $160fce9cb522dfc3$export$d46c104bc6d5cb7e(props) {
    const { id: id , source: source , onOpenSuccess: onOpenSuccess , onOpenFailure: onOpenFailure , children: children , ...rest } = props;
    const [doc, setDoc] = (0, $26Zo0$useState)(null);
    const engine = (0, $868e6beb025e0594$export$6dabc89b58a60ab3)();
    const theme = (0, $1735914b47eebfb2$export$93d4e7f90805808f)();
    const onOpenSuccessRef = (0, $26Zo0$useRef)(onOpenSuccess);
    onOpenSuccessRef.current = onOpenSuccess;
    const onOpenFailureRef = (0, $26Zo0$useRef)(onOpenFailure);
    onOpenFailureRef.current = onOpenFailure;
    (0, $26Zo0$useEffect)(()=>{
        if (engine && id && source) {
            setDoc(null);
            let doc;
            const task = engine.openDocument(id, source);
            task.wait((_doc)=>{
                doc = _doc;
                setDoc(doc);
                onOpenSuccessRef.current?.(doc);
            }, (error)=>{
                onOpenFailureRef.current?.(error);
            });
            return ()=>{
                task.abort();
                if (doc) engine.closeDocument(doc);
            };
        }
    }, [
        engine,
        id,
        source
    ]);
    const themeStyle = (0, $26Zo0$useMemo)(()=>{
        const styles = {};
        for(let key in theme)styles[`--${key}`] = theme[key];
        return styles;
    }, [
        theme
    ]);
    return /*#__PURE__*/ (0, $26Zo0$jsx)("div", {
        className: "pdf__document",
        style: themeStyle,
        ...rest,
        children: doc ? /*#__PURE__*/ (0, $26Zo0$jsx)((0, $33b41438855052f4$export$f1798209adbb5a03), {
            doc: doc,
            children: children
        }) : null
    });
}





$parcel$exportWildcard($b303505768f2368e$exports, $6e4b5bac317f07c8$exports);
$parcel$exportWildcard($b303505768f2368e$exports, $1073897fabf29df3$exports);
$parcel$exportWildcard($b303505768f2368e$exports, $86b30a910630ea4a$exports);
$parcel$exportWildcard($b303505768f2368e$exports, $6169e2edbe1b2846$exports);
$parcel$exportWildcard($b303505768f2368e$exports, $160fce9cb522dfc3$exports);
$parcel$exportWildcard($b303505768f2368e$exports, $33b41438855052f4$exports);
$parcel$exportWildcard($b303505768f2368e$exports, $868e6beb025e0594$exports);
$parcel$exportWildcard($b303505768f2368e$exports, $1735914b47eebfb2$exports);


var $07b3c3798c23c353$exports = {};
var $333cea2512b8496b$exports = {};

$parcel$export($333cea2512b8496b$exports, "ErrorBoundary", () => $333cea2512b8496b$export$e926676385687eaf);








function $e508e2e73a72c1fe$export$353f5b6fc5456de1(props) {
    return /*#__PURE__*/ (0, $26Zo0$jsx)("button", {
        ...props
    });
}
function $e508e2e73a72c1fe$export$4c260019440d418f(props) {
    return /*#__PURE__*/ (0, $26Zo0$jsx)("div", {
        ...props
    });
}
function $e508e2e73a72c1fe$export$ef9b1a59e592288f(props) {
    const { options: options , ...rest } = props;
    return /*#__PURE__*/ (0, $26Zo0$jsx)("select", {
        ...rest,
        children: options.map((option, index)=>{
            return /*#__PURE__*/ (0, $26Zo0$jsx)("option", {
                value: option.value,
                children: option.label
            }, index);
        })
    });
}
function $e508e2e73a72c1fe$export$f5b8910cec6cf069(props) {
    return /*#__PURE__*/ (0, $26Zo0$jsx)("input", {
        ...props
    });
}


const $7276597e6dc3a994$export$47c7a09a9c745c32 = {
    ToolbarComponent: (0, $e508e2e73a72c1fe$export$4c260019440d418f),
    ButtonComponent: (0, $e508e2e73a72c1fe$export$353f5b6fc5456de1),
    SelectComponent: (0, $e508e2e73a72c1fe$export$ef9b1a59e592288f),
    InputComponent: (0, $e508e2e73a72c1fe$export$f5b8910cec6cf069)
};
const $7276597e6dc3a994$export$c37ea42564a5df3c = /*#__PURE__*/ (0, $26Zo0$createContext)($7276597e6dc3a994$export$47c7a09a9c745c32);
function $7276597e6dc3a994$export$53b091cec8283fd(props) {
    const { children: children , components: components  } = props;
    return /*#__PURE__*/ (0, $26Zo0$jsx)($7276597e6dc3a994$export$c37ea42564a5df3c.Provider, {
        value: {
            ...$7276597e6dc3a994$export$47c7a09a9c745c32,
            ...components
        },
        children: children
    });
}
function $7276597e6dc3a994$export$ac09e16cba7ea428() {
    return (0, $26Zo0$useContext)($7276597e6dc3a994$export$c37ea42564a5df3c);
}
function $7276597e6dc3a994$export$99ae2648e430e84e(is) {
    const binding = $7276597e6dc3a994$export$ac09e16cba7ea428();
    return binding[is];
}
function $7276597e6dc3a994$export$aa5b7e97087b9e24() {
    return $7276597e6dc3a994$export$99ae2648e430e84e("ButtonComponent");
}
function $7276597e6dc3a994$export$b3c1fb91a092f024() {
    return $7276597e6dc3a994$export$99ae2648e430e84e("ToolbarComponent");
}
function $7276597e6dc3a994$export$1a3fc139fb4a9210() {
    return $7276597e6dc3a994$export$99ae2648e430e84e("SelectComponent");
}
function $7276597e6dc3a994$export$461fe4d8e5b241df() {
    return $7276597e6dc3a994$export$99ae2648e430e84e("InputComponent");
}
const $7276597e6dc3a994$export$eeac4527d8896b91 = {
    unknownError: "Unknown Error",
    rotate0Deg: "0 degree",
    rotate90Deg: "90 degree",
    rotate180Deg: "180 degree",
    rotate270Deg: "270 degree"
};
const $7276597e6dc3a994$export$91a6b3e6b173027a = /*#__PURE__*/ (0, $26Zo0$createContext)($7276597e6dc3a994$export$eeac4527d8896b91);
function $7276597e6dc3a994$export$3ccbe4a5cf1a6d53(props) {
    const { children: children , strings: strings  } = props;
    return /*#__PURE__*/ (0, $26Zo0$jsx)($7276597e6dc3a994$export$91a6b3e6b173027a.Provider, {
        value: {
            ...$7276597e6dc3a994$export$eeac4527d8896b91,
            ...strings
        },
        children: children
    });
}
function $7276597e6dc3a994$export$284d56c62f28218c() {
    return (0, $26Zo0$useContext)($7276597e6dc3a994$export$91a6b3e6b173027a);
}
function $7276597e6dc3a994$export$b9d932297e849254(key) {
    const strings = (0, $26Zo0$useContext)($7276597e6dc3a994$export$91a6b3e6b173027a);
    return strings[key] || key;
}


class $333cea2512b8496b$export$e926676385687eaf extends (0, $26Zo0$react).Component {
    constructor(props){
        super(props);
        this.state = {};
    }
    static getDerivedStateFromError(error) {
        return {
            error: error
        };
    }
    componentDidCatch(error, errorInfo) {
        console.log(error, errorInfo);
    }
    render() {
        if (this.state.error) return /*#__PURE__*/ (0, $26Zo0$jsx)((0, $7276597e6dc3a994$export$91a6b3e6b173027a).Consumer, {
            children: (strings)=>{
                return /*#__PURE__*/ (0, $26Zo0$jsx)("h1", {
                    children: strings.unknownError
                });
            }
        });
        return this.props.children;
    }
}


var $bee92c8a4a717122$exports = {};

$parcel$export($bee92c8a4a717122$exports, "PDF_NAVIGATOR_SOURCE_TOOLBAR", () => $bee92c8a4a717122$export$4c7b7fca4aeb9016);
$parcel$export($bee92c8a4a717122$exports, "PdfToolbar", () => $bee92c8a4a717122$export$88448ef14ae22a2d);







const $bee92c8a4a717122$export$4c7b7fca4aeb9016 = "Toolbar";
function $bee92c8a4a717122$export$88448ef14ae22a2d(props) {
    const { scaleFactor: scaleFactor , changeScaleFactor: changeScaleFactor , rotation: rotation , changeRotation: changeRotation , children: children , ...rest } = props;
    const strings = (0, $7276597e6dc3a994$export$284d56c62f28218c)();
    const { ToolbarComponent: ToolbarComponent , InputComponent: InputComponent , SelectComponent: SelectComponent  } = (0, $7276597e6dc3a994$export$ac09e16cba7ea428)();
    const pdfDoc = (0, $33b41438855052f4$export$3a01b9f380b97660)();
    const pdfNavigator = (0, $1073897fabf29df3$export$5783548f96893eea)();
    const navigate = (0, $26Zo0$useCallback)((evt)=>{
        const pageIndex = parseInt(evt.target.value, 10);
        if (!isNaN(pageIndex)) {
            pdfNavigator?.gotoPage({
                pageIndex: pageIndex - 1
            }, $bee92c8a4a717122$export$4c7b7fca4aeb9016);
            setCurrPageIndex(pageIndex - 1);
        }
    }, [
        pdfNavigator
    ]);
    const [currPageIndex, setCurrPageIndex] = (0, $26Zo0$useState)(pdfNavigator?.currPageIndex || 0);
    (0, $26Zo0$useEffect)(()=>{
        if (pdfNavigator) {
            const handle = (evt, source)=>{
                switch(evt.kind){
                    case "GotoPage":
                        if (source !== $bee92c8a4a717122$export$4c7b7fca4aeb9016) setCurrPageIndex(evt.data.pageIndex);
                        break;
                }
            };
            pdfNavigator.addEventListener($bee92c8a4a717122$export$4c7b7fca4aeb9016, handle);
            return ()=>{
                pdfNavigator.removeEventListener($bee92c8a4a717122$export$4c7b7fca4aeb9016, handle);
            };
        }
    }, [
        pdfNavigator,
        setCurrPageIndex
    ]);
    const rotationOptions = [
        {
            label: strings.rotate0Deg,
            value: "0"
        },
        {
            label: strings.rotate90Deg,
            value: "1"
        },
        {
            label: strings.rotate180Deg,
            value: "2"
        },
        {
            label: strings.rotate270Deg,
            value: "3"
        }, 
    ];
    return /*#__PURE__*/ (0, $26Zo0$jsx)((0, $333cea2512b8496b$export$e926676385687eaf), {
        children: /*#__PURE__*/ (0, $26Zo0$jsxs)(ToolbarComponent, {
            className: "pdf__toolbar",
            ...rest,
            children: [
                /*#__PURE__*/ (0, $26Zo0$jsx)(SelectComponent, {
                    className: "pdf__toolbar__select pdf__toolbar__select--rotation",
                    value: rotation,
                    onChange: changeRotation,
                    options: rotationOptions
                }),
                /*#__PURE__*/ (0, $26Zo0$jsx)(InputComponent, {
                    className: "pdf__toolbar__input pdf__toolbar__input--scalefactor",
                    type: "number",
                    min: "0.5",
                    max: "3.0",
                    step: "0.1",
                    value: scaleFactor,
                    onChange: changeScaleFactor
                }),
                /*#__PURE__*/ (0, $26Zo0$jsx)(InputComponent, {
                    className: "pdf__toolbar__input pdf__toolbar__input--page",
                    value: currPageIndex + 1,
                    min: "1",
                    max: pdfDoc?.pageCount,
                    type: "number",
                    onChange: navigate
                })
            ]
        })
    });
}


var $69732219dafb7ef9$exports = {};

$parcel$export($69732219dafb7ef9$exports, "PDF_NAVIGATOR_SOURCE_THUMBNAILS", () => $69732219dafb7ef9$export$65978a2e0d68c048);
$parcel$export($69732219dafb7ef9$exports, "PdfThumbnails", () => $69732219dafb7ef9$export$d783f7eb7c78aaf1);
$parcel$export($69732219dafb7ef9$exports, "PdfThumbnail", () => $69732219dafb7ef9$export$95e001485d557055);







const $69732219dafb7ef9$export$65978a2e0d68c048 = "PdfThumbnails";
function $69732219dafb7ef9$export$d783f7eb7c78aaf1(props) {
    const { layout: layout = {
        direction: "vertical",
        itemsCount: 1
    } , scaleFactor: scaleFactor = 1 , rotation: rotation = 0 ,  } = props;
    const doc = (0, $33b41438855052f4$export$3a01b9f380b97660)();
    const pdfNavigator = (0, $1073897fabf29df3$export$5783548f96893eea)();
    const [currPageIndex, setCurrPageIndex] = (0, $26Zo0$useState)(pdfNavigator?.currPageIndex || 0);
    (0, $26Zo0$useEffect)(()=>{
        if (pdfNavigator) {
            const handle = (evt, source)=>{
                switch(evt.kind){
                    case "GotoPage":
                        if (source !== $69732219dafb7ef9$export$65978a2e0d68c048) setCurrPageIndex(evt.data.pageIndex);
                        break;
                }
            };
            pdfNavigator.addEventListener($69732219dafb7ef9$export$65978a2e0d68c048, handle);
            return ()=>{
                pdfNavigator.removeEventListener($69732219dafb7ef9$export$65978a2e0d68c048, handle);
            };
        }
    }, [
        pdfNavigator,
        setCurrPageIndex
    ]);
    const gotoPage = (0, $26Zo0$useCallback)((page)=>{
        pdfNavigator?.gotoPage({
            pageIndex: page.index
        }, $69732219dafb7ef9$export$65978a2e0d68c048);
        setCurrPageIndex(page.index);
    }, [
        pdfNavigator,
        setCurrPageIndex
    ]);
    const styleTemplate = [];
    for(let i = 0; i < layout.itemsCount; i++)styleTemplate.push("1fr");
    const [visiblePageIndexes, setVisiblePageIndexed] = (0, $26Zo0$useState)([]);
    const containerRef = (0, $26Zo0$useRef)(null);
    const [observer, setObserver] = (0, $26Zo0$useState)(null);
    (0, $26Zo0$useEffect)(()=>{
        const container = containerRef.current;
        if (container) {
            const observer = new IntersectionObserver((entries)=>{
                const visiblePageIndexes = entries.filter((entry)=>{
                    return entry.isIntersecting;
                }).map((entry)=>{
                    return Number(entry.target.dataset.pageIndex);
                });
                setVisiblePageIndexed(visiblePageIndexes);
            }, {
                root: container,
                rootMargin: "0px 0px",
                threshold: 0
            });
            setObserver(observer);
            return ()=>{
                observer?.disconnect();
            };
        }
    }, [
        containerRef.current
    ]);
    return /*#__PURE__*/ (0, $26Zo0$jsx)((0, $333cea2512b8496b$export$e926676385687eaf), {
        children: /*#__PURE__*/ (0, $26Zo0$jsx)("div", {
            ref: containerRef,
            className: `pdf__thumbnails pdf__thumbnails--${layout.direction}`,
            style: layout.direction === "vertical" ? {
                gridTemplateColumns: styleTemplate.join(" ")
            } : {
                gridTemplateRows: styleTemplate.join(" ")
            },
            children: doc?.pages.map((page, index)=>{
                const isCurrent = page.index === currPageIndex;
                const isVisible = visiblePageIndexes.indexOf(page.index) !== -1;
                return /*#__PURE__*/ (0, $26Zo0$jsx)($69732219dafb7ef9$export$95e001485d557055, {
                    observer: observer,
                    page: page,
                    isVisible: isVisible,
                    scaleFactor: scaleFactor,
                    rotation: rotation,
                    isCurrent: isCurrent,
                    onClick: gotoPage
                }, index);
            })
        })
    });
}
function $69732219dafb7ef9$export$95e001485d557055(props) {
    const engine = (0, $868e6beb025e0594$export$6dabc89b58a60ab3)();
    const doc = (0, $33b41438855052f4$export$3a01b9f380b97660)();
    const { observer: observer , page: page , scaleFactor: scaleFactor , rotation: rotation , isVisible: isVisible , isCurrent: isCurrent , onClick: onClick ,  } = props;
    const [src, setSrc] = (0, $26Zo0$useState)("");
    (0, $26Zo0$useEffect)(()=>{
        if (!src && engine && doc && page && isVisible) {
            const task = engine.renderThumbnail(doc, page, scaleFactor, rotation);
            task.wait((imageData)=>{
                setSrc($69732219dafb7ef9$var$imageDataToDataUrl(imageData));
            }, ()=>{});
            return ()=>{
                task.abort();
            };
        }
    }, [
        src,
        engine,
        doc,
        page,
        scaleFactor,
        rotation,
        isVisible
    ]);
    const containerRef = (0, $26Zo0$useRef)(null);
    (0, $26Zo0$useEffect)(()=>{
        const container = containerRef.current;
        if (observer && container) {
            observer.observe(container);
            return ()=>{
                observer.unobserve(container);
            };
        }
    }, [
        observer,
        containerRef.current
    ]);
    return /*#__PURE__*/ (0, $26Zo0$jsxs)("div", {
        ref: containerRef,
        "data-page-index": page.index,
        tabIndex: 0,
        className: `pdf__thumbnail ${isCurrent ? "pdf__thumbnail--current" : ""}`,
        children: [
            /*#__PURE__*/ (0, $26Zo0$jsx)("img", {
                alt: `page ${page.index}`,
                src: src,
                onClick: ()=>{
                    onClick(page);
                },
                width: page.size.width * scaleFactor,
                height: page.size.height * scaleFactor
            }),
            /*#__PURE__*/ (0, $26Zo0$jsx)("span", {
                children: page.index + 1
            })
        ]
    });
}
function $69732219dafb7ef9$var$imageDataToDataUrl(imageData) {
    const canvas = document.createElement("canvas");
    canvas.width = imageData.width;
    canvas.height = imageData.height;
    const context = canvas.getContext("2d");
    context?.putImageData(imageData, 0, 0);
    return canvas.toDataURL();
}


var $841bb2f3f8c131a5$exports = {};

$parcel$export($841bb2f3f8c131a5$exports, "PDF_NAVIGATOR_SOURCE_OUTLINES", () => $841bb2f3f8c131a5$export$13482b88be5917db);
$parcel$export($841bb2f3f8c131a5$exports, "PdfBookmarks", () => $841bb2f3f8c131a5$export$e47befc34cb62abc);
$parcel$export($841bb2f3f8c131a5$exports, "PdfBookmarkEntry", () => $841bb2f3f8c131a5$export$cbd49cefa3e29d3);








const $841bb2f3f8c131a5$export$13482b88be5917db = "PdfBookmarks";
function $841bb2f3f8c131a5$export$e47befc34cb62abc(props) {
    const engine = (0, $868e6beb025e0594$export$6dabc89b58a60ab3)();
    const doc = (0, $33b41438855052f4$export$3a01b9f380b97660)();
    const [bookmarks, setBookmarks] = (0, $26Zo0$useState)({
        bookmarks: []
    });
    (0, $26Zo0$useEffect)(()=>{
        if (engine && doc) {
            const task = engine.getBookmarks(doc);
            task.wait(setBookmarks, ()=>{});
            return ()=>{
                task.abort();
            };
        }
    }, [
        engine,
        doc
    ]);
    const pdfNavigator = (0, $1073897fabf29df3$export$5783548f96893eea)();
    const [currPageIndex, setCurrPageIndex] = (0, $26Zo0$useState)(pdfNavigator?.currPageIndex || 0);
    (0, $26Zo0$useEffect)(()=>{
        if (pdfNavigator) {
            const handle = (evt, source)=>{
                switch(evt.kind){
                    case "GotoPage":
                        if (source !== $841bb2f3f8c131a5$export$13482b88be5917db) setCurrPageIndex(evt.data.pageIndex);
                        break;
                }
            };
            pdfNavigator.addEventListener($841bb2f3f8c131a5$export$13482b88be5917db, handle);
            return ()=>{
                pdfNavigator.removeEventListener($841bb2f3f8c131a5$export$13482b88be5917db, handle);
            };
        }
    }, [
        pdfNavigator,
        setCurrPageIndex
    ]);
    const handleEntryClicked = (0, $26Zo0$useCallback)((bookmark)=>{
        console.log(bookmark);
        if (!bookmark.target) return;
        switch(bookmark.target.type){
            case "action":
                switch(bookmark.target.action.type){
                    case (0, $26Zo0$PdfActionType).Goto:
                        pdfNavigator?.gotoPage({
                            pageIndex: bookmark.target.action.destination.pageIndex
                        }, $841bb2f3f8c131a5$export$13482b88be5917db);
                        break;
                }
                break;
            case "destination":
                pdfNavigator?.gotoPage({
                    pageIndex: bookmark.target.destination.pageIndex
                }, $841bb2f3f8c131a5$export$13482b88be5917db);
                break;
        }
    }, [
        pdfNavigator
    ]);
    return /*#__PURE__*/ (0, $26Zo0$jsx)((0, $333cea2512b8496b$export$e926676385687eaf), {
        children: /*#__PURE__*/ (0, $26Zo0$jsx)("div", {
            className: "pdf__bookmarks",
            children: /*#__PURE__*/ (0, $26Zo0$jsx)("ol", {
                children: bookmarks.bookmarks.map((bookmark, index)=>{
                    return /*#__PURE__*/ (0, $26Zo0$jsx)($841bb2f3f8c131a5$export$cbd49cefa3e29d3, {
                        currPageIndex: currPageIndex,
                        bookmark: bookmark,
                        onClick: handleEntryClicked
                    }, index);
                })
            })
        })
    });
}
function $841bb2f3f8c131a5$export$cbd49cefa3e29d3(props) {
    const { currPageIndex: currPageIndex , bookmark: bookmark , onClick: onClick  } = props;
    let isCurrent = false;
    if (bookmark.target) switch(bookmark.target.type){
        case "destination":
            isCurrent = currPageIndex === bookmark.target.destination.pageIndex;
            break;
        case "action":
            switch(bookmark.target.action.type){
                case (0, $26Zo0$PdfActionType).Goto:
                    isCurrent = bookmark.target.action.destination.pageIndex === currPageIndex;
                    break;
            }
            break;
    }
    const [isUnfold, setIsUnfold] = (0, $26Zo0$useState)(false);
    const activiate = (0, $26Zo0$useCallback)(()=>{
        setIsUnfold((isUnfold)=>{
            return !isUnfold;
        });
        onClick(bookmark);
    }, [
        setIsUnfold,
        onClick,
        bookmark
    ]);
    return /*#__PURE__*/ (0, $26Zo0$jsxs)("li", {
        tabIndex: 0,
        className: `pdf__bookmarks__entry ${isCurrent ? "pdf__bookmarks__entry--current" : ""}`,
        children: [
            /*#__PURE__*/ (0, $26Zo0$jsx)("span", {
                onClick: activiate,
                children: bookmark.title
            }),
            bookmark.children && bookmark.children.length !== 0 && isUnfold ? /*#__PURE__*/ (0, $26Zo0$jsx)("ol", {
                style: {
                    listStyle: "none",
                    paddingLeft: "1rem"
                },
                children: bookmark.children.map((entry, index)=>{
                    return /*#__PURE__*/ (0, $26Zo0$jsx)($841bb2f3f8c131a5$export$cbd49cefa3e29d3, {
                        currPageIndex: currPageIndex,
                        bookmark: entry,
                        onClick: onClick
                    }, index);
                })
            }) : null
        ]
    });
}


var $ee253befb055c9b3$exports = {};

$parcel$export($ee253befb055c9b3$exports, "PDF_NAVIGATOR_SOURCE_PAGES", () => $ee253befb055c9b3$export$93d718cb74c89323);
$parcel$export($ee253befb055c9b3$exports, "PDF_PAGE_DEFAULT_GAP", () => $ee253befb055c9b3$export$c1c3c2d00ca886b);
$parcel$export($ee253befb055c9b3$exports, "PdfPages", () => $ee253befb055c9b3$export$de646539ee056018);
$parcel$export($ee253befb055c9b3$exports, "PdfPage", () => $ee253befb055c9b3$export$1686f89eb33d2b08);





function $e426a5bfd63a1e65$export$f3604a28e9b0338c(rect, scaleFactor, rotation) {
    const { origin: origin , size: size  } = rect;
    const rotatedAnnoSize = rotation % 2 === 0 ? size : (0, $26Zo0$swap)(size);
    const scaledAnnoSize = {
        width: Math.ceil(rotatedAnnoSize.width * scaleFactor),
        height: Math.ceil(rotatedAnnoSize.height * scaleFactor)
    };
    const scaledOrigin = {
        x: Math.ceil(origin.x * scaleFactor),
        y: Math.ceil(origin.y * scaleFactor)
    };
    switch(rotation){
        case 0:
            return {
                top: scaledOrigin.y,
                left: scaledOrigin.x,
                width: scaledAnnoSize.width,
                height: scaledAnnoSize.height
            };
        case 1:
            return {
                top: scaledOrigin.x,
                right: scaledOrigin.y,
                width: scaledAnnoSize.width,
                height: scaledAnnoSize.height
            };
        case 2:
            return {
                bottom: scaledOrigin.y,
                right: scaledOrigin.x,
                width: scaledAnnoSize.width,
                height: scaledAnnoSize.height
            };
        case 3:
            return {
                bottom: scaledOrigin.x,
                left: scaledOrigin.y,
                width: scaledAnnoSize.width,
                height: scaledAnnoSize.height
            };
    }
}





const $ee253befb055c9b3$export$93d718cb74c89323 = "PdfPages";
const $ee253befb055c9b3$export$c1c3c2d00ca886b = 8;
function $ee253befb055c9b3$export$de646539ee056018(props) {
    const { viewport: viewport , pageGap: pageGap = $ee253befb055c9b3$export$c1c3c2d00ca886b , visibleRange: visibleRange = [
        -1,
        1
    ] , scaleFactor: scaleFactor = 1 , rotation: rotation = 0 , pageContentComponent: ContentComponent ,  } = props;
    const pdfDoc = (0, $33b41438855052f4$export$3a01b9f380b97660)();
    const pdfNavigator = (0, $1073897fabf29df3$export$5783548f96893eea)();
    const containerElemRef = (0, $26Zo0$useRef)(null);
    const [scrollOffset, setScrollOffset] = (0, $26Zo0$useState)({
        top: 0,
        left: 0
    });
    const [currPageIndex, setCurrPageIndex] = (0, $26Zo0$useState)(pdfNavigator?.currPageIndex || 0);
    const pdfPages = (0, $26Zo0$useMemo)(()=>{
        if (!pdfDoc) return [];
        let pageOffset = pageGap;
        return pdfDoc?.pages.map((page)=>{
            const offset = pageOffset;
            const visualSize = (0, $26Zo0$calculateSize)(page.size, scaleFactor, rotation);
            pageOffset = pageOffset + visualSize.height + pageGap;
            return {
                ...page,
                offset: offset,
                visualSize: visualSize
            };
        });
    }, [
        pdfDoc,
        pageGap,
        scaleFactor,
        rotation
    ]);
    const handleScroll = (0, $26Zo0$useCallback)((evt)=>{
        const target = evt.target;
        setScrollOffset({
            top: target.scrollTop,
            left: target.scrollLeft
        });
        for (const page of pdfPages){
            const pageBottomY = page.offset + page.size.height * scaleFactor;
            if (pageBottomY > target.scrollTop) {
                pdfNavigator?.gotoPage({
                    pageIndex: page.index
                }, $ee253befb055c9b3$export$93d718cb74c89323);
                setCurrPageIndex(page.index);
                break;
            }
        }
    }, [
        pdfNavigator,
        pdfPages,
        setCurrPageIndex
    ]);
    (0, $26Zo0$useEffect)(()=>{
        const containerElem = containerElemRef.current;
        if (containerElem) {
            containerElem.addEventListener("scroll", handleScroll);
            return ()=>{
                containerElem.removeEventListener("scroll", handleScroll);
            };
        }
    }, [
        containerElemRef.current,
        handleScroll
    ]);
    const visibleRangeTop = Math.max(0, scrollOffset.top + visibleRange[0] * viewport.height);
    const visibleRangeBottom = Math.max(0, scrollOffset.top + viewport.height + visibleRange[1] * viewport.height);
    const gotoPage = (0, $26Zo0$useCallback)((data)=>{
        const containerElem = containerElemRef.current;
        if (containerElem) {
            const { pageIndex: pageIndex , rect: rect  } = data;
            const page = pdfPages[pageIndex];
            if (!page) return;
            if (!rect) containerElem.scrollTo({
                left: 0,
                top: page.offset
            });
            else {
                const style = (0, $e426a5bfd63a1e65$export$f3604a28e9b0338c)(rect, scaleFactor, rotation);
                const { top: top = 0 , left: left = 0 , right: right = 0 , bottom: bottom = 0 , width: width , height: height ,  } = style;
                let scrollOffset;
                switch(rotation){
                    case 0:
                        scrollOffset = {
                            top: page.offset + top,
                            left: left
                        };
                        break;
                    case 1:
                        scrollOffset = {
                            top: page.offset + top,
                            left: page.visualSize.width - width - right
                        };
                        break;
                    case 2:
                        scrollOffset = {
                            top: page.offset + page.visualSize.height - bottom - height,
                            left: page.visualSize.width - width - right
                        };
                        break;
                    case 3:
                        scrollOffset = {
                            top: page.offset + page.visualSize.height - bottom - height,
                            left: left
                        };
                        break;
                }
                containerElem.scrollTo(scrollOffset);
            }
            setCurrPageIndex(pageIndex);
        }
    }, [
        pdfPages,
        setCurrPageIndex,
        scaleFactor,
        rotation
    ]);
    (0, $26Zo0$useEffect)(()=>{
        if (pdfNavigator) {
            const handle = (evt, source)=>{
                switch(evt.kind){
                    case "GotoPage":
                        if (source !== $ee253befb055c9b3$export$93d718cb74c89323) gotoPage(evt.data);
                        break;
                }
            };
            pdfNavigator.addEventListener($ee253befb055c9b3$export$93d718cb74c89323, handle);
            return ()=>{
                pdfNavigator.removeEventListener($ee253befb055c9b3$export$93d718cb74c89323, handle);
            };
        }
    }, [
        pdfNavigator,
        gotoPage
    ]);
    return /*#__PURE__*/ (0, $26Zo0$jsx)((0, $333cea2512b8496b$export$e926676385687eaf), {
        children: /*#__PURE__*/ (0, $26Zo0$jsx)("div", {
            className: "pdf__pages",
            children: /*#__PURE__*/ (0, $26Zo0$jsx)("div", {
                className: "pdf__pages__container",
                style: {
                    width: viewport.width,
                    height: viewport.height
                },
                ref: containerElemRef,
                children: pdfPages.map((page)=>{
                    const isVisible = !(page.offset > visibleRangeBottom || page.offset + page.size.height * scaleFactor < visibleRangeTop);
                    return /*#__PURE__*/ (0, $26Zo0$jsx)($ee253befb055c9b3$export$1686f89eb33d2b08, {
                        isCurrent: page.index === currPageIndex,
                        page: page,
                        isVisible: isVisible,
                        pageGap: pageGap,
                        scaleFactor: scaleFactor,
                        rotation: rotation,
                        visualSize: page.visualSize,
                        children: /*#__PURE__*/ (0, $26Zo0$jsx)(ContentComponent, {
                            isCurrent: page.index === currPageIndex,
                            page: page,
                            isVisible: isVisible,
                            pageGap: pageGap,
                            scaleFactor: scaleFactor,
                            rotation: rotation,
                            visualSize: page.visualSize
                        })
                    }, page.index);
                })
            })
        })
    });
}
function $ee253befb055c9b3$export$1686f89eb33d2b08(props) {
    const { children: children , ...rest } = props;
    const { isCurrent: isCurrent , pageGap: pageGap , visualSize: visualSize  } = rest;
    const style = (0, $26Zo0$useMemo)(()=>{
        return {
            marginTop: pageGap,
            marginBottom: pageGap,
            width: visualSize.width,
            height: visualSize.height
        };
    }, [
        pageGap,
        visualSize
    ]);
    return /*#__PURE__*/ (0, $26Zo0$jsx)("div", {
        tabIndex: 0,
        className: `pdf__page ${isCurrent ? "pdf__page--current" : ""}`,
        style: style,
        children: children
    });
}


var $52f2391f43913ff8$exports = {};

$parcel$export($52f2391f43913ff8$exports, "PdfPageCanvas", () => $52f2391f43913ff8$export$3cc2f0efd44954a5);





function $52f2391f43913ff8$export$3cc2f0efd44954a5(props) {
    const doc = (0, $33b41438855052f4$export$3a01b9f380b97660)();
    const engine = (0, $868e6beb025e0594$export$6dabc89b58a60ab3)();
    const { page: page , scaleFactor: scaleFactor , rotation: rotation , isVisible: isVisible  } = props;
    const canvasElemRef = (0, $26Zo0$useRef)(null);
    (0, $26Zo0$useEffect)(()=>{
        const canvasElem = canvasElemRef.current;
        if (canvasElem && engine && doc && isVisible) {
            const task = engine.renderPage(doc, page, scaleFactor, rotation);
            task.wait((imageData)=>{
                canvasElem.width = imageData.width;
                canvasElem.height = imageData.height;
                const ctx = canvasElem.getContext("2d");
                if (ctx) ctx.putImageData(imageData, 0, 0, 0, 0, imageData.width, imageData.height);
            }, ()=>{});
            return ()=>{
                task.abort();
            };
        }
    }, [
        page,
        engine,
        doc,
        isVisible,
        scaleFactor,
        rotation
    ]);
    if (!isVisible) return null;
    return /*#__PURE__*/ (0, $26Zo0$jsx)("canvas", {
        className: "pdf__page__layer pdf__page__layer--canvas",
        ref: canvasElemRef
    });
}


var $e0a2a8ce1309f07a$exports = {};

$parcel$export($e0a2a8ce1309f07a$exports, "PdfPageAnnotations", () => $e0a2a8ce1309f07a$export$f4b87b3193e18e82);




function $e0a2a8ce1309f07a$export$f4b87b3193e18e82(props) {
    const { isVisible: isVisible , page: page , scaleFactor: scaleFactor , rotation: rotation , annotationComponent: AnnotationComponent ,  } = props;
    const engine = (0, $868e6beb025e0594$export$6dabc89b58a60ab3)();
    const doc = (0, $33b41438855052f4$export$3a01b9f380b97660)();
    const [annotations, setAnnotations] = (0, $26Zo0$useState)([]);
    (0, $26Zo0$useEffect)(()=>{
        if (engine && doc && page && isVisible) {
            const task = engine.getPageAnnotations(doc, page, scaleFactor, rotation);
            task.wait(setAnnotations, ()=>{});
            return ()=>{
                task.abort();
            };
        }
    }, [
        isVisible,
        engine,
        doc,
        page,
        scaleFactor,
        rotation
    ]);
    return /*#__PURE__*/ (0, $26Zo0$jsx)("div", {
        className: "pdf__page__layer pdf__page__layer--annotations",
        children: annotations.map((annotation)=>{
            return /*#__PURE__*/ (0, $26Zo0$jsx)(AnnotationComponent, {
                page: page,
                annotation: annotation,
                scaleFactor: scaleFactor,
                rotation: rotation
            }, annotation.id);
        })
    });
}


var $90392c2362c38fa6$exports = {};

$parcel$export($90392c2362c38fa6$exports, "PdfPageAnnotationBase", () => $90392c2362c38fa6$export$5c234731547f435d);




function $90392c2362c38fa6$export$5c234731547f435d(props) {
    const { annotation: annotation , scaleFactor: scaleFactor , rotation: rotation , children: children , className: className , ...rest } = props;
    const style = (0, $26Zo0$useMemo)(()=>{
        return (0, $e426a5bfd63a1e65$export$f3604a28e9b0338c)(annotation.rect, scaleFactor, rotation);
    }, [
        annotation,
        rotation,
        scaleFactor
    ]);
    return /*#__PURE__*/ (0, $26Zo0$jsx)("div", {
        style: style,
        className: `pdf__annotation ${className || ""}`,
        ...rest,
        children: children
    });
}


var $e5cd5d23b7291648$exports = {};

$parcel$export($e5cd5d23b7291648$exports, "PdfPageLinkAnnotation", () => $e5cd5d23b7291648$export$7fe83d2582775c38);






function $e5cd5d23b7291648$export$7fe83d2582775c38(props) {
    const { page: page , annotation: annotation , scaleFactor: scaleFactor , rotation: rotation  } = props;
    const pdfNavigator = (0, $1073897fabf29df3$export$5783548f96893eea)();
    const href = (0, $26Zo0$useMemo)(()=>{
        if (!annotation.target) return "#";
        if (annotation.target.type === "action") switch(annotation.target.action.type){
            case (0, $26Zo0$PdfActionType).Goto:
                return `#${annotation.target.action.destination.pageIndex}`;
            case (0, $26Zo0$PdfActionType).URI:
                return annotation.target.action.uri;
        }
        else return `#${annotation.target.destination.pageIndex}`;
    }, [
        annotation
    ]);
    const onClick = (0, $26Zo0$useCallback)((evt)=>{
        if (props.onClick) props.onClick(annotation);
        else {
            evt.preventDefault();
            if (!annotation.target) return;
            if (annotation.target.type === "action") switch(annotation.target.action.type){
                case (0, $26Zo0$PdfActionType).Goto:
                    pdfNavigator?.gotoPage({
                        pageIndex: annotation.target.action.destination.pageIndex
                    }, "annotation");
                    break;
                case (0, $26Zo0$PdfActionType).URI:
                    window.open(annotation.target.action.uri, "_blank");
                    break;
            }
            else pdfNavigator?.gotoPage({
                pageIndex: annotation.target.destination.pageIndex
            }, "annotation");
        }
    }, [
        pdfNavigator,
        page,
        annotation,
        props.onClick
    ]);
    return /*#__PURE__*/ (0, $26Zo0$jsx)((0, $90392c2362c38fa6$export$5c234731547f435d), {
        className: "pdf__annotation--link",
        annotation: annotation,
        scaleFactor: scaleFactor,
        rotation: rotation,
        children: /*#__PURE__*/ (0, $26Zo0$jsx)("a", {
            target: "_blank",
            href: href,
            onClick: onClick,
            children: annotation.text
        })
    });
}


var $b5369804d443c95f$exports = {};

$parcel$export($b5369804d443c95f$exports, "PdfPageTextAnnotation", () => $b5369804d443c95f$export$66b5d5fe7e1e26fd);




function $b5369804d443c95f$export$66b5d5fe7e1e26fd(props) {
    const { annotation: annotation , scaleFactor: scaleFactor , rotation: rotation  } = props;
    return /*#__PURE__*/ (0, $26Zo0$jsx)((0, $90392c2362c38fa6$export$5c234731547f435d), {
        className: "pdf__annotation--text",
        annotation: annotation,
        scaleFactor: scaleFactor,
        rotation: rotation,
        children: /*#__PURE__*/ (0, $26Zo0$jsx)("span", {
            children: annotation.text
        })
    });
}


$parcel$exportWildcard($07b3c3798c23c353$exports, $333cea2512b8496b$exports);
$parcel$exportWildcard($07b3c3798c23c353$exports, $bee92c8a4a717122$exports);
$parcel$exportWildcard($07b3c3798c23c353$exports, $69732219dafb7ef9$exports);
$parcel$exportWildcard($07b3c3798c23c353$exports, $841bb2f3f8c131a5$exports);
$parcel$exportWildcard($07b3c3798c23c353$exports, $ee253befb055c9b3$exports);
$parcel$exportWildcard($07b3c3798c23c353$exports, $52f2391f43913ff8$exports);
$parcel$exportWildcard($07b3c3798c23c353$exports, $e0a2a8ce1309f07a$exports);
$parcel$exportWildcard($07b3c3798c23c353$exports, $90392c2362c38fa6$exports);
$parcel$exportWildcard($07b3c3798c23c353$exports, $e5cd5d23b7291648$exports);
$parcel$exportWildcard($07b3c3798c23c353$exports, $b5369804d443c95f$exports);




export {$6e4b5bac317f07c8$export$c50b8951719f4254 as PdfNavigator, $1073897fabf29df3$export$caa2ab773e33e5e as PdfNavigatorContext, $1073897fabf29df3$export$e54912d9d6938cde as PdfNavigatorContextProvider, $1073897fabf29df3$export$5783548f96893eea as usePdfNavigator, $86b30a910630ea4a$export$2b57e2eec3927466 as PdfApplication, $6169e2edbe1b2846$export$d428584fab51ca5c as PdfApplicationMode, $6169e2edbe1b2846$export$176a77a47ca6f551 as PdfApplicationContext, $6169e2edbe1b2846$export$97649174a84438ac as PdfApplicationContextProvider, $6169e2edbe1b2846$export$8140ffd75f17fcde as usePdfApplication, $160fce9cb522dfc3$export$d46c104bc6d5cb7e as PdfDocument, $33b41438855052f4$export$fee7bd7de68330f1 as PdfDocumentContext, $33b41438855052f4$export$f1798209adbb5a03 as PdfDocumentContextProvider, $33b41438855052f4$export$3a01b9f380b97660 as usePdfDocument, $868e6beb025e0594$export$656d74ab10d4ec31 as PdfEngineContext, $868e6beb025e0594$export$ac36c6f7cf6ec8da as PdfEngineContextProvider, $868e6beb025e0594$export$6dabc89b58a60ab3 as usePdfEngine, $1735914b47eebfb2$export$164de7ab8df77ef0 as defaultTheme, $1735914b47eebfb2$export$2c657da244d00bd6 as ThemeContext, $1735914b47eebfb2$export$59c2a5d3b0139bc8 as ThemeContextProvider, $1735914b47eebfb2$export$93d4e7f90805808f as useTheme, $333cea2512b8496b$export$e926676385687eaf as ErrorBoundary, $bee92c8a4a717122$export$4c7b7fca4aeb9016 as PDF_NAVIGATOR_SOURCE_TOOLBAR, $bee92c8a4a717122$export$88448ef14ae22a2d as PdfToolbar, $69732219dafb7ef9$export$65978a2e0d68c048 as PDF_NAVIGATOR_SOURCE_THUMBNAILS, $69732219dafb7ef9$export$d783f7eb7c78aaf1 as PdfThumbnails, $69732219dafb7ef9$export$95e001485d557055 as PdfThumbnail, $841bb2f3f8c131a5$export$13482b88be5917db as PDF_NAVIGATOR_SOURCE_OUTLINES, $841bb2f3f8c131a5$export$e47befc34cb62abc as PdfBookmarks, $841bb2f3f8c131a5$export$cbd49cefa3e29d3 as PdfBookmarkEntry, $ee253befb055c9b3$export$93d718cb74c89323 as PDF_NAVIGATOR_SOURCE_PAGES, $ee253befb055c9b3$export$c1c3c2d00ca886b as PDF_PAGE_DEFAULT_GAP, $ee253befb055c9b3$export$de646539ee056018 as PdfPages, $ee253befb055c9b3$export$1686f89eb33d2b08 as PdfPage, $52f2391f43913ff8$export$3cc2f0efd44954a5 as PdfPageCanvas, $e0a2a8ce1309f07a$export$f4b87b3193e18e82 as PdfPageAnnotations, $90392c2362c38fa6$export$5c234731547f435d as PdfPageAnnotationBase, $e5cd5d23b7291648$export$7fe83d2582775c38 as PdfPageLinkAnnotation, $b5369804d443c95f$export$66b5d5fe7e1e26fd as PdfPageTextAnnotation};
//# sourceMappingURL=index.mjs.map
