@dismissible/react-client 0.3.1 → 0.3.2-canary.3.c1b8c41
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/README.md +286 -261
- package/dist/components/Dismissible.d.ts +3 -4
- package/dist/contexts/DismissibleContext.d.ts +3 -2
- package/dist/contexts/DismissibleProvider.d.ts +3 -1
- package/dist/dismissible-client.es.js +405 -357
- package/dist/dismissible-client.umd.js +1 -1
- package/dist/hooks/useDismissibleItem.d.ts +9 -7
- package/dist/mockServiceWorker.js +17 -12
- package/dist/root.d.ts +0 -1
- package/dist/types/dismissible.types.d.ts +7 -3
- package/dist/utils/auth.utils.d.ts +0 -6
- package/package.json +50 -31
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
1
|
+
var he = Object.defineProperty, me = Object.defineProperties;
|
|
2
|
+
var ye = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var M = Object.getOwnPropertySymbols;
|
|
4
|
+
var re = Object.prototype.hasOwnProperty, ne = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var te = (e, r, t) => r in e ? he(e, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[r] = t, b = (e, r) => {
|
|
6
6
|
for (var t in r || (r = {}))
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
for (var t of
|
|
10
|
-
|
|
7
|
+
re.call(r, t) && te(e, t, r[t]);
|
|
8
|
+
if (M)
|
|
9
|
+
for (var t of M(r))
|
|
10
|
+
ne.call(r, t) && te(e, t, r[t]);
|
|
11
11
|
return e;
|
|
12
|
-
},
|
|
13
|
-
var
|
|
12
|
+
}, E = (e, r) => me(e, ye(r));
|
|
13
|
+
var Q = (e, r) => {
|
|
14
14
|
var t = {};
|
|
15
15
|
for (var n in e)
|
|
16
|
-
|
|
17
|
-
if (e != null &&
|
|
18
|
-
for (var n of
|
|
19
|
-
r.indexOf(n) < 0 &&
|
|
16
|
+
re.call(e, n) && r.indexOf(n) < 0 && (t[n] = e[n]);
|
|
17
|
+
if (e != null && M)
|
|
18
|
+
for (var n of M(e))
|
|
19
|
+
r.indexOf(n) < 0 && ne.call(e, n) && (t[n] = e[n]);
|
|
20
20
|
return t;
|
|
21
21
|
};
|
|
22
|
-
var
|
|
23
|
-
var s = (
|
|
22
|
+
var $ = (e, r, t) => new Promise((n, o) => {
|
|
23
|
+
var s = (f) => {
|
|
24
24
|
try {
|
|
25
|
-
|
|
26
|
-
} catch (
|
|
27
|
-
|
|
25
|
+
l(t.next(f));
|
|
26
|
+
} catch (d) {
|
|
27
|
+
o(d);
|
|
28
28
|
}
|
|
29
|
-
},
|
|
29
|
+
}, i = (f) => {
|
|
30
30
|
try {
|
|
31
|
-
|
|
32
|
-
} catch (
|
|
33
|
-
|
|
31
|
+
l(t.throw(f));
|
|
32
|
+
} catch (d) {
|
|
33
|
+
o(d);
|
|
34
34
|
}
|
|
35
|
-
},
|
|
36
|
-
|
|
35
|
+
}, l = (f) => f.done ? n(f.value) : Promise.resolve(f.value).then(s, i);
|
|
36
|
+
l((t = t.apply(e, r)).next());
|
|
37
37
|
});
|
|
38
|
-
import { jsx as
|
|
39
|
-
import { createContext as
|
|
40
|
-
const
|
|
38
|
+
import { jsx as U, jsxs as be } from "react/jsx-runtime";
|
|
39
|
+
import { createContext as pe, useContext as we, useMemo as Y, useRef as J, useState as W, useCallback as V, useEffect as _ } from "react";
|
|
40
|
+
const ge = /\{[^{}]+\}/g, Ee = () => {
|
|
41
41
|
var e, r;
|
|
42
42
|
return typeof process == "object" && Number.parseInt((r = (e = process == null ? void 0 : process.versions) == null ? void 0 : e.node) == null ? void 0 : r.substring(0, 2)) >= 18 && process.versions.undici;
|
|
43
43
|
};
|
|
44
|
-
function
|
|
44
|
+
function Re() {
|
|
45
45
|
return Math.random().toString(36).slice(2, 11);
|
|
46
46
|
}
|
|
47
|
-
function
|
|
48
|
-
let
|
|
47
|
+
function ve(e) {
|
|
48
|
+
let A = b({}, e), {
|
|
49
49
|
baseUrl: r = "",
|
|
50
50
|
Request: t = globalThis.Request,
|
|
51
51
|
fetch: n = globalThis.fetch,
|
|
52
|
-
querySerializer:
|
|
52
|
+
querySerializer: o,
|
|
53
53
|
bodySerializer: s,
|
|
54
|
-
headers:
|
|
55
|
-
requestInitExt:
|
|
56
|
-
} =
|
|
54
|
+
headers: i,
|
|
55
|
+
requestInitExt: l = void 0
|
|
56
|
+
} = A, f = Q(A, [
|
|
57
57
|
"baseUrl",
|
|
58
58
|
"Request",
|
|
59
59
|
"fetch",
|
|
@@ -62,22 +62,23 @@ function Re(e) {
|
|
|
62
62
|
"headers",
|
|
63
63
|
"requestInitExt"
|
|
64
64
|
]);
|
|
65
|
-
|
|
66
|
-
const
|
|
67
|
-
function g(
|
|
68
|
-
return
|
|
69
|
-
var
|
|
70
|
-
const
|
|
71
|
-
baseUrl:
|
|
65
|
+
l = Ee() ? l : void 0, r = ie(r);
|
|
66
|
+
const d = [];
|
|
67
|
+
function g(u, a) {
|
|
68
|
+
return $(this, null, function* () {
|
|
69
|
+
var ee;
|
|
70
|
+
const Z = a || {}, {
|
|
71
|
+
baseUrl: R,
|
|
72
72
|
fetch: C = n,
|
|
73
|
-
Request:
|
|
74
|
-
headers:
|
|
75
|
-
params:
|
|
76
|
-
parseAs:
|
|
77
|
-
querySerializer:
|
|
78
|
-
bodySerializer:
|
|
79
|
-
body:
|
|
80
|
-
|
|
73
|
+
Request: O = t,
|
|
74
|
+
headers: x,
|
|
75
|
+
params: v = {},
|
|
76
|
+
parseAs: j = "json",
|
|
77
|
+
querySerializer: S,
|
|
78
|
+
bodySerializer: P = s != null ? s : xe,
|
|
79
|
+
body: z,
|
|
80
|
+
middleware: k = []
|
|
81
|
+
} = Z, c = Q(Z, [
|
|
81
82
|
"baseUrl",
|
|
82
83
|
"fetch",
|
|
83
84
|
"Request",
|
|
@@ -86,63 +87,64 @@ function Re(e) {
|
|
|
86
87
|
"parseAs",
|
|
87
88
|
"querySerializer",
|
|
88
89
|
"bodySerializer",
|
|
89
|
-
"body"
|
|
90
|
+
"body",
|
|
91
|
+
"middleware"
|
|
90
92
|
]);
|
|
91
|
-
let
|
|
92
|
-
|
|
93
|
-
let
|
|
94
|
-
|
|
95
|
-
const
|
|
96
|
-
|
|
93
|
+
let y = r;
|
|
94
|
+
R && (y = (ee = ie(R)) != null ? ee : r);
|
|
95
|
+
let h = typeof o == "function" ? o : se(o);
|
|
96
|
+
S && (h = typeof S == "function" ? S : se(b(b({}, typeof o == "object" ? o : {}), S)));
|
|
97
|
+
const H = z === void 0 ? void 0 : P(
|
|
98
|
+
z,
|
|
97
99
|
// Note: we declare mergeHeaders() both here and below because it’s a bit of a chicken-or-egg situation:
|
|
98
100
|
// bodySerializer() needs all headers so we aren’t dropping ones set by the user, however,
|
|
99
101
|
// the result of this ALSO sets the lowest-priority content-type header. So we re-merge below,
|
|
100
102
|
// setting the content-type at the very beginning to be overwritten.
|
|
101
103
|
// Lastly, based on the way headers work, it’s not a simple “present-or-not” check becauase null intentionally un-sets headers.
|
|
102
|
-
|
|
103
|
-
),
|
|
104
|
+
oe(i, x, v.header)
|
|
105
|
+
), G = oe(
|
|
104
106
|
// with no body, we should not to set Content-Type
|
|
105
|
-
|
|
106
|
-
|
|
107
|
+
H === void 0 || // if serialized body is FormData; browser will correctly set Content-Type & boundary expression
|
|
108
|
+
H instanceof FormData ? {} : {
|
|
107
109
|
"Content-Type": "application/json"
|
|
108
110
|
},
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
),
|
|
111
|
+
i,
|
|
112
|
+
x,
|
|
113
|
+
v.header
|
|
114
|
+
), D = [...d, ...k], de = E(b(b({
|
|
113
115
|
redirect: "follow"
|
|
114
|
-
},
|
|
115
|
-
body:
|
|
116
|
-
headers:
|
|
116
|
+
}, f), c), {
|
|
117
|
+
body: H,
|
|
118
|
+
headers: G
|
|
117
119
|
});
|
|
118
|
-
let
|
|
119
|
-
|
|
120
|
-
|
|
120
|
+
let F, L, T = new O(
|
|
121
|
+
Se(u, { baseUrl: y, params: v, querySerializer: h }),
|
|
122
|
+
de
|
|
121
123
|
), m;
|
|
122
|
-
for (const
|
|
123
|
-
|
|
124
|
-
if (
|
|
125
|
-
|
|
126
|
-
baseUrl:
|
|
124
|
+
for (const w in c)
|
|
125
|
+
w in T || (T[w] = c[w]);
|
|
126
|
+
if (D.length) {
|
|
127
|
+
F = Re(), L = Object.freeze({
|
|
128
|
+
baseUrl: y,
|
|
127
129
|
fetch: C,
|
|
128
|
-
parseAs:
|
|
129
|
-
querySerializer:
|
|
130
|
-
bodySerializer:
|
|
130
|
+
parseAs: j,
|
|
131
|
+
querySerializer: h,
|
|
132
|
+
bodySerializer: P
|
|
131
133
|
});
|
|
132
|
-
for (const
|
|
133
|
-
if (
|
|
134
|
-
const
|
|
135
|
-
request:
|
|
136
|
-
schemaPath:
|
|
137
|
-
params:
|
|
138
|
-
options:
|
|
139
|
-
id:
|
|
134
|
+
for (const w of D)
|
|
135
|
+
if (w && typeof w == "object" && typeof w.onRequest == "function") {
|
|
136
|
+
const p = yield w.onRequest({
|
|
137
|
+
request: T,
|
|
138
|
+
schemaPath: u,
|
|
139
|
+
params: v,
|
|
140
|
+
options: L,
|
|
141
|
+
id: F
|
|
140
142
|
});
|
|
141
|
-
if (
|
|
142
|
-
if (
|
|
143
|
-
|
|
144
|
-
else if (
|
|
145
|
-
m =
|
|
143
|
+
if (p)
|
|
144
|
+
if (p instanceof O)
|
|
145
|
+
T = p;
|
|
146
|
+
else if (p instanceof Response) {
|
|
147
|
+
m = p;
|
|
146
148
|
break;
|
|
147
149
|
} else
|
|
148
150
|
throw new Error("onRequest: must return new Request() or Response() when modifying the request");
|
|
@@ -150,124 +152,124 @@ function Re(e) {
|
|
|
150
152
|
}
|
|
151
153
|
if (!m) {
|
|
152
154
|
try {
|
|
153
|
-
m = yield C(
|
|
154
|
-
} catch (
|
|
155
|
-
let
|
|
156
|
-
if (
|
|
157
|
-
for (let
|
|
158
|
-
const
|
|
159
|
-
if (
|
|
160
|
-
const
|
|
161
|
-
request:
|
|
162
|
-
error:
|
|
163
|
-
schemaPath:
|
|
164
|
-
params:
|
|
165
|
-
options:
|
|
166
|
-
id:
|
|
155
|
+
m = yield C(T, l);
|
|
156
|
+
} catch (w) {
|
|
157
|
+
let p = w;
|
|
158
|
+
if (D.length)
|
|
159
|
+
for (let q = D.length - 1; q >= 0; q--) {
|
|
160
|
+
const N = D[q];
|
|
161
|
+
if (N && typeof N == "object" && typeof N.onError == "function") {
|
|
162
|
+
const I = yield N.onError({
|
|
163
|
+
request: T,
|
|
164
|
+
error: p,
|
|
165
|
+
schemaPath: u,
|
|
166
|
+
params: v,
|
|
167
|
+
options: L,
|
|
168
|
+
id: F
|
|
167
169
|
});
|
|
168
|
-
if (
|
|
169
|
-
if (
|
|
170
|
-
|
|
170
|
+
if (I) {
|
|
171
|
+
if (I instanceof Response) {
|
|
172
|
+
p = void 0, m = I;
|
|
171
173
|
break;
|
|
172
174
|
}
|
|
173
|
-
if (
|
|
174
|
-
|
|
175
|
+
if (I instanceof Error) {
|
|
176
|
+
p = I;
|
|
175
177
|
continue;
|
|
176
178
|
}
|
|
177
179
|
throw new Error("onError: must return new Response() or instance of Error");
|
|
178
180
|
}
|
|
179
181
|
}
|
|
180
182
|
}
|
|
181
|
-
if (
|
|
182
|
-
throw
|
|
183
|
+
if (p)
|
|
184
|
+
throw p;
|
|
183
185
|
}
|
|
184
|
-
if (
|
|
185
|
-
for (let
|
|
186
|
-
const
|
|
187
|
-
if (
|
|
188
|
-
const
|
|
189
|
-
request:
|
|
186
|
+
if (D.length)
|
|
187
|
+
for (let w = D.length - 1; w >= 0; w--) {
|
|
188
|
+
const p = D[w];
|
|
189
|
+
if (p && typeof p == "object" && typeof p.onResponse == "function") {
|
|
190
|
+
const q = yield p.onResponse({
|
|
191
|
+
request: T,
|
|
190
192
|
response: m,
|
|
191
|
-
schemaPath:
|
|
192
|
-
params:
|
|
193
|
-
options:
|
|
194
|
-
id:
|
|
193
|
+
schemaPath: u,
|
|
194
|
+
params: v,
|
|
195
|
+
options: L,
|
|
196
|
+
id: F
|
|
195
197
|
});
|
|
196
|
-
if (
|
|
197
|
-
if (!(
|
|
198
|
+
if (q) {
|
|
199
|
+
if (!(q instanceof Response))
|
|
198
200
|
throw new Error("onResponse: must return new Response() when modifying the response");
|
|
199
|
-
m =
|
|
201
|
+
m = q;
|
|
200
202
|
}
|
|
201
203
|
}
|
|
202
204
|
}
|
|
203
205
|
}
|
|
204
|
-
if (m.status === 204 ||
|
|
206
|
+
if (m.status === 204 || T.method === "HEAD" || m.headers.get("Content-Length") === "0")
|
|
205
207
|
return m.ok ? { data: void 0, response: m } : { error: void 0, response: m };
|
|
206
208
|
if (m.ok)
|
|
207
|
-
return
|
|
208
|
-
let
|
|
209
|
+
return j === "stream" ? { data: m.body, response: m } : { data: yield m[j](), response: m };
|
|
210
|
+
let K = yield m.text();
|
|
209
211
|
try {
|
|
210
|
-
|
|
211
|
-
} catch (
|
|
212
|
+
K = JSON.parse(K);
|
|
213
|
+
} catch (w) {
|
|
212
214
|
}
|
|
213
|
-
return { error:
|
|
215
|
+
return { error: K, response: m };
|
|
214
216
|
});
|
|
215
217
|
}
|
|
216
218
|
return {
|
|
217
|
-
request(
|
|
218
|
-
return g(a,
|
|
219
|
+
request(u, a, R) {
|
|
220
|
+
return g(a, E(b({}, R), { method: u.toUpperCase() }));
|
|
219
221
|
},
|
|
220
222
|
/** Call a GET endpoint */
|
|
221
|
-
GET(
|
|
222
|
-
return g(
|
|
223
|
+
GET(u, a) {
|
|
224
|
+
return g(u, E(b({}, a), { method: "GET" }));
|
|
223
225
|
},
|
|
224
226
|
/** Call a PUT endpoint */
|
|
225
|
-
PUT(
|
|
226
|
-
return g(
|
|
227
|
+
PUT(u, a) {
|
|
228
|
+
return g(u, E(b({}, a), { method: "PUT" }));
|
|
227
229
|
},
|
|
228
230
|
/** Call a POST endpoint */
|
|
229
|
-
POST(
|
|
230
|
-
return g(
|
|
231
|
+
POST(u, a) {
|
|
232
|
+
return g(u, E(b({}, a), { method: "POST" }));
|
|
231
233
|
},
|
|
232
234
|
/** Call a DELETE endpoint */
|
|
233
|
-
DELETE(
|
|
234
|
-
return g(
|
|
235
|
+
DELETE(u, a) {
|
|
236
|
+
return g(u, E(b({}, a), { method: "DELETE" }));
|
|
235
237
|
},
|
|
236
238
|
/** Call a OPTIONS endpoint */
|
|
237
|
-
OPTIONS(
|
|
238
|
-
return g(
|
|
239
|
+
OPTIONS(u, a) {
|
|
240
|
+
return g(u, E(b({}, a), { method: "OPTIONS" }));
|
|
239
241
|
},
|
|
240
242
|
/** Call a HEAD endpoint */
|
|
241
|
-
HEAD(
|
|
242
|
-
return g(
|
|
243
|
+
HEAD(u, a) {
|
|
244
|
+
return g(u, E(b({}, a), { method: "HEAD" }));
|
|
243
245
|
},
|
|
244
246
|
/** Call a PATCH endpoint */
|
|
245
|
-
PATCH(
|
|
246
|
-
return g(
|
|
247
|
+
PATCH(u, a) {
|
|
248
|
+
return g(u, E(b({}, a), { method: "PATCH" }));
|
|
247
249
|
},
|
|
248
250
|
/** Call a TRACE endpoint */
|
|
249
|
-
TRACE(
|
|
250
|
-
return g(
|
|
251
|
+
TRACE(u, a) {
|
|
252
|
+
return g(u, E(b({}, a), { method: "TRACE" }));
|
|
251
253
|
},
|
|
252
254
|
/** Register middleware */
|
|
253
|
-
use(...
|
|
254
|
-
for (const a of
|
|
255
|
+
use(...u) {
|
|
256
|
+
for (const a of u)
|
|
255
257
|
if (a) {
|
|
256
258
|
if (typeof a != "object" || !("onRequest" in a || "onResponse" in a || "onError" in a))
|
|
257
259
|
throw new Error("Middleware must be an object with one of `onRequest()`, `onResponse() or `onError()`");
|
|
258
|
-
|
|
260
|
+
d.push(a);
|
|
259
261
|
}
|
|
260
262
|
},
|
|
261
263
|
/** Unregister middleware */
|
|
262
|
-
eject(...
|
|
263
|
-
for (const a of
|
|
264
|
-
const
|
|
265
|
-
|
|
264
|
+
eject(...u) {
|
|
265
|
+
for (const a of u) {
|
|
266
|
+
const R = d.indexOf(a);
|
|
267
|
+
R !== -1 && d.splice(R, 1);
|
|
266
268
|
}
|
|
267
269
|
}
|
|
268
270
|
};
|
|
269
271
|
}
|
|
270
|
-
function
|
|
272
|
+
function B(e, r, t) {
|
|
271
273
|
if (r == null)
|
|
272
274
|
return "";
|
|
273
275
|
if (typeof r == "object")
|
|
@@ -276,69 +278,69 @@ function N(e, r, t) {
|
|
|
276
278
|
);
|
|
277
279
|
return `${e}=${(t == null ? void 0 : t.allowReserved) === !0 ? r : encodeURIComponent(r)}`;
|
|
278
280
|
}
|
|
279
|
-
function
|
|
281
|
+
function le(e, r, t) {
|
|
280
282
|
if (!r || typeof r != "object")
|
|
281
283
|
return "";
|
|
282
|
-
const n = [],
|
|
284
|
+
const n = [], o = {
|
|
283
285
|
simple: ",",
|
|
284
286
|
label: ".",
|
|
285
287
|
matrix: ";"
|
|
286
288
|
}[t.style] || "&";
|
|
287
289
|
if (t.style !== "deepObject" && t.explode === !1) {
|
|
288
|
-
for (const
|
|
289
|
-
n.push(
|
|
290
|
-
const
|
|
290
|
+
for (const l in r)
|
|
291
|
+
n.push(l, t.allowReserved === !0 ? r[l] : encodeURIComponent(r[l]));
|
|
292
|
+
const i = n.join(",");
|
|
291
293
|
switch (t.style) {
|
|
292
294
|
case "form":
|
|
293
|
-
return `${e}=${
|
|
295
|
+
return `${e}=${i}`;
|
|
294
296
|
case "label":
|
|
295
|
-
return `.${
|
|
297
|
+
return `.${i}`;
|
|
296
298
|
case "matrix":
|
|
297
|
-
return `;${e}=${
|
|
299
|
+
return `;${e}=${i}`;
|
|
298
300
|
default:
|
|
299
|
-
return
|
|
301
|
+
return i;
|
|
300
302
|
}
|
|
301
303
|
}
|
|
302
|
-
for (const
|
|
303
|
-
const
|
|
304
|
-
n.push(
|
|
304
|
+
for (const i in r) {
|
|
305
|
+
const l = t.style === "deepObject" ? `${e}[${i}]` : i;
|
|
306
|
+
n.push(B(l, r[i], t));
|
|
305
307
|
}
|
|
306
|
-
const s = n.join(
|
|
307
|
-
return t.style === "label" || t.style === "matrix" ? `${
|
|
308
|
+
const s = n.join(o);
|
|
309
|
+
return t.style === "label" || t.style === "matrix" ? `${o}${s}` : s;
|
|
308
310
|
}
|
|
309
|
-
function
|
|
311
|
+
function ue(e, r, t) {
|
|
310
312
|
if (!Array.isArray(r))
|
|
311
313
|
return "";
|
|
312
314
|
if (t.explode === !1) {
|
|
313
|
-
const s = { form: ",", spaceDelimited: "%20", pipeDelimited: "|" }[t.style] || ",",
|
|
315
|
+
const s = { form: ",", spaceDelimited: "%20", pipeDelimited: "|" }[t.style] || ",", i = (t.allowReserved === !0 ? r : r.map((l) => encodeURIComponent(l))).join(s);
|
|
314
316
|
switch (t.style) {
|
|
315
317
|
case "simple":
|
|
316
|
-
return
|
|
318
|
+
return i;
|
|
317
319
|
case "label":
|
|
318
|
-
return `.${
|
|
320
|
+
return `.${i}`;
|
|
319
321
|
case "matrix":
|
|
320
|
-
return `;${e}=${
|
|
322
|
+
return `;${e}=${i}`;
|
|
321
323
|
default:
|
|
322
|
-
return `${e}=${
|
|
324
|
+
return `${e}=${i}`;
|
|
323
325
|
}
|
|
324
326
|
}
|
|
325
|
-
const n = { simple: ",", label: ".", matrix: ";" }[t.style] || "&",
|
|
327
|
+
const n = { simple: ",", label: ".", matrix: ";" }[t.style] || "&", o = [];
|
|
326
328
|
for (const s of r)
|
|
327
|
-
t.style === "simple" || t.style === "label" ?
|
|
328
|
-
return t.style === "label" || t.style === "matrix" ? `${n}${
|
|
329
|
+
t.style === "simple" || t.style === "label" ? o.push(t.allowReserved === !0 ? s : encodeURIComponent(s)) : o.push(B(e, s, t));
|
|
330
|
+
return t.style === "label" || t.style === "matrix" ? `${n}${o.join(n)}` : o.join(n);
|
|
329
331
|
}
|
|
330
|
-
function
|
|
332
|
+
function se(e) {
|
|
331
333
|
return function(t) {
|
|
332
334
|
const n = [];
|
|
333
335
|
if (t && typeof t == "object")
|
|
334
|
-
for (const
|
|
335
|
-
const s = t[
|
|
336
|
+
for (const o in t) {
|
|
337
|
+
const s = t[o];
|
|
336
338
|
if (s != null) {
|
|
337
339
|
if (Array.isArray(s)) {
|
|
338
340
|
if (s.length === 0)
|
|
339
341
|
continue;
|
|
340
342
|
n.push(
|
|
341
|
-
|
|
343
|
+
ue(o, s, E(b({
|
|
342
344
|
style: "form",
|
|
343
345
|
explode: !0
|
|
344
346
|
}, e == null ? void 0 : e.array), {
|
|
@@ -349,7 +351,7 @@ function ee(e) {
|
|
|
349
351
|
}
|
|
350
352
|
if (typeof s == "object") {
|
|
351
353
|
n.push(
|
|
352
|
-
|
|
354
|
+
le(o, s, E(b({
|
|
353
355
|
style: "deepObject",
|
|
354
356
|
explode: !0
|
|
355
357
|
}, e == null ? void 0 : e.object), {
|
|
@@ -358,275 +360,313 @@ function ee(e) {
|
|
|
358
360
|
);
|
|
359
361
|
continue;
|
|
360
362
|
}
|
|
361
|
-
n.push(
|
|
363
|
+
n.push(B(o, s, e));
|
|
362
364
|
}
|
|
363
365
|
}
|
|
364
366
|
return n.join("&");
|
|
365
367
|
};
|
|
366
368
|
}
|
|
367
|
-
function
|
|
369
|
+
function Ce(e, r) {
|
|
368
370
|
var n;
|
|
369
371
|
let t = e;
|
|
370
|
-
for (const
|
|
371
|
-
let s =
|
|
372
|
-
if (s.endsWith("*") && (
|
|
372
|
+
for (const o of (n = e.match(ge)) != null ? n : []) {
|
|
373
|
+
let s = o.substring(1, o.length - 1), i = !1, l = "simple";
|
|
374
|
+
if (s.endsWith("*") && (i = !0, s = s.substring(0, s.length - 1)), s.startsWith(".") ? (l = "label", s = s.substring(1)) : s.startsWith(";") && (l = "matrix", s = s.substring(1)), !r || r[s] === void 0 || r[s] === null)
|
|
373
375
|
continue;
|
|
374
|
-
const
|
|
375
|
-
if (Array.isArray(
|
|
376
|
-
t = t.replace(
|
|
376
|
+
const f = r[s];
|
|
377
|
+
if (Array.isArray(f)) {
|
|
378
|
+
t = t.replace(o, ue(s, f, { style: l, explode: i }));
|
|
377
379
|
continue;
|
|
378
380
|
}
|
|
379
|
-
if (typeof
|
|
380
|
-
t = t.replace(
|
|
381
|
+
if (typeof f == "object") {
|
|
382
|
+
t = t.replace(o, le(s, f, { style: l, explode: i }));
|
|
381
383
|
continue;
|
|
382
384
|
}
|
|
383
|
-
if (
|
|
384
|
-
t = t.replace(
|
|
385
|
+
if (l === "matrix") {
|
|
386
|
+
t = t.replace(o, `;${B(s, f)}`);
|
|
385
387
|
continue;
|
|
386
388
|
}
|
|
387
|
-
t = t.replace(
|
|
389
|
+
t = t.replace(o, l === "label" ? `.${encodeURIComponent(f)}` : encodeURIComponent(f));
|
|
388
390
|
}
|
|
389
391
|
return t;
|
|
390
392
|
}
|
|
391
|
-
function
|
|
393
|
+
function xe(e, r) {
|
|
392
394
|
var t, n;
|
|
393
395
|
return e instanceof FormData ? e : r && (r.get instanceof Function ? (t = r.get("Content-Type")) != null ? t : r.get("content-type") : (n = r["Content-Type"]) != null ? n : r["content-type"]) === "application/x-www-form-urlencoded" ? new URLSearchParams(e).toString() : JSON.stringify(e);
|
|
394
396
|
}
|
|
395
|
-
function
|
|
396
|
-
var
|
|
397
|
+
function Se(e, r) {
|
|
398
|
+
var o, s;
|
|
397
399
|
let t = `${r.baseUrl}${e}`;
|
|
398
|
-
(
|
|
400
|
+
(o = r.params) != null && o.path && (t = Ce(t, r.params.path));
|
|
399
401
|
let n = r.querySerializer((s = r.params.query) != null ? s : {});
|
|
400
402
|
return n.startsWith("?") && (n = n.substring(1)), n && (t += `?${n}`), t;
|
|
401
403
|
}
|
|
402
|
-
function
|
|
404
|
+
function oe(...e) {
|
|
403
405
|
const r = new Headers();
|
|
404
406
|
for (const t of e) {
|
|
405
407
|
if (!t || typeof t != "object")
|
|
406
408
|
continue;
|
|
407
409
|
const n = t instanceof Headers ? t.entries() : Object.entries(t);
|
|
408
|
-
for (const [
|
|
410
|
+
for (const [o, s] of n)
|
|
409
411
|
if (s === null)
|
|
410
|
-
r.delete(
|
|
412
|
+
r.delete(o);
|
|
411
413
|
else if (Array.isArray(s))
|
|
412
|
-
for (const
|
|
413
|
-
r.append(
|
|
414
|
-
else s !== void 0 && r.set(
|
|
414
|
+
for (const i of s)
|
|
415
|
+
r.append(o, i);
|
|
416
|
+
else s !== void 0 && r.set(o, s);
|
|
415
417
|
}
|
|
416
418
|
return r;
|
|
417
419
|
}
|
|
418
|
-
function
|
|
420
|
+
function ie(e) {
|
|
419
421
|
return e.endsWith("/") ? e.substring(0, e.length - 1) : e;
|
|
420
422
|
}
|
|
421
|
-
const
|
|
422
|
-
baseUrl: "http://localhost:3200"
|
|
423
|
-
}, je = {
|
|
424
|
-
development: {
|
|
425
|
-
baseUrl: "http://localhost:3200"
|
|
426
|
-
},
|
|
427
|
-
staging: {
|
|
428
|
-
baseUrl: "https://api.staging.dismissible.io"
|
|
429
|
-
},
|
|
430
|
-
production: {
|
|
431
|
-
// Use Vite's import.meta.env instead of process.env
|
|
432
|
-
// baseUrl: import.meta.env.VITE_API_BASE_URL || "https://api.dismissible.io",
|
|
433
|
-
baseUrl: "https://api.dismissible.io"
|
|
434
|
-
}
|
|
435
|
-
}, Ie = () => je["production"] || Ae, ne = (e, r, t) => {
|
|
423
|
+
const ae = (e, r, t) => {
|
|
436
424
|
try {
|
|
437
|
-
const n = `${r}_${e}`,
|
|
438
|
-
if (!
|
|
439
|
-
const { data: s, timestamp:
|
|
440
|
-
return t && Date.now() -
|
|
425
|
+
const n = `${r}_${e}`, o = localStorage.getItem(n);
|
|
426
|
+
if (!o) return null;
|
|
427
|
+
const { data: s, timestamp: i } = JSON.parse(o);
|
|
428
|
+
return t && Date.now() - i > t ? (localStorage.removeItem(n), null) : s;
|
|
441
429
|
} catch (n) {
|
|
442
430
|
return null;
|
|
443
431
|
}
|
|
444
|
-
},
|
|
432
|
+
}, X = (e, r, t) => {
|
|
445
433
|
try {
|
|
446
|
-
const n = `${t}_${e}`,
|
|
434
|
+
const n = `${t}_${e}`, o = {
|
|
447
435
|
data: r,
|
|
448
436
|
timestamp: Date.now()
|
|
449
437
|
};
|
|
450
|
-
localStorage.setItem(n, JSON.stringify(
|
|
438
|
+
localStorage.setItem(n, JSON.stringify(o));
|
|
451
439
|
} catch (n) {
|
|
452
440
|
console.warn("Failed to cache dismissible item:", n);
|
|
453
441
|
}
|
|
454
|
-
},
|
|
442
|
+
}, ce = (e, r) => {
|
|
455
443
|
try {
|
|
456
444
|
const t = `${r}_${e}`;
|
|
457
445
|
localStorage.removeItem(t);
|
|
458
446
|
} catch (t) {
|
|
459
447
|
console.warn("Failed to remove cached dismissible item:", t);
|
|
460
448
|
}
|
|
461
|
-
},
|
|
449
|
+
}, fe = pe(
|
|
462
450
|
null
|
|
463
|
-
),
|
|
464
|
-
|
|
451
|
+
), $e = () => {
|
|
452
|
+
const e = we(fe);
|
|
453
|
+
if (!e)
|
|
454
|
+
throw new Error(
|
|
455
|
+
"useDismissibleContext must be used within a DismissibleProvider"
|
|
456
|
+
);
|
|
457
|
+
return e;
|
|
458
|
+
}, Ae = "dismissible", je = (e, r = {}) => {
|
|
459
|
+
var k;
|
|
465
460
|
const {
|
|
466
461
|
initialData: t,
|
|
467
462
|
enableCache: n = !0,
|
|
468
|
-
cachePrefix:
|
|
463
|
+
cachePrefix: o = Ae,
|
|
469
464
|
cacheExpiration: s
|
|
470
|
-
} = r,
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
headers: {}
|
|
475
|
-
});
|
|
476
|
-
}, [o]), c = B(() => !!(o != null && o.jwt) ? `${e}-auth` : e, [e, o == null ? void 0 : o.jwt]), h = M({
|
|
465
|
+
} = r, i = $e(), { userId: l } = i, f = Y(() => ve({
|
|
466
|
+
baseUrl: i.baseUrl,
|
|
467
|
+
headers: {}
|
|
468
|
+
}), [i.baseUrl]), d = Y(() => `${l}-${e}`, [l, e]), g = J({
|
|
477
469
|
enableCache: n,
|
|
478
|
-
cachePrefix:
|
|
470
|
+
cachePrefix: o,
|
|
479
471
|
cacheExpiration: s
|
|
480
|
-
}),
|
|
472
|
+
}), A = J(e), u = J(d), a = J(null), [R, C] = W(!1), [O, x] = W(null), [v, j] = W(() => {
|
|
481
473
|
if (t) return t;
|
|
482
474
|
if (n) {
|
|
483
|
-
const
|
|
484
|
-
|
|
485
|
-
|
|
475
|
+
const c = ae(
|
|
476
|
+
d,
|
|
477
|
+
o,
|
|
486
478
|
s
|
|
487
479
|
);
|
|
488
|
-
if (
|
|
480
|
+
if (c) return c;
|
|
489
481
|
}
|
|
490
|
-
}),
|
|
491
|
-
var
|
|
482
|
+
}), S = V(() => $(void 0, null, function* () {
|
|
483
|
+
var y;
|
|
492
484
|
if (n) {
|
|
493
|
-
const
|
|
494
|
-
|
|
495
|
-
|
|
485
|
+
const h = ae(
|
|
486
|
+
d,
|
|
487
|
+
o,
|
|
496
488
|
s
|
|
497
489
|
);
|
|
498
|
-
if (
|
|
499
|
-
|
|
490
|
+
if (h != null && h.dismissedAt) {
|
|
491
|
+
j(h), C(!1);
|
|
500
492
|
return;
|
|
501
493
|
}
|
|
502
494
|
}
|
|
503
|
-
a
|
|
495
|
+
(y = a.current) == null || y.abort();
|
|
496
|
+
const c = new AbortController();
|
|
497
|
+
a.current = c, C(!0), x(null);
|
|
504
498
|
try {
|
|
505
|
-
const
|
|
506
|
-
"/v1/dismissible/{itemId}",
|
|
499
|
+
const h = yield i.getAuthHeaders(), { data: H, error: G } = yield f.GET(
|
|
500
|
+
"/v1/user/{userId}/dismissible-item/{itemId}",
|
|
507
501
|
{
|
|
508
502
|
params: {
|
|
509
503
|
path: {
|
|
504
|
+
userId: l,
|
|
510
505
|
itemId: e
|
|
511
506
|
}
|
|
512
507
|
},
|
|
513
|
-
headers:
|
|
508
|
+
headers: h,
|
|
509
|
+
signal: c.signal
|
|
514
510
|
}
|
|
515
511
|
);
|
|
516
|
-
if (
|
|
517
|
-
throw new Error(
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
512
|
+
if (G || !H)
|
|
513
|
+
throw new Error("Failed to fetch dismissible item");
|
|
514
|
+
j(H.data), n && X(d, H.data, o);
|
|
515
|
+
} catch (h) {
|
|
516
|
+
if (h instanceof Error && h.name === "AbortError")
|
|
517
|
+
return;
|
|
518
|
+
x(
|
|
519
|
+
h instanceof Error ? h : new Error("Unknown error occurred")
|
|
524
520
|
);
|
|
525
521
|
} finally {
|
|
526
|
-
|
|
522
|
+
C(!1);
|
|
527
523
|
}
|
|
528
524
|
}), [
|
|
529
525
|
e,
|
|
530
|
-
|
|
526
|
+
l,
|
|
527
|
+
d,
|
|
531
528
|
n,
|
|
532
|
-
|
|
529
|
+
o,
|
|
533
530
|
s,
|
|
534
|
-
|
|
535
|
-
|
|
531
|
+
f,
|
|
532
|
+
i
|
|
536
533
|
]);
|
|
537
|
-
|
|
538
|
-
const
|
|
539
|
-
|
|
540
|
-
}, [e,
|
|
541
|
-
|
|
542
|
-
(
|
|
534
|
+
_(() => {
|
|
535
|
+
const c = A.current !== e, y = u.current !== d;
|
|
536
|
+
c || y ? (A.current = e, u.current = d, S()) : t || S();
|
|
537
|
+
}, [e, d, t, S]), _(() => () => {
|
|
538
|
+
var c;
|
|
539
|
+
(c = a.current) == null || c.abort();
|
|
540
|
+
}, []), _(() => {
|
|
541
|
+
const c = g.current;
|
|
542
|
+
(c.enableCache !== n || c.cachePrefix !== o || c.cacheExpiration !== s) && (c.cachePrefix !== o && ce(d, c.cachePrefix), !n && c.enableCache && ce(d, c.cachePrefix), g.current = {
|
|
543
543
|
enableCache: n,
|
|
544
|
-
cachePrefix:
|
|
544
|
+
cachePrefix: o,
|
|
545
545
|
cacheExpiration: s
|
|
546
|
-
},
|
|
547
|
-
}, [n,
|
|
548
|
-
const
|
|
549
|
-
|
|
550
|
-
C(null);
|
|
546
|
+
}, S());
|
|
547
|
+
}, [n, o, s, d, S]);
|
|
548
|
+
const P = V(() => $(void 0, null, function* () {
|
|
549
|
+
x(null);
|
|
551
550
|
try {
|
|
552
|
-
const
|
|
553
|
-
"/v1/dismissible/{itemId}",
|
|
551
|
+
const c = yield i.getAuthHeaders(), { data: y, error: h } = yield f.DELETE(
|
|
552
|
+
"/v1/user/{userId}/dismissible-item/{itemId}",
|
|
554
553
|
{
|
|
555
554
|
params: {
|
|
556
555
|
path: {
|
|
556
|
+
userId: l,
|
|
557
557
|
itemId: e
|
|
558
558
|
}
|
|
559
559
|
},
|
|
560
|
-
headers:
|
|
560
|
+
headers: c
|
|
561
561
|
}
|
|
562
562
|
);
|
|
563
|
-
if (
|
|
564
|
-
throw new Error(
|
|
565
|
-
|
|
566
|
-
} catch (
|
|
567
|
-
throw
|
|
568
|
-
|
|
569
|
-
),
|
|
563
|
+
if (h || !y)
|
|
564
|
+
throw new Error("Failed to dismiss item");
|
|
565
|
+
j(y.data), n && X(d, y.data, o);
|
|
566
|
+
} catch (c) {
|
|
567
|
+
throw x(
|
|
568
|
+
c instanceof Error ? c : new Error("Failed to dismiss item")
|
|
569
|
+
), c;
|
|
570
|
+
}
|
|
571
|
+
}), [
|
|
572
|
+
e,
|
|
573
|
+
l,
|
|
574
|
+
d,
|
|
575
|
+
n,
|
|
576
|
+
o,
|
|
577
|
+
f,
|
|
578
|
+
i
|
|
579
|
+
]), z = V(() => $(void 0, null, function* () {
|
|
580
|
+
x(null);
|
|
581
|
+
try {
|
|
582
|
+
const c = yield i.getAuthHeaders(), { data: y, error: h } = yield f.POST(
|
|
583
|
+
"/v1/user/{userId}/dismissible-item/{itemId}",
|
|
584
|
+
{
|
|
585
|
+
params: {
|
|
586
|
+
path: {
|
|
587
|
+
userId: l,
|
|
588
|
+
itemId: e
|
|
589
|
+
}
|
|
590
|
+
},
|
|
591
|
+
headers: c
|
|
592
|
+
}
|
|
593
|
+
);
|
|
594
|
+
if (h || !y)
|
|
595
|
+
throw new Error("Failed to restore item");
|
|
596
|
+
j(y.data), n && X(d, y.data, o);
|
|
597
|
+
} catch (c) {
|
|
598
|
+
throw x(
|
|
599
|
+
c instanceof Error ? c : new Error("Failed to restore item")
|
|
600
|
+
), c;
|
|
570
601
|
}
|
|
571
|
-
}), [
|
|
602
|
+
}), [
|
|
603
|
+
e,
|
|
604
|
+
l,
|
|
605
|
+
d,
|
|
606
|
+
n,
|
|
607
|
+
o,
|
|
608
|
+
f,
|
|
609
|
+
i
|
|
610
|
+
]);
|
|
572
611
|
return {
|
|
573
|
-
dismissedOn: (
|
|
574
|
-
dismiss:
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
612
|
+
dismissedOn: (k = v == null ? void 0 : v.dismissedAt) != null ? k : null,
|
|
613
|
+
dismiss: P,
|
|
614
|
+
restore: z,
|
|
615
|
+
isLoading: R,
|
|
616
|
+
error: O,
|
|
617
|
+
item: v
|
|
578
618
|
};
|
|
579
|
-
},
|
|
580
|
-
error: e
|
|
581
|
-
}) => /* @__PURE__ */ oe("div", { className: "dismissible-error", role: "alert", children: [
|
|
582
|
-
"Error loading dismissible item: ",
|
|
583
|
-
e.message
|
|
584
|
-
] }), xe = ({ id: e, onDismiss: r, ariaLabel: t }) => /* @__PURE__ */ x(
|
|
619
|
+
}, De = () => /* @__PURE__ */ U("div", { className: "dismissible-loading", "aria-live": "polite", children: "Loading..." }), Te = () => /* @__PURE__ */ U("div", { className: "dismissible-error", role: "alert", children: "Unable to load content. Please try again later." }), Ue = ({ onDismiss: e, ariaLabel: r }) => /* @__PURE__ */ U(
|
|
585
620
|
"button",
|
|
586
621
|
{
|
|
587
|
-
id: e,
|
|
588
622
|
className: "dismissible-button",
|
|
589
|
-
onClick:
|
|
590
|
-
"aria-label":
|
|
623
|
+
onClick: e,
|
|
624
|
+
"aria-label": r,
|
|
591
625
|
type: "button",
|
|
592
626
|
children: "×"
|
|
593
627
|
}
|
|
594
628
|
), ke = ({
|
|
595
|
-
|
|
629
|
+
itemId: e,
|
|
596
630
|
children: r,
|
|
597
631
|
onDismiss: t,
|
|
598
|
-
LoadingComponent: n =
|
|
599
|
-
ErrorComponent:
|
|
600
|
-
DismissButtonComponent: s =
|
|
601
|
-
enableCache:
|
|
602
|
-
cachePrefix:
|
|
603
|
-
cacheExpiration:
|
|
604
|
-
ignoreErrors:
|
|
632
|
+
LoadingComponent: n = De,
|
|
633
|
+
ErrorComponent: o = Te,
|
|
634
|
+
DismissButtonComponent: s = Ue,
|
|
635
|
+
enableCache: i,
|
|
636
|
+
cachePrefix: l,
|
|
637
|
+
cacheExpiration: f,
|
|
638
|
+
ignoreErrors: d = !1
|
|
605
639
|
}) => {
|
|
606
|
-
const { dismissedOn: g, isLoading:
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
640
|
+
const { dismissedOn: g, isLoading: A, error: u, dismiss: a } = je(
|
|
641
|
+
e,
|
|
642
|
+
{
|
|
643
|
+
enableCache: i,
|
|
644
|
+
cachePrefix: l,
|
|
645
|
+
cacheExpiration: f
|
|
646
|
+
}
|
|
647
|
+
), [R, C] = W(!1);
|
|
648
|
+
_(() => {
|
|
649
|
+
C(!1);
|
|
650
|
+
}, [e]);
|
|
651
|
+
const O = () => $(void 0, null, function* () {
|
|
611
652
|
C(!0);
|
|
612
653
|
try {
|
|
613
654
|
yield a(), t == null || t();
|
|
614
|
-
} catch (
|
|
655
|
+
} catch (x) {
|
|
615
656
|
C(!1);
|
|
616
657
|
}
|
|
617
658
|
});
|
|
618
|
-
return
|
|
619
|
-
/* @__PURE__ */
|
|
620
|
-
s ? /* @__PURE__ */
|
|
659
|
+
return A && n ? /* @__PURE__ */ U(n, { itemId: e }) : A && !n ? null : u && o && !d ? /* @__PURE__ */ U(o, { itemId: e, error: u }) : g || R ? null : /* @__PURE__ */ be("div", { className: "dismissible-container", children: [
|
|
660
|
+
/* @__PURE__ */ U("div", { className: "dismissible-content", children: r }),
|
|
661
|
+
s ? /* @__PURE__ */ U(
|
|
621
662
|
s,
|
|
622
663
|
{
|
|
623
|
-
|
|
624
|
-
onDismiss: $,
|
|
664
|
+
onDismiss: O,
|
|
625
665
|
ariaLabel: `Dismiss ${e}`
|
|
626
666
|
}
|
|
627
667
|
) : null
|
|
628
668
|
] });
|
|
629
|
-
},
|
|
669
|
+
}, He = (e) => $(void 0, null, function* () {
|
|
630
670
|
if (typeof e == "function")
|
|
631
671
|
try {
|
|
632
672
|
const r = e();
|
|
@@ -636,37 +676,45 @@ const Ae = {
|
|
|
636
676
|
return;
|
|
637
677
|
}
|
|
638
678
|
return e;
|
|
639
|
-
}),
|
|
640
|
-
const r = yield
|
|
679
|
+
}), qe = (e) => $(void 0, null, function* () {
|
|
680
|
+
const r = yield He(e);
|
|
641
681
|
return r ? { Authorization: `Bearer ${r}` } : {};
|
|
642
|
-
}),
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
682
|
+
}), Oe = (e) => {
|
|
683
|
+
try {
|
|
684
|
+
const r = new URL(e), t = r.hostname === "localhost" || r.hostname === "127.0.0.1" || r.hostname === "[::1]", n = r.protocol === "https:";
|
|
685
|
+
return { isSecure: n || t, isLocalhost: t, isHttps: n };
|
|
686
|
+
} catch (r) {
|
|
687
|
+
return { isSecure: !1, isLocalhost: !1, isHttps: !1 };
|
|
688
|
+
}
|
|
689
|
+
}, Fe = ({
|
|
690
|
+
userId: e,
|
|
691
|
+
jwt: r,
|
|
692
|
+
baseUrl: t,
|
|
693
|
+
children: n
|
|
649
694
|
}) => {
|
|
650
|
-
const
|
|
695
|
+
const { isSecure: o } = Oe(t);
|
|
696
|
+
o || console.warn(
|
|
697
|
+
`[dismissible] Insecure baseUrl "${t}". Use https:// in production (or localhost for development). JWT tokens may be exposed over insecure connections.`
|
|
698
|
+
);
|
|
699
|
+
const s = Y(
|
|
651
700
|
() => ({
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
701
|
+
userId: e,
|
|
702
|
+
jwt: r,
|
|
703
|
+
baseUrl: t,
|
|
704
|
+
getAuthHeaders: () => $(void 0, null, function* () {
|
|
705
|
+
return yield qe(r);
|
|
656
706
|
})
|
|
657
707
|
}),
|
|
658
|
-
[e, r]
|
|
708
|
+
[e, r, t]
|
|
659
709
|
);
|
|
660
|
-
return /* @__PURE__ */
|
|
661
|
-
}
|
|
710
|
+
return /* @__PURE__ */ U(fe.Provider, { value: s, children: n });
|
|
711
|
+
};
|
|
662
712
|
export {
|
|
663
713
|
ke as Dismissible,
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
He as
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
Se as useDismissibleContext,
|
|
671
|
-
De as useDismissibleItem
|
|
714
|
+
fe as DismissibleContext,
|
|
715
|
+
Fe as DismissibleProvider,
|
|
716
|
+
qe as getAuthHeaders,
|
|
717
|
+
He as resolveJwt,
|
|
718
|
+
$e as useDismissibleContext,
|
|
719
|
+
je as useDismissibleItem
|
|
672
720
|
};
|