@luciodale/swipe-bar 1.2.2 → 1.2.3

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.
@@ -1,4 +1,4 @@
1
- import ft, { createContext as gt, useState as re, useRef as L, useMemo as Ze, useCallback as U, useEffect as q, useContext as ht } from "react";
1
+ import gt, { createContext as ht, useState as re, useRef as L, useMemo as Ze, useCallback as H, useEffect as Z, useContext as mt } from "react";
2
2
  var we = { exports: {} }, de = {};
3
3
  /**
4
4
  * @license React
@@ -9,23 +9,23 @@ var we = { exports: {} }, de = {};
9
9
  * This source code is licensed under the MIT license found in the
10
10
  * LICENSE file in the root directory of this source tree.
11
11
  */
12
- var Ce;
13
- function mt() {
14
- if (Ce) return de;
15
- Ce = 1;
12
+ var Me;
13
+ function bt() {
14
+ if (Me) return de;
15
+ Me = 1;
16
16
  var e = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
17
- function r(i, s, o) {
17
+ function r(i, a, o) {
18
18
  var u = null;
19
- if (o !== void 0 && (u = "" + o), s.key !== void 0 && (u = "" + s.key), "key" in s) {
19
+ if (o !== void 0 && (u = "" + o), a.key !== void 0 && (u = "" + a.key), "key" in a) {
20
20
  o = {};
21
- for (var a in s)
22
- a !== "key" && (o[a] = s[a]);
23
- } else o = s;
24
- return s = o.ref, {
21
+ for (var s in a)
22
+ s !== "key" && (o[s] = a[s]);
23
+ } else o = a;
24
+ return a = o.ref, {
25
25
  $$typeof: e,
26
26
  type: i,
27
27
  key: u,
28
- ref: s !== void 0 ? s : null,
28
+ ref: a !== void 0 ? a : null,
29
29
  props: o
30
30
  };
31
31
  }
@@ -41,26 +41,26 @@ var fe = {};
41
41
  * This source code is licensed under the MIT license found in the
42
42
  * LICENSE file in the root directory of this source tree.
43
43
  */
44
- var De;
45
- function pt() {
46
- return De || (De = 1, process.env.NODE_ENV !== "production" && function() {
44
+ var Le;
45
+ function vt() {
46
+ return Le || (Le = 1, process.env.NODE_ENV !== "production" && function() {
47
47
  function e(n) {
48
48
  if (n == null) return null;
49
49
  if (typeof n == "function")
50
- return n.$$typeof === V ? null : n.displayName || n.name || null;
50
+ return n.$$typeof === X ? null : n.displayName || n.name || null;
51
51
  if (typeof n == "string") return n;
52
52
  switch (n) {
53
- case P:
53
+ case A:
54
54
  return "Fragment";
55
55
  case _:
56
56
  return "Profiler";
57
- case D:
57
+ case M:
58
58
  return "StrictMode";
59
- case B:
59
+ case N:
60
60
  return "Suspense";
61
- case m:
61
+ case f:
62
62
  return "SuspenseList";
63
- case O:
63
+ case Y:
64
64
  return "Activity";
65
65
  }
66
66
  if (typeof n == "object")
@@ -69,19 +69,19 @@ function pt() {
69
69
  ), n.$$typeof) {
70
70
  case y:
71
71
  return "Portal";
72
- case $:
72
+ case D:
73
73
  return n.displayName || "Context";
74
- case C:
74
+ case W:
75
75
  return (n._context.displayName || "Context") + ".Consumer";
76
76
  case j:
77
- var f = n.render;
78
- return n = n.displayName, n || (n = f.displayName || f.name || "", n = n !== "" ? "ForwardRef(" + n + ")" : "ForwardRef"), n;
77
+ var g = n.render;
78
+ return n = n.displayName, n || (n = g.displayName || g.name || "", n = n !== "" ? "ForwardRef(" + n + ")" : "ForwardRef"), n;
79
+ case x:
80
+ return g = n.displayName || null, g !== null ? g : e(n.type) || "Memo";
79
81
  case p:
80
- return f = n.displayName || null, f !== null ? f : e(n.type) || "Memo";
81
- case T:
82
- f = n._payload, n = n._init;
82
+ g = n._payload, n = n._init;
83
83
  try {
84
- return e(n(f));
84
+ return e(n(g));
85
85
  } catch {
86
86
  }
87
87
  }
@@ -93,72 +93,72 @@ function pt() {
93
93
  function r(n) {
94
94
  try {
95
95
  t(n);
96
- var f = !1;
96
+ var g = !1;
97
97
  } catch {
98
- f = !0;
98
+ g = !0;
99
99
  }
100
- if (f) {
101
- f = console;
102
- var E = f.error, I = typeof Symbol == "function" && Symbol.toStringTag && n[Symbol.toStringTag] || n.constructor.name || "Object";
103
- return E.call(
104
- f,
100
+ if (g) {
101
+ g = console;
102
+ var T = g.error, P = typeof Symbol == "function" && Symbol.toStringTag && n[Symbol.toStringTag] || n.constructor.name || "Object";
103
+ return T.call(
104
+ g,
105
105
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
106
- I
106
+ P
107
107
  ), t(n);
108
108
  }
109
109
  }
110
110
  function i(n) {
111
- if (n === P) return "<>";
112
- if (typeof n == "object" && n !== null && n.$$typeof === T)
111
+ if (n === A) return "<>";
112
+ if (typeof n == "object" && n !== null && n.$$typeof === p)
113
113
  return "<...>";
114
114
  try {
115
- var f = e(n);
116
- return f ? "<" + f + ">" : "<...>";
115
+ var g = e(n);
116
+ return g ? "<" + g + ">" : "<...>";
117
117
  } catch {
118
118
  return "<...>";
119
119
  }
120
120
  }
121
- function s() {
122
- var n = F.A;
121
+ function a() {
122
+ var n = z.A;
123
123
  return n === null ? null : n.getOwner();
124
124
  }
125
125
  function o() {
126
126
  return Error("react-stack-top-frame");
127
127
  }
128
128
  function u(n) {
129
- if (k.call(n, "key")) {
130
- var f = Object.getOwnPropertyDescriptor(n, "key").get;
131
- if (f && f.isReactWarning) return !1;
129
+ if (F.call(n, "key")) {
130
+ var g = Object.getOwnPropertyDescriptor(n, "key").get;
131
+ if (g && g.isReactWarning) return !1;
132
132
  }
133
133
  return n.key !== void 0;
134
134
  }
135
- function a(n, f) {
136
- function E() {
137
- Q || (Q = !0, console.error(
135
+ function s(n, g) {
136
+ function T() {
137
+ U || (U = !0, console.error(
138
138
  "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
139
- f
139
+ g
140
140
  ));
141
141
  }
142
- E.isReactWarning = !0, Object.defineProperty(n, "key", {
143
- get: E,
142
+ T.isReactWarning = !0, Object.defineProperty(n, "key", {
143
+ get: T,
144
144
  configurable: !0
145
145
  });
146
146
  }
147
147
  function l() {
148
148
  var n = e(this.type);
149
- return J[n] || (J[n] = !0, console.error(
149
+ return V[n] || (V[n] = !0, console.error(
150
150
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
151
151
  )), n = this.props.ref, n !== void 0 ? n : null;
152
152
  }
153
- function c(n, f, E, I, z, Z) {
154
- var X = E.ref;
153
+ function c(n, g, T, P, Q, K) {
154
+ var C = T.ref;
155
155
  return n = {
156
- $$typeof: M,
156
+ $$typeof: I,
157
157
  type: n,
158
- key: f,
159
- props: E,
160
- _owner: I
161
- }, (X !== void 0 ? X : null) !== null ? Object.defineProperty(n, "ref", {
158
+ key: g,
159
+ props: T,
160
+ _owner: P
161
+ }, (C !== void 0 ? C : null) !== null ? Object.defineProperty(n, "ref", {
162
162
  enumerable: !1,
163
163
  get: l
164
164
  }) : Object.defineProperty(n, "ref", { enumerable: !1, value: null }), n._store = {}, Object.defineProperty(n._store, "validated", {
@@ -175,441 +175,443 @@ function pt() {
175
175
  configurable: !1,
176
176
  enumerable: !1,
177
177
  writable: !0,
178
- value: z
178
+ value: Q
179
179
  }), Object.defineProperty(n, "_debugTask", {
180
180
  configurable: !1,
181
181
  enumerable: !1,
182
182
  writable: !0,
183
- value: Z
183
+ value: K
184
184
  }), Object.freeze && (Object.freeze(n.props), Object.freeze(n)), n;
185
185
  }
186
- function x(n, f, E, I, z, Z) {
187
- var X = f.children;
188
- if (X !== void 0)
189
- if (I)
190
- if (H(X)) {
191
- for (I = 0; I < X.length; I++)
192
- w(X[I]);
193
- Object.freeze && Object.freeze(X);
186
+ function R(n, g, T, P, Q, K) {
187
+ var C = g.children;
188
+ if (C !== void 0)
189
+ if (P)
190
+ if (G(C)) {
191
+ for (P = 0; P < C.length; P++)
192
+ v(C[P]);
193
+ Object.freeze && Object.freeze(C);
194
194
  } else
195
195
  console.error(
196
196
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
197
197
  );
198
- else w(X);
199
- if (k.call(f, "key")) {
200
- X = e(n);
201
- var ie = Object.keys(f).filter(function(me) {
198
+ else v(C);
199
+ if (F.call(g, "key")) {
200
+ C = e(n);
201
+ var ie = Object.keys(g).filter(function(me) {
202
202
  return me !== "key";
203
203
  });
204
- I = 0 < ie.length ? "{key: someKey, " + ie.join(": ..., ") + ": ...}" : "{key: someKey}", N[X + I] || (ie = 0 < ie.length ? "{" + ie.join(": ..., ") + ": ...}" : "{}", console.error(
204
+ P = 0 < ie.length ? "{key: someKey, " + ie.join(": ..., ") + ": ...}" : "{key: someKey}", ne[C + P] || (ie = 0 < ie.length ? "{" + ie.join(": ..., ") + ": ...}" : "{}", console.error(
205
205
  `A props object containing a "key" prop is being spread into JSX:
206
206
  let props = %s;
207
207
  <%s {...props} />
208
208
  React keys must be passed directly to JSX without using spread:
209
209
  let props = %s;
210
210
  <%s key={someKey} {...props} />`,
211
- I,
212
- X,
211
+ P,
212
+ C,
213
213
  ie,
214
- X
215
- ), N[X + I] = !0);
214
+ C
215
+ ), ne[C + P] = !0);
216
216
  }
217
- if (X = null, E !== void 0 && (r(E), X = "" + E), u(f) && (r(f.key), X = "" + f.key), "key" in f) {
218
- E = {};
219
- for (var ue in f)
220
- ue !== "key" && (E[ue] = f[ue]);
221
- } else E = f;
222
- return X && a(
223
- E,
217
+ if (C = null, T !== void 0 && (r(T), C = "" + T), u(g) && (r(g.key), C = "" + g.key), "key" in g) {
218
+ T = {};
219
+ for (var ue in g)
220
+ ue !== "key" && (T[ue] = g[ue]);
221
+ } else T = g;
222
+ return C && s(
223
+ T,
224
224
  typeof n == "function" ? n.displayName || n.name || "Unknown" : n
225
225
  ), c(
226
226
  n,
227
- X,
228
- E,
229
- s(),
230
- z,
231
- Z
227
+ C,
228
+ T,
229
+ a(),
230
+ Q,
231
+ K
232
232
  );
233
233
  }
234
- function w(n) {
235
- v(n) ? n._store && (n._store.validated = 1) : typeof n == "object" && n !== null && n.$$typeof === T && (n._payload.status === "fulfilled" ? v(n._payload.value) && n._payload.value._store && (n._payload.value._store.validated = 1) : n._store && (n._store.validated = 1));
236
- }
237
234
  function v(n) {
238
- return typeof n == "object" && n !== null && n.$$typeof === M;
235
+ b(n) ? n._store && (n._store.validated = 1) : typeof n == "object" && n !== null && n.$$typeof === p && (n._payload.status === "fulfilled" ? b(n._payload.value) && n._payload.value._store && (n._payload.value._store.validated = 1) : n._store && (n._store.validated = 1));
236
+ }
237
+ function b(n) {
238
+ return typeof n == "object" && n !== null && n.$$typeof === I;
239
239
  }
240
- var b = ft, M = Symbol.for("react.transitional.element"), y = Symbol.for("react.portal"), P = Symbol.for("react.fragment"), D = Symbol.for("react.strict_mode"), _ = Symbol.for("react.profiler"), C = Symbol.for("react.consumer"), $ = Symbol.for("react.context"), j = Symbol.for("react.forward_ref"), B = Symbol.for("react.suspense"), m = Symbol.for("react.suspense_list"), p = Symbol.for("react.memo"), T = Symbol.for("react.lazy"), O = Symbol.for("react.activity"), V = Symbol.for("react.client.reference"), F = b.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, k = Object.prototype.hasOwnProperty, H = Array.isArray, G = console.createTask ? console.createTask : function() {
240
+ var w = gt, I = Symbol.for("react.transitional.element"), y = Symbol.for("react.portal"), A = Symbol.for("react.fragment"), M = Symbol.for("react.strict_mode"), _ = Symbol.for("react.profiler"), W = Symbol.for("react.consumer"), D = Symbol.for("react.context"), j = Symbol.for("react.forward_ref"), N = Symbol.for("react.suspense"), f = Symbol.for("react.suspense_list"), x = Symbol.for("react.memo"), p = Symbol.for("react.lazy"), Y = Symbol.for("react.activity"), X = Symbol.for("react.client.reference"), z = w.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, F = Object.prototype.hasOwnProperty, G = Array.isArray, k = console.createTask ? console.createTask : function() {
241
241
  return null;
242
242
  };
243
- b = {
243
+ w = {
244
244
  react_stack_bottom_frame: function(n) {
245
245
  return n();
246
246
  }
247
247
  };
248
- var Q, J = {}, Y = b.react_stack_bottom_frame.bind(
249
- b,
248
+ var U, V = {}, q = w.react_stack_bottom_frame.bind(
249
+ w,
250
250
  o
251
- )(), ne = G(i(o)), N = {};
252
- fe.Fragment = P, fe.jsx = function(n, f, E) {
253
- var I = 1e4 > F.recentlyCreatedOwnerStacks++;
254
- return x(
251
+ )(), $ = k(i(o)), ne = {};
252
+ fe.Fragment = A, fe.jsx = function(n, g, T) {
253
+ var P = 1e4 > z.recentlyCreatedOwnerStacks++;
254
+ return R(
255
255
  n,
256
- f,
257
- E,
256
+ g,
257
+ T,
258
258
  !1,
259
- I ? Error("react-stack-top-frame") : Y,
260
- I ? G(i(n)) : ne
259
+ P ? Error("react-stack-top-frame") : q,
260
+ P ? k(i(n)) : $
261
261
  );
262
- }, fe.jsxs = function(n, f, E) {
263
- var I = 1e4 > F.recentlyCreatedOwnerStacks++;
264
- return x(
262
+ }, fe.jsxs = function(n, g, T) {
263
+ var P = 1e4 > z.recentlyCreatedOwnerStacks++;
264
+ return R(
265
265
  n,
266
- f,
267
- E,
266
+ g,
267
+ T,
268
268
  !0,
269
- I ? Error("react-stack-top-frame") : Y,
270
- I ? G(i(n)) : ne
269
+ P ? Error("react-stack-top-frame") : q,
270
+ P ? k(i(n)) : $
271
271
  );
272
272
  };
273
273
  }()), fe;
274
274
  }
275
- process.env.NODE_ENV === "production" ? we.exports = mt() : we.exports = pt();
276
- var R = we.exports;
277
- const ze = gt(null), pe = (e) => {
275
+ process.env.NODE_ENV === "production" ? we.exports = bt() : we.exports = vt();
276
+ var O = we.exports;
277
+ const ze = ht(null), be = (e) => {
278
278
  throw new Error(`Unhandled sidebar side: ${e}`);
279
- }, ve = { isOpen: !1, anchorState: "closed" }, nr = ({
279
+ }, ve = { isOpen: !1, anchorState: "closed" }, or = ({
280
280
  children: e,
281
281
  sidebarWidthPx: t,
282
282
  transitionMs: r,
283
283
  edgeActivationWidthPx: i,
284
- dragActivationDeltaPx: s,
284
+ dragActivationDeltaPx: a,
285
285
  showOverlay: o,
286
286
  isAbsolute: u,
287
- overlayBackgroundColor: a,
287
+ overlayBackgroundColor: s,
288
288
  toggleIconColor: l,
289
289
  toggleIconSizePx: c,
290
- toggleIconEdgeDistancePx: x,
291
- showToggle: w,
292
- mediaQueryWidth: v,
293
- swipeBarZIndex: b,
294
- toggleZIndex: M,
290
+ toggleIconEdgeDistancePx: R,
291
+ showToggle: v,
292
+ mediaQueryWidth: b,
293
+ swipeBarZIndex: w,
294
+ toggleZIndex: I,
295
295
  overlayZIndex: y,
296
- fadeContent: P,
297
- fadeContentTransitionMs: D
296
+ fadeContent: A,
297
+ fadeContentTransitionMs: M,
298
+ closeSidebarOnOverlayClick: _
298
299
  }) => {
299
- var Ie, Me;
300
- const [_, C] = re(null), [$, j] = re(!1), [B, m] = re(!1), [p, T] = re({}), [O, V] = re({}), F = L(null), k = L(null), H = L(null), G = L(null), [Q, J] = re({}), [Y, ne] = re({}), N = L(/* @__PURE__ */ new Map()), n = L(null), f = L([]), E = ((Ie = Q.primary) == null ? void 0 : Ie.isOpen) ?? !1, I = ((Me = Q.primary) == null ? void 0 : Me.anchorState) ?? "closed", z = Ze(
301
- () => Object.values(Q).some((d) => d.isOpen),
302
- [Q]
303
- ), Z = N.current.get("primary"), X = (Z == null ? void 0 : Z.sidebarRef) ?? { current: null }, ie = (Z == null ? void 0 : Z.toggleRef) ?? { current: null }, ue = Y.primary ?? {}, [me, Ke] = re({
304
- sidebarWidthPx: t ?? St,
305
- sidebarHeightPx: Le,
306
- transitionMs: r ?? vt,
307
- edgeActivationWidthPx: i ?? bt,
308
- dragActivationDeltaPx: s ?? wt,
309
- showOverlay: o ?? yt,
310
- isAbsolute: u ?? xt,
311
- overlayBackgroundColor: a ?? qe,
312
- toggleIconColor: l ?? Rt,
313
- toggleIconSizePx: c ?? Tt,
314
- toggleIconEdgeDistancePx: x ?? Et,
315
- showToggle: w ?? At,
316
- mediaQueryWidth: v ?? Se,
317
- swipeBarZIndex: b ?? Ot,
318
- toggleZIndex: M ?? Pt,
319
- overlayZIndex: y ?? It,
320
- fadeContent: P ?? Ct,
321
- fadeContentTransitionMs: D ?? _t,
322
- swipeToOpen: Dt,
323
- swipeToClose: Lt,
324
- midAnchorPoint: Xt,
325
- midAnchorPointPx: Le / 3,
326
- disabled: !1
327
- }), et = U((d, g) => {
328
- N.current.set(d, g), J((h) => h[d] ? h : { ...h, [d]: { ...ve } });
329
- }, []), tt = U((d) => {
330
- N.current.delete(d), J((g) => {
331
- const h = { ...g };
332
- return delete h[d], h;
333
- }), ne((g) => {
334
- const h = { ...g };
335
- return delete h[d], h;
300
+ var Ie, Ce;
301
+ const [W, D] = re(null), [j, N] = re(!1), [f, x] = re(!1), [p, Y] = re({}), [X, z] = re({}), F = L(null), G = L(null), k = L(null), U = L(null), [V, q] = re({}), [$, ne] = re({}), n = L(/* @__PURE__ */ new Map()), g = L(null), T = L([]), P = ((Ie = V.primary) == null ? void 0 : Ie.isOpen) ?? !1, Q = ((Ce = V.primary) == null ? void 0 : Ce.anchorState) ?? "closed", K = Ze(
302
+ () => Object.values(V).some((d) => d.isOpen),
303
+ [V]
304
+ ), C = n.current.get("primary"), ie = (C == null ? void 0 : C.sidebarRef) ?? { current: null }, ue = (C == null ? void 0 : C.toggleRef) ?? { current: null }, me = $.primary ?? {}, [Ke, et] = re({
305
+ sidebarWidthPx: t ?? yt,
306
+ sidebarHeightPx: De,
307
+ transitionMs: r ?? pt,
308
+ edgeActivationWidthPx: i ?? wt,
309
+ dragActivationDeltaPx: a ?? St,
310
+ showOverlay: o ?? xt,
311
+ isAbsolute: u ?? Tt,
312
+ overlayBackgroundColor: s ?? Ve,
313
+ toggleIconColor: l ?? Ot,
314
+ toggleIconSizePx: c ?? Et,
315
+ toggleIconEdgeDistancePx: R ?? At,
316
+ showToggle: v ?? Pt,
317
+ mediaQueryWidth: b ?? Se,
318
+ swipeBarZIndex: w ?? It,
319
+ toggleZIndex: I ?? Ct,
320
+ overlayZIndex: y ?? _t,
321
+ fadeContent: A ?? Dt,
322
+ fadeContentTransitionMs: M ?? Lt,
323
+ swipeToOpen: Xt,
324
+ swipeToClose: Yt,
325
+ midAnchorPoint: $t,
326
+ midAnchorPointPx: De / 3,
327
+ disabled: !1,
328
+ closeSidebarOnOverlayClick: _ ?? Rt
329
+ }), tt = H((d, h) => {
330
+ n.current.set(d, h), q((m) => m[d] ? m : { ...m, [d]: { ...ve } });
331
+ }, []), rt = H((d) => {
332
+ n.current.delete(d), q((h) => {
333
+ const m = { ...h };
334
+ return delete m[d], m;
335
+ }), ne((h) => {
336
+ const m = { ...h };
337
+ return delete m[d], m;
336
338
  });
337
- }, []), rt = U((d) => N.current.get(d), []), nt = U((d, g) => {
338
- ne((h) => h[d] === g ? h : { ...h, [d]: g });
339
- }, []), ee = U((d, g) => {
340
- J((h) => {
341
- const S = h[d] ?? ve;
342
- return S.isOpen === g ? h : { ...h, [d]: { ...S, isOpen: g } };
339
+ }, []), nt = H((d) => n.current.get(d), []), it = H((d, h) => {
340
+ ne((m) => m[d] === h ? m : { ...m, [d]: h });
341
+ }, []), ee = H((d, h) => {
342
+ q((m) => {
343
+ const S = m[d] ?? ve;
344
+ return S.isOpen === h ? m : { ...m, [d]: { ...S, isOpen: h } };
343
345
  });
344
- }, []), te = U((d, g) => {
345
- J((h) => {
346
- const S = h[d] ?? ve;
347
- return S.anchorState === g ? h : { ...h, [d]: { ...S, anchorState: g } };
346
+ }, []), te = H((d, h) => {
347
+ q((m) => {
348
+ const S = m[d] ?? ve;
349
+ return S.anchorState === h ? m : { ...m, [d]: { ...S, anchorState: h } };
348
350
  });
349
351
  }, []);
350
- q(() => ($ || B || z ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
352
+ Z(() => (j || f || K ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
351
353
  document.body.style.overflow = "";
352
- }), [$, B, z]), q(() => {
354
+ }), [j, f, K]), Z(() => {
353
355
  var d;
354
356
  if (p.fadeContent === !1) {
355
- const g = (d = F.current) == null ? void 0 : d.firstElementChild;
356
- g && (g.style.opacity = "1");
357
+ const h = (d = F.current) == null ? void 0 : d.firstElementChild;
358
+ h && (h.style.opacity = "1");
357
359
  }
358
- }, [p.fadeContent]), q(() => {
360
+ }, [p.fadeContent]), Z(() => {
359
361
  var d;
360
- if (O.fadeContent === !1) {
361
- const g = (d = k.current) == null ? void 0 : d.firstElementChild;
362
- g && (g.style.opacity = "1");
362
+ if (X.fadeContent === !1) {
363
+ const h = (d = G.current) == null ? void 0 : d.firstElementChild;
364
+ h && (h.style.opacity = "1");
363
365
  }
364
- }, [O.fadeContent]), q(() => {
366
+ }, [X.fadeContent]), Z(() => {
365
367
  var d;
366
- for (const [g, h] of Object.entries(Y))
367
- if (h.fadeContent === !1) {
368
- const S = N.current.get(g), A = (d = S == null ? void 0 : S.sidebarRef.current) == null ? void 0 : d.firstElementChild;
369
- A && (A.style.opacity = "1");
368
+ for (const [h, m] of Object.entries($))
369
+ if (m.fadeContent === !1) {
370
+ const S = n.current.get(h), E = (d = S == null ? void 0 : S.sidebarRef.current) == null ? void 0 : d.firstElementChild;
371
+ E && (E.style.opacity = "1");
370
372
  }
371
- }, [Y]);
372
- const it = U((d) => {
373
- Ke((g) => ({ ...g, ...d }));
374
- }, []), se = U((d) => {
375
- const g = f.current, h = g.indexOf(d);
376
- h !== -1 && g.splice(h, 1), g.push(d), C("bottom");
377
- }, []), Pe = U((d) => {
378
- const g = f.current, h = g.indexOf(d);
379
- h !== -1 && g.splice(h, 1), J((S) => (Object.entries(S).some(
380
- ([W, oe]) => W !== d && oe.isOpen
381
- ) || C(null), S));
382
- }, []), ot = U(
383
- (d, g) => {
384
- const h = (S, A, W, oe) => {
385
- be({
373
+ }, [$]);
374
+ const ot = H((d) => {
375
+ et((h) => ({ ...h, ...d }));
376
+ }, []), ae = H((d) => {
377
+ const h = T.current, m = h.indexOf(d);
378
+ m !== -1 && h.splice(m, 1), h.push(d), D("bottom");
379
+ }, []), Pe = H((d) => {
380
+ const h = T.current, m = h.indexOf(d);
381
+ m !== -1 && h.splice(m, 1), q((S) => (Object.entries(S).some(
382
+ ([B, oe]) => B !== d && oe.isOpen
383
+ ) || D(null), S));
384
+ }, []), at = H(
385
+ (d, h) => {
386
+ const m = (S, E, B, oe) => {
387
+ pe({
386
388
  side: d,
387
389
  ref: S,
388
- options: A,
389
- toggleRef: W,
390
+ options: E,
391
+ toggleRef: B,
390
392
  afterApply: () => {
391
- oe(!0), C(d);
393
+ oe(!0), D(d);
392
394
  }
393
395
  });
394
396
  };
395
397
  if (d === "left") {
396
398
  if (p.disabled) return;
397
- h(F, p, H, j);
399
+ m(F, p, k, N);
398
400
  } else if (d === "right") {
399
- if (O.disabled) return;
400
- h(k, O, G, m);
401
+ if (X.disabled) return;
402
+ m(G, X, U, x);
401
403
  } else if (d === "bottom") {
402
- const S = (g == null ? void 0 : g.id) ?? "primary", A = Y[S], W = N.current.get(S);
403
- if (!A || !W || A.disabled) return;
404
- const oe = A.sidebarHeightPx ?? 0, ut = A.mediaQueryWidth ?? 640, _e = window.innerWidth < ut, dt = _e ? A.midAnchorPointPx ?? 0 : oe;
405
- _e && A.midAnchorPoint && !A.swipeToOpen && dt < oe ? $e({
406
- ref: W.sidebarRef,
407
- options: A,
408
- toggleRef: W.toggleRef,
404
+ const S = (h == null ? void 0 : h.id) ?? "primary", E = $[S], B = n.current.get(S);
405
+ if (!E || !B || E.disabled) return;
406
+ const oe = E.sidebarHeightPx ?? 0, dt = E.mediaQueryWidth ?? 640, _e = window.innerWidth < dt, ft = _e ? E.midAnchorPointPx ?? 0 : oe;
407
+ _e && E.midAnchorPoint && !E.swipeToOpen && ft < oe ? $e({
408
+ ref: B.sidebarRef,
409
+ options: E,
410
+ toggleRef: B.toggleRef,
409
411
  afterApply: () => {
410
- ee(S, !0), te(S, "midAnchor"), se(S);
412
+ ee(S, !0), te(S, "midAnchor"), ae(S);
411
413
  }
412
- }) : be({
414
+ }) : pe({
413
415
  side: d,
414
- ref: W.sidebarRef,
415
- options: A,
416
- toggleRef: W.toggleRef,
416
+ ref: B.sidebarRef,
417
+ options: E,
418
+ toggleRef: B.toggleRef,
417
419
  afterApply: () => {
418
- ee(S, !0), te(S, "open"), se(S);
420
+ ee(S, !0), te(S, "open"), ae(S);
419
421
  }
420
422
  });
421
423
  } else
422
- pe(d);
424
+ be(d);
423
425
  },
424
- [p, O, Y, ee, te, se]
425
- ), st = U(
426
- (d, g) => {
426
+ [p, X, $, ee, te, ae]
427
+ ), st = H(
428
+ (d, h) => {
427
429
  if (d !== "bottom") return;
428
- const h = (g == null ? void 0 : g.id) ?? "primary", S = Y[h], A = N.current.get(h);
429
- !S || !A || S.disabled || $e({
430
- ref: A.sidebarRef,
430
+ const m = (h == null ? void 0 : h.id) ?? "primary", S = $[m], E = n.current.get(m);
431
+ !S || !E || S.disabled || $e({
432
+ ref: E.sidebarRef,
431
433
  options: S,
432
- toggleRef: A.toggleRef,
434
+ toggleRef: E.toggleRef,
433
435
  afterApply: () => {
434
- ee(h, !0), te(h, "midAnchor"), se(h);
436
+ ee(m, !0), te(m, "midAnchor"), ae(m);
435
437
  }
436
438
  });
437
439
  },
438
- [Y, ee, te, se]
439
- ), at = U(
440
- (d, g) => {
440
+ [$, ee, te, ae]
441
+ ), ct = H(
442
+ (d, h) => {
441
443
  if (d !== "bottom") return;
442
- const h = (g == null ? void 0 : g.id) ?? "primary", S = Y[h], A = N.current.get(h);
443
- !S || !A || S.disabled || be({
444
+ const m = (h == null ? void 0 : h.id) ?? "primary", S = $[m], E = n.current.get(m);
445
+ !S || !E || S.disabled || pe({
444
446
  side: d,
445
- ref: A.sidebarRef,
447
+ ref: E.sidebarRef,
446
448
  options: S,
447
- toggleRef: A.toggleRef,
449
+ toggleRef: E.toggleRef,
448
450
  afterApply: () => {
449
- ee(h, !0), te(h, "open"), se(h);
451
+ ee(m, !0), te(m, "open"), ae(m);
450
452
  }
451
453
  });
452
454
  },
453
- [Y, ee, te, se]
454
- ), ct = U(
455
- (d, g) => {
456
- const h = (S, A, W, oe) => {
455
+ [$, ee, te, ae]
456
+ ), lt = H(
457
+ (d, h) => {
458
+ const m = (S, E, B, oe) => {
457
459
  Ye({
458
460
  ref: S,
459
- options: A,
460
- toggleRef: W,
461
+ options: E,
462
+ toggleRef: B,
461
463
  side: d,
462
464
  afterApply: () => {
463
- oe(!1), C(null);
465
+ oe(!1), D(null);
464
466
  }
465
467
  });
466
468
  };
467
469
  if (d === "left") {
468
470
  if (p.disabled) return;
469
- h(F, p, H, j);
471
+ m(F, p, k, N);
470
472
  } else if (d === "right") {
471
- if (O.disabled) return;
472
- h(k, O, G, m);
473
+ if (X.disabled) return;
474
+ m(G, X, U, x);
473
475
  } else if (d === "bottom") {
474
- const S = (g == null ? void 0 : g.id) ?? "primary", A = Y[S], W = N.current.get(S);
475
- if (!A || !W || A.disabled) return;
476
+ const S = (h == null ? void 0 : h.id) ?? "primary", E = $[S], B = n.current.get(S);
477
+ if (!E || !B || E.disabled) return;
476
478
  Ye({
477
- ref: W.sidebarRef,
478
- options: A,
479
- toggleRef: W.toggleRef,
479
+ ref: B.sidebarRef,
480
+ options: E,
481
+ toggleRef: B.toggleRef,
480
482
  side: d,
481
483
  afterApply: () => {
482
484
  ee(S, !1), te(S, "closed"), Pe(S);
483
485
  }
484
486
  });
485
487
  } else
486
- pe(d);
488
+ be(d);
487
489
  },
488
- [p, O, Y, ee, te, Pe]
489
- ), lt = U(
490
- (d, g, h) => {
490
+ [p, X, $, ee, te, Pe]
491
+ ), ut = H(
492
+ (d, h, m) => {
491
493
  if (d === "left")
492
494
  We({
493
495
  ref: F,
494
- toggleRef: H,
496
+ toggleRef: k,
495
497
  options: p,
496
- translateX: g
498
+ translateX: h
497
499
  });
498
500
  else if (d === "right")
499
501
  We({
500
- ref: k,
501
- toggleRef: G,
502
- options: O,
503
- translateX: g
502
+ ref: G,
503
+ toggleRef: U,
504
+ options: X,
505
+ translateX: h
504
506
  });
505
507
  else if (d === "bottom") {
506
- const S = (h == null ? void 0 : h.id) ?? "primary", A = Y[S], W = N.current.get(S);
507
- if (!A || !W) return;
508
- Zt({
509
- ref: W.sidebarRef,
510
- toggleRef: W.toggleRef,
511
- options: A,
512
- translateY: g
508
+ const S = (m == null ? void 0 : m.id) ?? "primary", E = $[S], B = n.current.get(S);
509
+ if (!E || !B) return;
510
+ Vt({
511
+ ref: B.sidebarRef,
512
+ toggleRef: B.toggleRef,
513
+ options: E,
514
+ translateY: h
513
515
  });
514
516
  } else
515
- pe(d);
517
+ be(d);
516
518
  },
517
- [p, O, Y]
519
+ [p, X, $]
518
520
  );
519
- return /* @__PURE__ */ R.jsx(
521
+ return /* @__PURE__ */ O.jsx(
520
522
  ze.Provider,
521
523
  {
522
524
  value: {
523
- lockedSidebar: _,
524
- setLockedSidebar: C,
525
+ lockedSidebar: W,
526
+ setLockedSidebar: D,
525
527
  leftSidebarRef: F,
526
- rightSidebarRef: k,
527
- isLeftOpen: $,
528
- isRightOpen: B,
528
+ rightSidebarRef: G,
529
+ isLeftOpen: j,
530
+ isRightOpen: f,
529
531
  // Backwards-compat aliases for primary bottom sidebar
530
- isBottomOpen: E,
531
- bottomAnchorState: I,
532
- bottomSidebarRef: X,
533
- bottomToggleRef: ie,
534
- bottomSidebarOptions: ue,
532
+ isBottomOpen: P,
533
+ bottomAnchorState: Q,
534
+ bottomSidebarRef: ie,
535
+ bottomToggleRef: ue,
536
+ bottomSidebarOptions: me,
535
537
  // Multi-instance bottom sidebar
536
- bottomSidebars: Q,
537
- bottomSidebarOptionsMap: Y,
538
- registerBottomSidebar: et,
539
- unregisterBottomSidebar: tt,
540
- getBottomSidebarRefs: rt,
541
- activeBottomDragIdRef: n,
542
- bottomFocusStackRef: f,
538
+ bottomSidebars: V,
539
+ bottomSidebarOptionsMap: $,
540
+ registerBottomSidebar: tt,
541
+ unregisterBottomSidebar: rt,
542
+ getBottomSidebarRefs: nt,
543
+ activeBottomDragIdRef: g,
544
+ bottomFocusStackRef: T,
543
545
  // Functions
544
- openSidebar: ot,
545
- openSidebarFully: at,
546
+ openSidebar: at,
547
+ openSidebarFully: ct,
546
548
  openSidebarToMidAnchor: st,
547
- closeSidebar: ct,
548
- dragSidebar: lt,
549
- globalOptions: me,
550
- setGlobalOptions: it,
549
+ closeSidebar: lt,
550
+ dragSidebar: ut,
551
+ globalOptions: Ke,
552
+ setGlobalOptions: ot,
551
553
  leftSidebarOptions: p,
552
- rightSidebarOptions: O,
553
- setLeftSidebarOptions: T,
554
- setRightSidebarOptions: V,
555
- setBottomSidebarOptionsById: nt,
556
- leftToggleRef: H,
557
- rightToggleRef: G
554
+ rightSidebarOptions: X,
555
+ setLeftSidebarOptions: Y,
556
+ setRightSidebarOptions: z,
557
+ setBottomSidebarOptionsById: it,
558
+ leftToggleRef: k,
559
+ rightToggleRef: U
558
560
  },
559
561
  children: e
560
562
  }
561
563
  );
562
- }, K = () => {
563
- const e = ht(ze);
564
+ }, J = () => {
565
+ const e = mt(ze);
564
566
  if (!e)
565
567
  throw new Error("useSwipeBarContext must be used within SwipeBarProvider");
566
568
  return e;
567
- }, vt = 300, bt = 40, wt = 20, St = 320, Le = window.innerHeight, yt = !0, xt = !1, qe = "rgba(0, 0, 0, 0.5)", ye = "rgb(36,36,36)", Rt = "white", Tt = 40, Et = 40, At = !0, Se = 640, Ot = 30, Pt = 15, It = 20, Xe = 0.6, Mt = 200, _t = 100, Ct = !1, Dt = !0, Lt = !0, Xt = !1, ae = "cubic-bezier(0.22, 1, 0.36, 1)", Ve = {
569
+ }, pt = 300, wt = 40, St = 20, yt = 320, De = window.innerHeight, xt = !0, Rt = !0, Tt = !1, Ve = "rgba(0, 0, 0, 0.5)", ye = "rgb(36,36,36)", Ot = "white", Et = 40, At = 40, Pt = !0, Se = 640, It = 30, Ct = 15, _t = 20, Xe = 0.6, Mt = 200, Lt = 100, Dt = !1, Xt = !0, Yt = !0, $t = !1, se = "cubic-bezier(0.22, 1, 0.36, 1)", qe = {
568
570
  width: 0,
569
571
  top: 0,
570
572
  bottom: 0,
571
573
  flexShrink: 0,
572
574
  overflowX: "hidden",
573
575
  willChange: "transform"
574
- }, Yt = {
576
+ }, Wt = {
575
577
  transform: "translateX(-100%)"
576
- }, $t = {
578
+ }, Bt = {
577
579
  transform: "translateX(100%)"
578
- }, Wt = {
580
+ }, jt = {
579
581
  position: "fixed",
580
582
  left: 0,
581
583
  top: 0,
582
584
  bottom: 0
583
- }, Bt = {
585
+ }, kt = {
584
586
  position: "fixed",
585
587
  right: 0,
586
588
  top: 0,
587
589
  bottom: 0
588
- }, jt = {
590
+ }, Nt = {
589
591
  height: 0,
590
592
  left: 0,
591
593
  right: 0,
592
594
  flexShrink: 0,
593
595
  overflowY: "hidden",
594
596
  willChange: "transform"
595
- }, Nt = {
596
- transform: "translateY(100%)"
597
597
  }, Ft = {
598
+ transform: "translateY(100%)"
599
+ }, Ht = {
598
600
  position: "fixed",
599
601
  bottom: 0,
600
602
  left: 0,
601
603
  right: 0
602
- }, kt = {
604
+ }, Gt = {
603
605
  position: "fixed",
604
606
  top: 0,
605
607
  left: 0,
606
608
  width: "100%",
607
609
  height: "100%",
608
- backgroundColor: qe,
610
+ backgroundColor: Ve,
609
611
  transitionProperty: "opacity",
610
612
  pointerEvents: "none",
611
613
  opacity: 0
612
- }, Ht = {
614
+ }, Ut = {
613
615
  opacity: 1,
614
616
  pointerEvents: "auto"
615
617
  }, Qe = {
@@ -619,7 +621,7 @@ const ze = gt(null), pe = (e) => {
619
621
  width: "1px",
620
622
  display: "flex",
621
623
  justifyContent: "center"
622
- }, Gt = {
624
+ }, Zt = {
623
625
  position: "fixed",
624
626
  bottom: 0,
625
627
  left: "50%",
@@ -627,7 +629,7 @@ const ze = gt(null), pe = (e) => {
627
629
  height: "1px",
628
630
  display: "flex",
629
631
  alignItems: "center"
630
- }, Ut = {
632
+ }, zt = {
631
633
  position: "relative",
632
634
  cursor: "pointer",
633
635
  display: "flex",
@@ -639,30 +641,30 @@ const ze = gt(null), pe = (e) => {
639
641
  }, ge = (e) => {
640
642
  var t;
641
643
  return (t = e.current) == null ? void 0 : t.firstElementChild;
642
- }, be = ({
644
+ }, pe = ({
643
645
  ref: e,
644
646
  side: t,
645
647
  options: r,
646
648
  toggleRef: i,
647
- afterApply: s
649
+ afterApply: a
648
650
  }) => {
649
651
  const o = ge(e), u = r.transitionMs ? r.transitionMs / 2 : 0;
650
652
  o && r.fadeContent && (o.style.opacity = "0");
651
- let a, l;
652
- t === "left" || t === "right" ? (a = "width", l = r.sidebarWidthPx, o && l && (o.style.minWidth = `${l}px`)) : t === "bottom" ? (a = "height", l = r.sidebarHeightPx, o && l && (o.style.minHeight = `${l}px`)) : xe(t), requestAnimationFrame(() => {
653
+ let s, l;
654
+ t === "left" || t === "right" ? (s = "width", l = r.sidebarWidthPx, o && l && (o.style.minWidth = `${l}px`)) : t === "bottom" ? (s = "height", l = r.sidebarHeightPx, o && l && (o.style.minHeight = `${l}px`)) : xe(t), requestAnimationFrame(() => {
653
655
  if (!e.current) return;
654
- const c = `transform ${r.transitionMs}ms ${ae}`, x = r.isAbsolute ? "" : `, ${a} ${r.transitionMs}ms ${ae}`;
655
- e.current.style.transition = `${c}${x}`, o && r.fadeContent && (o.style.transition = `opacity ${r.fadeContentTransitionMs}ms ease`), requestAnimationFrame(() => {
656
+ const c = `transform ${r.transitionMs}ms ${se}`, R = r.isAbsolute ? "" : `, ${s} ${r.transitionMs}ms ${se}`;
657
+ e.current.style.transition = `${c}${R}`, o && r.fadeContent && (o.style.transition = `opacity ${r.fadeContentTransitionMs}ms ease`), requestAnimationFrame(() => {
656
658
  if (e.current) {
657
659
  if (e.current.style.transform = t === "bottom" ? "translateY(0px)" : "translateX(0px)", !r.isAbsolute)
658
- e.current.style[a] = `${l}px`;
659
- else if (e.current.style[a] !== `${l}px`) {
660
- const w = e.current.style.transition;
661
- e.current.style.transition = c, e.current.style[a] = `${l}px`, e.current.style.transition = w;
660
+ e.current.style[s] = `${l}px`;
661
+ else if (e.current.style[s] !== `${l}px`) {
662
+ const v = e.current.style.transition;
663
+ e.current.style.transition = c, e.current.style[s] = `${l}px`, e.current.style.transition = v;
662
664
  }
663
665
  i.current && l && (i.current.style.opacity = "1", t === "left" ? i.current.style.transform = `translateY(-50%) translateX(${l}px)` : t === "right" ? i.current.style.transform = `translateY(-50%) translateX(-${l}px)` : t === "bottom" && (i.current.style.transform = `translateX(-50%) translateY(-${l}px)`)), o && r.fadeContent && setTimeout(() => {
664
666
  o.style.opacity = "1";
665
- }, u), s();
667
+ }, u), a();
666
668
  }
667
669
  });
668
670
  }), setTimeout(() => {
@@ -672,15 +674,15 @@ const ze = gt(null), pe = (e) => {
672
674
  options: t,
673
675
  side: r,
674
676
  toggleRef: i,
675
- afterApply: s
677
+ afterApply: a
676
678
  }) => {
677
679
  const o = ge(e);
678
680
  let u;
679
681
  r === "left" || r === "right" ? (u = "width", o && t.sidebarWidthPx && (o.style.minWidth = `${t.sidebarWidthPx}px`)) : r === "bottom" ? (u = "height", o && t.sidebarHeightPx && (o.style.minHeight = `${t.sidebarHeightPx}px`)) : xe(r), requestAnimationFrame(() => {
680
682
  if (!e.current) return;
681
- const a = `transform ${t.transitionMs}ms ${ae}`, l = t.isAbsolute ? "" : `, ${u} ${t.transitionMs}ms ${ae}`;
682
- e.current.style.transition = `${a}${l}`, o && t.fadeContent && (o.style.transition = `opacity ${t.fadeContentTransitionMs}ms ease`), requestAnimationFrame(() => {
683
- e.current && (r === "left" ? (e.current.style.transform = "translateX(-100%)", t.isAbsolute || (e.current.style.width = "0px")) : r === "right" ? (e.current.style.transform = "translateX(100%)", t.isAbsolute || (e.current.style.width = "0px")) : r === "bottom" && (e.current.style.transform = "translateY(100%)", t.isAbsolute || (e.current.style.height = "0px")), i.current && (i.current.style.opacity = "1", r === "left" || r === "right" ? i.current.style.transform = "translateY(-50%)" : r === "bottom" && (i.current.style.transform = "translateX(-50%)")), o && t.fadeContent && (o.style.opacity = "0"), s());
683
+ const s = `transform ${t.transitionMs}ms ${se}`, l = t.isAbsolute ? "" : `, ${u} ${t.transitionMs}ms ${se}`;
684
+ e.current.style.transition = `${s}${l}`, o && t.fadeContent && (o.style.transition = `opacity ${t.fadeContentTransitionMs}ms ease`), requestAnimationFrame(() => {
685
+ e.current && (r === "left" ? (e.current.style.transform = "translateX(-100%)", t.isAbsolute || (e.current.style.width = "0px")) : r === "right" ? (e.current.style.transform = "translateX(100%)", t.isAbsolute || (e.current.style.width = "0px")) : r === "bottom" && (e.current.style.transform = "translateY(100%)", t.isAbsolute || (e.current.style.height = "0px")), i.current && (i.current.style.opacity = "1", r === "left" || r === "right" ? i.current.style.transform = "translateY(-50%)" : r === "bottom" && (i.current.style.transform = "translateX(-50%)")), o && t.fadeContent && (o.style.opacity = "0"), a());
684
686
  });
685
687
  });
686
688
  }, $e = ({
@@ -689,21 +691,21 @@ const ze = gt(null), pe = (e) => {
689
691
  toggleRef: r,
690
692
  afterApply: i
691
693
  }) => {
692
- const s = ge(e), o = t.transitionMs ? t.transitionMs / 2 : 0;
693
- s && t.fadeContent && (s.style.opacity = "0"), s && t.midAnchorPointPx && (s.style.minHeight = `${t.sidebarHeightPx}px`), requestAnimationFrame(() => {
694
+ const a = ge(e), o = t.transitionMs ? t.transitionMs / 2 : 0;
695
+ a && t.fadeContent && (a.style.opacity = "0"), a && t.midAnchorPointPx && (a.style.minHeight = `${t.sidebarHeightPx}px`), requestAnimationFrame(() => {
694
696
  if (!e.current) return;
695
- const u = `transform ${t.transitionMs}ms ${ae}`, a = t.isAbsolute ? "" : `, height ${t.transitionMs}ms ${ae}`;
696
- e.current.style.transition = `${u}${a}`, s && t.fadeContent && (s.style.transition = `opacity ${t.fadeContentTransitionMs}ms ease`), requestAnimationFrame(() => {
697
+ const u = `transform ${t.transitionMs}ms ${se}`, s = t.isAbsolute ? "" : `, height ${t.transitionMs}ms ${se}`;
698
+ e.current.style.transition = `${u}${s}`, a && t.fadeContent && (a.style.transition = `opacity ${t.fadeContentTransitionMs}ms ease`), requestAnimationFrame(() => {
697
699
  if (!e.current) return;
698
- const l = t.midAnchorPointPx ?? 0, c = t.sidebarHeightPx ?? 0, x = c - l;
699
- if (e.current.style.transform = `translateY(${x}px)`, !t.isAbsolute)
700
+ const l = t.midAnchorPointPx ?? 0, c = t.sidebarHeightPx ?? 0, R = c - l;
701
+ if (e.current.style.transform = `translateY(${R}px)`, !t.isAbsolute)
700
702
  e.current.style.height = `${c}px`;
701
703
  else if (e.current.style.height !== `${c}px`) {
702
- const w = e.current.style.transition;
703
- e.current.style.transition = u, e.current.style.height = `${c}px`, e.current.style.transition = w;
704
+ const v = e.current.style.transition;
705
+ e.current.style.transition = u, e.current.style.height = `${c}px`, e.current.style.transition = v;
704
706
  }
705
- r.current && (r.current.style.opacity = "1", r.current.style.transform = `translateX(-50%) translateY(-${l}px)`), s && t.fadeContent && setTimeout(() => {
706
- s.style.opacity = "1";
707
+ r.current && (r.current.style.opacity = "1", r.current.style.transform = `translateX(-50%) translateY(-${l}px)`), a && t.fadeContent && setTimeout(() => {
708
+ a.style.opacity = "1";
707
709
  }, o), i();
708
710
  });
709
711
  }), setTimeout(() => {
@@ -715,37 +717,37 @@ const ze = gt(null), pe = (e) => {
715
717
  translateX: i
716
718
  }) => {
717
719
  !e.current || i === null || (e.current.style.transition = "none", requestAnimationFrame(() => {
718
- const s = ge(e);
720
+ const a = ge(e);
719
721
  if (e.current) {
720
- if (s && r.fadeContent && (s.style.opacity = "0"), s && r.sidebarWidthPx && (s.style.minWidth = `${r.sidebarWidthPx}px`), !r.isAbsolute) {
722
+ if (a && r.fadeContent && (a.style.opacity = "0"), a && r.sidebarWidthPx && (a.style.minWidth = `${r.sidebarWidthPx}px`), !r.isAbsolute) {
721
723
  const o = `${r.sidebarWidthPx}px`;
722
724
  e.current.style.width !== o && (e.current.style.width = o);
723
725
  }
724
726
  e.current.style.transform = `translateX(${i}px)`, t.current && (t.current.style.opacity = "0", t.current.style.transform = `translateY(-50%) translateX(${i}px)`);
725
727
  }
726
728
  }));
727
- }, Zt = ({
729
+ }, Vt = ({
728
730
  ref: e,
729
731
  toggleRef: t,
730
732
  options: r,
731
733
  translateY: i
732
734
  }) => {
733
735
  !e.current || i === null || (e.current.style.transition = "none", requestAnimationFrame(() => {
734
- const s = ge(e);
736
+ const a = ge(e);
735
737
  if (e.current) {
736
- if (s && r.fadeContent && (s.style.opacity = "0"), s && r.sidebarHeightPx && (s.style.minHeight = `${r.sidebarHeightPx}px`), !r.isAbsolute) {
738
+ if (a && r.fadeContent && (a.style.opacity = "0"), a && r.sidebarHeightPx && (a.style.minHeight = `${r.sidebarHeightPx}px`), !r.isAbsolute) {
737
739
  const o = `${r.sidebarHeightPx}px`;
738
740
  e.current.style.height !== o && (e.current.style.height = o);
739
741
  }
740
742
  e.current.style.transform = `translateY(${i}px)`, t.current && (t.current.style.opacity = "0", t.current.style.transform = `translateX(-50%) translateY(${i}px)`);
741
743
  }
742
744
  }));
743
- }, he = ({ refs: e, clientX: t, clientY: r, touchId: i, isMouse: s }) => {
745
+ }, he = ({ refs: e, clientX: t, clientY: r, touchId: i, isMouse: a }) => {
744
746
  e.draggingRef.current = {
745
747
  startX: t,
746
748
  startY: r,
747
749
  activeTouchId: i,
748
- isMouse: s,
750
+ isMouse: a,
749
751
  isActivated: !1
750
752
  }, e.currentXRef.current = t, e.prevXRef.current = t;
751
753
  }, Be = ({
@@ -753,18 +755,18 @@ const ze = gt(null), pe = (e) => {
753
755
  clientX: t,
754
756
  clientY: r,
755
757
  touchId: i,
756
- isMouse: s
758
+ isMouse: a
757
759
  }) => {
758
760
  e.draggingRef.current = {
759
761
  startX: t,
760
762
  startY: r,
761
763
  activeTouchId: i,
762
- isMouse: s,
764
+ isMouse: a,
763
765
  isActivated: !1
764
766
  }, e.currentYRef.current = r, e.prevYRef.current = r;
765
767
  }, Je = ({ refs: e, dragSidebar: t, onDeactivate: r }) => {
766
768
  e.draggingRef.current = null, e.currentXRef.current = null, e.prevXRef.current = null, t(null), r();
767
- }, zt = ({ refs: e, dragSidebar: t, onDeactivate: r }) => {
769
+ }, qt = ({ refs: e, dragSidebar: t, onDeactivate: r }) => {
768
770
  e.draggingRef.current = null, e.currentYRef.current = null, e.prevYRef.current = null, t(null);
769
771
  }, ce = (e) => e instanceof Element ? !!e.closest("input, textarea, [contenteditable='true']") : !1;
770
772
  function je(e) {
@@ -789,109 +791,112 @@ const Re = (e, t) => {
789
791
  if (e[r].identifier === t)
790
792
  return !0;
791
793
  return !1;
792
- }, Ee = (e, t, r) => {
794
+ }, Oe = (e, t, r) => {
793
795
  const {
794
796
  globalOptions: i,
795
- setLeftSidebarOptions: s,
797
+ setLeftSidebarOptions: a,
796
798
  setRightSidebarOptions: o,
797
799
  setBottomSidebarOptionsById: u
798
- } = K(), {
799
- sidebarWidthPx: a,
800
+ } = J(), {
801
+ sidebarWidthPx: s,
800
802
  sidebarHeightPx: l,
801
803
  transitionMs: c,
802
- edgeActivationWidthPx: x,
803
- dragActivationDeltaPx: w,
804
- showOverlay: v,
805
- isAbsolute: b,
806
- overlayBackgroundColor: M,
804
+ edgeActivationWidthPx: R,
805
+ dragActivationDeltaPx: v,
806
+ showOverlay: b,
807
+ isAbsolute: w,
808
+ overlayBackgroundColor: I,
807
809
  toggleIconColor: y,
808
- toggleIconSizePx: P,
809
- toggleIconEdgeDistancePx: D,
810
+ toggleIconSizePx: A,
811
+ toggleIconEdgeDistancePx: M,
810
812
  showToggle: _,
811
- mediaQueryWidth: C,
812
- swipeBarZIndex: $,
813
+ mediaQueryWidth: W,
814
+ swipeBarZIndex: D,
813
815
  toggleZIndex: j,
814
- overlayZIndex: B,
815
- fadeContent: m,
816
- fadeContentTransitionMs: p,
817
- swipeToOpen: T,
818
- swipeToClose: O,
819
- midAnchorPoint: V,
820
- midAnchorPointPx: F,
821
- disabled: k
822
- } = t, H = Ze(() => {
823
- const G = l ?? i.sidebarHeightPx;
816
+ overlayZIndex: N,
817
+ fadeContent: f,
818
+ fadeContentTransitionMs: x,
819
+ swipeToOpen: p,
820
+ swipeToClose: Y,
821
+ midAnchorPoint: X,
822
+ midAnchorPointPx: z,
823
+ disabled: F,
824
+ closeSidebarOnOverlayClick: G
825
+ } = t, k = Ze(() => {
826
+ const U = l ?? i.sidebarHeightPx;
824
827
  return {
825
- sidebarWidthPx: a ?? i.sidebarWidthPx,
826
- sidebarHeightPx: G,
828
+ sidebarWidthPx: s ?? i.sidebarWidthPx,
829
+ sidebarHeightPx: U,
827
830
  transitionMs: c ?? i.transitionMs,
828
- edgeActivationWidthPx: x ?? i.edgeActivationWidthPx,
829
- dragActivationDeltaPx: w ?? i.dragActivationDeltaPx,
830
- showOverlay: v ?? i.showOverlay,
831
- isAbsolute: b ?? i.isAbsolute,
832
- overlayBackgroundColor: M ?? i.overlayBackgroundColor,
831
+ edgeActivationWidthPx: R ?? i.edgeActivationWidthPx,
832
+ dragActivationDeltaPx: v ?? i.dragActivationDeltaPx,
833
+ showOverlay: b ?? i.showOverlay,
834
+ isAbsolute: w ?? i.isAbsolute,
835
+ overlayBackgroundColor: I ?? i.overlayBackgroundColor,
833
836
  toggleIconColor: y ?? i.toggleIconColor,
834
- toggleIconSizePx: P ?? i.toggleIconSizePx,
835
- toggleIconEdgeDistancePx: D ?? i.toggleIconEdgeDistancePx,
837
+ toggleIconSizePx: A ?? i.toggleIconSizePx,
838
+ toggleIconEdgeDistancePx: M ?? i.toggleIconEdgeDistancePx,
836
839
  showToggle: _ ?? i.showToggle,
837
- mediaQueryWidth: C ?? i.mediaQueryWidth,
838
- swipeBarZIndex: $ ?? i.swipeBarZIndex,
840
+ mediaQueryWidth: W ?? i.mediaQueryWidth,
841
+ swipeBarZIndex: D ?? i.swipeBarZIndex,
839
842
  toggleZIndex: j ?? i.toggleZIndex,
840
- overlayZIndex: B ?? i.overlayZIndex,
841
- fadeContent: m ?? i.fadeContent,
842
- fadeContentTransitionMs: p ?? i.fadeContentTransitionMs,
843
- swipeToOpen: T ?? i.swipeToOpen,
844
- swipeToClose: O ?? i.swipeToClose,
845
- midAnchorPoint: V ?? i.midAnchorPoint,
846
- midAnchorPointPx: F ?? i.midAnchorPointPx ?? Math.floor(G / 3),
847
- disabled: k ?? i.disabled
843
+ overlayZIndex: N ?? i.overlayZIndex,
844
+ fadeContent: f ?? i.fadeContent,
845
+ fadeContentTransitionMs: x ?? i.fadeContentTransitionMs,
846
+ swipeToOpen: p ?? i.swipeToOpen,
847
+ swipeToClose: Y ?? i.swipeToClose,
848
+ midAnchorPoint: X ?? i.midAnchorPoint,
849
+ midAnchorPointPx: z ?? i.midAnchorPointPx ?? Math.floor(U / 3),
850
+ disabled: F ?? i.disabled,
851
+ closeSidebarOnOverlayClick: G ?? i.closeSidebarOnOverlayClick
848
852
  };
849
853
  }, [
850
- a,
854
+ s,
851
855
  l,
852
856
  c,
853
- x,
854
- w,
857
+ R,
855
858
  v,
856
859
  b,
857
- M,
860
+ w,
861
+ I,
858
862
  y,
859
- P,
860
- D,
863
+ A,
864
+ M,
861
865
  _,
862
866
  i,
863
- C,
864
- $,
867
+ W,
868
+ D,
865
869
  j,
866
- B,
867
- m,
870
+ N,
871
+ f,
872
+ x,
868
873
  p,
869
- T,
870
- O,
871
- V,
874
+ Y,
875
+ X,
876
+ z,
872
877
  F,
873
- k
878
+ G
874
879
  ]);
875
- return q(() => {
876
- e === "left" ? s(H) : e === "right" ? o(H) : e === "bottom" ? u(r ?? "primary", H) : xe(e);
877
- }, [e, r, H, s, o, u]), H;
880
+ return Z(() => {
881
+ e === "left" ? a(k) : e === "right" ? o(k) : e === "bottom" ? u(r ?? "primary", k) : xe(e);
882
+ }, [e, r, k, a, o, u]), k;
878
883
  };
879
- function Ae({
884
+ function Ee({
880
885
  isCollapsed: e,
881
886
  setCollapsed: t,
882
887
  closeSidebarOnClick: r = !0,
883
888
  transitionMs: i,
884
- overlayBackgroundColor: s,
889
+ overlayBackgroundColor: a,
885
890
  overlayZIndex: o
886
891
  }) {
887
- return /* @__PURE__ */ R.jsx(
892
+ return /* @__PURE__ */ O.jsx(
888
893
  "div",
889
894
  {
890
895
  style: {
891
896
  transitionDuration: `${i}ms`,
892
- ...kt,
893
- ...e ? {} : Ht,
894
- ...s ? { backgroundColor: s } : {},
897
+ ...Gt,
898
+ ...e ? {} : Ut,
899
+ ...a ? { backgroundColor: a } : {},
895
900
  zIndex: o
896
901
  },
897
902
  onMouseDown: (u) => {
@@ -900,22 +905,22 @@ function Ae({
900
905
  }
901
906
  );
902
907
  }
903
- function Oe({ size: e, color: t }) {
908
+ function Ae({ size: e, color: t }) {
904
909
  const r = L(null);
905
- return q(() => {
910
+ return Z(() => {
906
911
  const i = () => {
907
912
  r.current && (r.current.style.opacity = "1");
908
- }, s = () => {
913
+ }, a = () => {
909
914
  r.current && (r.current.style.opacity = `${Xe}`);
910
915
  };
911
- r.current && (r.current.addEventListener("mouseenter", i), r.current.addEventListener("mouseleave", s));
912
- }, []), /* @__PURE__ */ R.jsx(
916
+ r.current && (r.current.addEventListener("mouseenter", i), r.current.addEventListener("mouseleave", a));
917
+ }, []), /* @__PURE__ */ O.jsx(
913
918
  "div",
914
919
  {
915
920
  style: {
916
- ...Ut
921
+ ...zt
917
922
  },
918
- children: /* @__PURE__ */ R.jsxs(
923
+ children: /* @__PURE__ */ O.jsxs(
919
924
  "svg",
920
925
  {
921
926
  style: {
@@ -929,8 +934,8 @@ function Oe({ size: e, color: t }) {
929
934
  xmlns: "http://www.w3.org/2000/svg",
930
935
  width: e,
931
936
  children: [
932
- /* @__PURE__ */ R.jsx("g", { strokeWidth: "0" }),
933
- /* @__PURE__ */ R.jsx("g", { strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ R.jsx("g", { children: /* @__PURE__ */ R.jsx(
937
+ /* @__PURE__ */ O.jsx("g", { strokeWidth: "0" }),
938
+ /* @__PURE__ */ O.jsx("g", { strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ O.jsx("g", { children: /* @__PURE__ */ O.jsx(
934
939
  "path",
935
940
  {
936
941
  clipRule: "evenodd",
@@ -945,19 +950,19 @@ function Oe({ size: e, color: t }) {
945
950
  }
946
951
  );
947
952
  }
948
- function qt({ id: e, toggleRef: t, options: r, showToggle: i = !0, ToggleComponent: s }) {
953
+ function Qt({ id: e, toggleRef: t, options: r, showToggle: i = !0, ToggleComponent: a }) {
949
954
  var c;
950
- const { openSidebar: o, closeSidebar: u, bottomSidebars: a } = K(), l = ((c = a[e]) == null ? void 0 : c.isOpen) ?? !1;
951
- return i ? /* @__PURE__ */ R.jsx(
955
+ const { openSidebar: o, closeSidebar: u, bottomSidebars: s } = J(), l = ((c = s[e]) == null ? void 0 : c.isOpen) ?? !1;
956
+ return i ? /* @__PURE__ */ O.jsx(
952
957
  "div",
953
958
  {
954
959
  ref: t,
955
960
  style: {
956
- ...Gt,
961
+ ...Zt,
957
962
  transition: `transform ${r.transitionMs}ms ease, opacity ${r.transitionMs}ms ease`,
958
963
  zIndex: r.toggleZIndex
959
964
  },
960
- children: (!l || l && !r.showOverlay) && /* @__PURE__ */ R.jsx(
965
+ children: (!l || l && !r.showOverlay) && /* @__PURE__ */ O.jsx(
961
966
  "button",
962
967
  {
963
968
  type: "button",
@@ -970,338 +975,333 @@ function qt({ id: e, toggleRef: t, options: r, showToggle: i = !0, ToggleCompone
970
975
  // Rotate icon: -90deg points up when closed, 90deg points down when open
971
976
  transform: l ? "rotate(90deg)" : "rotate(-90deg)"
972
977
  },
973
- children: s ?? /* @__PURE__ */ R.jsx(Oe, { size: r.toggleIconSizePx, color: r.toggleIconColor })
978
+ children: a ?? /* @__PURE__ */ O.jsx(Ae, { size: r.toggleIconSizePx, color: r.toggleIconColor })
974
979
  }
975
980
  )
976
981
  }
977
982
  ) : null;
978
983
  }
979
984
  function le(e = Se) {
980
- const t = `(max-width: ${Math.min(e, Se)}px)`, r = () => typeof window > "u" || typeof window.matchMedia > "u" ? !1 : window.matchMedia(t).matches, [i, s] = re(r);
981
- return q(() => {
985
+ const t = `(max-width: ${Math.min(e, Se)}px)`, r = () => typeof window > "u" || typeof window.matchMedia > "u" ? !1 : window.matchMedia(t).matches, [i, a] = re(r);
986
+ return Z(() => {
982
987
  if (typeof window > "u" || typeof window.matchMedia > "u")
983
988
  return;
984
- const o = window.matchMedia(t), u = () => s(o.matches);
989
+ const o = window.matchMedia(t), u = () => a(o.matches);
985
990
  return u(), o.addEventListener("change", u), () => o.removeEventListener("change", u);
986
991
  }, [t]), i;
987
992
  }
988
- const Ne = ({
993
+ const ke = ({
989
994
  refs: e,
990
995
  callbacks: t,
991
996
  currentY: r,
992
997
  preventDefault: i,
993
- lockPane: s,
998
+ lockPane: a,
994
999
  options: o,
995
1000
  scrollableAncestor: u,
996
- initialScrollTop: a
1001
+ initialScrollTop: s
997
1002
  }) => {
998
1003
  if (!e.draggingRef.current) return;
999
1004
  const l = r - e.draggingRef.current.startY;
1000
1005
  if (!e.draggingRef.current.isActivated && Math.abs(l) >= o.dragActivationDeltaPx) {
1001
1006
  if (u && t.getIsOpen()) {
1002
- if (u.scrollTop !== a) {
1007
+ if (u.scrollTop !== s) {
1003
1008
  e.draggingRef.current = null, t.dragSidebar(null);
1004
1009
  return;
1005
1010
  }
1006
- const { scrollTop: y, scrollHeight: P, clientHeight: D } = u, _ = y > 1, C = y + D < P - 1;
1007
- if (l > 0 && _ || l < 0 && C) {
1011
+ const { scrollTop: y, scrollHeight: A, clientHeight: M } = u, _ = y > 1, W = y + M < A - 1;
1012
+ if (l > 0 && _ || l < 0 && W) {
1008
1013
  e.draggingRef.current = null, t.dragSidebar(null);
1009
1014
  return;
1010
1015
  }
1011
1016
  }
1012
- e.draggingRef.current.isActivated = !0, s();
1017
+ e.draggingRef.current.isActivated = !0, a();
1013
1018
  }
1014
1019
  if (!e.draggingRef.current.isActivated) return;
1015
1020
  e.prevYRef.current = e.currentYRef.current, e.currentYRef.current = r;
1016
- const c = t.getIsOpen(), x = window.innerHeight;
1017
- let w = !1;
1018
- if ((c || e.draggingRef.current.startY >= x - o.edgeActivationWidthPx) && (w = !0), !w) {
1021
+ const c = t.getIsOpen(), R = window.innerHeight;
1022
+ let v = !1;
1023
+ if ((c || e.draggingRef.current.startY >= R - o.edgeActivationWidthPx) && (v = !0), !v) {
1019
1024
  e.draggingRef.current = null, t.dragSidebar(null);
1020
1025
  return;
1021
1026
  }
1022
1027
  i();
1023
- const v = o.sidebarHeightPx, b = o.midAnchorPointPx, M = o.midAnchorPoint && !o.swipeToOpen && b < v;
1028
+ const b = o.sidebarHeightPx, w = o.midAnchorPointPx, I = o.midAnchorPoint && !o.swipeToOpen && w < b;
1024
1029
  if (c)
1025
- if (M) {
1030
+ if (I) {
1026
1031
  const y = t.getBottomAnchorState();
1027
1032
  if (y === "open") {
1028
- const P = Math.max(
1033
+ const A = Math.max(
1029
1034
  0,
1030
- Math.min(v, l - o.dragActivationDeltaPx)
1035
+ Math.min(b, l - o.dragActivationDeltaPx)
1031
1036
  );
1032
- t.dragSidebar(P);
1037
+ t.dragSidebar(A);
1033
1038
  } else if (y === "midAnchor") {
1034
- const P = v - b, D = Math.max(
1039
+ const A = b - w, M = Math.max(
1035
1040
  0,
1036
1041
  Math.min(
1037
- v,
1038
- P + l - o.dragActivationDeltaPx
1042
+ b,
1043
+ A + l - o.dragActivationDeltaPx
1039
1044
  )
1040
1045
  );
1041
- t.dragSidebar(D);
1046
+ t.dragSidebar(M);
1042
1047
  }
1043
1048
  } else {
1044
1049
  const y = Math.max(
1045
1050
  0,
1046
- Math.min(v, l - o.dragActivationDeltaPx)
1051
+ Math.min(b, l - o.dragActivationDeltaPx)
1047
1052
  );
1048
1053
  t.dragSidebar(y);
1049
1054
  }
1050
- else if (e.draggingRef.current.startY >= x - o.edgeActivationWidthPx)
1051
- if (M) {
1052
- const y = v - b, P = Math.max(
1055
+ else if (e.draggingRef.current.startY >= R - o.edgeActivationWidthPx)
1056
+ if (I) {
1057
+ const y = b - w, A = Math.max(
1053
1058
  y,
1054
1059
  Math.min(
1055
- v,
1056
- v + l + o.dragActivationDeltaPx
1060
+ b,
1061
+ b + l + o.dragActivationDeltaPx
1057
1062
  )
1058
1063
  );
1059
- t.dragSidebar(P);
1064
+ t.dragSidebar(A);
1060
1065
  } else {
1061
1066
  const y = Math.max(
1062
1067
  0,
1063
1068
  Math.min(
1064
- v,
1065
- v + l + o.dragActivationDeltaPx
1069
+ b,
1070
+ b + l + o.dragActivationDeltaPx
1066
1071
  )
1067
1072
  );
1068
1073
  t.dragSidebar(y);
1069
1074
  }
1070
- }, Fe = ({ refs: e, callbacks: t, options: r, onDragEnd: i }) => {
1075
+ }, Ne = ({
1076
+ refs: e,
1077
+ callbacks: t,
1078
+ options: r,
1079
+ onDragEnd: i
1080
+ }) => {
1071
1081
  if (!e.draggingRef.current) return;
1072
1082
  if (!e.draggingRef.current.isActivated) {
1073
1083
  e.draggingRef.current = null, e.currentYRef.current = null, e.prevYRef.current = null;
1074
1084
  return;
1075
1085
  }
1076
- const s = e.currentYRef.current ?? e.draggingRef.current.startY, o = e.prevYRef.current ?? e.draggingRef.current.startY, u = e.draggingRef.current.startY, a = t.getIsOpen(), l = window.innerHeight;
1086
+ const a = e.currentYRef.current ?? e.draggingRef.current.startY, o = e.prevYRef.current ?? e.draggingRef.current.startY, u = e.draggingRef.current.startY, s = t.getIsOpen(), l = window.innerHeight;
1077
1087
  e.draggingRef.current = null, e.currentYRef.current = null, e.prevYRef.current = null, i();
1078
- const c = s < o, x = s >= o, w = u >= l - r.edgeActivationWidthPx, v = r.midAnchorPointPx, b = r.sidebarHeightPx, M = r.midAnchorPoint && !r.swipeToOpen && v < b;
1079
- if (a)
1080
- if (M) {
1081
- const y = t.getBottomAnchorState(), P = b - v;
1088
+ const c = a < o, R = a >= o, v = u >= l - r.edgeActivationWidthPx, b = r.midAnchorPointPx, w = r.sidebarHeightPx, I = r.midAnchorPoint && !r.swipeToOpen && b < w;
1089
+ if (s)
1090
+ if (I) {
1091
+ const y = t.getBottomAnchorState(), A = w - b;
1082
1092
  if (y === "open") {
1083
- const D = Math.max(0, s - u);
1084
- x ? D > P ? t.closeSidebar() : t.openToMidAnchor() : D < P ? t.openSidebarFully() : t.openToMidAnchor(), t.dragSidebar(null);
1093
+ const M = Math.max(0, a - u);
1094
+ R ? M > A ? t.closeSidebar() : t.openToMidAnchor() : M < A ? t.openSidebarFully() : t.closeSidebar(), t.dragSidebar(null);
1085
1095
  } else if (y === "midAnchor") {
1086
- const D = b - v, _ = Math.max(
1096
+ const M = w - b, _ = Math.max(
1087
1097
  0,
1088
- Math.min(b, D + (s - u))
1098
+ Math.min(w, M + (a - u))
1089
1099
  );
1090
- if (c)
1091
- _ < P ? t.openSidebarFully() : t.openToMidAnchor();
1092
- else {
1093
- const C = (b + D) / 2;
1094
- _ > C ? t.closeSidebar() : t.openToMidAnchor();
1095
- }
1096
- t.dragSidebar(null);
1100
+ c && _ < A ? t.openSidebarFully() : t.closeSidebar(), t.dragSidebar(null);
1097
1101
  }
1098
1102
  } else
1099
- x ? t.closeSidebar() : t.openSidebar(), t.dragSidebar(null);
1100
- else w && c ? (M ? t.openToMidAnchor() : t.openSidebar(), t.dragSidebar(null)) : (t.closeSidebar(), t.dragSidebar(null));
1103
+ R ? t.closeSidebar() : t.openSidebar(), t.dragSidebar(null);
1104
+ else v && c ? (I ? t.openToMidAnchor() : t.openSidebar(), t.dragSidebar(null)) : (t.closeSidebar(), t.dragSidebar(null));
1101
1105
  };
1102
- function Vt(e, t) {
1103
- var B, m;
1106
+ function Jt(e, t) {
1107
+ var N, f;
1104
1108
  const r = le(e.mediaQueryWidth), {
1105
1109
  lockedSidebar: i,
1106
- setLockedSidebar: s,
1110
+ setLockedSidebar: a,
1107
1111
  bottomSidebars: o,
1108
1112
  openSidebar: u,
1109
- openSidebarFully: a,
1113
+ openSidebarFully: s,
1110
1114
  closeSidebar: l,
1111
1115
  dragSidebar: c,
1112
- openSidebarToMidAnchor: x,
1113
- activeBottomDragIdRef: w,
1114
- bottomFocusStackRef: v
1115
- } = K(), b = ((B = o[t]) == null ? void 0 : B.isOpen) ?? !1, M = ((m = o[t]) == null ? void 0 : m.anchorState) ?? "closed", y = L(null), P = L(null), D = L(null), _ = L(null), C = L(0), $ = L(null), j = L(M);
1116
- q(() => {
1117
- j.current = M;
1118
- }, [M]), q(() => {
1116
+ openSidebarToMidAnchor: R,
1117
+ activeBottomDragIdRef: v,
1118
+ bottomFocusStackRef: b
1119
+ } = J(), w = ((N = o[t]) == null ? void 0 : N.isOpen) ?? !1, I = ((f = o[t]) == null ? void 0 : f.anchorState) ?? "closed", y = L(null), A = L(null), M = L(null), _ = L(null), W = L(0), D = L(null), j = L(I);
1120
+ Z(() => {
1121
+ j.current = I;
1122
+ }, [I]), Z(() => {
1119
1123
  if (!r || i && i !== "bottom" || e.disabled) return;
1120
- const p = {
1121
- getIsOpen: () => b,
1124
+ const x = {
1125
+ getIsOpen: () => w,
1122
1126
  openSidebar: () => u("bottom", { id: t }),
1123
- openSidebarFully: () => a("bottom", { id: t }),
1127
+ openSidebarFully: () => s("bottom", { id: t }),
1124
1128
  closeSidebar: () => l("bottom", { id: t }),
1125
1129
  dragSidebar: (n) => c("bottom", n, { id: t }),
1126
1130
  getBottomAnchorState: () => j.current,
1127
- openToMidAnchor: () => x("bottom", { id: t })
1128
- }, T = {
1131
+ openToMidAnchor: () => R("bottom", { id: t })
1132
+ }, p = {
1129
1133
  draggingRef: y,
1130
- currentYRef: P,
1131
- prevYRef: D
1132
- }, O = () => w.current !== null && w.current !== t, V = () => {
1133
- const n = v.current;
1134
+ currentYRef: A,
1135
+ prevYRef: M
1136
+ }, Y = () => v.current !== null && v.current !== t, X = () => {
1137
+ const n = b.current;
1134
1138
  return n.length === 0 ? !0 : n[n.length - 1] === t;
1135
- }, F = () => {
1136
- if (O()) {
1139
+ }, z = () => {
1140
+ if (Y()) {
1137
1141
  y.current = null;
1138
1142
  return;
1139
1143
  }
1140
- w.current = t, s("bottom");
1144
+ v.current = t, a("bottom");
1141
1145
  const n = _.current;
1142
- n && ($.current = n.style.overflowY, n.style.overflowY = "hidden");
1143
- }, k = () => {
1144
- w.current === t && (w.current = null);
1146
+ n && (D.current = n.style.overflowY, n.style.overflowY = "hidden");
1147
+ }, F = () => {
1148
+ v.current === t && (v.current = null);
1145
1149
  const n = _.current;
1146
- n && $.current !== null && (n.style.overflowY = $.current, $.current = null);
1150
+ n && D.current !== null && (n.style.overflowY = D.current, D.current = null);
1147
1151
  };
1148
- function H(n) {
1149
- var Z;
1150
- if (i && i !== "bottom" || O() || !V() || ce(n.target) || n.changedTouches.length === 0) return;
1151
- const f = n.changedTouches[0], E = window.innerHeight, I = p.getIsOpen(), z = f.clientY >= E - e.edgeActivationWidthPx;
1152
- I && !e.swipeToClose || !I && !e.swipeToOpen || (I || z) && (_.current = je(n.target), C.current = ((Z = _.current) == null ? void 0 : Z.scrollTop) ?? 0, Be({
1153
- refs: T,
1154
- clientX: f.clientX,
1155
- clientY: f.clientY,
1156
- touchId: f.identifier,
1152
+ function G(n) {
1153
+ var K;
1154
+ if (i && i !== "bottom" || Y() || !X() || ce(n.target) || n.changedTouches.length === 0) return;
1155
+ const g = n.changedTouches[0], T = window.innerHeight, P = x.getIsOpen(), Q = g.clientY >= T - e.edgeActivationWidthPx;
1156
+ P && !e.swipeToClose || !P && !e.swipeToOpen || (P || Q) && (_.current = je(n.target), W.current = ((K = _.current) == null ? void 0 : K.scrollTop) ?? 0, Be({
1157
+ refs: p,
1158
+ clientX: g.clientX,
1159
+ clientY: g.clientY,
1160
+ touchId: g.identifier,
1157
1161
  isMouse: !1
1158
1162
  }));
1159
1163
  }
1160
- function G(n) {
1164
+ function k(n) {
1161
1165
  if (i && i !== "bottom") return;
1162
- if (O()) {
1166
+ if (Y()) {
1163
1167
  y.current = null;
1164
1168
  return;
1165
1169
  }
1166
1170
  if (!y.current || y.current.isMouse) return;
1167
- const f = y.current.activeTouchId, E = Re(n.changedTouches, f);
1168
- E && Ne({
1169
- refs: T,
1170
- callbacks: p,
1171
- currentY: E.clientY,
1171
+ const g = y.current.activeTouchId, T = Re(n.changedTouches, g);
1172
+ T && ke({
1173
+ refs: p,
1174
+ callbacks: x,
1175
+ currentY: T.clientY,
1172
1176
  preventDefault: () => n.preventDefault(),
1173
- lockPane: F,
1177
+ lockPane: z,
1174
1178
  options: e,
1175
1179
  scrollableAncestor: _.current,
1176
- initialScrollTop: C.current
1180
+ initialScrollTop: W.current
1177
1181
  });
1178
1182
  }
1179
- function Q(n) {
1183
+ function U(n) {
1180
1184
  if (i && i !== "bottom" || !y.current || y.current.isMouse) return;
1181
- const f = y.current.activeTouchId;
1182
- Te(n.changedTouches, f) && Fe({
1183
- refs: T,
1184
- callbacks: p,
1185
+ const g = y.current.activeTouchId;
1186
+ Te(n.changedTouches, g) && Ne({
1187
+ refs: p,
1188
+ callbacks: x,
1185
1189
  options: e,
1186
- onDragEnd: k
1190
+ onDragEnd: F
1187
1191
  });
1188
1192
  }
1189
- function J() {
1190
- i && i !== "bottom" || !y.current || y.current.isMouse || (k(), zt({
1191
- refs: T,
1192
- dragSidebar: p.dragSidebar,
1193
+ function V() {
1194
+ i && i !== "bottom" || !y.current || y.current.isMouse || (F(), qt({
1195
+ refs: p,
1196
+ dragSidebar: x.dragSidebar,
1193
1197
  onDeactivate: () => {
1194
1198
  }
1195
1199
  }));
1196
1200
  }
1197
- function Y(n) {
1198
- var z;
1199
- if (i && i !== "bottom" || O() || !V() || ce(n.target) || n.button !== 0) return;
1200
- const f = window.innerHeight, E = p.getIsOpen(), I = n.clientY >= f - e.edgeActivationWidthPx;
1201
- E && !e.swipeToClose || !E && !e.swipeToOpen || (E || I) && (_.current = je(n.target), C.current = ((z = _.current) == null ? void 0 : z.scrollTop) ?? 0, Be({
1202
- refs: T,
1201
+ function q(n) {
1202
+ var Q;
1203
+ if (i && i !== "bottom" || Y() || !X() || ce(n.target) || n.button !== 0) return;
1204
+ const g = window.innerHeight, T = x.getIsOpen(), P = n.clientY >= g - e.edgeActivationWidthPx;
1205
+ T && !e.swipeToClose || !T && !e.swipeToOpen || (T || P) && (_.current = je(n.target), W.current = ((Q = _.current) == null ? void 0 : Q.scrollTop) ?? 0, Be({
1206
+ refs: p,
1203
1207
  clientX: n.clientX,
1204
1208
  clientY: n.clientY,
1205
1209
  touchId: null,
1206
1210
  isMouse: !0
1207
1211
  }));
1208
1212
  }
1209
- function ne(n) {
1213
+ function $(n) {
1210
1214
  if (!(i && i !== "bottom")) {
1211
- if (O()) {
1215
+ if (Y()) {
1212
1216
  y.current = null;
1213
1217
  return;
1214
1218
  }
1215
- !y.current || !y.current.isMouse || Ne({
1216
- refs: T,
1217
- callbacks: p,
1219
+ !y.current || !y.current.isMouse || ke({
1220
+ refs: p,
1221
+ callbacks: x,
1218
1222
  currentY: n.clientY,
1219
1223
  preventDefault: () => n.preventDefault(),
1220
- lockPane: F,
1224
+ lockPane: z,
1221
1225
  options: e,
1222
1226
  scrollableAncestor: _.current,
1223
- initialScrollTop: C.current
1227
+ initialScrollTop: W.current
1224
1228
  });
1225
1229
  }
1226
1230
  }
1227
- function N() {
1228
- i && i !== "bottom" || !y.current || !y.current.isMouse || Fe({
1229
- refs: T,
1230
- callbacks: p,
1231
+ function ne() {
1232
+ i && i !== "bottom" || !y.current || !y.current.isMouse || Ne({
1233
+ refs: p,
1234
+ callbacks: x,
1231
1235
  options: e,
1232
- onDragEnd: k
1236
+ onDragEnd: F
1233
1237
  });
1234
1238
  }
1235
- return window.addEventListener("touchstart", H, { passive: !0 }), window.addEventListener("touchmove", G, { passive: !1 }), window.addEventListener("touchend", Q, { passive: !0 }), window.addEventListener("touchcancel", J, { passive: !0 }), window.addEventListener("mousedown", Y, { passive: !0 }), window.addEventListener("mousemove", ne, { passive: !1 }), window.addEventListener("mouseup", N, { passive: !0 }), () => {
1236
- window.removeEventListener("touchstart", H), window.removeEventListener("touchmove", G), window.removeEventListener("touchend", Q), window.removeEventListener("touchcancel", J), window.removeEventListener("mousedown", Y), window.removeEventListener("mousemove", ne), window.removeEventListener("mouseup", N);
1239
+ return window.addEventListener("touchstart", G, { passive: !0 }), window.addEventListener("touchmove", k, { passive: !1 }), window.addEventListener("touchend", U, { passive: !0 }), window.addEventListener("touchcancel", V, { passive: !0 }), window.addEventListener("mousedown", q, { passive: !0 }), window.addEventListener("mousemove", $, { passive: !1 }), window.addEventListener("mouseup", ne, { passive: !0 }), () => {
1240
+ window.removeEventListener("touchstart", G), window.removeEventListener("touchmove", k), window.removeEventListener("touchend", U), window.removeEventListener("touchcancel", V), window.removeEventListener("mousedown", q), window.removeEventListener("mousemove", $), window.removeEventListener("mouseup", ne);
1237
1241
  };
1238
1242
  }, [
1239
1243
  t,
1240
1244
  r,
1241
- b,
1245
+ w,
1242
1246
  u,
1243
- a,
1247
+ s,
1244
1248
  l,
1245
1249
  c,
1246
1250
  i,
1247
- s,
1251
+ a,
1248
1252
  e,
1249
- x,
1250
- w,
1251
- v
1253
+ R,
1254
+ v,
1255
+ b
1252
1256
  ]);
1253
1257
  }
1254
- function ir({
1258
+ function ar({
1255
1259
  id: e = "primary",
1256
1260
  className: t,
1257
1261
  children: r,
1258
1262
  ToggleComponent: i,
1259
- ...s
1263
+ ...a
1260
1264
  }) {
1261
- var M;
1262
- if ((r == null ? void 0 : r.type) === R.Fragment)
1265
+ var I;
1266
+ if ((r == null ? void 0 : r.type) === O.Fragment)
1263
1267
  throw new Error("Fragments is not allowed in SwipeBarBottom");
1264
- const {
1265
- bottomSidebars: o,
1266
- closeSidebar: u,
1267
- registerBottomSidebar: a,
1268
- unregisterBottomSidebar: l
1269
- } = K(), c = L(null), x = L(null);
1270
- q(() => (a(e, { sidebarRef: c, toggleRef: x }), () => l(e)), [e, a, l]);
1271
- const w = Ee("bottom", s, e), v = le(w.mediaQueryWidth);
1272
- Vt(w, e);
1273
- const b = ((M = o[e]) == null ? void 0 : M.isOpen) ?? !1;
1274
- return /* @__PURE__ */ R.jsxs(R.Fragment, { children: [
1275
- w.showOverlay && /* @__PURE__ */ R.jsx(
1276
- Ae,
1268
+ const { bottomSidebars: o, closeSidebar: u, registerBottomSidebar: s, unregisterBottomSidebar: l } = J(), c = L(null), R = L(null);
1269
+ Z(() => (s(e, { sidebarRef: c, toggleRef: R }), () => l(e)), [e, s, l]);
1270
+ const v = Oe("bottom", a, e), b = le(v.mediaQueryWidth);
1271
+ Jt(v, e);
1272
+ const w = ((I = o[e]) == null ? void 0 : I.isOpen) ?? !1;
1273
+ return /* @__PURE__ */ O.jsxs(O.Fragment, { children: [
1274
+ v.showOverlay && /* @__PURE__ */ O.jsx(
1275
+ Ee,
1277
1276
  {
1278
- isCollapsed: !b,
1277
+ isCollapsed: !w,
1279
1278
  setCollapsed: () => u("bottom", { id: e }),
1280
- transitionMs: w.transitionMs,
1281
- overlayBackgroundColor: w.overlayBackgroundColor,
1282
- overlayZIndex: w.overlayZIndex
1279
+ closeSidebarOnClick: v.closeSidebarOnOverlayClick,
1280
+ transitionMs: v.transitionMs,
1281
+ overlayBackgroundColor: v.overlayBackgroundColor,
1282
+ overlayZIndex: v.overlayZIndex
1283
1283
  }
1284
1284
  ),
1285
- /* @__PURE__ */ R.jsx(
1286
- qt,
1285
+ /* @__PURE__ */ O.jsx(
1286
+ Qt,
1287
1287
  {
1288
1288
  id: e,
1289
- toggleRef: x,
1290
- options: w,
1291
- showToggle: w.showToggle,
1289
+ toggleRef: R,
1290
+ options: v,
1291
+ showToggle: v.showToggle,
1292
1292
  ToggleComponent: i
1293
1293
  }
1294
1294
  ),
1295
- /* @__PURE__ */ R.jsx(
1295
+ /* @__PURE__ */ O.jsx(
1296
1296
  "div",
1297
1297
  {
1298
1298
  ref: c,
1299
1299
  style: {
1300
- ...jt,
1301
1300
  ...Nt,
1302
- ...w.isAbsolute || v ? Ft : {},
1301
+ ...Ft,
1302
+ ...v.isAbsolute || b ? Ht : {},
1303
1303
  ...t ? {} : { backgroundColor: ye },
1304
- zIndex: w.swipeBarZIndex
1304
+ zIndex: v.swipeBarZIndex
1305
1305
  },
1306
1306
  className: t,
1307
1307
  children: r
@@ -1309,19 +1309,19 @@ function ir({
1309
1309
  )
1310
1310
  ] });
1311
1311
  }
1312
- function Qt({ options: e, showToggle: t = !0, ToggleComponent: r }) {
1313
- const { openSidebar: i, leftToggleRef: s, isLeftOpen: o, closeSidebar: u } = K();
1314
- return t ? /* @__PURE__ */ R.jsx(
1312
+ function Kt({ options: e, showToggle: t = !0, ToggleComponent: r }) {
1313
+ const { openSidebar: i, leftToggleRef: a, isLeftOpen: o, closeSidebar: u } = J();
1314
+ return t ? /* @__PURE__ */ O.jsx(
1315
1315
  "div",
1316
1316
  {
1317
- ref: s,
1317
+ ref: a,
1318
1318
  style: {
1319
1319
  ...Qe,
1320
1320
  transition: `transform ${e.transitionMs}ms ease, opacity ${e.transitionMs}ms ease`,
1321
1321
  left: 0,
1322
1322
  zIndex: e.toggleZIndex
1323
1323
  },
1324
- children: (!o || o && !e.showOverlay) && /* @__PURE__ */ R.jsx(
1324
+ children: (!o || o && !e.showOverlay) && /* @__PURE__ */ O.jsx(
1325
1325
  "button",
1326
1326
  {
1327
1327
  type: "button",
@@ -1333,50 +1333,50 @@ function Qt({ options: e, showToggle: t = !0, ToggleComponent: r }) {
1333
1333
  marginLeft: `${e.toggleIconEdgeDistancePx}px`,
1334
1334
  ...o ? { transform: "rotate(180deg)" } : {}
1335
1335
  },
1336
- children: r ?? /* @__PURE__ */ R.jsx(Oe, { size: e.toggleIconSizePx, color: e.toggleIconColor })
1336
+ children: r ?? /* @__PURE__ */ O.jsx(Ae, { size: e.toggleIconSizePx, color: e.toggleIconColor })
1337
1337
  }
1338
1338
  )
1339
1339
  }
1340
1340
  ) : null;
1341
1341
  }
1342
- const ke = ({
1342
+ const Fe = ({
1343
1343
  refs: e,
1344
1344
  callbacks: t,
1345
1345
  currentX: r,
1346
1346
  preventDefault: i,
1347
- lockPane: s,
1347
+ lockPane: a,
1348
1348
  options: o
1349
1349
  }) => {
1350
1350
  if (!e.draggingRef.current) return;
1351
1351
  const u = r - e.draggingRef.current.startX;
1352
- if (!e.draggingRef.current.isActivated && Math.abs(u) >= o.dragActivationDeltaPx && (e.draggingRef.current.isActivated = !0, s()), !e.draggingRef.current.isActivated) return;
1352
+ if (!e.draggingRef.current.isActivated && Math.abs(u) >= o.dragActivationDeltaPx && (e.draggingRef.current.isActivated = !0, a()), !e.draggingRef.current.isActivated) return;
1353
1353
  e.prevXRef.current = e.currentXRef.current, e.currentXRef.current = r;
1354
- const a = t.getIsOpen();
1354
+ const s = t.getIsOpen();
1355
1355
  let l = !1;
1356
- if ((a || e.draggingRef.current.startX <= o.edgeActivationWidthPx) && (l = !0), !l) {
1356
+ if ((s || e.draggingRef.current.startX <= o.edgeActivationWidthPx) && (l = !0), !l) {
1357
1357
  e.draggingRef.current = null, t.dragSidebar(null);
1358
1358
  return;
1359
1359
  }
1360
1360
  i();
1361
1361
  const c = o.sidebarWidthPx;
1362
- if (a) {
1363
- const x = Math.min(
1362
+ if (s) {
1363
+ const R = Math.min(
1364
1364
  0,
1365
1365
  Math.max(
1366
1366
  -c,
1367
1367
  u + o.dragActivationDeltaPx
1368
1368
  )
1369
1369
  );
1370
- t.dragSidebar(x);
1370
+ t.dragSidebar(R);
1371
1371
  } else if (e.draggingRef.current.startX <= o.edgeActivationWidthPx) {
1372
- const x = Math.min(
1372
+ const R = Math.min(
1373
1373
  0,
1374
1374
  Math.max(
1375
1375
  -c,
1376
1376
  -c + u - o.dragActivationDeltaPx
1377
1377
  )
1378
1378
  );
1379
- t.dragSidebar(x);
1379
+ t.dragSidebar(R);
1380
1380
  }
1381
1381
  }, He = ({
1382
1382
  refs: e,
@@ -1388,153 +1388,154 @@ const ke = ({
1388
1388
  e.draggingRef.current = null, e.currentXRef.current = null, e.prevXRef.current = null;
1389
1389
  return;
1390
1390
  }
1391
- const i = e.currentXRef.current ?? e.draggingRef.current.startX, s = e.prevXRef.current ?? e.draggingRef.current.startX, o = e.draggingRef.current.startX, u = t.getIsOpen();
1391
+ const i = e.currentXRef.current ?? e.draggingRef.current.startX, a = e.prevXRef.current ?? e.draggingRef.current.startX, o = e.draggingRef.current.startX, u = t.getIsOpen();
1392
1392
  e.draggingRef.current = null, e.currentXRef.current = null, e.prevXRef.current = null;
1393
- const a = i >= s, l = i < s, c = o <= r.edgeActivationWidthPx;
1394
- u ? (l ? t.closeSidebar() : t.openSidebar(), t.dragSidebar(null)) : c && a ? (t.openSidebar(), t.dragSidebar(null)) : (t.closeSidebar(), t.dragSidebar(null));
1393
+ const s = i >= a, l = i < a, c = o <= r.edgeActivationWidthPx;
1394
+ u ? (l ? t.closeSidebar() : t.openSidebar(), t.dragSidebar(null)) : c && s ? (t.openSidebar(), t.dragSidebar(null)) : (t.closeSidebar(), t.dragSidebar(null));
1395
1395
  };
1396
- function Jt(e) {
1396
+ function er(e) {
1397
1397
  const t = le(e.mediaQueryWidth), {
1398
1398
  lockedSidebar: r,
1399
1399
  setLockedSidebar: i,
1400
- isLeftOpen: s,
1400
+ isLeftOpen: a,
1401
1401
  openSidebar: o,
1402
1402
  closeSidebar: u,
1403
- dragSidebar: a,
1403
+ dragSidebar: s,
1404
1404
  leftSidebarRef: l
1405
- } = K(), c = L(null), x = L(null), w = L(null);
1406
- q(() => {
1405
+ } = J(), c = L(null), R = L(null), v = L(null);
1406
+ Z(() => {
1407
1407
  if (!t || r && r !== "left" || e.disabled) return;
1408
- const v = {
1409
- getIsOpen: () => s,
1408
+ const b = {
1409
+ getIsOpen: () => a,
1410
1410
  openSidebar: () => o("left"),
1411
1411
  closeSidebar: () => u("left"),
1412
- dragSidebar: (m) => a("left", m)
1413
- }, b = {
1412
+ dragSidebar: (f) => s("left", f)
1413
+ }, w = {
1414
1414
  draggingRef: c,
1415
- currentXRef: x,
1416
- prevXRef: w
1417
- }, M = () => i("left"), y = () => i(null);
1418
- function P(m) {
1419
- if (r && r !== "left" || ce(m.target) || m.changedTouches.length === 0) return;
1420
- const p = m.changedTouches[0], T = v.getIsOpen(), O = p.clientX <= e.edgeActivationWidthPx;
1421
- T && !e.swipeToClose || !T && !e.swipeToOpen || (T || O) && he({
1422
- refs: b,
1423
- clientX: p.clientX,
1424
- clientY: p.clientY,
1425
- touchId: p.identifier,
1415
+ currentXRef: R,
1416
+ prevXRef: v
1417
+ }, I = () => i("left"), y = () => i(null);
1418
+ function A(f) {
1419
+ if (r && r !== "left" || ce(f.target) || f.changedTouches.length === 0) return;
1420
+ const x = f.changedTouches[0], p = b.getIsOpen(), Y = x.clientX <= e.edgeActivationWidthPx;
1421
+ p && !e.swipeToClose || !p && !e.swipeToOpen || (p || Y) && he({
1422
+ refs: w,
1423
+ clientX: x.clientX,
1424
+ clientY: x.clientY,
1425
+ touchId: x.identifier,
1426
1426
  isMouse: !1
1427
1427
  });
1428
1428
  }
1429
- function D(m) {
1429
+ function M(f) {
1430
1430
  if (r && r !== "left" || !c.current || c.current.isMouse) return;
1431
- const p = c.current.activeTouchId, T = Re(m.changedTouches, p);
1432
- T && ke({
1433
- refs: b,
1434
- callbacks: v,
1435
- currentX: T.clientX,
1436
- preventDefault: () => m.preventDefault(),
1437
- lockPane: M,
1431
+ const x = c.current.activeTouchId, p = Re(f.changedTouches, x);
1432
+ p && Fe({
1433
+ refs: w,
1434
+ callbacks: b,
1435
+ currentX: p.clientX,
1436
+ preventDefault: () => f.preventDefault(),
1437
+ lockPane: I,
1438
1438
  options: e
1439
1439
  });
1440
1440
  }
1441
- function _(m) {
1441
+ function _(f) {
1442
1442
  if (r && r !== "left" || !c.current || c.current.isMouse) return;
1443
- const p = c.current.activeTouchId;
1444
- Te(m.changedTouches, p) && He({
1445
- refs: b,
1446
- callbacks: v,
1443
+ const x = c.current.activeTouchId;
1444
+ Te(f.changedTouches, x) && He({
1445
+ refs: w,
1446
+ callbacks: b,
1447
1447
  options: e
1448
1448
  });
1449
1449
  }
1450
- function C() {
1450
+ function W() {
1451
1451
  r && r !== "left" || !c.current || c.current.isMouse || Je({
1452
- refs: b,
1453
- dragSidebar: v.dragSidebar,
1452
+ refs: w,
1453
+ dragSidebar: b.dragSidebar,
1454
1454
  onDeactivate: y
1455
1455
  });
1456
1456
  }
1457
- function $(m) {
1458
- if (r && r !== "left" || ce(m.target) || m.button !== 0) return;
1459
- const p = v.getIsOpen(), T = m.clientX <= e.edgeActivationWidthPx;
1460
- p && !e.swipeToClose || !p && !e.swipeToOpen || (p || T) && he({
1461
- refs: b,
1462
- clientX: m.clientX,
1463
- clientY: m.clientY,
1457
+ function D(f) {
1458
+ if (r && r !== "left" || ce(f.target) || f.button !== 0) return;
1459
+ const x = b.getIsOpen(), p = f.clientX <= e.edgeActivationWidthPx;
1460
+ x && !e.swipeToClose || !x && !e.swipeToOpen || (x || p) && he({
1461
+ refs: w,
1462
+ clientX: f.clientX,
1463
+ clientY: f.clientY,
1464
1464
  touchId: null,
1465
1465
  isMouse: !0
1466
1466
  });
1467
1467
  }
1468
- function j(m) {
1469
- r && r !== "left" || !c.current || !c.current.isMouse || ke({
1470
- refs: b,
1471
- callbacks: v,
1472
- currentX: m.clientX,
1473
- preventDefault: () => m.preventDefault(),
1474
- lockPane: M,
1468
+ function j(f) {
1469
+ r && r !== "left" || !c.current || !c.current.isMouse || Fe({
1470
+ refs: w,
1471
+ callbacks: b,
1472
+ currentX: f.clientX,
1473
+ preventDefault: () => f.preventDefault(),
1474
+ lockPane: I,
1475
1475
  options: e
1476
1476
  });
1477
1477
  }
1478
- function B() {
1478
+ function N() {
1479
1479
  r && r !== "left" || !c.current || !c.current.isMouse || He({
1480
- refs: b,
1481
- callbacks: v,
1480
+ refs: w,
1481
+ callbacks: b,
1482
1482
  options: e
1483
1483
  });
1484
1484
  }
1485
- return window.addEventListener("touchstart", P, { passive: !0 }), window.addEventListener("touchmove", D, { passive: !1 }), window.addEventListener("touchend", _, { passive: !0 }), window.addEventListener("touchcancel", C, { passive: !0 }), window.addEventListener("mousedown", $, { passive: !0 }), window.addEventListener("mousemove", j, { passive: !1 }), window.addEventListener("mouseup", B, { passive: !0 }), () => {
1486
- window.removeEventListener("touchstart", P), window.removeEventListener("touchmove", D), window.removeEventListener("touchend", _), window.removeEventListener("touchcancel", C), window.removeEventListener("mousedown", $), window.removeEventListener("mousemove", j), window.removeEventListener("mouseup", B);
1485
+ return window.addEventListener("touchstart", A, { passive: !0 }), window.addEventListener("touchmove", M, { passive: !1 }), window.addEventListener("touchend", _, { passive: !0 }), window.addEventListener("touchcancel", W, { passive: !0 }), window.addEventListener("mousedown", D, { passive: !0 }), window.addEventListener("mousemove", j, { passive: !1 }), window.addEventListener("mouseup", N, { passive: !0 }), () => {
1486
+ window.removeEventListener("touchstart", A), window.removeEventListener("touchmove", M), window.removeEventListener("touchend", _), window.removeEventListener("touchcancel", W), window.removeEventListener("mousedown", D), window.removeEventListener("mousemove", j), window.removeEventListener("mouseup", N);
1487
1487
  };
1488
1488
  }, [
1489
1489
  t,
1490
- s,
1490
+ a,
1491
1491
  o,
1492
1492
  u,
1493
- a,
1493
+ s,
1494
1494
  r,
1495
1495
  i,
1496
1496
  l,
1497
1497
  e
1498
1498
  ]);
1499
1499
  }
1500
- function or({
1500
+ function sr({
1501
1501
  className: e,
1502
1502
  children: t,
1503
1503
  ToggleComponent: r,
1504
1504
  ...i
1505
1505
  }) {
1506
- if ((t == null ? void 0 : t.type) === R.Fragment)
1506
+ if ((t == null ? void 0 : t.type) === O.Fragment)
1507
1507
  throw new Error("Fragments is not allowed in SwipeBarLeft");
1508
- const { isLeftOpen: s, closeSidebar: o, leftSidebarRef: u } = K(), a = Ee("left", i), l = le(a.mediaQueryWidth);
1509
- return Jt(a), /* @__PURE__ */ R.jsxs(R.Fragment, { children: [
1510
- a.showOverlay && /* @__PURE__ */ R.jsx(
1511
- Ae,
1508
+ const { isLeftOpen: a, closeSidebar: o, leftSidebarRef: u } = J(), s = Oe("left", i), l = le(s.mediaQueryWidth);
1509
+ return er(s), /* @__PURE__ */ O.jsxs(O.Fragment, { children: [
1510
+ s.showOverlay && /* @__PURE__ */ O.jsx(
1511
+ Ee,
1512
1512
  {
1513
- isCollapsed: !s,
1513
+ isCollapsed: !a,
1514
1514
  setCollapsed: () => o("left"),
1515
- transitionMs: a.transitionMs,
1516
- overlayBackgroundColor: a.overlayBackgroundColor,
1517
- overlayZIndex: a.overlayZIndex
1515
+ closeSidebarOnClick: s.closeSidebarOnOverlayClick,
1516
+ transitionMs: s.transitionMs,
1517
+ overlayBackgroundColor: s.overlayBackgroundColor,
1518
+ overlayZIndex: s.overlayZIndex
1518
1519
  }
1519
1520
  ),
1520
- /* @__PURE__ */ R.jsx(
1521
- Qt,
1521
+ /* @__PURE__ */ O.jsx(
1522
+ Kt,
1522
1523
  {
1523
- options: a,
1524
- showToggle: a.showToggle,
1524
+ options: s,
1525
+ showToggle: s.showToggle,
1525
1526
  ToggleComponent: r
1526
1527
  }
1527
1528
  ),
1528
- /* @__PURE__ */ R.jsx(
1529
+ /* @__PURE__ */ O.jsx(
1529
1530
  "div",
1530
1531
  {
1531
1532
  ref: u,
1532
1533
  style: {
1533
- ...Ve,
1534
- ...Yt,
1535
- ...a.isAbsolute || l ? Wt : {},
1534
+ ...qe,
1535
+ ...Wt,
1536
+ ...s.isAbsolute || l ? jt : {},
1536
1537
  ...e ? {} : { backgroundColor: ye },
1537
- zIndex: a.swipeBarZIndex
1538
+ zIndex: s.swipeBarZIndex
1538
1539
  },
1539
1540
  className: e,
1540
1541
  children: t
@@ -1542,21 +1543,21 @@ function or({
1542
1543
  )
1543
1544
  ] });
1544
1545
  }
1545
- function Kt({ options: e, showToggle: t = !0, ToggleComponent: r }) {
1546
- const { openSidebar: i, rightToggleRef: s, isRightOpen: o, closeSidebar: u } = K();
1546
+ function tr({ options: e, showToggle: t = !0, ToggleComponent: r }) {
1547
+ const { openSidebar: i, rightToggleRef: a, isRightOpen: o, closeSidebar: u } = J();
1547
1548
  return t ? (
1548
1549
  // 1px wide container
1549
- /* @__PURE__ */ R.jsx(
1550
+ /* @__PURE__ */ O.jsx(
1550
1551
  "div",
1551
1552
  {
1552
- ref: s,
1553
+ ref: a,
1553
1554
  style: {
1554
1555
  ...Qe,
1555
1556
  transition: `transform ${e.transitionMs}ms ease, opacity ${e.transitionMs}ms ease`,
1556
1557
  right: 0,
1557
1558
  zIndex: e.toggleZIndex
1558
1559
  },
1559
- children: (!o || o && !e.showOverlay) && /* @__PURE__ */ R.jsx(
1560
+ children: (!o || o && !e.showOverlay) && /* @__PURE__ */ O.jsx(
1560
1561
  "button",
1561
1562
  {
1562
1563
  type: "button",
@@ -1569,7 +1570,7 @@ function Kt({ options: e, showToggle: t = !0, ToggleComponent: r }) {
1569
1570
  // reverse because we are using the same icon for both left and right
1570
1571
  ...o ? {} : { transform: "rotate(180deg)" }
1571
1572
  },
1572
- children: r ?? /* @__PURE__ */ R.jsx(Oe, { size: e.toggleIconSizePx, color: e.toggleIconColor })
1573
+ children: r ?? /* @__PURE__ */ O.jsx(Ae, { size: e.toggleIconSizePx, color: e.toggleIconColor })
1573
1574
  }
1574
1575
  )
1575
1576
  }
@@ -1581,36 +1582,36 @@ const Ge = ({
1581
1582
  callbacks: t,
1582
1583
  currentX: r,
1583
1584
  preventDefault: i,
1584
- lockPane: s,
1585
+ lockPane: a,
1585
1586
  options: o
1586
1587
  }) => {
1587
1588
  if (!e.draggingRef.current) return;
1588
- const u = window.innerWidth, a = r - e.draggingRef.current.startX, l = e.draggingRef.current.startX >= u - o.edgeActivationWidthPx, c = e.draggingRef.current.isActivated;
1589
- if (!c && Math.abs(a) >= o.dragActivationDeltaPx && (e.draggingRef.current.isActivated = !0, s()), !c) return;
1589
+ const u = window.innerWidth, s = r - e.draggingRef.current.startX, l = e.draggingRef.current.startX >= u - o.edgeActivationWidthPx, c = e.draggingRef.current.isActivated;
1590
+ if (!c && Math.abs(s) >= o.dragActivationDeltaPx && (e.draggingRef.current.isActivated = !0, a()), !c) return;
1590
1591
  e.prevXRef.current = e.currentXRef.current, e.currentXRef.current = r;
1591
- const x = t.getIsOpen();
1592
- let w = !1;
1593
- if ((x || l) && (w = !0), !w) {
1592
+ const R = t.getIsOpen();
1593
+ let v = !1;
1594
+ if ((R || l) && (v = !0), !v) {
1594
1595
  e.draggingRef.current = null, t.dragSidebar(null);
1595
1596
  return;
1596
1597
  }
1597
1598
  i();
1598
- const v = o.sidebarWidthPx;
1599
- if (x) {
1600
- const b = Math.max(
1599
+ const b = o.sidebarWidthPx;
1600
+ if (R) {
1601
+ const w = Math.max(
1601
1602
  0,
1602
- Math.min(v, a - o.dragActivationDeltaPx)
1603
+ Math.min(b, s - o.dragActivationDeltaPx)
1603
1604
  );
1604
- t.dragSidebar(b);
1605
+ t.dragSidebar(w);
1605
1606
  } else {
1606
- const b = Math.max(
1607
+ const w = Math.max(
1607
1608
  0,
1608
1609
  Math.min(
1609
- v,
1610
- v + a + o.dragActivationDeltaPx
1610
+ b,
1611
+ b + s + o.dragActivationDeltaPx
1611
1612
  )
1612
1613
  );
1613
- t.dragSidebar(b);
1614
+ t.dragSidebar(w);
1614
1615
  }
1615
1616
  }, Ue = ({ refs: e, callbacks: t, options: r }) => {
1616
1617
  if (!e.draggingRef.current) return;
@@ -1618,153 +1619,154 @@ const Ge = ({
1618
1619
  e.draggingRef.current = null, e.currentXRef.current = null, e.prevXRef.current = null;
1619
1620
  return;
1620
1621
  }
1621
- const i = e.currentXRef.current ?? e.draggingRef.current.startX, s = e.prevXRef.current ?? e.draggingRef.current.startX, o = e.draggingRef.current.startX, u = t.getIsOpen(), a = window.innerWidth;
1622
+ const i = e.currentXRef.current ?? e.draggingRef.current.startX, a = e.prevXRef.current ?? e.draggingRef.current.startX, o = e.draggingRef.current.startX, u = t.getIsOpen(), s = window.innerWidth;
1622
1623
  e.draggingRef.current = null, e.currentXRef.current = null, e.prevXRef.current = null;
1623
- const l = i > s, c = i < s, x = o >= a - r.edgeActivationWidthPx;
1624
- u ? (l ? t.closeSidebar() : t.openSidebar(), t.dragSidebar(null)) : x && c ? (t.openSidebar(), t.dragSidebar(null)) : (t.closeSidebar(), t.dragSidebar(null));
1624
+ const l = i > a, c = i < a, R = o >= s - r.edgeActivationWidthPx;
1625
+ u ? (l ? t.closeSidebar() : t.openSidebar(), t.dragSidebar(null)) : R && c ? (t.openSidebar(), t.dragSidebar(null)) : (t.closeSidebar(), t.dragSidebar(null));
1625
1626
  };
1626
- function er(e) {
1627
+ function rr(e) {
1627
1628
  const t = le(e.mediaQueryWidth), {
1628
1629
  lockedSidebar: r,
1629
1630
  setLockedSidebar: i,
1630
- isRightOpen: s,
1631
+ isRightOpen: a,
1631
1632
  openSidebar: o,
1632
1633
  closeSidebar: u,
1633
- dragSidebar: a,
1634
+ dragSidebar: s,
1634
1635
  rightSidebarRef: l
1635
- } = K(), c = L(null), x = L(null), w = L(null);
1636
- q(() => {
1636
+ } = J(), c = L(null), R = L(null), v = L(null);
1637
+ Z(() => {
1637
1638
  if (!t || r && r !== "right" || e.disabled) return;
1638
- const v = {
1639
- getIsOpen: () => s,
1639
+ const b = {
1640
+ getIsOpen: () => a,
1640
1641
  openSidebar: () => o("right"),
1641
1642
  closeSidebar: () => u("right"),
1642
- dragSidebar: (m) => a("right", m)
1643
- }, b = {
1643
+ dragSidebar: (f) => s("right", f)
1644
+ }, w = {
1644
1645
  draggingRef: c,
1645
- currentXRef: x,
1646
- prevXRef: w
1647
- }, M = () => i("right"), y = () => i(null);
1648
- function P(m) {
1649
- if (r && r !== "right" || ce(m.target) || m.changedTouches.length === 0) return;
1650
- const p = m.changedTouches[0], T = window.innerWidth, O = v.getIsOpen(), V = p.clientX >= T - e.edgeActivationWidthPx;
1651
- O && !e.swipeToClose || !O && !e.swipeToOpen || (O || V) && he({
1652
- refs: b,
1653
- clientX: p.clientX,
1654
- clientY: p.clientY,
1655
- touchId: p.identifier,
1646
+ currentXRef: R,
1647
+ prevXRef: v
1648
+ }, I = () => i("right"), y = () => i(null);
1649
+ function A(f) {
1650
+ if (r && r !== "right" || ce(f.target) || f.changedTouches.length === 0) return;
1651
+ const x = f.changedTouches[0], p = window.innerWidth, Y = b.getIsOpen(), X = x.clientX >= p - e.edgeActivationWidthPx;
1652
+ Y && !e.swipeToClose || !Y && !e.swipeToOpen || (Y || X) && he({
1653
+ refs: w,
1654
+ clientX: x.clientX,
1655
+ clientY: x.clientY,
1656
+ touchId: x.identifier,
1656
1657
  isMouse: !1
1657
1658
  });
1658
1659
  }
1659
- function D(m) {
1660
+ function M(f) {
1660
1661
  if (r && r !== "right" || !c.current || c.current.isMouse) return;
1661
- const p = c.current.activeTouchId, T = Re(m.changedTouches, p);
1662
- T && Ge({
1663
- refs: b,
1664
- callbacks: v,
1665
- currentX: T.clientX,
1666
- preventDefault: () => m.preventDefault(),
1667
- lockPane: M,
1662
+ const x = c.current.activeTouchId, p = Re(f.changedTouches, x);
1663
+ p && Ge({
1664
+ refs: w,
1665
+ callbacks: b,
1666
+ currentX: p.clientX,
1667
+ preventDefault: () => f.preventDefault(),
1668
+ lockPane: I,
1668
1669
  options: e
1669
1670
  });
1670
1671
  }
1671
- function _(m) {
1672
+ function _(f) {
1672
1673
  if (r && r !== "right" || !c.current || c.current.isMouse) return;
1673
- const p = c.current.activeTouchId;
1674
- Te(m.changedTouches, p) && Ue({
1675
- refs: b,
1676
- callbacks: v,
1674
+ const x = c.current.activeTouchId;
1675
+ Te(f.changedTouches, x) && Ue({
1676
+ refs: w,
1677
+ callbacks: b,
1677
1678
  options: e
1678
1679
  });
1679
1680
  }
1680
- function C() {
1681
+ function W() {
1681
1682
  r && r !== "right" || !c.current || c.current.isMouse || Je({
1682
- refs: b,
1683
- dragSidebar: v.dragSidebar,
1683
+ refs: w,
1684
+ dragSidebar: b.dragSidebar,
1684
1685
  onDeactivate: y
1685
1686
  });
1686
1687
  }
1687
- function $(m) {
1688
- if (r && r !== "right" || ce(m.target) || m.button !== 0) return;
1689
- const p = window.innerWidth, T = v.getIsOpen(), O = m.clientX >= p - e.edgeActivationWidthPx;
1690
- T && !e.swipeToClose || !T && !e.swipeToOpen || (T || O) && he({
1691
- refs: b,
1692
- clientX: m.clientX,
1693
- clientY: m.clientY,
1688
+ function D(f) {
1689
+ if (r && r !== "right" || ce(f.target) || f.button !== 0) return;
1690
+ const x = window.innerWidth, p = b.getIsOpen(), Y = f.clientX >= x - e.edgeActivationWidthPx;
1691
+ p && !e.swipeToClose || !p && !e.swipeToOpen || (p || Y) && he({
1692
+ refs: w,
1693
+ clientX: f.clientX,
1694
+ clientY: f.clientY,
1694
1695
  touchId: null,
1695
1696
  isMouse: !0
1696
1697
  });
1697
1698
  }
1698
- function j(m) {
1699
+ function j(f) {
1699
1700
  r && r !== "right" || !c.current || !c.current.isMouse || Ge({
1700
- refs: b,
1701
- callbacks: v,
1702
- currentX: m.clientX,
1703
- preventDefault: () => m.preventDefault(),
1704
- lockPane: M,
1701
+ refs: w,
1702
+ callbacks: b,
1703
+ currentX: f.clientX,
1704
+ preventDefault: () => f.preventDefault(),
1705
+ lockPane: I,
1705
1706
  options: e
1706
1707
  });
1707
1708
  }
1708
- function B() {
1709
+ function N() {
1709
1710
  r && r !== "right" || !c.current || !c.current.isMouse || Ue({
1710
- refs: b,
1711
- callbacks: v,
1711
+ refs: w,
1712
+ callbacks: b,
1712
1713
  options: e
1713
1714
  });
1714
1715
  }
1715
- return window.addEventListener("touchstart", P, { passive: !0 }), window.addEventListener("touchmove", D, { passive: !1 }), window.addEventListener("touchend", _, { passive: !0 }), window.addEventListener("touchcancel", C, { passive: !0 }), window.addEventListener("mousedown", $, { passive: !0 }), window.addEventListener("mousemove", j, { passive: !1 }), window.addEventListener("mouseup", B, { passive: !0 }), () => {
1716
- window.removeEventListener("touchstart", P), window.removeEventListener("touchmove", D), window.removeEventListener("touchend", _), window.removeEventListener("touchcancel", C), window.removeEventListener("mousedown", $), window.removeEventListener("mousemove", j), window.removeEventListener("mouseup", B);
1716
+ return window.addEventListener("touchstart", A, { passive: !0 }), window.addEventListener("touchmove", M, { passive: !1 }), window.addEventListener("touchend", _, { passive: !0 }), window.addEventListener("touchcancel", W, { passive: !0 }), window.addEventListener("mousedown", D, { passive: !0 }), window.addEventListener("mousemove", j, { passive: !1 }), window.addEventListener("mouseup", N, { passive: !0 }), () => {
1717
+ window.removeEventListener("touchstart", A), window.removeEventListener("touchmove", M), window.removeEventListener("touchend", _), window.removeEventListener("touchcancel", W), window.removeEventListener("mousedown", D), window.removeEventListener("mousemove", j), window.removeEventListener("mouseup", N);
1717
1718
  };
1718
1719
  }, [
1719
1720
  t,
1720
- s,
1721
+ a,
1721
1722
  o,
1722
1723
  u,
1723
- a,
1724
+ s,
1724
1725
  r,
1725
1726
  i,
1726
1727
  l,
1727
1728
  e
1728
1729
  ]);
1729
1730
  }
1730
- function sr({
1731
+ function cr({
1731
1732
  className: e,
1732
1733
  children: t,
1733
1734
  ToggleComponent: r,
1734
1735
  ...i
1735
1736
  }) {
1736
- if ((t == null ? void 0 : t.type) === R.Fragment)
1737
+ if ((t == null ? void 0 : t.type) === O.Fragment)
1737
1738
  throw new Error("Fragments is not allowed in SwipeBarRight");
1738
- const { isRightOpen: s, closeSidebar: o, rightSidebarRef: u } = K(), a = Ee("right", i), l = le(a.mediaQueryWidth);
1739
- return er(a), /* @__PURE__ */ R.jsxs(R.Fragment, { children: [
1740
- a.showOverlay && /* @__PURE__ */ R.jsx(
1741
- Ae,
1739
+ const { isRightOpen: a, closeSidebar: o, rightSidebarRef: u } = J(), s = Oe("right", i), l = le(s.mediaQueryWidth);
1740
+ return rr(s), /* @__PURE__ */ O.jsxs(O.Fragment, { children: [
1741
+ s.showOverlay && /* @__PURE__ */ O.jsx(
1742
+ Ee,
1742
1743
  {
1743
- isCollapsed: !s,
1744
+ isCollapsed: !a,
1744
1745
  setCollapsed: () => o("right"),
1745
- transitionMs: a.transitionMs,
1746
- overlayBackgroundColor: a.overlayBackgroundColor,
1747
- overlayZIndex: a.overlayZIndex
1746
+ closeSidebarOnClick: s.closeSidebarOnOverlayClick,
1747
+ transitionMs: s.transitionMs,
1748
+ overlayBackgroundColor: s.overlayBackgroundColor,
1749
+ overlayZIndex: s.overlayZIndex
1748
1750
  }
1749
1751
  ),
1750
- /* @__PURE__ */ R.jsx(
1751
- Kt,
1752
+ /* @__PURE__ */ O.jsx(
1753
+ tr,
1752
1754
  {
1753
- options: a,
1754
- showToggle: a.showToggle,
1755
+ options: s,
1756
+ showToggle: s.showToggle,
1755
1757
  ToggleComponent: r
1756
1758
  }
1757
1759
  ),
1758
- /* @__PURE__ */ R.jsx(
1760
+ /* @__PURE__ */ O.jsx(
1759
1761
  "div",
1760
1762
  {
1761
1763
  ref: u,
1762
1764
  style: {
1763
- ...Ve,
1764
- ...$t,
1765
- ...a.isAbsolute || l ? Bt : {},
1765
+ ...qe,
1766
+ ...Bt,
1767
+ ...s.isAbsolute || l ? kt : {},
1766
1768
  ...e ? {} : { backgroundColor: ye },
1767
- zIndex: a.swipeBarZIndex
1769
+ zIndex: s.swipeBarZIndex
1768
1770
  },
1769
1771
  className: e,
1770
1772
  children: t
@@ -1773,14 +1775,14 @@ function sr({
1773
1775
  ] });
1774
1776
  }
1775
1777
  export {
1776
- Ae as Overlay,
1777
- ir as SwipeBarBottom,
1778
- or as SwipeBarLeft,
1779
- nr as SwipeBarProvider,
1780
- sr as SwipeBarRight,
1781
- qt as ToggleBottom,
1782
- Qt as ToggleLeft,
1783
- Kt as ToggleRight,
1778
+ Ee as Overlay,
1779
+ ar as SwipeBarBottom,
1780
+ sr as SwipeBarLeft,
1781
+ or as SwipeBarProvider,
1782
+ cr as SwipeBarRight,
1783
+ Qt as ToggleBottom,
1784
+ Kt as ToggleLeft,
1785
+ tr as ToggleRight,
1784
1786
  le as useMediaQuery,
1785
- K as useSwipeBarContext
1787
+ J as useSwipeBarContext
1786
1788
  };