@pdf-viewer/react 0.7.0-beta.1 → 0.8.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{RPDefaultLayout-97effa3a.js → RPDefaultLayout-3d9595ed.js} +223 -220
- package/dist/components/RPController.js +1 -1
- package/dist/components/RPPages.js +3 -2
- package/dist/components/RPProvider.js +5 -3
- package/dist/components/layout/RPDefaultLayout.js +1 -1
- package/dist/components/layout/sidebar/RPSidebar.js +1 -1
- package/dist/components/layout/sidebar/Thumbnail.js +1 -1
- package/dist/components/layout/sidebar/Thumbnails.js +1 -1
- package/dist/components/layout/toolbar/DocumentDialog.js +1 -1
- package/dist/components/layout/toolbar/FileDownloadTool.js +1 -1
- package/dist/components/layout/toolbar/MostPageTool.js +1 -1
- package/dist/components/layout/toolbar/OtherTool.js +1 -1
- package/dist/components/layout/toolbar/Paginate.js +1 -1
- package/dist/components/layout/toolbar/PrintTool.js +1 -1
- package/dist/components/layout/toolbar/RPToolbar.js +1 -1
- package/dist/components/layout/toolbar/RPToolbarEnd.js +1 -1
- package/dist/components/layout/toolbar/SearchTool.js +1 -1
- package/dist/components/layout/toolbar/ZoomTool.js +1 -1
- package/dist/components/page/AnnotationLayer.js +1 -1
- package/dist/components/page/CanvasLayer.js +1 -1
- package/dist/components/page/DualPage.js +1 -1
- package/dist/components/page/RPPage.js +1 -1
- package/dist/components/page/SinglePage.js +1 -1
- package/dist/components/page/TextLayer.js +1 -1
- package/dist/components/ui/LoadingIndicator.js +1 -1
- package/dist/contexts/PaginationContext.js +1 -1
- package/dist/contexts/PrintContext.js +1 -1
- package/dist/contexts/SearchContext.js +1 -1
- package/dist/contexts/ThumbnailsContext.js +1 -1
- package/dist/main.js +15 -11
- package/dist/types/main.d.ts +2 -0
- package/dist/types/utils/hooks/usePinch.d.ts +1 -0
- package/dist/utils/hooks/useFileDownload.js +1 -1
- package/dist/utils/hooks/useLicense.js +1 -1
- package/dist/utils/hooks/usePaginate.js +1 -1
- package/dist/utils/hooks/usePinch.js +28 -0
- package/dist/utils/hooks/usePrint.js +1 -1
- package/dist/utils/hooks/useScrollToPage.js +1 -1
- package/dist/utils/hooks/useSearch.js +1 -1
- package/dist/utils/hooks/useThumbnail.js +1 -1
- package/dist/utils/hooks/useVirtualReactWindow.js +1 -1
- package/package.json +1 -1
|
@@ -46,34 +46,35 @@ import { sanitizeExternalUrl as ir } from "./utils/sanitizeExternalUrl.js";
|
|
|
46
46
|
import { useWatermark as cr } from "./utils/hooks/useWatermark.js";
|
|
47
47
|
import { useMousePressed as lr } from "./utils/hooks/useMousePressed.js";
|
|
48
48
|
import { useGrabScroll as ur } from "./utils/hooks/useGrabScroll.js";
|
|
49
|
+
import { usePinch as dr } from "./utils/hooks/usePinch.js";
|
|
49
50
|
import { getThumbnailViewport as yt } from "./utils/getThumbnailViewport.js";
|
|
50
|
-
import { useDebounce as
|
|
51
|
-
import { appConsole as
|
|
51
|
+
import { useDebounce as pr } from "./utils/hooks/useDebounce.js";
|
|
52
|
+
import { appConsole as hr } from "./utils/appConsole.js";
|
|
52
53
|
import { FileUploadTool as Yt } from "./components/layout/toolbar/FileUploadTool.js";
|
|
53
|
-
import { DarkModeTool as
|
|
54
|
-
import { ThreeDotIcon as
|
|
54
|
+
import { DarkModeTool as mr } from "./components/layout/toolbar/DarkModeTool.js";
|
|
55
|
+
import { ThreeDotIcon as fr } from "./components/icons/ThreeDotIcon.js";
|
|
55
56
|
import { UIDropDown as ft } from "./components/ui/DropDown.js";
|
|
56
|
-
import { u as gt, a as Le, c as Re, b as vt, d as
|
|
57
|
-
import { c as
|
|
57
|
+
import { u as gt, a as Le, c as Re, b as vt, d as gr, e as vr, h as _r, f as wr, F as br, D as Cr, g as Ke, i as Pr, G as ke } from "./index-3459164c.js";
|
|
58
|
+
import { c as Tr, e as Sr, a as yr } from "./index-743c36f0.js";
|
|
58
59
|
import { CloseIcon as Qt } from "./components/icons/CloseIcon.js";
|
|
59
|
-
import { PropertyItem as
|
|
60
|
-
import { useOtherToolContext as
|
|
61
|
-
import { DocumentProperties as
|
|
62
|
-
import { RotateTool as
|
|
63
|
-
import { ScrollModeTool as
|
|
60
|
+
import { PropertyItem as Ir } from "./components/layout/toolbar/PropertyItem.js";
|
|
61
|
+
import { useOtherToolContext as xr, OtherToolProvider as Rr } from "./contexts/OtherToolContext.js";
|
|
62
|
+
import { DocumentProperties as Mr } from "./components/layout/toolbar/DocumentProperties.js";
|
|
63
|
+
import { RotateTool as Nr } from "./components/layout/toolbar/RotateTool.js";
|
|
64
|
+
import { ScrollModeTool as Lr } from "./components/layout/toolbar/ScrollModeTool.js";
|
|
64
65
|
import { MenuSeparator as _t } from "./components/layout/toolbar/MenuSeparator.js";
|
|
65
|
-
import { FileDownloadDefaultIcon as
|
|
66
|
+
import { FileDownloadDefaultIcon as Er } from "./components/icons/FileDownloadDefaultIcon.js";
|
|
66
67
|
import { MenuItem as he } from "./components/layout/toolbar/MenuItem.js";
|
|
67
|
-
import { PrintDefaultTool as
|
|
68
|
+
import { PrintDefaultTool as Or } from "./components/icons/PrintDefaultIcon.js";
|
|
68
69
|
import { FullScreenTool as en } from "./components/layout/toolbar/FullScreenTool.js";
|
|
69
70
|
import { GoToDownIcon as tn } from "./components/icons/GoToDownIcon.js";
|
|
70
|
-
import { SelectionModeTool as
|
|
71
|
-
import { ZoomInIcon as
|
|
72
|
-
import { ZoomOutIcon as
|
|
71
|
+
import { SelectionModeTool as Dr } from "./components/layout/toolbar/SelectionModeTool.js";
|
|
72
|
+
import { ZoomInIcon as Ar } from "./components/icons/ZoomInIcon.js";
|
|
73
|
+
import { ZoomOutIcon as zr } from "./components/icons/ZoomOutIcon.js";
|
|
73
74
|
import { PAGE_PADDING as It } from "./utils/constants.js";
|
|
74
|
-
import { SearchIcon as
|
|
75
|
+
import { SearchIcon as Fr } from "./components/icons/SearchIcon.js";
|
|
75
76
|
import { UICheckbox as xt } from "./components/ui/Checkbox.js";
|
|
76
|
-
import { ClearIcon as
|
|
77
|
+
import { ClearIcon as kr } from "./components/icons/ClearIcon.js";
|
|
77
78
|
import './assets/RPDefaultLayout.css';const nn = () => {
|
|
78
79
|
const { viewMode: e } = qe(), { scrollMode: t } = Te(), { virtualScrollRef: n, pageScrollElementRef: r } = Ze(), { setFocusedPage: o } = oe(), a = $(), { columnCount: c } = Bt(), i = ht(), l = $(t), p = $(e);
|
|
79
80
|
F(() => {
|
|
@@ -106,8 +107,8 @@ import './assets/RPDefaultLayout.css';const nn = () => {
|
|
|
106
107
|
},
|
|
107
108
|
[c, h, o]
|
|
108
109
|
) };
|
|
109
|
-
},
|
|
110
|
-
const [t, n] = W(e), [r, o] = W(0), { scrollToPage: a } = nn(), c = $(1), { isScrolling: i } = Kt(), { viewMode: l } = qe(), { scrollMode: p } = Te(), h =
|
|
110
|
+
}, Wr = (e = 1) => {
|
|
111
|
+
const [t, n] = W(e), [r, o] = W(0), { scrollToPage: a } = nn(), c = $(1), { isScrolling: i } = Kt(), { viewMode: l } = qe(), { scrollMode: p } = Te(), h = pr(t, 100), f = M(
|
|
111
112
|
(v) => {
|
|
112
113
|
if (!/^[0-9]*$/g.test(v.toString()) || !v)
|
|
113
114
|
return { success: !1, currentPage: c.current };
|
|
@@ -151,9 +152,9 @@ import './assets/RPDefaultLayout.css';const nn = () => {
|
|
|
151
152
|
}
|
|
152
153
|
}), oe = () => {
|
|
153
154
|
const e = $e(rn);
|
|
154
|
-
return typeof (e == null ? void 0 : e.focusedPage) > "u" &&
|
|
155
|
-
},
|
|
156
|
-
const { initialPage: t = 1 } = Un(), { pdf: n } = ne(), { focusedPage: r, totalPages: o, setFocusedPage: a, setTotalPages: c, goToPage: i, nextPage: l, prevPage: p } =
|
|
155
|
+
return typeof (e == null ? void 0 : e.focusedPage) > "u" && hr.error("Please use this hooks inside children component of RPController or RPLayout"), e;
|
|
156
|
+
}, zs = ({ children: e }) => {
|
|
157
|
+
const { initialPage: t = 1 } = Un(), { pdf: n } = ne(), { focusedPage: r, totalPages: o, setFocusedPage: a, setTotalPages: c, goToPage: i, nextPage: l, prevPage: p } = Wr(t);
|
|
157
158
|
return F(() => {
|
|
158
159
|
n != null && n.numPages && c(n.numPages);
|
|
159
160
|
}, [n, c, o, t]), F(() => {
|
|
@@ -176,7 +177,7 @@ import './assets/RPDefaultLayout.css';const nn = () => {
|
|
|
176
177
|
}
|
|
177
178
|
);
|
|
178
179
|
};
|
|
179
|
-
const
|
|
180
|
+
const Hr = () => {
|
|
180
181
|
const { pdf: e, pages: t } = ne(), [n, r] = W({
|
|
181
182
|
loadedPages: 0,
|
|
182
183
|
totalPages: 0,
|
|
@@ -353,8 +354,8 @@ const Wr = () => {
|
|
|
353
354
|
console.error("Error in setOnError callback:", t);
|
|
354
355
|
}
|
|
355
356
|
}
|
|
356
|
-
}),
|
|
357
|
-
const [t, n] = W(null), [r, o] = W(null), { print: a, cancel: c, progress: i, isComplete: l, isError: p, error: h } =
|
|
357
|
+
}), Fs = ({ children: e }) => {
|
|
358
|
+
const [t, n] = W(null), [r, o] = W(null), { print: a, cancel: c, progress: i, isComplete: l, isError: p, error: h } = Hr(), f = M((v) => {
|
|
358
359
|
v && typeof v == "function" && o(() => v);
|
|
359
360
|
}, []), u = (v) => {
|
|
360
361
|
h && v(h);
|
|
@@ -389,7 +390,7 @@ const Wr = () => {
|
|
|
389
390
|
if (!e)
|
|
390
391
|
throw new Error("usePrintContext must be used within a PrintProvider");
|
|
391
392
|
return e;
|
|
392
|
-
},
|
|
393
|
+
}, $r = () => {
|
|
393
394
|
const [e, t] = W({}), { pages: n } = ne(), { rotate: r } = Ve(), o = A(() => Object.keys(e).length, [e]), a = M(
|
|
394
395
|
(i) => {
|
|
395
396
|
if (!n.size)
|
|
@@ -477,11 +478,11 @@ const Wr = () => {
|
|
|
477
478
|
setActive: (e) => {
|
|
478
479
|
},
|
|
479
480
|
active: !1
|
|
480
|
-
}), sn = () => $e(an),
|
|
481
|
+
}), sn = () => $e(an), ks = ({
|
|
481
482
|
children: e,
|
|
482
483
|
initialThumbnailsVisible: t
|
|
483
484
|
}) => {
|
|
484
|
-
const { thumbnailPages: n, addPage: r, addToPage: o, thumbnailLength: a } =
|
|
485
|
+
const { thumbnailPages: n, addPage: r, addToPage: o, thumbnailLength: a } = $r(), [c, i] = W(t);
|
|
485
486
|
return /* @__PURE__ */ s(
|
|
486
487
|
an.Provider,
|
|
487
488
|
{
|
|
@@ -489,7 +490,7 @@ const Wr = () => {
|
|
|
489
490
|
children: e
|
|
490
491
|
}
|
|
491
492
|
);
|
|
492
|
-
},
|
|
493
|
+
}, Gr = (e = {}, t = "") => {
|
|
493
494
|
const [n, r] = W(t), [o, a] = W(!1), { pdf: c, pages: i } = ne(), l = ht(), p = $(!n), { currentZoom: h } = Ue(), [f, u] = W([]), { setFocusedPage: m } = oe(), [g, _] = W(0), { pageScrollElementRef: v, virtualScrollableElementRef: C } = Ze(), { scrollMode: S } = Te(), [P, R] = W(null), d = $({}), b = A(() => g === 0 ? null : f[g - 1], [g, f]), w = A(() => f.length, [f]);
|
|
494
495
|
F(() => {
|
|
495
496
|
if (!b || !i)
|
|
@@ -595,7 +596,7 @@ const Wr = () => {
|
|
|
595
596
|
currentMatchElement: null,
|
|
596
597
|
setCurrentMatchElement: (e) => {
|
|
597
598
|
}
|
|
598
|
-
}),
|
|
599
|
+
}), Ws = ({
|
|
599
600
|
children: e,
|
|
600
601
|
initialSearch: t
|
|
601
602
|
}) => {
|
|
@@ -611,7 +612,7 @@ const Wr = () => {
|
|
|
611
612
|
prevMatch: u,
|
|
612
613
|
currentMatchElement: m,
|
|
613
614
|
setCurrentMatchElement: g
|
|
614
|
-
} =
|
|
615
|
+
} = Gr(n, t);
|
|
615
616
|
return /* @__PURE__ */ s(
|
|
616
617
|
cn.Provider,
|
|
617
618
|
{
|
|
@@ -645,7 +646,7 @@ const Wr = () => {
|
|
|
645
646
|
"rp-page-wrapper": "_rp-page-wrapper_h7a2q_1",
|
|
646
647
|
"rp-page": "_rp-page_h7a2q_1",
|
|
647
648
|
"rp-loader-wrapper": "_rp-loader-wrapper_h7a2q_14"
|
|
648
|
-
},
|
|
649
|
+
}, Vr = (e) => {
|
|
649
650
|
const { pageNumber: t, onLoaded: n, onLoading: r } = e, o = $(null), { pages: a } = ne(), { rotate: c } = Ve(), i = $(), { currentZoom: l } = Ue();
|
|
650
651
|
return F(() => {
|
|
651
652
|
if (!a || l === 0)
|
|
@@ -666,7 +667,7 @@ const Wr = () => {
|
|
|
666
667
|
}, Je = {
|
|
667
668
|
"rp-text-layer": "_rp-text-layer_1mgyz_1",
|
|
668
669
|
"rp-text-layer-text": "_rp-text-layer-text_1mgyz_9"
|
|
669
|
-
},
|
|
670
|
+
}, Ur = (e) => {
|
|
670
671
|
const { pageNumber: t } = e, { pages: n } = ne(), r = $(null), { matches: o, currentMatch: a, setCurrentMatchElement: c } = ln(), [i, l] = W(
|
|
671
672
|
[]
|
|
672
673
|
), p = $(), h = $(), f = $(), u = A(() => o.filter((g) => g.pageIndex === t - 1), [o, t]), m = M(
|
|
@@ -728,16 +729,16 @@ const Wr = () => {
|
|
|
728
729
|
ref: r
|
|
729
730
|
}
|
|
730
731
|
);
|
|
731
|
-
},
|
|
732
|
+
}, qr = {
|
|
732
733
|
"rp-annotation-layer": "_rp-annotation-layer_o0ksd_1"
|
|
733
734
|
}, un = ["click", "dblclick", "mouseover", "input", "change"];
|
|
734
|
-
let
|
|
735
|
+
let Zr = "https://unpkg.com/pdfjs-dist@4.4.168/web/images/";
|
|
735
736
|
const ct = /* @__PURE__ */ new Map(), dn = (e, t) => `${e.loadingTask.docId}___${t.num}R${t.gen === 0 ? "" : t.gen}`;
|
|
736
|
-
function
|
|
737
|
+
function jr(e, t) {
|
|
737
738
|
const n = dn(e, t);
|
|
738
739
|
return ct.has(n) ? ct.get(n) ?? null : null;
|
|
739
740
|
}
|
|
740
|
-
const
|
|
741
|
+
const Br = (e, t, n) => {
|
|
741
742
|
ct.set(dn(e, t), n);
|
|
742
743
|
}, Rt = (e, t) => {
|
|
743
744
|
switch (t[1].name) {
|
|
@@ -776,16 +777,16 @@ const jr = (e, t, n) => {
|
|
|
776
777
|
async function pn(e, t) {
|
|
777
778
|
let n;
|
|
778
779
|
if (typeof t == "string" ? n = await e.getDestination(t) : n = t, n && typeof n[0] == "object" && n[0] !== null) {
|
|
779
|
-
const r = n[0], o =
|
|
780
|
+
const r = n[0], o = jr(e, r);
|
|
780
781
|
if (o === null) {
|
|
781
782
|
const a = await e.getPageIndex(r);
|
|
782
|
-
return
|
|
783
|
+
return Br(e, r, a), await pn(e, n);
|
|
783
784
|
} else
|
|
784
785
|
return Rt(o, n);
|
|
785
786
|
} else
|
|
786
787
|
return Rt(n[0], n);
|
|
787
788
|
}
|
|
788
|
-
function
|
|
789
|
+
function Kr(e) {
|
|
789
790
|
const { id: t, url: n, unsafeUrl: r } = e;
|
|
790
791
|
new MutationObserver((a, c) => {
|
|
791
792
|
const i = document.querySelector(`[data-annotation-id="${t}"]`);
|
|
@@ -795,7 +796,7 @@ function Br(e) {
|
|
|
795
796
|
}
|
|
796
797
|
}).observe(document.body, { childList: !0, subtree: !0 });
|
|
797
798
|
}
|
|
798
|
-
const
|
|
799
|
+
const Xr = (e) => {
|
|
799
800
|
const n = e.target.parentNode;
|
|
800
801
|
if (!n)
|
|
801
802
|
return;
|
|
@@ -833,7 +834,7 @@ const Kr = (e) => {
|
|
|
833
834
|
r(l);
|
|
834
835
|
});
|
|
835
836
|
};
|
|
836
|
-
function
|
|
837
|
+
function Jr(e, t) {
|
|
837
838
|
for (const n of un)
|
|
838
839
|
e.addEventListener(n, t);
|
|
839
840
|
}
|
|
@@ -841,7 +842,7 @@ function Nt(e, t) {
|
|
|
841
842
|
for (const n of un)
|
|
842
843
|
e.removeEventListener(n, t);
|
|
843
844
|
}
|
|
844
|
-
const
|
|
845
|
+
const Yr = (e) => {
|
|
845
846
|
const { pageNumber: t } = e, n = $(null), { pages: r, pdf: o } = ne(), a = $(), [c, i] = W(), { setFocusedPage: l, goToPage: p } = oe(), { scrollMode: h } = Te(), f = A(() => r.get(t), [r, t]), u = A(() => f == null ? void 0 : f.page.getViewport(), [f]);
|
|
846
847
|
F(() => {
|
|
847
848
|
a.current && (a.current.div.replaceChildren(), a.current = void 0);
|
|
@@ -854,7 +855,7 @@ const Jr = (e) => {
|
|
|
854
855
|
}, [f]);
|
|
855
856
|
const g = M(
|
|
856
857
|
(_) => {
|
|
857
|
-
|
|
858
|
+
Xr(_), !(!c || !o) && (h === J.PAGE_SCROLLING ? Mt(_, c, o, (v) => l(v.pageIndex + 1)) : Mt(_, c, o, (v) => p(v.pageIndex + 1)));
|
|
858
859
|
},
|
|
859
860
|
[o, c, p, l, h]
|
|
860
861
|
);
|
|
@@ -872,7 +873,7 @@ const Jr = (e) => {
|
|
|
872
873
|
const { annotationType: S } = C;
|
|
873
874
|
switch (S) {
|
|
874
875
|
case at.Link:
|
|
875
|
-
|
|
876
|
+
Kr(C);
|
|
876
877
|
break;
|
|
877
878
|
case at.Widget:
|
|
878
879
|
break;
|
|
@@ -897,14 +898,14 @@ const Jr = (e) => {
|
|
|
897
898
|
div: n.current,
|
|
898
899
|
viewport: _.clone({ dontFlip: !0 }),
|
|
899
900
|
page: f.page,
|
|
900
|
-
imageResourcesPath:
|
|
901
|
+
imageResourcesPath: Zr,
|
|
901
902
|
renderForms: !1,
|
|
902
903
|
linkService: new sr(),
|
|
903
904
|
downloadManager: null,
|
|
904
905
|
enableScripting: !1
|
|
905
906
|
});
|
|
906
907
|
})().then(() => {
|
|
907
|
-
n.current &&
|
|
908
|
+
n.current && Jr(n.current, g);
|
|
908
909
|
}), () => {
|
|
909
910
|
n.current && Nt(n.current, g);
|
|
910
911
|
};
|
|
@@ -913,11 +914,11 @@ const Jr = (e) => {
|
|
|
913
914
|
{
|
|
914
915
|
"data-rp": `page-${t}-annotationLayer`,
|
|
915
916
|
style: { width: `${u == null ? void 0 : u.width}px`, height: `${u == null ? void 0 : u.height}px` },
|
|
916
|
-
className:
|
|
917
|
+
className: qr["rp-annotation-layer"],
|
|
917
918
|
ref: n
|
|
918
919
|
}
|
|
919
920
|
);
|
|
920
|
-
},
|
|
921
|
+
}, Qr = Array.from({ length: 21 }, (e, t) => Number((t * 0.05).toFixed(2))), bt = Ge((e, t) => {
|
|
921
922
|
const { pageNumber: n, style: r, onIntersectRatioChange: o, ...a } = e, { pages: c } = ne(), { rotate: i } = Ve(), { textLayer: l } = Gn(), { currentZoom: p } = Ue(), h = $(c.get(n)), [f, u] = W(!1), m = $(null), [g, _] = W({
|
|
922
923
|
width: 0,
|
|
923
924
|
height: 0
|
|
@@ -948,7 +949,7 @@ const Jr = (e) => {
|
|
|
948
949
|
(R) => {
|
|
949
950
|
o && o(n, R[0].intersectionRatio);
|
|
950
951
|
},
|
|
951
|
-
{ threshold:
|
|
952
|
+
{ threshold: Qr }
|
|
952
953
|
);
|
|
953
954
|
return m.current && P.observe(m.current), () => {
|
|
954
955
|
P.disconnect(), o && o(n, -1);
|
|
@@ -976,10 +977,10 @@ const Jr = (e) => {
|
|
|
976
977
|
},
|
|
977
978
|
className: Xe["rp-page"],
|
|
978
979
|
children: [
|
|
979
|
-
/* @__PURE__ */ s(
|
|
980
|
+
/* @__PURE__ */ s(Vr, { onLoading: C, onLoaded: S, pageNumber: n }),
|
|
980
981
|
f && /* @__PURE__ */ s("div", { className: Xe["rp-loader-wrapper"], children: /* @__PURE__ */ s(mt, {}) }),
|
|
981
|
-
l && /* @__PURE__ */ s(
|
|
982
|
-
/* @__PURE__ */ s(
|
|
982
|
+
l && /* @__PURE__ */ s(Ur, { pageNumber: n }),
|
|
983
|
+
/* @__PURE__ */ s(Yr, { pageNumber: n })
|
|
983
984
|
]
|
|
984
985
|
}
|
|
985
986
|
)
|
|
@@ -1006,25 +1007,25 @@ function ut(e, t) {
|
|
|
1006
1007
|
return n.__proto__ = r, n;
|
|
1007
1008
|
}, ut(e, t);
|
|
1008
1009
|
}
|
|
1009
|
-
function
|
|
1010
|
+
function eo(e, t) {
|
|
1010
1011
|
e.prototype = Object.create(t.prototype), e.prototype.constructor = e, ut(e, t);
|
|
1011
1012
|
}
|
|
1012
1013
|
var Et = Number.isNaN || function(t) {
|
|
1013
1014
|
return typeof t == "number" && t !== t;
|
|
1014
1015
|
};
|
|
1015
|
-
function
|
|
1016
|
+
function to(e, t) {
|
|
1016
1017
|
return !!(e === t || Et(e) && Et(t));
|
|
1017
1018
|
}
|
|
1018
|
-
function
|
|
1019
|
+
function no(e, t) {
|
|
1019
1020
|
if (e.length !== t.length)
|
|
1020
1021
|
return !1;
|
|
1021
1022
|
for (var n = 0; n < e.length; n++)
|
|
1022
|
-
if (!
|
|
1023
|
+
if (!to(e[n], t[n]))
|
|
1023
1024
|
return !1;
|
|
1024
1025
|
return !0;
|
|
1025
1026
|
}
|
|
1026
1027
|
function Ye(e, t) {
|
|
1027
|
-
t === void 0 && (t =
|
|
1028
|
+
t === void 0 && (t = no);
|
|
1028
1029
|
var n, r = [], o, a = !1;
|
|
1029
1030
|
function c() {
|
|
1030
1031
|
for (var i = [], l = 0; l < arguments.length; l++)
|
|
@@ -1045,7 +1046,7 @@ function Ot(e, t) {
|
|
|
1045
1046
|
}
|
|
1046
1047
|
return n;
|
|
1047
1048
|
}
|
|
1048
|
-
var
|
|
1049
|
+
var ro = typeof performance == "object" && typeof performance.now == "function", Dt = ro ? function() {
|
|
1049
1050
|
return performance.now();
|
|
1050
1051
|
} : function() {
|
|
1051
1052
|
return Date.now();
|
|
@@ -1053,7 +1054,7 @@ var no = typeof performance == "object" && typeof performance.now == "function",
|
|
|
1053
1054
|
function At(e) {
|
|
1054
1055
|
cancelAnimationFrame(e.id);
|
|
1055
1056
|
}
|
|
1056
|
-
function
|
|
1057
|
+
function oo(e, t) {
|
|
1057
1058
|
var n = Dt();
|
|
1058
1059
|
function r() {
|
|
1059
1060
|
Dt() - n >= t ? e.call(null) : o.id = requestAnimationFrame(r);
|
|
@@ -1064,7 +1065,7 @@ function ro(e, t) {
|
|
|
1064
1065
|
return o;
|
|
1065
1066
|
}
|
|
1066
1067
|
var Qe = -1;
|
|
1067
|
-
function
|
|
1068
|
+
function ao(e) {
|
|
1068
1069
|
if (e === void 0 && (e = !1), Qe === -1 || e) {
|
|
1069
1070
|
var t = document.createElement("div"), n = t.style;
|
|
1070
1071
|
n.width = "50px", n.height = "50px", n.overflow = "scroll", document.body.appendChild(t), Qe = t.offsetWidth - t.clientWidth, document.body.removeChild(t);
|
|
@@ -1081,17 +1082,17 @@ function zt(e) {
|
|
|
1081
1082
|
}
|
|
1082
1083
|
return Ce;
|
|
1083
1084
|
}
|
|
1084
|
-
var
|
|
1085
|
+
var so = 150, io = function(t) {
|
|
1085
1086
|
var n = t.columnIndex;
|
|
1086
1087
|
t.data;
|
|
1087
1088
|
var r = t.rowIndex;
|
|
1088
1089
|
return r + ":" + n;
|
|
1089
1090
|
}, Oe = null, De = null, Ae = null;
|
|
1090
1091
|
process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && (Oe = /* @__PURE__ */ new WeakSet(), De = /* @__PURE__ */ new WeakSet(), Ae = /* @__PURE__ */ new WeakSet());
|
|
1091
|
-
function
|
|
1092
|
+
function co(e) {
|
|
1092
1093
|
var t, n = e.getColumnOffset, r = e.getColumnStartIndexForOffset, o = e.getColumnStopIndexForStartIndex, a = e.getColumnWidth, c = e.getEstimatedTotalHeight, i = e.getEstimatedTotalWidth, l = e.getOffsetForColumnAndAlignment, p = e.getOffsetForRowAndAlignment, h = e.getRowHeight, f = e.getRowOffset, u = e.getRowStartIndexForOffset, m = e.getRowStopIndexForStartIndex, g = e.initInstanceProps, _ = e.shouldResetStyleCacheOnItemSizeChange, v = e.validateProps;
|
|
1093
1094
|
return t = /* @__PURE__ */ function(C) {
|
|
1094
|
-
|
|
1095
|
+
eo(S, C);
|
|
1095
1096
|
function S(R) {
|
|
1096
1097
|
var d;
|
|
1097
1098
|
return d = C.call(this, R) || this, d._instanceProps = g(d.props, Lt(d)), d._resetIsScrollingTimeoutId = null, d._outerRef = void 0, d.state = {
|
|
@@ -1169,7 +1170,7 @@ function io(e) {
|
|
|
1169
1170
|
var w = d.props.outerRef;
|
|
1170
1171
|
d._outerRef = b, typeof w == "function" ? w(b) : w != null && typeof w == "object" && w.hasOwnProperty("current") && (w.current = b);
|
|
1171
1172
|
}, d._resetIsScrollingDebounced = function() {
|
|
1172
|
-
d._resetIsScrollingTimeoutId !== null && At(d._resetIsScrollingTimeoutId), d._resetIsScrollingTimeoutId =
|
|
1173
|
+
d._resetIsScrollingTimeoutId !== null && At(d._resetIsScrollingTimeoutId), d._resetIsScrollingTimeoutId = oo(d._resetIsScrolling, so);
|
|
1173
1174
|
}, d._resetIsScrolling = function() {
|
|
1174
1175
|
d._resetIsScrollingTimeoutId = null, d.setState({
|
|
1175
1176
|
isScrolling: !1
|
|
@@ -1179,7 +1180,7 @@ function io(e) {
|
|
|
1179
1180
|
}, d;
|
|
1180
1181
|
}
|
|
1181
1182
|
S.getDerivedStateFromProps = function(d, b) {
|
|
1182
|
-
return
|
|
1183
|
+
return lo(d, b), v(d), null;
|
|
1183
1184
|
};
|
|
1184
1185
|
var P = S.prototype;
|
|
1185
1186
|
return P.scrollTo = function(d) {
|
|
@@ -1194,7 +1195,7 @@ function io(e) {
|
|
|
1194
1195
|
};
|
|
1195
1196
|
}, this._resetIsScrollingDebounced);
|
|
1196
1197
|
}, P.scrollToItem = function(d) {
|
|
1197
|
-
var b = d.align, w = b === void 0 ? "auto" : b, T = d.columnIndex, D = d.rowIndex, I = this.props, y = I.columnCount, E = I.height, x = I.rowCount, N = I.width, L = this.state, k = L.scrollLeft, G = L.scrollTop, q =
|
|
1198
|
+
var b = d.align, w = b === void 0 ? "auto" : b, T = d.columnIndex, D = d.rowIndex, I = this.props, y = I.columnCount, E = I.height, x = I.rowCount, N = I.width, L = this.state, k = L.scrollLeft, G = L.scrollTop, q = ao();
|
|
1198
1199
|
T !== void 0 && (T = Math.max(0, Math.min(T, y - 1))), D !== void 0 && (D = Math.max(0, Math.min(D, x - 1)));
|
|
1199
1200
|
var Z = c(this.props, this._instanceProps), U = i(this.props, this._instanceProps), B = U > N ? q : 0, re = Z > E ? q : 0;
|
|
1200
1201
|
this.scrollTo({
|
|
@@ -1233,7 +1234,7 @@ function io(e) {
|
|
|
1233
1234
|
}, P.componentWillUnmount = function() {
|
|
1234
1235
|
this._resetIsScrollingTimeoutId !== null && At(this._resetIsScrollingTimeoutId);
|
|
1235
1236
|
}, P.render = function() {
|
|
1236
|
-
var d = this.props, b = d.children, w = d.className, T = d.columnCount, D = d.direction, I = d.height, y = d.innerRef, E = d.innerElementType, x = d.innerTagName, N = d.itemData, L = d.itemKey, k = L === void 0 ?
|
|
1237
|
+
var d = this.props, b = d.children, w = d.className, T = d.columnCount, D = d.direction, I = d.height, y = d.innerRef, E = d.innerElementType, x = d.innerTagName, N = d.itemData, L = d.itemKey, k = L === void 0 ? io : L, G = d.outerElementType, q = d.outerTagName, Z = d.rowCount, U = d.style, B = d.useIsScrolling, re = d.width, pe = this.state.isScrolling, K = this._getHorizontalRangeToRender(), Y = K[0], z = K[1], H = this._getVerticalRangeToRender(), j = H[0], se = H[1], Se = [];
|
|
1237
1238
|
if (T > 0 && Z)
|
|
1238
1239
|
for (var me = j; me <= se; me++)
|
|
1239
1240
|
for (var fe = Y; fe <= z; fe++)
|
|
@@ -1301,7 +1302,7 @@ function io(e) {
|
|
|
1301
1302
|
useIsScrolling: !1
|
|
1302
1303
|
}, t;
|
|
1303
1304
|
}
|
|
1304
|
-
var
|
|
1305
|
+
var lo = function(t, n) {
|
|
1305
1306
|
var r = t.children, o = t.direction, a = t.height, c = t.innerTagName, i = t.outerTagName, l = t.overscanColumnsCount, p = t.overscanCount, h = t.overscanRowsCount, f = t.width, u = n.instance;
|
|
1306
1307
|
if (process.env.NODE_ENV !== "production") {
|
|
1307
1308
|
if (typeof p == "number" && Oe && !Oe.has(u) && (Oe.add(u), console.warn("The overscanCount prop has been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (typeof l == "number" || typeof h == "number") && De && !De.has(u) && (De.add(u), console.warn("The overscanColumnsCount and overscanRowsCount props have been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (c != null || i != null) && Ae && !Ae.has(u) && (Ae.add(u), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.")), r == null)
|
|
@@ -1356,7 +1357,7 @@ var co = function(t, n) {
|
|
|
1356
1357
|
var a, c;
|
|
1357
1358
|
t === "column" ? (a = r.columnMetadataMap, c = r.lastMeasuredColumnIndex) : (a = r.rowMetadataMap, c = r.lastMeasuredRowIndex);
|
|
1358
1359
|
var i = c > 0 ? a[c].offset : 0;
|
|
1359
|
-
return i >= o ? fn(t, n, r, c, 0, o) :
|
|
1360
|
+
return i >= o ? fn(t, n, r, c, 0, o) : uo(t, n, r, Math.max(0, c), o);
|
|
1360
1361
|
}, fn = function(t, n, r, o, a, c) {
|
|
1361
1362
|
for (; a <= o; ) {
|
|
1362
1363
|
var i = a + Math.floor((o - a) / 2), l = ue(t, n, i, r).offset;
|
|
@@ -1365,7 +1366,7 @@ var co = function(t, n) {
|
|
|
1365
1366
|
l < c ? a = i + 1 : l > c && (o = i - 1);
|
|
1366
1367
|
}
|
|
1367
1368
|
return a > 0 ? a - 1 : 0;
|
|
1368
|
-
},
|
|
1369
|
+
}, uo = function(t, n, r, o, a) {
|
|
1369
1370
|
for (var c = t === "column" ? n.columnCount : n.rowCount, i = 1; o < c && ue(t, n, o, r).offset < a; )
|
|
1370
1371
|
o += i, i *= 2;
|
|
1371
1372
|
return fn(t, n, r, Math.min(o, c - 1), Math.floor(o / 2), a);
|
|
@@ -1382,7 +1383,7 @@ var co = function(t, n) {
|
|
|
1382
1383
|
default:
|
|
1383
1384
|
return a >= u && a <= f ? a : u > f || a < u ? u : f;
|
|
1384
1385
|
}
|
|
1385
|
-
},
|
|
1386
|
+
}, po = /* @__PURE__ */ co({
|
|
1386
1387
|
getColumnOffset: function(t, n, r) {
|
|
1387
1388
|
return ue("column", t, n, r).offset;
|
|
1388
1389
|
},
|
|
@@ -1464,12 +1465,12 @@ function Ht(e, t) {
|
|
|
1464
1465
|
return !0;
|
|
1465
1466
|
return !1;
|
|
1466
1467
|
}
|
|
1467
|
-
var
|
|
1468
|
-
function
|
|
1469
|
-
var n = e.style, r = Ot(e,
|
|
1468
|
+
var ho = ["style"], mo = ["style"];
|
|
1469
|
+
function fo(e, t) {
|
|
1470
|
+
var n = e.style, r = Ot(e, ho), o = t.style, a = Ot(t, mo);
|
|
1470
1471
|
return !Ht(n, o) && !Ht(r, a);
|
|
1471
1472
|
}
|
|
1472
|
-
const
|
|
1473
|
+
const go = () => {
|
|
1473
1474
|
const { viewMode: e } = qe(), { scrollMode: t } = Te(), { setColumnCount: n } = Bt(), { virtualScrollableElementRef: r } = Ze(), o = ht(), a = M(
|
|
1474
1475
|
(m) => o.widths[m] || 0,
|
|
1475
1476
|
[o]
|
|
@@ -1507,7 +1508,7 @@ tt == null || Vt == null ? (dt = et, pt = function(t) {
|
|
|
1507
1508
|
}, $t);
|
|
1508
1509
|
return [n, r];
|
|
1509
1510
|
});
|
|
1510
|
-
function
|
|
1511
|
+
function vo(e) {
|
|
1511
1512
|
let t, n, r, o, a, c, i;
|
|
1512
1513
|
const l = typeof document < "u" && document.attachEvent;
|
|
1513
1514
|
if (!l) {
|
|
@@ -1579,7 +1580,7 @@ function go(e) {
|
|
|
1579
1580
|
}
|
|
1580
1581
|
};
|
|
1581
1582
|
}
|
|
1582
|
-
class
|
|
1583
|
+
class _o extends Wn {
|
|
1583
1584
|
constructor(...t) {
|
|
1584
1585
|
super(...t), this.state = {
|
|
1585
1586
|
height: this.props.defaultHeight || 0,
|
|
@@ -1620,7 +1621,7 @@ class vo extends Wn {
|
|
|
1620
1621
|
const r = n.ownerDocument.defaultView.ResizeObserver;
|
|
1621
1622
|
r != null ? (this._resizeObserver = new r(() => {
|
|
1622
1623
|
this._timeoutId = setTimeout(this._onResize, 0);
|
|
1623
|
-
}), this._resizeObserver.observe(n)) : (this._detectElementResize =
|
|
1624
|
+
}), this._resizeObserver.observe(n)) : (this._detectElementResize = vo(t), this._detectElementResize.addResizeListener(n, this._onResize)), this._onResize();
|
|
1624
1625
|
}
|
|
1625
1626
|
}
|
|
1626
1627
|
componentWillUnmount() {
|
|
@@ -1658,7 +1659,7 @@ class vo extends Wn {
|
|
|
1658
1659
|
}, !S && t(C));
|
|
1659
1660
|
}
|
|
1660
1661
|
}
|
|
1661
|
-
const
|
|
1662
|
+
const wo = ({ widths: e, heights: t }) => {
|
|
1662
1663
|
const { focusedPage: n, totalPages: r } = oe(), o = A(() => {
|
|
1663
1664
|
const i = [], l = Math.ceil(n / 2) * 2 - 1;
|
|
1664
1665
|
if (i.push(l), l + 1 < r) {
|
|
@@ -1682,7 +1683,7 @@ const _o = ({ widths: e, heights: t }) => {
|
|
|
1682
1683
|
}
|
|
1683
1684
|
], [e, t, o]), c = A(() => a.reduce((i, l) => i + Number(l.width || 0), 0), [a]);
|
|
1684
1685
|
return /* @__PURE__ */ s("div", { style: { width: c, position: "relative" }, children: o.map((i, l) => /* @__PURE__ */ s(bt, { style: a[l], pageNumber: i }, i)) });
|
|
1685
|
-
},
|
|
1686
|
+
}, bo = ({ widths: e, heights: t }) => {
|
|
1686
1687
|
const { focusedPage: n } = oe(), r = A(() => ({
|
|
1687
1688
|
position: "absolute",
|
|
1688
1689
|
width: e(n - 1),
|
|
@@ -1698,7 +1699,7 @@ const _o = ({ widths: e, heights: t }) => {
|
|
|
1698
1699
|
children: /* @__PURE__ */ s(bt, { style: r, pageNumber: n }, n)
|
|
1699
1700
|
}
|
|
1700
1701
|
);
|
|
1701
|
-
},
|
|
1702
|
+
}, Co = Hn(({ columnIndex: e, rowIndex: t, data: n, style: r }) => {
|
|
1702
1703
|
const o = A(() => e + 1 + t * n.columnCount, [e, t, n]);
|
|
1703
1704
|
return /* @__PURE__ */ s(
|
|
1704
1705
|
bt,
|
|
@@ -1709,7 +1710,7 @@ const _o = ({ widths: e, heights: t }) => {
|
|
|
1709
1710
|
},
|
|
1710
1711
|
o
|
|
1711
1712
|
);
|
|
1712
|
-
},
|
|
1713
|
+
}, fo), Hs = () => {
|
|
1713
1714
|
const { getContainer: e, container: t } = cr(), { scrollToPage: n } = nn(), {
|
|
1714
1715
|
virtualScrollRef: r,
|
|
1715
1716
|
getVirtualScrollRef: o,
|
|
@@ -1731,10 +1732,12 @@ const _o = ({ widths: e, heights: t }) => {
|
|
|
1731
1732
|
columnWidth: w,
|
|
1732
1733
|
estimatedColumnWidth: T,
|
|
1733
1734
|
estimatedRowHeight: D
|
|
1734
|
-
} =
|
|
1735
|
+
} = go(), [I, y] = W({}), { isScrolling: E } = Kt(), x = $(), N = $({
|
|
1735
1736
|
scrollTop: 0,
|
|
1736
1737
|
scrollLeft: 0
|
|
1737
|
-
})
|
|
1738
|
+
});
|
|
1739
|
+
dr(t);
|
|
1740
|
+
const { isPressed: L } = lr(), { selectionMode: k } = Vn(), { initializeGrabScroll: G, scrollBehavior: q } = ur({
|
|
1738
1741
|
isPressed: L
|
|
1739
1742
|
}), Z = A(() => k === $n.HAND, [k]), U = M((z, H) => {
|
|
1740
1743
|
y((j) => ({ ...j, [z]: Math.round(H * 100) }));
|
|
@@ -1821,16 +1824,16 @@ const _o = ({ widths: e, heights: t }) => {
|
|
|
1821
1824
|
},
|
|
1822
1825
|
[Z, G, le]
|
|
1823
1826
|
);
|
|
1824
|
-
return /* @__PURE__ */ s("div", { ref: e, tabIndex: -1, className: K, children: /* @__PURE__ */ s(
|
|
1827
|
+
return /* @__PURE__ */ s("div", { ref: e, tabIndex: -1, className: K, children: /* @__PURE__ */ s(_o, { children: ({ width: z, height: H }) => /* @__PURE__ */ s("div", { "data-rp": "pages", ref: Y, style: { width: z, height: H, scrollBehavior: q }, children: m === J.PAGE_SCROLLING ? /* @__PURE__ */ s(
|
|
1825
1828
|
"div",
|
|
1826
1829
|
{
|
|
1827
1830
|
ref: a,
|
|
1828
1831
|
style: { width: z, height: H },
|
|
1829
1832
|
className: Q(le["rp-pages"], le["rp-page-scrolling-wrapper"]),
|
|
1830
|
-
children: g === Fe.DUAL_PAGE ? /* @__PURE__ */ s(
|
|
1833
|
+
children: g === Fe.DUAL_PAGE ? /* @__PURE__ */ s(wo, { widths: w, heights: d }) : /* @__PURE__ */ s(bo, { widths: w, heights: d })
|
|
1831
1834
|
}
|
|
1832
1835
|
) : T ? /* @__PURE__ */ s(
|
|
1833
|
-
|
|
1836
|
+
po,
|
|
1834
1837
|
{
|
|
1835
1838
|
ref: o,
|
|
1836
1839
|
itemData: B,
|
|
@@ -1850,7 +1853,7 @@ const _o = ({ widths: e, heights: t }) => {
|
|
|
1850
1853
|
m === J.HORIZONTAL_SCROLLING ? le["rp-pages-horizontal-scroll"] : ""
|
|
1851
1854
|
),
|
|
1852
1855
|
style: { scrollBehavior: q },
|
|
1853
|
-
children:
|
|
1856
|
+
children: Co
|
|
1854
1857
|
}
|
|
1855
1858
|
) : null }) }) });
|
|
1856
1859
|
}, ye = {
|
|
@@ -1863,13 +1866,13 @@ const _o = ({ widths: e, heights: t }) => {
|
|
|
1863
1866
|
"rp-paginate": "_rp-paginate_1vu6o_1",
|
|
1864
1867
|
"rp-page-input": "_rp-page-input_1vu6o_6",
|
|
1865
1868
|
"rp-total-page": "_rp-total-page_1vu6o_12"
|
|
1866
|
-
},
|
|
1869
|
+
}, Po = () => {
|
|
1867
1870
|
const { prevIcon: e } = ce();
|
|
1868
1871
|
return e || /* @__PURE__ */ s(Me, {});
|
|
1869
|
-
},
|
|
1872
|
+
}, To = () => {
|
|
1870
1873
|
const { nextIcon: e } = ce();
|
|
1871
1874
|
return e || /* @__PURE__ */ s(Me, { style: { transform: "rotate(180deg" } });
|
|
1872
|
-
},
|
|
1875
|
+
}, So = () => {
|
|
1873
1876
|
const { focusedPage: e, totalPages: t, setFocusedPage: n, nextPage: r, prevPage: o, goToPage: a } = oe(), [c, i] = W(e.toString()), { pageNavigationTool: l = !0 } = de(), { isSmallScreen: p } = _e();
|
|
1874
1877
|
F(() => {
|
|
1875
1878
|
i(e.toString());
|
|
@@ -1899,7 +1902,7 @@ const _o = ({ widths: e, heights: t }) => {
|
|
|
1899
1902
|
changePage: n
|
|
1900
1903
|
}
|
|
1901
1904
|
) : l ? /* @__PURE__ */ O("div", { className: nt["rp-paginate"], children: [
|
|
1902
|
-
!p && /* @__PURE__ */ s(ee, { content: "Previous page", children: /* @__PURE__ */ s(X, { onClick: o, disabled: e === 1, children: /* @__PURE__ */ s(
|
|
1905
|
+
!p && /* @__PURE__ */ s(ee, { content: "Previous page", children: /* @__PURE__ */ s(X, { onClick: o, disabled: e === 1, children: /* @__PURE__ */ s(Po, {}) }) }),
|
|
1903
1906
|
/* @__PURE__ */ s(
|
|
1904
1907
|
jt,
|
|
1905
1908
|
{
|
|
@@ -1914,10 +1917,10 @@ const _o = ({ widths: e, heights: t }) => {
|
|
|
1914
1917
|
"/",
|
|
1915
1918
|
t
|
|
1916
1919
|
] }),
|
|
1917
|
-
!p && /* @__PURE__ */ s(ee, { content: "Next page", children: /* @__PURE__ */ s(X, { onClick: r, disabled: e === t, children: /* @__PURE__ */ s(
|
|
1920
|
+
!p && /* @__PURE__ */ s(ee, { content: "Next page", children: /* @__PURE__ */ s(X, { onClick: r, disabled: e === t, children: /* @__PURE__ */ s(To, {}) }) })
|
|
1918
1921
|
] }) : null;
|
|
1919
1922
|
};
|
|
1920
|
-
var Ct = "Dialog", [gn,
|
|
1923
|
+
var Ct = "Dialog", [gn, $s] = Tr(Ct), [yo, ae] = gn(Ct), vn = (e) => {
|
|
1921
1924
|
const {
|
|
1922
1925
|
__scopeDialog: t,
|
|
1923
1926
|
children: n,
|
|
@@ -1925,13 +1928,13 @@ var Ct = "Dialog", [gn, Ws] = Pr(Ct), [So, ae] = gn(Ct), vn = (e) => {
|
|
|
1925
1928
|
defaultOpen: o,
|
|
1926
1929
|
onOpenChange: a,
|
|
1927
1930
|
modal: c = !0
|
|
1928
|
-
} = e, i = V.useRef(null), l = V.useRef(null), [p = !1, h] =
|
|
1931
|
+
} = e, i = V.useRef(null), l = V.useRef(null), [p = !1, h] = yr({
|
|
1929
1932
|
prop: r,
|
|
1930
1933
|
defaultProp: o,
|
|
1931
1934
|
onChange: a
|
|
1932
1935
|
});
|
|
1933
1936
|
return /* @__PURE__ */ s(
|
|
1934
|
-
|
|
1937
|
+
yo,
|
|
1935
1938
|
{
|
|
1936
1939
|
scope: t,
|
|
1937
1940
|
triggerRef: i,
|
|
@@ -1948,7 +1951,7 @@ var Ct = "Dialog", [gn, Ws] = Pr(Ct), [So, ae] = gn(Ct), vn = (e) => {
|
|
|
1948
1951
|
);
|
|
1949
1952
|
};
|
|
1950
1953
|
vn.displayName = Ct;
|
|
1951
|
-
var _n = "DialogTrigger",
|
|
1954
|
+
var _n = "DialogTrigger", Io = V.forwardRef(
|
|
1952
1955
|
(e, t) => {
|
|
1953
1956
|
const { __scopeDialog: n, ...r } = e, o = ae(_n, n), a = gt(t, o.triggerRef);
|
|
1954
1957
|
return /* @__PURE__ */ s(
|
|
@@ -1966,28 +1969,28 @@ var _n = "DialogTrigger", yo = V.forwardRef(
|
|
|
1966
1969
|
);
|
|
1967
1970
|
}
|
|
1968
1971
|
);
|
|
1969
|
-
|
|
1970
|
-
var Pt = "DialogPortal", [
|
|
1972
|
+
Io.displayName = _n;
|
|
1973
|
+
var Pt = "DialogPortal", [xo, wn] = gn(Pt, {
|
|
1971
1974
|
forceMount: void 0
|
|
1972
1975
|
}), bn = (e) => {
|
|
1973
1976
|
const { __scopeDialog: t, forceMount: n, children: r, container: o } = e, a = ae(Pt, t);
|
|
1974
|
-
return /* @__PURE__ */ s(
|
|
1977
|
+
return /* @__PURE__ */ s(xo, { scope: t, forceMount: n, children: V.Children.map(r, (c) => /* @__PURE__ */ s(vt, { present: n || a.open, children: /* @__PURE__ */ s(Pr, { asChild: !0, container: o, children: c }) })) });
|
|
1975
1978
|
};
|
|
1976
1979
|
bn.displayName = Pt;
|
|
1977
1980
|
var We = "DialogOverlay", Cn = V.forwardRef(
|
|
1978
1981
|
(e, t) => {
|
|
1979
1982
|
const n = wn(We, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, a = ae(We, e.__scopeDialog);
|
|
1980
|
-
return a.modal ? /* @__PURE__ */ s(vt, { present: r || a.open, children: /* @__PURE__ */ s(
|
|
1983
|
+
return a.modal ? /* @__PURE__ */ s(vt, { present: r || a.open, children: /* @__PURE__ */ s(Ro, { ...o, ref: t }) }) : null;
|
|
1981
1984
|
}
|
|
1982
1985
|
);
|
|
1983
1986
|
Cn.displayName = We;
|
|
1984
|
-
var
|
|
1987
|
+
var Ro = V.forwardRef(
|
|
1985
1988
|
(e, t) => {
|
|
1986
1989
|
const { __scopeDialog: n, ...r } = e, o = ae(We, n);
|
|
1987
1990
|
return (
|
|
1988
1991
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
1989
1992
|
// ie. when `Overlay` and `Content` are siblings
|
|
1990
|
-
/* @__PURE__ */ s(
|
|
1993
|
+
/* @__PURE__ */ s(gr, { as: vr, allowPinchZoom: !0, shards: [o.contentRef], children: /* @__PURE__ */ s(
|
|
1991
1994
|
Le.div,
|
|
1992
1995
|
{
|
|
1993
1996
|
"data-state": St(o.open),
|
|
@@ -2001,17 +2004,17 @@ var xo = V.forwardRef(
|
|
|
2001
2004
|
), ve = "DialogContent", Pn = V.forwardRef(
|
|
2002
2005
|
(e, t) => {
|
|
2003
2006
|
const n = wn(ve, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, a = ae(ve, e.__scopeDialog);
|
|
2004
|
-
return /* @__PURE__ */ s(vt, { present: r || a.open, children: a.modal ? /* @__PURE__ */ s(
|
|
2007
|
+
return /* @__PURE__ */ s(vt, { present: r || a.open, children: a.modal ? /* @__PURE__ */ s(Mo, { ...o, ref: t }) : /* @__PURE__ */ s(No, { ...o, ref: t }) });
|
|
2005
2008
|
}
|
|
2006
2009
|
);
|
|
2007
2010
|
Pn.displayName = ve;
|
|
2008
|
-
var
|
|
2011
|
+
var Mo = V.forwardRef(
|
|
2009
2012
|
(e, t) => {
|
|
2010
2013
|
const n = ae(ve, e.__scopeDialog), r = V.useRef(null), o = gt(t, n.contentRef, r);
|
|
2011
2014
|
return V.useEffect(() => {
|
|
2012
2015
|
const a = r.current;
|
|
2013
2016
|
if (a)
|
|
2014
|
-
return
|
|
2017
|
+
return _r(a);
|
|
2015
2018
|
}, []), /* @__PURE__ */ s(
|
|
2016
2019
|
Tn,
|
|
2017
2020
|
{
|
|
@@ -2034,7 +2037,7 @@ var Ro = V.forwardRef(
|
|
|
2034
2037
|
}
|
|
2035
2038
|
);
|
|
2036
2039
|
}
|
|
2037
|
-
),
|
|
2040
|
+
), No = V.forwardRef(
|
|
2038
2041
|
(e, t) => {
|
|
2039
2042
|
const n = ae(ve, e.__scopeDialog), r = V.useRef(!1), o = V.useRef(!1);
|
|
2040
2043
|
return /* @__PURE__ */ s(
|
|
@@ -2060,9 +2063,9 @@ var Ro = V.forwardRef(
|
|
|
2060
2063
|
), Tn = V.forwardRef(
|
|
2061
2064
|
(e, t) => {
|
|
2062
2065
|
const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: a, ...c } = e, i = ae(ve, n), l = V.useRef(null), p = gt(t, l);
|
|
2063
|
-
return
|
|
2066
|
+
return wr(), /* @__PURE__ */ O(ze, { children: [
|
|
2064
2067
|
/* @__PURE__ */ s(
|
|
2065
|
-
|
|
2068
|
+
br,
|
|
2066
2069
|
{
|
|
2067
2070
|
asChild: !0,
|
|
2068
2071
|
loop: !0,
|
|
@@ -2070,7 +2073,7 @@ var Ro = V.forwardRef(
|
|
|
2070
2073
|
onMountAutoFocus: o,
|
|
2071
2074
|
onUnmountAutoFocus: a,
|
|
2072
2075
|
children: /* @__PURE__ */ s(
|
|
2073
|
-
|
|
2076
|
+
Cr,
|
|
2074
2077
|
{
|
|
2075
2078
|
role: "dialog",
|
|
2076
2079
|
id: i.contentId,
|
|
@@ -2085,8 +2088,8 @@ var Ro = V.forwardRef(
|
|
|
2085
2088
|
}
|
|
2086
2089
|
),
|
|
2087
2090
|
/* @__PURE__ */ O(ze, { children: [
|
|
2088
|
-
/* @__PURE__ */ s(
|
|
2089
|
-
/* @__PURE__ */ s(
|
|
2091
|
+
/* @__PURE__ */ s(Eo, { titleId: i.titleId }),
|
|
2092
|
+
/* @__PURE__ */ s(Do, { contentRef: l, descriptionId: i.descriptionId })
|
|
2090
2093
|
] })
|
|
2091
2094
|
] });
|
|
2092
2095
|
}
|
|
@@ -2097,13 +2100,13 @@ var Ro = V.forwardRef(
|
|
|
2097
2100
|
}
|
|
2098
2101
|
);
|
|
2099
2102
|
Sn.displayName = Tt;
|
|
2100
|
-
var yn = "DialogDescription",
|
|
2103
|
+
var yn = "DialogDescription", Lo = V.forwardRef(
|
|
2101
2104
|
(e, t) => {
|
|
2102
2105
|
const { __scopeDialog: n, ...r } = e, o = ae(yn, n);
|
|
2103
2106
|
return /* @__PURE__ */ s(Le.p, { id: o.descriptionId, ...r, ref: t });
|
|
2104
2107
|
}
|
|
2105
2108
|
);
|
|
2106
|
-
|
|
2109
|
+
Lo.displayName = yn;
|
|
2107
2110
|
var In = "DialogClose", xn = V.forwardRef(
|
|
2108
2111
|
(e, t) => {
|
|
2109
2112
|
const { __scopeDialog: n, ...r } = e, o = ae(In, n);
|
|
@@ -2122,11 +2125,11 @@ xn.displayName = In;
|
|
|
2122
2125
|
function St(e) {
|
|
2123
2126
|
return e ? "open" : "closed";
|
|
2124
2127
|
}
|
|
2125
|
-
var Rn = "DialogTitleWarning", [
|
|
2128
|
+
var Rn = "DialogTitleWarning", [Gs, Mn] = Sr(Rn, {
|
|
2126
2129
|
contentName: ve,
|
|
2127
2130
|
titleName: Tt,
|
|
2128
2131
|
docsSlug: "dialog"
|
|
2129
|
-
}),
|
|
2132
|
+
}), Eo = ({ titleId: e }) => {
|
|
2130
2133
|
const t = Mn(Rn), n = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
2131
2134
|
|
|
2132
2135
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
@@ -2135,14 +2138,14 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
2135
2138
|
return V.useEffect(() => {
|
|
2136
2139
|
e && (document.getElementById(e) || console.error(n));
|
|
2137
2140
|
}, [n, e]), null;
|
|
2138
|
-
},
|
|
2139
|
-
const r = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Mn(
|
|
2141
|
+
}, Oo = "DialogDescriptionWarning", Do = ({ contentRef: e, descriptionId: t }) => {
|
|
2142
|
+
const r = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Mn(Oo).contentName}}.`;
|
|
2140
2143
|
return V.useEffect(() => {
|
|
2141
2144
|
var a;
|
|
2142
2145
|
const o = (a = e.current) == null ? void 0 : a.getAttribute("aria-describedby");
|
|
2143
2146
|
t && o && (document.getElementById(t) || console.warn(r));
|
|
2144
2147
|
}, [r, e, t]), null;
|
|
2145
|
-
},
|
|
2148
|
+
}, Ao = vn, zo = bn, Fo = Cn, ko = Pn, Wo = Sn, Ho = xn;
|
|
2146
2149
|
const ge = {
|
|
2147
2150
|
"rp-dialog-wrapper": "_rp-dialog-wrapper_slqo7_1",
|
|
2148
2151
|
"rp-dialog-overlay": "_rp-dialog-overlay_slqo7_7",
|
|
@@ -2151,8 +2154,8 @@ const ge = {
|
|
|
2151
2154
|
"rp-dialog-title": "_rp-dialog-title_slqo7_39",
|
|
2152
2155
|
"rp-dialog-close": "_rp-dialog-close_slqo7_47",
|
|
2153
2156
|
"rp-properties-divider": "_rp-properties-divider_slqo7_55"
|
|
2154
|
-
},
|
|
2155
|
-
const { pdfProperties: e } = ne(), { container: t } = Ne(), { activeDocumentProperties: n, setActiveDocumentProperties: r } =
|
|
2157
|
+
}, $o = () => {
|
|
2158
|
+
const { pdfProperties: e } = ne(), { container: t } = Ne(), { activeDocumentProperties: n, setActiveDocumentProperties: r } = xr(), o = A(() => {
|
|
2156
2159
|
if (!e)
|
|
2157
2160
|
return [];
|
|
2158
2161
|
const {
|
|
@@ -2192,17 +2195,17 @@ const ge = {
|
|
|
2192
2195
|
{ label: "Page count", value: v }
|
|
2193
2196
|
];
|
|
2194
2197
|
}, [e]);
|
|
2195
|
-
return /* @__PURE__ */ s(
|
|
2196
|
-
/* @__PURE__ */ s(
|
|
2197
|
-
/* @__PURE__ */ O(
|
|
2198
|
-
/* @__PURE__ */ s(
|
|
2199
|
-
/* @__PURE__ */ s("div", { className: ge["rp-document-properties"], children: o.map((a, c) => /* @__PURE__ */ s("div", { children: a.separate ? /* @__PURE__ */ s("div", { className: ge["rp-properties-divider"] }) : /* @__PURE__ */ s(
|
|
2200
|
-
/* @__PURE__ */ s(
|
|
2198
|
+
return /* @__PURE__ */ s(Ao, { open: n, onOpenChange: r, children: /* @__PURE__ */ s(zo, { container: t, children: /* @__PURE__ */ O("div", { className: ge["rp-dialog-wrapper"], children: [
|
|
2199
|
+
/* @__PURE__ */ s(Fo, { className: ge["rp-dialog-overlay"] }),
|
|
2200
|
+
/* @__PURE__ */ O(ko, { className: ge["rp-document-dialog"], children: [
|
|
2201
|
+
/* @__PURE__ */ s(Wo, { className: ge["rp-dialog-title"], children: "Document Properties" }),
|
|
2202
|
+
/* @__PURE__ */ s("div", { className: ge["rp-document-properties"], children: o.map((a, c) => /* @__PURE__ */ s("div", { children: a.separate ? /* @__PURE__ */ s("div", { className: ge["rp-properties-divider"] }) : /* @__PURE__ */ s(Ir, { label: a.label, value: a.value }) }, c)) }),
|
|
2203
|
+
/* @__PURE__ */ s(Ho, { asChild: !0, className: ge["rp-dialog-close"], children: /* @__PURE__ */ s(Qt, {}) })
|
|
2201
2204
|
] })
|
|
2202
2205
|
] }) }) });
|
|
2203
|
-
},
|
|
2206
|
+
}, Go = {
|
|
2204
2207
|
"rp-other-tool-content": "_rp-other-tool-content_su718_1"
|
|
2205
|
-
},
|
|
2208
|
+
}, Vo = () => {
|
|
2206
2209
|
const { filename: e, pdfSrc: t } = ne();
|
|
2207
2210
|
return { download: () => {
|
|
2208
2211
|
if (!e)
|
|
@@ -2212,22 +2215,22 @@ const ge = {
|
|
|
2212
2215
|
} };
|
|
2213
2216
|
}, Nn = () => {
|
|
2214
2217
|
const { downloadIcon: e } = ce();
|
|
2215
|
-
return e || /* @__PURE__ */ s(
|
|
2216
|
-
}, Ln = ({ children: e, className: t }) => /* @__PURE__ */ s(ee, { className: t, content: "Download file", children: e }),
|
|
2218
|
+
return e || /* @__PURE__ */ s(Er, {});
|
|
2219
|
+
}, Ln = ({ children: e, className: t }) => /* @__PURE__ */ s(ee, { className: t, content: "Download file", children: e }), Uo = ({ download: e }) => /* @__PURE__ */ s(Ln, { children: /* @__PURE__ */ s(X, { onClick: e, children: /* @__PURE__ */ s(Nn, {}) }) }), qo = ({ download: e }) => /* @__PURE__ */ s(he, { onClick: e, children: /* @__PURE__ */ O(Ln, { className: "rp-menu-item", children: [
|
|
2217
2220
|
/* @__PURE__ */ s("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ s(Nn, {}) }),
|
|
2218
2221
|
"Download file"
|
|
2219
2222
|
] }) }), En = () => {
|
|
2220
|
-
const { download: e } =
|
|
2221
|
-
return t ? n ? /* @__PURE__ */ s(
|
|
2223
|
+
const { download: e } = Vo(), { downloadTool: t = !0 } = de(), { isSmallScreen: n } = _e();
|
|
2224
|
+
return t ? n ? /* @__PURE__ */ s(qo, { download: e }) : typeof t == "function" ? /* @__PURE__ */ s(t, { download: e }) : t ? /* @__PURE__ */ s(Uo, { download: e }) : null : null;
|
|
2222
2225
|
}, On = () => {
|
|
2223
2226
|
const { printIcon: e } = ce();
|
|
2224
|
-
return e || /* @__PURE__ */ s(
|
|
2225
|
-
}, Dn = ({ children: e, className: t }) => /* @__PURE__ */ s(ee, { className: t, content: "Print", children: e }),
|
|
2227
|
+
return e || /* @__PURE__ */ s(Or, {});
|
|
2228
|
+
}, Dn = ({ children: e, className: t }) => /* @__PURE__ */ s(ee, { className: t, content: "Print", children: e }), Zo = ({ print: e }) => /* @__PURE__ */ s(Dn, { children: /* @__PURE__ */ s(X, { onClick: e, children: /* @__PURE__ */ s(On, {}) }) }), jo = ({ print: e }) => /* @__PURE__ */ s(he, { onClick: e, children: /* @__PURE__ */ O(Dn, { className: "rp-menu-item", children: [
|
|
2226
2229
|
/* @__PURE__ */ s("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ s(On, {}) }),
|
|
2227
2230
|
"Print"
|
|
2228
2231
|
] }) }), An = () => {
|
|
2229
2232
|
const { print: e, cancel: t, setOnProgress: n, setOnComplete: r, setOnError: o, progress: a } = wt(), { printTool: c = !0 } = de(), { isSmallScreen: i } = _e();
|
|
2230
|
-
return c ? i ? /* @__PURE__ */ s(
|
|
2233
|
+
return c ? i ? /* @__PURE__ */ s(jo, { print: e }) : typeof c == "function" ? /* @__PURE__ */ s(
|
|
2231
2234
|
c,
|
|
2232
2235
|
{
|
|
2233
2236
|
print: e,
|
|
@@ -2237,16 +2240,16 @@ const ge = {
|
|
|
2237
2240
|
setOnComplete: r,
|
|
2238
2241
|
progress: a
|
|
2239
2242
|
}
|
|
2240
|
-
) : c ? /* @__PURE__ */ s(
|
|
2241
|
-
},
|
|
2243
|
+
) : c ? /* @__PURE__ */ s(Zo, { print: e }) : null : null;
|
|
2244
|
+
}, Bo = {
|
|
2242
2245
|
"rp-go-to-Top": "_rp-go-to-Top_4e0yd_1"
|
|
2243
|
-
}, Bo = () => {
|
|
2244
|
-
const { goToFirstPageIcon: e } = ce();
|
|
2245
|
-
return e || /* @__PURE__ */ s(tn, { className: jo["rp-go-to-Top"] });
|
|
2246
2246
|
}, Ko = () => {
|
|
2247
|
+
const { goToFirstPageIcon: e } = ce();
|
|
2248
|
+
return e || /* @__PURE__ */ s(tn, { className: Bo["rp-go-to-Top"] });
|
|
2249
|
+
}, Xo = () => {
|
|
2247
2250
|
const { goToLastPageIcon: e } = ce();
|
|
2248
2251
|
return e || /* @__PURE__ */ s(tn, {});
|
|
2249
|
-
},
|
|
2252
|
+
}, Jo = () => {
|
|
2250
2253
|
const { goToPage: e, totalPages: t, focusedPage: n } = oe(), { jumpNavigationTool: r = !0 } = de(), o = A(() => n === 1, [n]), a = A(() => n === t, [n, t]), c = M(() => {
|
|
2251
2254
|
e(1);
|
|
2252
2255
|
}, [e]), i = M(() => {
|
|
@@ -2254,16 +2257,16 @@ const ge = {
|
|
|
2254
2257
|
}, [e, t]);
|
|
2255
2258
|
return r ? /* @__PURE__ */ O(ke, { children: [
|
|
2256
2259
|
/* @__PURE__ */ s(he, { disabled: o, onClick: c, children: /* @__PURE__ */ O(ee, { className: "rp-menu-item", content: "Go to first page", children: [
|
|
2257
|
-
/* @__PURE__ */ s("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ s(
|
|
2260
|
+
/* @__PURE__ */ s("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ s(Ko, {}) }),
|
|
2258
2261
|
"First page"
|
|
2259
2262
|
] }) }),
|
|
2260
2263
|
/* @__PURE__ */ s(he, { disabled: a, onClick: i, children: /* @__PURE__ */ O(ee, { className: "rp-menu-item", content: "Go to last page", children: [
|
|
2261
|
-
/* @__PURE__ */ s("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ s(
|
|
2264
|
+
/* @__PURE__ */ s("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ s(Xo, {}) }),
|
|
2262
2265
|
"Last page"
|
|
2263
2266
|
] }) }),
|
|
2264
2267
|
/* @__PURE__ */ s(_t, {})
|
|
2265
2268
|
] }) : null;
|
|
2266
|
-
},
|
|
2269
|
+
}, Yo = () => {
|
|
2267
2270
|
const { container: e } = Ne(), { isSmallScreen: t } = _e(), {
|
|
2268
2271
|
openFileTool: n,
|
|
2269
2272
|
downloadTool: r,
|
|
@@ -2288,13 +2291,13 @@ const ge = {
|
|
|
2288
2291
|
i,
|
|
2289
2292
|
l,
|
|
2290
2293
|
t
|
|
2291
|
-
]) ? /* @__PURE__ */ O(
|
|
2294
|
+
]) ? /* @__PURE__ */ O(Rr, { children: [
|
|
2292
2295
|
/* @__PURE__ */ s(
|
|
2293
2296
|
ft,
|
|
2294
2297
|
{
|
|
2295
2298
|
container: e,
|
|
2296
|
-
triggerComponent: /* @__PURE__ */ s("div", { role: "button", children: /* @__PURE__ */ s(ee, { content: "More options", children: /* @__PURE__ */ s(X, { children: /* @__PURE__ */ s(
|
|
2297
|
-
children: /* @__PURE__ */ O("div", { className:
|
|
2299
|
+
triggerComponent: /* @__PURE__ */ s("div", { role: "button", children: /* @__PURE__ */ s(ee, { content: "More options", children: /* @__PURE__ */ s(X, { children: /* @__PURE__ */ s(fr, {}) }) }) }),
|
|
2300
|
+
children: /* @__PURE__ */ O("div", { className: Go["rp-other-tool-content"], "data-rp": "moreOptionsDropdown", children: [
|
|
2298
2301
|
t && /* @__PURE__ */ O(ke, { children: [
|
|
2299
2302
|
/* @__PURE__ */ s(Yt, {}),
|
|
2300
2303
|
/* @__PURE__ */ s(En, {}),
|
|
@@ -2302,27 +2305,27 @@ const ge = {
|
|
|
2302
2305
|
/* @__PURE__ */ s(en, {}),
|
|
2303
2306
|
/* @__PURE__ */ s(_t, {})
|
|
2304
2307
|
] }),
|
|
2305
|
-
/* @__PURE__ */ s(
|
|
2306
|
-
/* @__PURE__ */ s(Mr, {}),
|
|
2307
|
-
/* @__PURE__ */ s(Or, {}),
|
|
2308
|
+
/* @__PURE__ */ s(Jo, {}),
|
|
2308
2309
|
/* @__PURE__ */ s(Nr, {}),
|
|
2309
|
-
/* @__PURE__ */ s(
|
|
2310
|
+
/* @__PURE__ */ s(Dr, {}),
|
|
2311
|
+
/* @__PURE__ */ s(Lr, {}),
|
|
2312
|
+
/* @__PURE__ */ s(Mr, {})
|
|
2310
2313
|
] })
|
|
2311
2314
|
}
|
|
2312
2315
|
),
|
|
2313
|
-
/* @__PURE__ */ s(
|
|
2316
|
+
/* @__PURE__ */ s($o, {})
|
|
2314
2317
|
] }) : null;
|
|
2315
|
-
},
|
|
2318
|
+
}, Qo = () => {
|
|
2316
2319
|
const { isSmallScreen: e } = _e();
|
|
2317
2320
|
return /* @__PURE__ */ O(ze, { children: [
|
|
2318
|
-
/* @__PURE__ */ s(
|
|
2321
|
+
/* @__PURE__ */ s(mr, {}),
|
|
2319
2322
|
!e && /* @__PURE__ */ O(ze, { children: [
|
|
2320
2323
|
/* @__PURE__ */ s(Yt, {}),
|
|
2321
2324
|
/* @__PURE__ */ s(En, {}),
|
|
2322
2325
|
/* @__PURE__ */ s(An, {}),
|
|
2323
2326
|
/* @__PURE__ */ s(en, {})
|
|
2324
2327
|
] }),
|
|
2325
|
-
/* @__PURE__ */ s(
|
|
2328
|
+
/* @__PURE__ */ s(Yo, {})
|
|
2326
2329
|
] });
|
|
2327
2330
|
}, Ie = {
|
|
2328
2331
|
"rp-zoom-wrapper": "_rp-zoom-wrapper_163s9_1",
|
|
@@ -2330,13 +2333,13 @@ const ge = {
|
|
|
2330
2333
|
"rp-current-zoom-icon": "_rp-current-zoom-icon_163s9_11",
|
|
2331
2334
|
"rp-current-zoom": "_rp-current-zoom_163s9_6",
|
|
2332
2335
|
"rp-zoom-dropdown-content": "_rp-zoom-dropdown-content_163s9_20"
|
|
2333
|
-
},
|
|
2336
|
+
}, ea = 25, rt = 1e3, ta = [50, 75, 100, 125, 150, 200, 300, 400], na = () => {
|
|
2334
2337
|
const { zoomInIcon: e } = ce();
|
|
2335
|
-
return e || /* @__PURE__ */ s(Dr, {});
|
|
2336
|
-
}, na = () => {
|
|
2337
|
-
const { zoomOutIcon: e } = ce();
|
|
2338
2338
|
return e || /* @__PURE__ */ s(Ar, {});
|
|
2339
2339
|
}, ra = () => {
|
|
2340
|
+
const { zoomOutIcon: e } = ce();
|
|
2341
|
+
return e || /* @__PURE__ */ s(zr, {});
|
|
2342
|
+
}, oa = () => {
|
|
2340
2343
|
const { zoomLevel: e, setZoomLevel: t } = Ue(), { container: n, contentRef: r } = Ne(), { zoomTool: o = !0 } = de(), { focusedPage: a } = oe(), { rotate: c } = Ve(), { pages: i } = ne(), { isSmallScreen: l } = _e(), p = M(() => {
|
|
2341
2344
|
t((v) => {
|
|
2342
2345
|
const C = Math.floor(v / 25) * 25;
|
|
@@ -2347,7 +2350,7 @@ const ge = {
|
|
|
2347
2350
|
const C = Math.ceil(v / 25) * 25;
|
|
2348
2351
|
return Math.min(C - 25, rt);
|
|
2349
2352
|
});
|
|
2350
|
-
}, [t]), f = A(() => e ===
|
|
2353
|
+
}, [t]), f = A(() => e === ea, [e]), u = A(() => e === rt, [e]), m = A(() => {
|
|
2351
2354
|
var v;
|
|
2352
2355
|
return (v = i.get(a)) == null ? void 0 : v.page.getViewport({ scale: 1, rotation: c });
|
|
2353
2356
|
}, [i, a, c]), g = M(
|
|
@@ -2377,7 +2380,7 @@ const ge = {
|
|
|
2377
2380
|
[t, g]
|
|
2378
2381
|
);
|
|
2379
2382
|
return typeof o != "boolean" ? /* @__PURE__ */ s(o, { zoomLevel: e, setZoomLevel: t }) : o ? /* @__PURE__ */ O("div", { className: Ie["rp-zoom-wrapper"], children: [
|
|
2380
|
-
/* @__PURE__ */ s(ee, { content: "Zoom out", children: /* @__PURE__ */ s(X, { disabled: f, onClick: h, children: /* @__PURE__ */ s(
|
|
2383
|
+
/* @__PURE__ */ s(ee, { content: "Zoom out", children: /* @__PURE__ */ s(X, { disabled: f, onClick: h, children: /* @__PURE__ */ s(ra, {}) }) }),
|
|
2381
2384
|
!l && /* @__PURE__ */ s(
|
|
2382
2385
|
ft,
|
|
2383
2386
|
{
|
|
@@ -2398,14 +2401,14 @@ const ge = {
|
|
|
2398
2401
|
/* @__PURE__ */ s(he, { onClick: () => _(we.PAGE_WIDTH), children: "Page width" })
|
|
2399
2402
|
] }),
|
|
2400
2403
|
/* @__PURE__ */ s(_t, {}),
|
|
2401
|
-
/* @__PURE__ */ s(ke, { children:
|
|
2404
|
+
/* @__PURE__ */ s(ke, { children: ta.map((v) => /* @__PURE__ */ O(he, { onClick: () => _(v), children: [
|
|
2402
2405
|
v,
|
|
2403
2406
|
" %"
|
|
2404
2407
|
] }, v)) })
|
|
2405
2408
|
] })
|
|
2406
2409
|
}
|
|
2407
2410
|
),
|
|
2408
|
-
/* @__PURE__ */ s(ee, { content: "Zoom in", children: /* @__PURE__ */ s(X, { disabled: u, onClick: p, children: /* @__PURE__ */ s(
|
|
2411
|
+
/* @__PURE__ */ s(ee, { content: "Zoom in", children: /* @__PURE__ */ s(X, { disabled: u, onClick: p, children: /* @__PURE__ */ s(na, {}) }) })
|
|
2409
2412
|
] }) : null;
|
|
2410
2413
|
}, ie = {
|
|
2411
2414
|
"rp-search-tool-content": "_rp-search-tool-content_1vxow_1",
|
|
@@ -2418,8 +2421,8 @@ const ge = {
|
|
|
2418
2421
|
"rp-search-input": "_rp-search-input_1vxow_49"
|
|
2419
2422
|
}, Ut = () => {
|
|
2420
2423
|
const { searchIcon: e } = ce();
|
|
2421
|
-
return e || /* @__PURE__ */ s(
|
|
2422
|
-
},
|
|
2424
|
+
return e || /* @__PURE__ */ s(Fr, {});
|
|
2425
|
+
}, aa = () => {
|
|
2423
2426
|
const { container: e } = Ne(), [t, n] = W(!1), { pdf: r } = ne(), [o, a] = W(null), {
|
|
2424
2427
|
searchOptions: c,
|
|
2425
2428
|
setSearchOptions: i,
|
|
@@ -2487,7 +2490,7 @@ const ge = {
|
|
|
2487
2490
|
placeholder: "Enter to Search",
|
|
2488
2491
|
className: ie["rp-search-input"],
|
|
2489
2492
|
ref: a,
|
|
2490
|
-
children: !!v && /* @__PURE__ */ s("span", { className: ie["rp-search-tool-input-clear"], onClick: w, children: /* @__PURE__ */ s(
|
|
2493
|
+
children: !!v && /* @__PURE__ */ s("span", { className: ie["rp-search-tool-input-clear"], onClick: w, children: /* @__PURE__ */ s(kr, {}) })
|
|
2491
2494
|
}
|
|
2492
2495
|
),
|
|
2493
2496
|
l ? /* @__PURE__ */ s("span", { children: /* @__PURE__ */ s(mt, {}) }) : /* @__PURE__ */ s("span", { children: T })
|
|
@@ -2511,15 +2514,15 @@ const ge = {
|
|
|
2511
2514
|
] })
|
|
2512
2515
|
}
|
|
2513
2516
|
) : null;
|
|
2514
|
-
},
|
|
2517
|
+
}, sa = "_loading_1snj5_1", Pe = {
|
|
2515
2518
|
"rp-loading-overlay": "_rp-loading-overlay_1snj5_1",
|
|
2516
2519
|
"rp-loading-modal": "_rp-loading-modal_1snj5_14",
|
|
2517
2520
|
"rp-loading-title": "_rp-loading-title_1snj5_27",
|
|
2518
2521
|
"rp-loading-progress-bar": "_rp-loading-progress-bar_1snj5_35",
|
|
2519
2522
|
"rp-loading-progress": "_rp-loading-progress_1snj5_35",
|
|
2520
2523
|
"rp-loading-cancel-button": "_rp-loading-cancel-button_1snj5_52",
|
|
2521
|
-
loading:
|
|
2522
|
-
},
|
|
2524
|
+
loading: sa
|
|
2525
|
+
}, ia = ({ percentage: e }) => {
|
|
2523
2526
|
const { cancel: t } = wt();
|
|
2524
2527
|
return e < 1 ? null : /* @__PURE__ */ s("div", { className: Q(Pe["rp-loading-overlay"]), children: /* @__PURE__ */ O("div", { className: Q(Pe["rp-loading-modal"]), children: [
|
|
2525
2528
|
/* @__PURE__ */ s("div", { className: Q(Pe["rp-loading-title"]), children: "Preparing document..." }),
|
|
@@ -2532,18 +2535,18 @@ const ge = {
|
|
|
2532
2535
|
) }),
|
|
2533
2536
|
/* @__PURE__ */ s("button", { className: Q(Pe["rp-loading-cancel-button"]), onClick: t, children: "Cancel" })
|
|
2534
2537
|
] }) });
|
|
2535
|
-
},
|
|
2538
|
+
}, ca = Ge((e, t) => {
|
|
2536
2539
|
const { showPrintProgress: n } = de(), { progress: r } = wt(), { isSmallScreen: o } = _e(), { percentage: a } = r || {}, c = () => o ? { gridTemplateColumns: "25% 60% 15%" } : void 0;
|
|
2537
2540
|
return /* @__PURE__ */ O("div", { children: [
|
|
2538
2541
|
/* @__PURE__ */ s("div", { "data-rp": "topBar", ref: t, className: ye["rp-toolbar-content"], children: /* @__PURE__ */ O("div", { className: ye["rp-toolbar-wrapper"], style: c(), children: [
|
|
2539
2542
|
/* @__PURE__ */ O("div", { "data-rp": "topBarLeft", className: ye["rp-toolbar-start"], children: [
|
|
2540
|
-
/* @__PURE__ */ s(
|
|
2541
|
-
/* @__PURE__ */ s(
|
|
2543
|
+
/* @__PURE__ */ s(aa, {}),
|
|
2544
|
+
/* @__PURE__ */ s(So, {})
|
|
2542
2545
|
] }),
|
|
2543
|
-
/* @__PURE__ */ s("div", { "data-rp": "topBarCenter", className: ye["rp-toolbar-middle"], children: /* @__PURE__ */ s(
|
|
2544
|
-
/* @__PURE__ */ s("div", { "data-rp": "topBarRight", className: ye["rp-toolbar-end"], children: /* @__PURE__ */ s(
|
|
2546
|
+
/* @__PURE__ */ s("div", { "data-rp": "topBarCenter", className: ye["rp-toolbar-middle"], children: /* @__PURE__ */ s(oa, {}) }),
|
|
2547
|
+
/* @__PURE__ */ s("div", { "data-rp": "topBarRight", className: ye["rp-toolbar-end"], children: /* @__PURE__ */ s(Qo, {}) })
|
|
2545
2548
|
] }) }),
|
|
2546
|
-
n && a ? /* @__PURE__ */ s(
|
|
2549
|
+
n && a ? /* @__PURE__ */ s(ia, { percentage: a }) : null
|
|
2547
2550
|
] });
|
|
2548
2551
|
}), ot = {
|
|
2549
2552
|
"rp-sidebar-content-wrapper": "_rp-sidebar-content-wrapper_4wlw3_1",
|
|
@@ -2556,7 +2559,7 @@ const ge = {
|
|
|
2556
2559
|
"rp-thumbnail": "_rp-thumbnail_3fenb_1",
|
|
2557
2560
|
"rp-thumbnail-active": "_rp-thumbnail-active_3fenb_22",
|
|
2558
2561
|
"rp-thumbnail-loader": "_rp-thumbnail-loader_3fenb_31"
|
|
2559
|
-
},
|
|
2562
|
+
}, la = (e) => {
|
|
2560
2563
|
const { thumbnailSrc: t, pageNumber: n, isFocused: r, viewport: o } = e, { goToPage: a } = oe(), c = A(() => r ? xe["rp-thumbnail-active"] : "", [r]), i = A(() => ({
|
|
2561
2564
|
width: Math.round(o.width),
|
|
2562
2565
|
height: Math.round(o.height)
|
|
@@ -2596,10 +2599,10 @@ const ge = {
|
|
|
2596
2599
|
}, qt = {
|
|
2597
2600
|
"rp-thumbnails-container": "_rp-thumbnails-container_16vqr_1",
|
|
2598
2601
|
"rp-thumbnails": "_rp-thumbnails_16vqr_1"
|
|
2599
|
-
},
|
|
2602
|
+
}, ua = 16, da = (e, t) => {
|
|
2600
2603
|
const n = e == null ? void 0 : e.querySelector(`#page-${t}`);
|
|
2601
|
-
e && (n != null && n.offsetTop) && (e.scrollTop = (n == null ? void 0 : n.offsetTop) -
|
|
2602
|
-
},
|
|
2604
|
+
e && (n != null && n.offsetTop) && (e.scrollTop = (n == null ? void 0 : n.offsetTop) - ua);
|
|
2605
|
+
}, pa = Ge((e, t) => {
|
|
2603
2606
|
const { show: n } = e, { focusedPage: r, totalPages: o } = oe(), { thumbnailPages: a, addPage: c, thumbnailLength: i, addToPage: l } = sn(), p = $(null), h = $(1);
|
|
2604
2607
|
Zt(t, () => p.current);
|
|
2605
2608
|
const f = A(() => Object.values(a), [a]), u = M(() => {
|
|
@@ -2607,11 +2610,11 @@ const ge = {
|
|
|
2607
2610
|
m <= o && c(m);
|
|
2608
2611
|
}, [c, o, i]);
|
|
2609
2612
|
return F(() => {
|
|
2610
|
-
r > i ? l(r) : n && h.current !== r && (
|
|
2613
|
+
r > i ? l(r) : n && h.current !== r && (da(p.current, r), h.current = r);
|
|
2611
2614
|
}, [r, i, l, n, f]), Qn(p.current, u), /* @__PURE__ */ s("div", { ref: p, className: qt["rp-thumbnails-container"], children: /* @__PURE__ */ s("div", { className: qt["rp-thumbnails"], children: n ? f.map((m, g) => {
|
|
2612
2615
|
var _, v;
|
|
2613
2616
|
return /* @__PURE__ */ s(
|
|
2614
|
-
|
|
2617
|
+
la,
|
|
2615
2618
|
{
|
|
2616
2619
|
isFocused: r === ((_ = m.page) == null ? void 0 : _.pageNumber),
|
|
2617
2620
|
pageNumber: (v = m.page) == null ? void 0 : v.pageNumber,
|
|
@@ -2622,13 +2625,13 @@ const ge = {
|
|
|
2622
2625
|
g
|
|
2623
2626
|
);
|
|
2624
2627
|
}) : null }) });
|
|
2625
|
-
}),
|
|
2628
|
+
}), ha = () => {
|
|
2626
2629
|
const { thumbnailIcon: e } = ce();
|
|
2627
2630
|
return e || /* @__PURE__ */ s(Yn, {});
|
|
2628
|
-
},
|
|
2631
|
+
}, ma = () => {
|
|
2629
2632
|
const { active: e, setActive: t } = sn(), [n, r] = W(200), o = $(null), { thumbnailTool: a } = de(), c = M(() => {
|
|
2630
2633
|
t((l) => !l);
|
|
2631
|
-
}, []), i = A(() => typeof a != "boolean" && a ? /* @__PURE__ */ s(a, { onClick: c, active: e }) : a ? /* @__PURE__ */ s(ee, { content: "Thumbnail", children: /* @__PURE__ */ s(X, { onClick: c, active: e, children: /* @__PURE__ */ s(
|
|
2634
|
+
}, []), i = A(() => typeof a != "boolean" && a ? /* @__PURE__ */ s(a, { onClick: c, active: e }) : a ? /* @__PURE__ */ s(ee, { content: "Thumbnail", children: /* @__PURE__ */ s(X, { onClick: c, active: e, children: /* @__PURE__ */ s(ha, {}) }) }) : null, [a, e, c]);
|
|
2632
2635
|
return /* @__PURE__ */ O(
|
|
2633
2636
|
"div",
|
|
2634
2637
|
{
|
|
@@ -2638,13 +2641,13 @@ const ge = {
|
|
|
2638
2641
|
children: [
|
|
2639
2642
|
/* @__PURE__ */ s("div", { className: ot["rp-sidebar-content"], children: i }),
|
|
2640
2643
|
/* @__PURE__ */ O("div", { "data-rp": "thumbnailSidebar", hidden: !e, className: ot["rp-thumbnails-wrapper"], children: [
|
|
2641
|
-
/* @__PURE__ */ s(
|
|
2644
|
+
/* @__PURE__ */ s(pa, { show: e, ref: o }),
|
|
2642
2645
|
/* @__PURE__ */ s(er, { onWidthChange: r, thumbnailRef: o })
|
|
2643
2646
|
] })
|
|
2644
2647
|
]
|
|
2645
2648
|
}
|
|
2646
2649
|
);
|
|
2647
|
-
},
|
|
2650
|
+
}, Vs = Ge((e, t) => {
|
|
2648
2651
|
const { children: n, slots: r, icons: o, style: a, className: c, onLoaded: i, cleanupOnLoaded: l } = e, [p, h] = W(null), { setContainer: f, setContentRef: u } = Ne();
|
|
2649
2652
|
return F(() => (i && i(), () => {
|
|
2650
2653
|
l && l();
|
|
@@ -2657,9 +2660,9 @@ const ge = {
|
|
|
2657
2660
|
className: c,
|
|
2658
2661
|
children: /* @__PURE__ */ O(or, { children: [
|
|
2659
2662
|
/* @__PURE__ */ O("div", { className: be["rp-layout"], children: [
|
|
2660
|
-
/* @__PURE__ */ s(
|
|
2663
|
+
/* @__PURE__ */ s(ca, { ref: h }),
|
|
2661
2664
|
/* @__PURE__ */ O("div", { className: be["rp-content"], children: [
|
|
2662
|
-
/* @__PURE__ */ s("div", { className: be["rp-sidebar"], children: /* @__PURE__ */ s(
|
|
2665
|
+
/* @__PURE__ */ s("div", { className: be["rp-sidebar"], children: /* @__PURE__ */ s(ma, {}) }),
|
|
2663
2666
|
/* @__PURE__ */ s("div", { ref: u, className: be["rp-pages"], children: n })
|
|
2664
2667
|
] })
|
|
2665
2668
|
] }),
|
|
@@ -2669,45 +2672,45 @@ const ge = {
|
|
|
2669
2672
|
) }) }) });
|
|
2670
2673
|
});
|
|
2671
2674
|
export {
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2675
|
+
Yr as A,
|
|
2676
|
+
la as B,
|
|
2677
|
+
Vr as C,
|
|
2678
|
+
wo as D,
|
|
2679
|
+
pa as E,
|
|
2677
2680
|
En as F,
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2681
|
+
ma as G,
|
|
2682
|
+
ia as L,
|
|
2683
|
+
Jo as M,
|
|
2684
|
+
Yo as O,
|
|
2685
|
+
zs as P,
|
|
2686
|
+
Hs as R,
|
|
2687
|
+
Ws as S,
|
|
2688
|
+
ks as T,
|
|
2689
|
+
oa as Z,
|
|
2690
|
+
Fs as a,
|
|
2691
|
+
Vs as b,
|
|
2692
|
+
Vo as c,
|
|
2690
2693
|
wt as d,
|
|
2691
2694
|
ln as e,
|
|
2692
2695
|
nn as f,
|
|
2693
|
-
|
|
2696
|
+
Wr as g,
|
|
2694
2697
|
rn as h,
|
|
2695
|
-
|
|
2698
|
+
Hr as i,
|
|
2696
2699
|
on as j,
|
|
2697
|
-
|
|
2700
|
+
$r as k,
|
|
2698
2701
|
an as l,
|
|
2699
2702
|
sn as m,
|
|
2700
|
-
|
|
2703
|
+
Gr as n,
|
|
2701
2704
|
cn as o,
|
|
2702
|
-
|
|
2705
|
+
Ur as p,
|
|
2703
2706
|
bt as q,
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
+
go as r,
|
|
2708
|
+
bo as s,
|
|
2709
|
+
So as t,
|
|
2707
2710
|
oe as u,
|
|
2708
|
-
|
|
2711
|
+
$o as v,
|
|
2709
2712
|
An as w,
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
+
Qo as x,
|
|
2714
|
+
aa as y,
|
|
2715
|
+
ca as z
|
|
2713
2716
|
};
|