@siena-ai/design-system 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -48,7 +48,6 @@ var ReactMarkdown = require('react-markdown');
48
48
  var remarkGfm = require('remark-gfm');
49
49
  var dateFns = require('date-fns');
50
50
  var reactTable = require('@tanstack/react-table');
51
- var Link3 = require('next/link');
52
51
 
53
52
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
54
53
 
@@ -102,8 +101,3929 @@ var data__default = /*#__PURE__*/_interopDefault(data);
102
101
  var Picker__default = /*#__PURE__*/_interopDefault(Picker);
103
102
  var ReactMarkdown__default = /*#__PURE__*/_interopDefault(ReactMarkdown);
104
103
  var remarkGfm__default = /*#__PURE__*/_interopDefault(remarkGfm);
105
- var Link3__default = /*#__PURE__*/_interopDefault(Link3);
106
104
 
105
+ var __create = Object.create;
106
+ var __defProp = Object.defineProperty;
107
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
108
+ var __getOwnPropNames = Object.getOwnPropertyNames;
109
+ var __getProtoOf = Object.getPrototypeOf;
110
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
111
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
112
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
113
+ }) : x)(function(x) {
114
+ if (typeof require !== "undefined") return require.apply(this, arguments);
115
+ throw Error('Dynamic require of "' + x + '" is not supported');
116
+ });
117
+ var __commonJS = (cb, mod) => function __require2() {
118
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
119
+ };
120
+ var __copyProps = (to, from, except, desc) => {
121
+ if (from && typeof from === "object" || typeof from === "function") {
122
+ for (let key of __getOwnPropNames(from))
123
+ if (!__hasOwnProp.call(to, key) && key !== except)
124
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
125
+ }
126
+ return to;
127
+ };
128
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
129
+ // If the importer is in node compatibility mode or this is not an ESM
130
+ // file that has been converted to a CommonJS file using a Babel-
131
+ // compatible transform (i.e. "__esModule" has not been set), then set
132
+ // "default" to the CommonJS "module.exports" for node compatibility.
133
+ !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
134
+ mod
135
+ ));
136
+
137
+ // node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs
138
+ var require_interop_require_wildcard = __commonJS({
139
+ "node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs"(exports$1) {
140
+ function _getRequireWildcardCache(nodeInterop) {
141
+ if (typeof WeakMap !== "function") return null;
142
+ var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
143
+ var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
144
+ return (_getRequireWildcardCache = function(nodeInterop2) {
145
+ return nodeInterop2 ? cacheNodeInterop : cacheBabelInterop;
146
+ })(nodeInterop);
147
+ }
148
+ function _interop_require_wildcard(obj, nodeInterop) {
149
+ if (!nodeInterop && obj && obj.__esModule) return obj;
150
+ if (obj === null || typeof obj !== "object" && typeof obj !== "function") return { default: obj };
151
+ var cache = _getRequireWildcardCache(nodeInterop);
152
+ if (cache && cache.has(obj)) return cache.get(obj);
153
+ var newObj = { __proto__: null };
154
+ var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
155
+ for (var key in obj) {
156
+ if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
157
+ var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
158
+ if (desc && (desc.get || desc.set)) Object.defineProperty(newObj, key, desc);
159
+ else newObj[key] = obj[key];
160
+ }
161
+ }
162
+ newObj.default = obj;
163
+ if (cache) cache.set(obj, newObj);
164
+ return newObj;
165
+ }
166
+ exports$1._ = _interop_require_wildcard;
167
+ }
168
+ });
169
+
170
+ // node_modules/next/dist/shared/lib/router/utils/querystring.js
171
+ var require_querystring = __commonJS({
172
+ "node_modules/next/dist/shared/lib/router/utils/querystring.js"(exports$1) {
173
+ Object.defineProperty(exports$1, "__esModule", {
174
+ value: true
175
+ });
176
+ function _export(target, all) {
177
+ for (var name in all) Object.defineProperty(target, name, {
178
+ enumerable: true,
179
+ get: all[name]
180
+ });
181
+ }
182
+ _export(exports$1, {
183
+ assign: function() {
184
+ return assign;
185
+ },
186
+ searchParamsToUrlQuery: function() {
187
+ return searchParamsToUrlQuery;
188
+ },
189
+ urlQueryToSearchParams: function() {
190
+ return urlQueryToSearchParams;
191
+ }
192
+ });
193
+ function searchParamsToUrlQuery(searchParams) {
194
+ const query = {};
195
+ for (const [key, value] of searchParams.entries()) {
196
+ const existing = query[key];
197
+ if (typeof existing === "undefined") {
198
+ query[key] = value;
199
+ } else if (Array.isArray(existing)) {
200
+ existing.push(value);
201
+ } else {
202
+ query[key] = [
203
+ existing,
204
+ value
205
+ ];
206
+ }
207
+ }
208
+ return query;
209
+ }
210
+ function stringifyUrlQueryParam(param) {
211
+ if (typeof param === "string") {
212
+ return param;
213
+ }
214
+ if (typeof param === "number" && !isNaN(param) || typeof param === "boolean") {
215
+ return String(param);
216
+ } else {
217
+ return "";
218
+ }
219
+ }
220
+ function urlQueryToSearchParams(query) {
221
+ const searchParams = new URLSearchParams();
222
+ for (const [key, value] of Object.entries(query)) {
223
+ if (Array.isArray(value)) {
224
+ for (const item of value) {
225
+ searchParams.append(key, stringifyUrlQueryParam(item));
226
+ }
227
+ } else {
228
+ searchParams.set(key, stringifyUrlQueryParam(value));
229
+ }
230
+ }
231
+ return searchParams;
232
+ }
233
+ function assign(target, ...searchParamsList) {
234
+ for (const searchParams of searchParamsList) {
235
+ for (const key of searchParams.keys()) {
236
+ target.delete(key);
237
+ }
238
+ for (const [key, value] of searchParams.entries()) {
239
+ target.append(key, value);
240
+ }
241
+ }
242
+ return target;
243
+ }
244
+ }
245
+ });
246
+
247
+ // node_modules/next/dist/shared/lib/router/utils/format-url.js
248
+ var require_format_url = __commonJS({
249
+ "node_modules/next/dist/shared/lib/router/utils/format-url.js"(exports$1) {
250
+ Object.defineProperty(exports$1, "__esModule", {
251
+ value: true
252
+ });
253
+ function _export(target, all) {
254
+ for (var name in all) Object.defineProperty(target, name, {
255
+ enumerable: true,
256
+ get: all[name]
257
+ });
258
+ }
259
+ _export(exports$1, {
260
+ formatUrl: function() {
261
+ return formatUrl;
262
+ },
263
+ formatWithValidation: function() {
264
+ return formatWithValidation;
265
+ },
266
+ urlObjectKeys: function() {
267
+ return urlObjectKeys;
268
+ }
269
+ });
270
+ var _interop_require_wildcard = require_interop_require_wildcard();
271
+ var _querystring = /* @__PURE__ */ _interop_require_wildcard._(require_querystring());
272
+ var slashedProtocols = /https?|ftp|gopher|file/;
273
+ function formatUrl(urlObj) {
274
+ let { auth, hostname } = urlObj;
275
+ let protocol = urlObj.protocol || "";
276
+ let pathname = urlObj.pathname || "";
277
+ let hash = urlObj.hash || "";
278
+ let query = urlObj.query || "";
279
+ let host = false;
280
+ auth = auth ? encodeURIComponent(auth).replace(/%3A/i, ":") + "@" : "";
281
+ if (urlObj.host) {
282
+ host = auth + urlObj.host;
283
+ } else if (hostname) {
284
+ host = auth + (~hostname.indexOf(":") ? `[${hostname}]` : hostname);
285
+ if (urlObj.port) {
286
+ host += ":" + urlObj.port;
287
+ }
288
+ }
289
+ if (query && typeof query === "object") {
290
+ query = String(_querystring.urlQueryToSearchParams(query));
291
+ }
292
+ let search = urlObj.search || query && `?${query}` || "";
293
+ if (protocol && !protocol.endsWith(":")) protocol += ":";
294
+ if (urlObj.slashes || (!protocol || slashedProtocols.test(protocol)) && host !== false) {
295
+ host = "//" + (host || "");
296
+ if (pathname && pathname[0] !== "/") pathname = "/" + pathname;
297
+ } else if (!host) {
298
+ host = "";
299
+ }
300
+ if (hash && hash[0] !== "#") hash = "#" + hash;
301
+ if (search && search[0] !== "?") search = "?" + search;
302
+ pathname = pathname.replace(/[?#]/g, encodeURIComponent);
303
+ search = search.replace("#", "%23");
304
+ return `${protocol}${host}${pathname}${search}${hash}`;
305
+ }
306
+ var urlObjectKeys = [
307
+ "auth",
308
+ "hash",
309
+ "host",
310
+ "hostname",
311
+ "href",
312
+ "path",
313
+ "pathname",
314
+ "port",
315
+ "protocol",
316
+ "query",
317
+ "search",
318
+ "slashes"
319
+ ];
320
+ function formatWithValidation(url) {
321
+ if (process.env.NODE_ENV === "development") {
322
+ if (url !== null && typeof url === "object") {
323
+ Object.keys(url).forEach((key) => {
324
+ if (!urlObjectKeys.includes(key)) {
325
+ console.warn(`Unknown key passed via urlObject into url.format: ${key}`);
326
+ }
327
+ });
328
+ }
329
+ }
330
+ return formatUrl(url);
331
+ }
332
+ }
333
+ });
334
+
335
+ // node_modules/next/dist/shared/lib/router/utils/omit.js
336
+ var require_omit = __commonJS({
337
+ "node_modules/next/dist/shared/lib/router/utils/omit.js"(exports$1) {
338
+ Object.defineProperty(exports$1, "__esModule", {
339
+ value: true
340
+ });
341
+ Object.defineProperty(exports$1, "omit", {
342
+ enumerable: true,
343
+ get: function() {
344
+ return omit;
345
+ }
346
+ });
347
+ function omit(object, keys) {
348
+ const omitted = {};
349
+ Object.keys(object).forEach((key) => {
350
+ if (!keys.includes(key)) {
351
+ omitted[key] = object[key];
352
+ }
353
+ });
354
+ return omitted;
355
+ }
356
+ }
357
+ });
358
+
359
+ // node_modules/next/dist/shared/lib/utils.js
360
+ var require_utils = __commonJS({
361
+ "node_modules/next/dist/shared/lib/utils.js"(exports$1) {
362
+ Object.defineProperty(exports$1, "__esModule", {
363
+ value: true
364
+ });
365
+ function _export(target, all) {
366
+ for (var name in all) Object.defineProperty(target, name, {
367
+ enumerable: true,
368
+ get: all[name]
369
+ });
370
+ }
371
+ _export(exports$1, {
372
+ DecodeError: function() {
373
+ return DecodeError;
374
+ },
375
+ MiddlewareNotFoundError: function() {
376
+ return MiddlewareNotFoundError;
377
+ },
378
+ MissingStaticPage: function() {
379
+ return MissingStaticPage;
380
+ },
381
+ NormalizeError: function() {
382
+ return NormalizeError;
383
+ },
384
+ PageNotFoundError: function() {
385
+ return PageNotFoundError;
386
+ },
387
+ SP: function() {
388
+ return SP;
389
+ },
390
+ ST: function() {
391
+ return ST;
392
+ },
393
+ WEB_VITALS: function() {
394
+ return WEB_VITALS;
395
+ },
396
+ execOnce: function() {
397
+ return execOnce;
398
+ },
399
+ getDisplayName: function() {
400
+ return getDisplayName;
401
+ },
402
+ getLocationOrigin: function() {
403
+ return getLocationOrigin;
404
+ },
405
+ getURL: function() {
406
+ return getURL;
407
+ },
408
+ isAbsoluteUrl: function() {
409
+ return isAbsoluteUrl;
410
+ },
411
+ isResSent: function() {
412
+ return isResSent;
413
+ },
414
+ loadGetInitialProps: function() {
415
+ return loadGetInitialProps;
416
+ },
417
+ normalizeRepeatedSlashes: function() {
418
+ return normalizeRepeatedSlashes;
419
+ },
420
+ stringifyError: function() {
421
+ return stringifyError;
422
+ }
423
+ });
424
+ var WEB_VITALS = [
425
+ "CLS",
426
+ "FCP",
427
+ "FID",
428
+ "INP",
429
+ "LCP",
430
+ "TTFB"
431
+ ];
432
+ function execOnce(fn) {
433
+ let used = false;
434
+ let result;
435
+ return (...args) => {
436
+ if (!used) {
437
+ used = true;
438
+ result = fn(...args);
439
+ }
440
+ return result;
441
+ };
442
+ }
443
+ var ABSOLUTE_URL_REGEX = /^[a-zA-Z][a-zA-Z\d+\-.]*?:/;
444
+ var isAbsoluteUrl = (url) => ABSOLUTE_URL_REGEX.test(url);
445
+ function getLocationOrigin() {
446
+ const { protocol, hostname, port } = window.location;
447
+ return `${protocol}//${hostname}${port ? ":" + port : ""}`;
448
+ }
449
+ function getURL() {
450
+ const { href } = window.location;
451
+ const origin = getLocationOrigin();
452
+ return href.substring(origin.length);
453
+ }
454
+ function getDisplayName(Component) {
455
+ return typeof Component === "string" ? Component : Component.displayName || Component.name || "Unknown";
456
+ }
457
+ function isResSent(res) {
458
+ return res.finished || res.headersSent;
459
+ }
460
+ function normalizeRepeatedSlashes(url) {
461
+ const urlParts = url.split("?");
462
+ const urlNoQuery = urlParts[0];
463
+ return urlNoQuery.replace(/\\/g, "/").replace(/\/\/+/g, "/") + (urlParts[1] ? `?${urlParts.slice(1).join("?")}` : "");
464
+ }
465
+ async function loadGetInitialProps(App, ctx) {
466
+ if (process.env.NODE_ENV !== "production") {
467
+ if (App.prototype?.getInitialProps) {
468
+ const message = `"${getDisplayName(App)}.getInitialProps()" is defined as an instance method - visit https://nextjs.org/docs/messages/get-initial-props-as-an-instance-method for more information.`;
469
+ throw Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", {
470
+ value: "E394",
471
+ enumerable: false,
472
+ configurable: true
473
+ });
474
+ }
475
+ }
476
+ const res = ctx.res || ctx.ctx && ctx.ctx.res;
477
+ if (!App.getInitialProps) {
478
+ if (ctx.ctx && ctx.Component) {
479
+ return {
480
+ pageProps: await loadGetInitialProps(ctx.Component, ctx.ctx)
481
+ };
482
+ }
483
+ return {};
484
+ }
485
+ const props = await App.getInitialProps(ctx);
486
+ if (res && isResSent(res)) {
487
+ return props;
488
+ }
489
+ if (!props) {
490
+ const message = `"${getDisplayName(App)}.getInitialProps()" should resolve to an object. But found "${props}" instead.`;
491
+ throw Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", {
492
+ value: "E394",
493
+ enumerable: false,
494
+ configurable: true
495
+ });
496
+ }
497
+ if (process.env.NODE_ENV !== "production") {
498
+ if (Object.keys(props).length === 0 && !ctx.ctx) {
499
+ console.warn(`${getDisplayName(App)} returned an empty object from \`getInitialProps\`. This de-optimizes and prevents automatic static optimization. https://nextjs.org/docs/messages/empty-object-getInitialProps`);
500
+ }
501
+ }
502
+ return props;
503
+ }
504
+ var SP = typeof performance !== "undefined";
505
+ var ST = SP && [
506
+ "mark",
507
+ "measure",
508
+ "getEntriesByName"
509
+ ].every((method) => typeof performance[method] === "function");
510
+ var DecodeError = class extends Error {
511
+ };
512
+ var NormalizeError = class extends Error {
513
+ };
514
+ var PageNotFoundError = class extends Error {
515
+ constructor(page) {
516
+ super();
517
+ this.code = "ENOENT";
518
+ this.name = "PageNotFoundError";
519
+ this.message = `Cannot find module for page: ${page}`;
520
+ }
521
+ };
522
+ var MissingStaticPage = class extends Error {
523
+ constructor(page, message) {
524
+ super();
525
+ this.message = `Failed to load static file for page: ${page} ${message}`;
526
+ }
527
+ };
528
+ var MiddlewareNotFoundError = class extends Error {
529
+ constructor() {
530
+ super();
531
+ this.code = "ENOENT";
532
+ this.message = `Cannot find the middleware module`;
533
+ }
534
+ };
535
+ function stringifyError(error) {
536
+ return JSON.stringify({
537
+ message: error.message,
538
+ stack: error.stack
539
+ });
540
+ }
541
+ }
542
+ });
543
+
544
+ // node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js
545
+ var require_remove_trailing_slash = __commonJS({
546
+ "node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js"(exports$1) {
547
+ Object.defineProperty(exports$1, "__esModule", {
548
+ value: true
549
+ });
550
+ Object.defineProperty(exports$1, "removeTrailingSlash", {
551
+ enumerable: true,
552
+ get: function() {
553
+ return removeTrailingSlash;
554
+ }
555
+ });
556
+ function removeTrailingSlash(route) {
557
+ return route.replace(/\/$/, "") || "/";
558
+ }
559
+ }
560
+ });
561
+
562
+ // node_modules/next/dist/shared/lib/router/utils/parse-path.js
563
+ var require_parse_path = __commonJS({
564
+ "node_modules/next/dist/shared/lib/router/utils/parse-path.js"(exports$1) {
565
+ Object.defineProperty(exports$1, "__esModule", {
566
+ value: true
567
+ });
568
+ Object.defineProperty(exports$1, "parsePath", {
569
+ enumerable: true,
570
+ get: function() {
571
+ return parsePath;
572
+ }
573
+ });
574
+ function parsePath(path) {
575
+ const hashIndex = path.indexOf("#");
576
+ const queryIndex = path.indexOf("?");
577
+ const hasQuery = queryIndex > -1 && (hashIndex < 0 || queryIndex < hashIndex);
578
+ if (hasQuery || hashIndex > -1) {
579
+ return {
580
+ pathname: path.substring(0, hasQuery ? queryIndex : hashIndex),
581
+ query: hasQuery ? path.substring(queryIndex, hashIndex > -1 ? hashIndex : void 0) : "",
582
+ hash: hashIndex > -1 ? path.slice(hashIndex) : ""
583
+ };
584
+ }
585
+ return {
586
+ pathname: path,
587
+ query: "",
588
+ hash: ""
589
+ };
590
+ }
591
+ }
592
+ });
593
+
594
+ // node_modules/next/dist/client/normalize-trailing-slash.js
595
+ var require_normalize_trailing_slash = __commonJS({
596
+ "node_modules/next/dist/client/normalize-trailing-slash.js"(exports$1, module) {
597
+ Object.defineProperty(exports$1, "__esModule", {
598
+ value: true
599
+ });
600
+ Object.defineProperty(exports$1, "normalizePathTrailingSlash", {
601
+ enumerable: true,
602
+ get: function() {
603
+ return normalizePathTrailingSlash;
604
+ }
605
+ });
606
+ var _removetrailingslash = require_remove_trailing_slash();
607
+ var _parsepath = require_parse_path();
608
+ var normalizePathTrailingSlash = (path) => {
609
+ if (!path.startsWith("/") || process.env.__NEXT_MANUAL_TRAILING_SLASH) {
610
+ return path;
611
+ }
612
+ const { pathname, query, hash } = (0, _parsepath.parsePath)(path);
613
+ if (process.env.__NEXT_TRAILING_SLASH) {
614
+ if (/\.[^/]+\/?$/.test(pathname)) {
615
+ return `${(0, _removetrailingslash.removeTrailingSlash)(pathname)}${query}${hash}`;
616
+ } else if (pathname.endsWith("/")) {
617
+ return `${pathname}${query}${hash}`;
618
+ } else {
619
+ return `${pathname}/${query}${hash}`;
620
+ }
621
+ }
622
+ return `${(0, _removetrailingslash.removeTrailingSlash)(pathname)}${query}${hash}`;
623
+ };
624
+ if ((typeof exports$1.default === "function" || typeof exports$1.default === "object" && exports$1.default !== null) && typeof exports$1.default.__esModule === "undefined") {
625
+ Object.defineProperty(exports$1.default, "__esModule", { value: true });
626
+ Object.assign(exports$1.default, exports$1);
627
+ module.exports = exports$1.default;
628
+ }
629
+ }
630
+ });
631
+
632
+ // node_modules/next/dist/shared/lib/router/utils/path-has-prefix.js
633
+ var require_path_has_prefix = __commonJS({
634
+ "node_modules/next/dist/shared/lib/router/utils/path-has-prefix.js"(exports$1) {
635
+ Object.defineProperty(exports$1, "__esModule", {
636
+ value: true
637
+ });
638
+ Object.defineProperty(exports$1, "pathHasPrefix", {
639
+ enumerable: true,
640
+ get: function() {
641
+ return pathHasPrefix;
642
+ }
643
+ });
644
+ var _parsepath = require_parse_path();
645
+ function pathHasPrefix(path, prefix) {
646
+ if (typeof path !== "string") {
647
+ return false;
648
+ }
649
+ const { pathname } = (0, _parsepath.parsePath)(path);
650
+ return pathname === prefix || pathname.startsWith(prefix + "/");
651
+ }
652
+ }
653
+ });
654
+
655
+ // node_modules/next/dist/client/has-base-path.js
656
+ var require_has_base_path = __commonJS({
657
+ "node_modules/next/dist/client/has-base-path.js"(exports$1, module) {
658
+ Object.defineProperty(exports$1, "__esModule", {
659
+ value: true
660
+ });
661
+ Object.defineProperty(exports$1, "hasBasePath", {
662
+ enumerable: true,
663
+ get: function() {
664
+ return hasBasePath;
665
+ }
666
+ });
667
+ var _pathhasprefix = require_path_has_prefix();
668
+ var basePath = process.env.__NEXT_ROUTER_BASEPATH || "";
669
+ function hasBasePath(path) {
670
+ return (0, _pathhasprefix.pathHasPrefix)(path, basePath);
671
+ }
672
+ if ((typeof exports$1.default === "function" || typeof exports$1.default === "object" && exports$1.default !== null) && typeof exports$1.default.__esModule === "undefined") {
673
+ Object.defineProperty(exports$1.default, "__esModule", { value: true });
674
+ Object.assign(exports$1.default, exports$1);
675
+ module.exports = exports$1.default;
676
+ }
677
+ }
678
+ });
679
+
680
+ // node_modules/next/dist/shared/lib/router/utils/is-local-url.js
681
+ var require_is_local_url = __commonJS({
682
+ "node_modules/next/dist/shared/lib/router/utils/is-local-url.js"(exports$1) {
683
+ Object.defineProperty(exports$1, "__esModule", {
684
+ value: true
685
+ });
686
+ Object.defineProperty(exports$1, "isLocalURL", {
687
+ enumerable: true,
688
+ get: function() {
689
+ return isLocalURL;
690
+ }
691
+ });
692
+ var _utils = require_utils();
693
+ var _hasbasepath = require_has_base_path();
694
+ function isLocalURL(url) {
695
+ if (!(0, _utils.isAbsoluteUrl)(url)) return true;
696
+ try {
697
+ const locationOrigin = (0, _utils.getLocationOrigin)();
698
+ const resolved = new URL(url, locationOrigin);
699
+ return resolved.origin === locationOrigin && (0, _hasbasepath.hasBasePath)(resolved.pathname);
700
+ } catch (_) {
701
+ return false;
702
+ }
703
+ }
704
+ }
705
+ });
706
+
707
+ // node_modules/next/dist/shared/lib/router/utils/sorted-routes.js
708
+ var require_sorted_routes = __commonJS({
709
+ "node_modules/next/dist/shared/lib/router/utils/sorted-routes.js"(exports$1) {
710
+ Object.defineProperty(exports$1, "__esModule", {
711
+ value: true
712
+ });
713
+ function _export(target, all) {
714
+ for (var name in all) Object.defineProperty(target, name, {
715
+ enumerable: true,
716
+ get: all[name]
717
+ });
718
+ }
719
+ _export(exports$1, {
720
+ getSortedRouteObjects: function() {
721
+ return getSortedRouteObjects;
722
+ },
723
+ getSortedRoutes: function() {
724
+ return getSortedRoutes;
725
+ }
726
+ });
727
+ var UrlNode = class _UrlNode {
728
+ insert(urlPath) {
729
+ this._insert(urlPath.split("/").filter(Boolean), [], false);
730
+ }
731
+ smoosh() {
732
+ return this._smoosh();
733
+ }
734
+ _smoosh(prefix = "/") {
735
+ const childrenPaths = [
736
+ ...this.children.keys()
737
+ ].sort();
738
+ if (this.slugName !== null) {
739
+ childrenPaths.splice(childrenPaths.indexOf("[]"), 1);
740
+ }
741
+ if (this.restSlugName !== null) {
742
+ childrenPaths.splice(childrenPaths.indexOf("[...]"), 1);
743
+ }
744
+ if (this.optionalRestSlugName !== null) {
745
+ childrenPaths.splice(childrenPaths.indexOf("[[...]]"), 1);
746
+ }
747
+ const routes = childrenPaths.map((c) => this.children.get(c)._smoosh(`${prefix}${c}/`)).reduce((prev, curr) => [
748
+ ...prev,
749
+ ...curr
750
+ ], []);
751
+ if (this.slugName !== null) {
752
+ routes.push(...this.children.get("[]")._smoosh(`${prefix}[${this.slugName}]/`));
753
+ }
754
+ if (!this.placeholder) {
755
+ const r = prefix === "/" ? "/" : prefix.slice(0, -1);
756
+ if (this.optionalRestSlugName != null) {
757
+ throw Object.defineProperty(new Error(`You cannot define a route with the same specificity as a optional catch-all route ("${r}" and "${r}[[...${this.optionalRestSlugName}]]").`), "__NEXT_ERROR_CODE", {
758
+ value: "E458",
759
+ enumerable: false,
760
+ configurable: true
761
+ });
762
+ }
763
+ routes.unshift(r);
764
+ }
765
+ if (this.restSlugName !== null) {
766
+ routes.push(...this.children.get("[...]")._smoosh(`${prefix}[...${this.restSlugName}]/`));
767
+ }
768
+ if (this.optionalRestSlugName !== null) {
769
+ routes.push(...this.children.get("[[...]]")._smoosh(`${prefix}[[...${this.optionalRestSlugName}]]/`));
770
+ }
771
+ return routes;
772
+ }
773
+ _insert(urlPaths, slugNames, isCatchAll) {
774
+ if (urlPaths.length === 0) {
775
+ this.placeholder = false;
776
+ return;
777
+ }
778
+ if (isCatchAll) {
779
+ throw Object.defineProperty(new Error(`Catch-all must be the last part of the URL.`), "__NEXT_ERROR_CODE", {
780
+ value: "E392",
781
+ enumerable: false,
782
+ configurable: true
783
+ });
784
+ }
785
+ let nextSegment = urlPaths[0];
786
+ if (nextSegment.startsWith("[") && nextSegment.endsWith("]")) {
787
+ let handleSlug = function(previousSlug, nextSlug) {
788
+ if (previousSlug !== null) {
789
+ if (previousSlug !== nextSlug) {
790
+ throw Object.defineProperty(new Error(`You cannot use different slug names for the same dynamic path ('${previousSlug}' !== '${nextSlug}').`), "__NEXT_ERROR_CODE", {
791
+ value: "E337",
792
+ enumerable: false,
793
+ configurable: true
794
+ });
795
+ }
796
+ }
797
+ slugNames.forEach((slug) => {
798
+ if (slug === nextSlug) {
799
+ throw Object.defineProperty(new Error(`You cannot have the same slug name "${nextSlug}" repeat within a single dynamic path`), "__NEXT_ERROR_CODE", {
800
+ value: "E247",
801
+ enumerable: false,
802
+ configurable: true
803
+ });
804
+ }
805
+ if (slug.replace(/\W/g, "") === nextSegment.replace(/\W/g, "")) {
806
+ throw Object.defineProperty(new Error(`You cannot have the slug names "${slug}" and "${nextSlug}" differ only by non-word symbols within a single dynamic path`), "__NEXT_ERROR_CODE", {
807
+ value: "E499",
808
+ enumerable: false,
809
+ configurable: true
810
+ });
811
+ }
812
+ });
813
+ slugNames.push(nextSlug);
814
+ };
815
+ let segmentName = nextSegment.slice(1, -1);
816
+ let isOptional = false;
817
+ if (segmentName.startsWith("[") && segmentName.endsWith("]")) {
818
+ segmentName = segmentName.slice(1, -1);
819
+ isOptional = true;
820
+ }
821
+ if (segmentName.startsWith("\u2026")) {
822
+ throw Object.defineProperty(new Error(`Detected a three-dot character ('\u2026') at ('${segmentName}'). Did you mean ('...')?`), "__NEXT_ERROR_CODE", {
823
+ value: "E147",
824
+ enumerable: false,
825
+ configurable: true
826
+ });
827
+ }
828
+ if (segmentName.startsWith("...")) {
829
+ segmentName = segmentName.substring(3);
830
+ isCatchAll = true;
831
+ }
832
+ if (segmentName.startsWith("[") || segmentName.endsWith("]")) {
833
+ throw Object.defineProperty(new Error(`Segment names may not start or end with extra brackets ('${segmentName}').`), "__NEXT_ERROR_CODE", {
834
+ value: "E421",
835
+ enumerable: false,
836
+ configurable: true
837
+ });
838
+ }
839
+ if (segmentName.startsWith(".")) {
840
+ throw Object.defineProperty(new Error(`Segment names may not start with erroneous periods ('${segmentName}').`), "__NEXT_ERROR_CODE", {
841
+ value: "E288",
842
+ enumerable: false,
843
+ configurable: true
844
+ });
845
+ }
846
+ if (isCatchAll) {
847
+ if (isOptional) {
848
+ if (this.restSlugName != null) {
849
+ throw Object.defineProperty(new Error(`You cannot use both an required and optional catch-all route at the same level ("[...${this.restSlugName}]" and "${urlPaths[0]}" ).`), "__NEXT_ERROR_CODE", {
850
+ value: "E299",
851
+ enumerable: false,
852
+ configurable: true
853
+ });
854
+ }
855
+ handleSlug(this.optionalRestSlugName, segmentName);
856
+ this.optionalRestSlugName = segmentName;
857
+ nextSegment = "[[...]]";
858
+ } else {
859
+ if (this.optionalRestSlugName != null) {
860
+ throw Object.defineProperty(new Error(`You cannot use both an optional and required catch-all route at the same level ("[[...${this.optionalRestSlugName}]]" and "${urlPaths[0]}").`), "__NEXT_ERROR_CODE", {
861
+ value: "E300",
862
+ enumerable: false,
863
+ configurable: true
864
+ });
865
+ }
866
+ handleSlug(this.restSlugName, segmentName);
867
+ this.restSlugName = segmentName;
868
+ nextSegment = "[...]";
869
+ }
870
+ } else {
871
+ if (isOptional) {
872
+ throw Object.defineProperty(new Error(`Optional route parameters are not yet supported ("${urlPaths[0]}").`), "__NEXT_ERROR_CODE", {
873
+ value: "E435",
874
+ enumerable: false,
875
+ configurable: true
876
+ });
877
+ }
878
+ handleSlug(this.slugName, segmentName);
879
+ this.slugName = segmentName;
880
+ nextSegment = "[]";
881
+ }
882
+ }
883
+ if (!this.children.has(nextSegment)) {
884
+ this.children.set(nextSegment, new _UrlNode());
885
+ }
886
+ this.children.get(nextSegment)._insert(urlPaths.slice(1), slugNames, isCatchAll);
887
+ }
888
+ constructor() {
889
+ this.placeholder = true;
890
+ this.children = /* @__PURE__ */ new Map();
891
+ this.slugName = null;
892
+ this.restSlugName = null;
893
+ this.optionalRestSlugName = null;
894
+ }
895
+ };
896
+ function getSortedRoutes(normalizedPages) {
897
+ const root = new UrlNode();
898
+ normalizedPages.forEach((pagePath) => root.insert(pagePath));
899
+ return root.smoosh();
900
+ }
901
+ function getSortedRouteObjects(objects, getter) {
902
+ const indexes = {};
903
+ const pathnames = [];
904
+ for (let i = 0; i < objects.length; i++) {
905
+ const pathname = getter(objects[i]);
906
+ indexes[pathname] = i;
907
+ pathnames[i] = pathname;
908
+ }
909
+ const sorted = getSortedRoutes(pathnames);
910
+ return sorted.map((pathname) => objects[indexes[pathname]]);
911
+ }
912
+ }
913
+ });
914
+
915
+ // node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js
916
+ var require_ensure_leading_slash = __commonJS({
917
+ "node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js"(exports$1) {
918
+ Object.defineProperty(exports$1, "__esModule", {
919
+ value: true
920
+ });
921
+ Object.defineProperty(exports$1, "ensureLeadingSlash", {
922
+ enumerable: true,
923
+ get: function() {
924
+ return ensureLeadingSlash;
925
+ }
926
+ });
927
+ function ensureLeadingSlash(path) {
928
+ return path.startsWith("/") ? path : `/${path}`;
929
+ }
930
+ }
931
+ });
932
+
933
+ // node_modules/next/dist/shared/lib/segment.js
934
+ var require_segment = __commonJS({
935
+ "node_modules/next/dist/shared/lib/segment.js"(exports$1) {
936
+ Object.defineProperty(exports$1, "__esModule", {
937
+ value: true
938
+ });
939
+ function _export(target, all) {
940
+ for (var name in all) Object.defineProperty(target, name, {
941
+ enumerable: true,
942
+ get: all[name]
943
+ });
944
+ }
945
+ _export(exports$1, {
946
+ DEFAULT_SEGMENT_KEY: function() {
947
+ return DEFAULT_SEGMENT_KEY;
948
+ },
949
+ NOT_FOUND_SEGMENT_KEY: function() {
950
+ return NOT_FOUND_SEGMENT_KEY;
951
+ },
952
+ PAGE_SEGMENT_KEY: function() {
953
+ return PAGE_SEGMENT_KEY;
954
+ },
955
+ addSearchParamsIfPageSegment: function() {
956
+ return addSearchParamsIfPageSegment;
957
+ },
958
+ computeSelectedLayoutSegment: function() {
959
+ return computeSelectedLayoutSegment;
960
+ },
961
+ getSegmentValue: function() {
962
+ return getSegmentValue;
963
+ },
964
+ getSelectedLayoutSegmentPath: function() {
965
+ return getSelectedLayoutSegmentPath;
966
+ },
967
+ isGroupSegment: function() {
968
+ return isGroupSegment;
969
+ },
970
+ isParallelRouteSegment: function() {
971
+ return isParallelRouteSegment;
972
+ }
973
+ });
974
+ function getSegmentValue(segment) {
975
+ return Array.isArray(segment) ? segment[1] : segment;
976
+ }
977
+ function isGroupSegment(segment) {
978
+ return segment[0] === "(" && segment.endsWith(")");
979
+ }
980
+ function isParallelRouteSegment(segment) {
981
+ return segment.startsWith("@") && segment !== "@children";
982
+ }
983
+ function addSearchParamsIfPageSegment(segment, searchParams) {
984
+ const isPageSegment = segment.includes(PAGE_SEGMENT_KEY);
985
+ if (isPageSegment) {
986
+ const stringifiedQuery = JSON.stringify(searchParams);
987
+ return stringifiedQuery !== "{}" ? PAGE_SEGMENT_KEY + "?" + stringifiedQuery : PAGE_SEGMENT_KEY;
988
+ }
989
+ return segment;
990
+ }
991
+ function computeSelectedLayoutSegment(segments, parallelRouteKey) {
992
+ if (!segments || segments.length === 0) {
993
+ return null;
994
+ }
995
+ const rawSegment = parallelRouteKey === "children" ? segments[0] : segments[segments.length - 1];
996
+ return rawSegment === DEFAULT_SEGMENT_KEY ? null : rawSegment;
997
+ }
998
+ function getSelectedLayoutSegmentPath(tree, parallelRouteKey, first = true, segmentPath = []) {
999
+ let node;
1000
+ if (first) {
1001
+ node = tree[1][parallelRouteKey];
1002
+ } else {
1003
+ const parallelRoutes = tree[1];
1004
+ node = parallelRoutes.children ?? Object.values(parallelRoutes)[0];
1005
+ }
1006
+ if (!node) return segmentPath;
1007
+ const segment = node[0];
1008
+ let segmentValue = getSegmentValue(segment);
1009
+ if (!segmentValue || segmentValue.startsWith(PAGE_SEGMENT_KEY)) {
1010
+ return segmentPath;
1011
+ }
1012
+ segmentPath.push(segmentValue);
1013
+ return getSelectedLayoutSegmentPath(node, parallelRouteKey, false, segmentPath);
1014
+ }
1015
+ var PAGE_SEGMENT_KEY = "__PAGE__";
1016
+ var DEFAULT_SEGMENT_KEY = "__DEFAULT__";
1017
+ var NOT_FOUND_SEGMENT_KEY = "/_not-found";
1018
+ }
1019
+ });
1020
+
1021
+ // node_modules/next/dist/shared/lib/router/utils/app-paths.js
1022
+ var require_app_paths = __commonJS({
1023
+ "node_modules/next/dist/shared/lib/router/utils/app-paths.js"(exports$1) {
1024
+ Object.defineProperty(exports$1, "__esModule", {
1025
+ value: true
1026
+ });
1027
+ function _export(target, all) {
1028
+ for (var name in all) Object.defineProperty(target, name, {
1029
+ enumerable: true,
1030
+ get: all[name]
1031
+ });
1032
+ }
1033
+ _export(exports$1, {
1034
+ normalizeAppPath: function() {
1035
+ return normalizeAppPath;
1036
+ },
1037
+ normalizeRscURL: function() {
1038
+ return normalizeRscURL;
1039
+ }
1040
+ });
1041
+ var _ensureleadingslash = require_ensure_leading_slash();
1042
+ var _segment = require_segment();
1043
+ function normalizeAppPath(route) {
1044
+ return (0, _ensureleadingslash.ensureLeadingSlash)(route.split("/").reduce((pathname, segment, index, segments) => {
1045
+ if (!segment) {
1046
+ return pathname;
1047
+ }
1048
+ if ((0, _segment.isGroupSegment)(segment)) {
1049
+ return pathname;
1050
+ }
1051
+ if (segment[0] === "@") {
1052
+ return pathname;
1053
+ }
1054
+ if ((segment === "page" || segment === "route") && index === segments.length - 1) {
1055
+ return pathname;
1056
+ }
1057
+ return `${pathname}/${segment}`;
1058
+ }, ""));
1059
+ }
1060
+ function normalizeRscURL(url) {
1061
+ return url.replace(
1062
+ /\.rsc($|\?)/,
1063
+ // $1 ensures `?` is preserved
1064
+ "$1"
1065
+ );
1066
+ }
1067
+ }
1068
+ });
1069
+
1070
+ // node_modules/next/dist/shared/lib/router/utils/interception-routes.js
1071
+ var require_interception_routes = __commonJS({
1072
+ "node_modules/next/dist/shared/lib/router/utils/interception-routes.js"(exports$1) {
1073
+ Object.defineProperty(exports$1, "__esModule", {
1074
+ value: true
1075
+ });
1076
+ function _export(target, all) {
1077
+ for (var name in all) Object.defineProperty(target, name, {
1078
+ enumerable: true,
1079
+ get: all[name]
1080
+ });
1081
+ }
1082
+ _export(exports$1, {
1083
+ INTERCEPTION_ROUTE_MARKERS: function() {
1084
+ return INTERCEPTION_ROUTE_MARKERS;
1085
+ },
1086
+ extractInterceptionRouteInformation: function() {
1087
+ return extractInterceptionRouteInformation;
1088
+ },
1089
+ isInterceptionRouteAppPath: function() {
1090
+ return isInterceptionRouteAppPath;
1091
+ }
1092
+ });
1093
+ var _apppaths = require_app_paths();
1094
+ var INTERCEPTION_ROUTE_MARKERS = [
1095
+ "(..)(..)",
1096
+ "(.)",
1097
+ "(..)",
1098
+ "(...)"
1099
+ ];
1100
+ function isInterceptionRouteAppPath(path) {
1101
+ return path.split("/").find((segment) => INTERCEPTION_ROUTE_MARKERS.find((m) => segment.startsWith(m))) !== void 0;
1102
+ }
1103
+ function extractInterceptionRouteInformation(path) {
1104
+ let interceptingRoute;
1105
+ let marker;
1106
+ let interceptedRoute;
1107
+ for (const segment of path.split("/")) {
1108
+ marker = INTERCEPTION_ROUTE_MARKERS.find((m) => segment.startsWith(m));
1109
+ if (marker) {
1110
+ [interceptingRoute, interceptedRoute] = path.split(marker, 2);
1111
+ break;
1112
+ }
1113
+ }
1114
+ if (!interceptingRoute || !marker || !interceptedRoute) {
1115
+ throw Object.defineProperty(new Error(`Invalid interception route: ${path}. Must be in the format /<intercepting route>/(..|...|..)(..)/<intercepted route>`), "__NEXT_ERROR_CODE", {
1116
+ value: "E269",
1117
+ enumerable: false,
1118
+ configurable: true
1119
+ });
1120
+ }
1121
+ interceptingRoute = (0, _apppaths.normalizeAppPath)(interceptingRoute);
1122
+ switch (marker) {
1123
+ case "(.)":
1124
+ if (interceptingRoute === "/") {
1125
+ interceptedRoute = `/${interceptedRoute}`;
1126
+ } else {
1127
+ interceptedRoute = interceptingRoute + "/" + interceptedRoute;
1128
+ }
1129
+ break;
1130
+ case "(..)":
1131
+ if (interceptingRoute === "/") {
1132
+ throw Object.defineProperty(new Error(`Invalid interception route: ${path}. Cannot use (..) marker at the root level, use (.) instead.`), "__NEXT_ERROR_CODE", {
1133
+ value: "E207",
1134
+ enumerable: false,
1135
+ configurable: true
1136
+ });
1137
+ }
1138
+ interceptedRoute = interceptingRoute.split("/").slice(0, -1).concat(interceptedRoute).join("/");
1139
+ break;
1140
+ case "(...)":
1141
+ interceptedRoute = "/" + interceptedRoute;
1142
+ break;
1143
+ case "(..)(..)":
1144
+ const splitInterceptingRoute = interceptingRoute.split("/");
1145
+ if (splitInterceptingRoute.length <= 2) {
1146
+ throw Object.defineProperty(new Error(`Invalid interception route: ${path}. Cannot use (..)(..) marker at the root level or one level up.`), "__NEXT_ERROR_CODE", {
1147
+ value: "E486",
1148
+ enumerable: false,
1149
+ configurable: true
1150
+ });
1151
+ }
1152
+ interceptedRoute = splitInterceptingRoute.slice(0, -2).concat(interceptedRoute).join("/");
1153
+ break;
1154
+ default:
1155
+ throw Object.defineProperty(new Error("Invariant: unexpected marker"), "__NEXT_ERROR_CODE", {
1156
+ value: "E112",
1157
+ enumerable: false,
1158
+ configurable: true
1159
+ });
1160
+ }
1161
+ return {
1162
+ interceptingRoute,
1163
+ interceptedRoute
1164
+ };
1165
+ }
1166
+ }
1167
+ });
1168
+
1169
+ // node_modules/next/dist/shared/lib/router/utils/is-dynamic.js
1170
+ var require_is_dynamic = __commonJS({
1171
+ "node_modules/next/dist/shared/lib/router/utils/is-dynamic.js"(exports$1) {
1172
+ Object.defineProperty(exports$1, "__esModule", {
1173
+ value: true
1174
+ });
1175
+ Object.defineProperty(exports$1, "isDynamicRoute", {
1176
+ enumerable: true,
1177
+ get: function() {
1178
+ return isDynamicRoute;
1179
+ }
1180
+ });
1181
+ var _interceptionroutes = require_interception_routes();
1182
+ var TEST_ROUTE = /\/[^/]*\[[^/]+\][^/]*(?=\/|$)/;
1183
+ var TEST_STRICT_ROUTE = /\/\[[^/]+\](?=\/|$)/;
1184
+ function isDynamicRoute(route, strict = true) {
1185
+ if ((0, _interceptionroutes.isInterceptionRouteAppPath)(route)) {
1186
+ route = (0, _interceptionroutes.extractInterceptionRouteInformation)(route).interceptedRoute;
1187
+ }
1188
+ if (strict) {
1189
+ return TEST_STRICT_ROUTE.test(route);
1190
+ }
1191
+ return TEST_ROUTE.test(route);
1192
+ }
1193
+ }
1194
+ });
1195
+
1196
+ // node_modules/next/dist/shared/lib/router/utils/index.js
1197
+ var require_utils2 = __commonJS({
1198
+ "node_modules/next/dist/shared/lib/router/utils/index.js"(exports$1) {
1199
+ Object.defineProperty(exports$1, "__esModule", {
1200
+ value: true
1201
+ });
1202
+ function _export(target, all) {
1203
+ for (var name in all) Object.defineProperty(target, name, {
1204
+ enumerable: true,
1205
+ get: all[name]
1206
+ });
1207
+ }
1208
+ _export(exports$1, {
1209
+ getSortedRouteObjects: function() {
1210
+ return _sortedroutes.getSortedRouteObjects;
1211
+ },
1212
+ getSortedRoutes: function() {
1213
+ return _sortedroutes.getSortedRoutes;
1214
+ },
1215
+ isDynamicRoute: function() {
1216
+ return _isdynamic.isDynamicRoute;
1217
+ }
1218
+ });
1219
+ var _sortedroutes = require_sorted_routes();
1220
+ var _isdynamic = require_is_dynamic();
1221
+ }
1222
+ });
1223
+
1224
+ // node_modules/next/dist/compiled/path-to-regexp/index.js
1225
+ var require_path_to_regexp = __commonJS({
1226
+ "node_modules/next/dist/compiled/path-to-regexp/index.js"(exports$1, module) {
1227
+ (() => {
1228
+ if (typeof __nccwpck_require__ !== "undefined") __nccwpck_require__.ab = __dirname + "/";
1229
+ var e = {};
1230
+ (() => {
1231
+ var n = e;
1232
+ Object.defineProperty(n, "__esModule", { value: true });
1233
+ n.pathToRegexp = n.tokensToRegexp = n.regexpToFunction = n.match = n.tokensToFunction = n.compile = n.parse = void 0;
1234
+ function lexer(e2) {
1235
+ var n2 = [];
1236
+ var r = 0;
1237
+ while (r < e2.length) {
1238
+ var t = e2[r];
1239
+ if (t === "*" || t === "+" || t === "?") {
1240
+ n2.push({ type: "MODIFIER", index: r, value: e2[r++] });
1241
+ continue;
1242
+ }
1243
+ if (t === "\\") {
1244
+ n2.push({ type: "ESCAPED_CHAR", index: r++, value: e2[r++] });
1245
+ continue;
1246
+ }
1247
+ if (t === "{") {
1248
+ n2.push({ type: "OPEN", index: r, value: e2[r++] });
1249
+ continue;
1250
+ }
1251
+ if (t === "}") {
1252
+ n2.push({ type: "CLOSE", index: r, value: e2[r++] });
1253
+ continue;
1254
+ }
1255
+ if (t === ":") {
1256
+ var a = "";
1257
+ var i = r + 1;
1258
+ while (i < e2.length) {
1259
+ var o = e2.charCodeAt(i);
1260
+ if (o >= 48 && o <= 57 || o >= 65 && o <= 90 || o >= 97 && o <= 122 || o === 95) {
1261
+ a += e2[i++];
1262
+ continue;
1263
+ }
1264
+ break;
1265
+ }
1266
+ if (!a) throw new TypeError("Missing parameter name at ".concat(r));
1267
+ n2.push({ type: "NAME", index: r, value: a });
1268
+ r = i;
1269
+ continue;
1270
+ }
1271
+ if (t === "(") {
1272
+ var c = 1;
1273
+ var f = "";
1274
+ var i = r + 1;
1275
+ if (e2[i] === "?") {
1276
+ throw new TypeError('Pattern cannot start with "?" at '.concat(i));
1277
+ }
1278
+ while (i < e2.length) {
1279
+ if (e2[i] === "\\") {
1280
+ f += e2[i++] + e2[i++];
1281
+ continue;
1282
+ }
1283
+ if (e2[i] === ")") {
1284
+ c--;
1285
+ if (c === 0) {
1286
+ i++;
1287
+ break;
1288
+ }
1289
+ } else if (e2[i] === "(") {
1290
+ c++;
1291
+ if (e2[i + 1] !== "?") {
1292
+ throw new TypeError("Capturing groups are not allowed at ".concat(i));
1293
+ }
1294
+ }
1295
+ f += e2[i++];
1296
+ }
1297
+ if (c) throw new TypeError("Unbalanced pattern at ".concat(r));
1298
+ if (!f) throw new TypeError("Missing pattern at ".concat(r));
1299
+ n2.push({ type: "PATTERN", index: r, value: f });
1300
+ r = i;
1301
+ continue;
1302
+ }
1303
+ n2.push({ type: "CHAR", index: r, value: e2[r++] });
1304
+ }
1305
+ n2.push({ type: "END", index: r, value: "" });
1306
+ return n2;
1307
+ }
1308
+ function parse(e2, n2) {
1309
+ if (n2 === void 0) {
1310
+ n2 = {};
1311
+ }
1312
+ var r = lexer(e2);
1313
+ var t = n2.prefixes, a = t === void 0 ? "./" : t, i = n2.delimiter, o = i === void 0 ? "/#?" : i;
1314
+ var c = [];
1315
+ var f = 0;
1316
+ var u = 0;
1317
+ var p = "";
1318
+ var tryConsume = function(e3) {
1319
+ if (u < r.length && r[u].type === e3) return r[u++].value;
1320
+ };
1321
+ var mustConsume = function(e3) {
1322
+ var n3 = tryConsume(e3);
1323
+ if (n3 !== void 0) return n3;
1324
+ var t2 = r[u], a2 = t2.type, i2 = t2.index;
1325
+ throw new TypeError("Unexpected ".concat(a2, " at ").concat(i2, ", expected ").concat(e3));
1326
+ };
1327
+ var consumeText = function() {
1328
+ var e3 = "";
1329
+ var n3;
1330
+ while (n3 = tryConsume("CHAR") || tryConsume("ESCAPED_CHAR")) {
1331
+ e3 += n3;
1332
+ }
1333
+ return e3;
1334
+ };
1335
+ var isSafe = function(e3) {
1336
+ for (var n3 = 0, r2 = o; n3 < r2.length; n3++) {
1337
+ var t2 = r2[n3];
1338
+ if (e3.indexOf(t2) > -1) return true;
1339
+ }
1340
+ return false;
1341
+ };
1342
+ var safePattern = function(e3) {
1343
+ var n3 = c[c.length - 1];
1344
+ var r2 = e3 || (n3 && typeof n3 === "string" ? n3 : "");
1345
+ if (n3 && !r2) {
1346
+ throw new TypeError('Must have text between two parameters, missing text after "'.concat(n3.name, '"'));
1347
+ }
1348
+ if (!r2 || isSafe(r2)) return "[^".concat(escapeString(o), "]+?");
1349
+ return "(?:(?!".concat(escapeString(r2), ")[^").concat(escapeString(o), "])+?");
1350
+ };
1351
+ while (u < r.length) {
1352
+ var v = tryConsume("CHAR");
1353
+ var s = tryConsume("NAME");
1354
+ var d = tryConsume("PATTERN");
1355
+ if (s || d) {
1356
+ var g = v || "";
1357
+ if (a.indexOf(g) === -1) {
1358
+ p += g;
1359
+ g = "";
1360
+ }
1361
+ if (p) {
1362
+ c.push(p);
1363
+ p = "";
1364
+ }
1365
+ c.push({ name: s || f++, prefix: g, suffix: "", pattern: d || safePattern(g), modifier: tryConsume("MODIFIER") || "" });
1366
+ continue;
1367
+ }
1368
+ var x = v || tryConsume("ESCAPED_CHAR");
1369
+ if (x) {
1370
+ p += x;
1371
+ continue;
1372
+ }
1373
+ if (p) {
1374
+ c.push(p);
1375
+ p = "";
1376
+ }
1377
+ var h = tryConsume("OPEN");
1378
+ if (h) {
1379
+ var g = consumeText();
1380
+ var l = tryConsume("NAME") || "";
1381
+ var m = tryConsume("PATTERN") || "";
1382
+ var T = consumeText();
1383
+ mustConsume("CLOSE");
1384
+ c.push({ name: l || (m ? f++ : ""), pattern: l && !m ? safePattern(g) : m, prefix: g, suffix: T, modifier: tryConsume("MODIFIER") || "" });
1385
+ continue;
1386
+ }
1387
+ mustConsume("END");
1388
+ }
1389
+ return c;
1390
+ }
1391
+ n.parse = parse;
1392
+ function compile(e2, n2) {
1393
+ return tokensToFunction(parse(e2, n2), n2);
1394
+ }
1395
+ n.compile = compile;
1396
+ function tokensToFunction(e2, n2) {
1397
+ if (n2 === void 0) {
1398
+ n2 = {};
1399
+ }
1400
+ var r = flags(n2);
1401
+ var t = n2.encode, a = t === void 0 ? function(e3) {
1402
+ return e3;
1403
+ } : t, i = n2.validate, o = i === void 0 ? true : i;
1404
+ var c = e2.map((function(e3) {
1405
+ if (typeof e3 === "object") {
1406
+ return new RegExp("^(?:".concat(e3.pattern, ")$"), r);
1407
+ }
1408
+ }));
1409
+ return function(n3) {
1410
+ var r2 = "";
1411
+ for (var t2 = 0; t2 < e2.length; t2++) {
1412
+ var i2 = e2[t2];
1413
+ if (typeof i2 === "string") {
1414
+ r2 += i2;
1415
+ continue;
1416
+ }
1417
+ var f = n3 ? n3[i2.name] : void 0;
1418
+ var u = i2.modifier === "?" || i2.modifier === "*";
1419
+ var p = i2.modifier === "*" || i2.modifier === "+";
1420
+ if (Array.isArray(f)) {
1421
+ if (!p) {
1422
+ throw new TypeError('Expected "'.concat(i2.name, '" to not repeat, but got an array'));
1423
+ }
1424
+ if (f.length === 0) {
1425
+ if (u) continue;
1426
+ throw new TypeError('Expected "'.concat(i2.name, '" to not be empty'));
1427
+ }
1428
+ for (var v = 0; v < f.length; v++) {
1429
+ var s = a(f[v], i2);
1430
+ if (o && !c[t2].test(s)) {
1431
+ throw new TypeError('Expected all "'.concat(i2.name, '" to match "').concat(i2.pattern, '", but got "').concat(s, '"'));
1432
+ }
1433
+ r2 += i2.prefix + s + i2.suffix;
1434
+ }
1435
+ continue;
1436
+ }
1437
+ if (typeof f === "string" || typeof f === "number") {
1438
+ var s = a(String(f), i2);
1439
+ if (o && !c[t2].test(s)) {
1440
+ throw new TypeError('Expected "'.concat(i2.name, '" to match "').concat(i2.pattern, '", but got "').concat(s, '"'));
1441
+ }
1442
+ r2 += i2.prefix + s + i2.suffix;
1443
+ continue;
1444
+ }
1445
+ if (u) continue;
1446
+ var d = p ? "an array" : "a string";
1447
+ throw new TypeError('Expected "'.concat(i2.name, '" to be ').concat(d));
1448
+ }
1449
+ return r2;
1450
+ };
1451
+ }
1452
+ n.tokensToFunction = tokensToFunction;
1453
+ function match(e2, n2) {
1454
+ var r = [];
1455
+ var t = pathToRegexp(e2, r, n2);
1456
+ return regexpToFunction(t, r, n2);
1457
+ }
1458
+ n.match = match;
1459
+ function regexpToFunction(e2, n2, r) {
1460
+ if (r === void 0) {
1461
+ r = {};
1462
+ }
1463
+ var t = r.decode, a = t === void 0 ? function(e3) {
1464
+ return e3;
1465
+ } : t;
1466
+ return function(r2) {
1467
+ var t2 = e2.exec(r2);
1468
+ if (!t2) return false;
1469
+ var i = t2[0], o = t2.index;
1470
+ var c = /* @__PURE__ */ Object.create(null);
1471
+ var _loop_1 = function(e3) {
1472
+ if (t2[e3] === void 0) return "continue";
1473
+ var r3 = n2[e3 - 1];
1474
+ if (r3.modifier === "*" || r3.modifier === "+") {
1475
+ c[r3.name] = t2[e3].split(r3.prefix + r3.suffix).map((function(e4) {
1476
+ return a(e4, r3);
1477
+ }));
1478
+ } else {
1479
+ c[r3.name] = a(t2[e3], r3);
1480
+ }
1481
+ };
1482
+ for (var f = 1; f < t2.length; f++) {
1483
+ _loop_1(f);
1484
+ }
1485
+ return { path: i, index: o, params: c };
1486
+ };
1487
+ }
1488
+ n.regexpToFunction = regexpToFunction;
1489
+ function escapeString(e2) {
1490
+ return e2.replace(/([.+*?=^!:${}()[\]|/\\])/g, "\\$1");
1491
+ }
1492
+ function flags(e2) {
1493
+ return e2 && e2.sensitive ? "" : "i";
1494
+ }
1495
+ function regexpToRegexp(e2, n2) {
1496
+ if (!n2) return e2;
1497
+ var r = /\((?:\?<(.*?)>)?(?!\?)/g;
1498
+ var t = 0;
1499
+ var a = r.exec(e2.source);
1500
+ while (a) {
1501
+ n2.push({ name: a[1] || t++, prefix: "", suffix: "", modifier: "", pattern: "" });
1502
+ a = r.exec(e2.source);
1503
+ }
1504
+ return e2;
1505
+ }
1506
+ function arrayToRegexp(e2, n2, r) {
1507
+ var t = e2.map((function(e3) {
1508
+ return pathToRegexp(e3, n2, r).source;
1509
+ }));
1510
+ return new RegExp("(?:".concat(t.join("|"), ")"), flags(r));
1511
+ }
1512
+ function stringToRegexp(e2, n2, r) {
1513
+ return tokensToRegexp(parse(e2, r), n2, r);
1514
+ }
1515
+ function tokensToRegexp(e2, n2, r) {
1516
+ if (r === void 0) {
1517
+ r = {};
1518
+ }
1519
+ var t = r.strict, a = t === void 0 ? false : t, i = r.start, o = i === void 0 ? true : i, c = r.end, f = c === void 0 ? true : c, u = r.encode, p = u === void 0 ? function(e3) {
1520
+ return e3;
1521
+ } : u, v = r.delimiter, s = v === void 0 ? "/#?" : v, d = r.endsWith, g = d === void 0 ? "" : d;
1522
+ var x = "[".concat(escapeString(g), "]|$");
1523
+ var h = "[".concat(escapeString(s), "]");
1524
+ var l = o ? "^" : "";
1525
+ for (var m = 0, T = e2; m < T.length; m++) {
1526
+ var E = T[m];
1527
+ if (typeof E === "string") {
1528
+ l += escapeString(p(E));
1529
+ } else {
1530
+ var w = escapeString(p(E.prefix));
1531
+ var y = escapeString(p(E.suffix));
1532
+ if (E.pattern) {
1533
+ if (n2) n2.push(E);
1534
+ if (w || y) {
1535
+ if (E.modifier === "+" || E.modifier === "*") {
1536
+ var R = E.modifier === "*" ? "?" : "";
1537
+ l += "(?:".concat(w, "((?:").concat(E.pattern, ")(?:").concat(y).concat(w, "(?:").concat(E.pattern, "))*)").concat(y, ")").concat(R);
1538
+ } else {
1539
+ l += "(?:".concat(w, "(").concat(E.pattern, ")").concat(y, ")").concat(E.modifier);
1540
+ }
1541
+ } else {
1542
+ if (E.modifier === "+" || E.modifier === "*") {
1543
+ throw new TypeError('Can not repeat "'.concat(E.name, '" without a prefix and suffix'));
1544
+ }
1545
+ l += "(".concat(E.pattern, ")").concat(E.modifier);
1546
+ }
1547
+ } else {
1548
+ l += "(?:".concat(w).concat(y, ")").concat(E.modifier);
1549
+ }
1550
+ }
1551
+ }
1552
+ if (f) {
1553
+ if (!a) l += "".concat(h, "?");
1554
+ l += !r.endsWith ? "$" : "(?=".concat(x, ")");
1555
+ } else {
1556
+ var A = e2[e2.length - 1];
1557
+ var _ = typeof A === "string" ? h.indexOf(A[A.length - 1]) > -1 : A === void 0;
1558
+ if (!a) {
1559
+ l += "(?:".concat(h, "(?=").concat(x, "))?");
1560
+ }
1561
+ if (!_) {
1562
+ l += "(?=".concat(h, "|").concat(x, ")");
1563
+ }
1564
+ }
1565
+ return new RegExp(l, flags(r));
1566
+ }
1567
+ n.tokensToRegexp = tokensToRegexp;
1568
+ function pathToRegexp(e2, n2, r) {
1569
+ if (e2 instanceof RegExp) return regexpToRegexp(e2, n2);
1570
+ if (Array.isArray(e2)) return arrayToRegexp(e2, n2, r);
1571
+ return stringToRegexp(e2, n2, r);
1572
+ }
1573
+ n.pathToRegexp = pathToRegexp;
1574
+ })();
1575
+ module.exports = e;
1576
+ })();
1577
+ }
1578
+ });
1579
+
1580
+ // node_modules/next/dist/lib/route-pattern-normalizer.js
1581
+ var require_route_pattern_normalizer = __commonJS({
1582
+ "node_modules/next/dist/lib/route-pattern-normalizer.js"(exports$1) {
1583
+ Object.defineProperty(exports$1, "__esModule", {
1584
+ value: true
1585
+ });
1586
+ function _export(target, all) {
1587
+ for (var name in all) Object.defineProperty(target, name, {
1588
+ enumerable: true,
1589
+ get: all[name]
1590
+ });
1591
+ }
1592
+ _export(exports$1, {
1593
+ PARAM_SEPARATOR: function() {
1594
+ return PARAM_SEPARATOR;
1595
+ },
1596
+ hasAdjacentParameterIssues: function() {
1597
+ return hasAdjacentParameterIssues;
1598
+ },
1599
+ normalizeAdjacentParameters: function() {
1600
+ return normalizeAdjacentParameters;
1601
+ },
1602
+ normalizeTokensForRegexp: function() {
1603
+ return normalizeTokensForRegexp;
1604
+ },
1605
+ stripNormalizedSeparators: function() {
1606
+ return stripNormalizedSeparators;
1607
+ },
1608
+ stripParameterSeparators: function() {
1609
+ return stripParameterSeparators;
1610
+ }
1611
+ });
1612
+ var PARAM_SEPARATOR = "_NEXTSEP_";
1613
+ function hasAdjacentParameterIssues(route) {
1614
+ if (typeof route !== "string") return false;
1615
+ if (/\/\(\.{1,3}\):[^/\s]+/.test(route)) {
1616
+ return true;
1617
+ }
1618
+ if (/:[a-zA-Z_][a-zA-Z0-9_]*:[a-zA-Z_][a-zA-Z0-9_]*/.test(route)) {
1619
+ return true;
1620
+ }
1621
+ return false;
1622
+ }
1623
+ function normalizeAdjacentParameters(route) {
1624
+ let normalized = route;
1625
+ normalized = normalized.replace(/(\([^)]*\)):([^/\s]+)/g, `$1${PARAM_SEPARATOR}:$2`);
1626
+ normalized = normalized.replace(/:([^:/\s)]+)(?=:)/g, `:$1${PARAM_SEPARATOR}`);
1627
+ return normalized;
1628
+ }
1629
+ function normalizeTokensForRegexp(tokens) {
1630
+ return tokens.map((token) => {
1631
+ if (typeof token === "object" && token !== null && // Not all token objects have 'modifier' property (e.g., simple text tokens)
1632
+ "modifier" in token && // Only repeating modifiers (* or +) cause the validation error
1633
+ // Other modifiers like '?' (optional) are fine
1634
+ (token.modifier === "*" || token.modifier === "+") && // Token objects can have different shapes depending on route pattern
1635
+ "prefix" in token && "suffix" in token && // Both prefix and suffix must be empty strings
1636
+ // This is what causes the validation error in path-to-regexp
1637
+ token.prefix === "" && token.suffix === "") {
1638
+ return {
1639
+ ...token,
1640
+ prefix: "/"
1641
+ };
1642
+ }
1643
+ return token;
1644
+ });
1645
+ }
1646
+ function stripNormalizedSeparators(pathname) {
1647
+ return pathname.replace(new RegExp(`\\)${PARAM_SEPARATOR}`, "g"), ")");
1648
+ }
1649
+ function stripParameterSeparators(params) {
1650
+ const cleaned = {};
1651
+ for (const [key, value] of Object.entries(params)) {
1652
+ if (typeof value === "string") {
1653
+ cleaned[key] = value.replace(new RegExp(`^${PARAM_SEPARATOR}`), "");
1654
+ } else if (Array.isArray(value)) {
1655
+ cleaned[key] = value.map((item) => typeof item === "string" ? item.replace(new RegExp(`^${PARAM_SEPARATOR}`), "") : item);
1656
+ } else {
1657
+ cleaned[key] = value;
1658
+ }
1659
+ }
1660
+ return cleaned;
1661
+ }
1662
+ }
1663
+ });
1664
+
1665
+ // node_modules/next/dist/shared/lib/router/utils/route-match-utils.js
1666
+ var require_route_match_utils = __commonJS({
1667
+ "node_modules/next/dist/shared/lib/router/utils/route-match-utils.js"(exports$1) {
1668
+ Object.defineProperty(exports$1, "__esModule", {
1669
+ value: true
1670
+ });
1671
+ function _export(target, all) {
1672
+ for (var name in all) Object.defineProperty(target, name, {
1673
+ enumerable: true,
1674
+ get: all[name]
1675
+ });
1676
+ }
1677
+ _export(exports$1, {
1678
+ safeCompile: function() {
1679
+ return safeCompile;
1680
+ },
1681
+ safePathToRegexp: function() {
1682
+ return safePathToRegexp;
1683
+ },
1684
+ safeRegexpToFunction: function() {
1685
+ return safeRegexpToFunction;
1686
+ },
1687
+ safeRouteMatcher: function() {
1688
+ return safeRouteMatcher;
1689
+ }
1690
+ });
1691
+ var _pathtoregexp = require_path_to_regexp();
1692
+ var _routepatternnormalizer = require_route_pattern_normalizer();
1693
+ function safePathToRegexp(route, keys, options) {
1694
+ if (typeof route !== "string") {
1695
+ return (0, _pathtoregexp.pathToRegexp)(route, keys, options);
1696
+ }
1697
+ const needsNormalization = (0, _routepatternnormalizer.hasAdjacentParameterIssues)(route);
1698
+ const routeToUse = needsNormalization ? (0, _routepatternnormalizer.normalizeAdjacentParameters)(route) : route;
1699
+ try {
1700
+ return (0, _pathtoregexp.pathToRegexp)(routeToUse, keys, options);
1701
+ } catch (error) {
1702
+ if (!needsNormalization) {
1703
+ try {
1704
+ const normalizedRoute = (0, _routepatternnormalizer.normalizeAdjacentParameters)(route);
1705
+ return (0, _pathtoregexp.pathToRegexp)(normalizedRoute, keys, options);
1706
+ } catch (retryError) {
1707
+ throw error;
1708
+ }
1709
+ }
1710
+ throw error;
1711
+ }
1712
+ }
1713
+ function safeCompile(route, options) {
1714
+ const needsNormalization = (0, _routepatternnormalizer.hasAdjacentParameterIssues)(route);
1715
+ const routeToUse = needsNormalization ? (0, _routepatternnormalizer.normalizeAdjacentParameters)(route) : route;
1716
+ try {
1717
+ const compiler = (0, _pathtoregexp.compile)(routeToUse, options);
1718
+ if (needsNormalization) {
1719
+ return (params) => {
1720
+ return (0, _routepatternnormalizer.stripNormalizedSeparators)(compiler(params));
1721
+ };
1722
+ }
1723
+ return compiler;
1724
+ } catch (error) {
1725
+ if (!needsNormalization) {
1726
+ try {
1727
+ const normalizedRoute = (0, _routepatternnormalizer.normalizeAdjacentParameters)(route);
1728
+ const compiler = (0, _pathtoregexp.compile)(normalizedRoute, options);
1729
+ return (params) => {
1730
+ return (0, _routepatternnormalizer.stripNormalizedSeparators)(compiler(params));
1731
+ };
1732
+ } catch (retryError) {
1733
+ throw error;
1734
+ }
1735
+ }
1736
+ throw error;
1737
+ }
1738
+ }
1739
+ function safeRegexpToFunction(regexp, keys) {
1740
+ const originalMatcher = (0, _pathtoregexp.regexpToFunction)(regexp, keys || []);
1741
+ return (pathname) => {
1742
+ const result = originalMatcher(pathname);
1743
+ if (!result) return false;
1744
+ return {
1745
+ ...result,
1746
+ params: (0, _routepatternnormalizer.stripParameterSeparators)(result.params)
1747
+ };
1748
+ };
1749
+ }
1750
+ function safeRouteMatcher(matcherFn) {
1751
+ return (pathname) => {
1752
+ const result = matcherFn(pathname);
1753
+ if (!result) return false;
1754
+ return (0, _routepatternnormalizer.stripParameterSeparators)(result);
1755
+ };
1756
+ }
1757
+ }
1758
+ });
1759
+
1760
+ // node_modules/next/dist/shared/lib/router/utils/route-matcher.js
1761
+ var require_route_matcher = __commonJS({
1762
+ "node_modules/next/dist/shared/lib/router/utils/route-matcher.js"(exports$1) {
1763
+ Object.defineProperty(exports$1, "__esModule", {
1764
+ value: true
1765
+ });
1766
+ Object.defineProperty(exports$1, "getRouteMatcher", {
1767
+ enumerable: true,
1768
+ get: function() {
1769
+ return getRouteMatcher;
1770
+ }
1771
+ });
1772
+ var _utils = require_utils();
1773
+ var _routematchutils = require_route_match_utils();
1774
+ function getRouteMatcher({ re, groups }) {
1775
+ const rawMatcher = (pathname) => {
1776
+ const routeMatch = re.exec(pathname);
1777
+ if (!routeMatch) return false;
1778
+ const decode = (param) => {
1779
+ try {
1780
+ return decodeURIComponent(param);
1781
+ } catch {
1782
+ throw Object.defineProperty(new _utils.DecodeError("failed to decode param"), "__NEXT_ERROR_CODE", {
1783
+ value: "E528",
1784
+ enumerable: false,
1785
+ configurable: true
1786
+ });
1787
+ }
1788
+ };
1789
+ const params = {};
1790
+ for (const [key, group] of Object.entries(groups)) {
1791
+ const match = routeMatch[group.pos];
1792
+ if (match !== void 0) {
1793
+ if (group.repeat) {
1794
+ params[key] = match.split("/").map((entry) => decode(entry));
1795
+ } else {
1796
+ params[key] = decode(match);
1797
+ }
1798
+ }
1799
+ }
1800
+ return params;
1801
+ };
1802
+ return (0, _routematchutils.safeRouteMatcher)(rawMatcher);
1803
+ }
1804
+ }
1805
+ });
1806
+
1807
+ // node_modules/next/dist/lib/constants.js
1808
+ var require_constants = __commonJS({
1809
+ "node_modules/next/dist/lib/constants.js"(exports$1) {
1810
+ Object.defineProperty(exports$1, "__esModule", {
1811
+ value: true
1812
+ });
1813
+ function _export(target, all) {
1814
+ for (var name in all) Object.defineProperty(target, name, {
1815
+ enumerable: true,
1816
+ get: all[name]
1817
+ });
1818
+ }
1819
+ _export(exports$1, {
1820
+ ACTION_SUFFIX: function() {
1821
+ return ACTION_SUFFIX;
1822
+ },
1823
+ APP_DIR_ALIAS: function() {
1824
+ return APP_DIR_ALIAS;
1825
+ },
1826
+ CACHE_ONE_YEAR: function() {
1827
+ return CACHE_ONE_YEAR;
1828
+ },
1829
+ DOT_NEXT_ALIAS: function() {
1830
+ return DOT_NEXT_ALIAS;
1831
+ },
1832
+ ESLINT_DEFAULT_DIRS: function() {
1833
+ return ESLINT_DEFAULT_DIRS;
1834
+ },
1835
+ GSP_NO_RETURNED_VALUE: function() {
1836
+ return GSP_NO_RETURNED_VALUE;
1837
+ },
1838
+ GSSP_COMPONENT_MEMBER_ERROR: function() {
1839
+ return GSSP_COMPONENT_MEMBER_ERROR;
1840
+ },
1841
+ GSSP_NO_RETURNED_VALUE: function() {
1842
+ return GSSP_NO_RETURNED_VALUE;
1843
+ },
1844
+ HTML_CONTENT_TYPE_HEADER: function() {
1845
+ return HTML_CONTENT_TYPE_HEADER;
1846
+ },
1847
+ INFINITE_CACHE: function() {
1848
+ return INFINITE_CACHE;
1849
+ },
1850
+ INSTRUMENTATION_HOOK_FILENAME: function() {
1851
+ return INSTRUMENTATION_HOOK_FILENAME;
1852
+ },
1853
+ JSON_CONTENT_TYPE_HEADER: function() {
1854
+ return JSON_CONTENT_TYPE_HEADER;
1855
+ },
1856
+ MATCHED_PATH_HEADER: function() {
1857
+ return MATCHED_PATH_HEADER;
1858
+ },
1859
+ MIDDLEWARE_FILENAME: function() {
1860
+ return MIDDLEWARE_FILENAME;
1861
+ },
1862
+ MIDDLEWARE_LOCATION_REGEXP: function() {
1863
+ return MIDDLEWARE_LOCATION_REGEXP;
1864
+ },
1865
+ NEXT_BODY_SUFFIX: function() {
1866
+ return NEXT_BODY_SUFFIX;
1867
+ },
1868
+ NEXT_CACHE_IMPLICIT_TAG_ID: function() {
1869
+ return NEXT_CACHE_IMPLICIT_TAG_ID;
1870
+ },
1871
+ NEXT_CACHE_REVALIDATED_TAGS_HEADER: function() {
1872
+ return NEXT_CACHE_REVALIDATED_TAGS_HEADER;
1873
+ },
1874
+ NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER: function() {
1875
+ return NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER;
1876
+ },
1877
+ NEXT_CACHE_SOFT_TAG_MAX_LENGTH: function() {
1878
+ return NEXT_CACHE_SOFT_TAG_MAX_LENGTH;
1879
+ },
1880
+ NEXT_CACHE_TAGS_HEADER: function() {
1881
+ return NEXT_CACHE_TAGS_HEADER;
1882
+ },
1883
+ NEXT_CACHE_TAG_MAX_ITEMS: function() {
1884
+ return NEXT_CACHE_TAG_MAX_ITEMS;
1885
+ },
1886
+ NEXT_CACHE_TAG_MAX_LENGTH: function() {
1887
+ return NEXT_CACHE_TAG_MAX_LENGTH;
1888
+ },
1889
+ NEXT_DATA_SUFFIX: function() {
1890
+ return NEXT_DATA_SUFFIX;
1891
+ },
1892
+ NEXT_INTERCEPTION_MARKER_PREFIX: function() {
1893
+ return NEXT_INTERCEPTION_MARKER_PREFIX;
1894
+ },
1895
+ NEXT_META_SUFFIX: function() {
1896
+ return NEXT_META_SUFFIX;
1897
+ },
1898
+ NEXT_QUERY_PARAM_PREFIX: function() {
1899
+ return NEXT_QUERY_PARAM_PREFIX;
1900
+ },
1901
+ NEXT_RESUME_HEADER: function() {
1902
+ return NEXT_RESUME_HEADER;
1903
+ },
1904
+ NON_STANDARD_NODE_ENV: function() {
1905
+ return NON_STANDARD_NODE_ENV;
1906
+ },
1907
+ PAGES_DIR_ALIAS: function() {
1908
+ return PAGES_DIR_ALIAS;
1909
+ },
1910
+ PRERENDER_REVALIDATE_HEADER: function() {
1911
+ return PRERENDER_REVALIDATE_HEADER;
1912
+ },
1913
+ PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER: function() {
1914
+ return PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER;
1915
+ },
1916
+ PROXY_FILENAME: function() {
1917
+ return PROXY_FILENAME;
1918
+ },
1919
+ PROXY_LOCATION_REGEXP: function() {
1920
+ return PROXY_LOCATION_REGEXP;
1921
+ },
1922
+ PUBLIC_DIR_MIDDLEWARE_CONFLICT: function() {
1923
+ return PUBLIC_DIR_MIDDLEWARE_CONFLICT;
1924
+ },
1925
+ ROOT_DIR_ALIAS: function() {
1926
+ return ROOT_DIR_ALIAS;
1927
+ },
1928
+ RSC_ACTION_CLIENT_WRAPPER_ALIAS: function() {
1929
+ return RSC_ACTION_CLIENT_WRAPPER_ALIAS;
1930
+ },
1931
+ RSC_ACTION_ENCRYPTION_ALIAS: function() {
1932
+ return RSC_ACTION_ENCRYPTION_ALIAS;
1933
+ },
1934
+ RSC_ACTION_PROXY_ALIAS: function() {
1935
+ return RSC_ACTION_PROXY_ALIAS;
1936
+ },
1937
+ RSC_ACTION_VALIDATE_ALIAS: function() {
1938
+ return RSC_ACTION_VALIDATE_ALIAS;
1939
+ },
1940
+ RSC_CACHE_WRAPPER_ALIAS: function() {
1941
+ return RSC_CACHE_WRAPPER_ALIAS;
1942
+ },
1943
+ RSC_DYNAMIC_IMPORT_WRAPPER_ALIAS: function() {
1944
+ return RSC_DYNAMIC_IMPORT_WRAPPER_ALIAS;
1945
+ },
1946
+ RSC_MOD_REF_PROXY_ALIAS: function() {
1947
+ return RSC_MOD_REF_PROXY_ALIAS;
1948
+ },
1949
+ RSC_SEGMENTS_DIR_SUFFIX: function() {
1950
+ return RSC_SEGMENTS_DIR_SUFFIX;
1951
+ },
1952
+ RSC_SEGMENT_SUFFIX: function() {
1953
+ return RSC_SEGMENT_SUFFIX;
1954
+ },
1955
+ RSC_SUFFIX: function() {
1956
+ return RSC_SUFFIX;
1957
+ },
1958
+ SERVER_PROPS_EXPORT_ERROR: function() {
1959
+ return SERVER_PROPS_EXPORT_ERROR;
1960
+ },
1961
+ SERVER_PROPS_GET_INIT_PROPS_CONFLICT: function() {
1962
+ return SERVER_PROPS_GET_INIT_PROPS_CONFLICT;
1963
+ },
1964
+ SERVER_PROPS_SSG_CONFLICT: function() {
1965
+ return SERVER_PROPS_SSG_CONFLICT;
1966
+ },
1967
+ SERVER_RUNTIME: function() {
1968
+ return SERVER_RUNTIME;
1969
+ },
1970
+ SSG_FALLBACK_EXPORT_ERROR: function() {
1971
+ return SSG_FALLBACK_EXPORT_ERROR;
1972
+ },
1973
+ SSG_GET_INITIAL_PROPS_CONFLICT: function() {
1974
+ return SSG_GET_INITIAL_PROPS_CONFLICT;
1975
+ },
1976
+ STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR: function() {
1977
+ return STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR;
1978
+ },
1979
+ TEXT_PLAIN_CONTENT_TYPE_HEADER: function() {
1980
+ return TEXT_PLAIN_CONTENT_TYPE_HEADER;
1981
+ },
1982
+ UNSTABLE_REVALIDATE_RENAME_ERROR: function() {
1983
+ return UNSTABLE_REVALIDATE_RENAME_ERROR;
1984
+ },
1985
+ WEBPACK_LAYERS: function() {
1986
+ return WEBPACK_LAYERS;
1987
+ },
1988
+ WEBPACK_RESOURCE_QUERIES: function() {
1989
+ return WEBPACK_RESOURCE_QUERIES;
1990
+ },
1991
+ WEB_SOCKET_MAX_RECONNECTIONS: function() {
1992
+ return WEB_SOCKET_MAX_RECONNECTIONS;
1993
+ }
1994
+ });
1995
+ var TEXT_PLAIN_CONTENT_TYPE_HEADER = "text/plain";
1996
+ var HTML_CONTENT_TYPE_HEADER = "text/html; charset=utf-8";
1997
+ var JSON_CONTENT_TYPE_HEADER = "application/json; charset=utf-8";
1998
+ var NEXT_QUERY_PARAM_PREFIX = "nxtP";
1999
+ var NEXT_INTERCEPTION_MARKER_PREFIX = "nxtI";
2000
+ var MATCHED_PATH_HEADER = "x-matched-path";
2001
+ var PRERENDER_REVALIDATE_HEADER = "x-prerender-revalidate";
2002
+ var PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER = "x-prerender-revalidate-if-generated";
2003
+ var RSC_SEGMENTS_DIR_SUFFIX = ".segments";
2004
+ var RSC_SEGMENT_SUFFIX = ".segment.rsc";
2005
+ var RSC_SUFFIX = ".rsc";
2006
+ var ACTION_SUFFIX = ".action";
2007
+ var NEXT_DATA_SUFFIX = ".json";
2008
+ var NEXT_META_SUFFIX = ".meta";
2009
+ var NEXT_BODY_SUFFIX = ".body";
2010
+ var NEXT_CACHE_TAGS_HEADER = "x-next-cache-tags";
2011
+ var NEXT_CACHE_REVALIDATED_TAGS_HEADER = "x-next-revalidated-tags";
2012
+ var NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER = "x-next-revalidate-tag-token";
2013
+ var NEXT_RESUME_HEADER = "next-resume";
2014
+ var NEXT_CACHE_TAG_MAX_ITEMS = 128;
2015
+ var NEXT_CACHE_TAG_MAX_LENGTH = 256;
2016
+ var NEXT_CACHE_SOFT_TAG_MAX_LENGTH = 1024;
2017
+ var NEXT_CACHE_IMPLICIT_TAG_ID = "_N_T_";
2018
+ var CACHE_ONE_YEAR = 31536e3;
2019
+ var INFINITE_CACHE = 4294967294;
2020
+ var MIDDLEWARE_FILENAME = "middleware";
2021
+ var MIDDLEWARE_LOCATION_REGEXP = `(?:src/)?${MIDDLEWARE_FILENAME}`;
2022
+ var PROXY_FILENAME = "proxy";
2023
+ var PROXY_LOCATION_REGEXP = `(?:src/)?${PROXY_FILENAME}`;
2024
+ var INSTRUMENTATION_HOOK_FILENAME = "instrumentation";
2025
+ var PAGES_DIR_ALIAS = "private-next-pages";
2026
+ var DOT_NEXT_ALIAS = "private-dot-next";
2027
+ var ROOT_DIR_ALIAS = "private-next-root-dir";
2028
+ var APP_DIR_ALIAS = "private-next-app-dir";
2029
+ var RSC_MOD_REF_PROXY_ALIAS = "private-next-rsc-mod-ref-proxy";
2030
+ var RSC_ACTION_VALIDATE_ALIAS = "private-next-rsc-action-validate";
2031
+ var RSC_ACTION_PROXY_ALIAS = "private-next-rsc-server-reference";
2032
+ var RSC_CACHE_WRAPPER_ALIAS = "private-next-rsc-cache-wrapper";
2033
+ var RSC_DYNAMIC_IMPORT_WRAPPER_ALIAS = "private-next-rsc-track-dynamic-import";
2034
+ var RSC_ACTION_ENCRYPTION_ALIAS = "private-next-rsc-action-encryption";
2035
+ var RSC_ACTION_CLIENT_WRAPPER_ALIAS = "private-next-rsc-action-client-wrapper";
2036
+ var PUBLIC_DIR_MIDDLEWARE_CONFLICT = `You can not have a '_next' folder inside of your public folder. This conflicts with the internal '/_next' route. https://nextjs.org/docs/messages/public-next-folder-conflict`;
2037
+ var SSG_GET_INITIAL_PROPS_CONFLICT = `You can not use getInitialProps with getStaticProps. To use SSG, please remove your getInitialProps`;
2038
+ var SERVER_PROPS_GET_INIT_PROPS_CONFLICT = `You can not use getInitialProps with getServerSideProps. Please remove getInitialProps.`;
2039
+ var SERVER_PROPS_SSG_CONFLICT = `You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps`;
2040
+ var STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR = `can not have getInitialProps/getServerSideProps, https://nextjs.org/docs/messages/404-get-initial-props`;
2041
+ var SERVER_PROPS_EXPORT_ERROR = `pages with \`getServerSideProps\` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export`;
2042
+ var GSP_NO_RETURNED_VALUE = "Your `getStaticProps` function did not return an object. Did you forget to add a `return`?";
2043
+ var GSSP_NO_RETURNED_VALUE = "Your `getServerSideProps` function did not return an object. Did you forget to add a `return`?";
2044
+ var UNSTABLE_REVALIDATE_RENAME_ERROR = "The `unstable_revalidate` property is available for general use.\nPlease use `revalidate` instead.";
2045
+ var GSSP_COMPONENT_MEMBER_ERROR = `can not be attached to a page's component and must be exported from the page. See more info here: https://nextjs.org/docs/messages/gssp-component-member`;
2046
+ var NON_STANDARD_NODE_ENV = `You are using a non-standard "NODE_ENV" value in your environment. This creates inconsistencies in the project and is strongly advised against. Read more: https://nextjs.org/docs/messages/non-standard-node-env`;
2047
+ var SSG_FALLBACK_EXPORT_ERROR = `Pages with \`fallback\` enabled in \`getStaticPaths\` can not be exported. See more info here: https://nextjs.org/docs/messages/ssg-fallback-true-export`;
2048
+ var ESLINT_DEFAULT_DIRS = [
2049
+ "app",
2050
+ "pages",
2051
+ "components",
2052
+ "lib",
2053
+ "src"
2054
+ ];
2055
+ var SERVER_RUNTIME = {
2056
+ edge: "edge",
2057
+ experimentalEdge: "experimental-edge",
2058
+ nodejs: "nodejs"
2059
+ };
2060
+ var WEB_SOCKET_MAX_RECONNECTIONS = 12;
2061
+ var WEBPACK_LAYERS_NAMES = {
2062
+ /**
2063
+ * The layer for the shared code between the client and server bundles.
2064
+ */
2065
+ shared: "shared",
2066
+ /**
2067
+ * The layer for server-only runtime and picking up `react-server` export conditions.
2068
+ * Including app router RSC pages and app router custom routes and metadata routes.
2069
+ */
2070
+ reactServerComponents: "rsc",
2071
+ /**
2072
+ * Server Side Rendering layer for app (ssr).
2073
+ */
2074
+ serverSideRendering: "ssr",
2075
+ /**
2076
+ * The browser client bundle layer for actions.
2077
+ */
2078
+ actionBrowser: "action-browser",
2079
+ /**
2080
+ * The Node.js bundle layer for the API routes.
2081
+ */
2082
+ apiNode: "api-node",
2083
+ /**
2084
+ * The Edge Lite bundle layer for the API routes.
2085
+ */
2086
+ apiEdge: "api-edge",
2087
+ /**
2088
+ * The layer for the middleware code.
2089
+ */
2090
+ middleware: "middleware",
2091
+ /**
2092
+ * The layer for the instrumentation hooks.
2093
+ */
2094
+ instrument: "instrument",
2095
+ /**
2096
+ * The layer for assets on the edge.
2097
+ */
2098
+ edgeAsset: "edge-asset",
2099
+ /**
2100
+ * The browser client bundle layer for App directory.
2101
+ */
2102
+ appPagesBrowser: "app-pages-browser",
2103
+ /**
2104
+ * The browser client bundle layer for Pages directory.
2105
+ */
2106
+ pagesDirBrowser: "pages-dir-browser",
2107
+ /**
2108
+ * The Edge Lite bundle layer for Pages directory.
2109
+ */
2110
+ pagesDirEdge: "pages-dir-edge",
2111
+ /**
2112
+ * The Node.js bundle layer for Pages directory.
2113
+ */
2114
+ pagesDirNode: "pages-dir-node"
2115
+ };
2116
+ var WEBPACK_LAYERS = {
2117
+ ...WEBPACK_LAYERS_NAMES,
2118
+ GROUP: {
2119
+ builtinReact: [
2120
+ WEBPACK_LAYERS_NAMES.reactServerComponents,
2121
+ WEBPACK_LAYERS_NAMES.actionBrowser
2122
+ ],
2123
+ serverOnly: [
2124
+ WEBPACK_LAYERS_NAMES.reactServerComponents,
2125
+ WEBPACK_LAYERS_NAMES.actionBrowser,
2126
+ WEBPACK_LAYERS_NAMES.instrument,
2127
+ WEBPACK_LAYERS_NAMES.middleware
2128
+ ],
2129
+ neutralTarget: [
2130
+ // pages api
2131
+ WEBPACK_LAYERS_NAMES.apiNode,
2132
+ WEBPACK_LAYERS_NAMES.apiEdge
2133
+ ],
2134
+ clientOnly: [
2135
+ WEBPACK_LAYERS_NAMES.serverSideRendering,
2136
+ WEBPACK_LAYERS_NAMES.appPagesBrowser
2137
+ ],
2138
+ bundled: [
2139
+ WEBPACK_LAYERS_NAMES.reactServerComponents,
2140
+ WEBPACK_LAYERS_NAMES.actionBrowser,
2141
+ WEBPACK_LAYERS_NAMES.serverSideRendering,
2142
+ WEBPACK_LAYERS_NAMES.appPagesBrowser,
2143
+ WEBPACK_LAYERS_NAMES.shared,
2144
+ WEBPACK_LAYERS_NAMES.instrument,
2145
+ WEBPACK_LAYERS_NAMES.middleware
2146
+ ],
2147
+ appPages: [
2148
+ // app router pages and layouts
2149
+ WEBPACK_LAYERS_NAMES.reactServerComponents,
2150
+ WEBPACK_LAYERS_NAMES.serverSideRendering,
2151
+ WEBPACK_LAYERS_NAMES.appPagesBrowser,
2152
+ WEBPACK_LAYERS_NAMES.actionBrowser
2153
+ ]
2154
+ }
2155
+ };
2156
+ var WEBPACK_RESOURCE_QUERIES = {
2157
+ edgeSSREntry: "__next_edge_ssr_entry__",
2158
+ metadata: "__next_metadata__",
2159
+ metadataRoute: "__next_metadata_route__",
2160
+ metadataImageMeta: "__next_metadata_image_meta__"
2161
+ };
2162
+ }
2163
+ });
2164
+
2165
+ // node_modules/next/dist/shared/lib/escape-regexp.js
2166
+ var require_escape_regexp = __commonJS({
2167
+ "node_modules/next/dist/shared/lib/escape-regexp.js"(exports$1) {
2168
+ Object.defineProperty(exports$1, "__esModule", {
2169
+ value: true
2170
+ });
2171
+ Object.defineProperty(exports$1, "escapeStringRegexp", {
2172
+ enumerable: true,
2173
+ get: function() {
2174
+ return escapeStringRegexp;
2175
+ }
2176
+ });
2177
+ var reHasRegExp = /[|\\{}()[\]^$+*?.-]/;
2178
+ var reReplaceRegExp = /[|\\{}()[\]^$+*?.-]/g;
2179
+ function escapeStringRegexp(str) {
2180
+ if (reHasRegExp.test(str)) {
2181
+ return str.replace(reReplaceRegExp, "\\$&");
2182
+ }
2183
+ return str;
2184
+ }
2185
+ }
2186
+ });
2187
+
2188
+ // node_modules/next/dist/shared/lib/invariant-error.js
2189
+ var require_invariant_error = __commonJS({
2190
+ "node_modules/next/dist/shared/lib/invariant-error.js"(exports$1) {
2191
+ Object.defineProperty(exports$1, "__esModule", {
2192
+ value: true
2193
+ });
2194
+ Object.defineProperty(exports$1, "InvariantError", {
2195
+ enumerable: true,
2196
+ get: function() {
2197
+ return InvariantError;
2198
+ }
2199
+ });
2200
+ var InvariantError = class extends Error {
2201
+ constructor(message, options) {
2202
+ super(`Invariant: ${message.endsWith(".") ? message : message + "."} This is a bug in Next.js.`, options);
2203
+ this.name = "InvariantError";
2204
+ }
2205
+ };
2206
+ }
2207
+ });
2208
+
2209
+ // node_modules/next/dist/shared/lib/router/utils/parse-loader-tree.js
2210
+ var require_parse_loader_tree = __commonJS({
2211
+ "node_modules/next/dist/shared/lib/router/utils/parse-loader-tree.js"(exports$1) {
2212
+ Object.defineProperty(exports$1, "__esModule", {
2213
+ value: true
2214
+ });
2215
+ Object.defineProperty(exports$1, "parseLoaderTree", {
2216
+ enumerable: true,
2217
+ get: function() {
2218
+ return parseLoaderTree;
2219
+ }
2220
+ });
2221
+ var _segment = require_segment();
2222
+ function parseLoaderTree(tree) {
2223
+ const [segment, parallelRoutes, modules] = tree;
2224
+ const { layout, template } = modules;
2225
+ let { page } = modules;
2226
+ page = segment === _segment.DEFAULT_SEGMENT_KEY ? modules.defaultPage : page;
2227
+ const conventionPath = layout?.[1] || template?.[1] || page?.[1];
2228
+ return {
2229
+ page,
2230
+ segment,
2231
+ modules,
2232
+ /* it can be either layout / template / page */
2233
+ conventionPath,
2234
+ parallelRoutes
2235
+ };
2236
+ }
2237
+ }
2238
+ });
2239
+
2240
+ // node_modules/next/dist/shared/lib/router/utils/get-segment-param.js
2241
+ var require_get_segment_param = __commonJS({
2242
+ "node_modules/next/dist/shared/lib/router/utils/get-segment-param.js"(exports$1) {
2243
+ Object.defineProperty(exports$1, "__esModule", {
2244
+ value: true
2245
+ });
2246
+ function _export(target, all) {
2247
+ for (var name in all) Object.defineProperty(target, name, {
2248
+ enumerable: true,
2249
+ get: all[name]
2250
+ });
2251
+ }
2252
+ _export(exports$1, {
2253
+ getParamProperties: function() {
2254
+ return getParamProperties;
2255
+ },
2256
+ getSegmentParam: function() {
2257
+ return getSegmentParam;
2258
+ },
2259
+ isCatchAll: function() {
2260
+ return isCatchAll;
2261
+ }
2262
+ });
2263
+ var _interceptionroutes = require_interception_routes();
2264
+ function getSegmentParam(segment) {
2265
+ const interceptionMarker = _interceptionroutes.INTERCEPTION_ROUTE_MARKERS.find((marker) => segment.startsWith(marker));
2266
+ if (interceptionMarker) {
2267
+ segment = segment.slice(interceptionMarker.length);
2268
+ }
2269
+ if (segment.startsWith("[[...") && segment.endsWith("]]")) {
2270
+ return {
2271
+ // TODO-APP: Optional catchall does not currently work with parallel routes,
2272
+ // so for now aren't handling a potential interception marker.
2273
+ paramType: "optional-catchall",
2274
+ paramName: segment.slice(5, -2)
2275
+ };
2276
+ }
2277
+ if (segment.startsWith("[...") && segment.endsWith("]")) {
2278
+ return {
2279
+ paramType: interceptionMarker ? `catchall-intercepted-${interceptionMarker}` : "catchall",
2280
+ paramName: segment.slice(4, -1)
2281
+ };
2282
+ }
2283
+ if (segment.startsWith("[") && segment.endsWith("]")) {
2284
+ return {
2285
+ paramType: interceptionMarker ? `dynamic-intercepted-${interceptionMarker}` : "dynamic",
2286
+ paramName: segment.slice(1, -1)
2287
+ };
2288
+ }
2289
+ return null;
2290
+ }
2291
+ function isCatchAll(type) {
2292
+ return type === "catchall" || type === "catchall-intercepted-(..)(..)" || type === "catchall-intercepted-(.)" || type === "catchall-intercepted-(..)" || type === "catchall-intercepted-(...)" || type === "optional-catchall";
2293
+ }
2294
+ function getParamProperties(paramType) {
2295
+ let repeat = false;
2296
+ let optional = false;
2297
+ switch (paramType) {
2298
+ case "catchall":
2299
+ case "catchall-intercepted-(..)(..)":
2300
+ case "catchall-intercepted-(.)":
2301
+ case "catchall-intercepted-(..)":
2302
+ case "catchall-intercepted-(...)":
2303
+ repeat = true;
2304
+ break;
2305
+ case "optional-catchall":
2306
+ repeat = true;
2307
+ optional = true;
2308
+ break;
2309
+ }
2310
+ return {
2311
+ repeat,
2312
+ optional
2313
+ };
2314
+ }
2315
+ }
2316
+ });
2317
+
2318
+ // node_modules/next/dist/shared/lib/router/routes/app.js
2319
+ var require_app = __commonJS({
2320
+ "node_modules/next/dist/shared/lib/router/routes/app.js"(exports$1) {
2321
+ Object.defineProperty(exports$1, "__esModule", {
2322
+ value: true
2323
+ });
2324
+ function _export(target, all) {
2325
+ for (var name in all) Object.defineProperty(target, name, {
2326
+ enumerable: true,
2327
+ get: all[name]
2328
+ });
2329
+ }
2330
+ _export(exports$1, {
2331
+ isInterceptionAppRoute: function() {
2332
+ return isInterceptionAppRoute;
2333
+ },
2334
+ isNormalizedAppRoute: function() {
2335
+ return isNormalizedAppRoute;
2336
+ },
2337
+ parseAppRoute: function() {
2338
+ return parseAppRoute;
2339
+ },
2340
+ parseAppRouteSegment: function() {
2341
+ return parseAppRouteSegment;
2342
+ }
2343
+ });
2344
+ var _invarianterror = require_invariant_error();
2345
+ var _getsegmentparam = require_get_segment_param();
2346
+ var _interceptionroutes = require_interception_routes();
2347
+ function parseAppRouteSegment(segment) {
2348
+ if (segment === "") {
2349
+ return null;
2350
+ }
2351
+ const interceptionMarker = _interceptionroutes.INTERCEPTION_ROUTE_MARKERS.find((m) => segment.startsWith(m));
2352
+ const param = (0, _getsegmentparam.getSegmentParam)(segment);
2353
+ if (param) {
2354
+ return {
2355
+ type: "dynamic",
2356
+ name: segment,
2357
+ param,
2358
+ interceptionMarker
2359
+ };
2360
+ } else if (segment.startsWith("(") && segment.endsWith(")")) {
2361
+ return {
2362
+ type: "route-group",
2363
+ name: segment,
2364
+ interceptionMarker
2365
+ };
2366
+ } else if (segment.startsWith("@")) {
2367
+ return {
2368
+ type: "parallel-route",
2369
+ name: segment,
2370
+ interceptionMarker
2371
+ };
2372
+ } else {
2373
+ return {
2374
+ type: "static",
2375
+ name: segment,
2376
+ interceptionMarker
2377
+ };
2378
+ }
2379
+ }
2380
+ function isNormalizedAppRoute(route) {
2381
+ return route.normalized;
2382
+ }
2383
+ function isInterceptionAppRoute(route) {
2384
+ return route.interceptionMarker !== void 0 && route.interceptingRoute !== void 0 && route.interceptedRoute !== void 0;
2385
+ }
2386
+ function parseAppRoute(pathname, normalized) {
2387
+ const pathnameSegments = pathname.split("/").filter(Boolean);
2388
+ const segments = [];
2389
+ let interceptionMarker;
2390
+ let interceptingRoute;
2391
+ let interceptedRoute;
2392
+ for (const segment of pathnameSegments) {
2393
+ const appSegment = parseAppRouteSegment(segment);
2394
+ if (!appSegment) {
2395
+ continue;
2396
+ }
2397
+ if (normalized && (appSegment.type === "route-group" || appSegment.type === "parallel-route")) {
2398
+ throw Object.defineProperty(new _invarianterror.InvariantError(`${pathname} is being parsed as a normalized route, but it has a route group or parallel route segment.`), "__NEXT_ERROR_CODE", {
2399
+ value: "E923",
2400
+ enumerable: false,
2401
+ configurable: true
2402
+ });
2403
+ }
2404
+ segments.push(appSegment);
2405
+ if (appSegment.interceptionMarker) {
2406
+ const parts = pathname.split(appSegment.interceptionMarker);
2407
+ if (parts.length !== 2) {
2408
+ throw Object.defineProperty(new Error(`Invalid interception route: ${pathname}`), "__NEXT_ERROR_CODE", {
2409
+ value: "E924",
2410
+ enumerable: false,
2411
+ configurable: true
2412
+ });
2413
+ }
2414
+ interceptingRoute = normalized ? parseAppRoute(parts[0], true) : parseAppRoute(parts[0], false);
2415
+ interceptedRoute = normalized ? parseAppRoute(parts[1], true) : parseAppRoute(parts[1], false);
2416
+ interceptionMarker = appSegment.interceptionMarker;
2417
+ }
2418
+ }
2419
+ const dynamicSegments = segments.filter((segment) => segment.type === "dynamic");
2420
+ return {
2421
+ normalized,
2422
+ pathname,
2423
+ segments,
2424
+ dynamicSegments,
2425
+ interceptionMarker,
2426
+ interceptingRoute,
2427
+ interceptedRoute
2428
+ };
2429
+ }
2430
+ }
2431
+ });
2432
+
2433
+ // node_modules/next/dist/shared/lib/router/utils/interception-prefix-from-param-type.js
2434
+ var require_interception_prefix_from_param_type = __commonJS({
2435
+ "node_modules/next/dist/shared/lib/router/utils/interception-prefix-from-param-type.js"(exports$1) {
2436
+ Object.defineProperty(exports$1, "__esModule", {
2437
+ value: true
2438
+ });
2439
+ Object.defineProperty(exports$1, "interceptionPrefixFromParamType", {
2440
+ enumerable: true,
2441
+ get: function() {
2442
+ return interceptionPrefixFromParamType;
2443
+ }
2444
+ });
2445
+ function interceptionPrefixFromParamType(paramType) {
2446
+ switch (paramType) {
2447
+ case "catchall-intercepted-(..)(..)":
2448
+ case "dynamic-intercepted-(..)(..)":
2449
+ return "(..)(..)";
2450
+ case "catchall-intercepted-(.)":
2451
+ case "dynamic-intercepted-(.)":
2452
+ return "(.)";
2453
+ case "catchall-intercepted-(..)":
2454
+ case "dynamic-intercepted-(..)":
2455
+ return "(..)";
2456
+ case "catchall-intercepted-(...)":
2457
+ case "dynamic-intercepted-(...)":
2458
+ return "(...)";
2459
+ case "catchall":
2460
+ case "dynamic":
2461
+ case "optional-catchall":
2462
+ default:
2463
+ return null;
2464
+ }
2465
+ }
2466
+ }
2467
+ });
2468
+
2469
+ // node_modules/next/dist/shared/lib/router/utils/resolve-param-value.js
2470
+ var require_resolve_param_value = __commonJS({
2471
+ "node_modules/next/dist/shared/lib/router/utils/resolve-param-value.js"(exports$1) {
2472
+ Object.defineProperty(exports$1, "__esModule", {
2473
+ value: true
2474
+ });
2475
+ Object.defineProperty(exports$1, "resolveParamValue", {
2476
+ enumerable: true,
2477
+ get: function() {
2478
+ return resolveParamValue;
2479
+ }
2480
+ });
2481
+ var _invarianterror = require_invariant_error();
2482
+ var _interceptionprefixfromparamtype = require_interception_prefix_from_param_type();
2483
+ function getParamValueFromSegment(pathSegment, params, paramType) {
2484
+ if (pathSegment.type === "dynamic") {
2485
+ return params[pathSegment.param.paramName];
2486
+ }
2487
+ const interceptionPrefix = (0, _interceptionprefixfromparamtype.interceptionPrefixFromParamType)(paramType);
2488
+ if (interceptionPrefix === pathSegment.interceptionMarker) {
2489
+ return pathSegment.name.replace(pathSegment.interceptionMarker, "");
2490
+ }
2491
+ return pathSegment.name;
2492
+ }
2493
+ function resolveParamValue(paramName, paramType, depth, route, params) {
2494
+ switch (paramType) {
2495
+ case "catchall":
2496
+ case "optional-catchall":
2497
+ case "catchall-intercepted-(..)(..)":
2498
+ case "catchall-intercepted-(.)":
2499
+ case "catchall-intercepted-(..)":
2500
+ case "catchall-intercepted-(...)":
2501
+ const processedSegments = [];
2502
+ for (let index = depth; index < route.segments.length; index++) {
2503
+ const pathSegment = route.segments[index];
2504
+ if (pathSegment.type === "static") {
2505
+ let value = pathSegment.name;
2506
+ const interceptionPrefix = (0, _interceptionprefixfromparamtype.interceptionPrefixFromParamType)(paramType);
2507
+ if (interceptionPrefix && index === depth && interceptionPrefix === pathSegment.interceptionMarker) {
2508
+ value = value.replace(pathSegment.interceptionMarker, "");
2509
+ }
2510
+ processedSegments.push(value);
2511
+ } else {
2512
+ if (!params.hasOwnProperty(pathSegment.param.paramName)) {
2513
+ if (pathSegment.param.paramType === "optional-catchall") {
2514
+ break;
2515
+ }
2516
+ return void 0;
2517
+ }
2518
+ const paramValue = params[pathSegment.param.paramName];
2519
+ if (Array.isArray(paramValue)) {
2520
+ processedSegments.push(...paramValue);
2521
+ } else {
2522
+ processedSegments.push(paramValue);
2523
+ }
2524
+ }
2525
+ }
2526
+ if (processedSegments.length > 0) {
2527
+ return processedSegments;
2528
+ } else if (paramType === "optional-catchall") {
2529
+ return void 0;
2530
+ } else {
2531
+ throw Object.defineProperty(new _invarianterror.InvariantError(`Unexpected empty path segments match for a route "${route.pathname}" with param "${paramName}" of type "${paramType}"`), "__NEXT_ERROR_CODE", {
2532
+ value: "E931",
2533
+ enumerable: false,
2534
+ configurable: true
2535
+ });
2536
+ }
2537
+ case "dynamic":
2538
+ case "dynamic-intercepted-(..)(..)":
2539
+ case "dynamic-intercepted-(.)":
2540
+ case "dynamic-intercepted-(..)":
2541
+ case "dynamic-intercepted-(...)":
2542
+ if (depth < route.segments.length) {
2543
+ const pathSegment = route.segments[depth];
2544
+ if (pathSegment.type === "dynamic" && !params.hasOwnProperty(pathSegment.param.paramName)) {
2545
+ return void 0;
2546
+ }
2547
+ return getParamValueFromSegment(pathSegment, params, paramType);
2548
+ }
2549
+ return void 0;
2550
+ }
2551
+ }
2552
+ }
2553
+ });
2554
+
2555
+ // node_modules/next/dist/shared/lib/router/utils/get-dynamic-param.js
2556
+ var require_get_dynamic_param = __commonJS({
2557
+ "node_modules/next/dist/shared/lib/router/utils/get-dynamic-param.js"(exports$1) {
2558
+ Object.defineProperty(exports$1, "__esModule", {
2559
+ value: true
2560
+ });
2561
+ function _export(target, all) {
2562
+ for (var name in all) Object.defineProperty(target, name, {
2563
+ enumerable: true,
2564
+ get: all[name]
2565
+ });
2566
+ }
2567
+ _export(exports$1, {
2568
+ PARAMETER_PATTERN: function() {
2569
+ return PARAMETER_PATTERN;
2570
+ },
2571
+ getDynamicParam: function() {
2572
+ return getDynamicParam;
2573
+ },
2574
+ interpolateParallelRouteParams: function() {
2575
+ return interpolateParallelRouteParams;
2576
+ },
2577
+ parseMatchedParameter: function() {
2578
+ return parseMatchedParameter;
2579
+ },
2580
+ parseParameter: function() {
2581
+ return parseParameter;
2582
+ }
2583
+ });
2584
+ var _invarianterror = require_invariant_error();
2585
+ var _parseloadertree = require_parse_loader_tree();
2586
+ var _app = require_app();
2587
+ var _resolveparamvalue = require_resolve_param_value();
2588
+ function getParamValue(interpolatedParams, segmentKey, fallbackRouteParams) {
2589
+ let value = interpolatedParams[segmentKey];
2590
+ if (fallbackRouteParams?.has(segmentKey)) {
2591
+ const [searchValue] = fallbackRouteParams.get(segmentKey);
2592
+ value = searchValue;
2593
+ } else if (Array.isArray(value)) {
2594
+ value = value.map((i) => encodeURIComponent(i));
2595
+ } else if (typeof value === "string") {
2596
+ value = encodeURIComponent(value);
2597
+ }
2598
+ return value;
2599
+ }
2600
+ function interpolateParallelRouteParams(loaderTree, params, pagePath, fallbackRouteParams) {
2601
+ const interpolated = structuredClone(params);
2602
+ const stack = [
2603
+ {
2604
+ tree: loaderTree,
2605
+ depth: 0
2606
+ }
2607
+ ];
2608
+ const route = (0, _app.parseAppRoute)(pagePath, true);
2609
+ while (stack.length > 0) {
2610
+ const { tree, depth } = stack.pop();
2611
+ const { segment, parallelRoutes } = (0, _parseloadertree.parseLoaderTree)(tree);
2612
+ const appSegment = (0, _app.parseAppRouteSegment)(segment);
2613
+ if (appSegment?.type === "dynamic" && !interpolated.hasOwnProperty(appSegment.param.paramName) && // If the param is in the fallback route params, we don't need to
2614
+ // interpolate it because it's already marked as being unknown.
2615
+ !fallbackRouteParams?.has(appSegment.param.paramName)) {
2616
+ const { paramName, paramType } = appSegment.param;
2617
+ const paramValue = (0, _resolveparamvalue.resolveParamValue)(paramName, paramType, depth, route, interpolated);
2618
+ if (paramValue !== void 0) {
2619
+ interpolated[paramName] = paramValue;
2620
+ } else if (paramType !== "optional-catchall") {
2621
+ throw Object.defineProperty(new _invarianterror.InvariantError(`Could not resolve param value for segment: ${paramName}`), "__NEXT_ERROR_CODE", {
2622
+ value: "E932",
2623
+ enumerable: false,
2624
+ configurable: true
2625
+ });
2626
+ }
2627
+ }
2628
+ let nextDepth = depth;
2629
+ if (appSegment && appSegment.type !== "route-group" && appSegment.type !== "parallel-route") {
2630
+ nextDepth++;
2631
+ }
2632
+ for (const parallelRoute of Object.values(parallelRoutes)) {
2633
+ stack.push({
2634
+ tree: parallelRoute,
2635
+ depth: nextDepth
2636
+ });
2637
+ }
2638
+ }
2639
+ return interpolated;
2640
+ }
2641
+ function getDynamicParam(interpolatedParams, segmentKey, dynamicParamType, fallbackRouteParams) {
2642
+ let value = getParamValue(interpolatedParams, segmentKey, fallbackRouteParams);
2643
+ if (!value || value.length === 0) {
2644
+ if (dynamicParamType === "oc") {
2645
+ return {
2646
+ param: segmentKey,
2647
+ value: null,
2648
+ type: dynamicParamType,
2649
+ treeSegment: [
2650
+ segmentKey,
2651
+ "",
2652
+ dynamicParamType
2653
+ ]
2654
+ };
2655
+ }
2656
+ throw Object.defineProperty(new _invarianterror.InvariantError(`Missing value for segment key: "${segmentKey}" with dynamic param type: ${dynamicParamType}`), "__NEXT_ERROR_CODE", {
2657
+ value: "E864",
2658
+ enumerable: false,
2659
+ configurable: true
2660
+ });
2661
+ }
2662
+ return {
2663
+ param: segmentKey,
2664
+ // The value that is passed to user code.
2665
+ value,
2666
+ // The value that is rendered in the router tree.
2667
+ treeSegment: [
2668
+ segmentKey,
2669
+ Array.isArray(value) ? value.join("/") : value,
2670
+ dynamicParamType
2671
+ ],
2672
+ type: dynamicParamType
2673
+ };
2674
+ }
2675
+ var PARAMETER_PATTERN = /^([^[]*)\[((?:\[[^\]]*\])|[^\]]+)\](.*)$/;
2676
+ function parseParameter(param) {
2677
+ const match = param.match(PARAMETER_PATTERN);
2678
+ if (!match) {
2679
+ return parseMatchedParameter(param);
2680
+ }
2681
+ return parseMatchedParameter(match[2]);
2682
+ }
2683
+ function parseMatchedParameter(param) {
2684
+ const optional = param.startsWith("[") && param.endsWith("]");
2685
+ if (optional) {
2686
+ param = param.slice(1, -1);
2687
+ }
2688
+ const repeat = param.startsWith("...");
2689
+ if (repeat) {
2690
+ param = param.slice(3);
2691
+ }
2692
+ return {
2693
+ key: param,
2694
+ repeat,
2695
+ optional
2696
+ };
2697
+ }
2698
+ }
2699
+ });
2700
+
2701
+ // node_modules/next/dist/shared/lib/router/utils/route-regex.js
2702
+ var require_route_regex = __commonJS({
2703
+ "node_modules/next/dist/shared/lib/router/utils/route-regex.js"(exports$1) {
2704
+ Object.defineProperty(exports$1, "__esModule", {
2705
+ value: true
2706
+ });
2707
+ function _export(target, all) {
2708
+ for (var name in all) Object.defineProperty(target, name, {
2709
+ enumerable: true,
2710
+ get: all[name]
2711
+ });
2712
+ }
2713
+ _export(exports$1, {
2714
+ getNamedMiddlewareRegex: function() {
2715
+ return getNamedMiddlewareRegex;
2716
+ },
2717
+ getNamedRouteRegex: function() {
2718
+ return getNamedRouteRegex;
2719
+ },
2720
+ getRouteRegex: function() {
2721
+ return getRouteRegex;
2722
+ }
2723
+ });
2724
+ var _constants = require_constants();
2725
+ var _interceptionroutes = require_interception_routes();
2726
+ var _escaperegexp = require_escape_regexp();
2727
+ var _removetrailingslash = require_remove_trailing_slash();
2728
+ var _getdynamicparam = require_get_dynamic_param();
2729
+ function getParametrizedRoute(route, includeSuffix, includePrefix) {
2730
+ const groups = {};
2731
+ let groupIndex = 1;
2732
+ const segments = [];
2733
+ for (const segment of (0, _removetrailingslash.removeTrailingSlash)(route).slice(1).split("/")) {
2734
+ const markerMatch = _interceptionroutes.INTERCEPTION_ROUTE_MARKERS.find((m) => segment.startsWith(m));
2735
+ const paramMatches = segment.match(_getdynamicparam.PARAMETER_PATTERN);
2736
+ if (markerMatch && paramMatches && paramMatches[2]) {
2737
+ const { key, optional, repeat } = (0, _getdynamicparam.parseMatchedParameter)(paramMatches[2]);
2738
+ groups[key] = {
2739
+ pos: groupIndex++,
2740
+ repeat,
2741
+ optional
2742
+ };
2743
+ segments.push(`/${(0, _escaperegexp.escapeStringRegexp)(markerMatch)}([^/]+?)`);
2744
+ } else if (paramMatches && paramMatches[2]) {
2745
+ const { key, repeat, optional } = (0, _getdynamicparam.parseMatchedParameter)(paramMatches[2]);
2746
+ groups[key] = {
2747
+ pos: groupIndex++,
2748
+ repeat,
2749
+ optional
2750
+ };
2751
+ if (includePrefix && paramMatches[1]) {
2752
+ segments.push(`/${(0, _escaperegexp.escapeStringRegexp)(paramMatches[1])}`);
2753
+ }
2754
+ let s = repeat ? optional ? "(?:/(.+?))?" : "/(.+?)" : "/([^/]+?)";
2755
+ if (includePrefix && paramMatches[1]) {
2756
+ s = s.substring(1);
2757
+ }
2758
+ segments.push(s);
2759
+ } else {
2760
+ segments.push(`/${(0, _escaperegexp.escapeStringRegexp)(segment)}`);
2761
+ }
2762
+ if (includeSuffix && paramMatches && paramMatches[3]) {
2763
+ segments.push((0, _escaperegexp.escapeStringRegexp)(paramMatches[3]));
2764
+ }
2765
+ }
2766
+ return {
2767
+ parameterizedRoute: segments.join(""),
2768
+ groups
2769
+ };
2770
+ }
2771
+ function getRouteRegex(normalizedRoute, { includeSuffix = false, includePrefix = false, excludeOptionalTrailingSlash = false } = {}) {
2772
+ const { parameterizedRoute, groups } = getParametrizedRoute(normalizedRoute, includeSuffix, includePrefix);
2773
+ let re = parameterizedRoute;
2774
+ if (!excludeOptionalTrailingSlash) {
2775
+ re += "(?:/)?";
2776
+ }
2777
+ return {
2778
+ re: new RegExp(`^${re}$`),
2779
+ groups
2780
+ };
2781
+ }
2782
+ function buildGetSafeRouteKey() {
2783
+ let i = 0;
2784
+ return () => {
2785
+ let routeKey = "";
2786
+ let j = ++i;
2787
+ while (j > 0) {
2788
+ routeKey += String.fromCharCode(97 + (j - 1) % 26);
2789
+ j = Math.floor((j - 1) / 26);
2790
+ }
2791
+ return routeKey;
2792
+ };
2793
+ }
2794
+ function getSafeKeyFromSegment({ interceptionMarker, getSafeRouteKey, segment, routeKeys, keyPrefix, backreferenceDuplicateKeys }) {
2795
+ const { key, optional, repeat } = (0, _getdynamicparam.parseMatchedParameter)(segment);
2796
+ let cleanedKey = key.replace(/\W/g, "");
2797
+ if (keyPrefix) {
2798
+ cleanedKey = `${keyPrefix}${cleanedKey}`;
2799
+ }
2800
+ let invalidKey = false;
2801
+ if (cleanedKey.length === 0 || cleanedKey.length > 30) {
2802
+ invalidKey = true;
2803
+ }
2804
+ if (!isNaN(parseInt(cleanedKey.slice(0, 1)))) {
2805
+ invalidKey = true;
2806
+ }
2807
+ if (invalidKey) {
2808
+ cleanedKey = getSafeRouteKey();
2809
+ }
2810
+ const duplicateKey = cleanedKey in routeKeys;
2811
+ if (keyPrefix) {
2812
+ routeKeys[cleanedKey] = `${keyPrefix}${key}`;
2813
+ } else {
2814
+ routeKeys[cleanedKey] = key;
2815
+ }
2816
+ const interceptionPrefix = interceptionMarker ? (0, _escaperegexp.escapeStringRegexp)(interceptionMarker) : "";
2817
+ let pattern;
2818
+ if (duplicateKey && backreferenceDuplicateKeys) {
2819
+ pattern = `\\k<${cleanedKey}>`;
2820
+ } else if (repeat) {
2821
+ pattern = `(?<${cleanedKey}>.+?)`;
2822
+ } else {
2823
+ pattern = `(?<${cleanedKey}>[^/]+?)`;
2824
+ }
2825
+ return {
2826
+ key,
2827
+ pattern: optional ? `(?:/${interceptionPrefix}${pattern})?` : `/${interceptionPrefix}${pattern}`,
2828
+ cleanedKey,
2829
+ optional,
2830
+ repeat
2831
+ };
2832
+ }
2833
+ function getNamedParametrizedRoute(route, prefixRouteKeys, includeSuffix, includePrefix, backreferenceDuplicateKeys, reference = {
2834
+ names: {},
2835
+ intercepted: {}
2836
+ }) {
2837
+ var _a, _b;
2838
+ const getSafeRouteKey = buildGetSafeRouteKey();
2839
+ const routeKeys = {};
2840
+ const segments = [];
2841
+ const inverseParts = [];
2842
+ reference = structuredClone(reference);
2843
+ for (const segment of (0, _removetrailingslash.removeTrailingSlash)(route).slice(1).split("/")) {
2844
+ const hasInterceptionMarker = _interceptionroutes.INTERCEPTION_ROUTE_MARKERS.some((m) => segment.startsWith(m));
2845
+ const paramMatches = segment.match(_getdynamicparam.PARAMETER_PATTERN);
2846
+ const interceptionMarker = hasInterceptionMarker ? paramMatches?.[1] : void 0;
2847
+ let keyPrefix;
2848
+ if (interceptionMarker && paramMatches?.[2]) {
2849
+ keyPrefix = prefixRouteKeys ? _constants.NEXT_INTERCEPTION_MARKER_PREFIX : void 0;
2850
+ reference.intercepted[paramMatches[2]] = interceptionMarker;
2851
+ } else if (paramMatches?.[2] && reference.intercepted[paramMatches[2]]) {
2852
+ keyPrefix = prefixRouteKeys ? _constants.NEXT_INTERCEPTION_MARKER_PREFIX : void 0;
2853
+ } else {
2854
+ keyPrefix = prefixRouteKeys ? _constants.NEXT_QUERY_PARAM_PREFIX : void 0;
2855
+ }
2856
+ if (interceptionMarker && paramMatches && paramMatches[2]) {
2857
+ const { key, pattern, cleanedKey, repeat, optional } = getSafeKeyFromSegment({
2858
+ getSafeRouteKey,
2859
+ interceptionMarker,
2860
+ segment: paramMatches[2],
2861
+ routeKeys,
2862
+ keyPrefix,
2863
+ backreferenceDuplicateKeys
2864
+ });
2865
+ segments.push(pattern);
2866
+ inverseParts.push(`/${paramMatches[1]}:${reference.names[key] ?? cleanedKey}${repeat ? optional ? "*" : "+" : ""}`);
2867
+ (_a = reference.names)[key] ?? (_a[key] = cleanedKey);
2868
+ } else if (paramMatches && paramMatches[2]) {
2869
+ if (includePrefix && paramMatches[1]) {
2870
+ segments.push(`/${(0, _escaperegexp.escapeStringRegexp)(paramMatches[1])}`);
2871
+ inverseParts.push(`/${paramMatches[1]}`);
2872
+ }
2873
+ const { key, pattern, cleanedKey, repeat, optional } = getSafeKeyFromSegment({
2874
+ getSafeRouteKey,
2875
+ segment: paramMatches[2],
2876
+ routeKeys,
2877
+ keyPrefix,
2878
+ backreferenceDuplicateKeys
2879
+ });
2880
+ let s = pattern;
2881
+ if (includePrefix && paramMatches[1]) {
2882
+ s = s.substring(1);
2883
+ }
2884
+ segments.push(s);
2885
+ inverseParts.push(`/:${reference.names[key] ?? cleanedKey}${repeat ? optional ? "*" : "+" : ""}`);
2886
+ (_b = reference.names)[key] ?? (_b[key] = cleanedKey);
2887
+ } else {
2888
+ segments.push(`/${(0, _escaperegexp.escapeStringRegexp)(segment)}`);
2889
+ inverseParts.push(`/${segment}`);
2890
+ }
2891
+ if (includeSuffix && paramMatches && paramMatches[3]) {
2892
+ segments.push((0, _escaperegexp.escapeStringRegexp)(paramMatches[3]));
2893
+ inverseParts.push(paramMatches[3]);
2894
+ }
2895
+ }
2896
+ return {
2897
+ namedParameterizedRoute: segments.join(""),
2898
+ routeKeys,
2899
+ pathToRegexpPattern: inverseParts.join(""),
2900
+ reference
2901
+ };
2902
+ }
2903
+ function getNamedRouteRegex(normalizedRoute, options) {
2904
+ const result = getNamedParametrizedRoute(normalizedRoute, options.prefixRouteKeys, options.includeSuffix ?? false, options.includePrefix ?? false, options.backreferenceDuplicateKeys ?? false, options.reference);
2905
+ let namedRegex = result.namedParameterizedRoute;
2906
+ if (!options.excludeOptionalTrailingSlash) {
2907
+ namedRegex += "(?:/)?";
2908
+ }
2909
+ return {
2910
+ ...getRouteRegex(normalizedRoute, options),
2911
+ namedRegex: `^${namedRegex}$`,
2912
+ routeKeys: result.routeKeys,
2913
+ pathToRegexpPattern: result.pathToRegexpPattern,
2914
+ reference: result.reference
2915
+ };
2916
+ }
2917
+ function getNamedMiddlewareRegex(normalizedRoute, options) {
2918
+ const { parameterizedRoute } = getParametrizedRoute(normalizedRoute, false, false);
2919
+ const { catchAll = true } = options;
2920
+ if (parameterizedRoute === "/") {
2921
+ let catchAllRegex = catchAll ? ".*" : "";
2922
+ return {
2923
+ namedRegex: `^/${catchAllRegex}$`
2924
+ };
2925
+ }
2926
+ const { namedParameterizedRoute } = getNamedParametrizedRoute(normalizedRoute, false, false, false, false, void 0);
2927
+ let catchAllGroupedRegex = catchAll ? "(?:(/.*)?)" : "";
2928
+ return {
2929
+ namedRegex: `^${namedParameterizedRoute}${catchAllGroupedRegex}$`
2930
+ };
2931
+ }
2932
+ }
2933
+ });
2934
+
2935
+ // node_modules/next/dist/shared/lib/router/utils/interpolate-as.js
2936
+ var require_interpolate_as = __commonJS({
2937
+ "node_modules/next/dist/shared/lib/router/utils/interpolate-as.js"(exports$1) {
2938
+ Object.defineProperty(exports$1, "__esModule", {
2939
+ value: true
2940
+ });
2941
+ Object.defineProperty(exports$1, "interpolateAs", {
2942
+ enumerable: true,
2943
+ get: function() {
2944
+ return interpolateAs;
2945
+ }
2946
+ });
2947
+ var _routematcher = require_route_matcher();
2948
+ var _routeregex = require_route_regex();
2949
+ function interpolateAs(route, asPathname, query) {
2950
+ let interpolatedRoute = "";
2951
+ const dynamicRegex = (0, _routeregex.getRouteRegex)(route);
2952
+ const dynamicGroups = dynamicRegex.groups;
2953
+ const dynamicMatches = (
2954
+ // Try to match the dynamic route against the asPath
2955
+ (asPathname !== route ? (0, _routematcher.getRouteMatcher)(dynamicRegex)(asPathname) : "") || // Fall back to reading the values from the href
2956
+ // TODO: should this take priority; also need to change in the router.
2957
+ query
2958
+ );
2959
+ interpolatedRoute = route;
2960
+ const params = Object.keys(dynamicGroups);
2961
+ if (!params.every((param) => {
2962
+ let value = dynamicMatches[param] || "";
2963
+ const { repeat, optional } = dynamicGroups[param];
2964
+ let replaced = `[${repeat ? "..." : ""}${param}]`;
2965
+ if (optional) {
2966
+ replaced = `${!value ? "/" : ""}[${replaced}]`;
2967
+ }
2968
+ if (repeat && !Array.isArray(value)) value = [
2969
+ value
2970
+ ];
2971
+ return (optional || param in dynamicMatches) && // Interpolate group into data URL if present
2972
+ (interpolatedRoute = interpolatedRoute.replace(replaced, repeat ? value.map(
2973
+ // these values should be fully encoded instead of just
2974
+ // path delimiter escaped since they are being inserted
2975
+ // into the URL and we expect URL encoded segments
2976
+ // when parsing dynamic route params
2977
+ (segment) => encodeURIComponent(segment)
2978
+ ).join("/") : encodeURIComponent(value)) || "/");
2979
+ })) {
2980
+ interpolatedRoute = "";
2981
+ }
2982
+ return {
2983
+ params,
2984
+ result: interpolatedRoute
2985
+ };
2986
+ }
2987
+ }
2988
+ });
2989
+
2990
+ // node_modules/next/dist/client/resolve-href.js
2991
+ var require_resolve_href = __commonJS({
2992
+ "node_modules/next/dist/client/resolve-href.js"(exports$1, module) {
2993
+ Object.defineProperty(exports$1, "__esModule", {
2994
+ value: true
2995
+ });
2996
+ Object.defineProperty(exports$1, "resolveHref", {
2997
+ enumerable: true,
2998
+ get: function() {
2999
+ return resolveHref;
3000
+ }
3001
+ });
3002
+ var _querystring = require_querystring();
3003
+ var _formaturl = require_format_url();
3004
+ var _omit = require_omit();
3005
+ var _utils = require_utils();
3006
+ var _normalizetrailingslash = require_normalize_trailing_slash();
3007
+ var _islocalurl = require_is_local_url();
3008
+ var _utils1 = require_utils2();
3009
+ var _interpolateas = require_interpolate_as();
3010
+ var _routeregex = require_route_regex();
3011
+ var _routematcher = require_route_matcher();
3012
+ function resolveHref(router, href, resolveAs) {
3013
+ let base;
3014
+ let urlAsString = typeof href === "string" ? href : (0, _formaturl.formatWithValidation)(href);
3015
+ const urlProtoMatch = urlAsString.match(/^[a-z][a-z0-9+.-]*:\/\//i);
3016
+ const urlAsStringNoProto = urlProtoMatch ? urlAsString.slice(urlProtoMatch[0].length) : urlAsString;
3017
+ const urlParts = urlAsStringNoProto.split("?", 1);
3018
+ if ((urlParts[0] || "").match(/(\/\/|\\)/)) {
3019
+ console.error(`Invalid href '${urlAsString}' passed to next/router in page: '${router.pathname}'. Repeated forward-slashes (//) or backslashes \\ are not valid in the href.`);
3020
+ const normalizedUrl = (0, _utils.normalizeRepeatedSlashes)(urlAsStringNoProto);
3021
+ urlAsString = (urlProtoMatch ? urlProtoMatch[0] : "") + normalizedUrl;
3022
+ }
3023
+ if (!(0, _islocalurl.isLocalURL)(urlAsString)) {
3024
+ return resolveAs ? [
3025
+ urlAsString
3026
+ ] : urlAsString;
3027
+ }
3028
+ try {
3029
+ let baseBase = urlAsString.startsWith("#") ? router.asPath : router.pathname;
3030
+ if (urlAsString.startsWith("?")) {
3031
+ baseBase = router.asPath;
3032
+ if ((0, _utils1.isDynamicRoute)(router.pathname)) {
3033
+ baseBase = router.pathname;
3034
+ const routeRegex = (0, _routeregex.getRouteRegex)(router.pathname);
3035
+ const match = (0, _routematcher.getRouteMatcher)(routeRegex)(router.asPath);
3036
+ if (!match) {
3037
+ baseBase = router.asPath;
3038
+ }
3039
+ }
3040
+ }
3041
+ base = new URL(baseBase, "http://n");
3042
+ } catch (_) {
3043
+ base = new URL("/", "http://n");
3044
+ }
3045
+ try {
3046
+ const finalUrl = new URL(urlAsString, base);
3047
+ finalUrl.pathname = (0, _normalizetrailingslash.normalizePathTrailingSlash)(finalUrl.pathname);
3048
+ let interpolatedAs = "";
3049
+ if ((0, _utils1.isDynamicRoute)(finalUrl.pathname) && finalUrl.searchParams && resolveAs) {
3050
+ const query = (0, _querystring.searchParamsToUrlQuery)(finalUrl.searchParams);
3051
+ const { result, params } = (0, _interpolateas.interpolateAs)(finalUrl.pathname, finalUrl.pathname, query);
3052
+ if (result) {
3053
+ interpolatedAs = (0, _formaturl.formatWithValidation)({
3054
+ pathname: result,
3055
+ hash: finalUrl.hash,
3056
+ query: (0, _omit.omit)(query, params)
3057
+ });
3058
+ }
3059
+ }
3060
+ const resolvedHref = finalUrl.origin === base.origin ? finalUrl.href.slice(finalUrl.origin.length) : finalUrl.href;
3061
+ return resolveAs ? [
3062
+ resolvedHref,
3063
+ interpolatedAs || resolvedHref
3064
+ ] : resolvedHref;
3065
+ } catch (_) {
3066
+ return resolveAs ? [
3067
+ urlAsString
3068
+ ] : urlAsString;
3069
+ }
3070
+ }
3071
+ if ((typeof exports$1.default === "function" || typeof exports$1.default === "object" && exports$1.default !== null) && typeof exports$1.default.__esModule === "undefined") {
3072
+ Object.defineProperty(exports$1.default, "__esModule", { value: true });
3073
+ Object.assign(exports$1.default, exports$1);
3074
+ module.exports = exports$1.default;
3075
+ }
3076
+ }
3077
+ });
3078
+
3079
+ // node_modules/next/dist/shared/lib/router/utils/add-path-prefix.js
3080
+ var require_add_path_prefix = __commonJS({
3081
+ "node_modules/next/dist/shared/lib/router/utils/add-path-prefix.js"(exports$1) {
3082
+ Object.defineProperty(exports$1, "__esModule", {
3083
+ value: true
3084
+ });
3085
+ Object.defineProperty(exports$1, "addPathPrefix", {
3086
+ enumerable: true,
3087
+ get: function() {
3088
+ return addPathPrefix;
3089
+ }
3090
+ });
3091
+ var _parsepath = require_parse_path();
3092
+ function addPathPrefix(path, prefix) {
3093
+ if (!path.startsWith("/") || !prefix) {
3094
+ return path;
3095
+ }
3096
+ const { pathname, query, hash } = (0, _parsepath.parsePath)(path);
3097
+ return `${prefix}${pathname}${query}${hash}`;
3098
+ }
3099
+ }
3100
+ });
3101
+
3102
+ // node_modules/next/dist/shared/lib/router/utils/add-locale.js
3103
+ var require_add_locale = __commonJS({
3104
+ "node_modules/next/dist/shared/lib/router/utils/add-locale.js"(exports$1) {
3105
+ Object.defineProperty(exports$1, "__esModule", {
3106
+ value: true
3107
+ });
3108
+ Object.defineProperty(exports$1, "addLocale", {
3109
+ enumerable: true,
3110
+ get: function() {
3111
+ return addLocale;
3112
+ }
3113
+ });
3114
+ var _addpathprefix = require_add_path_prefix();
3115
+ var _pathhasprefix = require_path_has_prefix();
3116
+ function addLocale(path, locale, defaultLocale, ignorePrefix) {
3117
+ if (!locale || locale === defaultLocale) return path;
3118
+ const lower = path.toLowerCase();
3119
+ if (!ignorePrefix) {
3120
+ if ((0, _pathhasprefix.pathHasPrefix)(lower, "/api")) return path;
3121
+ if ((0, _pathhasprefix.pathHasPrefix)(lower, `/${locale.toLowerCase()}`)) return path;
3122
+ }
3123
+ return (0, _addpathprefix.addPathPrefix)(path, `/${locale}`);
3124
+ }
3125
+ }
3126
+ });
3127
+
3128
+ // node_modules/next/dist/client/add-locale.js
3129
+ var require_add_locale2 = __commonJS({
3130
+ "node_modules/next/dist/client/add-locale.js"(exports$1, module) {
3131
+ Object.defineProperty(exports$1, "__esModule", {
3132
+ value: true
3133
+ });
3134
+ Object.defineProperty(exports$1, "addLocale", {
3135
+ enumerable: true,
3136
+ get: function() {
3137
+ return addLocale;
3138
+ }
3139
+ });
3140
+ var _normalizetrailingslash = require_normalize_trailing_slash();
3141
+ var addLocale = (path, ...args) => {
3142
+ if (process.env.__NEXT_I18N_SUPPORT) {
3143
+ return (0, _normalizetrailingslash.normalizePathTrailingSlash)(require_add_locale().addLocale(path, ...args));
3144
+ }
3145
+ return path;
3146
+ };
3147
+ if ((typeof exports$1.default === "function" || typeof exports$1.default === "object" && exports$1.default !== null) && typeof exports$1.default.__esModule === "undefined") {
3148
+ Object.defineProperty(exports$1.default, "__esModule", { value: true });
3149
+ Object.assign(exports$1.default, exports$1);
3150
+ module.exports = exports$1.default;
3151
+ }
3152
+ }
3153
+ });
3154
+
3155
+ // node_modules/@swc/helpers/cjs/_interop_require_default.cjs
3156
+ var require_interop_require_default = __commonJS({
3157
+ "node_modules/@swc/helpers/cjs/_interop_require_default.cjs"(exports$1) {
3158
+ function _interop_require_default(obj) {
3159
+ return obj && obj.__esModule ? obj : { default: obj };
3160
+ }
3161
+ exports$1._ = _interop_require_default;
3162
+ }
3163
+ });
3164
+
3165
+ // node_modules/next/dist/shared/lib/router-context.shared-runtime.js
3166
+ var require_router_context_shared_runtime = __commonJS({
3167
+ "node_modules/next/dist/shared/lib/router-context.shared-runtime.js"(exports$1) {
3168
+ Object.defineProperty(exports$1, "__esModule", {
3169
+ value: true
3170
+ });
3171
+ Object.defineProperty(exports$1, "RouterContext", {
3172
+ enumerable: true,
3173
+ get: function() {
3174
+ return RouterContext;
3175
+ }
3176
+ });
3177
+ var _interop_require_default = require_interop_require_default();
3178
+ var _react = /* @__PURE__ */ _interop_require_default._(__require("react"));
3179
+ var RouterContext = _react.default.createContext(null);
3180
+ if (process.env.NODE_ENV !== "production") {
3181
+ RouterContext.displayName = "RouterContext";
3182
+ }
3183
+ }
3184
+ });
3185
+
3186
+ // node_modules/next/dist/client/request-idle-callback.js
3187
+ var require_request_idle_callback = __commonJS({
3188
+ "node_modules/next/dist/client/request-idle-callback.js"(exports$1, module) {
3189
+ Object.defineProperty(exports$1, "__esModule", {
3190
+ value: true
3191
+ });
3192
+ function _export(target, all) {
3193
+ for (var name in all) Object.defineProperty(target, name, {
3194
+ enumerable: true,
3195
+ get: all[name]
3196
+ });
3197
+ }
3198
+ _export(exports$1, {
3199
+ cancelIdleCallback: function() {
3200
+ return cancelIdleCallback;
3201
+ },
3202
+ requestIdleCallback: function() {
3203
+ return requestIdleCallback;
3204
+ }
3205
+ });
3206
+ var requestIdleCallback = typeof self !== "undefined" && self.requestIdleCallback && self.requestIdleCallback.bind(window) || function(cb) {
3207
+ let start = Date.now();
3208
+ return self.setTimeout(function() {
3209
+ cb({
3210
+ didTimeout: false,
3211
+ timeRemaining: function() {
3212
+ return Math.max(0, 50 - (Date.now() - start));
3213
+ }
3214
+ });
3215
+ }, 1);
3216
+ };
3217
+ var cancelIdleCallback = typeof self !== "undefined" && self.cancelIdleCallback && self.cancelIdleCallback.bind(window) || function(id) {
3218
+ return clearTimeout(id);
3219
+ };
3220
+ if ((typeof exports$1.default === "function" || typeof exports$1.default === "object" && exports$1.default !== null) && typeof exports$1.default.__esModule === "undefined") {
3221
+ Object.defineProperty(exports$1.default, "__esModule", { value: true });
3222
+ Object.assign(exports$1.default, exports$1);
3223
+ module.exports = exports$1.default;
3224
+ }
3225
+ }
3226
+ });
3227
+
3228
+ // node_modules/next/dist/client/use-intersection.js
3229
+ var require_use_intersection = __commonJS({
3230
+ "node_modules/next/dist/client/use-intersection.js"(exports$1, module) {
3231
+ Object.defineProperty(exports$1, "__esModule", {
3232
+ value: true
3233
+ });
3234
+ Object.defineProperty(exports$1, "useIntersection", {
3235
+ enumerable: true,
3236
+ get: function() {
3237
+ return useIntersection;
3238
+ }
3239
+ });
3240
+ var _react = __require("react");
3241
+ var _requestidlecallback = require_request_idle_callback();
3242
+ var hasIntersectionObserver = typeof IntersectionObserver === "function";
3243
+ var observers = /* @__PURE__ */ new Map();
3244
+ var idList = [];
3245
+ function createObserver(options) {
3246
+ const id = {
3247
+ root: options.root || null,
3248
+ margin: options.rootMargin || ""
3249
+ };
3250
+ const existing = idList.find((obj) => obj.root === id.root && obj.margin === id.margin);
3251
+ let instance;
3252
+ if (existing) {
3253
+ instance = observers.get(existing);
3254
+ if (instance) {
3255
+ return instance;
3256
+ }
3257
+ }
3258
+ const elements = /* @__PURE__ */ new Map();
3259
+ const observer = new IntersectionObserver((entries) => {
3260
+ entries.forEach((entry) => {
3261
+ const callback = elements.get(entry.target);
3262
+ const isVisible = entry.isIntersecting || entry.intersectionRatio > 0;
3263
+ if (callback && isVisible) {
3264
+ callback(isVisible);
3265
+ }
3266
+ });
3267
+ }, options);
3268
+ instance = {
3269
+ id,
3270
+ observer,
3271
+ elements
3272
+ };
3273
+ idList.push(id);
3274
+ observers.set(id, instance);
3275
+ return instance;
3276
+ }
3277
+ function observe(element, callback, options) {
3278
+ const { id, observer, elements } = createObserver(options);
3279
+ elements.set(element, callback);
3280
+ observer.observe(element);
3281
+ return function unobserve() {
3282
+ elements.delete(element);
3283
+ observer.unobserve(element);
3284
+ if (elements.size === 0) {
3285
+ observer.disconnect();
3286
+ observers.delete(id);
3287
+ const index = idList.findIndex((obj) => obj.root === id.root && obj.margin === id.margin);
3288
+ if (index > -1) {
3289
+ idList.splice(index, 1);
3290
+ }
3291
+ }
3292
+ };
3293
+ }
3294
+ function useIntersection({ rootRef, rootMargin, disabled }) {
3295
+ const isDisabled = disabled || !hasIntersectionObserver;
3296
+ const [visible, setVisible] = (0, _react.useState)(false);
3297
+ const elementRef = (0, _react.useRef)(null);
3298
+ const setElement = (0, _react.useCallback)((element) => {
3299
+ elementRef.current = element;
3300
+ }, []);
3301
+ (0, _react.useEffect)(() => {
3302
+ if (hasIntersectionObserver) {
3303
+ if (isDisabled || visible) return;
3304
+ const element = elementRef.current;
3305
+ if (element && element.tagName) {
3306
+ const unobserve = observe(element, (isVisible) => isVisible && setVisible(isVisible), {
3307
+ root: rootRef?.current,
3308
+ rootMargin
3309
+ });
3310
+ return unobserve;
3311
+ }
3312
+ } else {
3313
+ if (!visible) {
3314
+ const idleCallback = (0, _requestidlecallback.requestIdleCallback)(() => setVisible(true));
3315
+ return () => (0, _requestidlecallback.cancelIdleCallback)(idleCallback);
3316
+ }
3317
+ }
3318
+ }, [
3319
+ isDisabled,
3320
+ rootMargin,
3321
+ rootRef,
3322
+ visible,
3323
+ elementRef.current
3324
+ ]);
3325
+ const resetVisible = (0, _react.useCallback)(() => {
3326
+ setVisible(false);
3327
+ }, []);
3328
+ return [
3329
+ setElement,
3330
+ visible,
3331
+ resetVisible
3332
+ ];
3333
+ }
3334
+ if ((typeof exports$1.default === "function" || typeof exports$1.default === "object" && exports$1.default !== null) && typeof exports$1.default.__esModule === "undefined") {
3335
+ Object.defineProperty(exports$1.default, "__esModule", { value: true });
3336
+ Object.assign(exports$1.default, exports$1);
3337
+ module.exports = exports$1.default;
3338
+ }
3339
+ }
3340
+ });
3341
+
3342
+ // node_modules/next/dist/shared/lib/i18n/normalize-locale-path.js
3343
+ var require_normalize_locale_path = __commonJS({
3344
+ "node_modules/next/dist/shared/lib/i18n/normalize-locale-path.js"(exports$1) {
3345
+ Object.defineProperty(exports$1, "__esModule", {
3346
+ value: true
3347
+ });
3348
+ Object.defineProperty(exports$1, "normalizeLocalePath", {
3349
+ enumerable: true,
3350
+ get: function() {
3351
+ return normalizeLocalePath;
3352
+ }
3353
+ });
3354
+ var cache = /* @__PURE__ */ new WeakMap();
3355
+ function normalizeLocalePath(pathname, locales) {
3356
+ if (!locales) return {
3357
+ pathname
3358
+ };
3359
+ let lowercasedLocales = cache.get(locales);
3360
+ if (!lowercasedLocales) {
3361
+ lowercasedLocales = locales.map((locale) => locale.toLowerCase());
3362
+ cache.set(locales, lowercasedLocales);
3363
+ }
3364
+ let detectedLocale;
3365
+ const segments = pathname.split("/", 2);
3366
+ if (!segments[1]) return {
3367
+ pathname
3368
+ };
3369
+ const segment = segments[1].toLowerCase();
3370
+ const index = lowercasedLocales.indexOf(segment);
3371
+ if (index < 0) return {
3372
+ pathname
3373
+ };
3374
+ detectedLocale = locales[index];
3375
+ pathname = pathname.slice(detectedLocale.length + 1) || "/";
3376
+ return {
3377
+ pathname,
3378
+ detectedLocale
3379
+ };
3380
+ }
3381
+ }
3382
+ });
3383
+
3384
+ // node_modules/next/dist/client/normalize-locale-path.js
3385
+ var require_normalize_locale_path2 = __commonJS({
3386
+ "node_modules/next/dist/client/normalize-locale-path.js"(exports$1, module) {
3387
+ Object.defineProperty(exports$1, "__esModule", {
3388
+ value: true
3389
+ });
3390
+ Object.defineProperty(exports$1, "normalizeLocalePath", {
3391
+ enumerable: true,
3392
+ get: function() {
3393
+ return normalizeLocalePath;
3394
+ }
3395
+ });
3396
+ var normalizeLocalePath = (pathname, locales) => {
3397
+ if (process.env.__NEXT_I18N_SUPPORT) {
3398
+ return require_normalize_locale_path().normalizeLocalePath(pathname, locales);
3399
+ }
3400
+ return {
3401
+ pathname,
3402
+ detectedLocale: void 0
3403
+ };
3404
+ };
3405
+ if ((typeof exports$1.default === "function" || typeof exports$1.default === "object" && exports$1.default !== null) && typeof exports$1.default.__esModule === "undefined") {
3406
+ Object.defineProperty(exports$1.default, "__esModule", { value: true });
3407
+ Object.assign(exports$1.default, exports$1);
3408
+ module.exports = exports$1.default;
3409
+ }
3410
+ }
3411
+ });
3412
+
3413
+ // node_modules/next/dist/shared/lib/i18n/detect-domain-locale.js
3414
+ var require_detect_domain_locale = __commonJS({
3415
+ "node_modules/next/dist/shared/lib/i18n/detect-domain-locale.js"(exports$1) {
3416
+ Object.defineProperty(exports$1, "__esModule", {
3417
+ value: true
3418
+ });
3419
+ Object.defineProperty(exports$1, "detectDomainLocale", {
3420
+ enumerable: true,
3421
+ get: function() {
3422
+ return detectDomainLocale;
3423
+ }
3424
+ });
3425
+ function detectDomainLocale(domainItems, hostname, detectedLocale) {
3426
+ if (!domainItems) return;
3427
+ if (detectedLocale) {
3428
+ detectedLocale = detectedLocale.toLowerCase();
3429
+ }
3430
+ for (const item of domainItems) {
3431
+ const domainHostname = item.domain?.split(":", 1)[0].toLowerCase();
3432
+ if (hostname === domainHostname || detectedLocale === item.defaultLocale.toLowerCase() || item.locales?.some((locale) => locale.toLowerCase() === detectedLocale)) {
3433
+ return item;
3434
+ }
3435
+ }
3436
+ }
3437
+ }
3438
+ });
3439
+
3440
+ // node_modules/next/dist/client/detect-domain-locale.js
3441
+ var require_detect_domain_locale2 = __commonJS({
3442
+ "node_modules/next/dist/client/detect-domain-locale.js"(exports$1, module) {
3443
+ Object.defineProperty(exports$1, "__esModule", {
3444
+ value: true
3445
+ });
3446
+ Object.defineProperty(exports$1, "detectDomainLocale", {
3447
+ enumerable: true,
3448
+ get: function() {
3449
+ return detectDomainLocale;
3450
+ }
3451
+ });
3452
+ var detectDomainLocale = (...args) => {
3453
+ if (process.env.__NEXT_I18N_SUPPORT) {
3454
+ return require_detect_domain_locale().detectDomainLocale(...args);
3455
+ }
3456
+ };
3457
+ if ((typeof exports$1.default === "function" || typeof exports$1.default === "object" && exports$1.default !== null) && typeof exports$1.default.__esModule === "undefined") {
3458
+ Object.defineProperty(exports$1.default, "__esModule", { value: true });
3459
+ Object.assign(exports$1.default, exports$1);
3460
+ module.exports = exports$1.default;
3461
+ }
3462
+ }
3463
+ });
3464
+
3465
+ // node_modules/next/dist/client/get-domain-locale.js
3466
+ var require_get_domain_locale = __commonJS({
3467
+ "node_modules/next/dist/client/get-domain-locale.js"(exports$1, module) {
3468
+ Object.defineProperty(exports$1, "__esModule", {
3469
+ value: true
3470
+ });
3471
+ Object.defineProperty(exports$1, "getDomainLocale", {
3472
+ enumerable: true,
3473
+ get: function() {
3474
+ return getDomainLocale;
3475
+ }
3476
+ });
3477
+ var _normalizetrailingslash = require_normalize_trailing_slash();
3478
+ var basePath = process.env.__NEXT_ROUTER_BASEPATH || "";
3479
+ function getDomainLocale(path, locale, locales, domainLocales) {
3480
+ if (process.env.__NEXT_I18N_SUPPORT) {
3481
+ const normalizeLocalePath = require_normalize_locale_path2().normalizeLocalePath;
3482
+ const detectDomainLocale = require_detect_domain_locale2().detectDomainLocale;
3483
+ const target = locale || normalizeLocalePath(path, locales).detectedLocale;
3484
+ const domain = detectDomainLocale(domainLocales, void 0, target);
3485
+ if (domain) {
3486
+ const proto = `http${domain.http ? "" : "s"}://`;
3487
+ const finalLocale = target === domain.defaultLocale ? "" : `/${target}`;
3488
+ return `${proto}${domain.domain}${(0, _normalizetrailingslash.normalizePathTrailingSlash)(`${basePath}${finalLocale}${path}`)}`;
3489
+ }
3490
+ return false;
3491
+ } else {
3492
+ return false;
3493
+ }
3494
+ }
3495
+ if ((typeof exports$1.default === "function" || typeof exports$1.default === "object" && exports$1.default !== null) && typeof exports$1.default.__esModule === "undefined") {
3496
+ Object.defineProperty(exports$1.default, "__esModule", { value: true });
3497
+ Object.assign(exports$1.default, exports$1);
3498
+ module.exports = exports$1.default;
3499
+ }
3500
+ }
3501
+ });
3502
+
3503
+ // node_modules/next/dist/client/add-base-path.js
3504
+ var require_add_base_path = __commonJS({
3505
+ "node_modules/next/dist/client/add-base-path.js"(exports$1, module) {
3506
+ Object.defineProperty(exports$1, "__esModule", {
3507
+ value: true
3508
+ });
3509
+ Object.defineProperty(exports$1, "addBasePath", {
3510
+ enumerable: true,
3511
+ get: function() {
3512
+ return addBasePath;
3513
+ }
3514
+ });
3515
+ var _addpathprefix = require_add_path_prefix();
3516
+ var _normalizetrailingslash = require_normalize_trailing_slash();
3517
+ var basePath = process.env.__NEXT_ROUTER_BASEPATH || "";
3518
+ function addBasePath(path, required) {
3519
+ return (0, _normalizetrailingslash.normalizePathTrailingSlash)(process.env.__NEXT_MANUAL_CLIENT_BASE_PATH && !required ? path : (0, _addpathprefix.addPathPrefix)(path, basePath));
3520
+ }
3521
+ if ((typeof exports$1.default === "function" || typeof exports$1.default === "object" && exports$1.default !== null) && typeof exports$1.default.__esModule === "undefined") {
3522
+ Object.defineProperty(exports$1.default, "__esModule", { value: true });
3523
+ Object.assign(exports$1.default, exports$1);
3524
+ module.exports = exports$1.default;
3525
+ }
3526
+ }
3527
+ });
3528
+
3529
+ // node_modules/next/dist/client/use-merged-ref.js
3530
+ var require_use_merged_ref = __commonJS({
3531
+ "node_modules/next/dist/client/use-merged-ref.js"(exports$1, module) {
3532
+ Object.defineProperty(exports$1, "__esModule", {
3533
+ value: true
3534
+ });
3535
+ Object.defineProperty(exports$1, "useMergedRef", {
3536
+ enumerable: true,
3537
+ get: function() {
3538
+ return useMergedRef;
3539
+ }
3540
+ });
3541
+ var _react = __require("react");
3542
+ function useMergedRef(refA, refB) {
3543
+ const cleanupA = (0, _react.useRef)(null);
3544
+ const cleanupB = (0, _react.useRef)(null);
3545
+ return (0, _react.useCallback)((current) => {
3546
+ if (current === null) {
3547
+ const cleanupFnA = cleanupA.current;
3548
+ if (cleanupFnA) {
3549
+ cleanupA.current = null;
3550
+ cleanupFnA();
3551
+ }
3552
+ const cleanupFnB = cleanupB.current;
3553
+ if (cleanupFnB) {
3554
+ cleanupB.current = null;
3555
+ cleanupFnB();
3556
+ }
3557
+ } else {
3558
+ if (refA) {
3559
+ cleanupA.current = applyRef(refA, current);
3560
+ }
3561
+ if (refB) {
3562
+ cleanupB.current = applyRef(refB, current);
3563
+ }
3564
+ }
3565
+ }, [
3566
+ refA,
3567
+ refB
3568
+ ]);
3569
+ }
3570
+ function applyRef(refA, current) {
3571
+ if (typeof refA === "function") {
3572
+ const cleanup = refA(current);
3573
+ if (typeof cleanup === "function") {
3574
+ return cleanup;
3575
+ } else {
3576
+ return () => refA(null);
3577
+ }
3578
+ } else {
3579
+ refA.current = current;
3580
+ return () => {
3581
+ refA.current = null;
3582
+ };
3583
+ }
3584
+ }
3585
+ if ((typeof exports$1.default === "function" || typeof exports$1.default === "object" && exports$1.default !== null) && typeof exports$1.default.__esModule === "undefined") {
3586
+ Object.defineProperty(exports$1.default, "__esModule", { value: true });
3587
+ Object.assign(exports$1.default, exports$1);
3588
+ module.exports = exports$1.default;
3589
+ }
3590
+ }
3591
+ });
3592
+
3593
+ // node_modules/next/dist/shared/lib/utils/error-once.js
3594
+ var require_error_once = __commonJS({
3595
+ "node_modules/next/dist/shared/lib/utils/error-once.js"(exports$1) {
3596
+ Object.defineProperty(exports$1, "__esModule", {
3597
+ value: true
3598
+ });
3599
+ Object.defineProperty(exports$1, "errorOnce", {
3600
+ enumerable: true,
3601
+ get: function() {
3602
+ return errorOnce;
3603
+ }
3604
+ });
3605
+ var errorOnce = (_) => {
3606
+ };
3607
+ if (process.env.NODE_ENV !== "production") {
3608
+ const errors = /* @__PURE__ */ new Set();
3609
+ errorOnce = (msg) => {
3610
+ if (!errors.has(msg)) {
3611
+ console.error(msg);
3612
+ }
3613
+ errors.add(msg);
3614
+ };
3615
+ }
3616
+ }
3617
+ });
3618
+
3619
+ // node_modules/next/dist/client/link.js
3620
+ var require_link = __commonJS({
3621
+ "node_modules/next/dist/client/link.js"(exports$1, module) {
3622
+ "use client";
3623
+ Object.defineProperty(exports$1, "__esModule", {
3624
+ value: true
3625
+ });
3626
+ function _export(target, all) {
3627
+ for (var name in all) Object.defineProperty(target, name, {
3628
+ enumerable: true,
3629
+ get: all[name]
3630
+ });
3631
+ }
3632
+ _export(exports$1, {
3633
+ default: function() {
3634
+ return _default;
3635
+ },
3636
+ useLinkStatus: function() {
3637
+ return useLinkStatus;
3638
+ }
3639
+ });
3640
+ var _interop_require_wildcard = require_interop_require_wildcard();
3641
+ var _jsxruntime = __require("react/jsx-runtime");
3642
+ var _react = /* @__PURE__ */ _interop_require_wildcard._(__require("react"));
3643
+ var _resolvehref = require_resolve_href();
3644
+ var _islocalurl = require_is_local_url();
3645
+ var _formaturl = require_format_url();
3646
+ var _utils = require_utils();
3647
+ var _addlocale = require_add_locale2();
3648
+ var _routercontextsharedruntime = require_router_context_shared_runtime();
3649
+ var _useintersection = require_use_intersection();
3650
+ var _getdomainlocale = require_get_domain_locale();
3651
+ var _addbasepath = require_add_base_path();
3652
+ var _usemergedref = require_use_merged_ref();
3653
+ var _erroronce = require_error_once();
3654
+ var prefetched = /* @__PURE__ */ new Set();
3655
+ function prefetch(router, href, as, options) {
3656
+ if (typeof window === "undefined") {
3657
+ return;
3658
+ }
3659
+ if (!(0, _islocalurl.isLocalURL)(href)) {
3660
+ return;
3661
+ }
3662
+ if (!options.bypassPrefetchedCheck) {
3663
+ const locale = (
3664
+ // Let the link's locale prop override the default router locale.
3665
+ typeof options.locale !== "undefined" ? options.locale : "locale" in router ? router.locale : void 0
3666
+ );
3667
+ const prefetchedKey = href + "%" + as + "%" + locale;
3668
+ if (prefetched.has(prefetchedKey)) {
3669
+ return;
3670
+ }
3671
+ prefetched.add(prefetchedKey);
3672
+ }
3673
+ router.prefetch(href, as, options).catch((err) => {
3674
+ if (process.env.NODE_ENV !== "production") {
3675
+ throw err;
3676
+ }
3677
+ });
3678
+ }
3679
+ function isModifiedEvent(event) {
3680
+ const eventTarget = event.currentTarget;
3681
+ const target = eventTarget.getAttribute("target");
3682
+ return target && target !== "_self" || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey || // triggers resource download
3683
+ event.nativeEvent && event.nativeEvent.which === 2;
3684
+ }
3685
+ function linkClicked(e, router, href, as, replace, shallow, scroll, locale, onNavigate) {
3686
+ const { nodeName } = e.currentTarget;
3687
+ const isAnchorNodeName = nodeName.toUpperCase() === "A";
3688
+ if (isAnchorNodeName && isModifiedEvent(e) || e.currentTarget.hasAttribute("download")) {
3689
+ return;
3690
+ }
3691
+ if (!(0, _islocalurl.isLocalURL)(href)) {
3692
+ if (replace) {
3693
+ e.preventDefault();
3694
+ location.replace(href);
3695
+ }
3696
+ return;
3697
+ }
3698
+ e.preventDefault();
3699
+ const navigate = () => {
3700
+ if (onNavigate) {
3701
+ let isDefaultPrevented = false;
3702
+ onNavigate({
3703
+ preventDefault: () => {
3704
+ isDefaultPrevented = true;
3705
+ }
3706
+ });
3707
+ if (isDefaultPrevented) {
3708
+ return;
3709
+ }
3710
+ }
3711
+ const routerScroll = scroll ?? true;
3712
+ if ("beforePopState" in router) {
3713
+ router[replace ? "replace" : "push"](href, as, {
3714
+ shallow,
3715
+ locale,
3716
+ scroll: routerScroll
3717
+ });
3718
+ } else {
3719
+ router[replace ? "replace" : "push"](as || href, {
3720
+ scroll: routerScroll
3721
+ });
3722
+ }
3723
+ };
3724
+ navigate();
3725
+ }
3726
+ function formatStringOrUrl(urlObjOrString) {
3727
+ if (typeof urlObjOrString === "string") {
3728
+ return urlObjOrString;
3729
+ }
3730
+ return (0, _formaturl.formatUrl)(urlObjOrString);
3731
+ }
3732
+ var Link7 = /* @__PURE__ */ _react.default.forwardRef(function LinkComponent(props, forwardedRef) {
3733
+ let children;
3734
+ const { href: hrefProp, as: asProp, children: childrenProp, prefetch: prefetchProp = null, passHref, replace, shallow, scroll, locale, onClick, onNavigate, onMouseEnter: onMouseEnterProp, onTouchStart: onTouchStartProp, legacyBehavior = false, ...restProps } = props;
3735
+ children = childrenProp;
3736
+ if (legacyBehavior && (typeof children === "string" || typeof children === "number")) {
3737
+ children = /* @__PURE__ */ (0, _jsxruntime.jsx)("a", {
3738
+ children
3739
+ });
3740
+ }
3741
+ const router = _react.default.useContext(_routercontextsharedruntime.RouterContext);
3742
+ const prefetchEnabled = prefetchProp !== false;
3743
+ if (process.env.NODE_ENV !== "production") {
3744
+ let createPropError = function(args) {
3745
+ return Object.defineProperty(new Error(`Failed prop type: The prop \`${args.key}\` expects a ${args.expected} in \`<Link>\`, but got \`${args.actual}\` instead.` + (typeof window !== "undefined" ? "\nOpen your browser's console to view the Component stack trace." : "")), "__NEXT_ERROR_CODE", {
3746
+ value: "E319",
3747
+ enumerable: false,
3748
+ configurable: true
3749
+ });
3750
+ };
3751
+ const requiredPropsGuard = {
3752
+ href: true
3753
+ };
3754
+ const requiredProps = Object.keys(requiredPropsGuard);
3755
+ requiredProps.forEach((key) => {
3756
+ if (key === "href") {
3757
+ if (props[key] == null || typeof props[key] !== "string" && typeof props[key] !== "object") {
3758
+ throw createPropError({
3759
+ key,
3760
+ expected: "`string` or `object`",
3761
+ actual: props[key] === null ? "null" : typeof props[key]
3762
+ });
3763
+ }
3764
+ }
3765
+ });
3766
+ const optionalPropsGuard = {
3767
+ as: true,
3768
+ replace: true,
3769
+ scroll: true,
3770
+ shallow: true,
3771
+ passHref: true,
3772
+ prefetch: true,
3773
+ locale: true,
3774
+ onClick: true,
3775
+ onMouseEnter: true,
3776
+ onTouchStart: true,
3777
+ legacyBehavior: true,
3778
+ onNavigate: true
3779
+ };
3780
+ const optionalProps = Object.keys(optionalPropsGuard);
3781
+ optionalProps.forEach((key) => {
3782
+ const valType = typeof props[key];
3783
+ if (key === "as") {
3784
+ if (props[key] && valType !== "string" && valType !== "object") {
3785
+ throw createPropError({
3786
+ key,
3787
+ expected: "`string` or `object`",
3788
+ actual: valType
3789
+ });
3790
+ }
3791
+ } else if (key === "locale") {
3792
+ if (props[key] && valType !== "string") {
3793
+ throw createPropError({
3794
+ key,
3795
+ expected: "`string`",
3796
+ actual: valType
3797
+ });
3798
+ }
3799
+ } else if (key === "onClick" || key === "onMouseEnter" || key === "onTouchStart" || key === "onNavigate") {
3800
+ if (props[key] && valType !== "function") {
3801
+ throw createPropError({
3802
+ key,
3803
+ expected: "`function`",
3804
+ actual: valType
3805
+ });
3806
+ }
3807
+ } else if (key === "replace" || key === "scroll" || key === "shallow" || key === "passHref" || key === "legacyBehavior") {
3808
+ if (props[key] != null && valType !== "boolean") {
3809
+ throw createPropError({
3810
+ key,
3811
+ expected: "`boolean`",
3812
+ actual: valType
3813
+ });
3814
+ }
3815
+ } else if (key === "prefetch") {
3816
+ if (props[key] != null && valType !== "boolean" && props[key] !== "auto") {
3817
+ throw createPropError({
3818
+ key,
3819
+ expected: '`boolean | "auto"`',
3820
+ actual: valType
3821
+ });
3822
+ }
3823
+ } else ;
3824
+ });
3825
+ }
3826
+ const { href, as } = _react.default.useMemo(() => {
3827
+ if (!router) {
3828
+ const resolvedHref2 = formatStringOrUrl(hrefProp);
3829
+ return {
3830
+ href: resolvedHref2,
3831
+ as: asProp ? formatStringOrUrl(asProp) : resolvedHref2
3832
+ };
3833
+ }
3834
+ const [resolvedHref, resolvedAs] = (0, _resolvehref.resolveHref)(router, hrefProp, true);
3835
+ return {
3836
+ href: resolvedHref,
3837
+ as: asProp ? (0, _resolvehref.resolveHref)(router, asProp) : resolvedAs || resolvedHref
3838
+ };
3839
+ }, [
3840
+ router,
3841
+ hrefProp,
3842
+ asProp
3843
+ ]);
3844
+ const previousHref = _react.default.useRef(href);
3845
+ const previousAs = _react.default.useRef(as);
3846
+ let child;
3847
+ if (legacyBehavior) {
3848
+ if (process.env.NODE_ENV === "development") {
3849
+ if (onClick) {
3850
+ console.warn(`"onClick" was passed to <Link> with \`href\` of \`${hrefProp}\` but "legacyBehavior" was set. The legacy behavior requires onClick be set on the child of next/link`);
3851
+ }
3852
+ if (onMouseEnterProp) {
3853
+ console.warn(`"onMouseEnter" was passed to <Link> with \`href\` of \`${hrefProp}\` but "legacyBehavior" was set. The legacy behavior requires onMouseEnter be set on the child of next/link`);
3854
+ }
3855
+ try {
3856
+ child = _react.default.Children.only(children);
3857
+ } catch (err) {
3858
+ if (!children) {
3859
+ throw Object.defineProperty(new Error(`No children were passed to <Link> with \`href\` of \`${hrefProp}\` but one child is required https://nextjs.org/docs/messages/link-no-children`), "__NEXT_ERROR_CODE", {
3860
+ value: "E320",
3861
+ enumerable: false,
3862
+ configurable: true
3863
+ });
3864
+ }
3865
+ throw Object.defineProperty(new Error(`Multiple children were passed to <Link> with \`href\` of \`${hrefProp}\` but only one child is supported https://nextjs.org/docs/messages/link-multiple-children` + (typeof window !== "undefined" ? " \nOpen your browser's console to view the Component stack trace." : "")), "__NEXT_ERROR_CODE", {
3866
+ value: "E266",
3867
+ enumerable: false,
3868
+ configurable: true
3869
+ });
3870
+ }
3871
+ } else {
3872
+ child = _react.default.Children.only(children);
3873
+ }
3874
+ } else {
3875
+ if (process.env.NODE_ENV === "development") {
3876
+ if (children?.type === "a") {
3877
+ throw Object.defineProperty(new Error("Invalid <Link> with <a> child. Please remove <a> or use <Link legacyBehavior>.\nLearn more: https://nextjs.org/docs/messages/invalid-new-link-with-extra-anchor"), "__NEXT_ERROR_CODE", {
3878
+ value: "E209",
3879
+ enumerable: false,
3880
+ configurable: true
3881
+ });
3882
+ }
3883
+ }
3884
+ }
3885
+ const childRef = legacyBehavior ? child && typeof child === "object" && child.ref : forwardedRef;
3886
+ const [setIntersectionRef, isVisible, resetVisible] = (0, _useintersection.useIntersection)({
3887
+ rootMargin: "200px"
3888
+ });
3889
+ const setIntersectionWithResetRef = _react.default.useCallback((el) => {
3890
+ if (previousAs.current !== as || previousHref.current !== href) {
3891
+ resetVisible();
3892
+ previousAs.current = as;
3893
+ previousHref.current = href;
3894
+ }
3895
+ setIntersectionRef(el);
3896
+ }, [
3897
+ as,
3898
+ href,
3899
+ resetVisible,
3900
+ setIntersectionRef
3901
+ ]);
3902
+ const setRef = (0, _usemergedref.useMergedRef)(setIntersectionWithResetRef, childRef);
3903
+ _react.default.useEffect(() => {
3904
+ if (process.env.NODE_ENV !== "production") {
3905
+ return;
3906
+ }
3907
+ if (!router) {
3908
+ return;
3909
+ }
3910
+ if (!isVisible || !prefetchEnabled) {
3911
+ return;
3912
+ }
3913
+ prefetch(router, href, as, {
3914
+ locale
3915
+ });
3916
+ }, [
3917
+ as,
3918
+ href,
3919
+ isVisible,
3920
+ locale,
3921
+ prefetchEnabled,
3922
+ router?.locale,
3923
+ router
3924
+ ]);
3925
+ const childProps = {
3926
+ ref: setRef,
3927
+ onClick(e) {
3928
+ if (process.env.NODE_ENV !== "production") {
3929
+ if (!e) {
3930
+ throw Object.defineProperty(new Error(`Component rendered inside next/link has to pass click event to "onClick" prop.`), "__NEXT_ERROR_CODE", {
3931
+ value: "E312",
3932
+ enumerable: false,
3933
+ configurable: true
3934
+ });
3935
+ }
3936
+ }
3937
+ if (!legacyBehavior && typeof onClick === "function") {
3938
+ onClick(e);
3939
+ }
3940
+ if (legacyBehavior && child.props && typeof child.props.onClick === "function") {
3941
+ child.props.onClick(e);
3942
+ }
3943
+ if (!router) {
3944
+ return;
3945
+ }
3946
+ if (e.defaultPrevented) {
3947
+ return;
3948
+ }
3949
+ linkClicked(e, router, href, as, replace, shallow, scroll, locale, onNavigate);
3950
+ },
3951
+ onMouseEnter(e) {
3952
+ if (!legacyBehavior && typeof onMouseEnterProp === "function") {
3953
+ onMouseEnterProp(e);
3954
+ }
3955
+ if (legacyBehavior && child.props && typeof child.props.onMouseEnter === "function") {
3956
+ child.props.onMouseEnter(e);
3957
+ }
3958
+ if (!router) {
3959
+ return;
3960
+ }
3961
+ prefetch(router, href, as, {
3962
+ locale,
3963
+ priority: true,
3964
+ // @see {https://github.com/vercel/next.js/discussions/40268?sort=top#discussioncomment-3572642}
3965
+ bypassPrefetchedCheck: true
3966
+ });
3967
+ },
3968
+ onTouchStart: process.env.__NEXT_LINK_NO_TOUCH_START ? void 0 : function onTouchStart(e) {
3969
+ if (!legacyBehavior && typeof onTouchStartProp === "function") {
3970
+ onTouchStartProp(e);
3971
+ }
3972
+ if (legacyBehavior && child.props && typeof child.props.onTouchStart === "function") {
3973
+ child.props.onTouchStart(e);
3974
+ }
3975
+ if (!router) {
3976
+ return;
3977
+ }
3978
+ prefetch(router, href, as, {
3979
+ locale,
3980
+ priority: true,
3981
+ // @see {https://github.com/vercel/next.js/discussions/40268?sort=top#discussioncomment-3572642}
3982
+ bypassPrefetchedCheck: true
3983
+ });
3984
+ }
3985
+ };
3986
+ if ((0, _utils.isAbsoluteUrl)(as)) {
3987
+ childProps.href = as;
3988
+ } else if (!legacyBehavior || passHref || child.type === "a" && !("href" in child.props)) {
3989
+ const curLocale = typeof locale !== "undefined" ? locale : router?.locale;
3990
+ const localeDomain = router?.isLocaleDomain && (0, _getdomainlocale.getDomainLocale)(as, curLocale, router?.locales, router?.domainLocales);
3991
+ childProps.href = localeDomain || (0, _addbasepath.addBasePath)((0, _addlocale.addLocale)(as, curLocale, router?.defaultLocale));
3992
+ }
3993
+ if (legacyBehavior) {
3994
+ if (process.env.NODE_ENV === "development") {
3995
+ (0, _erroronce.errorOnce)("`legacyBehavior` is deprecated and will be removed in a future release. A codemod is available to upgrade your components:\n\nnpx @next/codemod@latest new-link .\n\nLearn more: https://nextjs.org/docs/app/building-your-application/upgrading/codemods#remove-a-tags-from-link-components");
3996
+ }
3997
+ return /* @__PURE__ */ _react.default.cloneElement(child, childProps);
3998
+ }
3999
+ return /* @__PURE__ */ (0, _jsxruntime.jsx)("a", {
4000
+ ...restProps,
4001
+ ...childProps,
4002
+ children
4003
+ });
4004
+ });
4005
+ var LinkStatusContext = /* @__PURE__ */ (0, _react.createContext)({
4006
+ // We do not support link status in the Pages Router, so we always return false
4007
+ pending: false
4008
+ });
4009
+ var useLinkStatus = () => {
4010
+ return (0, _react.useContext)(LinkStatusContext);
4011
+ };
4012
+ var _default = Link7;
4013
+ if ((typeof exports$1.default === "function" || typeof exports$1.default === "object" && exports$1.default !== null) && typeof exports$1.default.__esModule === "undefined") {
4014
+ Object.defineProperty(exports$1.default, "__esModule", { value: true });
4015
+ Object.assign(exports$1.default, exports$1);
4016
+ module.exports = exports$1.default;
4017
+ }
4018
+ }
4019
+ });
4020
+
4021
+ // node_modules/next/link.js
4022
+ var require_link2 = __commonJS({
4023
+ "node_modules/next/link.js"(exports$1, module) {
4024
+ module.exports = require_link();
4025
+ }
4026
+ });
107
4027
  function cn(...inputs) {
108
4028
  return tailwindMerge.twMerge(clsx.clsx(inputs));
109
4029
  }
@@ -9621,6 +13541,9 @@ function WorkspaceSelector({
9621
13541
  )
9622
13542
  ] }) }) });
9623
13543
  }
13544
+
13545
+ // src/components/app/sidebar/nav-main.tsx
13546
+ var import_link = __toESM(require_link2());
9624
13547
  function NavMain({ items, label, className }) {
9625
13548
  return /* @__PURE__ */ jsxRuntime.jsxs(SidebarGroup, { className, children: [
9626
13549
  label && /* @__PURE__ */ jsxRuntime.jsx(SidebarGroupLabel, { children: label }),
@@ -9636,7 +13559,7 @@ function NavLink({ item }) {
9636
13559
  asChild: true,
9637
13560
  isActive: item.isActive,
9638
13561
  tooltip: item.title,
9639
- children: /* @__PURE__ */ jsxRuntime.jsxs(Link3__default.default, { href: item.url ?? "#", children: [
13562
+ children: /* @__PURE__ */ jsxRuntime.jsxs(import_link.default, { href: item.url ?? "#", children: [
9640
13563
  item.icon && /* @__PURE__ */ jsxRuntime.jsx(item.icon, { className: "h-4 w-4" }),
9641
13564
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: item.title }),
9642
13565
  item.badge !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(
@@ -9698,7 +13621,7 @@ function NavCollapsible({ item }) {
9698
13621
  {
9699
13622
  asChild: true,
9700
13623
  isActive: subItem.isActive,
9701
- children: /* @__PURE__ */ jsxRuntime.jsx(Link3__default.default, { href: subItem.url, children: /* @__PURE__ */ jsxRuntime.jsx("span", { children: subItem.title }) })
13624
+ children: /* @__PURE__ */ jsxRuntime.jsx(import_link.default, { href: subItem.url, children: /* @__PURE__ */ jsxRuntime.jsx("span", { children: subItem.title }) })
9702
13625
  }
9703
13626
  ) }, subItem.title)) }) })
9704
13627
  ] })
@@ -9783,6 +13706,12 @@ function UserMenu({
9783
13706
  )
9784
13707
  ] }) }) });
9785
13708
  }
13709
+
13710
+ // src/components/app/sidebar/help-menu.tsx
13711
+ var import_link3 = __toESM(require_link2());
13712
+
13713
+ // src/components/app/changelog-sheet.tsx
13714
+ var import_link2 = __toESM(require_link2());
9786
13715
  var productConfig = {
9787
13716
  support: { label: "Support", dotColor: "bg-primary" },
9788
13717
  shopping: { label: "Shopping", dotColor: "bg-[var(--siena-sage)]" },
@@ -9829,7 +13758,7 @@ function ChangelogSheet({
9829
13758
  const hasMore = releases.length > maxReleases;
9830
13759
  return /* @__PURE__ */ jsxRuntime.jsx(Sheet, { open, onOpenChange, children: /* @__PURE__ */ jsxRuntime.jsxs(SheetContent, { className: "sm:max-w-lg", children: [
9831
13760
  /* @__PURE__ */ jsxRuntime.jsx(SheetHeader, { className: "h-14 flex-row items-center justify-start py-0 gap-0", children: /* @__PURE__ */ jsxRuntime.jsxs(
9832
- Link3__default.default,
13761
+ import_link2.default,
9833
13762
  {
9834
13763
  href: viewAllHref,
9835
13764
  className: "flex items-center gap-1.5 text-lg font-semibold hover:text-primary transition-colors",
@@ -9843,7 +13772,7 @@ function ChangelogSheet({
9843
13772
  index > 0 && /* @__PURE__ */ jsxRuntime.jsx(Separator2, { className: "my-5" }),
9844
13773
  /* @__PURE__ */ jsxRuntime.jsx(ReleaseSection, { release })
9845
13774
  ] }, release.date + index)) }),
9846
- hasMore && /* @__PURE__ */ jsxRuntime.jsx(SheetFooter, { className: "border-t-0 pt-0", children: /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "ghost", size: "sm", asChild: true, className: "w-full text-muted-foreground", children: /* @__PURE__ */ jsxRuntime.jsx(Link3__default.default, { href: viewAllHref, children: "View all releases" }) }) })
13775
+ hasMore && /* @__PURE__ */ jsxRuntime.jsx(SheetFooter, { className: "border-t-0 pt-0", children: /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "ghost", size: "sm", asChild: true, className: "w-full text-muted-foreground", children: /* @__PURE__ */ jsxRuntime.jsx(import_link2.default, { href: viewAllHref, children: "View all releases" }) }) })
9847
13776
  ] }) });
9848
13777
  }
9849
13778
  function ReleaseSection({ release }) {
@@ -10122,7 +14051,7 @@ function HelpMenuLink({ item }) {
10122
14051
  if (item.external) {
10123
14052
  return /* @__PURE__ */ jsxRuntime.jsx("a", { href: item.href, target: "_blank", rel: "noopener noreferrer", children: content });
10124
14053
  }
10125
- return /* @__PURE__ */ jsxRuntime.jsx(Link3__default.default, { href: item.href, children: content });
14054
+ return /* @__PURE__ */ jsxRuntime.jsx(import_link3.default, { href: item.href, children: content });
10126
14055
  }
10127
14056
  return content;
10128
14057
  }
@@ -10182,6 +14111,9 @@ function AppSidebar({
10182
14111
  /* @__PURE__ */ jsxRuntime.jsx(SidebarRail, {})
10183
14112
  ] });
10184
14113
  }
14114
+
14115
+ // src/components/app/page-header.tsx
14116
+ var import_link4 = __toESM(require_link2());
10185
14117
  function PageHeader({
10186
14118
  title,
10187
14119
  description,
@@ -10208,7 +14140,7 @@ function PageHeader({
10208
14140
  breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("nav", { className: "flex items-center gap-1 text-sm text-muted-foreground", children: breadcrumbs.map((item, index) => /* @__PURE__ */ jsxRuntime.jsxs(React10__namespace.Fragment, { children: [
10209
14141
  index > 0 && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "h-4 w-4" }),
10210
14142
  item.href ? /* @__PURE__ */ jsxRuntime.jsx(
10211
- Link3__default.default,
14143
+ import_link4.default,
10212
14144
  {
10213
14145
  href: item.href,
10214
14146
  className: "hover:text-foreground transition-colors",