@pdf-viewer/react 1.9.0-beta.6 → 1.9.0-beta.7

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.
Files changed (94) hide show
  1. package/dist/SearchCloseButton-cbf182aa.js +33 -0
  2. package/dist/ToolbarLayout.module-201969d2.js +3453 -0
  3. package/dist/assets/ToolbarLayout.css +1 -1
  4. package/dist/components/RPController.js +8 -8
  5. package/dist/components/RPDropFileZone.js +23 -21
  6. package/dist/components/RPPages.js +17 -18
  7. package/dist/components/RPProvider.js +14 -15
  8. package/dist/components/layout/Container.js +11 -10
  9. package/dist/components/layout/LayoutContainer.js +15 -16
  10. package/dist/components/layout/RPDefaultLayout.js +14 -76
  11. package/dist/components/layout/RPLayout.js +22 -22
  12. package/dist/components/layout/WrapperLayout.js +8 -7
  13. package/dist/components/layout/sidebar/RPSidebar.js +12 -51
  14. package/dist/components/layout/sidebar/RPSplitter.js +9 -7
  15. package/dist/components/layout/sidebar/Thumbnail.js +15 -16
  16. package/dist/components/layout/sidebar/Thumbnails.js +1 -1
  17. package/dist/components/layout/toolbar/DocumentDialog.js +24 -305
  18. package/dist/components/layout/toolbar/FileDownloadTool.js +13 -23
  19. package/dist/components/layout/toolbar/MenuItem.js +7 -6
  20. package/dist/components/layout/toolbar/MenuSeparator.js +5 -4
  21. package/dist/components/layout/toolbar/MostPageTool.js +25 -50
  22. package/dist/components/layout/toolbar/OtherTool.js +22 -115
  23. package/dist/components/layout/toolbar/Paginate.js +17 -99
  24. package/dist/components/layout/toolbar/PrintTool.js +13 -43
  25. package/dist/components/layout/toolbar/PropertyItem.js +8 -5
  26. package/dist/components/layout/toolbar/RPToolbar.js +7 -28
  27. package/dist/components/layout/toolbar/RPToolbarEnd.js +7 -22
  28. package/dist/components/layout/toolbar/RotateTool.js +21 -20
  29. package/dist/components/layout/toolbar/ScrollModeTool.js +1 -1
  30. package/dist/components/layout/toolbar/SearchCloseButton.js +7 -19
  31. package/dist/components/layout/toolbar/SearchResultNavigator.js +8 -42
  32. package/dist/components/layout/toolbar/SearchTool.js +30 -197
  33. package/dist/components/layout/toolbar/SelectionModeTool.js +1 -1
  34. package/dist/components/layout/toolbar/ThumbnailTool.js +3 -3
  35. package/dist/components/layout/toolbar/ToolbarCustom.js +22 -24
  36. package/dist/components/layout/toolbar/ToolbarDefault.js +19 -24
  37. package/dist/components/layout/toolbar/ViewModeTool.js +1 -1
  38. package/dist/components/layout/toolbar/ZoomTool.js +28 -140
  39. package/dist/components/layout/toolbar/tools/FileDownloadTool.js +1 -1
  40. package/dist/components/layout/toolbar/tools/InputPageTool.js +5 -5
  41. package/dist/components/layout/toolbar/tools/NextPageTool.js +17 -18
  42. package/dist/components/layout/toolbar/tools/PreviousPageTool.js +1 -1
  43. package/dist/components/layout/toolbar/tools/PrintTool.js +3 -3
  44. package/dist/components/layout/toolbar/tools/ThumbnailTool.js +1 -1
  45. package/dist/components/layout/toolbar/tools/ZoomLevelTool.js +7 -7
  46. package/dist/components/layout/toolbar/tools/defaults/RPHorizontalBar.js +20 -26
  47. package/dist/components/page/AnnotationLayer.js +16 -17
  48. package/dist/components/page/CanvasLayer.js +16 -17
  49. package/dist/components/page/DualPage.js +1 -1
  50. package/dist/components/page/RPPage.js +16 -17
  51. package/dist/components/page/SinglePage.js +1 -1
  52. package/dist/components/page/TextHighlightLayer.js +16 -17
  53. package/dist/components/page/TextLayer.js +16 -17
  54. package/dist/components/ui/Checkbox.js +51 -49
  55. package/dist/components/ui/DropDown.js +19 -13
  56. package/dist/components/ui/LoadingIndicator.js +5 -22
  57. package/dist/components/ui/RPTooltip.js +33 -33
  58. package/dist/contexts/PaginationContext.js +1 -1
  59. package/dist/contexts/PrintContext.js +1 -1
  60. package/dist/contexts/RenderQueueProvider.js +1 -1
  61. package/dist/contexts/SearchContext.js +3 -3
  62. package/dist/contexts/ThumbnailsContext.js +1 -1
  63. package/dist/{index-492f99d0.js → index-18b0454c.js} +1 -1
  64. package/dist/{index-2160dd99.js → index-5908484b.js} +11 -11
  65. package/dist/index-f4a9ae4d.js +1664 -0
  66. package/dist/main.js +48 -50
  67. package/dist/types/components/layout/RPDefaultLayout.d.ts +1 -2
  68. package/dist/types/components/layout/toolbar/RPToolbar.d.ts +3 -2
  69. package/dist/utils/hooks/useFileDownload.js +16 -17
  70. package/dist/utils/hooks/useLicense.js +1 -1
  71. package/dist/utils/hooks/usePaginate.js +16 -17
  72. package/dist/utils/hooks/usePresentPage.js +16 -17
  73. package/dist/utils/hooks/usePrint.js +16 -17
  74. package/dist/utils/hooks/useScrollToPage.js +16 -17
  75. package/dist/utils/hooks/useSearch.js +16 -17
  76. package/dist/utils/hooks/useThumbnail.js +16 -17
  77. package/dist/utils/hooks/useVirtualReactWindow.js +16 -17
  78. package/package.json +1 -1
  79. package/dist/Checkbox.module-3edaacbb.js +0 -7
  80. package/dist/Combination-9a0a3e65.js +0 -693
  81. package/dist/Container.module-f8b5c306.js +0 -6
  82. package/dist/DropDown.module-a78567cb.js +0 -11
  83. package/dist/MenuItem.module-bc11d0d3.js +0 -6
  84. package/dist/MenuSeparator.module-89b2ff7f.js +0 -6
  85. package/dist/PropertyItem.module-db0150cc.js +0 -8
  86. package/dist/RPSplitter.module-13d612c4.js +0 -7
  87. package/dist/RPTheme.module-bd9038da.js +0 -8
  88. package/dist/RotateTool.module-03987eba.js +0 -6
  89. package/dist/SearchTool.module-016f3a8d.js +0 -16
  90. package/dist/ToolbarLayout.module-88476995.js +0 -2464
  91. package/dist/WrapperLayout.module-147bc943.js +0 -6
  92. package/dist/index-49b9a615.js +0 -978
  93. /package/dist/assets/{RPTheme.css → RPDropFileZone.css} +0 -0
  94. /package/dist/assets/{SearchTool.css → SearchCloseButton.css} +0 -0
@@ -1,693 +0,0 @@
1
- import * as u from "react";
2
- import { useState as ye } from "react";
3
- import be from "react-dom";
4
- import { k as Ee, P as ce, h as G, u as Se } from "./index-2160dd99.js";
5
- import { jsx as ue } from "react/jsx-runtime";
6
- var we = "Portal", Ce = u.forwardRef((e, t) => {
7
- var a;
8
- const { container: r, ...n } = e, [c, i] = u.useState(!1);
9
- Ee(() => i(!0), []);
10
- const l = r || c && ((a = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : a.body);
11
- return l ? be.createPortal(/* @__PURE__ */ ue(ce.div, { ...n, ref: t }), l) : null;
12
- });
13
- Ce.displayName = we;
14
- var _ = 0;
15
- function St() {
16
- u.useEffect(() => {
17
- const e = document.querySelectorAll("[data-radix-focus-guard]");
18
- return document.body.insertAdjacentElement("afterbegin", e[0] ?? Z()), document.body.insertAdjacentElement("beforeend", e[1] ?? Z()), _++, () => {
19
- _ === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), _--;
20
- };
21
- }, []);
22
- }
23
- function Z() {
24
- const e = document.createElement("span");
25
- return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.outline = "none", e.style.opacity = "0", e.style.position = "fixed", e.style.pointerEvents = "none", e;
26
- }
27
- var U = "focusScope.autoFocusOnMount", j = "focusScope.autoFocusOnUnmount", q = { bubbles: !1, cancelable: !0 }, Re = "FocusScope", Ae = u.forwardRef((e, t) => {
28
- const {
29
- loop: r = !1,
30
- trapped: n = !1,
31
- onMountAutoFocus: c,
32
- onUnmountAutoFocus: i,
33
- ...l
34
- } = e, [a, S] = u.useState(null), y = G(c), p = G(i), f = u.useRef(null), v = Se(t, (o) => S(o)), h = u.useRef({
35
- paused: !1,
36
- pause() {
37
- this.paused = !0;
38
- },
39
- resume() {
40
- this.paused = !1;
41
- }
42
- }).current;
43
- u.useEffect(() => {
44
- if (n) {
45
- let o = function(m) {
46
- if (h.paused || !a)
47
- return;
48
- const g = m.target;
49
- a.contains(g) ? f.current = g : R(f.current, { select: !0 });
50
- }, s = function(m) {
51
- if (h.paused || !a)
52
- return;
53
- const g = m.relatedTarget;
54
- g !== null && (a.contains(g) || R(f.current, { select: !0 }));
55
- }, d = function(m) {
56
- if (document.activeElement === document.body)
57
- for (const b of m)
58
- b.removedNodes.length > 0 && R(a);
59
- };
60
- document.addEventListener("focusin", o), document.addEventListener("focusout", s);
61
- const E = new MutationObserver(d);
62
- return a && E.observe(a, { childList: !0, subtree: !0 }), () => {
63
- document.removeEventListener("focusin", o), document.removeEventListener("focusout", s), E.disconnect();
64
- };
65
- }
66
- }, [n, a, h.paused]), u.useEffect(() => {
67
- if (a) {
68
- $.add(h);
69
- const o = document.activeElement;
70
- if (!a.contains(o)) {
71
- const d = new CustomEvent(U, q);
72
- a.addEventListener(U, y), a.dispatchEvent(d), d.defaultPrevented || (ke(Fe(ie(a)), { select: !0 }), document.activeElement === o && R(a));
73
- }
74
- return () => {
75
- a.removeEventListener(U, y), setTimeout(() => {
76
- const d = new CustomEvent(j, q);
77
- a.addEventListener(j, p), a.dispatchEvent(d), d.defaultPrevented || R(o ?? document.body, { select: !0 }), a.removeEventListener(j, p), $.remove(h);
78
- }, 0);
79
- };
80
- }
81
- }, [a, y, p, h]);
82
- const w = u.useCallback(
83
- (o) => {
84
- if (!r && !n || h.paused)
85
- return;
86
- const s = o.key === "Tab" && !o.altKey && !o.ctrlKey && !o.metaKey, d = document.activeElement;
87
- if (s && d) {
88
- const E = o.currentTarget, [m, g] = Pe(E);
89
- m && g ? !o.shiftKey && d === g ? (o.preventDefault(), r && R(m, { select: !0 })) : o.shiftKey && d === m && (o.preventDefault(), r && R(g, { select: !0 })) : d === E && o.preventDefault();
90
- }
91
- },
92
- [r, n, h.paused]
93
- );
94
- return /* @__PURE__ */ ue(ce.div, { tabIndex: -1, ...l, ref: v, onKeyDown: w });
95
- });
96
- Ae.displayName = Re;
97
- function ke(e, { select: t = !1 } = {}) {
98
- const r = document.activeElement;
99
- for (const n of e)
100
- if (R(n, { select: t }), document.activeElement !== r)
101
- return;
102
- }
103
- function Pe(e) {
104
- const t = ie(e), r = Q(t, e), n = Q(t.reverse(), e);
105
- return [r, n];
106
- }
107
- function ie(e) {
108
- const t = [], r = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
109
- acceptNode: (n) => {
110
- const c = n.tagName === "INPUT" && n.type === "hidden";
111
- return n.disabled || n.hidden || c ? NodeFilter.FILTER_SKIP : n.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
112
- }
113
- });
114
- for (; r.nextNode(); )
115
- t.push(r.currentNode);
116
- return t;
117
- }
118
- function Q(e, t) {
119
- for (const r of e)
120
- if (!Te(r, { upTo: t }))
121
- return r;
122
- }
123
- function Te(e, { upTo: t }) {
124
- if (getComputedStyle(e).visibility === "hidden")
125
- return !0;
126
- for (; e; ) {
127
- if (t !== void 0 && e === t)
128
- return !1;
129
- if (getComputedStyle(e).display === "none")
130
- return !0;
131
- e = e.parentElement;
132
- }
133
- return !1;
134
- }
135
- function Me(e) {
136
- return e instanceof HTMLInputElement && "select" in e;
137
- }
138
- function R(e, { select: t = !1 } = {}) {
139
- if (e && e.focus) {
140
- const r = document.activeElement;
141
- e.focus({ preventScroll: !0 }), e !== r && Me(e) && t && e.select();
142
- }
143
- }
144
- var $ = Ne();
145
- function Ne() {
146
- let e = [];
147
- return {
148
- add(t) {
149
- const r = e[0];
150
- t !== r && (r == null || r.pause()), e = J(e, t), e.unshift(t);
151
- },
152
- remove(t) {
153
- var r;
154
- e = J(e, t), (r = e[0]) == null || r.resume();
155
- }
156
- };
157
- }
158
- function J(e, t) {
159
- const r = [...e], n = r.indexOf(t);
160
- return n !== -1 && r.splice(n, 1), r;
161
- }
162
- function Fe(e) {
163
- return e.filter((t) => t.tagName !== "A");
164
- }
165
- var Le = function(e) {
166
- if (typeof document > "u")
167
- return null;
168
- var t = Array.isArray(e) ? e[0] : e;
169
- return t.ownerDocument.body;
170
- }, k = /* @__PURE__ */ new WeakMap(), L = /* @__PURE__ */ new WeakMap(), O = {}, K = 0, le = function(e) {
171
- return e && (e.host || le(e.parentNode));
172
- }, Oe = function(e, t) {
173
- return t.map(function(r) {
174
- if (e.contains(r))
175
- return r;
176
- var n = le(r);
177
- return n && e.contains(n) ? n : (console.error("aria-hidden", r, "in not contained inside", e, ". Doing nothing"), null);
178
- }).filter(function(r) {
179
- return !!r;
180
- });
181
- }, Ie = function(e, t, r, n) {
182
- var c = Oe(t, Array.isArray(e) ? e : [e]);
183
- O[r] || (O[r] = /* @__PURE__ */ new WeakMap());
184
- var i = O[r], l = [], a = /* @__PURE__ */ new Set(), S = new Set(c), y = function(f) {
185
- !f || a.has(f) || (a.add(f), y(f.parentNode));
186
- };
187
- c.forEach(y);
188
- var p = function(f) {
189
- !f || S.has(f) || Array.prototype.forEach.call(f.children, function(v) {
190
- if (a.has(v))
191
- p(v);
192
- else
193
- try {
194
- var h = v.getAttribute(n), w = h !== null && h !== "false", o = (k.get(v) || 0) + 1, s = (i.get(v) || 0) + 1;
195
- k.set(v, o), i.set(v, s), l.push(v), o === 1 && w && L.set(v, !0), s === 1 && v.setAttribute(r, "true"), w || v.setAttribute(n, "true");
196
- } catch (d) {
197
- console.error("aria-hidden: cannot operate on ", v, d);
198
- }
199
- });
200
- };
201
- return p(t), a.clear(), K++, function() {
202
- l.forEach(function(f) {
203
- var v = k.get(f) - 1, h = i.get(f) - 1;
204
- k.set(f, v), i.set(f, h), v || (L.has(f) || f.removeAttribute(n), L.delete(f)), h || f.removeAttribute(r);
205
- }), K--, K || (k = /* @__PURE__ */ new WeakMap(), k = /* @__PURE__ */ new WeakMap(), L = /* @__PURE__ */ new WeakMap(), O = {});
206
- };
207
- }, wt = function(e, t, r) {
208
- r === void 0 && (r = "data-aria-hidden");
209
- var n = Array.from(Array.isArray(e) ? e : [e]), c = t || Le(e);
210
- return c ? (n.push.apply(n, Array.from(c.querySelectorAll("[aria-live]"))), Ie(n, c, r, "aria-hidden")) : function() {
211
- return null;
212
- };
213
- }, C = function() {
214
- return C = Object.assign || function(t) {
215
- for (var r, n = 1, c = arguments.length; n < c; n++) {
216
- r = arguments[n];
217
- for (var i in r)
218
- Object.prototype.hasOwnProperty.call(r, i) && (t[i] = r[i]);
219
- }
220
- return t;
221
- }, C.apply(this, arguments);
222
- };
223
- function se(e, t) {
224
- var r = {};
225
- for (var n in e)
226
- Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
227
- if (e != null && typeof Object.getOwnPropertySymbols == "function")
228
- for (var c = 0, n = Object.getOwnPropertySymbols(e); c < n.length; c++)
229
- t.indexOf(n[c]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[c]) && (r[n[c]] = e[n[c]]);
230
- return r;
231
- }
232
- function xe(e, t, r) {
233
- if (r || arguments.length === 2)
234
- for (var n = 0, c = t.length, i; n < c; n++)
235
- (i || !(n in t)) && (i || (i = Array.prototype.slice.call(t, 0, n)), i[n] = t[n]);
236
- return e.concat(i || Array.prototype.slice.call(t));
237
- }
238
- var W = "right-scroll-bar-position", B = "width-before-scroll-bar", We = "with-scroll-bars-hidden", Be = "--removed-body-scroll-bar-size";
239
- function H(e, t) {
240
- return typeof e == "function" ? e(t) : e && (e.current = t), e;
241
- }
242
- function De(e, t) {
243
- var r = ye(function() {
244
- return {
245
- // value
246
- value: e,
247
- // last callback
248
- callback: t,
249
- // "memoized" public interface
250
- facade: {
251
- get current() {
252
- return r.value;
253
- },
254
- set current(n) {
255
- var c = r.value;
256
- c !== n && (r.value = n, r.callback(n, c));
257
- }
258
- }
259
- };
260
- })[0];
261
- return r.callback = t, r.facade;
262
- }
263
- var _e = typeof window < "u" ? u.useLayoutEffect : u.useEffect, ee = /* @__PURE__ */ new WeakMap();
264
- function Ue(e, t) {
265
- var r = De(t || null, function(n) {
266
- return e.forEach(function(c) {
267
- return H(c, n);
268
- });
269
- });
270
- return _e(function() {
271
- var n = ee.get(r);
272
- if (n) {
273
- var c = new Set(n), i = new Set(e), l = r.current;
274
- c.forEach(function(a) {
275
- i.has(a) || H(a, null);
276
- }), i.forEach(function(a) {
277
- c.has(a) || H(a, l);
278
- });
279
- }
280
- ee.set(r, e);
281
- }, [e]), r;
282
- }
283
- function je(e) {
284
- return e;
285
- }
286
- function Ke(e, t) {
287
- t === void 0 && (t = je);
288
- var r = [], n = !1, c = {
289
- read: function() {
290
- if (n)
291
- throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
292
- return r.length ? r[r.length - 1] : e;
293
- },
294
- useMedium: function(i) {
295
- var l = t(i, n);
296
- return r.push(l), function() {
297
- r = r.filter(function(a) {
298
- return a !== l;
299
- });
300
- };
301
- },
302
- assignSyncMedium: function(i) {
303
- for (n = !0; r.length; ) {
304
- var l = r;
305
- r = [], l.forEach(i);
306
- }
307
- r = {
308
- push: function(a) {
309
- return i(a);
310
- },
311
- filter: function() {
312
- return r;
313
- }
314
- };
315
- },
316
- assignMedium: function(i) {
317
- n = !0;
318
- var l = [];
319
- if (r.length) {
320
- var a = r;
321
- r = [], a.forEach(i), l = r;
322
- }
323
- var S = function() {
324
- var p = l;
325
- l = [], p.forEach(i);
326
- }, y = function() {
327
- return Promise.resolve().then(S);
328
- };
329
- y(), r = {
330
- push: function(p) {
331
- l.push(p), y();
332
- },
333
- filter: function(p) {
334
- return l = l.filter(p), r;
335
- }
336
- };
337
- }
338
- };
339
- return c;
340
- }
341
- function He(e) {
342
- e === void 0 && (e = {});
343
- var t = Ke(null);
344
- return t.options = C({ async: !0, ssr: !1 }, e), t;
345
- }
346
- var fe = function(e) {
347
- var t = e.sideCar, r = se(e, ["sideCar"]);
348
- if (!t)
349
- throw new Error("Sidecar: please provide `sideCar` property to import the right car");
350
- var n = t.read();
351
- if (!n)
352
- throw new Error("Sidecar medium not found");
353
- return u.createElement(n, C({}, r));
354
- };
355
- fe.isSideCarExport = !0;
356
- function Ve(e, t) {
357
- return e.useMedium(t), fe;
358
- }
359
- var de = He(), V = function() {
360
- }, D = u.forwardRef(function(e, t) {
361
- var r = u.useRef(null), n = u.useState({
362
- onScrollCapture: V,
363
- onWheelCapture: V,
364
- onTouchMoveCapture: V
365
- }), c = n[0], i = n[1], l = e.forwardProps, a = e.children, S = e.className, y = e.removeScrollBar, p = e.enabled, f = e.shards, v = e.sideCar, h = e.noIsolation, w = e.inert, o = e.allowPinchZoom, s = e.as, d = s === void 0 ? "div" : s, E = e.gapMode, m = se(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), g = v, b = Ue([r, t]), A = C(C({}, m), c);
366
- return u.createElement(
367
- u.Fragment,
368
- null,
369
- p && u.createElement(g, { sideCar: de, removeScrollBar: y, shards: f, noIsolation: h, inert: w, setCallbacks: i, allowPinchZoom: !!o, lockRef: r, gapMode: E }),
370
- l ? u.cloneElement(u.Children.only(a), C(C({}, A), { ref: b })) : u.createElement(d, C({}, A, { className: S, ref: b }), a)
371
- );
372
- });
373
- D.defaultProps = {
374
- enabled: !0,
375
- removeScrollBar: !0,
376
- inert: !1
377
- };
378
- D.classNames = {
379
- fullWidth: B,
380
- zeroRight: W
381
- };
382
- var te, Xe = function() {
383
- if (te)
384
- return te;
385
- if (typeof __webpack_nonce__ < "u")
386
- return __webpack_nonce__;
387
- };
388
- function Ye() {
389
- if (!document)
390
- return null;
391
- var e = document.createElement("style");
392
- e.type = "text/css";
393
- var t = Xe();
394
- return t && e.setAttribute("nonce", t), e;
395
- }
396
- function ze(e, t) {
397
- e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
398
- }
399
- function Ge(e) {
400
- var t = document.head || document.getElementsByTagName("head")[0];
401
- t.appendChild(e);
402
- }
403
- var Ze = function() {
404
- var e = 0, t = null;
405
- return {
406
- add: function(r) {
407
- e == 0 && (t = Ye()) && (ze(t, r), Ge(t)), e++;
408
- },
409
- remove: function() {
410
- e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
411
- }
412
- };
413
- }, qe = function() {
414
- var e = Ze();
415
- return function(t, r) {
416
- u.useEffect(function() {
417
- return e.add(t), function() {
418
- e.remove();
419
- };
420
- }, [t && r]);
421
- };
422
- }, ve = function() {
423
- var e = qe(), t = function(r) {
424
- var n = r.styles, c = r.dynamic;
425
- return e(n, c), null;
426
- };
427
- return t;
428
- }, Qe = {
429
- left: 0,
430
- top: 0,
431
- right: 0,
432
- gap: 0
433
- }, X = function(e) {
434
- return parseInt(e || "", 10) || 0;
435
- }, $e = function(e) {
436
- var t = window.getComputedStyle(document.body), r = t[e === "padding" ? "paddingLeft" : "marginLeft"], n = t[e === "padding" ? "paddingTop" : "marginTop"], c = t[e === "padding" ? "paddingRight" : "marginRight"];
437
- return [X(r), X(n), X(c)];
438
- }, Je = function(e) {
439
- if (e === void 0 && (e = "margin"), typeof window > "u")
440
- return Qe;
441
- var t = $e(e), r = document.documentElement.clientWidth, n = window.innerWidth;
442
- return {
443
- left: t[0],
444
- top: t[1],
445
- right: t[2],
446
- gap: Math.max(0, n - r + t[2] - t[0])
447
- };
448
- }, et = ve(), M = "data-scroll-locked", tt = function(e, t, r, n) {
449
- var c = e.left, i = e.top, l = e.right, a = e.gap;
450
- return r === void 0 && (r = "margin"), `
451
- .`.concat(We, ` {
452
- overflow: hidden `).concat(n, `;
453
- padding-right: `).concat(a, "px ").concat(n, `;
454
- }
455
- body[`).concat(M, `] {
456
- overflow: hidden `).concat(n, `;
457
- overscroll-behavior: contain;
458
- `).concat([
459
- t && "position: relative ".concat(n, ";"),
460
- r === "margin" && `
461
- padding-left: `.concat(c, `px;
462
- padding-top: `).concat(i, `px;
463
- padding-right: `).concat(l, `px;
464
- margin-left:0;
465
- margin-top:0;
466
- margin-right: `).concat(a, "px ").concat(n, `;
467
- `),
468
- r === "padding" && "padding-right: ".concat(a, "px ").concat(n, ";")
469
- ].filter(Boolean).join(""), `
470
- }
471
-
472
- .`).concat(W, ` {
473
- right: `).concat(a, "px ").concat(n, `;
474
- }
475
-
476
- .`).concat(B, ` {
477
- margin-right: `).concat(a, "px ").concat(n, `;
478
- }
479
-
480
- .`).concat(W, " .").concat(W, ` {
481
- right: 0 `).concat(n, `;
482
- }
483
-
484
- .`).concat(B, " .").concat(B, ` {
485
- margin-right: 0 `).concat(n, `;
486
- }
487
-
488
- body[`).concat(M, `] {
489
- `).concat(Be, ": ").concat(a, `px;
490
- }
491
- `);
492
- }, re = function() {
493
- var e = parseInt(document.body.getAttribute(M) || "0", 10);
494
- return isFinite(e) ? e : 0;
495
- }, rt = function() {
496
- u.useEffect(function() {
497
- return document.body.setAttribute(M, (re() + 1).toString()), function() {
498
- var e = re() - 1;
499
- e <= 0 ? document.body.removeAttribute(M) : document.body.setAttribute(M, e.toString());
500
- };
501
- }, []);
502
- }, nt = function(e) {
503
- var t = e.noRelative, r = e.noImportant, n = e.gapMode, c = n === void 0 ? "margin" : n;
504
- rt();
505
- var i = u.useMemo(function() {
506
- return Je(c);
507
- }, [c]);
508
- return u.createElement(et, { styles: tt(i, !t, c, r ? "" : "!important") });
509
- }, Y = !1;
510
- if (typeof window < "u")
511
- try {
512
- var I = Object.defineProperty({}, "passive", {
513
- get: function() {
514
- return Y = !0, !0;
515
- }
516
- });
517
- window.addEventListener("test", I, I), window.removeEventListener("test", I, I);
518
- } catch {
519
- Y = !1;
520
- }
521
- var P = Y ? { passive: !1 } : !1, at = function(e) {
522
- return e.tagName === "TEXTAREA";
523
- }, he = function(e, t) {
524
- if (!(e instanceof Element))
525
- return !1;
526
- var r = window.getComputedStyle(e);
527
- return (
528
- // not-not-scrollable
529
- r[t] !== "hidden" && // contains scroll inside self
530
- !(r.overflowY === r.overflowX && !at(e) && r[t] === "visible")
531
- );
532
- }, ot = function(e) {
533
- return he(e, "overflowY");
534
- }, ct = function(e) {
535
- return he(e, "overflowX");
536
- }, ne = function(e, t) {
537
- var r = t.ownerDocument, n = t;
538
- do {
539
- typeof ShadowRoot < "u" && n instanceof ShadowRoot && (n = n.host);
540
- var c = me(e, n);
541
- if (c) {
542
- var i = pe(e, n), l = i[1], a = i[2];
543
- if (l > a)
544
- return !0;
545
- }
546
- n = n.parentNode;
547
- } while (n && n !== r.body);
548
- return !1;
549
- }, ut = function(e) {
550
- var t = e.scrollTop, r = e.scrollHeight, n = e.clientHeight;
551
- return [
552
- t,
553
- r,
554
- n
555
- ];
556
- }, it = function(e) {
557
- var t = e.scrollLeft, r = e.scrollWidth, n = e.clientWidth;
558
- return [
559
- t,
560
- r,
561
- n
562
- ];
563
- }, me = function(e, t) {
564
- return e === "v" ? ot(t) : ct(t);
565
- }, pe = function(e, t) {
566
- return e === "v" ? ut(t) : it(t);
567
- }, lt = function(e, t) {
568
- return e === "h" && t === "rtl" ? -1 : 1;
569
- }, st = function(e, t, r, n, c) {
570
- var i = lt(e, window.getComputedStyle(t).direction), l = i * n, a = r.target, S = t.contains(a), y = !1, p = l > 0, f = 0, v = 0;
571
- do {
572
- var h = pe(e, a), w = h[0], o = h[1], s = h[2], d = o - s - i * w;
573
- (w || d) && me(e, a) && (f += d, v += w), a instanceof ShadowRoot ? a = a.host : a = a.parentNode;
574
- } while (
575
- // portaled content
576
- !S && a !== document.body || // self content
577
- S && (t.contains(a) || t === a)
578
- );
579
- return (p && (c && Math.abs(f) < 1 || !c && l > f) || !p && (c && Math.abs(v) < 1 || !c && -l > v)) && (y = !0), y;
580
- }, x = function(e) {
581
- return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
582
- }, ae = function(e) {
583
- return [e.deltaX, e.deltaY];
584
- }, oe = function(e) {
585
- return e && "current" in e ? e.current : e;
586
- }, ft = function(e, t) {
587
- return e[0] === t[0] && e[1] === t[1];
588
- }, dt = function(e) {
589
- return `
590
- .block-interactivity-`.concat(e, ` {pointer-events: none;}
591
- .allow-interactivity-`).concat(e, ` {pointer-events: all;}
592
- `);
593
- }, vt = 0, T = [];
594
- function ht(e) {
595
- var t = u.useRef([]), r = u.useRef([0, 0]), n = u.useRef(), c = u.useState(vt++)[0], i = u.useState(ve)[0], l = u.useRef(e);
596
- u.useEffect(function() {
597
- l.current = e;
598
- }, [e]), u.useEffect(function() {
599
- if (e.inert) {
600
- document.body.classList.add("block-interactivity-".concat(c));
601
- var o = xe([e.lockRef.current], (e.shards || []).map(oe), !0).filter(Boolean);
602
- return o.forEach(function(s) {
603
- return s.classList.add("allow-interactivity-".concat(c));
604
- }), function() {
605
- document.body.classList.remove("block-interactivity-".concat(c)), o.forEach(function(s) {
606
- return s.classList.remove("allow-interactivity-".concat(c));
607
- });
608
- };
609
- }
610
- }, [e.inert, e.lockRef.current, e.shards]);
611
- var a = u.useCallback(function(o, s) {
612
- if ("touches" in o && o.touches.length === 2 || o.type === "wheel" && o.ctrlKey)
613
- return !l.current.allowPinchZoom;
614
- var d = x(o), E = r.current, m = "deltaX" in o ? o.deltaX : E[0] - d[0], g = "deltaY" in o ? o.deltaY : E[1] - d[1], b, A = o.target, N = Math.abs(m) > Math.abs(g) ? "h" : "v";
615
- if ("touches" in o && N === "h" && A.type === "range")
616
- return !1;
617
- var F = ne(N, A);
618
- if (!F)
619
- return !0;
620
- if (F ? b = N : (b = N === "v" ? "h" : "v", F = ne(N, A)), !F)
621
- return !1;
622
- if (!n.current && "changedTouches" in o && (m || g) && (n.current = b), !b)
623
- return !0;
624
- var z = n.current || b;
625
- return st(z, s, o, z === "h" ? m : g, !0);
626
- }, []), S = u.useCallback(function(o) {
627
- var s = o;
628
- if (!(!T.length || T[T.length - 1] !== i)) {
629
- var d = "deltaY" in s ? ae(s) : x(s), E = t.current.filter(function(b) {
630
- return b.name === s.type && (b.target === s.target || s.target === b.shadowParent) && ft(b.delta, d);
631
- })[0];
632
- if (E && E.should) {
633
- s.cancelable && s.preventDefault();
634
- return;
635
- }
636
- if (!E) {
637
- var m = (l.current.shards || []).map(oe).filter(Boolean).filter(function(b) {
638
- return b.contains(s.target);
639
- }), g = m.length > 0 ? a(s, m[0]) : !l.current.noIsolation;
640
- g && s.cancelable && s.preventDefault();
641
- }
642
- }
643
- }, []), y = u.useCallback(function(o, s, d, E) {
644
- var m = { name: o, delta: s, target: d, should: E, shadowParent: mt(d) };
645
- t.current.push(m), setTimeout(function() {
646
- t.current = t.current.filter(function(g) {
647
- return g !== m;
648
- });
649
- }, 1);
650
- }, []), p = u.useCallback(function(o) {
651
- r.current = x(o), n.current = void 0;
652
- }, []), f = u.useCallback(function(o) {
653
- y(o.type, ae(o), o.target, a(o, e.lockRef.current));
654
- }, []), v = u.useCallback(function(o) {
655
- y(o.type, x(o), o.target, a(o, e.lockRef.current));
656
- }, []);
657
- u.useEffect(function() {
658
- return T.push(i), e.setCallbacks({
659
- onScrollCapture: f,
660
- onWheelCapture: f,
661
- onTouchMoveCapture: v
662
- }), document.addEventListener("wheel", S, P), document.addEventListener("touchmove", S, P), document.addEventListener("touchstart", p, P), function() {
663
- T = T.filter(function(o) {
664
- return o !== i;
665
- }), document.removeEventListener("wheel", S, P), document.removeEventListener("touchmove", S, P), document.removeEventListener("touchstart", p, P);
666
- };
667
- }, []);
668
- var h = e.removeScrollBar, w = e.inert;
669
- return u.createElement(
670
- u.Fragment,
671
- null,
672
- w ? u.createElement(i, { styles: dt(c) }) : null,
673
- h ? u.createElement(nt, { gapMode: e.gapMode }) : null
674
- );
675
- }
676
- function mt(e) {
677
- for (var t = null; e !== null; )
678
- e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
679
- return t;
680
- }
681
- const pt = Ve(de, ht);
682
- var ge = u.forwardRef(function(e, t) {
683
- return u.createElement(D, C({}, e, { ref: t, sideCar: pt }));
684
- });
685
- ge.classNames = D.classNames;
686
- const Ct = ge;
687
- export {
688
- Ae as F,
689
- Ce as P,
690
- Ct as R,
691
- wt as h,
692
- St as u
693
- };
@@ -1,6 +0,0 @@
1
- import './assets/Container.css';const c = {
2
- "rp-container": "_rp-container_f63gc_1"
3
- };
4
- export {
5
- c
6
- };
@@ -1,11 +0,0 @@
1
- import './assets/DropDown.css';const d = "_slideDownAndFade_1vzkq_1", e = "_slideLeftAndFade_1vzkq_1", n = "_slideUpAndFade_1vzkq_1", o = "_slideRightAndFade_1vzkq_1", s = {
2
- "rp-dropdown-content": "_rp-dropdown-content_1vzkq_1",
3
- slideDownAndFade: d,
4
- slideLeftAndFade: e,
5
- slideUpAndFade: n,
6
- slideRightAndFade: o,
7
- "rp-dropdown-arrow": "_rp-dropdown-arrow_1vzkq_30"
8
- };
9
- export {
10
- s as c
11
- };