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