@ahoo-wang/fetcher-react 3.6.2 → 3.6.5

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