hookery 1.0.0 → 1.0.1

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.
Files changed (98) hide show
  1. package/README.md +28 -26
  2. package/dist/index.d.ts +147 -1
  3. package/dist/index.js +10 -4304
  4. package/dist/index.mjs +10 -4164
  5. package/package.json +10 -81
  6. package/dist/bridges/auth0.d.mts +0 -16
  7. package/dist/bridges/auth0.d.ts +0 -16
  8. package/dist/bridges/auth0.js +0 -3015
  9. package/dist/bridges/auth0.js.map +0 -1
  10. package/dist/bridges/auth0.mjs +0 -2977
  11. package/dist/bridges/auth0.mjs.map +0 -1
  12. package/dist/bridges/axios.d.mts +0 -17
  13. package/dist/bridges/axios.d.ts +0 -17
  14. package/dist/bridges/axios.js +0 -15351
  15. package/dist/bridges/axios.js.map +0 -1
  16. package/dist/bridges/axios.mjs +0 -15347
  17. package/dist/bridges/axios.mjs.map +0 -1
  18. package/dist/bridges/clerk.d.mts +0 -1
  19. package/dist/bridges/clerk.d.ts +0 -1
  20. package/dist/bridges/clerk.js +0 -5991
  21. package/dist/bridges/clerk.js.map +0 -1
  22. package/dist/bridges/clerk.mjs +0 -5985
  23. package/dist/bridges/clerk.mjs.map +0 -1
  24. package/dist/bridges/firebase.d.mts +0 -14
  25. package/dist/bridges/firebase.d.ts +0 -14
  26. package/dist/bridges/firebase.js +0 -52
  27. package/dist/bridges/firebase.js.map +0 -1
  28. package/dist/bridges/firebase.mjs +0 -25
  29. package/dist/bridges/firebase.mjs.map +0 -1
  30. package/dist/bridges/jotai.d.mts +0 -11
  31. package/dist/bridges/jotai.d.ts +0 -11
  32. package/dist/bridges/jotai.js +0 -870
  33. package/dist/bridges/jotai.js.map +0 -1
  34. package/dist/bridges/jotai.mjs +0 -827
  35. package/dist/bridges/jotai.mjs.map +0 -1
  36. package/dist/bridges/motion.d.mts +0 -6
  37. package/dist/bridges/motion.d.ts +0 -6
  38. package/dist/bridges/motion.js +0 -3752
  39. package/dist/bridges/motion.js.map +0 -1
  40. package/dist/bridges/motion.mjs +0 -3721
  41. package/dist/bridges/motion.mjs.map +0 -1
  42. package/dist/bridges/next.d.mts +0 -10
  43. package/dist/bridges/next.d.ts +0 -10
  44. package/dist/bridges/next.js +0 -2588
  45. package/dist/bridges/next.js.map +0 -1
  46. package/dist/bridges/next.mjs +0 -2582
  47. package/dist/bridges/next.mjs.map +0 -1
  48. package/dist/bridges/redux.d.mts +0 -15
  49. package/dist/bridges/redux.d.ts +0 -15
  50. package/dist/bridges/redux.js +0 -410
  51. package/dist/bridges/redux.js.map +0 -1
  52. package/dist/bridges/redux.mjs +0 -402
  53. package/dist/bridges/redux.mjs.map +0 -1
  54. package/dist/bridges/remix.d.mts +0 -1
  55. package/dist/bridges/remix.d.ts +0 -1
  56. package/dist/bridges/remix.js +0 -2215
  57. package/dist/bridges/remix.js.map +0 -1
  58. package/dist/bridges/remix.mjs +0 -2174
  59. package/dist/bridges/remix.mjs.map +0 -1
  60. package/dist/bridges/stripe.d.mts +0 -15
  61. package/dist/bridges/stripe.d.ts +0 -15
  62. package/dist/bridges/stripe.js +0 -1572
  63. package/dist/bridges/stripe.js.map +0 -1
  64. package/dist/bridges/stripe.mjs +0 -1556
  65. package/dist/bridges/stripe.mjs.map +0 -1
  66. package/dist/bridges/supabase.d.mts +0 -13
  67. package/dist/bridges/supabase.d.ts +0 -13
  68. package/dist/bridges/supabase.js +0 -51
  69. package/dist/bridges/supabase.js.map +0 -1
  70. package/dist/bridges/supabase.mjs +0 -24
  71. package/dist/bridges/supabase.mjs.map +0 -1
  72. package/dist/bridges/tanstack.d.mts +0 -3
  73. package/dist/bridges/tanstack.d.ts +0 -3
  74. package/dist/bridges/tanstack.js +0 -1319
  75. package/dist/bridges/tanstack.js.map +0 -1
  76. package/dist/bridges/tanstack.mjs +0 -1281
  77. package/dist/bridges/tanstack.mjs.map +0 -1
  78. package/dist/bridges/yup.d.mts +0 -16
  79. package/dist/bridges/yup.d.ts +0 -16
  80. package/dist/bridges/yup.js +0 -80
  81. package/dist/bridges/yup.js.map +0 -1
  82. package/dist/bridges/yup.mjs +0 -43
  83. package/dist/bridges/yup.mjs.map +0 -1
  84. package/dist/bridges/zod.d.mts +0 -19
  85. package/dist/bridges/zod.d.ts +0 -19
  86. package/dist/bridges/zod.js +0 -66
  87. package/dist/bridges/zod.js.map +0 -1
  88. package/dist/bridges/zod.mjs +0 -39
  89. package/dist/bridges/zod.mjs.map +0 -1
  90. package/dist/bridges/zustand.d.mts +0 -14
  91. package/dist/bridges/zustand.d.ts +0 -14
  92. package/dist/bridges/zustand.js +0 -58
  93. package/dist/bridges/zustand.js.map +0 -1
  94. package/dist/bridges/zustand.mjs +0 -21
  95. package/dist/bridges/zustand.mjs.map +0 -1
  96. package/dist/index.d.mts +0 -3130
  97. package/dist/index.js.map +0 -1
  98. package/dist/index.mjs.map +0 -1
@@ -1,2174 +0,0 @@
1
- var __getOwnPropNames = Object.getOwnPropertyNames;
2
- var __esm = (fn, res) => function __init() {
3
- return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
4
- };
5
-
6
- // node_modules/@remix-run/router/dist/router.js
7
- function _extends() {
8
- _extends = Object.assign ? Object.assign.bind() : function(target) {
9
- for (var i = 1; i < arguments.length; i++) {
10
- var source = arguments[i];
11
- for (var key in source) {
12
- if (Object.prototype.hasOwnProperty.call(source, key)) {
13
- target[key] = source[key];
14
- }
15
- }
16
- }
17
- return target;
18
- };
19
- return _extends.apply(this, arguments);
20
- }
21
- function invariant(value, message) {
22
- if (value === false || value === null || typeof value === "undefined") {
23
- throw new Error(message);
24
- }
25
- }
26
- function warning(cond, message) {
27
- if (!cond) {
28
- if (typeof console !== "undefined") console.warn(message);
29
- try {
30
- throw new Error(message);
31
- } catch (e) {
32
- }
33
- }
34
- }
35
- function createPath(_ref) {
36
- let {
37
- pathname = "/",
38
- search = "",
39
- hash = ""
40
- } = _ref;
41
- if (search && search !== "?") pathname += search.charAt(0) === "?" ? search : "?" + search;
42
- if (hash && hash !== "#") pathname += hash.charAt(0) === "#" ? hash : "#" + hash;
43
- return pathname;
44
- }
45
- function parsePath(path) {
46
- let parsedPath = {};
47
- if (path) {
48
- let hashIndex = path.indexOf("#");
49
- if (hashIndex >= 0) {
50
- parsedPath.hash = path.substr(hashIndex);
51
- path = path.substr(0, hashIndex);
52
- }
53
- let searchIndex = path.indexOf("?");
54
- if (searchIndex >= 0) {
55
- parsedPath.search = path.substr(searchIndex);
56
- path = path.substr(0, searchIndex);
57
- }
58
- if (path) {
59
- parsedPath.pathname = path;
60
- }
61
- }
62
- return parsedPath;
63
- }
64
- function matchRoutes(routes, locationArg, basename) {
65
- if (basename === void 0) {
66
- basename = "/";
67
- }
68
- return matchRoutesImpl(routes, locationArg, basename, false);
69
- }
70
- function matchRoutesImpl(routes, locationArg, basename, allowPartial) {
71
- let location = typeof locationArg === "string" ? parsePath(locationArg) : locationArg;
72
- let pathname = stripBasename(location.pathname || "/", basename);
73
- if (pathname == null) {
74
- return null;
75
- }
76
- let branches = flattenRoutes(routes);
77
- rankRouteBranches(branches);
78
- let matches = null;
79
- for (let i = 0; matches == null && i < branches.length; ++i) {
80
- let decoded = decodePath(pathname);
81
- matches = matchRouteBranch(branches[i], decoded, allowPartial);
82
- }
83
- return matches;
84
- }
85
- function convertRouteMatchToUiMatch(match, loaderData) {
86
- let {
87
- route,
88
- pathname,
89
- params
90
- } = match;
91
- return {
92
- id: route.id,
93
- pathname,
94
- params,
95
- data: loaderData[route.id],
96
- handle: route.handle
97
- };
98
- }
99
- function flattenRoutes(routes, branches, parentsMeta, parentPath) {
100
- if (branches === void 0) {
101
- branches = [];
102
- }
103
- if (parentsMeta === void 0) {
104
- parentsMeta = [];
105
- }
106
- if (parentPath === void 0) {
107
- parentPath = "";
108
- }
109
- let flattenRoute = (route, index, relativePath) => {
110
- let meta = {
111
- relativePath: relativePath === void 0 ? route.path || "" : relativePath,
112
- caseSensitive: route.caseSensitive === true,
113
- childrenIndex: index,
114
- route
115
- };
116
- if (meta.relativePath.startsWith("/")) {
117
- invariant(meta.relativePath.startsWith(parentPath), 'Absolute route path "' + meta.relativePath + '" nested under path ' + ('"' + parentPath + '" is not valid. An absolute child route path ') + "must start with the combined path of all its parent routes.");
118
- meta.relativePath = meta.relativePath.slice(parentPath.length);
119
- }
120
- let path = joinPaths([parentPath, meta.relativePath]);
121
- let routesMeta = parentsMeta.concat(meta);
122
- if (route.children && route.children.length > 0) {
123
- invariant(
124
- // Our types know better, but runtime JS may not!
125
- // @ts-expect-error
126
- route.index !== true,
127
- "Index routes must not have child routes. Please remove " + ('all child routes from route path "' + path + '".')
128
- );
129
- flattenRoutes(route.children, branches, routesMeta, path);
130
- }
131
- if (route.path == null && !route.index) {
132
- return;
133
- }
134
- branches.push({
135
- path,
136
- score: computeScore(path, route.index),
137
- routesMeta
138
- });
139
- };
140
- routes.forEach((route, index) => {
141
- var _route$path;
142
- if (route.path === "" || !((_route$path = route.path) != null && _route$path.includes("?"))) {
143
- flattenRoute(route, index);
144
- } else {
145
- for (let exploded of explodeOptionalSegments(route.path)) {
146
- flattenRoute(route, index, exploded);
147
- }
148
- }
149
- });
150
- return branches;
151
- }
152
- function explodeOptionalSegments(path) {
153
- let segments = path.split("/");
154
- if (segments.length === 0) return [];
155
- let [first, ...rest] = segments;
156
- let isOptional = first.endsWith("?");
157
- let required = first.replace(/\?$/, "");
158
- if (rest.length === 0) {
159
- return isOptional ? [required, ""] : [required];
160
- }
161
- let restExploded = explodeOptionalSegments(rest.join("/"));
162
- let result = [];
163
- result.push(...restExploded.map((subpath) => subpath === "" ? required : [required, subpath].join("/")));
164
- if (isOptional) {
165
- result.push(...restExploded);
166
- }
167
- return result.map((exploded) => path.startsWith("/") && exploded === "" ? "/" : exploded);
168
- }
169
- function rankRouteBranches(branches) {
170
- branches.sort((a, b) => a.score !== b.score ? b.score - a.score : compareIndexes(a.routesMeta.map((meta) => meta.childrenIndex), b.routesMeta.map((meta) => meta.childrenIndex)));
171
- }
172
- function computeScore(path, index) {
173
- let segments = path.split("/");
174
- let initialScore = segments.length;
175
- if (segments.some(isSplat)) {
176
- initialScore += splatPenalty;
177
- }
178
- if (index) {
179
- initialScore += indexRouteValue;
180
- }
181
- return segments.filter((s) => !isSplat(s)).reduce((score, segment) => score + (paramRe.test(segment) ? dynamicSegmentValue : segment === "" ? emptySegmentValue : staticSegmentValue), initialScore);
182
- }
183
- function compareIndexes(a, b) {
184
- let siblings = a.length === b.length && a.slice(0, -1).every((n, i) => n === b[i]);
185
- return siblings ? (
186
- // If two routes are siblings, we should try to match the earlier sibling
187
- // first. This allows people to have fine-grained control over the matching
188
- // behavior by simply putting routes with identical paths in the order they
189
- // want them tried.
190
- a[a.length - 1] - b[b.length - 1]
191
- ) : (
192
- // Otherwise, it doesn't really make sense to rank non-siblings by index,
193
- // so they sort equally.
194
- 0
195
- );
196
- }
197
- function matchRouteBranch(branch, pathname, allowPartial) {
198
- if (allowPartial === void 0) {
199
- allowPartial = false;
200
- }
201
- let {
202
- routesMeta
203
- } = branch;
204
- let matchedParams = {};
205
- let matchedPathname = "/";
206
- let matches = [];
207
- for (let i = 0; i < routesMeta.length; ++i) {
208
- let meta = routesMeta[i];
209
- let end = i === routesMeta.length - 1;
210
- let remainingPathname = matchedPathname === "/" ? pathname : pathname.slice(matchedPathname.length) || "/";
211
- let match = matchPath({
212
- path: meta.relativePath,
213
- caseSensitive: meta.caseSensitive,
214
- end
215
- }, remainingPathname);
216
- let route = meta.route;
217
- if (!match && end && allowPartial && !routesMeta[routesMeta.length - 1].route.index) {
218
- match = matchPath({
219
- path: meta.relativePath,
220
- caseSensitive: meta.caseSensitive,
221
- end: false
222
- }, remainingPathname);
223
- }
224
- if (!match) {
225
- return null;
226
- }
227
- Object.assign(matchedParams, match.params);
228
- matches.push({
229
- // TODO: Can this as be avoided?
230
- params: matchedParams,
231
- pathname: joinPaths([matchedPathname, match.pathname]),
232
- pathnameBase: normalizePathname(joinPaths([matchedPathname, match.pathnameBase])),
233
- route
234
- });
235
- if (match.pathnameBase !== "/") {
236
- matchedPathname = joinPaths([matchedPathname, match.pathnameBase]);
237
- }
238
- }
239
- return matches;
240
- }
241
- function matchPath(pattern, pathname) {
242
- if (typeof pattern === "string") {
243
- pattern = {
244
- path: pattern,
245
- caseSensitive: false,
246
- end: true
247
- };
248
- }
249
- let [matcher, compiledParams] = compilePath(pattern.path, pattern.caseSensitive, pattern.end);
250
- let match = pathname.match(matcher);
251
- if (!match) return null;
252
- let matchedPathname = match[0];
253
- let pathnameBase = matchedPathname.replace(/(.)\/+$/, "$1");
254
- let captureGroups = match.slice(1);
255
- let params = compiledParams.reduce((memo2, _ref, index) => {
256
- let {
257
- paramName,
258
- isOptional
259
- } = _ref;
260
- if (paramName === "*") {
261
- let splatValue = captureGroups[index] || "";
262
- pathnameBase = matchedPathname.slice(0, matchedPathname.length - splatValue.length).replace(/(.)\/+$/, "$1");
263
- }
264
- const value = captureGroups[index];
265
- if (isOptional && !value) {
266
- memo2[paramName] = void 0;
267
- } else {
268
- memo2[paramName] = (value || "").replace(/%2F/g, "/");
269
- }
270
- return memo2;
271
- }, {});
272
- return {
273
- params,
274
- pathname: matchedPathname,
275
- pathnameBase,
276
- pattern
277
- };
278
- }
279
- function compilePath(path, caseSensitive, end) {
280
- if (caseSensitive === void 0) {
281
- caseSensitive = false;
282
- }
283
- if (end === void 0) {
284
- end = true;
285
- }
286
- warning(path === "*" || !path.endsWith("*") || path.endsWith("/*"), 'Route path "' + path + '" will be treated as if it were ' + ('"' + path.replace(/\*$/, "/*") + '" because the `*` character must ') + "always follow a `/` in the pattern. To get rid of this warning, " + ('please change the route path to "' + path.replace(/\*$/, "/*") + '".'));
287
- let params = [];
288
- let regexpSource = "^" + path.replace(/\/*\*?$/, "").replace(/^\/*/, "/").replace(/[\\.*+^${}|()[\]]/g, "\\$&").replace(/\/:([\w-]+)(\?)?/g, (_, paramName, isOptional) => {
289
- params.push({
290
- paramName,
291
- isOptional: isOptional != null
292
- });
293
- return isOptional ? "/?([^\\/]+)?" : "/([^\\/]+)";
294
- });
295
- if (path.endsWith("*")) {
296
- params.push({
297
- paramName: "*"
298
- });
299
- regexpSource += path === "*" || path === "/*" ? "(.*)$" : "(?:\\/(.+)|\\/*)$";
300
- } else if (end) {
301
- regexpSource += "\\/*$";
302
- } else if (path !== "" && path !== "/") {
303
- regexpSource += "(?:(?=\\/|$))";
304
- } else ;
305
- let matcher = new RegExp(regexpSource, caseSensitive ? void 0 : "i");
306
- return [matcher, params];
307
- }
308
- function decodePath(value) {
309
- try {
310
- return value.split("/").map((v) => decodeURIComponent(v).replace(/\//g, "%2F")).join("/");
311
- } catch (error) {
312
- warning(false, 'The URL path "' + value + '" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent ' + ("encoding (" + error + ")."));
313
- return value;
314
- }
315
- }
316
- function stripBasename(pathname, basename) {
317
- if (basename === "/") return pathname;
318
- if (!pathname.toLowerCase().startsWith(basename.toLowerCase())) {
319
- return null;
320
- }
321
- let startIndex = basename.endsWith("/") ? basename.length - 1 : basename.length;
322
- let nextChar = pathname.charAt(startIndex);
323
- if (nextChar && nextChar !== "/") {
324
- return null;
325
- }
326
- return pathname.slice(startIndex) || "/";
327
- }
328
- function resolvePath(to, fromPathname) {
329
- if (fromPathname === void 0) {
330
- fromPathname = "/";
331
- }
332
- let {
333
- pathname: toPathname,
334
- search = "",
335
- hash = ""
336
- } = typeof to === "string" ? parsePath(to) : to;
337
- let pathname;
338
- if (toPathname) {
339
- if (isAbsoluteUrl(toPathname)) {
340
- pathname = toPathname;
341
- } else {
342
- if (toPathname.includes("//")) {
343
- let oldPathname = toPathname;
344
- toPathname = toPathname.replace(/\/\/+/g, "/");
345
- warning(false, "Pathnames cannot have embedded double slashes - normalizing " + (oldPathname + " -> " + toPathname));
346
- }
347
- if (toPathname.startsWith("/")) {
348
- pathname = resolvePathname(toPathname.substring(1), "/");
349
- } else {
350
- pathname = resolvePathname(toPathname, fromPathname);
351
- }
352
- }
353
- } else {
354
- pathname = fromPathname;
355
- }
356
- return {
357
- pathname,
358
- search: normalizeSearch(search),
359
- hash: normalizeHash(hash)
360
- };
361
- }
362
- function resolvePathname(relativePath, fromPathname) {
363
- let segments = fromPathname.replace(/\/+$/, "").split("/");
364
- let relativeSegments = relativePath.split("/");
365
- relativeSegments.forEach((segment) => {
366
- if (segment === "..") {
367
- if (segments.length > 1) segments.pop();
368
- } else if (segment !== ".") {
369
- segments.push(segment);
370
- }
371
- });
372
- return segments.length > 1 ? segments.join("/") : "/";
373
- }
374
- function getInvalidPathError(char, field, dest, path) {
375
- return "Cannot include a '" + char + "' character in a manually specified " + ("`to." + field + "` field [" + JSON.stringify(path) + "]. Please separate it out to the ") + ("`to." + dest + "` field. Alternatively you may provide the full path as ") + 'a string in <Link to="..."> and the router will parse it for you.';
376
- }
377
- function getPathContributingMatches(matches) {
378
- return matches.filter((match, index) => index === 0 || match.route.path && match.route.path.length > 0);
379
- }
380
- function getResolveToMatches(matches, v7_relativeSplatPath) {
381
- let pathMatches = getPathContributingMatches(matches);
382
- if (v7_relativeSplatPath) {
383
- return pathMatches.map((match, idx) => idx === pathMatches.length - 1 ? match.pathname : match.pathnameBase);
384
- }
385
- return pathMatches.map((match) => match.pathnameBase);
386
- }
387
- function resolveTo(toArg, routePathnames, locationPathname, isPathRelative) {
388
- if (isPathRelative === void 0) {
389
- isPathRelative = false;
390
- }
391
- let to;
392
- if (typeof toArg === "string") {
393
- to = parsePath(toArg);
394
- } else {
395
- to = _extends({}, toArg);
396
- invariant(!to.pathname || !to.pathname.includes("?"), getInvalidPathError("?", "pathname", "search", to));
397
- invariant(!to.pathname || !to.pathname.includes("#"), getInvalidPathError("#", "pathname", "hash", to));
398
- invariant(!to.search || !to.search.includes("#"), getInvalidPathError("#", "search", "hash", to));
399
- }
400
- let isEmptyPath = toArg === "" || to.pathname === "";
401
- let toPathname = isEmptyPath ? "/" : to.pathname;
402
- let from;
403
- if (toPathname == null) {
404
- from = locationPathname;
405
- } else {
406
- let routePathnameIndex = routePathnames.length - 1;
407
- if (!isPathRelative && toPathname.startsWith("..")) {
408
- let toSegments = toPathname.split("/");
409
- while (toSegments[0] === "..") {
410
- toSegments.shift();
411
- routePathnameIndex -= 1;
412
- }
413
- to.pathname = toSegments.join("/");
414
- }
415
- from = routePathnameIndex >= 0 ? routePathnames[routePathnameIndex] : "/";
416
- }
417
- let path = resolvePath(to, from);
418
- let hasExplicitTrailingSlash = toPathname && toPathname !== "/" && toPathname.endsWith("/");
419
- let hasCurrentTrailingSlash = (isEmptyPath || toPathname === ".") && locationPathname.endsWith("/");
420
- if (!path.pathname.endsWith("/") && (hasExplicitTrailingSlash || hasCurrentTrailingSlash)) {
421
- path.pathname += "/";
422
- }
423
- return path;
424
- }
425
- var Action, ResultType, paramRe, dynamicSegmentValue, indexRouteValue, emptySegmentValue, staticSegmentValue, splatPenalty, isSplat, ABSOLUTE_URL_REGEX$1, isAbsoluteUrl, joinPaths, normalizePathname, normalizeSearch, normalizeHash, validMutationMethodsArr, validMutationMethods, validRequestMethodsArr, validRequestMethods, IDLE_FETCHER;
426
- var init_router = __esm({
427
- "node_modules/@remix-run/router/dist/router.js"() {
428
- "use strict";
429
- (function(Action2) {
430
- Action2["Pop"] = "POP";
431
- Action2["Push"] = "PUSH";
432
- Action2["Replace"] = "REPLACE";
433
- })(Action || (Action = {}));
434
- (function(ResultType2) {
435
- ResultType2["data"] = "data";
436
- ResultType2["deferred"] = "deferred";
437
- ResultType2["redirect"] = "redirect";
438
- ResultType2["error"] = "error";
439
- })(ResultType || (ResultType = {}));
440
- paramRe = /^:[\w-]+$/;
441
- dynamicSegmentValue = 3;
442
- indexRouteValue = 2;
443
- emptySegmentValue = 1;
444
- staticSegmentValue = 10;
445
- splatPenalty = -2;
446
- isSplat = (s) => s === "*";
447
- ABSOLUTE_URL_REGEX$1 = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;
448
- isAbsoluteUrl = (url) => ABSOLUTE_URL_REGEX$1.test(url);
449
- joinPaths = (paths) => paths.join("/").replace(/\/\/+/g, "/");
450
- normalizePathname = (pathname) => pathname.replace(/\/+$/, "").replace(/^\/*/, "/");
451
- normalizeSearch = (search) => !search || search === "?" ? "" : search.startsWith("?") ? search : "?" + search;
452
- normalizeHash = (hash) => !hash || hash === "#" ? "" : hash.startsWith("#") ? hash : "#" + hash;
453
- validMutationMethodsArr = ["post", "put", "patch", "delete"];
454
- validMutationMethods = new Set(validMutationMethodsArr);
455
- validRequestMethodsArr = ["get", ...validMutationMethodsArr];
456
- validRequestMethods = new Set(validRequestMethodsArr);
457
- IDLE_FETCHER = {
458
- state: "idle",
459
- data: void 0,
460
- formMethod: void 0,
461
- formAction: void 0,
462
- formEncType: void 0,
463
- formData: void 0,
464
- json: void 0,
465
- text: void 0
466
- };
467
- }
468
- });
469
-
470
- // node_modules/react-router/dist/index.js
471
- import * as React from "react";
472
- function _extends2() {
473
- _extends2 = Object.assign ? Object.assign.bind() : function(target) {
474
- for (var i = 1; i < arguments.length; i++) {
475
- var source = arguments[i];
476
- for (var key in source) {
477
- if (Object.prototype.hasOwnProperty.call(source, key)) {
478
- target[key] = source[key];
479
- }
480
- }
481
- }
482
- return target;
483
- };
484
- return _extends2.apply(this, arguments);
485
- }
486
- function useHref(to, _temp) {
487
- let {
488
- relative
489
- } = _temp === void 0 ? {} : _temp;
490
- !useInRouterContext() ? process.env.NODE_ENV !== "production" ? invariant(
491
- false,
492
- // TODO: This error is probably because they somehow have 2 versions of the
493
- // router loaded. We can help them understand how to avoid that.
494
- "useHref() may be used only in the context of a <Router> component."
495
- ) : invariant(false) : void 0;
496
- let {
497
- basename,
498
- navigator
499
- } = React.useContext(NavigationContext);
500
- let {
501
- hash,
502
- pathname,
503
- search
504
- } = useResolvedPath(to, {
505
- relative
506
- });
507
- let joinedPathname = pathname;
508
- if (basename !== "/") {
509
- joinedPathname = pathname === "/" ? basename : joinPaths([basename, pathname]);
510
- }
511
- return navigator.createHref({
512
- pathname: joinedPathname,
513
- search,
514
- hash
515
- });
516
- }
517
- function useInRouterContext() {
518
- return React.useContext(LocationContext) != null;
519
- }
520
- function useLocation() {
521
- !useInRouterContext() ? process.env.NODE_ENV !== "production" ? invariant(
522
- false,
523
- // TODO: This error is probably because they somehow have 2 versions of the
524
- // router loaded. We can help them understand how to avoid that.
525
- "useLocation() may be used only in the context of a <Router> component."
526
- ) : invariant(false) : void 0;
527
- return React.useContext(LocationContext).location;
528
- }
529
- function useIsomorphicLayoutEffect(cb) {
530
- let isStatic = React.useContext(NavigationContext).static;
531
- if (!isStatic) {
532
- React.useLayoutEffect(cb);
533
- }
534
- }
535
- function useNavigate() {
536
- let {
537
- isDataRoute
538
- } = React.useContext(RouteContext);
539
- return isDataRoute ? useNavigateStable() : useNavigateUnstable();
540
- }
541
- function useNavigateUnstable() {
542
- !useInRouterContext() ? process.env.NODE_ENV !== "production" ? invariant(
543
- false,
544
- // TODO: This error is probably because they somehow have 2 versions of the
545
- // router loaded. We can help them understand how to avoid that.
546
- "useNavigate() may be used only in the context of a <Router> component."
547
- ) : invariant(false) : void 0;
548
- let dataRouterContext = React.useContext(DataRouterContext);
549
- let {
550
- basename,
551
- future,
552
- navigator
553
- } = React.useContext(NavigationContext);
554
- let {
555
- matches
556
- } = React.useContext(RouteContext);
557
- let {
558
- pathname: locationPathname
559
- } = useLocation();
560
- let routePathnamesJson = JSON.stringify(getResolveToMatches(matches, future.v7_relativeSplatPath));
561
- let activeRef = React.useRef(false);
562
- useIsomorphicLayoutEffect(() => {
563
- activeRef.current = true;
564
- });
565
- let navigate = React.useCallback(function(to, options) {
566
- if (options === void 0) {
567
- options = {};
568
- }
569
- process.env.NODE_ENV !== "production" ? warning(activeRef.current, navigateEffectWarning) : void 0;
570
- if (!activeRef.current) return;
571
- if (typeof to === "number") {
572
- navigator.go(to);
573
- return;
574
- }
575
- let path = resolveTo(to, JSON.parse(routePathnamesJson), locationPathname, options.relative === "path");
576
- if (dataRouterContext == null && basename !== "/") {
577
- path.pathname = path.pathname === "/" ? basename : joinPaths([basename, path.pathname]);
578
- }
579
- (!!options.replace ? navigator.replace : navigator.push)(path, options.state, options);
580
- }, [basename, navigator, routePathnamesJson, locationPathname, dataRouterContext]);
581
- return navigate;
582
- }
583
- function useResolvedPath(to, _temp2) {
584
- let {
585
- relative
586
- } = _temp2 === void 0 ? {} : _temp2;
587
- let {
588
- future
589
- } = React.useContext(NavigationContext);
590
- let {
591
- matches
592
- } = React.useContext(RouteContext);
593
- let {
594
- pathname: locationPathname
595
- } = useLocation();
596
- let routePathnamesJson = JSON.stringify(getResolveToMatches(matches, future.v7_relativeSplatPath));
597
- return React.useMemo(() => resolveTo(to, JSON.parse(routePathnamesJson), locationPathname, relative === "path"), [to, routePathnamesJson, locationPathname, relative]);
598
- }
599
- function getDataRouterConsoleError(hookName) {
600
- return hookName + " must be used within a data router. See https://reactrouter.com/v6/routers/picking-a-router.";
601
- }
602
- function useDataRouterContext(hookName) {
603
- let ctx = React.useContext(DataRouterContext);
604
- !ctx ? process.env.NODE_ENV !== "production" ? invariant(false, getDataRouterConsoleError(hookName)) : invariant(false) : void 0;
605
- return ctx;
606
- }
607
- function useDataRouterState(hookName) {
608
- let state = React.useContext(DataRouterStateContext);
609
- !state ? process.env.NODE_ENV !== "production" ? invariant(false, getDataRouterConsoleError(hookName)) : invariant(false) : void 0;
610
- return state;
611
- }
612
- function useRouteContext(hookName) {
613
- let route = React.useContext(RouteContext);
614
- !route ? process.env.NODE_ENV !== "production" ? invariant(false, getDataRouterConsoleError(hookName)) : invariant(false) : void 0;
615
- return route;
616
- }
617
- function useCurrentRouteId(hookName) {
618
- let route = useRouteContext(hookName);
619
- let thisRoute = route.matches[route.matches.length - 1];
620
- !thisRoute.route.id ? process.env.NODE_ENV !== "production" ? invariant(false, hookName + ' can only be used on routes that contain a unique "id"') : invariant(false) : void 0;
621
- return thisRoute.route.id;
622
- }
623
- function useRouteId() {
624
- return useCurrentRouteId(DataRouterStateHook.UseRouteId);
625
- }
626
- function useNavigation() {
627
- let state = useDataRouterState(DataRouterStateHook.UseNavigation);
628
- return state.navigation;
629
- }
630
- function useMatches() {
631
- let {
632
- matches,
633
- loaderData
634
- } = useDataRouterState(DataRouterStateHook.UseMatches);
635
- return React.useMemo(() => matches.map((m) => convertRouteMatchToUiMatch(m, loaderData)), [matches, loaderData]);
636
- }
637
- function useLoaderData() {
638
- let state = useDataRouterState(DataRouterStateHook.UseLoaderData);
639
- let routeId = useCurrentRouteId(DataRouterStateHook.UseLoaderData);
640
- if (state.errors && state.errors[routeId] != null) {
641
- console.error("You cannot `useLoaderData` in an errorElement (routeId: " + routeId + ")");
642
- return void 0;
643
- }
644
- return state.loaderData[routeId];
645
- }
646
- function useActionData() {
647
- let state = useDataRouterState(DataRouterStateHook.UseActionData);
648
- let routeId = useCurrentRouteId(DataRouterStateHook.UseLoaderData);
649
- return state.actionData ? state.actionData[routeId] : void 0;
650
- }
651
- function useNavigateStable() {
652
- let {
653
- router
654
- } = useDataRouterContext(DataRouterHook.UseNavigateStable);
655
- let id = useCurrentRouteId(DataRouterStateHook.UseNavigateStable);
656
- let activeRef = React.useRef(false);
657
- useIsomorphicLayoutEffect(() => {
658
- activeRef.current = true;
659
- });
660
- let navigate = React.useCallback(function(to, options) {
661
- if (options === void 0) {
662
- options = {};
663
- }
664
- process.env.NODE_ENV !== "production" ? warning(activeRef.current, navigateEffectWarning) : void 0;
665
- if (!activeRef.current) return;
666
- if (typeof to === "number") {
667
- router.navigate(to);
668
- } else {
669
- router.navigate(to, _extends2({
670
- fromRouteId: id
671
- }, options));
672
- }
673
- }, [router, id]);
674
- return navigate;
675
- }
676
- function warnOnce(key, message) {
677
- if (process.env.NODE_ENV !== "production" && !alreadyWarned[message]) {
678
- alreadyWarned[message] = true;
679
- console.warn(message);
680
- }
681
- }
682
- function logV6DeprecationWarnings(renderFuture, routerFuture) {
683
- if ((renderFuture == null ? void 0 : renderFuture.v7_startTransition) === void 0) {
684
- logDeprecation("v7_startTransition", "React Router will begin wrapping state updates in `React.startTransition` in v7", "https://reactrouter.com/v6/upgrading/future#v7_starttransition");
685
- }
686
- if ((renderFuture == null ? void 0 : renderFuture.v7_relativeSplatPath) === void 0 && (!routerFuture || routerFuture.v7_relativeSplatPath === void 0)) {
687
- logDeprecation("v7_relativeSplatPath", "Relative route resolution within Splat routes is changing in v7", "https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath");
688
- }
689
- if (routerFuture) {
690
- if (routerFuture.v7_fetcherPersist === void 0) {
691
- logDeprecation("v7_fetcherPersist", "The persistence behavior of fetchers is changing in v7", "https://reactrouter.com/v6/upgrading/future#v7_fetcherpersist");
692
- }
693
- if (routerFuture.v7_normalizeFormMethod === void 0) {
694
- logDeprecation("v7_normalizeFormMethod", "Casing of `formMethod` fields is being normalized to uppercase in v7", "https://reactrouter.com/v6/upgrading/future#v7_normalizeformmethod");
695
- }
696
- if (routerFuture.v7_partialHydration === void 0) {
697
- logDeprecation("v7_partialHydration", "`RouterProvider` hydration behavior is changing in v7", "https://reactrouter.com/v6/upgrading/future#v7_partialhydration");
698
- }
699
- if (routerFuture.v7_skipActionErrorRevalidation === void 0) {
700
- logDeprecation("v7_skipActionErrorRevalidation", "The revalidation behavior after 4xx/5xx `action` responses is changing in v7", "https://reactrouter.com/v6/upgrading/future#v7_skipactionerrorrevalidation");
701
- }
702
- }
703
- }
704
- function Router(_ref5) {
705
- let {
706
- basename: basenameProp = "/",
707
- children = null,
708
- location: locationProp,
709
- navigationType = Action.Pop,
710
- navigator,
711
- static: staticProp = false,
712
- future
713
- } = _ref5;
714
- !!useInRouterContext() ? process.env.NODE_ENV !== "production" ? invariant(false, "You cannot render a <Router> inside another <Router>. You should never have more than one in your app.") : invariant(false) : void 0;
715
- let basename = basenameProp.replace(/^\/*/, "/");
716
- let navigationContext = React.useMemo(() => ({
717
- basename,
718
- navigator,
719
- static: staticProp,
720
- future: _extends2({
721
- v7_relativeSplatPath: false
722
- }, future)
723
- }), [basename, future, navigator, staticProp]);
724
- if (typeof locationProp === "string") {
725
- locationProp = parsePath(locationProp);
726
- }
727
- let {
728
- pathname = "/",
729
- search = "",
730
- hash = "",
731
- state = null,
732
- key = "default"
733
- } = locationProp;
734
- let locationContext = React.useMemo(() => {
735
- let trailingPathname = stripBasename(pathname, basename);
736
- if (trailingPathname == null) {
737
- return null;
738
- }
739
- return {
740
- location: {
741
- pathname: trailingPathname,
742
- search,
743
- hash,
744
- state,
745
- key
746
- },
747
- navigationType
748
- };
749
- }, [basename, pathname, search, hash, state, key, navigationType]);
750
- process.env.NODE_ENV !== "production" ? warning(locationContext != null, '<Router basename="' + basename + '"> is not able to match the URL ' + ('"' + pathname + search + hash + '" because it does not start with the ') + "basename, so the <Router> won't render anything.") : void 0;
751
- if (locationContext == null) {
752
- return null;
753
- }
754
- return /* @__PURE__ */ React.createElement(NavigationContext.Provider, {
755
- value: navigationContext
756
- }, /* @__PURE__ */ React.createElement(LocationContext.Provider, {
757
- children,
758
- value: locationContext
759
- }));
760
- }
761
- var DataRouterContext, DataRouterStateContext, AwaitContext, NavigationContext, LocationContext, RouteContext, RouteErrorContext, navigateEffectWarning, DataRouterHook, DataRouterStateHook, alreadyWarned, logDeprecation, START_TRANSITION, startTransitionImpl, neverSettledPromise;
762
- var init_dist = __esm({
763
- "node_modules/react-router/dist/index.js"() {
764
- "use strict";
765
- init_router();
766
- init_router();
767
- DataRouterContext = /* @__PURE__ */ React.createContext(null);
768
- if (process.env.NODE_ENV !== "production") {
769
- DataRouterContext.displayName = "DataRouter";
770
- }
771
- DataRouterStateContext = /* @__PURE__ */ React.createContext(null);
772
- if (process.env.NODE_ENV !== "production") {
773
- DataRouterStateContext.displayName = "DataRouterState";
774
- }
775
- AwaitContext = /* @__PURE__ */ React.createContext(null);
776
- if (process.env.NODE_ENV !== "production") {
777
- AwaitContext.displayName = "Await";
778
- }
779
- NavigationContext = /* @__PURE__ */ React.createContext(null);
780
- if (process.env.NODE_ENV !== "production") {
781
- NavigationContext.displayName = "Navigation";
782
- }
783
- LocationContext = /* @__PURE__ */ React.createContext(null);
784
- if (process.env.NODE_ENV !== "production") {
785
- LocationContext.displayName = "Location";
786
- }
787
- RouteContext = /* @__PURE__ */ React.createContext({
788
- outlet: null,
789
- matches: [],
790
- isDataRoute: false
791
- });
792
- if (process.env.NODE_ENV !== "production") {
793
- RouteContext.displayName = "Route";
794
- }
795
- RouteErrorContext = /* @__PURE__ */ React.createContext(null);
796
- if (process.env.NODE_ENV !== "production") {
797
- RouteErrorContext.displayName = "RouteError";
798
- }
799
- navigateEffectWarning = "You should call navigate() in a React.useEffect(), not when your component is first rendered.";
800
- DataRouterHook = /* @__PURE__ */ (function(DataRouterHook3) {
801
- DataRouterHook3["UseBlocker"] = "useBlocker";
802
- DataRouterHook3["UseRevalidator"] = "useRevalidator";
803
- DataRouterHook3["UseNavigateStable"] = "useNavigate";
804
- return DataRouterHook3;
805
- })(DataRouterHook || {});
806
- DataRouterStateHook = /* @__PURE__ */ (function(DataRouterStateHook3) {
807
- DataRouterStateHook3["UseBlocker"] = "useBlocker";
808
- DataRouterStateHook3["UseLoaderData"] = "useLoaderData";
809
- DataRouterStateHook3["UseActionData"] = "useActionData";
810
- DataRouterStateHook3["UseRouteError"] = "useRouteError";
811
- DataRouterStateHook3["UseNavigation"] = "useNavigation";
812
- DataRouterStateHook3["UseRouteLoaderData"] = "useRouteLoaderData";
813
- DataRouterStateHook3["UseMatches"] = "useMatches";
814
- DataRouterStateHook3["UseRevalidator"] = "useRevalidator";
815
- DataRouterStateHook3["UseNavigateStable"] = "useNavigate";
816
- DataRouterStateHook3["UseRouteId"] = "useRouteId";
817
- return DataRouterStateHook3;
818
- })(DataRouterStateHook || {});
819
- alreadyWarned = {};
820
- logDeprecation = (flag, msg, link) => warnOnce(flag, "\u26A0\uFE0F React Router Future Flag Warning: " + msg + ". " + ("You can use the `" + flag + "` future flag to opt-in early. ") + ("For more information, see " + link + "."));
821
- START_TRANSITION = "startTransition";
822
- startTransitionImpl = React[START_TRANSITION];
823
- neverSettledPromise = new Promise(() => {
824
- });
825
- }
826
- });
827
-
828
- // node_modules/react-router-dom/dist/index.js
829
- import * as React2 from "react";
830
- import * as ReactDOM from "react-dom";
831
- function _extends3() {
832
- _extends3 = Object.assign ? Object.assign.bind() : function(target) {
833
- for (var i = 1; i < arguments.length; i++) {
834
- var source = arguments[i];
835
- for (var key in source) {
836
- if (Object.prototype.hasOwnProperty.call(source, key)) {
837
- target[key] = source[key];
838
- }
839
- }
840
- }
841
- return target;
842
- };
843
- return _extends3.apply(this, arguments);
844
- }
845
- function _objectWithoutPropertiesLoose(source, excluded) {
846
- if (source == null) return {};
847
- var target = {};
848
- var sourceKeys = Object.keys(source);
849
- var key, i;
850
- for (i = 0; i < sourceKeys.length; i++) {
851
- key = sourceKeys[i];
852
- if (excluded.indexOf(key) >= 0) continue;
853
- target[key] = source[key];
854
- }
855
- return target;
856
- }
857
- function isHtmlElement(object) {
858
- return object != null && typeof object.tagName === "string";
859
- }
860
- function isButtonElement(object) {
861
- return isHtmlElement(object) && object.tagName.toLowerCase() === "button";
862
- }
863
- function isFormElement(object) {
864
- return isHtmlElement(object) && object.tagName.toLowerCase() === "form";
865
- }
866
- function isInputElement(object) {
867
- return isHtmlElement(object) && object.tagName.toLowerCase() === "input";
868
- }
869
- function isModifiedEvent(event) {
870
- return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);
871
- }
872
- function shouldProcessLinkClick(event, target) {
873
- return event.button === 0 && // Ignore everything but left clicks
874
- (!target || target === "_self") && // Let browser handle "target=_blank" etc.
875
- !isModifiedEvent(event);
876
- }
877
- function isFormDataSubmitterSupported() {
878
- if (_formDataSupportsSubmitter === null) {
879
- try {
880
- new FormData(
881
- document.createElement("form"),
882
- // @ts-expect-error if FormData supports the submitter parameter, this will throw
883
- 0
884
- );
885
- _formDataSupportsSubmitter = false;
886
- } catch (e) {
887
- _formDataSupportsSubmitter = true;
888
- }
889
- }
890
- return _formDataSupportsSubmitter;
891
- }
892
- function getFormEncType(encType) {
893
- if (encType != null && !supportedFormEncTypes.has(encType)) {
894
- process.env.NODE_ENV !== "production" ? warning(false, '"' + encType + '" is not a valid `encType` for `<Form>`/`<fetcher.Form>` ' + ('and will default to "' + defaultEncType + '"')) : void 0;
895
- return null;
896
- }
897
- return encType;
898
- }
899
- function getFormSubmissionInfo(target, basename) {
900
- let method;
901
- let action;
902
- let encType;
903
- let formData;
904
- let body;
905
- if (isFormElement(target)) {
906
- let attr = target.getAttribute("action");
907
- action = attr ? stripBasename(attr, basename) : null;
908
- method = target.getAttribute("method") || defaultMethod;
909
- encType = getFormEncType(target.getAttribute("enctype")) || defaultEncType;
910
- formData = new FormData(target);
911
- } else if (isButtonElement(target) || isInputElement(target) && (target.type === "submit" || target.type === "image")) {
912
- let form = target.form;
913
- if (form == null) {
914
- throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');
915
- }
916
- let attr = target.getAttribute("formaction") || form.getAttribute("action");
917
- action = attr ? stripBasename(attr, basename) : null;
918
- method = target.getAttribute("formmethod") || form.getAttribute("method") || defaultMethod;
919
- encType = getFormEncType(target.getAttribute("formenctype")) || getFormEncType(form.getAttribute("enctype")) || defaultEncType;
920
- formData = new FormData(form, target);
921
- if (!isFormDataSubmitterSupported()) {
922
- let {
923
- name,
924
- type,
925
- value
926
- } = target;
927
- if (type === "image") {
928
- let prefix = name ? name + "." : "";
929
- formData.append(prefix + "x", "0");
930
- formData.append(prefix + "y", "0");
931
- } else if (name) {
932
- formData.append(name, value);
933
- }
934
- }
935
- } else if (isHtmlElement(target)) {
936
- throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');
937
- } else {
938
- method = defaultMethod;
939
- action = null;
940
- encType = defaultEncType;
941
- body = target;
942
- }
943
- if (formData && encType === "text/plain") {
944
- body = formData;
945
- formData = void 0;
946
- }
947
- return {
948
- action,
949
- method: method.toLowerCase(),
950
- encType,
951
- formData,
952
- body
953
- };
954
- }
955
- function HistoryRouter(_ref6) {
956
- let {
957
- basename,
958
- children,
959
- future,
960
- history
961
- } = _ref6;
962
- let [state, setStateImpl] = React2.useState({
963
- action: history.action,
964
- location: history.location
965
- });
966
- let {
967
- v7_startTransition
968
- } = future || {};
969
- let setState = React2.useCallback((newState) => {
970
- v7_startTransition && startTransitionImpl2 ? startTransitionImpl2(() => setStateImpl(newState)) : setStateImpl(newState);
971
- }, [setStateImpl, v7_startTransition]);
972
- React2.useLayoutEffect(() => history.listen(setState), [history, setState]);
973
- React2.useEffect(() => logV6DeprecationWarnings(future), [future]);
974
- return /* @__PURE__ */ React2.createElement(Router, {
975
- basename,
976
- children,
977
- location: state.location,
978
- navigationType: state.action,
979
- navigator: history,
980
- future
981
- });
982
- }
983
- function ScrollRestoration(_ref10) {
984
- let {
985
- getKey,
986
- storageKey
987
- } = _ref10;
988
- useScrollRestoration({
989
- getKey,
990
- storageKey
991
- });
992
- return null;
993
- }
994
- function getDataRouterConsoleError2(hookName) {
995
- return hookName + " must be used within a data router. See https://reactrouter.com/v6/routers/picking-a-router.";
996
- }
997
- function useDataRouterContext2(hookName) {
998
- let ctx = React2.useContext(DataRouterContext);
999
- !ctx ? process.env.NODE_ENV !== "production" ? invariant(false, getDataRouterConsoleError2(hookName)) : invariant(false) : void 0;
1000
- return ctx;
1001
- }
1002
- function useDataRouterState2(hookName) {
1003
- let state = React2.useContext(DataRouterStateContext);
1004
- !state ? process.env.NODE_ENV !== "production" ? invariant(false, getDataRouterConsoleError2(hookName)) : invariant(false) : void 0;
1005
- return state;
1006
- }
1007
- function useLinkClickHandler(to, _temp) {
1008
- let {
1009
- target,
1010
- replace: replaceProp,
1011
- state,
1012
- preventScrollReset,
1013
- relative,
1014
- viewTransition
1015
- } = _temp === void 0 ? {} : _temp;
1016
- let navigate = useNavigate();
1017
- let location = useLocation();
1018
- let path = useResolvedPath(to, {
1019
- relative
1020
- });
1021
- return React2.useCallback((event) => {
1022
- if (shouldProcessLinkClick(event, target)) {
1023
- event.preventDefault();
1024
- let replace2 = replaceProp !== void 0 ? replaceProp : createPath(location) === createPath(path);
1025
- navigate(to, {
1026
- replace: replace2,
1027
- state,
1028
- preventScrollReset,
1029
- relative,
1030
- viewTransition
1031
- });
1032
- }
1033
- }, [location, navigate, path, replaceProp, state, target, to, preventScrollReset, relative, viewTransition]);
1034
- }
1035
- function validateClientSideSubmission() {
1036
- if (typeof document === "undefined") {
1037
- throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.");
1038
- }
1039
- }
1040
- function useSubmit() {
1041
- let {
1042
- router
1043
- } = useDataRouterContext2(DataRouterHook2.UseSubmit);
1044
- let {
1045
- basename
1046
- } = React2.useContext(NavigationContext);
1047
- let currentRouteId = useRouteId();
1048
- return React2.useCallback(function(target, options) {
1049
- if (options === void 0) {
1050
- options = {};
1051
- }
1052
- validateClientSideSubmission();
1053
- let {
1054
- action,
1055
- method,
1056
- encType,
1057
- formData,
1058
- body
1059
- } = getFormSubmissionInfo(target, basename);
1060
- if (options.navigate === false) {
1061
- let key = options.fetcherKey || getUniqueFetcherId();
1062
- router.fetch(key, currentRouteId, options.action || action, {
1063
- preventScrollReset: options.preventScrollReset,
1064
- formData,
1065
- body,
1066
- formMethod: options.method || method,
1067
- formEncType: options.encType || encType,
1068
- flushSync: options.flushSync
1069
- });
1070
- } else {
1071
- router.navigate(options.action || action, {
1072
- preventScrollReset: options.preventScrollReset,
1073
- formData,
1074
- body,
1075
- formMethod: options.method || method,
1076
- formEncType: options.encType || encType,
1077
- replace: options.replace,
1078
- state: options.state,
1079
- fromRouteId: currentRouteId,
1080
- flushSync: options.flushSync,
1081
- viewTransition: options.viewTransition
1082
- });
1083
- }
1084
- }, [router, basename, currentRouteId]);
1085
- }
1086
- function useFormAction(action, _temp2) {
1087
- let {
1088
- relative
1089
- } = _temp2 === void 0 ? {} : _temp2;
1090
- let {
1091
- basename
1092
- } = React2.useContext(NavigationContext);
1093
- let routeContext = React2.useContext(RouteContext);
1094
- !routeContext ? process.env.NODE_ENV !== "production" ? invariant(false, "useFormAction must be used inside a RouteContext") : invariant(false) : void 0;
1095
- let [match] = routeContext.matches.slice(-1);
1096
- let path = _extends3({}, useResolvedPath(action ? action : ".", {
1097
- relative
1098
- }));
1099
- let location = useLocation();
1100
- if (action == null) {
1101
- path.search = location.search;
1102
- let params = new URLSearchParams(path.search);
1103
- let indexValues = params.getAll("index");
1104
- let hasNakedIndexParam = indexValues.some((v) => v === "");
1105
- if (hasNakedIndexParam) {
1106
- params.delete("index");
1107
- indexValues.filter((v) => v).forEach((v) => params.append("index", v));
1108
- let qs = params.toString();
1109
- path.search = qs ? "?" + qs : "";
1110
- }
1111
- }
1112
- if ((!action || action === ".") && match.route.index) {
1113
- path.search = path.search ? path.search.replace(/^\?/, "?index&") : "?index";
1114
- }
1115
- if (basename !== "/") {
1116
- path.pathname = path.pathname === "/" ? basename : joinPaths([basename, path.pathname]);
1117
- }
1118
- return createPath(path);
1119
- }
1120
- function useFetcher(_temp3) {
1121
- var _route$matches;
1122
- let {
1123
- key
1124
- } = _temp3 === void 0 ? {} : _temp3;
1125
- let {
1126
- router
1127
- } = useDataRouterContext2(DataRouterHook2.UseFetcher);
1128
- let state = useDataRouterState2(DataRouterStateHook2.UseFetcher);
1129
- let fetcherData = React2.useContext(FetchersContext);
1130
- let route = React2.useContext(RouteContext);
1131
- let routeId = (_route$matches = route.matches[route.matches.length - 1]) == null ? void 0 : _route$matches.route.id;
1132
- !fetcherData ? process.env.NODE_ENV !== "production" ? invariant(false, "useFetcher must be used inside a FetchersContext") : invariant(false) : void 0;
1133
- !route ? process.env.NODE_ENV !== "production" ? invariant(false, "useFetcher must be used inside a RouteContext") : invariant(false) : void 0;
1134
- !(routeId != null) ? process.env.NODE_ENV !== "production" ? invariant(false, 'useFetcher can only be used on routes that contain a unique "id"') : invariant(false) : void 0;
1135
- let defaultKey = useIdImpl ? useIdImpl() : "";
1136
- let [fetcherKey, setFetcherKey] = React2.useState(key || defaultKey);
1137
- if (key && key !== fetcherKey) {
1138
- setFetcherKey(key);
1139
- } else if (!fetcherKey) {
1140
- setFetcherKey(getUniqueFetcherId());
1141
- }
1142
- React2.useEffect(() => {
1143
- router.getFetcher(fetcherKey);
1144
- return () => {
1145
- router.deleteFetcher(fetcherKey);
1146
- };
1147
- }, [router, fetcherKey]);
1148
- let load = React2.useCallback((href, opts) => {
1149
- !routeId ? process.env.NODE_ENV !== "production" ? invariant(false, "No routeId available for fetcher.load()") : invariant(false) : void 0;
1150
- router.fetch(fetcherKey, routeId, href, opts);
1151
- }, [fetcherKey, routeId, router]);
1152
- let submitImpl = useSubmit();
1153
- let submit = React2.useCallback((target, opts) => {
1154
- submitImpl(target, _extends3({}, opts, {
1155
- navigate: false,
1156
- fetcherKey
1157
- }));
1158
- }, [fetcherKey, submitImpl]);
1159
- let FetcherForm = React2.useMemo(() => {
1160
- let FetcherForm2 = /* @__PURE__ */ React2.forwardRef((props, ref) => {
1161
- return /* @__PURE__ */ React2.createElement(Form, _extends3({}, props, {
1162
- navigate: false,
1163
- fetcherKey,
1164
- ref
1165
- }));
1166
- });
1167
- if (process.env.NODE_ENV !== "production") {
1168
- FetcherForm2.displayName = "fetcher.Form";
1169
- }
1170
- return FetcherForm2;
1171
- }, [fetcherKey]);
1172
- let fetcher = state.fetchers.get(fetcherKey) || IDLE_FETCHER;
1173
- let data = fetcherData.get(fetcherKey);
1174
- let fetcherWithComponents = React2.useMemo(() => _extends3({
1175
- Form: FetcherForm,
1176
- submit,
1177
- load
1178
- }, fetcher, {
1179
- data
1180
- }), [FetcherForm, submit, load, fetcher, data]);
1181
- return fetcherWithComponents;
1182
- }
1183
- function useScrollRestoration(_temp4) {
1184
- let {
1185
- getKey,
1186
- storageKey
1187
- } = _temp4 === void 0 ? {} : _temp4;
1188
- let {
1189
- router
1190
- } = useDataRouterContext2(DataRouterHook2.UseScrollRestoration);
1191
- let {
1192
- restoreScrollPosition,
1193
- preventScrollReset
1194
- } = useDataRouterState2(DataRouterStateHook2.UseScrollRestoration);
1195
- let {
1196
- basename
1197
- } = React2.useContext(NavigationContext);
1198
- let location = useLocation();
1199
- let matches = useMatches();
1200
- let navigation = useNavigation();
1201
- React2.useEffect(() => {
1202
- window.history.scrollRestoration = "manual";
1203
- return () => {
1204
- window.history.scrollRestoration = "auto";
1205
- };
1206
- }, []);
1207
- usePageHide(React2.useCallback(() => {
1208
- if (navigation.state === "idle") {
1209
- let key = (getKey ? getKey(location, matches) : null) || location.key;
1210
- savedScrollPositions[key] = window.scrollY;
1211
- }
1212
- try {
1213
- sessionStorage.setItem(storageKey || SCROLL_RESTORATION_STORAGE_KEY, JSON.stringify(savedScrollPositions));
1214
- } catch (error) {
1215
- process.env.NODE_ENV !== "production" ? warning(false, "Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (" + error + ").") : void 0;
1216
- }
1217
- window.history.scrollRestoration = "auto";
1218
- }, [storageKey, getKey, navigation.state, location, matches]));
1219
- if (typeof document !== "undefined") {
1220
- React2.useLayoutEffect(() => {
1221
- try {
1222
- let sessionPositions = sessionStorage.getItem(storageKey || SCROLL_RESTORATION_STORAGE_KEY);
1223
- if (sessionPositions) {
1224
- savedScrollPositions = JSON.parse(sessionPositions);
1225
- }
1226
- } catch (e) {
1227
- }
1228
- }, [storageKey]);
1229
- React2.useLayoutEffect(() => {
1230
- let getKeyWithoutBasename = getKey && basename !== "/" ? (location2, matches2) => getKey(
1231
- // Strip the basename to match useLocation()
1232
- _extends3({}, location2, {
1233
- pathname: stripBasename(location2.pathname, basename) || location2.pathname
1234
- }),
1235
- matches2
1236
- ) : getKey;
1237
- let disableScrollRestoration = router == null ? void 0 : router.enableScrollRestoration(savedScrollPositions, () => window.scrollY, getKeyWithoutBasename);
1238
- return () => disableScrollRestoration && disableScrollRestoration();
1239
- }, [router, basename, getKey]);
1240
- React2.useLayoutEffect(() => {
1241
- if (restoreScrollPosition === false) {
1242
- return;
1243
- }
1244
- if (typeof restoreScrollPosition === "number") {
1245
- window.scrollTo(0, restoreScrollPosition);
1246
- return;
1247
- }
1248
- if (location.hash) {
1249
- let el = document.getElementById(decodeURIComponent(location.hash.slice(1)));
1250
- if (el) {
1251
- el.scrollIntoView();
1252
- return;
1253
- }
1254
- }
1255
- if (preventScrollReset === true) {
1256
- return;
1257
- }
1258
- window.scrollTo(0, 0);
1259
- }, [location, restoreScrollPosition, preventScrollReset]);
1260
- }
1261
- }
1262
- function usePageHide(callback, options) {
1263
- let {
1264
- capture
1265
- } = options || {};
1266
- React2.useEffect(() => {
1267
- let opts = capture != null ? {
1268
- capture
1269
- } : void 0;
1270
- window.addEventListener("pagehide", callback, opts);
1271
- return () => {
1272
- window.removeEventListener("pagehide", callback, opts);
1273
- };
1274
- }, [callback, capture]);
1275
- }
1276
- function useViewTransitionState(to, opts) {
1277
- if (opts === void 0) {
1278
- opts = {};
1279
- }
1280
- let vtContext = React2.useContext(ViewTransitionContext);
1281
- !(vtContext != null) ? process.env.NODE_ENV !== "production" ? invariant(false, "`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?") : invariant(false) : void 0;
1282
- let {
1283
- basename
1284
- } = useDataRouterContext2(DataRouterHook2.useViewTransitionState);
1285
- let path = useResolvedPath(to, {
1286
- relative: opts.relative
1287
- });
1288
- if (!vtContext.isTransitioning) {
1289
- return false;
1290
- }
1291
- let currentPath = stripBasename(vtContext.currentLocation.pathname, basename) || vtContext.currentLocation.pathname;
1292
- let nextPath = stripBasename(vtContext.nextLocation.pathname, basename) || vtContext.nextLocation.pathname;
1293
- return matchPath(path.pathname, nextPath) != null || matchPath(path.pathname, currentPath) != null;
1294
- }
1295
- var defaultMethod, defaultEncType, _formDataSupportsSubmitter, supportedFormEncTypes, _excluded, _excluded2, _excluded3, REACT_ROUTER_VERSION, ViewTransitionContext, FetchersContext, START_TRANSITION2, startTransitionImpl2, FLUSH_SYNC, flushSyncImpl, USE_ID, useIdImpl, isBrowser, ABSOLUTE_URL_REGEX, Link, NavLink, Form, DataRouterHook2, DataRouterStateHook2, fetcherId, getUniqueFetcherId, SCROLL_RESTORATION_STORAGE_KEY, savedScrollPositions;
1296
- var init_dist2 = __esm({
1297
- "node_modules/react-router-dom/dist/index.js"() {
1298
- "use strict";
1299
- init_dist();
1300
- init_dist();
1301
- init_router();
1302
- defaultMethod = "get";
1303
- defaultEncType = "application/x-www-form-urlencoded";
1304
- _formDataSupportsSubmitter = null;
1305
- supportedFormEncTypes = /* @__PURE__ */ new Set(["application/x-www-form-urlencoded", "multipart/form-data", "text/plain"]);
1306
- _excluded = ["onClick", "relative", "reloadDocument", "replace", "state", "target", "to", "preventScrollReset", "viewTransition"];
1307
- _excluded2 = ["aria-current", "caseSensitive", "className", "end", "style", "to", "viewTransition", "children"];
1308
- _excluded3 = ["fetcherKey", "navigate", "reloadDocument", "replace", "state", "method", "action", "onSubmit", "relative", "preventScrollReset", "viewTransition"];
1309
- REACT_ROUTER_VERSION = "6";
1310
- try {
1311
- window.__reactRouterVersion = REACT_ROUTER_VERSION;
1312
- } catch (e) {
1313
- }
1314
- ViewTransitionContext = /* @__PURE__ */ React2.createContext({
1315
- isTransitioning: false
1316
- });
1317
- if (process.env.NODE_ENV !== "production") {
1318
- ViewTransitionContext.displayName = "ViewTransition";
1319
- }
1320
- FetchersContext = /* @__PURE__ */ React2.createContext(/* @__PURE__ */ new Map());
1321
- if (process.env.NODE_ENV !== "production") {
1322
- FetchersContext.displayName = "Fetchers";
1323
- }
1324
- START_TRANSITION2 = "startTransition";
1325
- startTransitionImpl2 = React2[START_TRANSITION2];
1326
- FLUSH_SYNC = "flushSync";
1327
- flushSyncImpl = ReactDOM[FLUSH_SYNC];
1328
- USE_ID = "useId";
1329
- useIdImpl = React2[USE_ID];
1330
- if (process.env.NODE_ENV !== "production") {
1331
- HistoryRouter.displayName = "unstable_HistoryRouter";
1332
- }
1333
- isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
1334
- ABSOLUTE_URL_REGEX = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;
1335
- Link = /* @__PURE__ */ React2.forwardRef(function LinkWithRef(_ref7, ref) {
1336
- let {
1337
- onClick,
1338
- relative,
1339
- reloadDocument,
1340
- replace: replace2,
1341
- state,
1342
- target,
1343
- to,
1344
- preventScrollReset,
1345
- viewTransition
1346
- } = _ref7, rest = _objectWithoutPropertiesLoose(_ref7, _excluded);
1347
- let {
1348
- basename
1349
- } = React2.useContext(NavigationContext);
1350
- let absoluteHref;
1351
- let isExternal = false;
1352
- if (typeof to === "string" && ABSOLUTE_URL_REGEX.test(to)) {
1353
- absoluteHref = to;
1354
- if (isBrowser) {
1355
- try {
1356
- let currentUrl = new URL(window.location.href);
1357
- let targetUrl = to.startsWith("//") ? new URL(currentUrl.protocol + to) : new URL(to);
1358
- let path = stripBasename(targetUrl.pathname, basename);
1359
- if (targetUrl.origin === currentUrl.origin && path != null) {
1360
- to = path + targetUrl.search + targetUrl.hash;
1361
- } else {
1362
- isExternal = true;
1363
- }
1364
- } catch (e) {
1365
- process.env.NODE_ENV !== "production" ? warning(false, '<Link to="' + to + '"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.') : void 0;
1366
- }
1367
- }
1368
- }
1369
- let href = useHref(to, {
1370
- relative
1371
- });
1372
- let internalOnClick = useLinkClickHandler(to, {
1373
- replace: replace2,
1374
- state,
1375
- target,
1376
- preventScrollReset,
1377
- relative,
1378
- viewTransition
1379
- });
1380
- function handleClick(event) {
1381
- if (onClick) onClick(event);
1382
- if (!event.defaultPrevented) {
1383
- internalOnClick(event);
1384
- }
1385
- }
1386
- return (
1387
- // eslint-disable-next-line jsx-a11y/anchor-has-content
1388
- /* @__PURE__ */ React2.createElement("a", _extends3({}, rest, {
1389
- href: absoluteHref || href,
1390
- onClick: isExternal || reloadDocument ? onClick : handleClick,
1391
- ref,
1392
- target
1393
- }))
1394
- );
1395
- });
1396
- if (process.env.NODE_ENV !== "production") {
1397
- Link.displayName = "Link";
1398
- }
1399
- NavLink = /* @__PURE__ */ React2.forwardRef(function NavLinkWithRef(_ref8, ref) {
1400
- let {
1401
- "aria-current": ariaCurrentProp = "page",
1402
- caseSensitive = false,
1403
- className: classNameProp = "",
1404
- end = false,
1405
- style: styleProp,
1406
- to,
1407
- viewTransition,
1408
- children
1409
- } = _ref8, rest = _objectWithoutPropertiesLoose(_ref8, _excluded2);
1410
- let path = useResolvedPath(to, {
1411
- relative: rest.relative
1412
- });
1413
- let location = useLocation();
1414
- let routerState = React2.useContext(DataRouterStateContext);
1415
- let {
1416
- navigator,
1417
- basename
1418
- } = React2.useContext(NavigationContext);
1419
- let isTransitioning = routerState != null && // Conditional usage is OK here because the usage of a data router is static
1420
- // eslint-disable-next-line react-hooks/rules-of-hooks
1421
- useViewTransitionState(path) && viewTransition === true;
1422
- let toPathname = navigator.encodeLocation ? navigator.encodeLocation(path).pathname : path.pathname;
1423
- let locationPathname = location.pathname;
1424
- let nextLocationPathname = routerState && routerState.navigation && routerState.navigation.location ? routerState.navigation.location.pathname : null;
1425
- if (!caseSensitive) {
1426
- locationPathname = locationPathname.toLowerCase();
1427
- nextLocationPathname = nextLocationPathname ? nextLocationPathname.toLowerCase() : null;
1428
- toPathname = toPathname.toLowerCase();
1429
- }
1430
- if (nextLocationPathname && basename) {
1431
- nextLocationPathname = stripBasename(nextLocationPathname, basename) || nextLocationPathname;
1432
- }
1433
- const endSlashPosition = toPathname !== "/" && toPathname.endsWith("/") ? toPathname.length - 1 : toPathname.length;
1434
- let isActive = locationPathname === toPathname || !end && locationPathname.startsWith(toPathname) && locationPathname.charAt(endSlashPosition) === "/";
1435
- let isPending = nextLocationPathname != null && (nextLocationPathname === toPathname || !end && nextLocationPathname.startsWith(toPathname) && nextLocationPathname.charAt(toPathname.length) === "/");
1436
- let renderProps = {
1437
- isActive,
1438
- isPending,
1439
- isTransitioning
1440
- };
1441
- let ariaCurrent = isActive ? ariaCurrentProp : void 0;
1442
- let className;
1443
- if (typeof classNameProp === "function") {
1444
- className = classNameProp(renderProps);
1445
- } else {
1446
- className = [classNameProp, isActive ? "active" : null, isPending ? "pending" : null, isTransitioning ? "transitioning" : null].filter(Boolean).join(" ");
1447
- }
1448
- let style = typeof styleProp === "function" ? styleProp(renderProps) : styleProp;
1449
- return /* @__PURE__ */ React2.createElement(Link, _extends3({}, rest, {
1450
- "aria-current": ariaCurrent,
1451
- className,
1452
- ref,
1453
- style,
1454
- to,
1455
- viewTransition
1456
- }), typeof children === "function" ? children(renderProps) : children);
1457
- });
1458
- if (process.env.NODE_ENV !== "production") {
1459
- NavLink.displayName = "NavLink";
1460
- }
1461
- Form = /* @__PURE__ */ React2.forwardRef((_ref9, forwardedRef) => {
1462
- let {
1463
- fetcherKey,
1464
- navigate,
1465
- reloadDocument,
1466
- replace: replace2,
1467
- state,
1468
- method = defaultMethod,
1469
- action,
1470
- onSubmit,
1471
- relative,
1472
- preventScrollReset,
1473
- viewTransition
1474
- } = _ref9, props = _objectWithoutPropertiesLoose(_ref9, _excluded3);
1475
- let submit = useSubmit();
1476
- let formAction = useFormAction(action, {
1477
- relative
1478
- });
1479
- let formMethod = method.toLowerCase() === "get" ? "get" : "post";
1480
- let submitHandler = (event) => {
1481
- onSubmit && onSubmit(event);
1482
- if (event.defaultPrevented) return;
1483
- event.preventDefault();
1484
- let submitter = event.nativeEvent.submitter;
1485
- let submitMethod = (submitter == null ? void 0 : submitter.getAttribute("formmethod")) || method;
1486
- submit(submitter || event.currentTarget, {
1487
- fetcherKey,
1488
- method: submitMethod,
1489
- navigate,
1490
- replace: replace2,
1491
- state,
1492
- relative,
1493
- preventScrollReset,
1494
- viewTransition
1495
- });
1496
- };
1497
- return /* @__PURE__ */ React2.createElement("form", _extends3({
1498
- ref: forwardedRef,
1499
- method: formMethod,
1500
- action: formAction,
1501
- onSubmit: reloadDocument ? onSubmit : submitHandler
1502
- }, props));
1503
- });
1504
- if (process.env.NODE_ENV !== "production") {
1505
- Form.displayName = "Form";
1506
- }
1507
- if (process.env.NODE_ENV !== "production") {
1508
- ScrollRestoration.displayName = "ScrollRestoration";
1509
- }
1510
- (function(DataRouterHook3) {
1511
- DataRouterHook3["UseScrollRestoration"] = "useScrollRestoration";
1512
- DataRouterHook3["UseSubmit"] = "useSubmit";
1513
- DataRouterHook3["UseSubmitFetcher"] = "useSubmitFetcher";
1514
- DataRouterHook3["UseFetcher"] = "useFetcher";
1515
- DataRouterHook3["useViewTransitionState"] = "useViewTransitionState";
1516
- })(DataRouterHook2 || (DataRouterHook2 = {}));
1517
- (function(DataRouterStateHook3) {
1518
- DataRouterStateHook3["UseFetcher"] = "useFetcher";
1519
- DataRouterStateHook3["UseFetchers"] = "useFetchers";
1520
- DataRouterStateHook3["UseScrollRestoration"] = "useScrollRestoration";
1521
- })(DataRouterStateHook2 || (DataRouterStateHook2 = {}));
1522
- fetcherId = 0;
1523
- getUniqueFetcherId = () => "__" + String(++fetcherId) + "__";
1524
- SCROLL_RESTORATION_STORAGE_KEY = "react-router-scroll-positions";
1525
- savedScrollPositions = {};
1526
- }
1527
- });
1528
-
1529
- // node_modules/@remix-run/react/dist/esm/index.js
1530
- init_dist2();
1531
-
1532
- // node_modules/@remix-run/react/dist/esm/_virtual/_rollupPluginBabelHelpers.js
1533
- function _extends4() {
1534
- _extends4 = Object.assign ? Object.assign.bind() : function(target) {
1535
- for (var i = 1; i < arguments.length; i++) {
1536
- var source = arguments[i];
1537
- for (var key in source) {
1538
- if (Object.prototype.hasOwnProperty.call(source, key)) {
1539
- target[key] = source[key];
1540
- }
1541
- }
1542
- }
1543
- return target;
1544
- };
1545
- return _extends4.apply(this, arguments);
1546
- }
1547
-
1548
- // node_modules/@remix-run/react/dist/esm/components.js
1549
- init_dist2();
1550
- import * as React4 from "react";
1551
-
1552
- // node_modules/@remix-run/react/dist/esm/invariant.js
1553
- function invariant2(value, message) {
1554
- if (value === false || value === null || typeof value === "undefined") {
1555
- throw new Error(message);
1556
- }
1557
- }
1558
-
1559
- // node_modules/@remix-run/react/dist/esm/links.js
1560
- init_dist2();
1561
-
1562
- // node_modules/@remix-run/react/dist/esm/routeModules.js
1563
- async function loadRouteModule(route, routeModulesCache) {
1564
- if (route.id in routeModulesCache) {
1565
- return routeModulesCache[route.id];
1566
- }
1567
- try {
1568
- let routeModule = await import(
1569
- /* webpackIgnore: true */
1570
- route.module
1571
- );
1572
- routeModulesCache[route.id] = routeModule;
1573
- return routeModule;
1574
- } catch (error) {
1575
- console.error(`Error loading route module \`${route.module}\`, reloading page...`);
1576
- console.error(error);
1577
- if (window.__remixContext.isSpaMode && // @ts-expect-error
1578
- typeof import.meta.hot !== "undefined") {
1579
- throw error;
1580
- }
1581
- window.location.reload();
1582
- return new Promise(() => {
1583
- });
1584
- }
1585
- }
1586
-
1587
- // node_modules/@remix-run/react/dist/esm/links.js
1588
- function isPageLinkDescriptor(object) {
1589
- return object != null && typeof object.page === "string";
1590
- }
1591
- function isHtmlLinkDescriptor(object) {
1592
- if (object == null) {
1593
- return false;
1594
- }
1595
- if (object.href == null) {
1596
- return object.rel === "preload" && typeof object.imageSrcSet === "string" && typeof object.imageSizes === "string";
1597
- }
1598
- return typeof object.rel === "string" && typeof object.href === "string";
1599
- }
1600
- async function getKeyedPrefetchLinks(matches, manifest, routeModules) {
1601
- let links = await Promise.all(matches.map(async (match) => {
1602
- let mod = await loadRouteModule(manifest.routes[match.route.id], routeModules);
1603
- return mod.links ? mod.links() : [];
1604
- }));
1605
- return dedupeLinkDescriptors(links.flat(1).filter(isHtmlLinkDescriptor).filter((link) => link.rel === "stylesheet" || link.rel === "preload").map((link) => link.rel === "stylesheet" ? {
1606
- ...link,
1607
- rel: "prefetch",
1608
- as: "style"
1609
- } : {
1610
- ...link,
1611
- rel: "prefetch"
1612
- }));
1613
- }
1614
- function getNewMatchesForLinks(page, nextMatches, currentMatches, manifest, location, future, mode) {
1615
- let path = parsePathPatch(page);
1616
- let isNew = (match, index) => {
1617
- if (!currentMatches[index]) return true;
1618
- return match.route.id !== currentMatches[index].route.id;
1619
- };
1620
- let matchPathChanged = (match, index) => {
1621
- var _currentMatches$index;
1622
- return (
1623
- // param change, /users/123 -> /users/456
1624
- currentMatches[index].pathname !== match.pathname || // splat param changed, which is not present in match.path
1625
- // e.g. /files/images/avatar.jpg -> files/finances.xls
1626
- ((_currentMatches$index = currentMatches[index].route.path) === null || _currentMatches$index === void 0 ? void 0 : _currentMatches$index.endsWith("*")) && currentMatches[index].params["*"] !== match.params["*"]
1627
- );
1628
- };
1629
- let newMatches = mode === "data" && (future.v3_singleFetch || location.search !== path.search) ? (
1630
- // this is really similar to stuff in transition.ts, maybe somebody smarter
1631
- // than me (or in less of a hurry) can share some of it. You're the best.
1632
- nextMatches.filter((match, index) => {
1633
- let manifestRoute = manifest.routes[match.route.id];
1634
- if (!manifestRoute.hasLoader) {
1635
- return false;
1636
- }
1637
- if (isNew(match, index) || matchPathChanged(match, index)) {
1638
- return true;
1639
- }
1640
- let defaultShouldRevalidate = future.v3_singleFetch || location.search !== path.search;
1641
- if (match.route.shouldRevalidate) {
1642
- var _currentMatches$;
1643
- let routeChoice = match.route.shouldRevalidate({
1644
- currentUrl: new URL(location.pathname + location.search + location.hash, window.origin),
1645
- currentParams: ((_currentMatches$ = currentMatches[0]) === null || _currentMatches$ === void 0 ? void 0 : _currentMatches$.params) || {},
1646
- nextUrl: new URL(page, window.origin),
1647
- nextParams: match.params,
1648
- defaultShouldRevalidate
1649
- });
1650
- if (typeof routeChoice === "boolean") {
1651
- return routeChoice;
1652
- }
1653
- }
1654
- return defaultShouldRevalidate;
1655
- })
1656
- ) : nextMatches.filter((match, index) => {
1657
- let manifestRoute = manifest.routes[match.route.id];
1658
- return (mode === "assets" || manifestRoute.hasLoader) && (isNew(match, index) || matchPathChanged(match, index));
1659
- });
1660
- return newMatches;
1661
- }
1662
- function getDataLinkHrefs(page, matches, manifest) {
1663
- let path = parsePathPatch(page);
1664
- return dedupeHrefs(matches.filter((match) => manifest.routes[match.route.id].hasLoader && !manifest.routes[match.route.id].hasClientLoader).map((match) => {
1665
- let {
1666
- pathname,
1667
- search
1668
- } = path;
1669
- let searchParams = new URLSearchParams(search);
1670
- searchParams.set("_data", match.route.id);
1671
- return `${pathname}?${searchParams}`;
1672
- }));
1673
- }
1674
- function getModuleLinkHrefs(matches, manifestPatch) {
1675
- return dedupeHrefs(matches.map((match) => {
1676
- let route = manifestPatch.routes[match.route.id];
1677
- let hrefs = [route.module];
1678
- if (route.imports) {
1679
- hrefs = hrefs.concat(route.imports);
1680
- }
1681
- return hrefs;
1682
- }).flat(1));
1683
- }
1684
- function dedupeHrefs(hrefs) {
1685
- return [...new Set(hrefs)];
1686
- }
1687
- function sortKeys(obj) {
1688
- let sorted = {};
1689
- let keys = Object.keys(obj).sort();
1690
- for (let key of keys) {
1691
- sorted[key] = obj[key];
1692
- }
1693
- return sorted;
1694
- }
1695
- function dedupeLinkDescriptors(descriptors, preloads) {
1696
- let set = /* @__PURE__ */ new Set();
1697
- let preloadsSet = new Set(preloads);
1698
- return descriptors.reduce((deduped, descriptor) => {
1699
- let alreadyModulePreload = preloads && !isPageLinkDescriptor(descriptor) && descriptor.as === "script" && descriptor.href && preloadsSet.has(descriptor.href);
1700
- if (alreadyModulePreload) {
1701
- return deduped;
1702
- }
1703
- let key = JSON.stringify(sortKeys(descriptor));
1704
- if (!set.has(key)) {
1705
- set.add(key);
1706
- deduped.push({
1707
- key,
1708
- link: descriptor
1709
- });
1710
- }
1711
- return deduped;
1712
- }, []);
1713
- }
1714
- function parsePathPatch(href) {
1715
- let path = parsePath(href);
1716
- if (path.search === void 0) path.search = "";
1717
- return path;
1718
- }
1719
-
1720
- // node_modules/@remix-run/react/dist/esm/single-fetch.js
1721
- import * as React3 from "react";
1722
- function singleFetchUrl(reqUrl) {
1723
- let url = typeof reqUrl === "string" ? new URL(
1724
- reqUrl,
1725
- // This can be called during the SSR flow via PrefetchPageLinksImpl so
1726
- // don't assume window is available
1727
- typeof window === "undefined" ? "server://singlefetch/" : window.location.origin
1728
- ) : reqUrl;
1729
- if (url.pathname === "/") {
1730
- url.pathname = "_root.data";
1731
- } else {
1732
- url.pathname = `${url.pathname.replace(/\/$/, "")}.data`;
1733
- }
1734
- return url;
1735
- }
1736
-
1737
- // node_modules/@remix-run/react/dist/esm/components.js
1738
- function useDataRouterContext3() {
1739
- let context = React4.useContext(DataRouterContext);
1740
- invariant2(context, "You must render this element inside a <DataRouterContext.Provider> element");
1741
- return context;
1742
- }
1743
- function useDataRouterStateContext() {
1744
- let context = React4.useContext(DataRouterStateContext);
1745
- invariant2(context, "You must render this element inside a <DataRouterStateContext.Provider> element");
1746
- return context;
1747
- }
1748
- var RemixContext = /* @__PURE__ */ React4.createContext(void 0);
1749
- RemixContext.displayName = "Remix";
1750
- function useRemixContext() {
1751
- let context = React4.useContext(RemixContext);
1752
- invariant2(context, "You must render this element inside a <Remix> element");
1753
- return context;
1754
- }
1755
- function usePrefetchBehavior(prefetch, theirElementProps) {
1756
- let [maybePrefetch, setMaybePrefetch] = React4.useState(false);
1757
- let [shouldPrefetch, setShouldPrefetch] = React4.useState(false);
1758
- let {
1759
- onFocus,
1760
- onBlur,
1761
- onMouseEnter,
1762
- onMouseLeave,
1763
- onTouchStart
1764
- } = theirElementProps;
1765
- let ref = React4.useRef(null);
1766
- React4.useEffect(() => {
1767
- if (prefetch === "render") {
1768
- setShouldPrefetch(true);
1769
- }
1770
- if (prefetch === "viewport") {
1771
- let callback = (entries) => {
1772
- entries.forEach((entry) => {
1773
- setShouldPrefetch(entry.isIntersecting);
1774
- });
1775
- };
1776
- let observer = new IntersectionObserver(callback, {
1777
- threshold: 0.5
1778
- });
1779
- if (ref.current) observer.observe(ref.current);
1780
- return () => {
1781
- observer.disconnect();
1782
- };
1783
- }
1784
- }, [prefetch]);
1785
- let setIntent = () => {
1786
- if (prefetch === "intent") {
1787
- setMaybePrefetch(true);
1788
- }
1789
- };
1790
- let cancelIntent = () => {
1791
- if (prefetch === "intent") {
1792
- setMaybePrefetch(false);
1793
- setShouldPrefetch(false);
1794
- }
1795
- };
1796
- React4.useEffect(() => {
1797
- if (maybePrefetch) {
1798
- let id = setTimeout(() => {
1799
- setShouldPrefetch(true);
1800
- }, 100);
1801
- return () => {
1802
- clearTimeout(id);
1803
- };
1804
- }
1805
- }, [maybePrefetch]);
1806
- return [shouldPrefetch, ref, {
1807
- onFocus: composeEventHandlers(onFocus, setIntent),
1808
- onBlur: composeEventHandlers(onBlur, cancelIntent),
1809
- onMouseEnter: composeEventHandlers(onMouseEnter, setIntent),
1810
- onMouseLeave: composeEventHandlers(onMouseLeave, cancelIntent),
1811
- onTouchStart: composeEventHandlers(onTouchStart, setIntent)
1812
- }];
1813
- }
1814
- var ABSOLUTE_URL_REGEX2 = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;
1815
- function getDiscoverAttr(discover, isAbsolute, reloadDocument) {
1816
- return discover === "render" && !isAbsolute && !reloadDocument ? "true" : void 0;
1817
- }
1818
- var NavLink2 = /* @__PURE__ */ React4.forwardRef(({
1819
- to,
1820
- prefetch = "none",
1821
- discover = "render",
1822
- ...props
1823
- }, forwardedRef) => {
1824
- let isAbsolute = typeof to === "string" && ABSOLUTE_URL_REGEX2.test(to);
1825
- let href = useHref(to);
1826
- let [shouldPrefetch, ref, prefetchHandlers] = usePrefetchBehavior(prefetch, props);
1827
- return /* @__PURE__ */ React4.createElement(React4.Fragment, null, /* @__PURE__ */ React4.createElement(NavLink, _extends4({}, props, prefetchHandlers, {
1828
- ref: mergeRefs(forwardedRef, ref),
1829
- to,
1830
- "data-discover": getDiscoverAttr(discover, isAbsolute, props.reloadDocument)
1831
- })), shouldPrefetch && !isAbsolute ? /* @__PURE__ */ React4.createElement(PrefetchPageLinks, {
1832
- page: href
1833
- }) : null);
1834
- });
1835
- NavLink2.displayName = "NavLink";
1836
- var Link2 = /* @__PURE__ */ React4.forwardRef(({
1837
- to,
1838
- prefetch = "none",
1839
- discover = "render",
1840
- ...props
1841
- }, forwardedRef) => {
1842
- let isAbsolute = typeof to === "string" && ABSOLUTE_URL_REGEX2.test(to);
1843
- let href = useHref(to);
1844
- let [shouldPrefetch, ref, prefetchHandlers] = usePrefetchBehavior(prefetch, props);
1845
- return /* @__PURE__ */ React4.createElement(React4.Fragment, null, /* @__PURE__ */ React4.createElement(Link, _extends4({}, props, prefetchHandlers, {
1846
- ref: mergeRefs(forwardedRef, ref),
1847
- to,
1848
- "data-discover": getDiscoverAttr(discover, isAbsolute, props.reloadDocument)
1849
- })), shouldPrefetch && !isAbsolute ? /* @__PURE__ */ React4.createElement(PrefetchPageLinks, {
1850
- page: href
1851
- }) : null);
1852
- });
1853
- Link2.displayName = "Link";
1854
- var Form2 = /* @__PURE__ */ React4.forwardRef(({
1855
- discover = "render",
1856
- ...props
1857
- }, forwardedRef) => {
1858
- let isAbsolute = typeof props.action === "string" && ABSOLUTE_URL_REGEX2.test(props.action);
1859
- return /* @__PURE__ */ React4.createElement(Form, _extends4({}, props, {
1860
- ref: forwardedRef,
1861
- "data-discover": getDiscoverAttr(discover, isAbsolute, props.reloadDocument)
1862
- }));
1863
- });
1864
- Form2.displayName = "Form";
1865
- function composeEventHandlers(theirHandler, ourHandler) {
1866
- return (event) => {
1867
- theirHandler && theirHandler(event);
1868
- if (!event.defaultPrevented) {
1869
- ourHandler(event);
1870
- }
1871
- };
1872
- }
1873
- function PrefetchPageLinks({
1874
- page,
1875
- ...dataLinkProps
1876
- }) {
1877
- let {
1878
- router
1879
- } = useDataRouterContext3();
1880
- let matches = React4.useMemo(() => matchRoutes(router.routes, page, router.basename), [router.routes, page, router.basename]);
1881
- if (!matches) {
1882
- console.warn(`Tried to prefetch ${page} but no routes matched.`);
1883
- return null;
1884
- }
1885
- return /* @__PURE__ */ React4.createElement(PrefetchPageLinksImpl, _extends4({
1886
- page,
1887
- matches
1888
- }, dataLinkProps));
1889
- }
1890
- function useKeyedPrefetchLinks(matches) {
1891
- let {
1892
- manifest,
1893
- routeModules
1894
- } = useRemixContext();
1895
- let [keyedPrefetchLinks, setKeyedPrefetchLinks] = React4.useState([]);
1896
- React4.useEffect(() => {
1897
- let interrupted = false;
1898
- void getKeyedPrefetchLinks(matches, manifest, routeModules).then((links) => {
1899
- if (!interrupted) {
1900
- setKeyedPrefetchLinks(links);
1901
- }
1902
- });
1903
- return () => {
1904
- interrupted = true;
1905
- };
1906
- }, [matches, manifest, routeModules]);
1907
- return keyedPrefetchLinks;
1908
- }
1909
- function PrefetchPageLinksImpl({
1910
- page,
1911
- matches: nextMatches,
1912
- ...linkProps
1913
- }) {
1914
- let location = useLocation();
1915
- let {
1916
- future,
1917
- manifest,
1918
- routeModules
1919
- } = useRemixContext();
1920
- let {
1921
- loaderData,
1922
- matches
1923
- } = useDataRouterStateContext();
1924
- let newMatchesForData = React4.useMemo(() => getNewMatchesForLinks(page, nextMatches, matches, manifest, location, future, "data"), [page, nextMatches, matches, manifest, location, future]);
1925
- let dataHrefs = React4.useMemo(() => {
1926
- if (!future.v3_singleFetch) {
1927
- return getDataLinkHrefs(page, newMatchesForData, manifest);
1928
- }
1929
- if (page === location.pathname + location.search + location.hash) {
1930
- return [];
1931
- }
1932
- let routesParams = /* @__PURE__ */ new Set();
1933
- let foundOptOutRoute = false;
1934
- nextMatches.forEach((m) => {
1935
- var _routeModules$m$route;
1936
- if (!manifest.routes[m.route.id].hasLoader) {
1937
- return;
1938
- }
1939
- if (!newMatchesForData.some((m2) => m2.route.id === m.route.id) && m.route.id in loaderData && (_routeModules$m$route = routeModules[m.route.id]) !== null && _routeModules$m$route !== void 0 && _routeModules$m$route.shouldRevalidate) {
1940
- foundOptOutRoute = true;
1941
- } else if (manifest.routes[m.route.id].hasClientLoader) {
1942
- foundOptOutRoute = true;
1943
- } else {
1944
- routesParams.add(m.route.id);
1945
- }
1946
- });
1947
- if (routesParams.size === 0) {
1948
- return [];
1949
- }
1950
- let url = singleFetchUrl(page);
1951
- if (foundOptOutRoute && routesParams.size > 0) {
1952
- url.searchParams.set("_routes", nextMatches.filter((m) => routesParams.has(m.route.id)).map((m) => m.route.id).join(","));
1953
- }
1954
- return [url.pathname + url.search];
1955
- }, [future.v3_singleFetch, loaderData, location, manifest, newMatchesForData, nextMatches, page, routeModules]);
1956
- let newMatchesForAssets = React4.useMemo(() => getNewMatchesForLinks(page, nextMatches, matches, manifest, location, future, "assets"), [page, nextMatches, matches, manifest, location, future]);
1957
- let moduleHrefs = React4.useMemo(() => getModuleLinkHrefs(newMatchesForAssets, manifest), [newMatchesForAssets, manifest]);
1958
- let keyedPrefetchLinks = useKeyedPrefetchLinks(newMatchesForAssets);
1959
- return /* @__PURE__ */ React4.createElement(React4.Fragment, null, dataHrefs.map((href) => /* @__PURE__ */ React4.createElement("link", _extends4({
1960
- key: href,
1961
- rel: "prefetch",
1962
- as: "fetch",
1963
- href
1964
- }, linkProps))), moduleHrefs.map((href) => /* @__PURE__ */ React4.createElement("link", _extends4({
1965
- key: href,
1966
- rel: "modulepreload",
1967
- href
1968
- }, linkProps))), keyedPrefetchLinks.map(({
1969
- key,
1970
- link
1971
- }) => (
1972
- // these don't spread `linkProps` because they are full link descriptors
1973
- // already with their own props
1974
- /* @__PURE__ */ React4.createElement("link", _extends4({
1975
- key
1976
- }, link))
1977
- )));
1978
- }
1979
- function useLoaderData2() {
1980
- return useLoaderData();
1981
- }
1982
- function useActionData2() {
1983
- return useActionData();
1984
- }
1985
- function useFetcher2(opts = {}) {
1986
- return useFetcher(opts);
1987
- }
1988
- var LiveReload = (
1989
- // Dead Code Elimination magic for production builds.
1990
- // This way devs don't have to worry about doing the NODE_ENV check themselves.
1991
- process.env.NODE_ENV !== "development" ? () => null : function LiveReload2({
1992
- origin,
1993
- port,
1994
- timeoutMs = 1e3,
1995
- nonce = void 0
1996
- }) {
1997
- let isViteClient = import.meta && import.meta.env !== void 0;
1998
- if (isViteClient) {
1999
- console.warn(["`<LiveReload />` is obsolete when using Vite and can conflict with Vite's built-in HMR runtime.", "", "Remove `<LiveReload />` from your code and instead only use `<Scripts />`.", "Then refresh the page to remove lingering scripts from `<LiveReload />`."].join("\n"));
2000
- return null;
2001
- }
2002
- origin ?? (origin = process.env.REMIX_DEV_ORIGIN);
2003
- let js = String.raw;
2004
- return /* @__PURE__ */ React4.createElement("script", {
2005
- nonce,
2006
- suppressHydrationWarning: true,
2007
- dangerouslySetInnerHTML: {
2008
- __html: js`
2009
- function remixLiveReloadConnect(config) {
2010
- let LIVE_RELOAD_ORIGIN = ${JSON.stringify(origin)};
2011
- let protocol =
2012
- LIVE_RELOAD_ORIGIN ? new URL(LIVE_RELOAD_ORIGIN).protocol.replace(/^http/, "ws") :
2013
- location.protocol === "https:" ? "wss:" : "ws:"; // remove in v2?
2014
- let hostname = LIVE_RELOAD_ORIGIN ? new URL(LIVE_RELOAD_ORIGIN).hostname : location.hostname;
2015
- let url = new URL(protocol + "//" + hostname + "/socket");
2016
-
2017
- url.port =
2018
- ${port} ||
2019
- (LIVE_RELOAD_ORIGIN ? new URL(LIVE_RELOAD_ORIGIN).port : 8002);
2020
-
2021
- let ws = new WebSocket(url.href);
2022
- ws.onmessage = async (message) => {
2023
- let event = JSON.parse(message.data);
2024
- if (event.type === "LOG") {
2025
- console.log(event.message);
2026
- }
2027
- if (event.type === "RELOAD") {
2028
- console.log("💿 Reloading window ...");
2029
- window.location.reload();
2030
- }
2031
- if (event.type === "HMR") {
2032
- if (!window.__hmr__ || !window.__hmr__.contexts) {
2033
- console.log("💿 [HMR] No HMR context, reloading window ...");
2034
- window.location.reload();
2035
- return;
2036
- }
2037
- if (!event.updates || !event.updates.length) return;
2038
- let updateAccepted = false;
2039
- let needsRevalidation = new Set();
2040
- for (let update of event.updates) {
2041
- console.log("[HMR] " + update.reason + " [" + update.id +"]")
2042
- if (update.revalidate) {
2043
- needsRevalidation.add(update.routeId);
2044
- console.log("[HMR] Revalidating [" + update.routeId + "]");
2045
- }
2046
- let imported = await import(update.url + '?t=' + event.assetsManifest.hmr.timestamp);
2047
- if (window.__hmr__.contexts[update.id]) {
2048
- let accepted = window.__hmr__.contexts[update.id].emit(
2049
- imported
2050
- );
2051
- if (accepted) {
2052
- console.log("[HMR] Update accepted by", update.id);
2053
- updateAccepted = true;
2054
- }
2055
- }
2056
- }
2057
- if (event.assetsManifest && window.__hmr__.contexts["remix:manifest"]) {
2058
- let accepted = window.__hmr__.contexts["remix:manifest"].emit(
2059
- { needsRevalidation, assetsManifest: event.assetsManifest }
2060
- );
2061
- if (accepted) {
2062
- console.log("[HMR] Update accepted by", "remix:manifest");
2063
- updateAccepted = true;
2064
- }
2065
- }
2066
- if (!updateAccepted) {
2067
- console.log("[HMR] Update rejected, reloading...");
2068
- window.location.reload();
2069
- }
2070
- }
2071
- };
2072
- ws.onopen = () => {
2073
- if (config && typeof config.onOpen === "function") {
2074
- config.onOpen();
2075
- }
2076
- };
2077
- ws.onclose = (event) => {
2078
- if (event.code === 1006) {
2079
- console.log("Remix dev asset server web socket closed. Reconnecting...");
2080
- setTimeout(
2081
- () =>
2082
- remixLiveReloadConnect({
2083
- onOpen: () => window.location.reload(),
2084
- }),
2085
- ${String(timeoutMs)}
2086
- );
2087
- }
2088
- };
2089
- ws.onerror = (error) => {
2090
- console.log("Remix dev asset server web socket error:");
2091
- console.error(error);
2092
- };
2093
- }
2094
- remixLiveReloadConnect();
2095
- `
2096
- }
2097
- });
2098
- }
2099
- );
2100
- function mergeRefs(...refs) {
2101
- return (value) => {
2102
- refs.forEach((ref) => {
2103
- if (typeof ref === "function") {
2104
- ref(value);
2105
- } else if (ref != null) {
2106
- ref.current = value;
2107
- }
2108
- });
2109
- };
2110
- }
2111
- export {
2112
- useActionData2 as useActionData,
2113
- useFetcher2 as useFetcher,
2114
- useLoaderData2 as useLoaderData,
2115
- useNavigation,
2116
- useSubmit
2117
- };
2118
- /*! Bundled license information:
2119
-
2120
- @remix-run/router/dist/router.js:
2121
- (**
2122
- * @remix-run/router v1.23.2
2123
- *
2124
- * Copyright (c) Remix Software Inc.
2125
- *
2126
- * This source code is licensed under the MIT license found in the
2127
- * LICENSE.md file in the root directory of this source tree.
2128
- *
2129
- * @license MIT
2130
- *)
2131
-
2132
- react-router/dist/index.js:
2133
- (**
2134
- * React Router v6.30.3
2135
- *
2136
- * Copyright (c) Remix Software Inc.
2137
- *
2138
- * This source code is licensed under the MIT license found in the
2139
- * LICENSE.md file in the root directory of this source tree.
2140
- *
2141
- * @license MIT
2142
- *)
2143
-
2144
- react-router-dom/dist/index.js:
2145
- (**
2146
- * React Router DOM v6.30.3
2147
- *
2148
- * Copyright (c) Remix Software Inc.
2149
- *
2150
- * This source code is licensed under the MIT license found in the
2151
- * LICENSE.md file in the root directory of this source tree.
2152
- *
2153
- * @license MIT
2154
- *)
2155
-
2156
- @remix-run/react/dist/esm/_virtual/_rollupPluginBabelHelpers.js:
2157
- @remix-run/react/dist/esm/invariant.js:
2158
- @remix-run/react/dist/esm/routeModules.js:
2159
- @remix-run/react/dist/esm/links.js:
2160
- @remix-run/react/dist/esm/single-fetch.js:
2161
- @remix-run/react/dist/esm/components.js:
2162
- @remix-run/react/dist/esm/index.js:
2163
- (**
2164
- * @remix-run/react v2.17.4
2165
- *
2166
- * Copyright (c) Remix Software Inc.
2167
- *
2168
- * This source code is licensed under the MIT license found in the
2169
- * LICENSE.md file in the root directory of this source tree.
2170
- *
2171
- * @license MIT
2172
- *)
2173
- */
2174
- //# sourceMappingURL=remix.mjs.map