@nside/wefa 0.1.0 → 0.3.0
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/{LegalConsent-Cn3qx30k.cjs → LegalConsent-CEcXZml6.cjs} +1 -1
- package/dist/{LegalConsent-pUADprVB.js → LegalConsent-Dzq3fdnt.js} +6 -6
- package/dist/{LegalDocument-BHtPY9AH.js → LegalDocument-BhoEpJ2O.js} +282 -255
- package/dist/LegalDocument-CS3MnOcV.cjs +109 -0
- package/dist/{LoginView-CMR9q_yi.cjs → LoginView-IIkXXw3R.cjs} +1 -1
- package/dist/{LoginView-C668oczA.js → LoginView-kH440cCh.js} +1 -1
- package/dist/{LogoutView-CzsPB9d9.cjs → LogoutView-B90MA-_Q.cjs} +1 -1
- package/dist/{LogoutView-DNgS20XP.js → LogoutView-DGqh4bP7.js} +1 -1
- package/dist/{apiClient-BAzNCKuU.js → apiClient-D-kcx_S1.js} +260 -232
- package/dist/apiClient-DJdAL3tN.cjs +1 -0
- package/dist/{axios-C7yNV7KF.js → axios-ClRPr3Xn.js} +158 -140
- package/dist/{axios-BompFBxL.cjs → axios-Dcidtc2l.cjs} +6 -6
- package/dist/containers.cjs +5 -5
- package/dist/containers.js +5 -5
- package/dist/{index-D7KjmN8m.cjs → index-B4vneBZh.cjs} +3 -3
- package/dist/{index-yOMKz8lD.cjs → index-B53YL3vD.cjs} +1 -1
- package/dist/{index-52nB-rKK.cjs → index-BSfhC_wu.cjs} +1 -1
- package/dist/{index-CeYaMyhs.cjs → index-BXrnPbjr.cjs} +3 -3
- package/dist/{index-CowW14sC.js → index-Bc699sOR.js} +906 -918
- package/dist/{index-BqxW11im.cjs → index-Bl3JVLei.cjs} +1 -1
- package/dist/{index--nRVi6aV.js → index-CEz0St1t.js} +7 -7
- package/dist/{index-DDCFRGsr.cjs → index-CJmnkrIs.cjs} +1 -1
- package/dist/{index-9kXqZ0Ez.cjs → index-CL_OJMNr.cjs} +1 -1
- package/dist/index-CTNsucOq.cjs +147 -0
- package/dist/{index-Dd7rSEka.js → index-Coos428-.js} +163 -174
- package/dist/{index-B-o2K-Ca.js → index-CwLAV8WF.js} +2 -2
- package/dist/{index-CowF3j5a.js → index-DGvdYnh3.js} +2 -2
- package/dist/{index-BVwluHCk.js → index-Dj5oTSEE.js} +22 -26
- package/dist/{index-BctaqoUB.js → index-DmVIgb18.js} +1 -1
- package/dist/{index-jIUtvXF6.js → index-FS8xE7Mo.js} +3 -3
- package/dist/index-FrfvunRp.cjs +146 -0
- package/dist/{index-CXJz1iyq.js → index-bRjoenrr.js} +1 -1
- package/dist/{lib-BEVtXpEW.cjs → lib-BBJH9d11.cjs} +83 -68
- package/dist/{lib-CA1k4S8X.js → lib-Y8FPgwH4.js} +1453 -1432
- package/dist/lib.cjs +1 -1
- package/dist/lib.d.ts +6 -3
- package/dist/lib.js +2 -2
- package/dist/{libRoutes-BJftOROB.js → libRoutes-BsneoQ4G.js} +2 -2
- package/dist/{libRoutes-CZNbtm5j.cjs → libRoutes-BzeZrIaK.cjs} +1 -1
- package/dist/network.cjs +1 -1
- package/dist/network.d.ts +5 -4
- package/dist/network.js +14 -14
- package/dist/router.cjs +1 -1
- package/dist/router.js +1 -1
- package/package.json +47 -46
- package/src/components/PlotlyComponent/PlotlyFromTableComponent.mdx +182 -108
- package/src/components/PlotlyComponent/PlotlyFromTableComponent.spec.ts +24 -17
- package/src/components/PlotlyComponent/PlotlyFromTableComponent.stories.ts +99 -36
- package/src/components/PlotlyComponent/PlotlyFromTableComponent.vue +18 -10
- package/src/components/TableComponent/TableComponent.spec.ts +0 -1
- package/src/demo/openapi/client/types.gen.ts +4 -3
- package/src/network/__tests__/typedApiClient.test.ts +9 -0
- package/src/network/network.mdx +8 -1
- package/src/network/typedApiClient.ts +8 -6
- package/src/plugins/legalConsent/views/__tests__/LegalConsent.test.ts +9 -4
- package/src/utils/componentRegistry.ts +0 -1
- package/dist/LegalDocument-CU8uyoKh.cjs +0 -110
- package/dist/apiClient-B6fJs4NI.cjs +0 -1
- package/dist/index-BCKqvrXF.cjs +0 -157
- package/dist/index-TM4WIzFN.cjs +0 -163
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { isRef as
|
|
2
|
-
import { a as
|
|
3
|
-
var
|
|
1
|
+
import { isRef as X, unref as ht, hasInjectionContext as lt, inject as ft, getCurrentScope as G, computed as tt, shallowReactive as et, reactive as st, watch as R, onScopeDispose as it, shallowReadonly as nt, readonly as rt, toRefs as ot } from "vue";
|
|
2
|
+
import { a as at } from "./axios-ClRPr3Xn.js";
|
|
3
|
+
var D = class {
|
|
4
4
|
constructor() {
|
|
5
5
|
this.listeners = /* @__PURE__ */ new Set(), this.subscribe = this.subscribe.bind(this);
|
|
6
6
|
}
|
|
@@ -16,7 +16,7 @@ var P = class {
|
|
|
16
16
|
}
|
|
17
17
|
onUnsubscribe() {
|
|
18
18
|
}
|
|
19
|
-
},
|
|
19
|
+
}, dt = {
|
|
20
20
|
// We need the wrapper function syntax below instead of direct references to
|
|
21
21
|
// global setTimeout etc.
|
|
22
22
|
//
|
|
@@ -31,14 +31,14 @@ var P = class {
|
|
|
31
31
|
clearTimeout: (t) => clearTimeout(t),
|
|
32
32
|
setInterval: (t, e) => setInterval(t, e),
|
|
33
33
|
clearInterval: (t) => clearInterval(t)
|
|
34
|
-
},
|
|
34
|
+
}, pt = class {
|
|
35
35
|
// We cannot have TimeoutManager<T> as we must instantiate it with a concrete
|
|
36
36
|
// type at app boot; and if we leave that type, then any new timer provider
|
|
37
37
|
// would need to support ReturnType<typeof setTimeout>, which is infeasible.
|
|
38
38
|
//
|
|
39
39
|
// We settle for type safety for the TimeoutProvider type, and accept that
|
|
40
40
|
// this class is unsafe internally to allow for extension.
|
|
41
|
-
#e =
|
|
41
|
+
#e = dt;
|
|
42
42
|
#t = !1;
|
|
43
43
|
setTimeoutProvider(t) {
|
|
44
44
|
process.env.NODE_ENV !== "production" && this.#t && t !== this.#e && console.error(
|
|
@@ -58,17 +58,17 @@ var P = class {
|
|
|
58
58
|
clearInterval(t) {
|
|
59
59
|
this.#e.clearInterval(t);
|
|
60
60
|
}
|
|
61
|
-
},
|
|
62
|
-
function
|
|
61
|
+
}, F = new pt();
|
|
62
|
+
function bt(t) {
|
|
63
63
|
setTimeout(t, 0);
|
|
64
64
|
}
|
|
65
|
-
var
|
|
66
|
-
function
|
|
65
|
+
var P = typeof window > "u" || "Deno" in globalThis;
|
|
66
|
+
function vt() {
|
|
67
67
|
}
|
|
68
|
-
function
|
|
68
|
+
function z(t) {
|
|
69
69
|
return typeof t == "number" && t >= 0 && t !== 1 / 0;
|
|
70
70
|
}
|
|
71
|
-
function
|
|
71
|
+
function yt(t, e) {
|
|
72
72
|
return Math.max(t + (e || 0) - Date.now(), 0);
|
|
73
73
|
}
|
|
74
74
|
function E(t, e) {
|
|
@@ -77,34 +77,35 @@ function E(t, e) {
|
|
|
77
77
|
function v(t, e) {
|
|
78
78
|
return typeof t == "function" ? t(e) : t;
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function $(t) {
|
|
81
81
|
return JSON.stringify(
|
|
82
82
|
t,
|
|
83
83
|
(e, s) => U(s) ? Object.keys(s).sort().reduce((n, i) => (n[i] = s[i], n), {}) : s
|
|
84
84
|
);
|
|
85
85
|
}
|
|
86
|
-
var
|
|
87
|
-
function Q(t, e) {
|
|
86
|
+
var mt = Object.prototype.hasOwnProperty;
|
|
87
|
+
function Q(t, e, s = 0) {
|
|
88
88
|
if (t === e)
|
|
89
89
|
return t;
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
90
|
+
if (s > 500) return e;
|
|
91
|
+
const n = W(t) && W(e);
|
|
92
|
+
if (!n && !(U(t) && U(e))) return e;
|
|
93
|
+
const r = (n ? t : Object.keys(t)).length, h = n ? e : Object.keys(e), o = h.length, l = n ? new Array(o) : {};
|
|
94
|
+
let y = 0;
|
|
95
|
+
for (let a = 0; a < o; a++) {
|
|
96
|
+
const p = n ? a : h[a], c = t[p], u = e[p];
|
|
97
|
+
if (c === u) {
|
|
98
|
+
l[p] = c, (n ? a < r : mt.call(t, p)) && y++;
|
|
98
99
|
continue;
|
|
99
100
|
}
|
|
100
|
-
if (
|
|
101
|
-
|
|
101
|
+
if (c === null || u === null || typeof c != "object" || typeof u != "object") {
|
|
102
|
+
l[p] = u;
|
|
102
103
|
continue;
|
|
103
104
|
}
|
|
104
|
-
const
|
|
105
|
-
|
|
105
|
+
const f = Q(c, u, s + 1);
|
|
106
|
+
l[p] = f, f === c && y++;
|
|
106
107
|
}
|
|
107
|
-
return
|
|
108
|
+
return r === o && y === r ? t : l;
|
|
108
109
|
}
|
|
109
110
|
function M(t, e) {
|
|
110
111
|
if (!e || Object.keys(t).length !== Object.keys(e).length)
|
|
@@ -114,22 +115,22 @@ function M(t, e) {
|
|
|
114
115
|
return !1;
|
|
115
116
|
return !0;
|
|
116
117
|
}
|
|
117
|
-
function
|
|
118
|
+
function W(t) {
|
|
118
119
|
return Array.isArray(t) && t.length === Object.keys(t).length;
|
|
119
120
|
}
|
|
120
121
|
function U(t) {
|
|
121
|
-
if (
|
|
122
|
+
if (!B(t))
|
|
122
123
|
return !1;
|
|
123
124
|
const e = t.constructor;
|
|
124
125
|
if (e === void 0)
|
|
125
126
|
return !0;
|
|
126
127
|
const s = e.prototype;
|
|
127
|
-
return !(
|
|
128
|
+
return !(!B(s) || !s.hasOwnProperty("isPrototypeOf") || Object.getPrototypeOf(t) !== Object.prototype);
|
|
128
129
|
}
|
|
129
|
-
function
|
|
130
|
+
function B(t) {
|
|
130
131
|
return Object.prototype.toString.call(t) === "[object Object]";
|
|
131
132
|
}
|
|
132
|
-
function
|
|
133
|
+
function H(t, e, s) {
|
|
133
134
|
if (typeof s.structuralSharing == "function")
|
|
134
135
|
return s.structuralSharing(t, e);
|
|
135
136
|
if (s.structuralSharing !== !1) {
|
|
@@ -145,16 +146,16 @@ function B(t, e, s) {
|
|
|
145
146
|
}
|
|
146
147
|
return e;
|
|
147
148
|
}
|
|
148
|
-
function
|
|
149
|
+
function x(t, e) {
|
|
149
150
|
return typeof t == "function" ? t(...e) : !!t;
|
|
150
151
|
}
|
|
151
|
-
var
|
|
152
|
+
var gt = class extends D {
|
|
152
153
|
#e;
|
|
153
154
|
#t;
|
|
154
155
|
#s;
|
|
155
156
|
constructor() {
|
|
156
157
|
super(), this.#s = (t) => {
|
|
157
|
-
if (!
|
|
158
|
+
if (!P && window.addEventListener) {
|
|
158
159
|
const e = () => t();
|
|
159
160
|
return window.addEventListener("visibilitychange", e, !1), () => {
|
|
160
161
|
window.removeEventListener("visibilitychange", e);
|
|
@@ -185,8 +186,8 @@ var yt = class extends P {
|
|
|
185
186
|
isFocused() {
|
|
186
187
|
return typeof this.#e == "boolean" ? this.#e : globalThis.document?.visibilityState !== "hidden";
|
|
187
188
|
}
|
|
188
|
-
},
|
|
189
|
-
function
|
|
189
|
+
}, Ot = new gt();
|
|
190
|
+
function J() {
|
|
190
191
|
let t, e;
|
|
191
192
|
const s = new Promise((i, r) => {
|
|
192
193
|
t = i, e = r;
|
|
@@ -208,18 +209,18 @@ function W() {
|
|
|
208
209
|
}), e(i);
|
|
209
210
|
}, s;
|
|
210
211
|
}
|
|
211
|
-
var
|
|
212
|
-
function
|
|
212
|
+
var Rt = bt;
|
|
213
|
+
function wt() {
|
|
213
214
|
let t = [], e = 0, s = (o) => {
|
|
214
215
|
o();
|
|
215
216
|
}, n = (o) => {
|
|
216
217
|
o();
|
|
217
|
-
}, i =
|
|
218
|
+
}, i = Rt;
|
|
218
219
|
const r = (o) => {
|
|
219
220
|
e ? t.push(o) : i(() => {
|
|
220
221
|
s(o);
|
|
221
222
|
});
|
|
222
|
-
},
|
|
223
|
+
}, h = () => {
|
|
223
224
|
const o = t;
|
|
224
225
|
t = [], o.length && i(() => {
|
|
225
226
|
n(() => {
|
|
@@ -236,7 +237,7 @@ function Ot() {
|
|
|
236
237
|
try {
|
|
237
238
|
l = o();
|
|
238
239
|
} finally {
|
|
239
|
-
e--, e ||
|
|
240
|
+
e--, e || h();
|
|
240
241
|
}
|
|
241
242
|
return l;
|
|
242
243
|
},
|
|
@@ -268,13 +269,13 @@ function Ot() {
|
|
|
268
269
|
}
|
|
269
270
|
};
|
|
270
271
|
}
|
|
271
|
-
var
|
|
272
|
+
var ut = wt(), St = class extends D {
|
|
272
273
|
#e = !0;
|
|
273
274
|
#t;
|
|
274
275
|
#s;
|
|
275
276
|
constructor() {
|
|
276
277
|
super(), this.#s = (t) => {
|
|
277
|
-
if (!
|
|
278
|
+
if (!P && window.addEventListener) {
|
|
278
279
|
const e = () => t(!0), s = () => t(!1);
|
|
279
280
|
return window.addEventListener("online", e, !1), window.addEventListener("offline", s, !1), () => {
|
|
280
281
|
window.removeEventListener("online", e), window.removeEventListener("offline", s);
|
|
@@ -299,24 +300,24 @@ var ot = Ot(), wt = class extends P {
|
|
|
299
300
|
isOnline() {
|
|
300
301
|
return this.#e;
|
|
301
302
|
}
|
|
302
|
-
},
|
|
303
|
-
function
|
|
304
|
-
return (t ?? "online") === "online" ?
|
|
303
|
+
}, Et = new St();
|
|
304
|
+
function Ct(t) {
|
|
305
|
+
return (t ?? "online") === "online" ? Et.isOnline() : !0;
|
|
305
306
|
}
|
|
306
|
-
function
|
|
307
|
+
function jt(t, e) {
|
|
307
308
|
return {
|
|
308
309
|
fetchFailureCount: 0,
|
|
309
310
|
fetchFailureReason: null,
|
|
310
|
-
fetchStatus:
|
|
311
|
+
fetchStatus: Ct(e.networkMode) ? "fetching" : "paused",
|
|
311
312
|
...t === void 0 && {
|
|
312
313
|
error: null,
|
|
313
314
|
status: "pending"
|
|
314
315
|
}
|
|
315
316
|
};
|
|
316
317
|
}
|
|
317
|
-
var
|
|
318
|
+
var It = class extends D {
|
|
318
319
|
constructor(t, e) {
|
|
319
|
-
super(), this.options = e, this.#e = t, this.#a = null, this.#o =
|
|
320
|
+
super(), this.options = e, this.#e = t, this.#a = null, this.#o = J(), this.bindMethods(), this.setOptions(e);
|
|
320
321
|
}
|
|
321
322
|
#e;
|
|
322
323
|
#t = void 0;
|
|
@@ -331,35 +332,35 @@ var Ct = class extends P {
|
|
|
331
332
|
// This property keeps track of the last query with defined data.
|
|
332
333
|
// It will be used to pass the previous data and query to the placeholder function between renders.
|
|
333
334
|
#d;
|
|
334
|
-
#h;
|
|
335
335
|
#c;
|
|
336
|
+
#h;
|
|
336
337
|
#u;
|
|
337
338
|
#p = /* @__PURE__ */ new Set();
|
|
338
339
|
bindMethods() {
|
|
339
340
|
this.refetch = this.refetch.bind(this);
|
|
340
341
|
}
|
|
341
342
|
onSubscribe() {
|
|
342
|
-
this.listeners.size === 1 && (this.#t.addObserver(this),
|
|
343
|
+
this.listeners.size === 1 && (this.#t.addObserver(this), Y(this.#t, this.options) ? this.#l() : this.updateResult(), this.#g());
|
|
343
344
|
}
|
|
344
345
|
onUnsubscribe() {
|
|
345
346
|
this.hasListeners() || this.destroy();
|
|
346
347
|
}
|
|
347
348
|
shouldFetchOnReconnect() {
|
|
348
|
-
return
|
|
349
|
+
return N(
|
|
349
350
|
this.#t,
|
|
350
351
|
this.options,
|
|
351
352
|
this.options.refetchOnReconnect
|
|
352
353
|
);
|
|
353
354
|
}
|
|
354
355
|
shouldFetchOnWindowFocus() {
|
|
355
|
-
return
|
|
356
|
+
return N(
|
|
356
357
|
this.#t,
|
|
357
358
|
this.options,
|
|
358
359
|
this.options.refetchOnWindowFocus
|
|
359
360
|
);
|
|
360
361
|
}
|
|
361
362
|
destroy() {
|
|
362
|
-
this.listeners = /* @__PURE__ */ new Set(), this.#O(), this.#
|
|
363
|
+
this.listeners = /* @__PURE__ */ new Set(), this.#O(), this.#R(), this.#t.removeObserver(this);
|
|
363
364
|
}
|
|
364
365
|
setOptions(t) {
|
|
365
366
|
const e = this.options, s = this.#t;
|
|
@@ -367,13 +368,13 @@ var Ct = class extends P {
|
|
|
367
368
|
throw new Error(
|
|
368
369
|
"Expected enabled to be a boolean or a callback that returns a boolean"
|
|
369
370
|
);
|
|
370
|
-
this.#
|
|
371
|
+
this.#w(), this.#t.setOptions(this.options), e._defaulted && !M(this.options, e) && this.#e.getQueryCache().notify({
|
|
371
372
|
type: "observerOptionsUpdated",
|
|
372
373
|
query: this.#t,
|
|
373
374
|
observer: this
|
|
374
375
|
});
|
|
375
376
|
const n = this.hasListeners();
|
|
376
|
-
n &&
|
|
377
|
+
n && Z(
|
|
377
378
|
this.#t,
|
|
378
379
|
s,
|
|
379
380
|
this.options,
|
|
@@ -384,7 +385,7 @@ var Ct = class extends P {
|
|
|
384
385
|
}
|
|
385
386
|
getOptimisticResult(t) {
|
|
386
387
|
const e = this.#e.getQueryCache().build(this.#e, t), s = this.createResult(e, t);
|
|
387
|
-
return
|
|
388
|
+
return Ft(this, s) && (this.#i = s, this.#r = this.options, this.#n = this.#t.state), s;
|
|
388
389
|
}
|
|
389
390
|
getCurrentResult() {
|
|
390
391
|
return this.#i;
|
|
@@ -420,12 +421,12 @@ var Ct = class extends P {
|
|
|
420
421
|
}).then(() => (this.updateResult(), this.#i));
|
|
421
422
|
}
|
|
422
423
|
#l(t) {
|
|
423
|
-
this.#
|
|
424
|
+
this.#w();
|
|
424
425
|
let e = this.#t.fetch(
|
|
425
426
|
this.options,
|
|
426
427
|
t
|
|
427
428
|
);
|
|
428
|
-
return t?.throwOnError || (e = e.catch(
|
|
429
|
+
return t?.throwOnError || (e = e.catch(vt)), e;
|
|
429
430
|
}
|
|
430
431
|
#v() {
|
|
431
432
|
this.#O();
|
|
@@ -433,10 +434,10 @@ var Ct = class extends P {
|
|
|
433
434
|
this.options.staleTime,
|
|
434
435
|
this.#t
|
|
435
436
|
);
|
|
436
|
-
if (
|
|
437
|
+
if (P || this.#i.isStale || !z(t))
|
|
437
438
|
return;
|
|
438
|
-
const s =
|
|
439
|
-
this.#
|
|
439
|
+
const s = yt(this.#i.dataUpdatedAt, t) + 1;
|
|
440
|
+
this.#c = F.setTimeout(() => {
|
|
440
441
|
this.#i.isStale || this.updateResult();
|
|
441
442
|
}, s);
|
|
442
443
|
}
|
|
@@ -444,65 +445,65 @@ var Ct = class extends P {
|
|
|
444
445
|
return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(this.#t) : this.options.refetchInterval) ?? !1;
|
|
445
446
|
}
|
|
446
447
|
#m(t) {
|
|
447
|
-
this.#
|
|
448
|
-
(this.options.refetchIntervalInBackground ||
|
|
448
|
+
this.#R(), this.#u = t, !(P || v(this.options.enabled, this.#t) === !1 || !z(this.#u) || this.#u === 0) && (this.#h = F.setInterval(() => {
|
|
449
|
+
(this.options.refetchIntervalInBackground || Ot.isFocused()) && this.#l();
|
|
449
450
|
}, this.#u));
|
|
450
451
|
}
|
|
451
452
|
#g() {
|
|
452
453
|
this.#v(), this.#m(this.#y());
|
|
453
454
|
}
|
|
454
455
|
#O() {
|
|
455
|
-
this.#
|
|
456
|
+
this.#c && (F.clearTimeout(this.#c), this.#c = void 0);
|
|
456
457
|
}
|
|
457
|
-
#
|
|
458
|
-
this.#
|
|
458
|
+
#R() {
|
|
459
|
+
this.#h && (F.clearInterval(this.#h), this.#h = void 0);
|
|
459
460
|
}
|
|
460
461
|
createResult(t, e) {
|
|
461
|
-
const s = this.#t, n = this.options, i = this.#i, r = this.#n,
|
|
462
|
-
let a = { ...
|
|
462
|
+
const s = this.#t, n = this.options, i = this.#i, r = this.#n, h = this.#r, l = t !== s ? t.state : this.#s, { state: y } = t;
|
|
463
|
+
let a = { ...y }, p = !1, c;
|
|
463
464
|
if (e._optimisticResults) {
|
|
464
|
-
const
|
|
465
|
-
(
|
|
465
|
+
const b = this.hasListeners(), S = !b && Y(t, e), j = b && Z(t, s, e, n);
|
|
466
|
+
(S || j) && (a = {
|
|
466
467
|
...a,
|
|
467
|
-
...
|
|
468
|
+
...jt(y.data, t.options)
|
|
468
469
|
}), e._optimisticResults === "isRestoring" && (a.fetchStatus = "idle");
|
|
469
470
|
}
|
|
470
|
-
let { error:
|
|
471
|
-
|
|
472
|
-
let
|
|
473
|
-
if (e.placeholderData !== void 0 &&
|
|
474
|
-
let
|
|
475
|
-
i?.isPlaceholderData && e.placeholderData ===
|
|
471
|
+
let { error: u, errorUpdatedAt: f, status: d } = a;
|
|
472
|
+
c = a.data;
|
|
473
|
+
let w = !1;
|
|
474
|
+
if (e.placeholderData !== void 0 && c === void 0 && d === "pending") {
|
|
475
|
+
let b;
|
|
476
|
+
i?.isPlaceholderData && e.placeholderData === h?.placeholderData ? (b = i.data, w = !0) : b = typeof e.placeholderData == "function" ? e.placeholderData(
|
|
476
477
|
this.#d?.state.data,
|
|
477
478
|
this.#d
|
|
478
|
-
) : e.placeholderData,
|
|
479
|
+
) : e.placeholderData, b !== void 0 && (d = "success", c = H(
|
|
479
480
|
i?.data,
|
|
480
|
-
|
|
481
|
+
b,
|
|
481
482
|
e
|
|
482
|
-
),
|
|
483
|
+
), p = !0);
|
|
483
484
|
}
|
|
484
|
-
if (e.select &&
|
|
485
|
-
if (i &&
|
|
486
|
-
|
|
485
|
+
if (e.select && c !== void 0 && !w)
|
|
486
|
+
if (i && c === r?.data && e.select === this.#b)
|
|
487
|
+
c = this.#f;
|
|
487
488
|
else
|
|
488
489
|
try {
|
|
489
|
-
this.#b = e.select,
|
|
490
|
-
} catch (
|
|
491
|
-
this.#a =
|
|
490
|
+
this.#b = e.select, c = e.select(c), c = H(i?.data, c, e), this.#f = c, this.#a = null;
|
|
491
|
+
} catch (b) {
|
|
492
|
+
this.#a = b;
|
|
492
493
|
}
|
|
493
|
-
this.#a && (
|
|
494
|
-
const g = a.fetchStatus === "fetching", O =
|
|
495
|
-
status:
|
|
494
|
+
this.#a && (u = this.#a, c = this.#f, f = Date.now(), d = "error");
|
|
495
|
+
const g = a.fetchStatus === "fetching", O = d === "pending", L = d === "error", V = O && g, K = c !== void 0, m = {
|
|
496
|
+
status: d,
|
|
496
497
|
fetchStatus: a.fetchStatus,
|
|
497
498
|
isPending: O,
|
|
498
|
-
isSuccess:
|
|
499
|
+
isSuccess: d === "success",
|
|
499
500
|
isError: L,
|
|
500
|
-
isInitialLoading:
|
|
501
|
-
isLoading:
|
|
502
|
-
data:
|
|
501
|
+
isInitialLoading: V,
|
|
502
|
+
isLoading: V,
|
|
503
|
+
data: c,
|
|
503
504
|
dataUpdatedAt: a.dataUpdatedAt,
|
|
504
|
-
error:
|
|
505
|
-
errorUpdatedAt:
|
|
505
|
+
error: u,
|
|
506
|
+
errorUpdatedAt: f,
|
|
506
507
|
failureCount: a.fetchFailureCount,
|
|
507
508
|
failureReason: a.fetchFailureReason,
|
|
508
509
|
errorUpdateCount: a.errorUpdateCount,
|
|
@@ -510,35 +511,35 @@ var Ct = class extends P {
|
|
|
510
511
|
isFetchedAfterMount: a.dataUpdateCount > l.dataUpdateCount || a.errorUpdateCount > l.errorUpdateCount,
|
|
511
512
|
isFetching: g,
|
|
512
513
|
isRefetching: g && !O,
|
|
513
|
-
isLoadingError: L && !
|
|
514
|
+
isLoadingError: L && !K,
|
|
514
515
|
isPaused: a.fetchStatus === "paused",
|
|
515
|
-
isPlaceholderData:
|
|
516
|
-
isRefetchError: L &&
|
|
517
|
-
isStale:
|
|
516
|
+
isPlaceholderData: p,
|
|
517
|
+
isRefetchError: L && K,
|
|
518
|
+
isStale: A(t, e),
|
|
518
519
|
refetch: this.refetch,
|
|
519
520
|
promise: this.#o,
|
|
520
521
|
isEnabled: v(e.enabled, t) !== !1
|
|
521
522
|
};
|
|
522
523
|
if (this.options.experimental_prefetchInRender) {
|
|
523
|
-
const
|
|
524
|
-
|
|
525
|
-
},
|
|
526
|
-
const
|
|
527
|
-
|
|
528
|
-
},
|
|
529
|
-
switch (
|
|
524
|
+
const b = m.data !== void 0, S = m.status === "error" && !b, j = (T) => {
|
|
525
|
+
S ? T.reject(m.error) : b && T.resolve(m.data);
|
|
526
|
+
}, q = () => {
|
|
527
|
+
const T = this.#o = m.promise = J();
|
|
528
|
+
j(T);
|
|
529
|
+
}, I = this.#o;
|
|
530
|
+
switch (I.status) {
|
|
530
531
|
case "pending":
|
|
531
|
-
t.queryHash === s.queryHash &&
|
|
532
|
+
t.queryHash === s.queryHash && j(I);
|
|
532
533
|
break;
|
|
533
534
|
case "fulfilled":
|
|
534
|
-
(
|
|
535
|
+
(S || m.data !== I.value) && q();
|
|
535
536
|
break;
|
|
536
537
|
case "rejected":
|
|
537
|
-
(
|
|
538
|
+
(!S || m.error !== I.reason) && q();
|
|
538
539
|
break;
|
|
539
540
|
}
|
|
540
541
|
}
|
|
541
|
-
return
|
|
542
|
+
return m;
|
|
542
543
|
}
|
|
543
544
|
updateResult() {
|
|
544
545
|
const t = this.#i, e = this.createResult(this.#t, this.options);
|
|
@@ -554,14 +555,14 @@ var Ct = class extends P {
|
|
|
554
555
|
const r = new Set(
|
|
555
556
|
i ?? this.#p
|
|
556
557
|
);
|
|
557
|
-
return this.options.throwOnError && r.add("error"), Object.keys(this.#i).some((
|
|
558
|
-
const o =
|
|
558
|
+
return this.options.throwOnError && r.add("error"), Object.keys(this.#i).some((h) => {
|
|
559
|
+
const o = h;
|
|
559
560
|
return this.#i[o] !== t[o] && r.has(o);
|
|
560
561
|
});
|
|
561
562
|
};
|
|
562
563
|
this.#S({ listeners: s() });
|
|
563
564
|
}
|
|
564
|
-
#
|
|
565
|
+
#w() {
|
|
565
566
|
const t = this.#e.getQueryCache().build(this.#e, this.options);
|
|
566
567
|
if (t === this.#t)
|
|
567
568
|
return;
|
|
@@ -572,7 +573,7 @@ var Ct = class extends P {
|
|
|
572
573
|
this.updateResult(), this.hasListeners() && this.#g();
|
|
573
574
|
}
|
|
574
575
|
#S(t) {
|
|
575
|
-
|
|
576
|
+
ut.batch(() => {
|
|
576
577
|
t.listeners && this.listeners.forEach((e) => {
|
|
577
578
|
e(this.#i);
|
|
578
579
|
}), this.#e.getQueryCache().notify({
|
|
@@ -582,29 +583,29 @@ var Ct = class extends P {
|
|
|
582
583
|
});
|
|
583
584
|
}
|
|
584
585
|
};
|
|
585
|
-
function
|
|
586
|
+
function Tt(t, e) {
|
|
586
587
|
return v(e.enabled, t) !== !1 && t.state.data === void 0 && !(t.state.status === "error" && e.retryOnMount === !1);
|
|
587
588
|
}
|
|
588
|
-
function
|
|
589
|
-
return
|
|
589
|
+
function Y(t, e) {
|
|
590
|
+
return Tt(t, e) || t.state.data !== void 0 && N(t, e, e.refetchOnMount);
|
|
590
591
|
}
|
|
591
|
-
function
|
|
592
|
+
function N(t, e, s) {
|
|
592
593
|
if (v(e.enabled, t) !== !1 && E(e.staleTime, t) !== "static") {
|
|
593
594
|
const n = typeof s == "function" ? s(t) : s;
|
|
594
|
-
return n === "always" || n !== !1 &&
|
|
595
|
+
return n === "always" || n !== !1 && A(t, e);
|
|
595
596
|
}
|
|
596
597
|
return !1;
|
|
597
598
|
}
|
|
598
|
-
function
|
|
599
|
-
return (t !== e || v(n.enabled, t) === !1) && (!s.suspense || t.state.status !== "error") &&
|
|
599
|
+
function Z(t, e, s, n) {
|
|
600
|
+
return (t !== e || v(n.enabled, t) === !1) && (!s.suspense || t.state.status !== "error") && A(t, s);
|
|
600
601
|
}
|
|
601
|
-
function
|
|
602
|
+
function A(t, e) {
|
|
602
603
|
return v(e.enabled, t) !== !1 && t.isStaleByTime(E(e.staleTime, t));
|
|
603
604
|
}
|
|
604
|
-
function
|
|
605
|
+
function Ft(t, e) {
|
|
605
606
|
return !M(t.getCurrentResult(), e);
|
|
606
607
|
}
|
|
607
|
-
function
|
|
608
|
+
function Pt() {
|
|
608
609
|
return {
|
|
609
610
|
context: void 0,
|
|
610
611
|
data: void 0,
|
|
@@ -617,7 +618,7 @@ function Tt() {
|
|
|
617
618
|
submittedAt: 0
|
|
618
619
|
};
|
|
619
620
|
}
|
|
620
|
-
var
|
|
621
|
+
var Mt = class extends D {
|
|
621
622
|
#e;
|
|
622
623
|
#t = void 0;
|
|
623
624
|
#s;
|
|
@@ -634,7 +635,7 @@ var Ft = class extends P {
|
|
|
634
635
|
type: "observerOptionsUpdated",
|
|
635
636
|
mutation: this.#s,
|
|
636
637
|
observer: this
|
|
637
|
-
}), e?.mutationKey && this.options.mutationKey &&
|
|
638
|
+
}), e?.mutationKey && this.options.mutationKey && $(e.mutationKey) !== $(this.options.mutationKey) ? this.reset() : this.#s?.state.status === "pending" && this.#s.setOptions(this.options);
|
|
638
639
|
}
|
|
639
640
|
onUnsubscribe() {
|
|
640
641
|
this.hasListeners() || this.#s?.removeObserver(this);
|
|
@@ -652,7 +653,7 @@ var Ft = class extends P {
|
|
|
652
653
|
return this.#i = e, this.#s?.removeObserver(this), this.#s = this.#e.getMutationCache().build(this.#e, this.options), this.#s.addObserver(this), this.#s.execute(t);
|
|
653
654
|
}
|
|
654
655
|
#n() {
|
|
655
|
-
const t = this.#s?.state ??
|
|
656
|
+
const t = this.#s?.state ?? Pt();
|
|
656
657
|
this.#t = {
|
|
657
658
|
...t,
|
|
658
659
|
isPending: t.status === "pending",
|
|
@@ -664,220 +665,247 @@ var Ft = class extends P {
|
|
|
664
665
|
};
|
|
665
666
|
}
|
|
666
667
|
#r(t) {
|
|
667
|
-
|
|
668
|
+
ut.batch(() => {
|
|
668
669
|
if (this.#i && this.hasListeners()) {
|
|
669
670
|
const e = this.#t.variables, s = this.#t.context, n = {
|
|
670
671
|
client: this.#e,
|
|
671
672
|
meta: this.options.meta,
|
|
672
673
|
mutationKey: this.options.mutationKey
|
|
673
674
|
};
|
|
674
|
-
t?.type === "success"
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
)
|
|
675
|
+
if (t?.type === "success") {
|
|
676
|
+
try {
|
|
677
|
+
this.#i.onSuccess?.(
|
|
678
|
+
t.data,
|
|
679
|
+
e,
|
|
680
|
+
s,
|
|
681
|
+
n
|
|
682
|
+
);
|
|
683
|
+
} catch (i) {
|
|
684
|
+
Promise.reject(i);
|
|
685
|
+
}
|
|
686
|
+
try {
|
|
687
|
+
this.#i.onSettled?.(
|
|
688
|
+
t.data,
|
|
689
|
+
null,
|
|
690
|
+
e,
|
|
691
|
+
s,
|
|
692
|
+
n
|
|
693
|
+
);
|
|
694
|
+
} catch (i) {
|
|
695
|
+
Promise.reject(i);
|
|
696
|
+
}
|
|
697
|
+
} else if (t?.type === "error") {
|
|
698
|
+
try {
|
|
699
|
+
this.#i.onError?.(
|
|
700
|
+
t.error,
|
|
701
|
+
e,
|
|
702
|
+
s,
|
|
703
|
+
n
|
|
704
|
+
);
|
|
705
|
+
} catch (i) {
|
|
706
|
+
Promise.reject(i);
|
|
707
|
+
}
|
|
708
|
+
try {
|
|
709
|
+
this.#i.onSettled?.(
|
|
710
|
+
void 0,
|
|
711
|
+
t.error,
|
|
712
|
+
e,
|
|
713
|
+
s,
|
|
714
|
+
n
|
|
715
|
+
);
|
|
716
|
+
} catch (i) {
|
|
717
|
+
Promise.reject(i);
|
|
718
|
+
}
|
|
719
|
+
}
|
|
697
720
|
}
|
|
698
721
|
this.listeners.forEach((e) => {
|
|
699
722
|
e(this.#t);
|
|
700
723
|
});
|
|
701
724
|
});
|
|
702
725
|
}
|
|
703
|
-
},
|
|
704
|
-
function
|
|
726
|
+
}, Dt = "VUE_QUERY_CLIENT";
|
|
727
|
+
function Lt(t) {
|
|
705
728
|
const e = t ? `:${t}` : "";
|
|
706
|
-
return `${
|
|
729
|
+
return `${Dt}${e}`;
|
|
707
730
|
}
|
|
708
|
-
function
|
|
731
|
+
function k(t, e) {
|
|
709
732
|
Object.keys(t).forEach((s) => {
|
|
710
733
|
t[s] = e[s];
|
|
711
734
|
});
|
|
712
735
|
}
|
|
713
|
-
function
|
|
736
|
+
function _(t, e, s = "", n = 0) {
|
|
714
737
|
if (e) {
|
|
715
738
|
const i = e(t, s, n);
|
|
716
|
-
if (i === void 0 &&
|
|
739
|
+
if (i === void 0 && X(t) || i !== void 0)
|
|
717
740
|
return i;
|
|
718
741
|
}
|
|
719
742
|
if (Array.isArray(t))
|
|
720
743
|
return t.map(
|
|
721
|
-
(i, r) =>
|
|
744
|
+
(i, r) => _(i, e, String(r), n + 1)
|
|
722
745
|
);
|
|
723
|
-
if (typeof t == "object" &&
|
|
724
|
-
const i = Object.entries(t).map(([r,
|
|
746
|
+
if (typeof t == "object" && Ut(t)) {
|
|
747
|
+
const i = Object.entries(t).map(([r, h]) => [
|
|
725
748
|
r,
|
|
726
|
-
|
|
749
|
+
_(h, e, r, n + 1)
|
|
727
750
|
]);
|
|
728
751
|
return Object.fromEntries(i);
|
|
729
752
|
}
|
|
730
753
|
return t;
|
|
731
754
|
}
|
|
732
|
-
function
|
|
733
|
-
return
|
|
755
|
+
function Qt(t, e) {
|
|
756
|
+
return _(t, e);
|
|
734
757
|
}
|
|
735
758
|
function C(t, e = !1) {
|
|
736
|
-
return
|
|
759
|
+
return Qt(t, (s, n, i) => {
|
|
737
760
|
if (i === 1 && n === "queryKey")
|
|
738
761
|
return C(s, !0);
|
|
739
|
-
if (e &&
|
|
762
|
+
if (e && xt(s))
|
|
740
763
|
return C(s(), e);
|
|
741
|
-
if (
|
|
742
|
-
return C(
|
|
764
|
+
if (X(s))
|
|
765
|
+
return C(ht(s), e);
|
|
743
766
|
});
|
|
744
767
|
}
|
|
745
|
-
function
|
|
768
|
+
function Ut(t) {
|
|
746
769
|
if (Object.prototype.toString.call(t) !== "[object Object]")
|
|
747
770
|
return !1;
|
|
748
771
|
const e = Object.getPrototypeOf(t);
|
|
749
772
|
return e === null || e === Object.prototype;
|
|
750
773
|
}
|
|
751
|
-
function
|
|
774
|
+
function xt(t) {
|
|
752
775
|
return typeof t == "function";
|
|
753
776
|
}
|
|
754
|
-
function
|
|
755
|
-
if (!
|
|
777
|
+
function ct(t = "") {
|
|
778
|
+
if (!lt())
|
|
756
779
|
throw new Error(
|
|
757
780
|
"vue-query hooks can only be used inside setup() function or functions that support injection context."
|
|
758
781
|
);
|
|
759
|
-
const e =
|
|
782
|
+
const e = Lt(t), s = ft(e);
|
|
760
783
|
if (!s)
|
|
761
784
|
throw new Error(
|
|
762
785
|
"No 'queryClient' found in Vue context, use 'VueQueryPlugin' to properly initialize the library."
|
|
763
786
|
);
|
|
764
787
|
return s;
|
|
765
788
|
}
|
|
766
|
-
function
|
|
767
|
-
process.env.NODE_ENV === "development" && (
|
|
789
|
+
function Nt(t, e, s) {
|
|
790
|
+
process.env.NODE_ENV === "development" && (G() || console.warn(
|
|
768
791
|
'vue-query composable like "useQuery()" should only be used inside a "setup()" function or a running effect scope. They might otherwise lead to memory leaks.'
|
|
769
792
|
));
|
|
770
|
-
const n =
|
|
771
|
-
|
|
772
|
-
typeof
|
|
773
|
-
const
|
|
774
|
-
|
|
775
|
-
|
|
793
|
+
const n = ct(), i = tt(() => {
|
|
794
|
+
let u = e;
|
|
795
|
+
typeof u == "function" && (u = u());
|
|
796
|
+
const f = C(u);
|
|
797
|
+
typeof f.enabled == "function" && (f.enabled = f.enabled());
|
|
798
|
+
const d = n.defaultQueryOptions(f);
|
|
799
|
+
return d._optimisticResults = n.isRestoring?.value ? "isRestoring" : "optimistic", d;
|
|
800
|
+
}), r = new t(n, i.value), h = i.value.shallow ? et(r.getCurrentResult()) : st(r.getCurrentResult());
|
|
776
801
|
let o = () => {
|
|
777
802
|
};
|
|
778
803
|
n.isRestoring && R(
|
|
779
804
|
n.isRestoring,
|
|
780
|
-
(
|
|
781
|
-
|
|
782
|
-
|
|
805
|
+
(u) => {
|
|
806
|
+
u || (o(), o = r.subscribe((f) => {
|
|
807
|
+
k(h, f);
|
|
783
808
|
}));
|
|
784
809
|
},
|
|
785
810
|
{ immediate: !0 }
|
|
786
811
|
);
|
|
787
812
|
const l = () => {
|
|
788
|
-
r.setOptions(i.value),
|
|
813
|
+
r.setOptions(i.value), k(h, r.getCurrentResult());
|
|
789
814
|
};
|
|
790
|
-
R(i, l),
|
|
815
|
+
R(i, l), it(() => {
|
|
791
816
|
o();
|
|
792
817
|
});
|
|
793
|
-
const
|
|
794
|
-
(
|
|
795
|
-
let
|
|
818
|
+
const y = (...u) => (l(), h.refetch(...u)), a = () => new Promise(
|
|
819
|
+
(u, f) => {
|
|
820
|
+
let d = () => {
|
|
796
821
|
};
|
|
797
|
-
const
|
|
822
|
+
const w = () => {
|
|
798
823
|
if (i.value.enabled !== !1) {
|
|
799
824
|
r.setOptions(i.value);
|
|
800
825
|
const g = r.getOptimisticResult(
|
|
801
826
|
i.value
|
|
802
827
|
);
|
|
803
|
-
g.isStale ? (
|
|
804
|
-
|
|
828
|
+
g.isStale ? (d(), r.fetchOptimistic(i.value).then(u, (O) => {
|
|
829
|
+
x(i.value.throwOnError, [
|
|
805
830
|
O,
|
|
806
831
|
r.getCurrentQuery()
|
|
807
|
-
]) ?
|
|
808
|
-
})) : (
|
|
832
|
+
]) ? f(O) : u(r.getCurrentResult());
|
|
833
|
+
})) : (d(), u(g));
|
|
809
834
|
}
|
|
810
835
|
};
|
|
811
|
-
|
|
836
|
+
w(), d = R(i, w);
|
|
812
837
|
}
|
|
813
838
|
);
|
|
814
839
|
R(
|
|
815
|
-
() =>
|
|
816
|
-
(
|
|
817
|
-
if (
|
|
818
|
-
|
|
840
|
+
() => h.error,
|
|
841
|
+
(u) => {
|
|
842
|
+
if (h.isError && !h.isFetching && x(i.value.throwOnError, [
|
|
843
|
+
u,
|
|
819
844
|
r.getCurrentQuery()
|
|
820
845
|
]))
|
|
821
|
-
throw
|
|
846
|
+
throw u;
|
|
822
847
|
}
|
|
823
848
|
);
|
|
824
|
-
const
|
|
825
|
-
for (const
|
|
826
|
-
typeof u
|
|
827
|
-
return
|
|
849
|
+
const p = i.value.shallow ? nt(h) : rt(h), c = ot(p);
|
|
850
|
+
for (const u in h)
|
|
851
|
+
typeof h[u] == "function" && (c[u] = h[u]);
|
|
852
|
+
return c.suspense = a, c.refetch = y, c;
|
|
828
853
|
}
|
|
829
|
-
function
|
|
830
|
-
return
|
|
854
|
+
function kt(t, e) {
|
|
855
|
+
return Nt(It, t);
|
|
831
856
|
}
|
|
832
|
-
function
|
|
833
|
-
process.env.NODE_ENV === "development" && (
|
|
857
|
+
function _t(t, e) {
|
|
858
|
+
process.env.NODE_ENV === "development" && (G() || console.warn(
|
|
834
859
|
'vue-query composable like "useQuery()" should only be used inside a "setup()" function or a running effect scope. They might otherwise lead to memory leaks.'
|
|
835
860
|
));
|
|
836
|
-
const s =
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
861
|
+
const s = ct(), n = tt(() => {
|
|
862
|
+
const a = typeof t == "function" ? t() : t;
|
|
863
|
+
return s.defaultMutationOptions(C(a));
|
|
864
|
+
}), i = new Mt(s, n.value), r = n.value.shallow ? et(i.getCurrentResult()) : st(i.getCurrentResult()), h = i.subscribe((a) => {
|
|
865
|
+
k(r, a);
|
|
866
|
+
}), o = (a, p) => {
|
|
867
|
+
i.mutate(a, p).catch(() => {
|
|
840
868
|
});
|
|
841
869
|
};
|
|
842
870
|
R(n, () => {
|
|
843
871
|
i.setOptions(n.value);
|
|
844
|
-
}),
|
|
845
|
-
|
|
872
|
+
}), it(() => {
|
|
873
|
+
h();
|
|
846
874
|
});
|
|
847
|
-
const l = n.value.shallow ?
|
|
875
|
+
const l = n.value.shallow ? nt(r) : rt(r), y = ot(l);
|
|
848
876
|
return R(
|
|
849
877
|
() => r.error,
|
|
850
878
|
(a) => {
|
|
851
|
-
if (a &&
|
|
879
|
+
if (a && x(n.value.throwOnError, [a]))
|
|
852
880
|
throw a;
|
|
853
881
|
}
|
|
854
882
|
), {
|
|
855
|
-
...
|
|
883
|
+
...y,
|
|
856
884
|
mutate: o,
|
|
857
885
|
mutateAsync: r.mutate,
|
|
858
886
|
reset: r.reset
|
|
859
887
|
};
|
|
860
888
|
}
|
|
861
|
-
function
|
|
862
|
-
return
|
|
889
|
+
function At(t, e) {
|
|
890
|
+
return kt({
|
|
863
891
|
queryKey: [t],
|
|
864
|
-
queryFn: async () => t.value ? (await
|
|
892
|
+
queryFn: async () => t.value ? (await at.get(t.value)).data : void 0,
|
|
865
893
|
enabled: () => !!t.value,
|
|
866
894
|
...e
|
|
867
895
|
});
|
|
868
896
|
}
|
|
869
|
-
function
|
|
870
|
-
return
|
|
871
|
-
mutationFn: async (s) => t.value ? (await
|
|
897
|
+
function Vt(t, e) {
|
|
898
|
+
return _t({
|
|
899
|
+
mutationFn: async (s) => t.value ? (await at.post(t.value, s)).data : void 0,
|
|
872
900
|
...e
|
|
873
901
|
});
|
|
874
902
|
}
|
|
875
|
-
const
|
|
876
|
-
query:
|
|
877
|
-
mutation:
|
|
903
|
+
const $t = {
|
|
904
|
+
query: At,
|
|
905
|
+
mutation: Vt
|
|
878
906
|
};
|
|
879
907
|
export {
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
908
|
+
kt as a,
|
|
909
|
+
$t as b,
|
|
910
|
+
_t as u
|
|
883
911
|
};
|