@ahoo-wang/fetcher-react 3.6.1 → 3.6.2

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