@ahoo-wang/fetcher-react 3.6.6 → 3.6.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,389 +1,477 @@
1
1
  var H = Object.defineProperty;
2
2
  var s = (r, e) => H(r, "name", { value: e, configurable: !0 });
3
- import { c as w } from "react/compiler-runtime";
4
- import { useRef as C, useEffect as I, useState as A, useCallback as _, useMemo as T, useReducer as X, useSyncExternalStore as Z, createContext as ee, useContext as te } from "react";
3
+ import { c as S } from "react/compiler-runtime";
4
+ import { useRef as L, useEffect as I, useState as A, useCallback as Q, useMemo as M, useReducer as X, useSyncExternalStore as Z, createContext as ee, useContext as te } from "react";
5
5
  import { jsx as V, Fragment as re } from "react/jsx-runtime";
6
6
  import { nameGenerator as ne } from "@ahoo-wang/fetcher-eventbus";
7
7
  import { produce as ce } from "immer";
8
8
  import { fetcherRegistrar as se, getFetcher as ue, JsonResultExtractor as oe } from "@ahoo-wang/fetcher";
9
- import { JsonEventStreamResultExtractor as ie } from "@ahoo-wang/fetcher-eventstream";
10
- function $(r) {
11
- const e = C(r);
9
+ import { JsonEventStreamResultExtractor as le } from "@ahoo-wang/fetcher-eventstream";
10
+ function O(r) {
11
+ const e = L(r);
12
12
  return e.current = r, e;
13
13
  }
14
- s($, "useLatest");
15
- function M(r, e) {
16
- const t = w(19);
14
+ s(O, "useLatest");
15
+ function D(r, e) {
16
+ const t = S(19);
17
17
  if (e.leading === !1 && e.trailing === !1)
18
18
  throw new Error("useDebouncedCallback: at least one of leading or trailing must be true");
19
- const n = C(void 0), l = C(null), u = C(null), c = $(r), a = $(e);
19
+ const n = L(void 0), u = L(null), l = L(null), c = O(r), f = O(e);
20
20
  let o;
21
21
  t[0] === Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ s(() => {
22
22
  n.current !== void 0 && (clearTimeout(n.current), n.current = void 0);
23
23
  }, "t0"), t[0] = o) : o = t[0];
24
24
  const y = o;
25
- let f;
26
- t[1] !== a ? (f = /* @__PURE__ */ s((F) => u.current ? F - u.current >= a.current.delay : !0, "t1"), t[1] = a, t[2] = f) : f = t[2];
27
- const i = f;
25
+ let a;
26
+ t[1] !== f ? (a = /* @__PURE__ */ s((_) => l.current ? _ - l.current >= f.current.delay : !0, "t1"), t[1] = f, t[2] = a) : a = t[2];
27
+ const i = a;
28
28
  let d;
29
- t[3] !== c ? (d = /* @__PURE__ */ s((F, O) => {
30
- u.current = F, c.current(...O);
29
+ t[3] !== c ? (d = /* @__PURE__ */ s((_, q) => {
30
+ l.current = _, c.current(...q);
31
31
  }, "t2"), t[3] = c, t[4] = d) : d = t[4];
32
32
  const m = d;
33
- let b;
34
- t[5] !== m || t[6] !== a ? (b = /* @__PURE__ */ s(() => {
33
+ let h;
34
+ t[5] !== m || t[6] !== f ? (h = /* @__PURE__ */ s(() => {
35
35
  n.current = setTimeout(() => {
36
- if (l.current) {
37
- const F = Date.now();
38
- m(F, l.current);
36
+ if (u.current) {
37
+ const _ = Date.now();
38
+ m(_, u.current);
39
39
  }
40
40
  n.current = void 0;
41
- }, a.current.delay);
42
- }, "t3"), t[5] = m, t[6] = a, t[7] = b) : b = t[7];
43
- const x = b;
44
- let g;
45
- t[8] !== m || t[9] !== a || t[10] !== x || t[11] !== i ? (g = /* @__PURE__ */ s((...F) => {
46
- const O = F;
41
+ }, f.current.delay);
42
+ }, "t3"), t[5] = m, t[6] = f, t[7] = h) : h = t[7];
43
+ const g = h;
44
+ let E;
45
+ t[8] !== m || t[9] !== f || t[10] !== g || t[11] !== i ? (E = /* @__PURE__ */ s((..._) => {
46
+ const q = _;
47
47
  y();
48
48
  const {
49
- leading: k,
50
- trailing: z
51
- } = a.current, G = k === void 0 ? !1 : k, K = z === void 0 ? !0 : z;
52
- if (l.current = O, K && !G) {
53
- x();
49
+ leading: U,
50
+ trailing: k
51
+ } = f.current, G = U === void 0 ? !1 : U, K = k === void 0 ? !0 : k;
52
+ if (u.current = q, K && !G) {
53
+ g();
54
54
  return;
55
55
  }
56
56
  const N = Date.now();
57
57
  if (G && i(N)) {
58
- m(N, O);
58
+ m(N, q);
59
59
  return;
60
60
  }
61
- K && x();
62
- }, "t4"), t[8] = m, t[9] = a, t[10] = x, t[11] = i, t[12] = g) : g = t[12];
63
- const h = g;
64
- let E;
65
- t[13] === Symbol.for("react.memo_cache_sentinel") ? (E = /* @__PURE__ */ s(() => {
66
- y(), l.current = null;
67
- }, "t5"), t[13] = E) : E = t[13];
68
- const v = E;
69
- let Q;
70
- t[14] === Symbol.for("react.memo_cache_sentinel") ? (Q = /* @__PURE__ */ s(() => n.current !== void 0, "t6"), t[14] = Q) : Q = t[14];
71
- const S = Q;
72
- let R, q;
61
+ K && g();
62
+ }, "t4"), t[8] = m, t[9] = f, t[10] = g, t[11] = i, t[12] = E) : E = t[12];
63
+ const b = E;
64
+ let x;
65
+ t[13] === Symbol.for("react.memo_cache_sentinel") ? (x = /* @__PURE__ */ s(() => {
66
+ y(), u.current = null;
67
+ }, "t5"), t[13] = x) : x = t[13];
68
+ const F = x;
69
+ let v;
70
+ t[14] === Symbol.for("react.memo_cache_sentinel") ? (v = /* @__PURE__ */ s(() => n.current !== void 0, "t6"), t[14] = v) : v = t[14];
71
+ const w = v;
72
+ let R, C;
73
73
  t[15] === Symbol.for("react.memo_cache_sentinel") ? (R = /* @__PURE__ */ s(() => () => {
74
- v();
75
- }, "t7"), q = [v], t[15] = R, t[16] = q) : (R = t[15], q = t[16]), I(R, q);
76
- let L;
77
- return t[17] !== h ? (L = {
78
- run: h,
79
- cancel: v,
80
- isPending: S
81
- }, t[17] = h, t[18] = L) : L = t[18], L;
74
+ F();
75
+ }, "t7"), C = [F], t[15] = R, t[16] = C) : (R = t[15], C = t[16]), I(R, C);
76
+ let $;
77
+ return t[17] !== b ? ($ = {
78
+ run: b,
79
+ cancel: F,
80
+ isPending: w
81
+ }, t[17] = b, t[18] = $) : $ = t[18], $;
82
82
  }
83
- s(M, "useDebouncedCallback");
83
+ s(D, "useDebouncedCallback");
84
84
  function W() {
85
- const r = w(3), e = C(!1);
85
+ const r = S(3), e = L(!1);
86
86
  let t;
87
87
  r[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ s(() => e.current, "t0"), r[0] = t) : t = r[0];
88
88
  const n = t;
89
- let l, u;
90
- return r[1] === Symbol.for("react.memo_cache_sentinel") ? (l = /* @__PURE__ */ s(() => (e.current = !0, () => {
89
+ let u, l;
90
+ return r[1] === Symbol.for("react.memo_cache_sentinel") ? (u = /* @__PURE__ */ s(() => (e.current = !0, () => {
91
91
  e.current = !1;
92
- }), "t1"), u = [], r[1] = l, r[2] = u) : (l = r[1], u = r[2]), I(l, u), n;
92
+ }), "t1"), l = [], r[1] = u, r[2] = l) : (u = r[1], l = r[2]), I(u, l), n;
93
93
  }
94
94
  s(W, "useMounted");
95
- var le = /* @__PURE__ */ ((r) => (r.IDLE = "idle", r.LOADING = "loading", r.SUCCESS = "success", r.ERROR = "error", r))(le || {});
95
+ var ie = /* @__PURE__ */ ((r) => (r.IDLE = "idle", r.LOADING = "loading", r.SUCCESS = "success", r.ERROR = "error", r))(ie || {});
96
96
  function ae(r) {
97
97
  const [e, t] = A(
98
98
  r?.initialStatus ?? "idle"
99
99
  /* IDLE */
100
- ), [n, l] = A(void 0), [u, c] = A(void 0), a = W(), o = $(r), y = _(() => {
101
- a() && (t(
100
+ ), [n, u] = A(void 0), [l, c] = A(void 0), f = W(), o = O(r), y = Q(() => {
101
+ f() && (t(
102
102
  "loading"
103
103
  /* LOADING */
104
104
  ), c(void 0));
105
- }, [a]), f = _(async (m) => {
106
- if (a()) {
107
- l(m), t(
105
+ }, [f]), a = Q(async (m) => {
106
+ if (f()) {
107
+ u(m), t(
108
108
  "success"
109
109
  /* SUCCESS */
110
110
  ), c(void 0);
111
111
  try {
112
112
  await o.current?.onSuccess?.(m);
113
- } catch (b) {
114
- console.warn("PromiseState onSuccess callback error:", b);
113
+ } catch (h) {
114
+ console.warn("PromiseState onSuccess callback error:", h);
115
115
  }
116
116
  }
117
- }, [a, o]), i = _(async (m) => {
118
- if (a()) {
117
+ }, [f, o]), i = Q(async (m) => {
118
+ if (f()) {
119
119
  c(m), t(
120
120
  "error"
121
121
  /* ERROR */
122
- ), l(void 0);
122
+ ), u(void 0);
123
123
  try {
124
124
  await o.current?.onError?.(m);
125
- } catch (b) {
126
- console.warn("PromiseState onError callback error:", b);
125
+ } catch (h) {
126
+ console.warn("PromiseState onError callback error:", h);
127
127
  }
128
128
  }
129
- }, [a, o]), d = _(() => {
130
- a() && (t(
129
+ }, [f, o]), d = Q(() => {
130
+ f() && (t(
131
131
  "idle"
132
132
  /* IDLE */
133
- ), c(void 0), l(void 0));
134
- }, [a]);
135
- return T(() => ({
133
+ ), c(void 0), u(void 0));
134
+ }, [f]);
135
+ return M(() => ({
136
136
  status: e,
137
137
  loading: e === "loading",
138
138
  result: n,
139
- error: u,
139
+ error: l,
140
140
  setLoading: y,
141
- setSuccess: f,
141
+ setSuccess: a,
142
142
  setError: i,
143
143
  setIdle: d
144
- }), [e, n, u, y, f, i, d]);
144
+ }), [e, n, l, y, a, i, d]);
145
145
  }
146
146
  s(ae, "usePromiseState");
147
147
  function fe() {
148
- const r = w(6), e = C(0);
148
+ const r = S(6), e = L(0);
149
149
  let t;
150
150
  r[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ s(() => e.current = e.current + 1, "t0"), r[0] = t) : t = r[0];
151
151
  const n = t;
152
- let l;
153
- r[1] === Symbol.for("react.memo_cache_sentinel") ? (l = /* @__PURE__ */ s(() => e.current, "t1"), r[1] = l) : l = r[1];
154
- const u = l;
152
+ let u;
153
+ r[1] === Symbol.for("react.memo_cache_sentinel") ? (u = /* @__PURE__ */ s(() => e.current, "t1"), r[1] = u) : u = r[1];
154
+ const l = u;
155
155
  let c;
156
156
  r[2] === Symbol.for("react.memo_cache_sentinel") ? (c = /* @__PURE__ */ s((m) => m === e.current, "t2"), r[2] = c) : c = r[2];
157
- const a = c;
157
+ const f = c;
158
158
  let o;
159
159
  r[3] === Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ s(() => {
160
160
  e.current = e.current + 1;
161
161
  }, "t3"), r[3] = o) : o = r[3];
162
162
  const y = o;
163
- let f;
164
- r[4] === Symbol.for("react.memo_cache_sentinel") ? (f = /* @__PURE__ */ s(() => {
163
+ let a;
164
+ r[4] === Symbol.for("react.memo_cache_sentinel") ? (a = /* @__PURE__ */ s(() => {
165
165
  e.current = 0;
166
- }, "t4"), r[4] = f) : f = r[4];
167
- const i = f;
166
+ }, "t4"), r[4] = a) : a = r[4];
167
+ const i = a;
168
168
  let d;
169
169
  return r[5] === Symbol.for("react.memo_cache_sentinel") ? (d = {
170
170
  generate: n,
171
- current: u,
172
- isLatest: a,
171
+ current: l,
172
+ isLatest: f,
173
173
  invalidate: y,
174
174
  reset: i
175
175
  }, r[5] = d) : d = r[5], d;
176
176
  }
177
177
  s(fe, "useRequestId");
178
- function U(r) {
178
+ function T(r) {
179
179
  const {
180
180
  loading: e,
181
181
  result: t,
182
182
  error: n,
183
- status: l,
184
- setLoading: u,
183
+ status: u,
184
+ setLoading: l,
185
185
  setSuccess: c,
186
- setError: a,
186
+ setError: f,
187
187
  setIdle: o
188
- } = ae(r), y = W(), f = fe(), i = C(void 0), d = r?.propagateError, m = $(r?.onAbort), b = _(async () => {
188
+ } = ae(r), y = W(), a = fe(), i = L(void 0), d = r?.propagateError, m = O(r?.onAbort), h = Q(async () => {
189
189
  try {
190
190
  await m.current?.();
191
- } catch (E) {
192
- console.warn("useExecutePromise onAbort callback error:", E);
191
+ } catch (x) {
192
+ console.warn("useExecutePromise onAbort callback error:", x);
193
193
  }
194
- }, [m]), x = _(async (E) => {
195
- i.current && (i.current.abort(), await b());
196
- const v = new AbortController();
197
- i.current = v;
198
- const Q = f.generate();
199
- u();
194
+ }, [m]), g = Q(async (x) => {
195
+ i.current && (i.current.abort(), await h());
196
+ const F = new AbortController();
197
+ i.current = F;
198
+ const v = a.generate();
199
+ l();
200
200
  try {
201
- const S = await E(v);
202
- y() && f.isLatest(Q) && await c(S);
203
- } catch (S) {
204
- if (S instanceof Error && S.name === "AbortError") {
201
+ const w = await x(F);
202
+ y() && a.isLatest(v) && await c(w);
203
+ } catch (w) {
204
+ if (w instanceof Error && w.name === "AbortError") {
205
205
  y() && o();
206
206
  return;
207
207
  }
208
- if (y() && f.isLatest(Q) && await a(S), d)
209
- throw S;
208
+ if (y() && a.isLatest(v) && await f(w), d)
209
+ throw w;
210
210
  } finally {
211
- i.current === v && (i.current = void 0);
211
+ i.current === F && (i.current = void 0);
212
212
  }
213
- }, [u, c, a, o, y, f, d, b]), g = _(() => {
213
+ }, [l, c, f, o, y, a, d, h]), E = Q(() => {
214
214
  y() && o();
215
- }, [o, y]), h = _(async () => {
216
- g(), i.current && (i.current.abort(), i.current = void 0, await b());
217
- }, [g, b]);
215
+ }, [o, y]), b = Q(async () => {
216
+ E(), i.current && (i.current.abort(), i.current = void 0, await h());
217
+ }, [E, h]);
218
218
  return I(() => () => {
219
- h();
220
- }, [h]), T(() => ({
219
+ b();
220
+ }, [b]), M(() => ({
221
221
  loading: e,
222
222
  result: t,
223
223
  error: n,
224
- status: l,
225
- execute: x,
226
- reset: g,
227
- abort: h
228
- }), [e, t, n, l, x, g, h]);
224
+ status: u,
225
+ execute: g,
226
+ reset: E,
227
+ abort: b
228
+ }), [e, t, n, u, g, E, b]);
229
229
  }
230
- s(U, "useExecutePromise");
231
- function Re(r) {
232
- const e = w(10), {
230
+ s(T, "useExecutePromise");
231
+ function Oe(r) {
232
+ const e = S(10), {
233
233
  loading: t,
234
234
  result: n,
235
- error: l,
236
- execute: u,
235
+ error: u,
236
+ execute: l,
237
237
  reset: c,
238
- abort: a,
238
+ abort: f,
239
239
  status: o
240
- } = U(r), {
240
+ } = T(r), {
241
241
  run: y,
242
- cancel: f,
242
+ cancel: a,
243
243
  isPending: i
244
- } = M(u, r.debounce);
244
+ } = D(l, r.debounce);
245
245
  let d;
246
- return e[0] !== a || e[1] !== f || e[2] !== l || e[3] !== i || e[4] !== t || e[5] !== c || e[6] !== n || e[7] !== y || e[8] !== o ? (d = {
246
+ return e[0] !== f || e[1] !== a || e[2] !== u || e[3] !== i || e[4] !== t || e[5] !== c || e[6] !== n || e[7] !== y || e[8] !== o ? (d = {
247
247
  loading: t,
248
248
  result: n,
249
- error: l,
249
+ error: u,
250
250
  status: o,
251
251
  reset: c,
252
- abort: a,
252
+ abort: f,
253
253
  run: y,
254
- cancel: f,
254
+ cancel: a,
255
255
  isPending: i
256
- }, e[0] = a, e[1] = f, e[2] = l, e[3] = i, e[4] = t, e[5] = c, e[6] = n, e[7] = y, e[8] = o, e[9] = d) : d = e[9], d;
256
+ }, e[0] = f, e[1] = a, e[2] = u, e[3] = i, e[4] = t, e[5] = c, e[6] = n, e[7] = y, e[8] = o, e[9] = d) : d = e[9], d;
257
257
  }
258
- s(Re, "useDebouncedExecutePromise");
259
- function Fe(r) {
260
- const e = w(22), t = r.autoExecute;
258
+ s(Oe, "useDebouncedExecutePromise");
259
+ function $e(r) {
260
+ const e = S(22), t = r.autoExecute;
261
261
  let n;
262
262
  e[0] !== r ? (n = {
263
263
  ...r,
264
264
  autoExecute: !1
265
265
  }, e[0] = r, e[1] = n) : n = e[1];
266
- const l = n, {
267
- loading: u,
266
+ const u = n, {
267
+ loading: l,
268
268
  result: c,
269
- error: a,
269
+ error: f,
270
270
  status: o,
271
271
  execute: y,
272
- reset: f,
272
+ reset: a,
273
273
  abort: i,
274
274
  getQuery: d,
275
275
  setQuery: m
276
- } = p(l), {
277
- run: b,
278
- cancel: x,
279
- isPending: g
280
- } = M(y, r.debounce);
281
- let h;
282
- e[2] !== t || e[3] !== b || e[4] !== m ? (h = /* @__PURE__ */ s((R) => {
283
- m(R), t && b();
284
- }, "t1"), e[2] = t, e[3] = b, e[4] = m, e[5] = h) : h = e[5];
285
- const E = h;
286
- let v, Q;
287
- e[6] !== t || e[7] !== b ? (v = /* @__PURE__ */ s(() => {
288
- t && b();
289
- }, "t2"), Q = [b, t], e[6] = t, e[7] = b, e[8] = v, e[9] = Q) : (v = e[8], Q = e[9]), I(v, Q);
290
- let S;
291
- return e[10] !== i || e[11] !== x || e[12] !== a || e[13] !== d || e[14] !== g || e[15] !== u || e[16] !== f || e[17] !== c || e[18] !== b || e[19] !== E || e[20] !== o ? (S = {
292
- loading: u,
276
+ } = p(u), {
277
+ run: h,
278
+ cancel: g,
279
+ isPending: E
280
+ } = D(y, r.debounce);
281
+ let b;
282
+ e[2] !== t || e[3] !== h || e[4] !== m ? (b = /* @__PURE__ */ s((R) => {
283
+ m(R), t && h();
284
+ }, "t1"), e[2] = t, e[3] = h, e[4] = m, e[5] = b) : b = e[5];
285
+ const x = b;
286
+ let F, v;
287
+ e[6] !== t || e[7] !== h ? (F = /* @__PURE__ */ s(() => {
288
+ t && h();
289
+ }, "t2"), v = [h, t], e[6] = t, e[7] = h, e[8] = F, e[9] = v) : (F = e[8], v = e[9]), I(F, v);
290
+ let w;
291
+ return e[10] !== i || e[11] !== g || e[12] !== f || e[13] !== d || e[14] !== E || e[15] !== l || e[16] !== a || e[17] !== c || e[18] !== h || e[19] !== x || e[20] !== o ? (w = {
292
+ loading: l,
293
293
  result: c,
294
- error: a,
294
+ error: f,
295
295
  status: o,
296
- reset: f,
296
+ reset: a,
297
297
  abort: i,
298
298
  getQuery: d,
299
- setQuery: E,
300
- run: b,
301
- cancel: x,
302
- isPending: g
303
- }, e[10] = i, e[11] = x, e[12] = a, e[13] = d, e[14] = g, e[15] = u, e[16] = f, e[17] = c, e[18] = b, e[19] = E, e[20] = o, e[21] = S) : S = e[21], S;
299
+ setQuery: x,
300
+ run: h,
301
+ cancel: g,
302
+ isPending: E
303
+ }, e[10] = i, e[11] = g, e[12] = f, e[13] = d, e[14] = E, e[15] = l, e[16] = a, e[17] = c, e[18] = h, e[19] = x, e[20] = o, e[21] = w) : w = e[21], w;
304
+ }
305
+ s($e, "useDebouncedQuery");
306
+ function de() {
307
+ return document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement;
308
+ }
309
+ s(de, "getFullscreenElement");
310
+ async function me(r) {
311
+ try {
312
+ if (r.requestFullscreen)
313
+ await r.requestFullscreen();
314
+ else if (r.webkitRequestFullscreen)
315
+ await r.webkitRequestFullscreen();
316
+ else if (r.mozRequestFullScreen)
317
+ await r.mozRequestFullScreen();
318
+ else if (r.msRequestFullscreen)
319
+ await r.msRequestFullscreen();
320
+ else
321
+ throw new Error("Fullscreen API not supported");
322
+ } catch (e) {
323
+ throw console.error("Failed to enter fullscreen:", e), e;
324
+ }
325
+ }
326
+ s(me, "enterFullscreen");
327
+ async function ye() {
328
+ try {
329
+ if (document.exitFullscreen)
330
+ await document.exitFullscreen();
331
+ else if (document.webkitExitFullscreen)
332
+ await document.webkitExitFullscreen();
333
+ else if (document.mozCancelFullScreen)
334
+ await document.mozCancelFullScreen();
335
+ else if (document.msExitFullscreen)
336
+ await document.msExitFullscreen();
337
+ else
338
+ throw new Error("Fullscreen API not supported");
339
+ } catch (r) {
340
+ throw console.error("Failed to exit fullscreen:", r), r;
341
+ }
304
342
  }
305
- s(Fe, "useDebouncedQuery");
306
- function Oe() {
307
- const r = C(/* @__PURE__ */ new Map()), e = _((i) => r.current.get(i), []), t = _((i, d) => r.current.set(i, d), []), n = _((i) => r.current.has(i), []), l = _((i) => r.current.delete(i), []), u = _(() => r.current.clear(), []), c = _(() => r.current.keys(), []), a = _(() => r.current.values(), []), o = _(() => r.current.entries(), []), y = _(() => r.current[Symbol.iterator](), []), f = _((i) => (d) => {
343
+ s(ye, "exitFullscreen");
344
+ function he(r) {
345
+ document.addEventListener("fullscreenchange", r), document.addEventListener("webkitfullscreenchange", r), document.addEventListener("mozfullscreenchange", r), document.addEventListener("MSFullscreenChange", r);
346
+ }
347
+ s(he, "addFullscreenChangeListener");
348
+ function ge(r) {
349
+ document.removeEventListener("fullscreenchange", r), document.removeEventListener("webkitfullscreenchange", r), document.removeEventListener("mozfullscreenchange", r), document.removeEventListener("MSFullscreenChange", r);
350
+ }
351
+ s(ge, "removeFullscreenChangeListener");
352
+ function pe(r) {
353
+ const e = S(18);
354
+ let t;
355
+ e[0] !== r ? (t = r === void 0 ? {} : r, e[0] = r, e[1] = t) : t = e[1];
356
+ const n = t, {
357
+ target: u,
358
+ onChange: l
359
+ } = n, [c, f] = A(!1);
360
+ let o;
361
+ e[2] !== c || e[3] !== l || e[4] !== u ? (o = /* @__PURE__ */ s(() => {
362
+ const F = de() === (u?.current || document.documentElement);
363
+ F !== c && (f(F), l?.(F));
364
+ }, "t2"), e[2] = c, e[3] = l, e[4] = u, e[5] = o) : o = e[5];
365
+ const y = o;
366
+ let a, i;
367
+ e[6] !== y ? (a = /* @__PURE__ */ s(() => (he(y), () => {
368
+ ge(y);
369
+ }), "t3"), i = [y], e[6] = y, e[7] = a, e[8] = i) : (a = e[7], i = e[8]), I(a, i);
370
+ let d;
371
+ e[9] !== u ? (d = /* @__PURE__ */ s(async () => {
372
+ const x = u?.current || document.documentElement;
373
+ await me(x);
374
+ }, "t5"), e[9] = u, e[10] = d) : d = e[10];
375
+ const m = d, h = be;
376
+ let g;
377
+ e[11] !== m || e[12] !== c ? (g = /* @__PURE__ */ s(async () => {
378
+ c ? await h() : await m();
379
+ }, "t6"), e[11] = m, e[12] = c, e[13] = g) : g = e[13];
380
+ const E = g;
381
+ let b;
382
+ return e[14] !== m || e[15] !== c || e[16] !== E ? (b = {
383
+ isFullscreen: c,
384
+ toggle: E,
385
+ enter: m,
386
+ exit: h
387
+ }, e[14] = m, e[15] = c, e[16] = E, e[17] = b) : b = e[17], b;
388
+ }
389
+ s(pe, "useFullscreen");
390
+ async function be() {
391
+ await ye();
392
+ }
393
+ s(be, "_temp$1");
394
+ function Pe() {
395
+ const r = L(/* @__PURE__ */ new Map()), e = Q((i) => r.current.get(i), []), t = Q((i, d) => r.current.set(i, d), []), n = Q((i) => r.current.has(i), []), u = Q((i) => r.current.delete(i), []), l = Q(() => r.current.clear(), []), c = Q(() => r.current.keys(), []), f = Q(() => r.current.values(), []), o = Q(() => r.current.entries(), []), y = Q(() => r.current[Symbol.iterator](), []), a = Q((i) => (d) => {
308
396
  d ? r.current.set(i, d) : r.current.delete(i);
309
397
  }, []);
310
398
  return I(() => () => {
311
399
  r.current.clear();
312
- }, []), T(() => ({
313
- register: f,
400
+ }, []), M(() => ({
401
+ register: a,
314
402
  get: e,
315
403
  set: t,
316
404
  has: n,
317
- delete: l,
318
- clear: u,
405
+ delete: u,
406
+ clear: l,
319
407
  keys: c,
320
- values: a,
408
+ values: f,
321
409
  entries: o,
322
410
  get size() {
323
411
  return r.current.size;
324
412
  },
325
413
  [Symbol.iterator]: y
326
- }), [f, e, t, n, l, u, c, a, o, y]);
414
+ }), [a, e, t, n, u, l, c, f, o, y]);
327
415
  }
328
- s(Oe, "useRefs");
329
- function qe() {
330
- const [, r] = X(de, 0);
416
+ s(Pe, "useRefs");
417
+ function Ae() {
418
+ const [, r] = X(Ee, 0);
331
419
  return r;
332
420
  }
333
- s(qe, "useForceUpdate");
334
- function de(r) {
421
+ s(Ae, "useForceUpdate");
422
+ function Ee(r) {
335
423
  return r + 1;
336
424
  }
337
- s(de, "_temp");
425
+ s(Ee, "_temp");
338
426
  function j(r) {
339
- const e = w(12), {
427
+ const e = S(12), {
340
428
  initialQuery: t,
341
429
  query: n,
342
- autoExecute: l,
343
- execute: u
344
- } = r, c = l === void 0 ? !0 : l, o = C(n ?? t);
430
+ autoExecute: u,
431
+ execute: l
432
+ } = r, c = u === void 0 ? !0 : u, o = L(n ?? t);
345
433
  let y;
346
434
  e[0] === Symbol.for("react.memo_cache_sentinel") ? (y = /* @__PURE__ */ s(() => o.current, "t1"), e[0] = y) : y = e[0];
347
- const f = y;
435
+ const a = y;
348
436
  let i;
349
- e[1] !== c || e[2] !== u ? (i = /* @__PURE__ */ s(() => {
350
- const E = f();
351
- c && D(E) && u(E);
352
- }, "t2"), e[1] = c, e[2] = u, e[3] = i) : i = e[3];
437
+ e[1] !== c || e[2] !== l ? (i = /* @__PURE__ */ s(() => {
438
+ const x = a();
439
+ c && z(x) && l(x);
440
+ }, "t2"), e[1] = c, e[2] = l, e[3] = i) : i = e[3];
353
441
  const d = i;
354
442
  let m;
355
- e[4] !== d ? (m = /* @__PURE__ */ s((E) => {
356
- o.current = E, d();
443
+ e[4] !== d ? (m = /* @__PURE__ */ s((x) => {
444
+ o.current = x, d();
357
445
  }, "t3"), e[4] = d, e[5] = m) : m = e[5];
358
- const b = m;
359
- let x, g;
360
- e[6] !== d || e[7] !== n ? (x = /* @__PURE__ */ s(() => {
361
- D(n) && (o.current = n), d();
362
- }, "t4"), g = [d, n], e[6] = d, e[7] = n, e[8] = x, e[9] = g) : (x = e[8], g = e[9]), I(x, g);
363
- let h;
364
- return e[10] !== b ? (h = {
365
- getQuery: f,
366
- setQuery: b
367
- }, e[10] = b, e[11] = h) : h = e[11], h;
446
+ const h = m;
447
+ let g, E;
448
+ e[6] !== d || e[7] !== n ? (g = /* @__PURE__ */ s(() => {
449
+ z(n) && (o.current = n), d();
450
+ }, "t4"), E = [d, n], e[6] = d, e[7] = n, e[8] = g, e[9] = E) : (g = e[8], E = e[9]), I(g, E);
451
+ let b;
452
+ return e[10] !== h ? (b = {
453
+ getQuery: a,
454
+ setQuery: h
455
+ }, e[10] = h, e[11] = b) : b = e[11], b;
368
456
  }
369
457
  s(j, "useQueryState");
370
- function D(r) {
458
+ function z(r) {
371
459
  return r !== void 0;
372
460
  }
373
- s(D, "isValidateQuery");
461
+ s(z, "isValidateQuery");
374
462
  function p(r) {
375
- const e = w(21), t = $(r), {
463
+ const e = S(21), t = O(r), {
376
464
  loading: n,
377
- result: l,
378
- error: u,
465
+ result: u,
466
+ error: l,
379
467
  status: c,
380
- execute: a,
468
+ execute: f,
381
469
  reset: o,
382
470
  abort: y
383
- } = U(r);
384
- let f;
385
- e[0] !== t || e[1] !== a ? (f = /* @__PURE__ */ s((E) => a(/* @__PURE__ */ s(async (Q) => t.current.execute(E, t.current.attributes, Q), "queryExecutor")), "t0"), e[0] = t, e[1] = a, e[2] = f) : f = e[2];
386
- const i = f;
471
+ } = T(r);
472
+ let a;
473
+ e[0] !== t || e[1] !== f ? (a = /* @__PURE__ */ s((x) => f(/* @__PURE__ */ s(async (v) => t.current.execute(x, t.current.attributes, v), "queryExecutor")), "t0"), e[0] = t, e[1] = f, e[2] = a) : a = e[2];
474
+ const i = a;
387
475
  let d;
388
476
  e[3] !== i || e[4] !== r.autoExecute || e[5] !== r.initialQuery || e[6] !== r.query ? (d = {
389
477
  initialQuery: r.initialQuery,
@@ -393,430 +481,436 @@ function p(r) {
393
481
  }, e[3] = i, e[4] = r.autoExecute, e[5] = r.initialQuery, e[6] = r.query, e[7] = d) : d = e[7];
394
482
  const {
395
483
  getQuery: m,
396
- setQuery: b
484
+ setQuery: h
397
485
  } = j(d);
398
- let x;
399
- e[8] !== i || e[9] !== m ? (x = /* @__PURE__ */ s(async () => {
400
- const E = m();
401
- if (D(E))
402
- return await i(E);
403
- }, "t2"), e[8] = i, e[9] = m, e[10] = x) : x = e[10];
404
- const g = x;
405
- let h;
406
- return e[11] !== y || e[12] !== u || e[13] !== g || e[14] !== m || e[15] !== n || e[16] !== o || e[17] !== l || e[18] !== b || e[19] !== c ? (h = {
486
+ let g;
487
+ e[8] !== i || e[9] !== m ? (g = /* @__PURE__ */ s(async () => {
488
+ const x = m();
489
+ if (z(x))
490
+ return await i(x);
491
+ }, "t2"), e[8] = i, e[9] = m, e[10] = g) : g = e[10];
492
+ const E = g;
493
+ let b;
494
+ return e[11] !== y || e[12] !== l || e[13] !== E || e[14] !== m || e[15] !== n || e[16] !== o || e[17] !== u || e[18] !== h || e[19] !== c ? (b = {
407
495
  loading: n,
408
- result: l,
409
- error: u,
496
+ result: u,
497
+ error: l,
410
498
  status: c,
411
- execute: g,
499
+ execute: E,
412
500
  reset: o,
413
501
  abort: y,
414
502
  getQuery: m,
415
- setQuery: b
416
- }, e[11] = y, e[12] = u, e[13] = g, e[14] = m, e[15] = n, e[16] = o, e[17] = l, e[18] = b, e[19] = c, e[20] = h) : h = e[20], h;
503
+ setQuery: h
504
+ }, e[11] = y, e[12] = l, e[13] = E, e[14] = m, e[15] = n, e[16] = o, e[17] = u, e[18] = h, e[19] = c, e[20] = b) : b = e[20], b;
417
505
  }
418
506
  s(p, "useQuery");
419
507
  function J(r, e) {
420
- const t = w(13);
508
+ const t = S(13);
421
509
  let n;
422
510
  t[0] !== r ? (n = /* @__PURE__ */ s((m) => r.addListener({
423
511
  name: ne.generate("useKeyStorage"),
424
512
  handle: m
425
513
  }), "t0"), t[0] = r, t[1] = n) : n = t[1];
426
- const l = n;
427
- let u;
428
- t[2] !== e || t[3] !== r ? (u = /* @__PURE__ */ s(() => {
514
+ const u = n;
515
+ let l;
516
+ t[2] !== e || t[3] !== r ? (l = /* @__PURE__ */ s(() => {
429
517
  const m = r.get();
430
518
  return m !== null ? m : e ?? null;
431
- }, "t1"), t[2] = e, t[3] = r, t[4] = u) : u = t[4];
432
- const c = u, a = Z(l, c, c);
519
+ }, "t1"), t[2] = e, t[3] = r, t[4] = l) : l = t[4];
520
+ const c = l, f = Z(u, c, c);
433
521
  let o;
434
522
  t[5] !== r ? (o = /* @__PURE__ */ s((m) => r.set(m), "t2"), t[5] = r, t[6] = o) : o = t[6];
435
523
  const y = o;
436
- let f;
437
- t[7] !== r ? (f = /* @__PURE__ */ s(() => r.remove(), "t3"), t[7] = r, t[8] = f) : f = t[8];
438
- const i = f;
524
+ let a;
525
+ t[7] !== r ? (a = /* @__PURE__ */ s(() => r.remove(), "t3"), t[7] = r, t[8] = a) : a = t[8];
526
+ const i = a;
439
527
  let d;
440
- return t[9] !== i || t[10] !== y || t[11] !== a ? (d = [a, y, i], t[9] = i, t[10] = y, t[11] = a, t[12] = d) : d = t[12], d;
528
+ return t[9] !== i || t[10] !== y || t[11] !== f ? (d = [f, y, i], t[9] = i, t[10] = y, t[11] = f, t[12] = d) : d = t[12], d;
441
529
  }
442
530
  s(J, "useKeyStorage");
443
- function Ce(r, e) {
444
- const t = w(8), [n, l, u] = J(r, e);
531
+ function ze(r, e) {
532
+ const t = S(8), [n, u, l] = J(r, e);
445
533
  let c;
446
- t[0] !== u || t[1] !== l || t[2] !== n ? (c = /* @__PURE__ */ s((y) => {
447
- const f = ce(n, y);
448
- if (f === null) {
449
- u();
534
+ t[0] !== l || t[1] !== u || t[2] !== n ? (c = /* @__PURE__ */ s((y) => {
535
+ const a = ce(n, y);
536
+ if (a === null) {
537
+ l();
450
538
  return;
451
539
  }
452
- return l(f);
453
- }, "t0"), t[0] = u, t[1] = l, t[2] = n, t[3] = c) : c = t[3];
454
- const a = c;
540
+ return u(a);
541
+ }, "t0"), t[0] = l, t[1] = u, t[2] = n, t[3] = c) : c = t[3];
542
+ const f = c;
455
543
  let o;
456
- return t[4] !== u || t[5] !== a || t[6] !== n ? (o = [n, a, u], t[4] = u, t[5] = a, t[6] = n, t[7] = o) : o = t[7], o;
544
+ return t[4] !== l || t[5] !== f || t[6] !== n ? (o = [n, f, l], t[4] = l, t[5] = f, t[6] = n, t[7] = o) : o = t[7], o;
457
545
  }
458
- s(Ce, "useImmerKeyStorage");
459
- const me = {
546
+ s(ze, "useImmerKeyStorage");
547
+ const xe = {
460
548
  jti: "",
461
549
  sub: "anonymous",
462
550
  iat: 0,
463
551
  exp: 0
464
552
  };
465
- function ye(r, e) {
466
- const t = w(13);
553
+ function Fe(r, e) {
554
+ const t = S(13);
467
555
  let n;
468
556
  t[0] !== e ? (n = e === void 0 ? {} : e, t[0] = e, t[1] = n) : n = t[1];
469
- const l = n, [u, , c] = J(r), a = $(l);
557
+ const u = n, [l, , c] = J(r), f = O(u);
470
558
  let o;
471
- t[2] !== a || t[3] !== r ? (o = /* @__PURE__ */ s(async (x) => {
472
- const g = typeof x == "function" ? await x() : x;
473
- r.signIn(g), a.current.onSignIn?.();
474
- }, "t2"), t[2] = a, t[3] = r, t[4] = o) : o = t[4];
559
+ t[2] !== f || t[3] !== r ? (o = /* @__PURE__ */ s(async (g) => {
560
+ const E = typeof g == "function" ? await g() : g;
561
+ r.signIn(E), f.current.onSignIn?.();
562
+ }, "t2"), t[2] = f, t[3] = r, t[4] = o) : o = t[4];
475
563
  const y = o;
476
- let f;
477
- t[5] !== a || t[6] !== c ? (f = /* @__PURE__ */ s(() => {
478
- c(), a.current.onSignOut?.();
479
- }, "t3"), t[5] = a, t[6] = c, t[7] = f) : f = t[7];
480
- const i = f, d = u?.access?.payload ?? me, m = u?.authenticated ?? !1;
481
- let b;
482
- return t[8] !== y || t[9] !== i || t[10] !== d || t[11] !== m ? (b = {
564
+ let a;
565
+ t[5] !== f || t[6] !== c ? (a = /* @__PURE__ */ s(() => {
566
+ c(), f.current.onSignOut?.();
567
+ }, "t3"), t[5] = f, t[6] = c, t[7] = a) : a = t[7];
568
+ const i = a, d = l?.access?.payload ?? xe, m = l?.authenticated ?? !1;
569
+ let h;
570
+ return t[8] !== y || t[9] !== i || t[10] !== d || t[11] !== m ? (h = {
483
571
  currentUser: d,
484
572
  authenticated: m,
485
573
  signIn: y,
486
574
  signOut: i
487
- }, t[8] = y, t[9] = i, t[10] = d, t[11] = m, t[12] = b) : b = t[12], b;
575
+ }, t[8] = y, t[9] = i, t[10] = d, t[11] = m, t[12] = h) : h = t[12], h;
488
576
  }
489
- s(ye, "useSecurity");
577
+ s(Fe, "useSecurity");
490
578
  const Y = ee(void 0);
491
- function $e(r) {
492
- const e = w(7);
493
- let t, n, l;
579
+ function De(r) {
580
+ const e = S(7);
581
+ let t, n, u;
494
582
  e[0] !== r ? ({
495
583
  tokenStorage: n,
496
584
  children: t,
497
- ...l
498
- } = r, e[0] = r, e[1] = t, e[2] = n, e[3] = l) : (t = e[1], n = e[2], l = e[3]);
499
- const u = ye(n, l);
585
+ ...u
586
+ } = r, e[0] = r, e[1] = t, e[2] = n, e[3] = u) : (t = e[1], n = e[2], u = e[3]);
587
+ const l = Fe(n, u);
500
588
  let c;
501
- return e[4] !== t || e[5] !== u ? (c = /* @__PURE__ */ V(Y.Provider, { value: u, children: t }), e[4] = t, e[5] = u, e[6] = c) : c = e[6], c;
589
+ return e[4] !== t || e[5] !== l ? (c = /* @__PURE__ */ V(Y.Provider, { value: l, children: t }), e[4] = t, e[5] = l, e[6] = c) : c = e[6], c;
502
590
  }
503
- s($e, "SecurityProvider");
504
- function be() {
591
+ s(De, "SecurityProvider");
592
+ function ve() {
505
593
  const r = te(Y);
506
594
  if (!r)
507
595
  throw new Error("useSecurityContext must be used within a SecurityProvider");
508
596
  return r;
509
597
  }
510
- s(be, "useSecurityContext");
511
- function Ie(r) {
512
- const e = w(2), {
598
+ s(ve, "useSecurityContext");
599
+ function Me(r) {
600
+ const e = S(2), {
513
601
  children: t,
514
602
  fallback: n,
515
- onUnauthorized: l
603
+ onUnauthorized: u
516
604
  } = r, {
517
- authenticated: u
518
- } = be();
519
- if (u) {
605
+ authenticated: l
606
+ } = ve();
607
+ if (l) {
520
608
  let c;
521
609
  return e[0] !== t ? (c = /* @__PURE__ */ V(re, { children: t }), e[0] = t, e[1] = c) : c = e[1], c;
522
610
  }
523
- return l && l(), n;
611
+ return u && u(), n;
524
612
  }
525
- s(Ie, "RouteGuard");
613
+ s(Me, "RouteGuard");
526
614
  function B(r) {
527
- const e = w(21);
615
+ const e = S(21);
528
616
  let t;
529
617
  e[0] !== r ? (t = r || {}, e[0] = r, e[1] = t) : t = e[1];
530
618
  const {
531
619
  fetcher: n
532
- } = t, l = n === void 0 ? se.default : n, {
533
- loading: u,
620
+ } = t, u = n === void 0 ? se.default : n, {
621
+ loading: l,
534
622
  result: c,
535
- error: a,
623
+ error: f,
536
624
  status: o,
537
625
  execute: y,
538
- reset: f,
626
+ reset: a,
539
627
  abort: i
540
- } = U(r), [d, m] = A(void 0), b = $(r);
541
- let x;
542
- e[2] !== l ? (x = ue(l), e[2] = l, e[3] = x) : x = e[3];
543
- const g = x;
544
- let h;
545
- e[4] !== g || e[5] !== b || e[6] !== y ? (h = /* @__PURE__ */ s(async (L) => {
628
+ } = T(r), [d, m] = A(void 0), h = O(r);
629
+ let g;
630
+ e[2] !== u ? (g = ue(u), e[2] = u, e[3] = g) : g = e[3];
631
+ const E = g;
632
+ let b;
633
+ e[4] !== E || e[5] !== h || e[6] !== y ? (b = /* @__PURE__ */ s(async ($) => {
546
634
  try {
547
- await y(async (F) => {
548
- L.abortController = F;
549
- const O = await g.exchange(L, b.current);
550
- return m(O), await O.extractResult();
635
+ await y(async (_) => {
636
+ $.abortController = _;
637
+ const q = await E.exchange($, h.current);
638
+ return m(q), await q.extractResult();
551
639
  });
552
- } catch (F) {
553
- const O = F;
554
- throw m(void 0), O;
640
+ } catch (_) {
641
+ const q = _;
642
+ throw m(void 0), q;
555
643
  }
556
- }, "t3"), e[4] = g, e[5] = b, e[6] = y, e[7] = h) : h = e[7];
557
- const E = h;
558
- let v;
559
- e[8] !== f ? (v = /* @__PURE__ */ s(() => {
560
- f(), m(void 0);
561
- }, "t4"), e[8] = f, e[9] = v) : v = e[9];
562
- const Q = v;
563
- let S;
564
- e[10] !== i ? (S = /* @__PURE__ */ s(() => {
644
+ }, "t3"), e[4] = E, e[5] = h, e[6] = y, e[7] = b) : b = e[7];
645
+ const x = b;
646
+ let F;
647
+ e[8] !== a ? (F = /* @__PURE__ */ s(() => {
648
+ a(), m(void 0);
649
+ }, "t4"), e[8] = a, e[9] = F) : F = e[9];
650
+ const v = F;
651
+ let w;
652
+ e[10] !== i ? (w = /* @__PURE__ */ s(() => {
565
653
  i(), m(void 0);
566
- }, "t5"), e[10] = i, e[11] = S) : S = e[11];
567
- const R = S;
568
- let q;
569
- return e[12] !== R || e[13] !== a || e[14] !== d || e[15] !== E || e[16] !== u || e[17] !== Q || e[18] !== c || e[19] !== o ? (q = {
570
- loading: u,
654
+ }, "t5"), e[10] = i, e[11] = w) : w = e[11];
655
+ const R = w;
656
+ let C;
657
+ return e[12] !== R || e[13] !== f || e[14] !== d || e[15] !== x || e[16] !== l || e[17] !== v || e[18] !== c || e[19] !== o ? (C = {
658
+ loading: l,
571
659
  result: c,
572
- error: a,
660
+ error: f,
573
661
  status: o,
574
662
  exchange: d,
575
- execute: E,
576
- reset: Q,
663
+ execute: x,
664
+ reset: v,
577
665
  abort: R
578
- }, e[12] = R, e[13] = a, e[14] = d, e[15] = E, e[16] = u, e[17] = Q, e[18] = c, e[19] = o, e[20] = q) : q = e[20], q;
666
+ }, e[12] = R, e[13] = f, e[14] = d, e[15] = x, e[16] = l, e[17] = v, e[18] = c, e[19] = o, e[20] = C) : C = e[20], C;
579
667
  }
580
668
  s(B, "useFetcher");
581
- function Le(r) {
582
- const e = w(11), {
669
+ function Te(r) {
670
+ const e = S(11), {
583
671
  loading: t,
584
672
  result: n,
585
- error: l,
586
- status: u,
673
+ error: u,
674
+ status: l,
587
675
  exchange: c,
588
- execute: a,
676
+ execute: f,
589
677
  reset: o,
590
678
  abort: y
591
679
  } = B(r), {
592
- run: f,
680
+ run: a,
593
681
  cancel: i,
594
682
  isPending: d
595
- } = M(a, r.debounce);
683
+ } = D(f, r.debounce);
596
684
  let m;
597
- return e[0] !== y || e[1] !== i || e[2] !== l || e[3] !== c || e[4] !== d || e[5] !== t || e[6] !== o || e[7] !== n || e[8] !== f || e[9] !== u ? (m = {
685
+ return e[0] !== y || e[1] !== i || e[2] !== u || e[3] !== c || e[4] !== d || e[5] !== t || e[6] !== o || e[7] !== n || e[8] !== a || e[9] !== l ? (m = {
598
686
  loading: t,
599
687
  result: n,
600
- error: l,
601
- status: u,
688
+ error: u,
689
+ status: l,
602
690
  exchange: c,
603
691
  reset: o,
604
692
  abort: y,
605
- run: f,
693
+ run: a,
606
694
  cancel: i,
607
695
  isPending: d
608
- }, e[0] = y, e[1] = i, e[2] = l, e[3] = c, e[4] = d, e[5] = t, e[6] = o, e[7] = n, e[8] = f, e[9] = u, e[10] = m) : m = e[10], m;
696
+ }, e[0] = y, e[1] = i, e[2] = u, e[3] = c, e[4] = d, e[5] = t, e[6] = o, e[7] = n, e[8] = a, e[9] = l, e[10] = m) : m = e[10], m;
609
697
  }
610
- s(Le, "useDebouncedFetcher");
611
- function pe(r) {
612
- const e = w(22), t = r.autoExecute;
698
+ s(Te, "useDebouncedFetcher");
699
+ function Ue(r) {
700
+ const e = S(22), t = r.autoExecute;
613
701
  let n;
614
702
  e[0] !== r ? (n = {
615
703
  ...r,
616
704
  autoExecute: !1
617
705
  }, e[0] = r, e[1] = n) : n = e[1];
618
- const l = n, {
619
- loading: u,
706
+ const u = n, {
707
+ loading: l,
620
708
  result: c,
621
- error: a,
709
+ error: f,
622
710
  status: o,
623
711
  execute: y,
624
- reset: f,
712
+ reset: a,
625
713
  abort: i,
626
714
  getQuery: d,
627
715
  setQuery: m
628
- } = P(l), {
629
- run: b,
630
- cancel: x,
631
- isPending: g
632
- } = M(y, r.debounce);
633
- let h;
634
- e[2] !== t || e[3] !== b || e[4] !== m ? (h = /* @__PURE__ */ s((R) => {
635
- m(R), t && b();
636
- }, "t1"), e[2] = t, e[3] = b, e[4] = m, e[5] = h) : h = e[5];
637
- const E = h;
638
- let v, Q;
639
- e[6] !== t || e[7] !== b ? (v = /* @__PURE__ */ s(() => {
640
- t && b();
641
- }, "t2"), Q = [b, t], e[6] = t, e[7] = b, e[8] = v, e[9] = Q) : (v = e[8], Q = e[9]), I(v, Q);
642
- let S;
643
- return e[10] !== i || e[11] !== x || e[12] !== a || e[13] !== d || e[14] !== g || e[15] !== u || e[16] !== f || e[17] !== c || e[18] !== b || e[19] !== E || e[20] !== o ? (S = {
644
- loading: u,
716
+ } = P(u), {
717
+ run: h,
718
+ cancel: g,
719
+ isPending: E
720
+ } = D(y, r.debounce);
721
+ let b;
722
+ e[2] !== t || e[3] !== h || e[4] !== m ? (b = /* @__PURE__ */ s((R) => {
723
+ m(R), t && h();
724
+ }, "t1"), e[2] = t, e[3] = h, e[4] = m, e[5] = b) : b = e[5];
725
+ const x = b;
726
+ let F, v;
727
+ e[6] !== t || e[7] !== h ? (F = /* @__PURE__ */ s(() => {
728
+ t && h();
729
+ }, "t2"), v = [h, t], e[6] = t, e[7] = h, e[8] = F, e[9] = v) : (F = e[8], v = e[9]), I(F, v);
730
+ let w;
731
+ return e[10] !== i || e[11] !== g || e[12] !== f || e[13] !== d || e[14] !== E || e[15] !== l || e[16] !== a || e[17] !== c || e[18] !== h || e[19] !== x || e[20] !== o ? (w = {
732
+ loading: l,
645
733
  result: c,
646
- error: a,
734
+ error: f,
647
735
  status: o,
648
- reset: f,
736
+ reset: a,
649
737
  abort: i,
650
738
  getQuery: d,
651
- setQuery: E,
652
- run: b,
653
- cancel: x,
654
- isPending: g
655
- }, e[10] = i, e[11] = x, e[12] = a, e[13] = d, e[14] = g, e[15] = u, e[16] = f, e[17] = c, e[18] = b, e[19] = E, e[20] = o, e[21] = S) : S = e[21], S;
739
+ setQuery: x,
740
+ run: h,
741
+ cancel: g,
742
+ isPending: E
743
+ }, e[10] = i, e[11] = g, e[12] = f, e[13] = d, e[14] = E, e[15] = l, e[16] = a, e[17] = c, e[18] = h, e[19] = x, e[20] = o, e[21] = w) : w = e[21], w;
656
744
  }
657
- s(pe, "useDebouncedFetcherQuery");
745
+ s(Ue, "useDebouncedFetcherQuery");
658
746
  function P(r) {
659
- const e = w(23);
747
+ const e = S(23);
660
748
  let t;
661
749
  e[0] !== r ? (t = {
662
750
  resultExtractor: oe,
663
751
  ...r
664
752
  }, e[0] = r, e[1] = t) : t = e[1];
665
- const n = t, l = $(n), {
666
- loading: u,
753
+ const n = t, u = O(n), {
754
+ loading: l,
667
755
  result: c,
668
- error: a,
756
+ error: f,
669
757
  status: o,
670
758
  execute: y,
671
- reset: f,
759
+ reset: a,
672
760
  abort: i
673
761
  } = B(n);
674
762
  let d;
675
- e[2] !== y || e[3] !== l ? (d = /* @__PURE__ */ s((Q) => {
676
- const S = {
677
- url: l.current.url,
763
+ e[2] !== y || e[3] !== u ? (d = /* @__PURE__ */ s((v) => {
764
+ const w = {
765
+ url: u.current.url,
678
766
  method: "POST",
679
- body: Q
767
+ body: v
680
768
  };
681
- return y(S);
682
- }, "t1"), e[2] = y, e[3] = l, e[4] = d) : d = e[4];
769
+ return y(w);
770
+ }, "t1"), e[2] = y, e[3] = u, e[4] = d) : d = e[4];
683
771
  const m = d;
684
- let b;
685
- e[5] !== m || e[6] !== n.autoExecute || e[7] !== n.initialQuery || e[8] !== n.query ? (b = {
772
+ let h;
773
+ e[5] !== m || e[6] !== n.autoExecute || e[7] !== n.initialQuery || e[8] !== n.query ? (h = {
686
774
  initialQuery: n.initialQuery,
687
775
  query: n.query,
688
776
  autoExecute: n.autoExecute,
689
777
  execute: m
690
- }, e[5] = m, e[6] = n.autoExecute, e[7] = n.initialQuery, e[8] = n.query, e[9] = b) : b = e[9];
778
+ }, e[5] = m, e[6] = n.autoExecute, e[7] = n.initialQuery, e[8] = n.query, e[9] = h) : h = e[9];
691
779
  const {
692
- getQuery: x,
693
- setQuery: g
694
- } = j(b);
695
- let h;
696
- e[10] !== m || e[11] !== x ? (h = /* @__PURE__ */ s(async () => {
697
- const Q = x();
698
- if (D(Q))
699
- return await m(Q);
700
- }, "t3"), e[10] = m, e[11] = x, e[12] = h) : h = e[12];
701
- const E = h;
702
- let v;
703
- return e[13] !== i || e[14] !== a || e[15] !== E || e[16] !== x || e[17] !== u || e[18] !== f || e[19] !== c || e[20] !== g || e[21] !== o ? (v = {
704
- loading: u,
780
+ getQuery: g,
781
+ setQuery: E
782
+ } = j(h);
783
+ let b;
784
+ e[10] !== m || e[11] !== g ? (b = /* @__PURE__ */ s(async () => {
785
+ const v = g();
786
+ if (z(v))
787
+ return await m(v);
788
+ }, "t3"), e[10] = m, e[11] = g, e[12] = b) : b = e[12];
789
+ const x = b;
790
+ let F;
791
+ return e[13] !== i || e[14] !== f || e[15] !== x || e[16] !== g || e[17] !== l || e[18] !== a || e[19] !== c || e[20] !== E || e[21] !== o ? (F = {
792
+ loading: l,
705
793
  result: c,
706
- error: a,
794
+ error: f,
707
795
  status: o,
708
- execute: E,
709
- reset: f,
796
+ execute: x,
797
+ reset: a,
710
798
  abort: i,
711
- getQuery: x,
712
- setQuery: g
713
- }, e[13] = i, e[14] = a, e[15] = E, e[16] = x, e[17] = u, e[18] = f, e[19] = c, e[20] = g, e[21] = o, e[22] = v) : v = e[22], v;
799
+ getQuery: g,
800
+ setQuery: E
801
+ }, e[13] = i, e[14] = f, e[15] = x, e[16] = g, e[17] = l, e[18] = a, e[19] = c, e[20] = E, e[21] = o, e[22] = F) : F = e[22], F;
714
802
  }
715
803
  s(P, "useFetcherQuery");
716
- function Pe(r) {
804
+ function ke(r) {
717
805
  return P(r);
718
806
  }
719
- s(Pe, "useFetcherCountQuery");
720
- function Ae(r) {
807
+ s(ke, "useFetcherCountQuery");
808
+ function Ge(r) {
721
809
  return P(r);
722
810
  }
723
- s(Ae, "useFetcherListQuery");
724
- function De(r) {
725
- const e = w(2);
811
+ s(Ge, "useFetcherListQuery");
812
+ function Ke(r) {
813
+ const e = S(2);
726
814
  let t;
727
815
  return e[0] !== r ? (t = {
728
816
  ...r,
729
- resultExtractor: ie
817
+ resultExtractor: le
730
818
  }, e[0] = r, e[1] = t) : t = e[1], P(t);
731
819
  }
732
- s(De, "useFetcherListStreamQuery");
733
- function Me(r) {
820
+ s(Ke, "useFetcherListStreamQuery");
821
+ function Ne(r) {
734
822
  return P(r);
735
823
  }
736
- s(Me, "useFetcherPagedQuery");
737
- function Te(r) {
824
+ s(Ne, "useFetcherPagedQuery");
825
+ function Ve(r) {
738
826
  return P(r);
739
827
  }
740
- s(Te, "useFetcherSingleQuery");
741
- function Ue(r) {
828
+ s(Ve, "useFetcherSingleQuery");
829
+ function We(r) {
742
830
  return p(r);
743
831
  }
744
- s(Ue, "useCountQuery");
745
- function ke(r) {
832
+ s(We, "useCountQuery");
833
+ function je(r) {
746
834
  return p(r);
747
835
  }
748
- s(ke, "useListQuery");
749
- function ze(r) {
836
+ s(je, "useListQuery");
837
+ function Je(r) {
750
838
  return p(r);
751
839
  }
752
- s(ze, "useListStreamQuery");
753
- function Ge(r) {
840
+ s(Je, "useListStreamQuery");
841
+ function Ye(r) {
754
842
  return p(r);
755
843
  }
756
- s(Ge, "usePagedQuery");
757
- function Ke(r) {
844
+ s(Ye, "usePagedQuery");
845
+ function Be(r) {
758
846
  return p(r);
759
847
  }
760
- s(Ke, "useSingleQuery");
761
- function Ne(r) {
762
- const e = w(13), {
848
+ s(Be, "useSingleQuery");
849
+ function He(r) {
850
+ const e = S(13), {
763
851
  bus: t,
764
852
  handler: n
765
853
  } = r;
766
- let l;
767
- e[0] !== t || e[1] !== n ? (l = /* @__PURE__ */ s(() => t.on(n), "t0"), e[0] = t, e[1] = n, e[2] = l) : l = e[2];
768
- const u = l;
854
+ let u;
855
+ e[0] !== t || e[1] !== n ? (u = /* @__PURE__ */ s(() => t.on(n), "t0"), e[0] = t, e[1] = n, e[2] = u) : u = e[2];
856
+ const l = u;
769
857
  let c;
770
858
  e[3] !== t || e[4] !== n.name ? (c = /* @__PURE__ */ s(() => t.off(n.name), "t1"), e[3] = t, e[4] = n.name, e[5] = c) : c = e[5];
771
- const a = c;
859
+ const f = c;
772
860
  let o, y;
773
861
  e[6] !== t || e[7] !== n ? (o = /* @__PURE__ */ s(() => (t.on(n) || console.warn(`Failed to subscribe to event bus with handler: ${n.name}`), () => {
774
862
  t.off(n.name);
775
863
  }), "t2"), y = [t, n], e[6] = t, e[7] = n, e[8] = o, e[9] = y) : (o = e[8], y = e[9]), I(o, y);
776
- let f;
777
- return e[10] !== u || e[11] !== a ? (f = {
778
- subscribe: u,
779
- unsubscribe: a
780
- }, e[10] = u, e[11] = a, e[12] = f) : f = e[12], f;
864
+ let a;
865
+ return e[10] !== l || e[11] !== f ? (a = {
866
+ subscribe: l,
867
+ unsubscribe: f
868
+ }, e[10] = l, e[11] = f, e[12] = a) : a = e[12], a;
781
869
  }
782
- s(Ne, "useEventSubscription");
870
+ s(He, "useEventSubscription");
783
871
  export {
784
- me as ANONYMOUS_USER,
785
- le as PromiseStatus,
786
- Ie as RouteGuard,
872
+ xe as ANONYMOUS_USER,
873
+ ie as PromiseStatus,
874
+ Me as RouteGuard,
787
875
  Y as SecurityContext,
788
- $e as SecurityProvider,
789
- D as isValidateQuery,
790
- Ue as useCountQuery,
791
- M as useDebouncedCallback,
792
- Re as useDebouncedExecutePromise,
793
- Le as useDebouncedFetcher,
794
- pe as useDebouncedFetcherQuery,
795
- Fe as useDebouncedQuery,
796
- Ne as useEventSubscription,
797
- U as useExecutePromise,
876
+ De as SecurityProvider,
877
+ he as addFullscreenChangeListener,
878
+ me as enterFullscreen,
879
+ ye as exitFullscreen,
880
+ de as getFullscreenElement,
881
+ z as isValidateQuery,
882
+ ge as removeFullscreenChangeListener,
883
+ We as useCountQuery,
884
+ D as useDebouncedCallback,
885
+ Oe as useDebouncedExecutePromise,
886
+ Te as useDebouncedFetcher,
887
+ Ue as useDebouncedFetcherQuery,
888
+ $e as useDebouncedQuery,
889
+ He as useEventSubscription,
890
+ T as useExecutePromise,
798
891
  B as useFetcher,
799
- Pe as useFetcherCountQuery,
800
- Ae as useFetcherListQuery,
801
- De as useFetcherListStreamQuery,
802
- Me as useFetcherPagedQuery,
892
+ ke as useFetcherCountQuery,
893
+ Ge as useFetcherListQuery,
894
+ Ke as useFetcherListStreamQuery,
895
+ Ne as useFetcherPagedQuery,
803
896
  P as useFetcherQuery,
804
- Te as useFetcherSingleQuery,
805
- qe as useForceUpdate,
806
- Ce as useImmerKeyStorage,
897
+ Ve as useFetcherSingleQuery,
898
+ Ae as useForceUpdate,
899
+ pe as useFullscreen,
900
+ ze as useImmerKeyStorage,
807
901
  J as useKeyStorage,
808
- $ as useLatest,
809
- ke as useListQuery,
810
- ze as useListStreamQuery,
902
+ O as useLatest,
903
+ je as useListQuery,
904
+ Je as useListStreamQuery,
811
905
  W as useMounted,
812
- Ge as usePagedQuery,
906
+ Ye as usePagedQuery,
813
907
  ae as usePromiseState,
814
908
  p as useQuery,
815
909
  j as useQueryState,
816
- Oe as useRefs,
910
+ Pe as useRefs,
817
911
  fe as useRequestId,
818
- ye as useSecurity,
819
- be as useSecurityContext,
820
- Ke as useSingleQuery
912
+ Fe as useSecurity,
913
+ ve as useSecurityContext,
914
+ Be as useSingleQuery
821
915
  };
822
916
  //# sourceMappingURL=index.es.js.map