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