@orion-studios/payload-admin-components 0.2.0-beta.13 → 0.2.0-beta.14

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/client.js CHANGED
@@ -1,18 +1,13 @@
1
1
  'use client';
2
2
  "use strict";
3
3
  "use client";
4
- var __create = Object.create;
5
4
  var __defProp = Object.defineProperty;
6
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
8
- var __getProtoOf = Object.getPrototypeOf;
9
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
10
8
  var __esm = (fn, res) => function __init() {
11
9
  return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
12
10
  };
13
- var __commonJS = (cb, mod) => function __require() {
14
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
15
- };
16
11
  var __export = (target, all) => {
17
12
  for (var name in all)
18
13
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -25,14 +20,6 @@ var __copyProps = (to, from, except, desc) => {
25
20
  }
26
21
  return to;
27
22
  };
28
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
29
- // If the importer is in node compatibility mode or this is not an ESM
30
- // file that has been converted to a CommonJS file using a Babel-
31
- // compatible transform (i.e. "__esModule" has not been set), then set
32
- // "default" to the CommonJS "module.exports" for node compatibility.
33
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
34
- mod
35
- ));
36
23
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
37
24
 
38
25
  // src/components/BlockPicker.tsx
@@ -1166,3964 +1153,6 @@ var init_OrionBlocksFieldImpl = __esm({
1166
1153
  }
1167
1154
  });
1168
1155
 
1169
- // node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs
1170
- var require_interop_require_wildcard = __commonJS({
1171
- "node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs"(exports2) {
1172
- "use strict";
1173
- function _getRequireWildcardCache(nodeInterop) {
1174
- if (typeof WeakMap !== "function") return null;
1175
- var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
1176
- var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
1177
- return (_getRequireWildcardCache = function(nodeInterop2) {
1178
- return nodeInterop2 ? cacheNodeInterop : cacheBabelInterop;
1179
- })(nodeInterop);
1180
- }
1181
- function _interop_require_wildcard(obj, nodeInterop) {
1182
- if (!nodeInterop && obj && obj.__esModule) return obj;
1183
- if (obj === null || typeof obj !== "object" && typeof obj !== "function") return { default: obj };
1184
- var cache = _getRequireWildcardCache(nodeInterop);
1185
- if (cache && cache.has(obj)) return cache.get(obj);
1186
- var newObj = { __proto__: null };
1187
- var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
1188
- for (var key in obj) {
1189
- if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
1190
- var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
1191
- if (desc && (desc.get || desc.set)) Object.defineProperty(newObj, key, desc);
1192
- else newObj[key] = obj[key];
1193
- }
1194
- }
1195
- newObj.default = obj;
1196
- if (cache) cache.set(obj, newObj);
1197
- return newObj;
1198
- }
1199
- exports2._ = _interop_require_wildcard;
1200
- }
1201
- });
1202
-
1203
- // node_modules/next/dist/shared/lib/router/utils/querystring.js
1204
- var require_querystring = __commonJS({
1205
- "node_modules/next/dist/shared/lib/router/utils/querystring.js"(exports2) {
1206
- "use strict";
1207
- Object.defineProperty(exports2, "__esModule", {
1208
- value: true
1209
- });
1210
- function _export(target, all) {
1211
- for (var name in all) Object.defineProperty(target, name, {
1212
- enumerable: true,
1213
- get: all[name]
1214
- });
1215
- }
1216
- _export(exports2, {
1217
- assign: function() {
1218
- return assign;
1219
- },
1220
- searchParamsToUrlQuery: function() {
1221
- return searchParamsToUrlQuery;
1222
- },
1223
- urlQueryToSearchParams: function() {
1224
- return urlQueryToSearchParams;
1225
- }
1226
- });
1227
- function searchParamsToUrlQuery(searchParams) {
1228
- const query = {};
1229
- for (const [key, value] of searchParams.entries()) {
1230
- const existing = query[key];
1231
- if (typeof existing === "undefined") {
1232
- query[key] = value;
1233
- } else if (Array.isArray(existing)) {
1234
- existing.push(value);
1235
- } else {
1236
- query[key] = [
1237
- existing,
1238
- value
1239
- ];
1240
- }
1241
- }
1242
- return query;
1243
- }
1244
- function stringifyUrlQueryParam(param) {
1245
- if (typeof param === "string") {
1246
- return param;
1247
- }
1248
- if (typeof param === "number" && !isNaN(param) || typeof param === "boolean") {
1249
- return String(param);
1250
- } else {
1251
- return "";
1252
- }
1253
- }
1254
- function urlQueryToSearchParams(query) {
1255
- const searchParams = new URLSearchParams();
1256
- for (const [key, value] of Object.entries(query)) {
1257
- if (Array.isArray(value)) {
1258
- for (const item of value) {
1259
- searchParams.append(key, stringifyUrlQueryParam(item));
1260
- }
1261
- } else {
1262
- searchParams.set(key, stringifyUrlQueryParam(value));
1263
- }
1264
- }
1265
- return searchParams;
1266
- }
1267
- function assign(target, ...searchParamsList) {
1268
- for (const searchParams of searchParamsList) {
1269
- for (const key of searchParams.keys()) {
1270
- target.delete(key);
1271
- }
1272
- for (const [key, value] of searchParams.entries()) {
1273
- target.append(key, value);
1274
- }
1275
- }
1276
- return target;
1277
- }
1278
- }
1279
- });
1280
-
1281
- // node_modules/next/dist/shared/lib/router/utils/format-url.js
1282
- var require_format_url = __commonJS({
1283
- "node_modules/next/dist/shared/lib/router/utils/format-url.js"(exports2) {
1284
- "use strict";
1285
- Object.defineProperty(exports2, "__esModule", {
1286
- value: true
1287
- });
1288
- function _export(target, all) {
1289
- for (var name in all) Object.defineProperty(target, name, {
1290
- enumerable: true,
1291
- get: all[name]
1292
- });
1293
- }
1294
- _export(exports2, {
1295
- formatUrl: function() {
1296
- return formatUrl;
1297
- },
1298
- formatWithValidation: function() {
1299
- return formatWithValidation;
1300
- },
1301
- urlObjectKeys: function() {
1302
- return urlObjectKeys;
1303
- }
1304
- });
1305
- var _interop_require_wildcard = require_interop_require_wildcard();
1306
- var _querystring = /* @__PURE__ */ _interop_require_wildcard._(require_querystring());
1307
- var slashedProtocols = /https?|ftp|gopher|file/;
1308
- function formatUrl(urlObj) {
1309
- let { auth, hostname } = urlObj;
1310
- let protocol = urlObj.protocol || "";
1311
- let pathname = urlObj.pathname || "";
1312
- let hash = urlObj.hash || "";
1313
- let query = urlObj.query || "";
1314
- let host = false;
1315
- auth = auth ? encodeURIComponent(auth).replace(/%3A/i, ":") + "@" : "";
1316
- if (urlObj.host) {
1317
- host = auth + urlObj.host;
1318
- } else if (hostname) {
1319
- host = auth + (~hostname.indexOf(":") ? `[${hostname}]` : hostname);
1320
- if (urlObj.port) {
1321
- host += ":" + urlObj.port;
1322
- }
1323
- }
1324
- if (query && typeof query === "object") {
1325
- query = String(_querystring.urlQueryToSearchParams(query));
1326
- }
1327
- let search = urlObj.search || query && `?${query}` || "";
1328
- if (protocol && !protocol.endsWith(":")) protocol += ":";
1329
- if (urlObj.slashes || (!protocol || slashedProtocols.test(protocol)) && host !== false) {
1330
- host = "//" + (host || "");
1331
- if (pathname && pathname[0] !== "/") pathname = "/" + pathname;
1332
- } else if (!host) {
1333
- host = "";
1334
- }
1335
- if (hash && hash[0] !== "#") hash = "#" + hash;
1336
- if (search && search[0] !== "?") search = "?" + search;
1337
- pathname = pathname.replace(/[?#]/g, encodeURIComponent);
1338
- search = search.replace("#", "%23");
1339
- return `${protocol}${host}${pathname}${search}${hash}`;
1340
- }
1341
- var urlObjectKeys = [
1342
- "auth",
1343
- "hash",
1344
- "host",
1345
- "hostname",
1346
- "href",
1347
- "path",
1348
- "pathname",
1349
- "port",
1350
- "protocol",
1351
- "query",
1352
- "search",
1353
- "slashes"
1354
- ];
1355
- function formatWithValidation(url) {
1356
- if (process.env.NODE_ENV === "development") {
1357
- if (url !== null && typeof url === "object") {
1358
- Object.keys(url).forEach((key) => {
1359
- if (!urlObjectKeys.includes(key)) {
1360
- console.warn(`Unknown key passed via urlObject into url.format: ${key}`);
1361
- }
1362
- });
1363
- }
1364
- }
1365
- return formatUrl(url);
1366
- }
1367
- }
1368
- });
1369
-
1370
- // node_modules/next/dist/shared/lib/router/utils/omit.js
1371
- var require_omit = __commonJS({
1372
- "node_modules/next/dist/shared/lib/router/utils/omit.js"(exports2) {
1373
- "use strict";
1374
- Object.defineProperty(exports2, "__esModule", {
1375
- value: true
1376
- });
1377
- Object.defineProperty(exports2, "omit", {
1378
- enumerable: true,
1379
- get: function() {
1380
- return omit;
1381
- }
1382
- });
1383
- function omit(object, keys) {
1384
- const omitted = {};
1385
- Object.keys(object).forEach((key) => {
1386
- if (!keys.includes(key)) {
1387
- omitted[key] = object[key];
1388
- }
1389
- });
1390
- return omitted;
1391
- }
1392
- }
1393
- });
1394
-
1395
- // node_modules/next/dist/shared/lib/utils.js
1396
- var require_utils = __commonJS({
1397
- "node_modules/next/dist/shared/lib/utils.js"(exports2) {
1398
- "use strict";
1399
- Object.defineProperty(exports2, "__esModule", {
1400
- value: true
1401
- });
1402
- function _export(target, all) {
1403
- for (var name in all) Object.defineProperty(target, name, {
1404
- enumerable: true,
1405
- get: all[name]
1406
- });
1407
- }
1408
- _export(exports2, {
1409
- DecodeError: function() {
1410
- return DecodeError;
1411
- },
1412
- MiddlewareNotFoundError: function() {
1413
- return MiddlewareNotFoundError;
1414
- },
1415
- MissingStaticPage: function() {
1416
- return MissingStaticPage;
1417
- },
1418
- NormalizeError: function() {
1419
- return NormalizeError;
1420
- },
1421
- PageNotFoundError: function() {
1422
- return PageNotFoundError;
1423
- },
1424
- SP: function() {
1425
- return SP;
1426
- },
1427
- ST: function() {
1428
- return ST;
1429
- },
1430
- WEB_VITALS: function() {
1431
- return WEB_VITALS;
1432
- },
1433
- execOnce: function() {
1434
- return execOnce;
1435
- },
1436
- getDisplayName: function() {
1437
- return getDisplayName;
1438
- },
1439
- getLocationOrigin: function() {
1440
- return getLocationOrigin;
1441
- },
1442
- getURL: function() {
1443
- return getURL;
1444
- },
1445
- isAbsoluteUrl: function() {
1446
- return isAbsoluteUrl;
1447
- },
1448
- isResSent: function() {
1449
- return isResSent;
1450
- },
1451
- loadGetInitialProps: function() {
1452
- return loadGetInitialProps;
1453
- },
1454
- normalizeRepeatedSlashes: function() {
1455
- return normalizeRepeatedSlashes;
1456
- },
1457
- stringifyError: function() {
1458
- return stringifyError;
1459
- }
1460
- });
1461
- var WEB_VITALS = [
1462
- "CLS",
1463
- "FCP",
1464
- "FID",
1465
- "INP",
1466
- "LCP",
1467
- "TTFB"
1468
- ];
1469
- function execOnce(fn) {
1470
- let used = false;
1471
- let result;
1472
- return (...args) => {
1473
- if (!used) {
1474
- used = true;
1475
- result = fn(...args);
1476
- }
1477
- return result;
1478
- };
1479
- }
1480
- var ABSOLUTE_URL_REGEX = /^[a-zA-Z][a-zA-Z\d+\-.]*?:/;
1481
- var isAbsoluteUrl = (url) => ABSOLUTE_URL_REGEX.test(url);
1482
- function getLocationOrigin() {
1483
- const { protocol, hostname, port } = window.location;
1484
- return `${protocol}//${hostname}${port ? ":" + port : ""}`;
1485
- }
1486
- function getURL() {
1487
- const { href } = window.location;
1488
- const origin = getLocationOrigin();
1489
- return href.substring(origin.length);
1490
- }
1491
- function getDisplayName(Component) {
1492
- return typeof Component === "string" ? Component : Component.displayName || Component.name || "Unknown";
1493
- }
1494
- function isResSent(res) {
1495
- return res.finished || res.headersSent;
1496
- }
1497
- function normalizeRepeatedSlashes(url) {
1498
- const urlParts = url.split("?");
1499
- const urlNoQuery = urlParts[0];
1500
- return urlNoQuery.replace(/\\/g, "/").replace(/\/\/+/g, "/") + (urlParts[1] ? `?${urlParts.slice(1).join("?")}` : "");
1501
- }
1502
- async function loadGetInitialProps(App, ctx) {
1503
- if (process.env.NODE_ENV !== "production") {
1504
- if (App.prototype?.getInitialProps) {
1505
- 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.`;
1506
- throw Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", {
1507
- value: "E394",
1508
- enumerable: false,
1509
- configurable: true
1510
- });
1511
- }
1512
- }
1513
- const res = ctx.res || ctx.ctx && ctx.ctx.res;
1514
- if (!App.getInitialProps) {
1515
- if (ctx.ctx && ctx.Component) {
1516
- return {
1517
- pageProps: await loadGetInitialProps(ctx.Component, ctx.ctx)
1518
- };
1519
- }
1520
- return {};
1521
- }
1522
- const props = await App.getInitialProps(ctx);
1523
- if (res && isResSent(res)) {
1524
- return props;
1525
- }
1526
- if (!props) {
1527
- const message = `"${getDisplayName(App)}.getInitialProps()" should resolve to an object. But found "${props}" instead.`;
1528
- throw Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", {
1529
- value: "E394",
1530
- enumerable: false,
1531
- configurable: true
1532
- });
1533
- }
1534
- if (process.env.NODE_ENV !== "production") {
1535
- if (Object.keys(props).length === 0 && !ctx.ctx) {
1536
- 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`);
1537
- }
1538
- }
1539
- return props;
1540
- }
1541
- var SP = typeof performance !== "undefined";
1542
- var ST = SP && [
1543
- "mark",
1544
- "measure",
1545
- "getEntriesByName"
1546
- ].every((method) => typeof performance[method] === "function");
1547
- var DecodeError = class extends Error {
1548
- };
1549
- var NormalizeError = class extends Error {
1550
- };
1551
- var PageNotFoundError = class extends Error {
1552
- constructor(page) {
1553
- super();
1554
- this.code = "ENOENT";
1555
- this.name = "PageNotFoundError";
1556
- this.message = `Cannot find module for page: ${page}`;
1557
- }
1558
- };
1559
- var MissingStaticPage = class extends Error {
1560
- constructor(page, message) {
1561
- super();
1562
- this.message = `Failed to load static file for page: ${page} ${message}`;
1563
- }
1564
- };
1565
- var MiddlewareNotFoundError = class extends Error {
1566
- constructor() {
1567
- super();
1568
- this.code = "ENOENT";
1569
- this.message = `Cannot find the middleware module`;
1570
- }
1571
- };
1572
- function stringifyError(error) {
1573
- return JSON.stringify({
1574
- message: error.message,
1575
- stack: error.stack
1576
- });
1577
- }
1578
- }
1579
- });
1580
-
1581
- // node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js
1582
- var require_remove_trailing_slash = __commonJS({
1583
- "node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js"(exports2) {
1584
- "use strict";
1585
- Object.defineProperty(exports2, "__esModule", {
1586
- value: true
1587
- });
1588
- Object.defineProperty(exports2, "removeTrailingSlash", {
1589
- enumerable: true,
1590
- get: function() {
1591
- return removeTrailingSlash;
1592
- }
1593
- });
1594
- function removeTrailingSlash(route) {
1595
- return route.replace(/\/$/, "") || "/";
1596
- }
1597
- }
1598
- });
1599
-
1600
- // node_modules/next/dist/shared/lib/router/utils/parse-path.js
1601
- var require_parse_path = __commonJS({
1602
- "node_modules/next/dist/shared/lib/router/utils/parse-path.js"(exports2) {
1603
- "use strict";
1604
- Object.defineProperty(exports2, "__esModule", {
1605
- value: true
1606
- });
1607
- Object.defineProperty(exports2, "parsePath", {
1608
- enumerable: true,
1609
- get: function() {
1610
- return parsePath;
1611
- }
1612
- });
1613
- function parsePath(path) {
1614
- const hashIndex = path.indexOf("#");
1615
- const queryIndex = path.indexOf("?");
1616
- const hasQuery = queryIndex > -1 && (hashIndex < 0 || queryIndex < hashIndex);
1617
- if (hasQuery || hashIndex > -1) {
1618
- return {
1619
- pathname: path.substring(0, hasQuery ? queryIndex : hashIndex),
1620
- query: hasQuery ? path.substring(queryIndex, hashIndex > -1 ? hashIndex : void 0) : "",
1621
- hash: hashIndex > -1 ? path.slice(hashIndex) : ""
1622
- };
1623
- }
1624
- return {
1625
- pathname: path,
1626
- query: "",
1627
- hash: ""
1628
- };
1629
- }
1630
- }
1631
- });
1632
-
1633
- // node_modules/next/dist/client/normalize-trailing-slash.js
1634
- var require_normalize_trailing_slash = __commonJS({
1635
- "node_modules/next/dist/client/normalize-trailing-slash.js"(exports2, module2) {
1636
- "use strict";
1637
- Object.defineProperty(exports2, "__esModule", {
1638
- value: true
1639
- });
1640
- Object.defineProperty(exports2, "normalizePathTrailingSlash", {
1641
- enumerable: true,
1642
- get: function() {
1643
- return normalizePathTrailingSlash;
1644
- }
1645
- });
1646
- var _removetrailingslash = require_remove_trailing_slash();
1647
- var _parsepath = require_parse_path();
1648
- var normalizePathTrailingSlash = (path) => {
1649
- if (!path.startsWith("/") || process.env.__NEXT_MANUAL_TRAILING_SLASH) {
1650
- return path;
1651
- }
1652
- const { pathname, query, hash } = (0, _parsepath.parsePath)(path);
1653
- if (process.env.__NEXT_TRAILING_SLASH) {
1654
- if (/\.[^/]+\/?$/.test(pathname)) {
1655
- return `${(0, _removetrailingslash.removeTrailingSlash)(pathname)}${query}${hash}`;
1656
- } else if (pathname.endsWith("/")) {
1657
- return `${pathname}${query}${hash}`;
1658
- } else {
1659
- return `${pathname}/${query}${hash}`;
1660
- }
1661
- }
1662
- return `${(0, _removetrailingslash.removeTrailingSlash)(pathname)}${query}${hash}`;
1663
- };
1664
- if ((typeof exports2.default === "function" || typeof exports2.default === "object" && exports2.default !== null) && typeof exports2.default.__esModule === "undefined") {
1665
- Object.defineProperty(exports2.default, "__esModule", { value: true });
1666
- Object.assign(exports2.default, exports2);
1667
- module2.exports = exports2.default;
1668
- }
1669
- }
1670
- });
1671
-
1672
- // node_modules/next/dist/shared/lib/router/utils/path-has-prefix.js
1673
- var require_path_has_prefix = __commonJS({
1674
- "node_modules/next/dist/shared/lib/router/utils/path-has-prefix.js"(exports2) {
1675
- "use strict";
1676
- Object.defineProperty(exports2, "__esModule", {
1677
- value: true
1678
- });
1679
- Object.defineProperty(exports2, "pathHasPrefix", {
1680
- enumerable: true,
1681
- get: function() {
1682
- return pathHasPrefix;
1683
- }
1684
- });
1685
- var _parsepath = require_parse_path();
1686
- function pathHasPrefix(path, prefix) {
1687
- if (typeof path !== "string") {
1688
- return false;
1689
- }
1690
- const { pathname } = (0, _parsepath.parsePath)(path);
1691
- return pathname === prefix || pathname.startsWith(prefix + "/");
1692
- }
1693
- }
1694
- });
1695
-
1696
- // node_modules/next/dist/client/has-base-path.js
1697
- var require_has_base_path = __commonJS({
1698
- "node_modules/next/dist/client/has-base-path.js"(exports2, module2) {
1699
- "use strict";
1700
- Object.defineProperty(exports2, "__esModule", {
1701
- value: true
1702
- });
1703
- Object.defineProperty(exports2, "hasBasePath", {
1704
- enumerable: true,
1705
- get: function() {
1706
- return hasBasePath;
1707
- }
1708
- });
1709
- var _pathhasprefix = require_path_has_prefix();
1710
- var basePath = process.env.__NEXT_ROUTER_BASEPATH || "";
1711
- function hasBasePath(path) {
1712
- return (0, _pathhasprefix.pathHasPrefix)(path, basePath);
1713
- }
1714
- if ((typeof exports2.default === "function" || typeof exports2.default === "object" && exports2.default !== null) && typeof exports2.default.__esModule === "undefined") {
1715
- Object.defineProperty(exports2.default, "__esModule", { value: true });
1716
- Object.assign(exports2.default, exports2);
1717
- module2.exports = exports2.default;
1718
- }
1719
- }
1720
- });
1721
-
1722
- // node_modules/next/dist/shared/lib/router/utils/is-local-url.js
1723
- var require_is_local_url = __commonJS({
1724
- "node_modules/next/dist/shared/lib/router/utils/is-local-url.js"(exports2) {
1725
- "use strict";
1726
- Object.defineProperty(exports2, "__esModule", {
1727
- value: true
1728
- });
1729
- Object.defineProperty(exports2, "isLocalURL", {
1730
- enumerable: true,
1731
- get: function() {
1732
- return isLocalURL;
1733
- }
1734
- });
1735
- var _utils = require_utils();
1736
- var _hasbasepath = require_has_base_path();
1737
- function isLocalURL(url) {
1738
- if (!(0, _utils.isAbsoluteUrl)(url)) return true;
1739
- try {
1740
- const locationOrigin = (0, _utils.getLocationOrigin)();
1741
- const resolved = new URL(url, locationOrigin);
1742
- return resolved.origin === locationOrigin && (0, _hasbasepath.hasBasePath)(resolved.pathname);
1743
- } catch (_) {
1744
- return false;
1745
- }
1746
- }
1747
- }
1748
- });
1749
-
1750
- // node_modules/next/dist/shared/lib/router/utils/sorted-routes.js
1751
- var require_sorted_routes = __commonJS({
1752
- "node_modules/next/dist/shared/lib/router/utils/sorted-routes.js"(exports2) {
1753
- "use strict";
1754
- Object.defineProperty(exports2, "__esModule", {
1755
- value: true
1756
- });
1757
- function _export(target, all) {
1758
- for (var name in all) Object.defineProperty(target, name, {
1759
- enumerable: true,
1760
- get: all[name]
1761
- });
1762
- }
1763
- _export(exports2, {
1764
- getSortedRouteObjects: function() {
1765
- return getSortedRouteObjects;
1766
- },
1767
- getSortedRoutes: function() {
1768
- return getSortedRoutes;
1769
- }
1770
- });
1771
- var UrlNode = class _UrlNode {
1772
- insert(urlPath) {
1773
- this._insert(urlPath.split("/").filter(Boolean), [], false);
1774
- }
1775
- smoosh() {
1776
- return this._smoosh();
1777
- }
1778
- _smoosh(prefix = "/") {
1779
- const childrenPaths = [
1780
- ...this.children.keys()
1781
- ].sort();
1782
- if (this.slugName !== null) {
1783
- childrenPaths.splice(childrenPaths.indexOf("[]"), 1);
1784
- }
1785
- if (this.restSlugName !== null) {
1786
- childrenPaths.splice(childrenPaths.indexOf("[...]"), 1);
1787
- }
1788
- if (this.optionalRestSlugName !== null) {
1789
- childrenPaths.splice(childrenPaths.indexOf("[[...]]"), 1);
1790
- }
1791
- const routes = childrenPaths.map((c) => this.children.get(c)._smoosh(`${prefix}${c}/`)).reduce((prev, curr) => [
1792
- ...prev,
1793
- ...curr
1794
- ], []);
1795
- if (this.slugName !== null) {
1796
- routes.push(...this.children.get("[]")._smoosh(`${prefix}[${this.slugName}]/`));
1797
- }
1798
- if (!this.placeholder) {
1799
- const r = prefix === "/" ? "/" : prefix.slice(0, -1);
1800
- if (this.optionalRestSlugName != null) {
1801
- 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", {
1802
- value: "E458",
1803
- enumerable: false,
1804
- configurable: true
1805
- });
1806
- }
1807
- routes.unshift(r);
1808
- }
1809
- if (this.restSlugName !== null) {
1810
- routes.push(...this.children.get("[...]")._smoosh(`${prefix}[...${this.restSlugName}]/`));
1811
- }
1812
- if (this.optionalRestSlugName !== null) {
1813
- routes.push(...this.children.get("[[...]]")._smoosh(`${prefix}[[...${this.optionalRestSlugName}]]/`));
1814
- }
1815
- return routes;
1816
- }
1817
- _insert(urlPaths, slugNames, isCatchAll) {
1818
- if (urlPaths.length === 0) {
1819
- this.placeholder = false;
1820
- return;
1821
- }
1822
- if (isCatchAll) {
1823
- throw Object.defineProperty(new Error(`Catch-all must be the last part of the URL.`), "__NEXT_ERROR_CODE", {
1824
- value: "E392",
1825
- enumerable: false,
1826
- configurable: true
1827
- });
1828
- }
1829
- let nextSegment = urlPaths[0];
1830
- if (nextSegment.startsWith("[") && nextSegment.endsWith("]")) {
1831
- let handleSlug = function(previousSlug, nextSlug) {
1832
- if (previousSlug !== null) {
1833
- if (previousSlug !== nextSlug) {
1834
- throw Object.defineProperty(new Error(`You cannot use different slug names for the same dynamic path ('${previousSlug}' !== '${nextSlug}').`), "__NEXT_ERROR_CODE", {
1835
- value: "E337",
1836
- enumerable: false,
1837
- configurable: true
1838
- });
1839
- }
1840
- }
1841
- slugNames.forEach((slug) => {
1842
- if (slug === nextSlug) {
1843
- throw Object.defineProperty(new Error(`You cannot have the same slug name "${nextSlug}" repeat within a single dynamic path`), "__NEXT_ERROR_CODE", {
1844
- value: "E247",
1845
- enumerable: false,
1846
- configurable: true
1847
- });
1848
- }
1849
- if (slug.replace(/\W/g, "") === nextSegment.replace(/\W/g, "")) {
1850
- 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", {
1851
- value: "E499",
1852
- enumerable: false,
1853
- configurable: true
1854
- });
1855
- }
1856
- });
1857
- slugNames.push(nextSlug);
1858
- };
1859
- let segmentName = nextSegment.slice(1, -1);
1860
- let isOptional = false;
1861
- if (segmentName.startsWith("[") && segmentName.endsWith("]")) {
1862
- segmentName = segmentName.slice(1, -1);
1863
- isOptional = true;
1864
- }
1865
- if (segmentName.startsWith("\u2026")) {
1866
- throw Object.defineProperty(new Error(`Detected a three-dot character ('\u2026') at ('${segmentName}'). Did you mean ('...')?`), "__NEXT_ERROR_CODE", {
1867
- value: "E147",
1868
- enumerable: false,
1869
- configurable: true
1870
- });
1871
- }
1872
- if (segmentName.startsWith("...")) {
1873
- segmentName = segmentName.substring(3);
1874
- isCatchAll = true;
1875
- }
1876
- if (segmentName.startsWith("[") || segmentName.endsWith("]")) {
1877
- throw Object.defineProperty(new Error(`Segment names may not start or end with extra brackets ('${segmentName}').`), "__NEXT_ERROR_CODE", {
1878
- value: "E421",
1879
- enumerable: false,
1880
- configurable: true
1881
- });
1882
- }
1883
- if (segmentName.startsWith(".")) {
1884
- throw Object.defineProperty(new Error(`Segment names may not start with erroneous periods ('${segmentName}').`), "__NEXT_ERROR_CODE", {
1885
- value: "E288",
1886
- enumerable: false,
1887
- configurable: true
1888
- });
1889
- }
1890
- if (isCatchAll) {
1891
- if (isOptional) {
1892
- if (this.restSlugName != null) {
1893
- 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", {
1894
- value: "E299",
1895
- enumerable: false,
1896
- configurable: true
1897
- });
1898
- }
1899
- handleSlug(this.optionalRestSlugName, segmentName);
1900
- this.optionalRestSlugName = segmentName;
1901
- nextSegment = "[[...]]";
1902
- } else {
1903
- if (this.optionalRestSlugName != null) {
1904
- 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", {
1905
- value: "E300",
1906
- enumerable: false,
1907
- configurable: true
1908
- });
1909
- }
1910
- handleSlug(this.restSlugName, segmentName);
1911
- this.restSlugName = segmentName;
1912
- nextSegment = "[...]";
1913
- }
1914
- } else {
1915
- if (isOptional) {
1916
- throw Object.defineProperty(new Error(`Optional route parameters are not yet supported ("${urlPaths[0]}").`), "__NEXT_ERROR_CODE", {
1917
- value: "E435",
1918
- enumerable: false,
1919
- configurable: true
1920
- });
1921
- }
1922
- handleSlug(this.slugName, segmentName);
1923
- this.slugName = segmentName;
1924
- nextSegment = "[]";
1925
- }
1926
- }
1927
- if (!this.children.has(nextSegment)) {
1928
- this.children.set(nextSegment, new _UrlNode());
1929
- }
1930
- this.children.get(nextSegment)._insert(urlPaths.slice(1), slugNames, isCatchAll);
1931
- }
1932
- constructor() {
1933
- this.placeholder = true;
1934
- this.children = /* @__PURE__ */ new Map();
1935
- this.slugName = null;
1936
- this.restSlugName = null;
1937
- this.optionalRestSlugName = null;
1938
- }
1939
- };
1940
- function getSortedRoutes(normalizedPages) {
1941
- const root = new UrlNode();
1942
- normalizedPages.forEach((pagePath) => root.insert(pagePath));
1943
- return root.smoosh();
1944
- }
1945
- function getSortedRouteObjects(objects, getter) {
1946
- const indexes = {};
1947
- const pathnames = [];
1948
- for (let i = 0; i < objects.length; i++) {
1949
- const pathname = getter(objects[i]);
1950
- indexes[pathname] = i;
1951
- pathnames[i] = pathname;
1952
- }
1953
- const sorted = getSortedRoutes(pathnames);
1954
- return sorted.map((pathname) => objects[indexes[pathname]]);
1955
- }
1956
- }
1957
- });
1958
-
1959
- // node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js
1960
- var require_ensure_leading_slash = __commonJS({
1961
- "node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js"(exports2) {
1962
- "use strict";
1963
- Object.defineProperty(exports2, "__esModule", {
1964
- value: true
1965
- });
1966
- Object.defineProperty(exports2, "ensureLeadingSlash", {
1967
- enumerable: true,
1968
- get: function() {
1969
- return ensureLeadingSlash;
1970
- }
1971
- });
1972
- function ensureLeadingSlash(path) {
1973
- return path.startsWith("/") ? path : `/${path}`;
1974
- }
1975
- }
1976
- });
1977
-
1978
- // node_modules/next/dist/shared/lib/segment.js
1979
- var require_segment = __commonJS({
1980
- "node_modules/next/dist/shared/lib/segment.js"(exports2) {
1981
- "use strict";
1982
- Object.defineProperty(exports2, "__esModule", {
1983
- value: true
1984
- });
1985
- function _export(target, all) {
1986
- for (var name in all) Object.defineProperty(target, name, {
1987
- enumerable: true,
1988
- get: all[name]
1989
- });
1990
- }
1991
- _export(exports2, {
1992
- DEFAULT_SEGMENT_KEY: function() {
1993
- return DEFAULT_SEGMENT_KEY;
1994
- },
1995
- NOT_FOUND_SEGMENT_KEY: function() {
1996
- return NOT_FOUND_SEGMENT_KEY;
1997
- },
1998
- PAGE_SEGMENT_KEY: function() {
1999
- return PAGE_SEGMENT_KEY;
2000
- },
2001
- addSearchParamsIfPageSegment: function() {
2002
- return addSearchParamsIfPageSegment;
2003
- },
2004
- computeSelectedLayoutSegment: function() {
2005
- return computeSelectedLayoutSegment;
2006
- },
2007
- getSegmentValue: function() {
2008
- return getSegmentValue;
2009
- },
2010
- getSelectedLayoutSegmentPath: function() {
2011
- return getSelectedLayoutSegmentPath;
2012
- },
2013
- isGroupSegment: function() {
2014
- return isGroupSegment;
2015
- },
2016
- isParallelRouteSegment: function() {
2017
- return isParallelRouteSegment;
2018
- }
2019
- });
2020
- function getSegmentValue(segment) {
2021
- return Array.isArray(segment) ? segment[1] : segment;
2022
- }
2023
- function isGroupSegment(segment) {
2024
- return segment[0] === "(" && segment.endsWith(")");
2025
- }
2026
- function isParallelRouteSegment(segment) {
2027
- return segment.startsWith("@") && segment !== "@children";
2028
- }
2029
- function addSearchParamsIfPageSegment(segment, searchParams) {
2030
- const isPageSegment = segment.includes(PAGE_SEGMENT_KEY);
2031
- if (isPageSegment) {
2032
- const stringifiedQuery = JSON.stringify(searchParams);
2033
- return stringifiedQuery !== "{}" ? PAGE_SEGMENT_KEY + "?" + stringifiedQuery : PAGE_SEGMENT_KEY;
2034
- }
2035
- return segment;
2036
- }
2037
- function computeSelectedLayoutSegment(segments, parallelRouteKey) {
2038
- if (!segments || segments.length === 0) {
2039
- return null;
2040
- }
2041
- const rawSegment = parallelRouteKey === "children" ? segments[0] : segments[segments.length - 1];
2042
- return rawSegment === DEFAULT_SEGMENT_KEY ? null : rawSegment;
2043
- }
2044
- function getSelectedLayoutSegmentPath(tree, parallelRouteKey, first = true, segmentPath = []) {
2045
- let node;
2046
- if (first) {
2047
- node = tree[1][parallelRouteKey];
2048
- } else {
2049
- const parallelRoutes = tree[1];
2050
- node = parallelRoutes.children ?? Object.values(parallelRoutes)[0];
2051
- }
2052
- if (!node) return segmentPath;
2053
- const segment = node[0];
2054
- let segmentValue = getSegmentValue(segment);
2055
- if (!segmentValue || segmentValue.startsWith(PAGE_SEGMENT_KEY)) {
2056
- return segmentPath;
2057
- }
2058
- segmentPath.push(segmentValue);
2059
- return getSelectedLayoutSegmentPath(node, parallelRouteKey, false, segmentPath);
2060
- }
2061
- var PAGE_SEGMENT_KEY = "__PAGE__";
2062
- var DEFAULT_SEGMENT_KEY = "__DEFAULT__";
2063
- var NOT_FOUND_SEGMENT_KEY = "/_not-found";
2064
- }
2065
- });
2066
-
2067
- // node_modules/next/dist/shared/lib/router/utils/app-paths.js
2068
- var require_app_paths = __commonJS({
2069
- "node_modules/next/dist/shared/lib/router/utils/app-paths.js"(exports2) {
2070
- "use strict";
2071
- Object.defineProperty(exports2, "__esModule", {
2072
- value: true
2073
- });
2074
- function _export(target, all) {
2075
- for (var name in all) Object.defineProperty(target, name, {
2076
- enumerable: true,
2077
- get: all[name]
2078
- });
2079
- }
2080
- _export(exports2, {
2081
- normalizeAppPath: function() {
2082
- return normalizeAppPath;
2083
- },
2084
- normalizeRscURL: function() {
2085
- return normalizeRscURL;
2086
- }
2087
- });
2088
- var _ensureleadingslash = require_ensure_leading_slash();
2089
- var _segment = require_segment();
2090
- function normalizeAppPath(route) {
2091
- return (0, _ensureleadingslash.ensureLeadingSlash)(route.split("/").reduce((pathname, segment, index, segments) => {
2092
- if (!segment) {
2093
- return pathname;
2094
- }
2095
- if ((0, _segment.isGroupSegment)(segment)) {
2096
- return pathname;
2097
- }
2098
- if (segment[0] === "@") {
2099
- return pathname;
2100
- }
2101
- if ((segment === "page" || segment === "route") && index === segments.length - 1) {
2102
- return pathname;
2103
- }
2104
- return `${pathname}/${segment}`;
2105
- }, ""));
2106
- }
2107
- function normalizeRscURL(url) {
2108
- return url.replace(
2109
- /\.rsc($|\?)/,
2110
- // $1 ensures `?` is preserved
2111
- "$1"
2112
- );
2113
- }
2114
- }
2115
- });
2116
-
2117
- // node_modules/next/dist/shared/lib/router/utils/interception-routes.js
2118
- var require_interception_routes = __commonJS({
2119
- "node_modules/next/dist/shared/lib/router/utils/interception-routes.js"(exports2) {
2120
- "use strict";
2121
- Object.defineProperty(exports2, "__esModule", {
2122
- value: true
2123
- });
2124
- function _export(target, all) {
2125
- for (var name in all) Object.defineProperty(target, name, {
2126
- enumerable: true,
2127
- get: all[name]
2128
- });
2129
- }
2130
- _export(exports2, {
2131
- INTERCEPTION_ROUTE_MARKERS: function() {
2132
- return INTERCEPTION_ROUTE_MARKERS;
2133
- },
2134
- extractInterceptionRouteInformation: function() {
2135
- return extractInterceptionRouteInformation;
2136
- },
2137
- isInterceptionRouteAppPath: function() {
2138
- return isInterceptionRouteAppPath;
2139
- }
2140
- });
2141
- var _apppaths = require_app_paths();
2142
- var INTERCEPTION_ROUTE_MARKERS = [
2143
- "(..)(..)",
2144
- "(.)",
2145
- "(..)",
2146
- "(...)"
2147
- ];
2148
- function isInterceptionRouteAppPath(path) {
2149
- return path.split("/").find((segment) => INTERCEPTION_ROUTE_MARKERS.find((m) => segment.startsWith(m))) !== void 0;
2150
- }
2151
- function extractInterceptionRouteInformation(path) {
2152
- let interceptingRoute;
2153
- let marker;
2154
- let interceptedRoute;
2155
- for (const segment of path.split("/")) {
2156
- marker = INTERCEPTION_ROUTE_MARKERS.find((m) => segment.startsWith(m));
2157
- if (marker) {
2158
- ;
2159
- [interceptingRoute, interceptedRoute] = path.split(marker, 2);
2160
- break;
2161
- }
2162
- }
2163
- if (!interceptingRoute || !marker || !interceptedRoute) {
2164
- throw Object.defineProperty(new Error(`Invalid interception route: ${path}. Must be in the format /<intercepting route>/(..|...|..)(..)/<intercepted route>`), "__NEXT_ERROR_CODE", {
2165
- value: "E269",
2166
- enumerable: false,
2167
- configurable: true
2168
- });
2169
- }
2170
- interceptingRoute = (0, _apppaths.normalizeAppPath)(interceptingRoute);
2171
- switch (marker) {
2172
- case "(.)":
2173
- if (interceptingRoute === "/") {
2174
- interceptedRoute = `/${interceptedRoute}`;
2175
- } else {
2176
- interceptedRoute = interceptingRoute + "/" + interceptedRoute;
2177
- }
2178
- break;
2179
- case "(..)":
2180
- if (interceptingRoute === "/") {
2181
- throw Object.defineProperty(new Error(`Invalid interception route: ${path}. Cannot use (..) marker at the root level, use (.) instead.`), "__NEXT_ERROR_CODE", {
2182
- value: "E207",
2183
- enumerable: false,
2184
- configurable: true
2185
- });
2186
- }
2187
- interceptedRoute = interceptingRoute.split("/").slice(0, -1).concat(interceptedRoute).join("/");
2188
- break;
2189
- case "(...)":
2190
- interceptedRoute = "/" + interceptedRoute;
2191
- break;
2192
- case "(..)(..)":
2193
- const splitInterceptingRoute = interceptingRoute.split("/");
2194
- if (splitInterceptingRoute.length <= 2) {
2195
- throw Object.defineProperty(new Error(`Invalid interception route: ${path}. Cannot use (..)(..) marker at the root level or one level up.`), "__NEXT_ERROR_CODE", {
2196
- value: "E486",
2197
- enumerable: false,
2198
- configurable: true
2199
- });
2200
- }
2201
- interceptedRoute = splitInterceptingRoute.slice(0, -2).concat(interceptedRoute).join("/");
2202
- break;
2203
- default:
2204
- throw Object.defineProperty(new Error("Invariant: unexpected marker"), "__NEXT_ERROR_CODE", {
2205
- value: "E112",
2206
- enumerable: false,
2207
- configurable: true
2208
- });
2209
- }
2210
- return {
2211
- interceptingRoute,
2212
- interceptedRoute
2213
- };
2214
- }
2215
- }
2216
- });
2217
-
2218
- // node_modules/next/dist/shared/lib/router/utils/is-dynamic.js
2219
- var require_is_dynamic = __commonJS({
2220
- "node_modules/next/dist/shared/lib/router/utils/is-dynamic.js"(exports2) {
2221
- "use strict";
2222
- Object.defineProperty(exports2, "__esModule", {
2223
- value: true
2224
- });
2225
- Object.defineProperty(exports2, "isDynamicRoute", {
2226
- enumerable: true,
2227
- get: function() {
2228
- return isDynamicRoute;
2229
- }
2230
- });
2231
- var _interceptionroutes = require_interception_routes();
2232
- var TEST_ROUTE = /\/[^/]*\[[^/]+\][^/]*(?=\/|$)/;
2233
- var TEST_STRICT_ROUTE = /\/\[[^/]+\](?=\/|$)/;
2234
- function isDynamicRoute(route, strict = true) {
2235
- if ((0, _interceptionroutes.isInterceptionRouteAppPath)(route)) {
2236
- route = (0, _interceptionroutes.extractInterceptionRouteInformation)(route).interceptedRoute;
2237
- }
2238
- if (strict) {
2239
- return TEST_STRICT_ROUTE.test(route);
2240
- }
2241
- return TEST_ROUTE.test(route);
2242
- }
2243
- }
2244
- });
2245
-
2246
- // node_modules/next/dist/shared/lib/router/utils/index.js
2247
- var require_utils2 = __commonJS({
2248
- "node_modules/next/dist/shared/lib/router/utils/index.js"(exports2) {
2249
- "use strict";
2250
- Object.defineProperty(exports2, "__esModule", {
2251
- value: true
2252
- });
2253
- function _export(target, all) {
2254
- for (var name in all) Object.defineProperty(target, name, {
2255
- enumerable: true,
2256
- get: all[name]
2257
- });
2258
- }
2259
- _export(exports2, {
2260
- getSortedRouteObjects: function() {
2261
- return _sortedroutes.getSortedRouteObjects;
2262
- },
2263
- getSortedRoutes: function() {
2264
- return _sortedroutes.getSortedRoutes;
2265
- },
2266
- isDynamicRoute: function() {
2267
- return _isdynamic.isDynamicRoute;
2268
- }
2269
- });
2270
- var _sortedroutes = require_sorted_routes();
2271
- var _isdynamic = require_is_dynamic();
2272
- }
2273
- });
2274
-
2275
- // node_modules/next/dist/compiled/path-to-regexp/index.js
2276
- var require_path_to_regexp = __commonJS({
2277
- "node_modules/next/dist/compiled/path-to-regexp/index.js"(exports2, module2) {
2278
- "use strict";
2279
- (() => {
2280
- "use strict";
2281
- if (typeof __nccwpck_require__ !== "undefined") __nccwpck_require__.ab = __dirname + "/";
2282
- var e = {};
2283
- (() => {
2284
- var n = e;
2285
- Object.defineProperty(n, "__esModule", { value: true });
2286
- n.pathToRegexp = n.tokensToRegexp = n.regexpToFunction = n.match = n.tokensToFunction = n.compile = n.parse = void 0;
2287
- function lexer(e2) {
2288
- var n2 = [];
2289
- var r = 0;
2290
- while (r < e2.length) {
2291
- var t = e2[r];
2292
- if (t === "*" || t === "+" || t === "?") {
2293
- n2.push({ type: "MODIFIER", index: r, value: e2[r++] });
2294
- continue;
2295
- }
2296
- if (t === "\\") {
2297
- n2.push({ type: "ESCAPED_CHAR", index: r++, value: e2[r++] });
2298
- continue;
2299
- }
2300
- if (t === "{") {
2301
- n2.push({ type: "OPEN", index: r, value: e2[r++] });
2302
- continue;
2303
- }
2304
- if (t === "}") {
2305
- n2.push({ type: "CLOSE", index: r, value: e2[r++] });
2306
- continue;
2307
- }
2308
- if (t === ":") {
2309
- var a = "";
2310
- var i = r + 1;
2311
- while (i < e2.length) {
2312
- var o = e2.charCodeAt(i);
2313
- if (o >= 48 && o <= 57 || o >= 65 && o <= 90 || o >= 97 && o <= 122 || o === 95) {
2314
- a += e2[i++];
2315
- continue;
2316
- }
2317
- break;
2318
- }
2319
- if (!a) throw new TypeError("Missing parameter name at ".concat(r));
2320
- n2.push({ type: "NAME", index: r, value: a });
2321
- r = i;
2322
- continue;
2323
- }
2324
- if (t === "(") {
2325
- var c = 1;
2326
- var f = "";
2327
- var i = r + 1;
2328
- if (e2[i] === "?") {
2329
- throw new TypeError('Pattern cannot start with "?" at '.concat(i));
2330
- }
2331
- while (i < e2.length) {
2332
- if (e2[i] === "\\") {
2333
- f += e2[i++] + e2[i++];
2334
- continue;
2335
- }
2336
- if (e2[i] === ")") {
2337
- c--;
2338
- if (c === 0) {
2339
- i++;
2340
- break;
2341
- }
2342
- } else if (e2[i] === "(") {
2343
- c++;
2344
- if (e2[i + 1] !== "?") {
2345
- throw new TypeError("Capturing groups are not allowed at ".concat(i));
2346
- }
2347
- }
2348
- f += e2[i++];
2349
- }
2350
- if (c) throw new TypeError("Unbalanced pattern at ".concat(r));
2351
- if (!f) throw new TypeError("Missing pattern at ".concat(r));
2352
- n2.push({ type: "PATTERN", index: r, value: f });
2353
- r = i;
2354
- continue;
2355
- }
2356
- n2.push({ type: "CHAR", index: r, value: e2[r++] });
2357
- }
2358
- n2.push({ type: "END", index: r, value: "" });
2359
- return n2;
2360
- }
2361
- function parse(e2, n2) {
2362
- if (n2 === void 0) {
2363
- n2 = {};
2364
- }
2365
- var r = lexer(e2);
2366
- var t = n2.prefixes, a = t === void 0 ? "./" : t, i = n2.delimiter, o = i === void 0 ? "/#?" : i;
2367
- var c = [];
2368
- var f = 0;
2369
- var u = 0;
2370
- var p = "";
2371
- var tryConsume = function(e3) {
2372
- if (u < r.length && r[u].type === e3) return r[u++].value;
2373
- };
2374
- var mustConsume = function(e3) {
2375
- var n3 = tryConsume(e3);
2376
- if (n3 !== void 0) return n3;
2377
- var t2 = r[u], a2 = t2.type, i2 = t2.index;
2378
- throw new TypeError("Unexpected ".concat(a2, " at ").concat(i2, ", expected ").concat(e3));
2379
- };
2380
- var consumeText = function() {
2381
- var e3 = "";
2382
- var n3;
2383
- while (n3 = tryConsume("CHAR") || tryConsume("ESCAPED_CHAR")) {
2384
- e3 += n3;
2385
- }
2386
- return e3;
2387
- };
2388
- var isSafe = function(e3) {
2389
- for (var n3 = 0, r2 = o; n3 < r2.length; n3++) {
2390
- var t2 = r2[n3];
2391
- if (e3.indexOf(t2) > -1) return true;
2392
- }
2393
- return false;
2394
- };
2395
- var safePattern = function(e3) {
2396
- var n3 = c[c.length - 1];
2397
- var r2 = e3 || (n3 && typeof n3 === "string" ? n3 : "");
2398
- if (n3 && !r2) {
2399
- throw new TypeError('Must have text between two parameters, missing text after "'.concat(n3.name, '"'));
2400
- }
2401
- if (!r2 || isSafe(r2)) return "[^".concat(escapeString(o), "]+?");
2402
- return "(?:(?!".concat(escapeString(r2), ")[^").concat(escapeString(o), "])+?");
2403
- };
2404
- while (u < r.length) {
2405
- var v = tryConsume("CHAR");
2406
- var s = tryConsume("NAME");
2407
- var d = tryConsume("PATTERN");
2408
- if (s || d) {
2409
- var g = v || "";
2410
- if (a.indexOf(g) === -1) {
2411
- p += g;
2412
- g = "";
2413
- }
2414
- if (p) {
2415
- c.push(p);
2416
- p = "";
2417
- }
2418
- c.push({ name: s || f++, prefix: g, suffix: "", pattern: d || safePattern(g), modifier: tryConsume("MODIFIER") || "" });
2419
- continue;
2420
- }
2421
- var x = v || tryConsume("ESCAPED_CHAR");
2422
- if (x) {
2423
- p += x;
2424
- continue;
2425
- }
2426
- if (p) {
2427
- c.push(p);
2428
- p = "";
2429
- }
2430
- var h = tryConsume("OPEN");
2431
- if (h) {
2432
- var g = consumeText();
2433
- var l = tryConsume("NAME") || "";
2434
- var m = tryConsume("PATTERN") || "";
2435
- var T = consumeText();
2436
- mustConsume("CLOSE");
2437
- c.push({ name: l || (m ? f++ : ""), pattern: l && !m ? safePattern(g) : m, prefix: g, suffix: T, modifier: tryConsume("MODIFIER") || "" });
2438
- continue;
2439
- }
2440
- mustConsume("END");
2441
- }
2442
- return c;
2443
- }
2444
- n.parse = parse;
2445
- function compile(e2, n2) {
2446
- return tokensToFunction(parse(e2, n2), n2);
2447
- }
2448
- n.compile = compile;
2449
- function tokensToFunction(e2, n2) {
2450
- if (n2 === void 0) {
2451
- n2 = {};
2452
- }
2453
- var r = flags(n2);
2454
- var t = n2.encode, a = t === void 0 ? function(e3) {
2455
- return e3;
2456
- } : t, i = n2.validate, o = i === void 0 ? true : i;
2457
- var c = e2.map((function(e3) {
2458
- if (typeof e3 === "object") {
2459
- return new RegExp("^(?:".concat(e3.pattern, ")$"), r);
2460
- }
2461
- }));
2462
- return function(n3) {
2463
- var r2 = "";
2464
- for (var t2 = 0; t2 < e2.length; t2++) {
2465
- var i2 = e2[t2];
2466
- if (typeof i2 === "string") {
2467
- r2 += i2;
2468
- continue;
2469
- }
2470
- var f = n3 ? n3[i2.name] : void 0;
2471
- var u = i2.modifier === "?" || i2.modifier === "*";
2472
- var p = i2.modifier === "*" || i2.modifier === "+";
2473
- if (Array.isArray(f)) {
2474
- if (!p) {
2475
- throw new TypeError('Expected "'.concat(i2.name, '" to not repeat, but got an array'));
2476
- }
2477
- if (f.length === 0) {
2478
- if (u) continue;
2479
- throw new TypeError('Expected "'.concat(i2.name, '" to not be empty'));
2480
- }
2481
- for (var v = 0; v < f.length; v++) {
2482
- var s = a(f[v], i2);
2483
- if (o && !c[t2].test(s)) {
2484
- throw new TypeError('Expected all "'.concat(i2.name, '" to match "').concat(i2.pattern, '", but got "').concat(s, '"'));
2485
- }
2486
- r2 += i2.prefix + s + i2.suffix;
2487
- }
2488
- continue;
2489
- }
2490
- if (typeof f === "string" || typeof f === "number") {
2491
- var s = a(String(f), i2);
2492
- if (o && !c[t2].test(s)) {
2493
- throw new TypeError('Expected "'.concat(i2.name, '" to match "').concat(i2.pattern, '", but got "').concat(s, '"'));
2494
- }
2495
- r2 += i2.prefix + s + i2.suffix;
2496
- continue;
2497
- }
2498
- if (u) continue;
2499
- var d = p ? "an array" : "a string";
2500
- throw new TypeError('Expected "'.concat(i2.name, '" to be ').concat(d));
2501
- }
2502
- return r2;
2503
- };
2504
- }
2505
- n.tokensToFunction = tokensToFunction;
2506
- function match(e2, n2) {
2507
- var r = [];
2508
- var t = pathToRegexp(e2, r, n2);
2509
- return regexpToFunction(t, r, n2);
2510
- }
2511
- n.match = match;
2512
- function regexpToFunction(e2, n2, r) {
2513
- if (r === void 0) {
2514
- r = {};
2515
- }
2516
- var t = r.decode, a = t === void 0 ? function(e3) {
2517
- return e3;
2518
- } : t;
2519
- return function(r2) {
2520
- var t2 = e2.exec(r2);
2521
- if (!t2) return false;
2522
- var i = t2[0], o = t2.index;
2523
- var c = /* @__PURE__ */ Object.create(null);
2524
- var _loop_1 = function(e3) {
2525
- if (t2[e3] === void 0) return "continue";
2526
- var r3 = n2[e3 - 1];
2527
- if (r3.modifier === "*" || r3.modifier === "+") {
2528
- c[r3.name] = t2[e3].split(r3.prefix + r3.suffix).map((function(e4) {
2529
- return a(e4, r3);
2530
- }));
2531
- } else {
2532
- c[r3.name] = a(t2[e3], r3);
2533
- }
2534
- };
2535
- for (var f = 1; f < t2.length; f++) {
2536
- _loop_1(f);
2537
- }
2538
- return { path: i, index: o, params: c };
2539
- };
2540
- }
2541
- n.regexpToFunction = regexpToFunction;
2542
- function escapeString(e2) {
2543
- return e2.replace(/([.+*?=^!:${}()[\]|/\\])/g, "\\$1");
2544
- }
2545
- function flags(e2) {
2546
- return e2 && e2.sensitive ? "" : "i";
2547
- }
2548
- function regexpToRegexp(e2, n2) {
2549
- if (!n2) return e2;
2550
- var r = /\((?:\?<(.*?)>)?(?!\?)/g;
2551
- var t = 0;
2552
- var a = r.exec(e2.source);
2553
- while (a) {
2554
- n2.push({ name: a[1] || t++, prefix: "", suffix: "", modifier: "", pattern: "" });
2555
- a = r.exec(e2.source);
2556
- }
2557
- return e2;
2558
- }
2559
- function arrayToRegexp(e2, n2, r) {
2560
- var t = e2.map((function(e3) {
2561
- return pathToRegexp(e3, n2, r).source;
2562
- }));
2563
- return new RegExp("(?:".concat(t.join("|"), ")"), flags(r));
2564
- }
2565
- function stringToRegexp(e2, n2, r) {
2566
- return tokensToRegexp(parse(e2, r), n2, r);
2567
- }
2568
- function tokensToRegexp(e2, n2, r) {
2569
- if (r === void 0) {
2570
- r = {};
2571
- }
2572
- 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) {
2573
- return e3;
2574
- } : u, v = r.delimiter, s = v === void 0 ? "/#?" : v, d = r.endsWith, g = d === void 0 ? "" : d;
2575
- var x = "[".concat(escapeString(g), "]|$");
2576
- var h = "[".concat(escapeString(s), "]");
2577
- var l = o ? "^" : "";
2578
- for (var m = 0, T = e2; m < T.length; m++) {
2579
- var E = T[m];
2580
- if (typeof E === "string") {
2581
- l += escapeString(p(E));
2582
- } else {
2583
- var w = escapeString(p(E.prefix));
2584
- var y = escapeString(p(E.suffix));
2585
- if (E.pattern) {
2586
- if (n2) n2.push(E);
2587
- if (w || y) {
2588
- if (E.modifier === "+" || E.modifier === "*") {
2589
- var R = E.modifier === "*" ? "?" : "";
2590
- l += "(?:".concat(w, "((?:").concat(E.pattern, ")(?:").concat(y).concat(w, "(?:").concat(E.pattern, "))*)").concat(y, ")").concat(R);
2591
- } else {
2592
- l += "(?:".concat(w, "(").concat(E.pattern, ")").concat(y, ")").concat(E.modifier);
2593
- }
2594
- } else {
2595
- if (E.modifier === "+" || E.modifier === "*") {
2596
- throw new TypeError('Can not repeat "'.concat(E.name, '" without a prefix and suffix'));
2597
- }
2598
- l += "(".concat(E.pattern, ")").concat(E.modifier);
2599
- }
2600
- } else {
2601
- l += "(?:".concat(w).concat(y, ")").concat(E.modifier);
2602
- }
2603
- }
2604
- }
2605
- if (f) {
2606
- if (!a) l += "".concat(h, "?");
2607
- l += !r.endsWith ? "$" : "(?=".concat(x, ")");
2608
- } else {
2609
- var A = e2[e2.length - 1];
2610
- var _ = typeof A === "string" ? h.indexOf(A[A.length - 1]) > -1 : A === void 0;
2611
- if (!a) {
2612
- l += "(?:".concat(h, "(?=").concat(x, "))?");
2613
- }
2614
- if (!_) {
2615
- l += "(?=".concat(h, "|").concat(x, ")");
2616
- }
2617
- }
2618
- return new RegExp(l, flags(r));
2619
- }
2620
- n.tokensToRegexp = tokensToRegexp;
2621
- function pathToRegexp(e2, n2, r) {
2622
- if (e2 instanceof RegExp) return regexpToRegexp(e2, n2);
2623
- if (Array.isArray(e2)) return arrayToRegexp(e2, n2, r);
2624
- return stringToRegexp(e2, n2, r);
2625
- }
2626
- n.pathToRegexp = pathToRegexp;
2627
- })();
2628
- module2.exports = e;
2629
- })();
2630
- }
2631
- });
2632
-
2633
- // node_modules/next/dist/lib/route-pattern-normalizer.js
2634
- var require_route_pattern_normalizer = __commonJS({
2635
- "node_modules/next/dist/lib/route-pattern-normalizer.js"(exports2) {
2636
- "use strict";
2637
- Object.defineProperty(exports2, "__esModule", {
2638
- value: true
2639
- });
2640
- function _export(target, all) {
2641
- for (var name in all) Object.defineProperty(target, name, {
2642
- enumerable: true,
2643
- get: all[name]
2644
- });
2645
- }
2646
- _export(exports2, {
2647
- PARAM_SEPARATOR: function() {
2648
- return PARAM_SEPARATOR;
2649
- },
2650
- hasAdjacentParameterIssues: function() {
2651
- return hasAdjacentParameterIssues;
2652
- },
2653
- normalizeAdjacentParameters: function() {
2654
- return normalizeAdjacentParameters;
2655
- },
2656
- normalizeTokensForRegexp: function() {
2657
- return normalizeTokensForRegexp;
2658
- },
2659
- stripNormalizedSeparators: function() {
2660
- return stripNormalizedSeparators;
2661
- },
2662
- stripParameterSeparators: function() {
2663
- return stripParameterSeparators;
2664
- }
2665
- });
2666
- var PARAM_SEPARATOR = "_NEXTSEP_";
2667
- function hasAdjacentParameterIssues(route) {
2668
- if (typeof route !== "string") return false;
2669
- if (/\/\(\.{1,3}\):[^/\s]+/.test(route)) {
2670
- return true;
2671
- }
2672
- if (/:[a-zA-Z_][a-zA-Z0-9_]*:[a-zA-Z_][a-zA-Z0-9_]*/.test(route)) {
2673
- return true;
2674
- }
2675
- return false;
2676
- }
2677
- function normalizeAdjacentParameters(route) {
2678
- let normalized = route;
2679
- normalized = normalized.replace(/(\([^)]*\)):([^/\s]+)/g, `$1${PARAM_SEPARATOR}:$2`);
2680
- normalized = normalized.replace(/:([^:/\s)]+)(?=:)/g, `:$1${PARAM_SEPARATOR}`);
2681
- return normalized;
2682
- }
2683
- function normalizeTokensForRegexp(tokens) {
2684
- return tokens.map((token) => {
2685
- if (typeof token === "object" && token !== null && // Not all token objects have 'modifier' property (e.g., simple text tokens)
2686
- "modifier" in token && // Only repeating modifiers (* or +) cause the validation error
2687
- // Other modifiers like '?' (optional) are fine
2688
- (token.modifier === "*" || token.modifier === "+") && // Token objects can have different shapes depending on route pattern
2689
- "prefix" in token && "suffix" in token && // Both prefix and suffix must be empty strings
2690
- // This is what causes the validation error in path-to-regexp
2691
- token.prefix === "" && token.suffix === "") {
2692
- return {
2693
- ...token,
2694
- prefix: "/"
2695
- };
2696
- }
2697
- return token;
2698
- });
2699
- }
2700
- function stripNormalizedSeparators(pathname) {
2701
- return pathname.replace(new RegExp(`\\)${PARAM_SEPARATOR}`, "g"), ")");
2702
- }
2703
- function stripParameterSeparators(params) {
2704
- const cleaned = {};
2705
- for (const [key, value] of Object.entries(params)) {
2706
- if (typeof value === "string") {
2707
- cleaned[key] = value.replace(new RegExp(`^${PARAM_SEPARATOR}`), "");
2708
- } else if (Array.isArray(value)) {
2709
- cleaned[key] = value.map((item) => typeof item === "string" ? item.replace(new RegExp(`^${PARAM_SEPARATOR}`), "") : item);
2710
- } else {
2711
- cleaned[key] = value;
2712
- }
2713
- }
2714
- return cleaned;
2715
- }
2716
- }
2717
- });
2718
-
2719
- // node_modules/next/dist/shared/lib/router/utils/route-match-utils.js
2720
- var require_route_match_utils = __commonJS({
2721
- "node_modules/next/dist/shared/lib/router/utils/route-match-utils.js"(exports2) {
2722
- "use strict";
2723
- Object.defineProperty(exports2, "__esModule", {
2724
- value: true
2725
- });
2726
- function _export(target, all) {
2727
- for (var name in all) Object.defineProperty(target, name, {
2728
- enumerable: true,
2729
- get: all[name]
2730
- });
2731
- }
2732
- _export(exports2, {
2733
- safeCompile: function() {
2734
- return safeCompile;
2735
- },
2736
- safePathToRegexp: function() {
2737
- return safePathToRegexp;
2738
- },
2739
- safeRegexpToFunction: function() {
2740
- return safeRegexpToFunction;
2741
- },
2742
- safeRouteMatcher: function() {
2743
- return safeRouteMatcher;
2744
- }
2745
- });
2746
- var _pathtoregexp = require_path_to_regexp();
2747
- var _routepatternnormalizer = require_route_pattern_normalizer();
2748
- function safePathToRegexp(route, keys, options) {
2749
- if (typeof route !== "string") {
2750
- return (0, _pathtoregexp.pathToRegexp)(route, keys, options);
2751
- }
2752
- const needsNormalization = (0, _routepatternnormalizer.hasAdjacentParameterIssues)(route);
2753
- const routeToUse = needsNormalization ? (0, _routepatternnormalizer.normalizeAdjacentParameters)(route) : route;
2754
- try {
2755
- return (0, _pathtoregexp.pathToRegexp)(routeToUse, keys, options);
2756
- } catch (error) {
2757
- if (!needsNormalization) {
2758
- try {
2759
- const normalizedRoute = (0, _routepatternnormalizer.normalizeAdjacentParameters)(route);
2760
- return (0, _pathtoregexp.pathToRegexp)(normalizedRoute, keys, options);
2761
- } catch (retryError) {
2762
- throw error;
2763
- }
2764
- }
2765
- throw error;
2766
- }
2767
- }
2768
- function safeCompile(route, options) {
2769
- const needsNormalization = (0, _routepatternnormalizer.hasAdjacentParameterIssues)(route);
2770
- const routeToUse = needsNormalization ? (0, _routepatternnormalizer.normalizeAdjacentParameters)(route) : route;
2771
- try {
2772
- const compiler = (0, _pathtoregexp.compile)(routeToUse, options);
2773
- if (needsNormalization) {
2774
- return (params) => {
2775
- return (0, _routepatternnormalizer.stripNormalizedSeparators)(compiler(params));
2776
- };
2777
- }
2778
- return compiler;
2779
- } catch (error) {
2780
- if (!needsNormalization) {
2781
- try {
2782
- const normalizedRoute = (0, _routepatternnormalizer.normalizeAdjacentParameters)(route);
2783
- const compiler = (0, _pathtoregexp.compile)(normalizedRoute, options);
2784
- return (params) => {
2785
- return (0, _routepatternnormalizer.stripNormalizedSeparators)(compiler(params));
2786
- };
2787
- } catch (retryError) {
2788
- throw error;
2789
- }
2790
- }
2791
- throw error;
2792
- }
2793
- }
2794
- function safeRegexpToFunction(regexp, keys) {
2795
- const originalMatcher = (0, _pathtoregexp.regexpToFunction)(regexp, keys || []);
2796
- return (pathname) => {
2797
- const result = originalMatcher(pathname);
2798
- if (!result) return false;
2799
- return {
2800
- ...result,
2801
- params: (0, _routepatternnormalizer.stripParameterSeparators)(result.params)
2802
- };
2803
- };
2804
- }
2805
- function safeRouteMatcher(matcherFn) {
2806
- return (pathname) => {
2807
- const result = matcherFn(pathname);
2808
- if (!result) return false;
2809
- return (0, _routepatternnormalizer.stripParameterSeparators)(result);
2810
- };
2811
- }
2812
- }
2813
- });
2814
-
2815
- // node_modules/next/dist/shared/lib/router/utils/route-matcher.js
2816
- var require_route_matcher = __commonJS({
2817
- "node_modules/next/dist/shared/lib/router/utils/route-matcher.js"(exports2) {
2818
- "use strict";
2819
- Object.defineProperty(exports2, "__esModule", {
2820
- value: true
2821
- });
2822
- Object.defineProperty(exports2, "getRouteMatcher", {
2823
- enumerable: true,
2824
- get: function() {
2825
- return getRouteMatcher;
2826
- }
2827
- });
2828
- var _utils = require_utils();
2829
- var _routematchutils = require_route_match_utils();
2830
- function getRouteMatcher({ re, groups }) {
2831
- const rawMatcher = (pathname) => {
2832
- const routeMatch = re.exec(pathname);
2833
- if (!routeMatch) return false;
2834
- const decode = (param) => {
2835
- try {
2836
- return decodeURIComponent(param);
2837
- } catch {
2838
- throw Object.defineProperty(new _utils.DecodeError("failed to decode param"), "__NEXT_ERROR_CODE", {
2839
- value: "E528",
2840
- enumerable: false,
2841
- configurable: true
2842
- });
2843
- }
2844
- };
2845
- const params = {};
2846
- for (const [key, group] of Object.entries(groups)) {
2847
- const match = routeMatch[group.pos];
2848
- if (match !== void 0) {
2849
- if (group.repeat) {
2850
- params[key] = match.split("/").map((entry) => decode(entry));
2851
- } else {
2852
- params[key] = decode(match);
2853
- }
2854
- }
2855
- }
2856
- return params;
2857
- };
2858
- return (0, _routematchutils.safeRouteMatcher)(rawMatcher);
2859
- }
2860
- }
2861
- });
2862
-
2863
- // node_modules/next/dist/lib/constants.js
2864
- var require_constants = __commonJS({
2865
- "node_modules/next/dist/lib/constants.js"(exports2) {
2866
- "use strict";
2867
- Object.defineProperty(exports2, "__esModule", {
2868
- value: true
2869
- });
2870
- function _export(target, all) {
2871
- for (var name in all) Object.defineProperty(target, name, {
2872
- enumerable: true,
2873
- get: all[name]
2874
- });
2875
- }
2876
- _export(exports2, {
2877
- ACTION_SUFFIX: function() {
2878
- return ACTION_SUFFIX;
2879
- },
2880
- APP_DIR_ALIAS: function() {
2881
- return APP_DIR_ALIAS;
2882
- },
2883
- CACHE_ONE_YEAR: function() {
2884
- return CACHE_ONE_YEAR;
2885
- },
2886
- DOT_NEXT_ALIAS: function() {
2887
- return DOT_NEXT_ALIAS;
2888
- },
2889
- ESLINT_DEFAULT_DIRS: function() {
2890
- return ESLINT_DEFAULT_DIRS;
2891
- },
2892
- GSP_NO_RETURNED_VALUE: function() {
2893
- return GSP_NO_RETURNED_VALUE;
2894
- },
2895
- GSSP_COMPONENT_MEMBER_ERROR: function() {
2896
- return GSSP_COMPONENT_MEMBER_ERROR;
2897
- },
2898
- GSSP_NO_RETURNED_VALUE: function() {
2899
- return GSSP_NO_RETURNED_VALUE;
2900
- },
2901
- HTML_CONTENT_TYPE_HEADER: function() {
2902
- return HTML_CONTENT_TYPE_HEADER;
2903
- },
2904
- INFINITE_CACHE: function() {
2905
- return INFINITE_CACHE;
2906
- },
2907
- INSTRUMENTATION_HOOK_FILENAME: function() {
2908
- return INSTRUMENTATION_HOOK_FILENAME;
2909
- },
2910
- JSON_CONTENT_TYPE_HEADER: function() {
2911
- return JSON_CONTENT_TYPE_HEADER;
2912
- },
2913
- MATCHED_PATH_HEADER: function() {
2914
- return MATCHED_PATH_HEADER;
2915
- },
2916
- MIDDLEWARE_FILENAME: function() {
2917
- return MIDDLEWARE_FILENAME;
2918
- },
2919
- MIDDLEWARE_LOCATION_REGEXP: function() {
2920
- return MIDDLEWARE_LOCATION_REGEXP;
2921
- },
2922
- NEXT_BODY_SUFFIX: function() {
2923
- return NEXT_BODY_SUFFIX;
2924
- },
2925
- NEXT_CACHE_IMPLICIT_TAG_ID: function() {
2926
- return NEXT_CACHE_IMPLICIT_TAG_ID;
2927
- },
2928
- NEXT_CACHE_REVALIDATED_TAGS_HEADER: function() {
2929
- return NEXT_CACHE_REVALIDATED_TAGS_HEADER;
2930
- },
2931
- NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER: function() {
2932
- return NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER;
2933
- },
2934
- NEXT_CACHE_SOFT_TAG_MAX_LENGTH: function() {
2935
- return NEXT_CACHE_SOFT_TAG_MAX_LENGTH;
2936
- },
2937
- NEXT_CACHE_TAGS_HEADER: function() {
2938
- return NEXT_CACHE_TAGS_HEADER;
2939
- },
2940
- NEXT_CACHE_TAG_MAX_ITEMS: function() {
2941
- return NEXT_CACHE_TAG_MAX_ITEMS;
2942
- },
2943
- NEXT_CACHE_TAG_MAX_LENGTH: function() {
2944
- return NEXT_CACHE_TAG_MAX_LENGTH;
2945
- },
2946
- NEXT_DATA_SUFFIX: function() {
2947
- return NEXT_DATA_SUFFIX;
2948
- },
2949
- NEXT_INTERCEPTION_MARKER_PREFIX: function() {
2950
- return NEXT_INTERCEPTION_MARKER_PREFIX;
2951
- },
2952
- NEXT_META_SUFFIX: function() {
2953
- return NEXT_META_SUFFIX;
2954
- },
2955
- NEXT_QUERY_PARAM_PREFIX: function() {
2956
- return NEXT_QUERY_PARAM_PREFIX;
2957
- },
2958
- NEXT_RESUME_HEADER: function() {
2959
- return NEXT_RESUME_HEADER;
2960
- },
2961
- NON_STANDARD_NODE_ENV: function() {
2962
- return NON_STANDARD_NODE_ENV;
2963
- },
2964
- PAGES_DIR_ALIAS: function() {
2965
- return PAGES_DIR_ALIAS;
2966
- },
2967
- PRERENDER_REVALIDATE_HEADER: function() {
2968
- return PRERENDER_REVALIDATE_HEADER;
2969
- },
2970
- PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER: function() {
2971
- return PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER;
2972
- },
2973
- PROXY_FILENAME: function() {
2974
- return PROXY_FILENAME;
2975
- },
2976
- PROXY_LOCATION_REGEXP: function() {
2977
- return PROXY_LOCATION_REGEXP;
2978
- },
2979
- PUBLIC_DIR_MIDDLEWARE_CONFLICT: function() {
2980
- return PUBLIC_DIR_MIDDLEWARE_CONFLICT;
2981
- },
2982
- ROOT_DIR_ALIAS: function() {
2983
- return ROOT_DIR_ALIAS;
2984
- },
2985
- RSC_ACTION_CLIENT_WRAPPER_ALIAS: function() {
2986
- return RSC_ACTION_CLIENT_WRAPPER_ALIAS;
2987
- },
2988
- RSC_ACTION_ENCRYPTION_ALIAS: function() {
2989
- return RSC_ACTION_ENCRYPTION_ALIAS;
2990
- },
2991
- RSC_ACTION_PROXY_ALIAS: function() {
2992
- return RSC_ACTION_PROXY_ALIAS;
2993
- },
2994
- RSC_ACTION_VALIDATE_ALIAS: function() {
2995
- return RSC_ACTION_VALIDATE_ALIAS;
2996
- },
2997
- RSC_CACHE_WRAPPER_ALIAS: function() {
2998
- return RSC_CACHE_WRAPPER_ALIAS;
2999
- },
3000
- RSC_DYNAMIC_IMPORT_WRAPPER_ALIAS: function() {
3001
- return RSC_DYNAMIC_IMPORT_WRAPPER_ALIAS;
3002
- },
3003
- RSC_MOD_REF_PROXY_ALIAS: function() {
3004
- return RSC_MOD_REF_PROXY_ALIAS;
3005
- },
3006
- RSC_SEGMENTS_DIR_SUFFIX: function() {
3007
- return RSC_SEGMENTS_DIR_SUFFIX;
3008
- },
3009
- RSC_SEGMENT_SUFFIX: function() {
3010
- return RSC_SEGMENT_SUFFIX;
3011
- },
3012
- RSC_SUFFIX: function() {
3013
- return RSC_SUFFIX;
3014
- },
3015
- SERVER_PROPS_EXPORT_ERROR: function() {
3016
- return SERVER_PROPS_EXPORT_ERROR;
3017
- },
3018
- SERVER_PROPS_GET_INIT_PROPS_CONFLICT: function() {
3019
- return SERVER_PROPS_GET_INIT_PROPS_CONFLICT;
3020
- },
3021
- SERVER_PROPS_SSG_CONFLICT: function() {
3022
- return SERVER_PROPS_SSG_CONFLICT;
3023
- },
3024
- SERVER_RUNTIME: function() {
3025
- return SERVER_RUNTIME;
3026
- },
3027
- SSG_FALLBACK_EXPORT_ERROR: function() {
3028
- return SSG_FALLBACK_EXPORT_ERROR;
3029
- },
3030
- SSG_GET_INITIAL_PROPS_CONFLICT: function() {
3031
- return SSG_GET_INITIAL_PROPS_CONFLICT;
3032
- },
3033
- STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR: function() {
3034
- return STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR;
3035
- },
3036
- TEXT_PLAIN_CONTENT_TYPE_HEADER: function() {
3037
- return TEXT_PLAIN_CONTENT_TYPE_HEADER;
3038
- },
3039
- UNSTABLE_REVALIDATE_RENAME_ERROR: function() {
3040
- return UNSTABLE_REVALIDATE_RENAME_ERROR;
3041
- },
3042
- WEBPACK_LAYERS: function() {
3043
- return WEBPACK_LAYERS;
3044
- },
3045
- WEBPACK_RESOURCE_QUERIES: function() {
3046
- return WEBPACK_RESOURCE_QUERIES;
3047
- },
3048
- WEB_SOCKET_MAX_RECONNECTIONS: function() {
3049
- return WEB_SOCKET_MAX_RECONNECTIONS;
3050
- }
3051
- });
3052
- var TEXT_PLAIN_CONTENT_TYPE_HEADER = "text/plain";
3053
- var HTML_CONTENT_TYPE_HEADER = "text/html; charset=utf-8";
3054
- var JSON_CONTENT_TYPE_HEADER = "application/json; charset=utf-8";
3055
- var NEXT_QUERY_PARAM_PREFIX = "nxtP";
3056
- var NEXT_INTERCEPTION_MARKER_PREFIX = "nxtI";
3057
- var MATCHED_PATH_HEADER = "x-matched-path";
3058
- var PRERENDER_REVALIDATE_HEADER = "x-prerender-revalidate";
3059
- var PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER = "x-prerender-revalidate-if-generated";
3060
- var RSC_SEGMENTS_DIR_SUFFIX = ".segments";
3061
- var RSC_SEGMENT_SUFFIX = ".segment.rsc";
3062
- var RSC_SUFFIX = ".rsc";
3063
- var ACTION_SUFFIX = ".action";
3064
- var NEXT_DATA_SUFFIX = ".json";
3065
- var NEXT_META_SUFFIX = ".meta";
3066
- var NEXT_BODY_SUFFIX = ".body";
3067
- var NEXT_CACHE_TAGS_HEADER = "x-next-cache-tags";
3068
- var NEXT_CACHE_REVALIDATED_TAGS_HEADER = "x-next-revalidated-tags";
3069
- var NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER = "x-next-revalidate-tag-token";
3070
- var NEXT_RESUME_HEADER = "next-resume";
3071
- var NEXT_CACHE_TAG_MAX_ITEMS = 128;
3072
- var NEXT_CACHE_TAG_MAX_LENGTH = 256;
3073
- var NEXT_CACHE_SOFT_TAG_MAX_LENGTH = 1024;
3074
- var NEXT_CACHE_IMPLICIT_TAG_ID = "_N_T_";
3075
- var CACHE_ONE_YEAR = 31536e3;
3076
- var INFINITE_CACHE = 4294967294;
3077
- var MIDDLEWARE_FILENAME = "middleware";
3078
- var MIDDLEWARE_LOCATION_REGEXP = `(?:src/)?${MIDDLEWARE_FILENAME}`;
3079
- var PROXY_FILENAME = "proxy";
3080
- var PROXY_LOCATION_REGEXP = `(?:src/)?${PROXY_FILENAME}`;
3081
- var INSTRUMENTATION_HOOK_FILENAME = "instrumentation";
3082
- var PAGES_DIR_ALIAS = "private-next-pages";
3083
- var DOT_NEXT_ALIAS = "private-dot-next";
3084
- var ROOT_DIR_ALIAS = "private-next-root-dir";
3085
- var APP_DIR_ALIAS = "private-next-app-dir";
3086
- var RSC_MOD_REF_PROXY_ALIAS = "private-next-rsc-mod-ref-proxy";
3087
- var RSC_ACTION_VALIDATE_ALIAS = "private-next-rsc-action-validate";
3088
- var RSC_ACTION_PROXY_ALIAS = "private-next-rsc-server-reference";
3089
- var RSC_CACHE_WRAPPER_ALIAS = "private-next-rsc-cache-wrapper";
3090
- var RSC_DYNAMIC_IMPORT_WRAPPER_ALIAS = "private-next-rsc-track-dynamic-import";
3091
- var RSC_ACTION_ENCRYPTION_ALIAS = "private-next-rsc-action-encryption";
3092
- var RSC_ACTION_CLIENT_WRAPPER_ALIAS = "private-next-rsc-action-client-wrapper";
3093
- 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`;
3094
- var SSG_GET_INITIAL_PROPS_CONFLICT = `You can not use getInitialProps with getStaticProps. To use SSG, please remove your getInitialProps`;
3095
- var SERVER_PROPS_GET_INIT_PROPS_CONFLICT = `You can not use getInitialProps with getServerSideProps. Please remove getInitialProps.`;
3096
- var SERVER_PROPS_SSG_CONFLICT = `You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps`;
3097
- var STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR = `can not have getInitialProps/getServerSideProps, https://nextjs.org/docs/messages/404-get-initial-props`;
3098
- var SERVER_PROPS_EXPORT_ERROR = `pages with \`getServerSideProps\` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export`;
3099
- var GSP_NO_RETURNED_VALUE = "Your `getStaticProps` function did not return an object. Did you forget to add a `return`?";
3100
- var GSSP_NO_RETURNED_VALUE = "Your `getServerSideProps` function did not return an object. Did you forget to add a `return`?";
3101
- var UNSTABLE_REVALIDATE_RENAME_ERROR = "The `unstable_revalidate` property is available for general use.\nPlease use `revalidate` instead.";
3102
- 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`;
3103
- 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`;
3104
- 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`;
3105
- var ESLINT_DEFAULT_DIRS = [
3106
- "app",
3107
- "pages",
3108
- "components",
3109
- "lib",
3110
- "src"
3111
- ];
3112
- var SERVER_RUNTIME = {
3113
- edge: "edge",
3114
- experimentalEdge: "experimental-edge",
3115
- nodejs: "nodejs"
3116
- };
3117
- var WEB_SOCKET_MAX_RECONNECTIONS = 12;
3118
- var WEBPACK_LAYERS_NAMES = {
3119
- /**
3120
- * The layer for the shared code between the client and server bundles.
3121
- */
3122
- shared: "shared",
3123
- /**
3124
- * The layer for server-only runtime and picking up `react-server` export conditions.
3125
- * Including app router RSC pages and app router custom routes and metadata routes.
3126
- */
3127
- reactServerComponents: "rsc",
3128
- /**
3129
- * Server Side Rendering layer for app (ssr).
3130
- */
3131
- serverSideRendering: "ssr",
3132
- /**
3133
- * The browser client bundle layer for actions.
3134
- */
3135
- actionBrowser: "action-browser",
3136
- /**
3137
- * The Node.js bundle layer for the API routes.
3138
- */
3139
- apiNode: "api-node",
3140
- /**
3141
- * The Edge Lite bundle layer for the API routes.
3142
- */
3143
- apiEdge: "api-edge",
3144
- /**
3145
- * The layer for the middleware code.
3146
- */
3147
- middleware: "middleware",
3148
- /**
3149
- * The layer for the instrumentation hooks.
3150
- */
3151
- instrument: "instrument",
3152
- /**
3153
- * The layer for assets on the edge.
3154
- */
3155
- edgeAsset: "edge-asset",
3156
- /**
3157
- * The browser client bundle layer for App directory.
3158
- */
3159
- appPagesBrowser: "app-pages-browser",
3160
- /**
3161
- * The browser client bundle layer for Pages directory.
3162
- */
3163
- pagesDirBrowser: "pages-dir-browser",
3164
- /**
3165
- * The Edge Lite bundle layer for Pages directory.
3166
- */
3167
- pagesDirEdge: "pages-dir-edge",
3168
- /**
3169
- * The Node.js bundle layer for Pages directory.
3170
- */
3171
- pagesDirNode: "pages-dir-node"
3172
- };
3173
- var WEBPACK_LAYERS = {
3174
- ...WEBPACK_LAYERS_NAMES,
3175
- GROUP: {
3176
- builtinReact: [
3177
- WEBPACK_LAYERS_NAMES.reactServerComponents,
3178
- WEBPACK_LAYERS_NAMES.actionBrowser
3179
- ],
3180
- serverOnly: [
3181
- WEBPACK_LAYERS_NAMES.reactServerComponents,
3182
- WEBPACK_LAYERS_NAMES.actionBrowser,
3183
- WEBPACK_LAYERS_NAMES.instrument,
3184
- WEBPACK_LAYERS_NAMES.middleware
3185
- ],
3186
- neutralTarget: [
3187
- // pages api
3188
- WEBPACK_LAYERS_NAMES.apiNode,
3189
- WEBPACK_LAYERS_NAMES.apiEdge
3190
- ],
3191
- clientOnly: [
3192
- WEBPACK_LAYERS_NAMES.serverSideRendering,
3193
- WEBPACK_LAYERS_NAMES.appPagesBrowser
3194
- ],
3195
- bundled: [
3196
- WEBPACK_LAYERS_NAMES.reactServerComponents,
3197
- WEBPACK_LAYERS_NAMES.actionBrowser,
3198
- WEBPACK_LAYERS_NAMES.serverSideRendering,
3199
- WEBPACK_LAYERS_NAMES.appPagesBrowser,
3200
- WEBPACK_LAYERS_NAMES.shared,
3201
- WEBPACK_LAYERS_NAMES.instrument,
3202
- WEBPACK_LAYERS_NAMES.middleware
3203
- ],
3204
- appPages: [
3205
- // app router pages and layouts
3206
- WEBPACK_LAYERS_NAMES.reactServerComponents,
3207
- WEBPACK_LAYERS_NAMES.serverSideRendering,
3208
- WEBPACK_LAYERS_NAMES.appPagesBrowser,
3209
- WEBPACK_LAYERS_NAMES.actionBrowser
3210
- ]
3211
- }
3212
- };
3213
- var WEBPACK_RESOURCE_QUERIES = {
3214
- edgeSSREntry: "__next_edge_ssr_entry__",
3215
- metadata: "__next_metadata__",
3216
- metadataRoute: "__next_metadata_route__",
3217
- metadataImageMeta: "__next_metadata_image_meta__"
3218
- };
3219
- }
3220
- });
3221
-
3222
- // node_modules/next/dist/shared/lib/escape-regexp.js
3223
- var require_escape_regexp = __commonJS({
3224
- "node_modules/next/dist/shared/lib/escape-regexp.js"(exports2) {
3225
- "use strict";
3226
- Object.defineProperty(exports2, "__esModule", {
3227
- value: true
3228
- });
3229
- Object.defineProperty(exports2, "escapeStringRegexp", {
3230
- enumerable: true,
3231
- get: function() {
3232
- return escapeStringRegexp;
3233
- }
3234
- });
3235
- var reHasRegExp = /[|\\{}()[\]^$+*?.-]/;
3236
- var reReplaceRegExp = /[|\\{}()[\]^$+*?.-]/g;
3237
- function escapeStringRegexp(str) {
3238
- if (reHasRegExp.test(str)) {
3239
- return str.replace(reReplaceRegExp, "\\$&");
3240
- }
3241
- return str;
3242
- }
3243
- }
3244
- });
3245
-
3246
- // node_modules/next/dist/shared/lib/invariant-error.js
3247
- var require_invariant_error = __commonJS({
3248
- "node_modules/next/dist/shared/lib/invariant-error.js"(exports2) {
3249
- "use strict";
3250
- Object.defineProperty(exports2, "__esModule", {
3251
- value: true
3252
- });
3253
- Object.defineProperty(exports2, "InvariantError", {
3254
- enumerable: true,
3255
- get: function() {
3256
- return InvariantError;
3257
- }
3258
- });
3259
- var InvariantError = class extends Error {
3260
- constructor(message, options) {
3261
- super(`Invariant: ${message.endsWith(".") ? message : message + "."} This is a bug in Next.js.`, options);
3262
- this.name = "InvariantError";
3263
- }
3264
- };
3265
- }
3266
- });
3267
-
3268
- // node_modules/next/dist/shared/lib/router/utils/parse-loader-tree.js
3269
- var require_parse_loader_tree = __commonJS({
3270
- "node_modules/next/dist/shared/lib/router/utils/parse-loader-tree.js"(exports2) {
3271
- "use strict";
3272
- Object.defineProperty(exports2, "__esModule", {
3273
- value: true
3274
- });
3275
- Object.defineProperty(exports2, "parseLoaderTree", {
3276
- enumerable: true,
3277
- get: function() {
3278
- return parseLoaderTree;
3279
- }
3280
- });
3281
- var _segment = require_segment();
3282
- function parseLoaderTree(tree) {
3283
- const [segment, parallelRoutes, modules] = tree;
3284
- const { layout, template } = modules;
3285
- let { page } = modules;
3286
- page = segment === _segment.DEFAULT_SEGMENT_KEY ? modules.defaultPage : page;
3287
- const conventionPath = layout?.[1] || template?.[1] || page?.[1];
3288
- return {
3289
- page,
3290
- segment,
3291
- modules,
3292
- /* it can be either layout / template / page */
3293
- conventionPath,
3294
- parallelRoutes
3295
- };
3296
- }
3297
- }
3298
- });
3299
-
3300
- // node_modules/next/dist/shared/lib/router/utils/get-segment-param.js
3301
- var require_get_segment_param = __commonJS({
3302
- "node_modules/next/dist/shared/lib/router/utils/get-segment-param.js"(exports2) {
3303
- "use strict";
3304
- Object.defineProperty(exports2, "__esModule", {
3305
- value: true
3306
- });
3307
- function _export(target, all) {
3308
- for (var name in all) Object.defineProperty(target, name, {
3309
- enumerable: true,
3310
- get: all[name]
3311
- });
3312
- }
3313
- _export(exports2, {
3314
- getParamProperties: function() {
3315
- return getParamProperties;
3316
- },
3317
- getSegmentParam: function() {
3318
- return getSegmentParam;
3319
- },
3320
- isCatchAll: function() {
3321
- return isCatchAll;
3322
- }
3323
- });
3324
- var _interceptionroutes = require_interception_routes();
3325
- function getSegmentParam(segment) {
3326
- const interceptionMarker = _interceptionroutes.INTERCEPTION_ROUTE_MARKERS.find((marker) => segment.startsWith(marker));
3327
- if (interceptionMarker) {
3328
- segment = segment.slice(interceptionMarker.length);
3329
- }
3330
- if (segment.startsWith("[[...") && segment.endsWith("]]")) {
3331
- return {
3332
- // TODO-APP: Optional catchall does not currently work with parallel routes,
3333
- // so for now aren't handling a potential interception marker.
3334
- paramType: "optional-catchall",
3335
- paramName: segment.slice(5, -2)
3336
- };
3337
- }
3338
- if (segment.startsWith("[...") && segment.endsWith("]")) {
3339
- return {
3340
- paramType: interceptionMarker ? `catchall-intercepted-${interceptionMarker}` : "catchall",
3341
- paramName: segment.slice(4, -1)
3342
- };
3343
- }
3344
- if (segment.startsWith("[") && segment.endsWith("]")) {
3345
- return {
3346
- paramType: interceptionMarker ? `dynamic-intercepted-${interceptionMarker}` : "dynamic",
3347
- paramName: segment.slice(1, -1)
3348
- };
3349
- }
3350
- return null;
3351
- }
3352
- function isCatchAll(type) {
3353
- return type === "catchall" || type === "catchall-intercepted-(..)(..)" || type === "catchall-intercepted-(.)" || type === "catchall-intercepted-(..)" || type === "catchall-intercepted-(...)" || type === "optional-catchall";
3354
- }
3355
- function getParamProperties(paramType) {
3356
- let repeat = false;
3357
- let optional = false;
3358
- switch (paramType) {
3359
- case "catchall":
3360
- case "catchall-intercepted-(..)(..)":
3361
- case "catchall-intercepted-(.)":
3362
- case "catchall-intercepted-(..)":
3363
- case "catchall-intercepted-(...)":
3364
- repeat = true;
3365
- break;
3366
- case "optional-catchall":
3367
- repeat = true;
3368
- optional = true;
3369
- break;
3370
- case "dynamic":
3371
- case "dynamic-intercepted-(..)(..)":
3372
- case "dynamic-intercepted-(.)":
3373
- case "dynamic-intercepted-(..)":
3374
- case "dynamic-intercepted-(...)":
3375
- break;
3376
- default:
3377
- paramType;
3378
- }
3379
- return {
3380
- repeat,
3381
- optional
3382
- };
3383
- }
3384
- }
3385
- });
3386
-
3387
- // node_modules/next/dist/shared/lib/router/routes/app.js
3388
- var require_app = __commonJS({
3389
- "node_modules/next/dist/shared/lib/router/routes/app.js"(exports2) {
3390
- "use strict";
3391
- Object.defineProperty(exports2, "__esModule", {
3392
- value: true
3393
- });
3394
- function _export(target, all) {
3395
- for (var name in all) Object.defineProperty(target, name, {
3396
- enumerable: true,
3397
- get: all[name]
3398
- });
3399
- }
3400
- _export(exports2, {
3401
- isInterceptionAppRoute: function() {
3402
- return isInterceptionAppRoute;
3403
- },
3404
- isNormalizedAppRoute: function() {
3405
- return isNormalizedAppRoute;
3406
- },
3407
- parseAppRoute: function() {
3408
- return parseAppRoute;
3409
- },
3410
- parseAppRouteSegment: function() {
3411
- return parseAppRouteSegment;
3412
- }
3413
- });
3414
- var _invarianterror = require_invariant_error();
3415
- var _getsegmentparam = require_get_segment_param();
3416
- var _interceptionroutes = require_interception_routes();
3417
- function parseAppRouteSegment(segment) {
3418
- if (segment === "") {
3419
- return null;
3420
- }
3421
- const interceptionMarker = _interceptionroutes.INTERCEPTION_ROUTE_MARKERS.find((m) => segment.startsWith(m));
3422
- const param = (0, _getsegmentparam.getSegmentParam)(segment);
3423
- if (param) {
3424
- return {
3425
- type: "dynamic",
3426
- name: segment,
3427
- param,
3428
- interceptionMarker
3429
- };
3430
- } else if (segment.startsWith("(") && segment.endsWith(")")) {
3431
- return {
3432
- type: "route-group",
3433
- name: segment,
3434
- interceptionMarker
3435
- };
3436
- } else if (segment.startsWith("@")) {
3437
- return {
3438
- type: "parallel-route",
3439
- name: segment,
3440
- interceptionMarker
3441
- };
3442
- } else {
3443
- return {
3444
- type: "static",
3445
- name: segment,
3446
- interceptionMarker
3447
- };
3448
- }
3449
- }
3450
- function isNormalizedAppRoute(route) {
3451
- return route.normalized;
3452
- }
3453
- function isInterceptionAppRoute(route) {
3454
- return route.interceptionMarker !== void 0 && route.interceptingRoute !== void 0 && route.interceptedRoute !== void 0;
3455
- }
3456
- function parseAppRoute(pathname, normalized) {
3457
- const pathnameSegments = pathname.split("/").filter(Boolean);
3458
- const segments = [];
3459
- let interceptionMarker;
3460
- let interceptingRoute;
3461
- let interceptedRoute;
3462
- for (const segment of pathnameSegments) {
3463
- const appSegment = parseAppRouteSegment(segment);
3464
- if (!appSegment) {
3465
- continue;
3466
- }
3467
- if (normalized && (appSegment.type === "route-group" || appSegment.type === "parallel-route")) {
3468
- 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", {
3469
- value: "E923",
3470
- enumerable: false,
3471
- configurable: true
3472
- });
3473
- }
3474
- segments.push(appSegment);
3475
- if (appSegment.interceptionMarker) {
3476
- const parts = pathname.split(appSegment.interceptionMarker);
3477
- if (parts.length !== 2) {
3478
- throw Object.defineProperty(new Error(`Invalid interception route: ${pathname}`), "__NEXT_ERROR_CODE", {
3479
- value: "E924",
3480
- enumerable: false,
3481
- configurable: true
3482
- });
3483
- }
3484
- interceptingRoute = normalized ? parseAppRoute(parts[0], true) : parseAppRoute(parts[0], false);
3485
- interceptedRoute = normalized ? parseAppRoute(parts[1], true) : parseAppRoute(parts[1], false);
3486
- interceptionMarker = appSegment.interceptionMarker;
3487
- }
3488
- }
3489
- const dynamicSegments = segments.filter((segment) => segment.type === "dynamic");
3490
- return {
3491
- normalized,
3492
- pathname,
3493
- segments,
3494
- dynamicSegments,
3495
- interceptionMarker,
3496
- interceptingRoute,
3497
- interceptedRoute
3498
- };
3499
- }
3500
- }
3501
- });
3502
-
3503
- // node_modules/next/dist/shared/lib/router/utils/interception-prefix-from-param-type.js
3504
- var require_interception_prefix_from_param_type = __commonJS({
3505
- "node_modules/next/dist/shared/lib/router/utils/interception-prefix-from-param-type.js"(exports2) {
3506
- "use strict";
3507
- Object.defineProperty(exports2, "__esModule", {
3508
- value: true
3509
- });
3510
- Object.defineProperty(exports2, "interceptionPrefixFromParamType", {
3511
- enumerable: true,
3512
- get: function() {
3513
- return interceptionPrefixFromParamType;
3514
- }
3515
- });
3516
- function interceptionPrefixFromParamType(paramType) {
3517
- switch (paramType) {
3518
- case "catchall-intercepted-(..)(..)":
3519
- case "dynamic-intercepted-(..)(..)":
3520
- return "(..)(..)";
3521
- case "catchall-intercepted-(.)":
3522
- case "dynamic-intercepted-(.)":
3523
- return "(.)";
3524
- case "catchall-intercepted-(..)":
3525
- case "dynamic-intercepted-(..)":
3526
- return "(..)";
3527
- case "catchall-intercepted-(...)":
3528
- case "dynamic-intercepted-(...)":
3529
- return "(...)";
3530
- case "catchall":
3531
- case "dynamic":
3532
- case "optional-catchall":
3533
- default:
3534
- return null;
3535
- }
3536
- }
3537
- }
3538
- });
3539
-
3540
- // node_modules/next/dist/shared/lib/router/utils/resolve-param-value.js
3541
- var require_resolve_param_value = __commonJS({
3542
- "node_modules/next/dist/shared/lib/router/utils/resolve-param-value.js"(exports2) {
3543
- "use strict";
3544
- Object.defineProperty(exports2, "__esModule", {
3545
- value: true
3546
- });
3547
- Object.defineProperty(exports2, "resolveParamValue", {
3548
- enumerable: true,
3549
- get: function() {
3550
- return resolveParamValue;
3551
- }
3552
- });
3553
- var _invarianterror = require_invariant_error();
3554
- var _interceptionprefixfromparamtype = require_interception_prefix_from_param_type();
3555
- function getParamValueFromSegment(pathSegment, params, paramType) {
3556
- if (pathSegment.type === "dynamic") {
3557
- return params[pathSegment.param.paramName];
3558
- }
3559
- const interceptionPrefix = (0, _interceptionprefixfromparamtype.interceptionPrefixFromParamType)(paramType);
3560
- if (interceptionPrefix === pathSegment.interceptionMarker) {
3561
- return pathSegment.name.replace(pathSegment.interceptionMarker, "");
3562
- }
3563
- return pathSegment.name;
3564
- }
3565
- function resolveParamValue(paramName, paramType, depth, route, params) {
3566
- switch (paramType) {
3567
- case "catchall":
3568
- case "optional-catchall":
3569
- case "catchall-intercepted-(..)(..)":
3570
- case "catchall-intercepted-(.)":
3571
- case "catchall-intercepted-(..)":
3572
- case "catchall-intercepted-(...)":
3573
- const processedSegments = [];
3574
- for (let index = depth; index < route.segments.length; index++) {
3575
- const pathSegment = route.segments[index];
3576
- if (pathSegment.type === "static") {
3577
- let value = pathSegment.name;
3578
- const interceptionPrefix = (0, _interceptionprefixfromparamtype.interceptionPrefixFromParamType)(paramType);
3579
- if (interceptionPrefix && index === depth && interceptionPrefix === pathSegment.interceptionMarker) {
3580
- value = value.replace(pathSegment.interceptionMarker, "");
3581
- }
3582
- processedSegments.push(value);
3583
- } else {
3584
- if (!params.hasOwnProperty(pathSegment.param.paramName)) {
3585
- if (pathSegment.param.paramType === "optional-catchall") {
3586
- break;
3587
- }
3588
- return void 0;
3589
- }
3590
- const paramValue = params[pathSegment.param.paramName];
3591
- if (Array.isArray(paramValue)) {
3592
- processedSegments.push(...paramValue);
3593
- } else {
3594
- processedSegments.push(paramValue);
3595
- }
3596
- }
3597
- }
3598
- if (processedSegments.length > 0) {
3599
- return processedSegments;
3600
- } else if (paramType === "optional-catchall") {
3601
- return void 0;
3602
- } else {
3603
- 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", {
3604
- value: "E931",
3605
- enumerable: false,
3606
- configurable: true
3607
- });
3608
- }
3609
- case "dynamic":
3610
- case "dynamic-intercepted-(..)(..)":
3611
- case "dynamic-intercepted-(.)":
3612
- case "dynamic-intercepted-(..)":
3613
- case "dynamic-intercepted-(...)":
3614
- if (depth < route.segments.length) {
3615
- const pathSegment = route.segments[depth];
3616
- if (pathSegment.type === "dynamic" && !params.hasOwnProperty(pathSegment.param.paramName)) {
3617
- return void 0;
3618
- }
3619
- return getParamValueFromSegment(pathSegment, params, paramType);
3620
- }
3621
- return void 0;
3622
- default:
3623
- paramType;
3624
- }
3625
- }
3626
- }
3627
- });
3628
-
3629
- // node_modules/next/dist/shared/lib/router/utils/get-dynamic-param.js
3630
- var require_get_dynamic_param = __commonJS({
3631
- "node_modules/next/dist/shared/lib/router/utils/get-dynamic-param.js"(exports2) {
3632
- "use strict";
3633
- Object.defineProperty(exports2, "__esModule", {
3634
- value: true
3635
- });
3636
- function _export(target, all) {
3637
- for (var name in all) Object.defineProperty(target, name, {
3638
- enumerable: true,
3639
- get: all[name]
3640
- });
3641
- }
3642
- _export(exports2, {
3643
- PARAMETER_PATTERN: function() {
3644
- return PARAMETER_PATTERN;
3645
- },
3646
- getDynamicParam: function() {
3647
- return getDynamicParam;
3648
- },
3649
- interpolateParallelRouteParams: function() {
3650
- return interpolateParallelRouteParams;
3651
- },
3652
- parseMatchedParameter: function() {
3653
- return parseMatchedParameter;
3654
- },
3655
- parseParameter: function() {
3656
- return parseParameter;
3657
- }
3658
- });
3659
- var _invarianterror = require_invariant_error();
3660
- var _parseloadertree = require_parse_loader_tree();
3661
- var _app = require_app();
3662
- var _resolveparamvalue = require_resolve_param_value();
3663
- function getParamValue(interpolatedParams, segmentKey, fallbackRouteParams) {
3664
- let value = interpolatedParams[segmentKey];
3665
- if (fallbackRouteParams?.has(segmentKey)) {
3666
- const [searchValue] = fallbackRouteParams.get(segmentKey);
3667
- value = searchValue;
3668
- } else if (Array.isArray(value)) {
3669
- value = value.map((i) => encodeURIComponent(i));
3670
- } else if (typeof value === "string") {
3671
- value = encodeURIComponent(value);
3672
- }
3673
- return value;
3674
- }
3675
- function interpolateParallelRouteParams(loaderTree, params, pagePath, fallbackRouteParams) {
3676
- const interpolated = structuredClone(params);
3677
- const stack = [
3678
- {
3679
- tree: loaderTree,
3680
- depth: 0
3681
- }
3682
- ];
3683
- const route = (0, _app.parseAppRoute)(pagePath, true);
3684
- while (stack.length > 0) {
3685
- const { tree, depth } = stack.pop();
3686
- const { segment, parallelRoutes } = (0, _parseloadertree.parseLoaderTree)(tree);
3687
- const appSegment = (0, _app.parseAppRouteSegment)(segment);
3688
- if (appSegment?.type === "dynamic" && !interpolated.hasOwnProperty(appSegment.param.paramName) && // If the param is in the fallback route params, we don't need to
3689
- // interpolate it because it's already marked as being unknown.
3690
- !fallbackRouteParams?.has(appSegment.param.paramName)) {
3691
- const { paramName, paramType } = appSegment.param;
3692
- const paramValue = (0, _resolveparamvalue.resolveParamValue)(paramName, paramType, depth, route, interpolated);
3693
- if (paramValue !== void 0) {
3694
- interpolated[paramName] = paramValue;
3695
- } else if (paramType !== "optional-catchall") {
3696
- throw Object.defineProperty(new _invarianterror.InvariantError(`Could not resolve param value for segment: ${paramName}`), "__NEXT_ERROR_CODE", {
3697
- value: "E932",
3698
- enumerable: false,
3699
- configurable: true
3700
- });
3701
- }
3702
- }
3703
- let nextDepth = depth;
3704
- if (appSegment && appSegment.type !== "route-group" && appSegment.type !== "parallel-route") {
3705
- nextDepth++;
3706
- }
3707
- for (const parallelRoute of Object.values(parallelRoutes)) {
3708
- stack.push({
3709
- tree: parallelRoute,
3710
- depth: nextDepth
3711
- });
3712
- }
3713
- }
3714
- return interpolated;
3715
- }
3716
- function getDynamicParam(interpolatedParams, segmentKey, dynamicParamType, fallbackRouteParams) {
3717
- let value = getParamValue(interpolatedParams, segmentKey, fallbackRouteParams);
3718
- if (!value || value.length === 0) {
3719
- if (dynamicParamType === "oc") {
3720
- return {
3721
- param: segmentKey,
3722
- value: null,
3723
- type: dynamicParamType,
3724
- treeSegment: [
3725
- segmentKey,
3726
- "",
3727
- dynamicParamType
3728
- ]
3729
- };
3730
- }
3731
- throw Object.defineProperty(new _invarianterror.InvariantError(`Missing value for segment key: "${segmentKey}" with dynamic param type: ${dynamicParamType}`), "__NEXT_ERROR_CODE", {
3732
- value: "E864",
3733
- enumerable: false,
3734
- configurable: true
3735
- });
3736
- }
3737
- return {
3738
- param: segmentKey,
3739
- // The value that is passed to user code.
3740
- value,
3741
- // The value that is rendered in the router tree.
3742
- treeSegment: [
3743
- segmentKey,
3744
- Array.isArray(value) ? value.join("/") : value,
3745
- dynamicParamType
3746
- ],
3747
- type: dynamicParamType
3748
- };
3749
- }
3750
- var PARAMETER_PATTERN = /^([^[]*)\[((?:\[[^\]]*\])|[^\]]+)\](.*)$/;
3751
- function parseParameter(param) {
3752
- const match = param.match(PARAMETER_PATTERN);
3753
- if (!match) {
3754
- return parseMatchedParameter(param);
3755
- }
3756
- return parseMatchedParameter(match[2]);
3757
- }
3758
- function parseMatchedParameter(param) {
3759
- const optional = param.startsWith("[") && param.endsWith("]");
3760
- if (optional) {
3761
- param = param.slice(1, -1);
3762
- }
3763
- const repeat = param.startsWith("...");
3764
- if (repeat) {
3765
- param = param.slice(3);
3766
- }
3767
- return {
3768
- key: param,
3769
- repeat,
3770
- optional
3771
- };
3772
- }
3773
- }
3774
- });
3775
-
3776
- // node_modules/next/dist/shared/lib/router/utils/route-regex.js
3777
- var require_route_regex = __commonJS({
3778
- "node_modules/next/dist/shared/lib/router/utils/route-regex.js"(exports2) {
3779
- "use strict";
3780
- Object.defineProperty(exports2, "__esModule", {
3781
- value: true
3782
- });
3783
- function _export(target, all) {
3784
- for (var name in all) Object.defineProperty(target, name, {
3785
- enumerable: true,
3786
- get: all[name]
3787
- });
3788
- }
3789
- _export(exports2, {
3790
- getNamedMiddlewareRegex: function() {
3791
- return getNamedMiddlewareRegex;
3792
- },
3793
- getNamedRouteRegex: function() {
3794
- return getNamedRouteRegex;
3795
- },
3796
- getRouteRegex: function() {
3797
- return getRouteRegex;
3798
- }
3799
- });
3800
- var _constants = require_constants();
3801
- var _interceptionroutes = require_interception_routes();
3802
- var _escaperegexp = require_escape_regexp();
3803
- var _removetrailingslash = require_remove_trailing_slash();
3804
- var _getdynamicparam = require_get_dynamic_param();
3805
- function getParametrizedRoute(route, includeSuffix, includePrefix) {
3806
- const groups = {};
3807
- let groupIndex = 1;
3808
- const segments = [];
3809
- for (const segment of (0, _removetrailingslash.removeTrailingSlash)(route).slice(1).split("/")) {
3810
- const markerMatch = _interceptionroutes.INTERCEPTION_ROUTE_MARKERS.find((m) => segment.startsWith(m));
3811
- const paramMatches = segment.match(_getdynamicparam.PARAMETER_PATTERN);
3812
- if (markerMatch && paramMatches && paramMatches[2]) {
3813
- const { key, optional, repeat } = (0, _getdynamicparam.parseMatchedParameter)(paramMatches[2]);
3814
- groups[key] = {
3815
- pos: groupIndex++,
3816
- repeat,
3817
- optional
3818
- };
3819
- segments.push(`/${(0, _escaperegexp.escapeStringRegexp)(markerMatch)}([^/]+?)`);
3820
- } else if (paramMatches && paramMatches[2]) {
3821
- const { key, repeat, optional } = (0, _getdynamicparam.parseMatchedParameter)(paramMatches[2]);
3822
- groups[key] = {
3823
- pos: groupIndex++,
3824
- repeat,
3825
- optional
3826
- };
3827
- if (includePrefix && paramMatches[1]) {
3828
- segments.push(`/${(0, _escaperegexp.escapeStringRegexp)(paramMatches[1])}`);
3829
- }
3830
- let s = repeat ? optional ? "(?:/(.+?))?" : "/(.+?)" : "/([^/]+?)";
3831
- if (includePrefix && paramMatches[1]) {
3832
- s = s.substring(1);
3833
- }
3834
- segments.push(s);
3835
- } else {
3836
- segments.push(`/${(0, _escaperegexp.escapeStringRegexp)(segment)}`);
3837
- }
3838
- if (includeSuffix && paramMatches && paramMatches[3]) {
3839
- segments.push((0, _escaperegexp.escapeStringRegexp)(paramMatches[3]));
3840
- }
3841
- }
3842
- return {
3843
- parameterizedRoute: segments.join(""),
3844
- groups
3845
- };
3846
- }
3847
- function getRouteRegex(normalizedRoute, { includeSuffix = false, includePrefix = false, excludeOptionalTrailingSlash = false } = {}) {
3848
- const { parameterizedRoute, groups } = getParametrizedRoute(normalizedRoute, includeSuffix, includePrefix);
3849
- let re = parameterizedRoute;
3850
- if (!excludeOptionalTrailingSlash) {
3851
- re += "(?:/)?";
3852
- }
3853
- return {
3854
- re: new RegExp(`^${re}$`),
3855
- groups
3856
- };
3857
- }
3858
- function buildGetSafeRouteKey() {
3859
- let i = 0;
3860
- return () => {
3861
- let routeKey = "";
3862
- let j = ++i;
3863
- while (j > 0) {
3864
- routeKey += String.fromCharCode(97 + (j - 1) % 26);
3865
- j = Math.floor((j - 1) / 26);
3866
- }
3867
- return routeKey;
3868
- };
3869
- }
3870
- function getSafeKeyFromSegment({ interceptionMarker, getSafeRouteKey, segment, routeKeys, keyPrefix, backreferenceDuplicateKeys }) {
3871
- const { key, optional, repeat } = (0, _getdynamicparam.parseMatchedParameter)(segment);
3872
- let cleanedKey = key.replace(/\W/g, "");
3873
- if (keyPrefix) {
3874
- cleanedKey = `${keyPrefix}${cleanedKey}`;
3875
- }
3876
- let invalidKey = false;
3877
- if (cleanedKey.length === 0 || cleanedKey.length > 30) {
3878
- invalidKey = true;
3879
- }
3880
- if (!isNaN(parseInt(cleanedKey.slice(0, 1)))) {
3881
- invalidKey = true;
3882
- }
3883
- if (invalidKey) {
3884
- cleanedKey = getSafeRouteKey();
3885
- }
3886
- const duplicateKey = cleanedKey in routeKeys;
3887
- if (keyPrefix) {
3888
- routeKeys[cleanedKey] = `${keyPrefix}${key}`;
3889
- } else {
3890
- routeKeys[cleanedKey] = key;
3891
- }
3892
- const interceptionPrefix = interceptionMarker ? (0, _escaperegexp.escapeStringRegexp)(interceptionMarker) : "";
3893
- let pattern;
3894
- if (duplicateKey && backreferenceDuplicateKeys) {
3895
- pattern = `\\k<${cleanedKey}>`;
3896
- } else if (repeat) {
3897
- pattern = `(?<${cleanedKey}>.+?)`;
3898
- } else {
3899
- pattern = `(?<${cleanedKey}>[^/]+?)`;
3900
- }
3901
- return {
3902
- key,
3903
- pattern: optional ? `(?:/${interceptionPrefix}${pattern})?` : `/${interceptionPrefix}${pattern}`,
3904
- cleanedKey,
3905
- optional,
3906
- repeat
3907
- };
3908
- }
3909
- function getNamedParametrizedRoute(route, prefixRouteKeys, includeSuffix, includePrefix, backreferenceDuplicateKeys, reference = {
3910
- names: {},
3911
- intercepted: {}
3912
- }) {
3913
- var _a, _b;
3914
- const getSafeRouteKey = buildGetSafeRouteKey();
3915
- const routeKeys = {};
3916
- const segments = [];
3917
- const inverseParts = [];
3918
- reference = structuredClone(reference);
3919
- for (const segment of (0, _removetrailingslash.removeTrailingSlash)(route).slice(1).split("/")) {
3920
- const hasInterceptionMarker = _interceptionroutes.INTERCEPTION_ROUTE_MARKERS.some((m) => segment.startsWith(m));
3921
- const paramMatches = segment.match(_getdynamicparam.PARAMETER_PATTERN);
3922
- const interceptionMarker = hasInterceptionMarker ? paramMatches?.[1] : void 0;
3923
- let keyPrefix;
3924
- if (interceptionMarker && paramMatches?.[2]) {
3925
- keyPrefix = prefixRouteKeys ? _constants.NEXT_INTERCEPTION_MARKER_PREFIX : void 0;
3926
- reference.intercepted[paramMatches[2]] = interceptionMarker;
3927
- } else if (paramMatches?.[2] && reference.intercepted[paramMatches[2]]) {
3928
- keyPrefix = prefixRouteKeys ? _constants.NEXT_INTERCEPTION_MARKER_PREFIX : void 0;
3929
- } else {
3930
- keyPrefix = prefixRouteKeys ? _constants.NEXT_QUERY_PARAM_PREFIX : void 0;
3931
- }
3932
- if (interceptionMarker && paramMatches && paramMatches[2]) {
3933
- const { key, pattern, cleanedKey, repeat, optional } = getSafeKeyFromSegment({
3934
- getSafeRouteKey,
3935
- interceptionMarker,
3936
- segment: paramMatches[2],
3937
- routeKeys,
3938
- keyPrefix,
3939
- backreferenceDuplicateKeys
3940
- });
3941
- segments.push(pattern);
3942
- inverseParts.push(`/${paramMatches[1]}:${reference.names[key] ?? cleanedKey}${repeat ? optional ? "*" : "+" : ""}`);
3943
- (_a = reference.names)[key] ?? (_a[key] = cleanedKey);
3944
- } else if (paramMatches && paramMatches[2]) {
3945
- if (includePrefix && paramMatches[1]) {
3946
- segments.push(`/${(0, _escaperegexp.escapeStringRegexp)(paramMatches[1])}`);
3947
- inverseParts.push(`/${paramMatches[1]}`);
3948
- }
3949
- const { key, pattern, cleanedKey, repeat, optional } = getSafeKeyFromSegment({
3950
- getSafeRouteKey,
3951
- segment: paramMatches[2],
3952
- routeKeys,
3953
- keyPrefix,
3954
- backreferenceDuplicateKeys
3955
- });
3956
- let s = pattern;
3957
- if (includePrefix && paramMatches[1]) {
3958
- s = s.substring(1);
3959
- }
3960
- segments.push(s);
3961
- inverseParts.push(`/:${reference.names[key] ?? cleanedKey}${repeat ? optional ? "*" : "+" : ""}`);
3962
- (_b = reference.names)[key] ?? (_b[key] = cleanedKey);
3963
- } else {
3964
- segments.push(`/${(0, _escaperegexp.escapeStringRegexp)(segment)}`);
3965
- inverseParts.push(`/${segment}`);
3966
- }
3967
- if (includeSuffix && paramMatches && paramMatches[3]) {
3968
- segments.push((0, _escaperegexp.escapeStringRegexp)(paramMatches[3]));
3969
- inverseParts.push(paramMatches[3]);
3970
- }
3971
- }
3972
- return {
3973
- namedParameterizedRoute: segments.join(""),
3974
- routeKeys,
3975
- pathToRegexpPattern: inverseParts.join(""),
3976
- reference
3977
- };
3978
- }
3979
- function getNamedRouteRegex(normalizedRoute, options) {
3980
- const result = getNamedParametrizedRoute(normalizedRoute, options.prefixRouteKeys, options.includeSuffix ?? false, options.includePrefix ?? false, options.backreferenceDuplicateKeys ?? false, options.reference);
3981
- let namedRegex = result.namedParameterizedRoute;
3982
- if (!options.excludeOptionalTrailingSlash) {
3983
- namedRegex += "(?:/)?";
3984
- }
3985
- return {
3986
- ...getRouteRegex(normalizedRoute, options),
3987
- namedRegex: `^${namedRegex}$`,
3988
- routeKeys: result.routeKeys,
3989
- pathToRegexpPattern: result.pathToRegexpPattern,
3990
- reference: result.reference
3991
- };
3992
- }
3993
- function getNamedMiddlewareRegex(normalizedRoute, options) {
3994
- const { parameterizedRoute } = getParametrizedRoute(normalizedRoute, false, false);
3995
- const { catchAll = true } = options;
3996
- if (parameterizedRoute === "/") {
3997
- let catchAllRegex = catchAll ? ".*" : "";
3998
- return {
3999
- namedRegex: `^/${catchAllRegex}$`
4000
- };
4001
- }
4002
- const { namedParameterizedRoute } = getNamedParametrizedRoute(normalizedRoute, false, false, false, false, void 0);
4003
- let catchAllGroupedRegex = catchAll ? "(?:(/.*)?)" : "";
4004
- return {
4005
- namedRegex: `^${namedParameterizedRoute}${catchAllGroupedRegex}$`
4006
- };
4007
- }
4008
- }
4009
- });
4010
-
4011
- // node_modules/next/dist/shared/lib/router/utils/interpolate-as.js
4012
- var require_interpolate_as = __commonJS({
4013
- "node_modules/next/dist/shared/lib/router/utils/interpolate-as.js"(exports2) {
4014
- "use strict";
4015
- Object.defineProperty(exports2, "__esModule", {
4016
- value: true
4017
- });
4018
- Object.defineProperty(exports2, "interpolateAs", {
4019
- enumerable: true,
4020
- get: function() {
4021
- return interpolateAs;
4022
- }
4023
- });
4024
- var _routematcher = require_route_matcher();
4025
- var _routeregex = require_route_regex();
4026
- function interpolateAs(route, asPathname, query) {
4027
- let interpolatedRoute = "";
4028
- const dynamicRegex = (0, _routeregex.getRouteRegex)(route);
4029
- const dynamicGroups = dynamicRegex.groups;
4030
- const dynamicMatches = (
4031
- // Try to match the dynamic route against the asPath
4032
- (asPathname !== route ? (0, _routematcher.getRouteMatcher)(dynamicRegex)(asPathname) : "") || // Fall back to reading the values from the href
4033
- // TODO: should this take priority; also need to change in the router.
4034
- query
4035
- );
4036
- interpolatedRoute = route;
4037
- const params = Object.keys(dynamicGroups);
4038
- if (!params.every((param) => {
4039
- let value = dynamicMatches[param] || "";
4040
- const { repeat, optional } = dynamicGroups[param];
4041
- let replaced = `[${repeat ? "..." : ""}${param}]`;
4042
- if (optional) {
4043
- replaced = `${!value ? "/" : ""}[${replaced}]`;
4044
- }
4045
- if (repeat && !Array.isArray(value)) value = [
4046
- value
4047
- ];
4048
- return (optional || param in dynamicMatches) && // Interpolate group into data URL if present
4049
- (interpolatedRoute = interpolatedRoute.replace(replaced, repeat ? value.map(
4050
- // these values should be fully encoded instead of just
4051
- // path delimiter escaped since they are being inserted
4052
- // into the URL and we expect URL encoded segments
4053
- // when parsing dynamic route params
4054
- (segment) => encodeURIComponent(segment)
4055
- ).join("/") : encodeURIComponent(value)) || "/");
4056
- })) {
4057
- interpolatedRoute = "";
4058
- }
4059
- return {
4060
- params,
4061
- result: interpolatedRoute
4062
- };
4063
- }
4064
- }
4065
- });
4066
-
4067
- // node_modules/next/dist/client/resolve-href.js
4068
- var require_resolve_href = __commonJS({
4069
- "node_modules/next/dist/client/resolve-href.js"(exports2, module2) {
4070
- "use strict";
4071
- Object.defineProperty(exports2, "__esModule", {
4072
- value: true
4073
- });
4074
- Object.defineProperty(exports2, "resolveHref", {
4075
- enumerable: true,
4076
- get: function() {
4077
- return resolveHref;
4078
- }
4079
- });
4080
- var _querystring = require_querystring();
4081
- var _formaturl = require_format_url();
4082
- var _omit = require_omit();
4083
- var _utils = require_utils();
4084
- var _normalizetrailingslash = require_normalize_trailing_slash();
4085
- var _islocalurl = require_is_local_url();
4086
- var _utils1 = require_utils2();
4087
- var _interpolateas = require_interpolate_as();
4088
- var _routeregex = require_route_regex();
4089
- var _routematcher = require_route_matcher();
4090
- function resolveHref(router, href, resolveAs) {
4091
- let base;
4092
- let urlAsString = typeof href === "string" ? href : (0, _formaturl.formatWithValidation)(href);
4093
- const urlProtoMatch = urlAsString.match(/^[a-z][a-z0-9+.-]*:\/\//i);
4094
- const urlAsStringNoProto = urlProtoMatch ? urlAsString.slice(urlProtoMatch[0].length) : urlAsString;
4095
- const urlParts = urlAsStringNoProto.split("?", 1);
4096
- if ((urlParts[0] || "").match(/(\/\/|\\)/)) {
4097
- console.error(`Invalid href '${urlAsString}' passed to next/router in page: '${router.pathname}'. Repeated forward-slashes (//) or backslashes \\ are not valid in the href.`);
4098
- const normalizedUrl = (0, _utils.normalizeRepeatedSlashes)(urlAsStringNoProto);
4099
- urlAsString = (urlProtoMatch ? urlProtoMatch[0] : "") + normalizedUrl;
4100
- }
4101
- if (!(0, _islocalurl.isLocalURL)(urlAsString)) {
4102
- return resolveAs ? [
4103
- urlAsString
4104
- ] : urlAsString;
4105
- }
4106
- try {
4107
- let baseBase = urlAsString.startsWith("#") ? router.asPath : router.pathname;
4108
- if (urlAsString.startsWith("?")) {
4109
- baseBase = router.asPath;
4110
- if ((0, _utils1.isDynamicRoute)(router.pathname)) {
4111
- baseBase = router.pathname;
4112
- const routeRegex = (0, _routeregex.getRouteRegex)(router.pathname);
4113
- const match = (0, _routematcher.getRouteMatcher)(routeRegex)(router.asPath);
4114
- if (!match) {
4115
- baseBase = router.asPath;
4116
- }
4117
- }
4118
- }
4119
- base = new URL(baseBase, "http://n");
4120
- } catch (_) {
4121
- base = new URL("/", "http://n");
4122
- }
4123
- try {
4124
- const finalUrl = new URL(urlAsString, base);
4125
- finalUrl.pathname = (0, _normalizetrailingslash.normalizePathTrailingSlash)(finalUrl.pathname);
4126
- let interpolatedAs = "";
4127
- if ((0, _utils1.isDynamicRoute)(finalUrl.pathname) && finalUrl.searchParams && resolveAs) {
4128
- const query = (0, _querystring.searchParamsToUrlQuery)(finalUrl.searchParams);
4129
- const { result, params } = (0, _interpolateas.interpolateAs)(finalUrl.pathname, finalUrl.pathname, query);
4130
- if (result) {
4131
- interpolatedAs = (0, _formaturl.formatWithValidation)({
4132
- pathname: result,
4133
- hash: finalUrl.hash,
4134
- query: (0, _omit.omit)(query, params)
4135
- });
4136
- }
4137
- }
4138
- const resolvedHref = finalUrl.origin === base.origin ? finalUrl.href.slice(finalUrl.origin.length) : finalUrl.href;
4139
- return resolveAs ? [
4140
- resolvedHref,
4141
- interpolatedAs || resolvedHref
4142
- ] : resolvedHref;
4143
- } catch (_) {
4144
- return resolveAs ? [
4145
- urlAsString
4146
- ] : urlAsString;
4147
- }
4148
- }
4149
- if ((typeof exports2.default === "function" || typeof exports2.default === "object" && exports2.default !== null) && typeof exports2.default.__esModule === "undefined") {
4150
- Object.defineProperty(exports2.default, "__esModule", { value: true });
4151
- Object.assign(exports2.default, exports2);
4152
- module2.exports = exports2.default;
4153
- }
4154
- }
4155
- });
4156
-
4157
- // node_modules/next/dist/shared/lib/router/utils/add-path-prefix.js
4158
- var require_add_path_prefix = __commonJS({
4159
- "node_modules/next/dist/shared/lib/router/utils/add-path-prefix.js"(exports2) {
4160
- "use strict";
4161
- Object.defineProperty(exports2, "__esModule", {
4162
- value: true
4163
- });
4164
- Object.defineProperty(exports2, "addPathPrefix", {
4165
- enumerable: true,
4166
- get: function() {
4167
- return addPathPrefix;
4168
- }
4169
- });
4170
- var _parsepath = require_parse_path();
4171
- function addPathPrefix(path, prefix) {
4172
- if (!path.startsWith("/") || !prefix) {
4173
- return path;
4174
- }
4175
- const { pathname, query, hash } = (0, _parsepath.parsePath)(path);
4176
- return `${prefix}${pathname}${query}${hash}`;
4177
- }
4178
- }
4179
- });
4180
-
4181
- // node_modules/next/dist/shared/lib/router/utils/add-locale.js
4182
- var require_add_locale = __commonJS({
4183
- "node_modules/next/dist/shared/lib/router/utils/add-locale.js"(exports2) {
4184
- "use strict";
4185
- Object.defineProperty(exports2, "__esModule", {
4186
- value: true
4187
- });
4188
- Object.defineProperty(exports2, "addLocale", {
4189
- enumerable: true,
4190
- get: function() {
4191
- return addLocale;
4192
- }
4193
- });
4194
- var _addpathprefix = require_add_path_prefix();
4195
- var _pathhasprefix = require_path_has_prefix();
4196
- function addLocale(path, locale, defaultLocale, ignorePrefix) {
4197
- if (!locale || locale === defaultLocale) return path;
4198
- const lower = path.toLowerCase();
4199
- if (!ignorePrefix) {
4200
- if ((0, _pathhasprefix.pathHasPrefix)(lower, "/api")) return path;
4201
- if ((0, _pathhasprefix.pathHasPrefix)(lower, `/${locale.toLowerCase()}`)) return path;
4202
- }
4203
- return (0, _addpathprefix.addPathPrefix)(path, `/${locale}`);
4204
- }
4205
- }
4206
- });
4207
-
4208
- // node_modules/next/dist/client/add-locale.js
4209
- var require_add_locale2 = __commonJS({
4210
- "node_modules/next/dist/client/add-locale.js"(exports2, module2) {
4211
- "use strict";
4212
- Object.defineProperty(exports2, "__esModule", {
4213
- value: true
4214
- });
4215
- Object.defineProperty(exports2, "addLocale", {
4216
- enumerable: true,
4217
- get: function() {
4218
- return addLocale;
4219
- }
4220
- });
4221
- var _normalizetrailingslash = require_normalize_trailing_slash();
4222
- var addLocale = (path, ...args) => {
4223
- if (process.env.__NEXT_I18N_SUPPORT) {
4224
- return (0, _normalizetrailingslash.normalizePathTrailingSlash)(require_add_locale().addLocale(path, ...args));
4225
- }
4226
- return path;
4227
- };
4228
- if ((typeof exports2.default === "function" || typeof exports2.default === "object" && exports2.default !== null) && typeof exports2.default.__esModule === "undefined") {
4229
- Object.defineProperty(exports2.default, "__esModule", { value: true });
4230
- Object.assign(exports2.default, exports2);
4231
- module2.exports = exports2.default;
4232
- }
4233
- }
4234
- });
4235
-
4236
- // node_modules/@swc/helpers/cjs/_interop_require_default.cjs
4237
- var require_interop_require_default = __commonJS({
4238
- "node_modules/@swc/helpers/cjs/_interop_require_default.cjs"(exports2) {
4239
- "use strict";
4240
- function _interop_require_default(obj) {
4241
- return obj && obj.__esModule ? obj : { default: obj };
4242
- }
4243
- exports2._ = _interop_require_default;
4244
- }
4245
- });
4246
-
4247
- // node_modules/next/dist/shared/lib/router-context.shared-runtime.js
4248
- var require_router_context_shared_runtime = __commonJS({
4249
- "node_modules/next/dist/shared/lib/router-context.shared-runtime.js"(exports2) {
4250
- "use strict";
4251
- Object.defineProperty(exports2, "__esModule", {
4252
- value: true
4253
- });
4254
- Object.defineProperty(exports2, "RouterContext", {
4255
- enumerable: true,
4256
- get: function() {
4257
- return RouterContext;
4258
- }
4259
- });
4260
- var _interop_require_default = require_interop_require_default();
4261
- var _react = /* @__PURE__ */ _interop_require_default._(require("react"));
4262
- var RouterContext = _react.default.createContext(null);
4263
- if (process.env.NODE_ENV !== "production") {
4264
- RouterContext.displayName = "RouterContext";
4265
- }
4266
- }
4267
- });
4268
-
4269
- // node_modules/next/dist/client/request-idle-callback.js
4270
- var require_request_idle_callback = __commonJS({
4271
- "node_modules/next/dist/client/request-idle-callback.js"(exports2, module2) {
4272
- "use strict";
4273
- Object.defineProperty(exports2, "__esModule", {
4274
- value: true
4275
- });
4276
- function _export(target, all) {
4277
- for (var name in all) Object.defineProperty(target, name, {
4278
- enumerable: true,
4279
- get: all[name]
4280
- });
4281
- }
4282
- _export(exports2, {
4283
- cancelIdleCallback: function() {
4284
- return cancelIdleCallback;
4285
- },
4286
- requestIdleCallback: function() {
4287
- return requestIdleCallback;
4288
- }
4289
- });
4290
- var requestIdleCallback = typeof self !== "undefined" && self.requestIdleCallback && self.requestIdleCallback.bind(window) || function(cb) {
4291
- let start = Date.now();
4292
- return self.setTimeout(function() {
4293
- cb({
4294
- didTimeout: false,
4295
- timeRemaining: function() {
4296
- return Math.max(0, 50 - (Date.now() - start));
4297
- }
4298
- });
4299
- }, 1);
4300
- };
4301
- var cancelIdleCallback = typeof self !== "undefined" && self.cancelIdleCallback && self.cancelIdleCallback.bind(window) || function(id) {
4302
- return clearTimeout(id);
4303
- };
4304
- if ((typeof exports2.default === "function" || typeof exports2.default === "object" && exports2.default !== null) && typeof exports2.default.__esModule === "undefined") {
4305
- Object.defineProperty(exports2.default, "__esModule", { value: true });
4306
- Object.assign(exports2.default, exports2);
4307
- module2.exports = exports2.default;
4308
- }
4309
- }
4310
- });
4311
-
4312
- // node_modules/next/dist/client/use-intersection.js
4313
- var require_use_intersection = __commonJS({
4314
- "node_modules/next/dist/client/use-intersection.js"(exports2, module2) {
4315
- "use strict";
4316
- Object.defineProperty(exports2, "__esModule", {
4317
- value: true
4318
- });
4319
- Object.defineProperty(exports2, "useIntersection", {
4320
- enumerable: true,
4321
- get: function() {
4322
- return useIntersection;
4323
- }
4324
- });
4325
- var _react = require("react");
4326
- var _requestidlecallback = require_request_idle_callback();
4327
- var hasIntersectionObserver = typeof IntersectionObserver === "function";
4328
- var observers = /* @__PURE__ */ new Map();
4329
- var idList = [];
4330
- function createObserver(options) {
4331
- const id = {
4332
- root: options.root || null,
4333
- margin: options.rootMargin || ""
4334
- };
4335
- const existing = idList.find((obj) => obj.root === id.root && obj.margin === id.margin);
4336
- let instance;
4337
- if (existing) {
4338
- instance = observers.get(existing);
4339
- if (instance) {
4340
- return instance;
4341
- }
4342
- }
4343
- const elements = /* @__PURE__ */ new Map();
4344
- const observer = new IntersectionObserver((entries) => {
4345
- entries.forEach((entry) => {
4346
- const callback = elements.get(entry.target);
4347
- const isVisible = entry.isIntersecting || entry.intersectionRatio > 0;
4348
- if (callback && isVisible) {
4349
- callback(isVisible);
4350
- }
4351
- });
4352
- }, options);
4353
- instance = {
4354
- id,
4355
- observer,
4356
- elements
4357
- };
4358
- idList.push(id);
4359
- observers.set(id, instance);
4360
- return instance;
4361
- }
4362
- function observe(element, callback, options) {
4363
- const { id, observer, elements } = createObserver(options);
4364
- elements.set(element, callback);
4365
- observer.observe(element);
4366
- return function unobserve() {
4367
- elements.delete(element);
4368
- observer.unobserve(element);
4369
- if (elements.size === 0) {
4370
- observer.disconnect();
4371
- observers.delete(id);
4372
- const index = idList.findIndex((obj) => obj.root === id.root && obj.margin === id.margin);
4373
- if (index > -1) {
4374
- idList.splice(index, 1);
4375
- }
4376
- }
4377
- };
4378
- }
4379
- function useIntersection({ rootRef, rootMargin, disabled }) {
4380
- const isDisabled = disabled || !hasIntersectionObserver;
4381
- const [visible, setVisible] = (0, _react.useState)(false);
4382
- const elementRef = (0, _react.useRef)(null);
4383
- const setElement = (0, _react.useCallback)((element) => {
4384
- elementRef.current = element;
4385
- }, []);
4386
- (0, _react.useEffect)(() => {
4387
- if (hasIntersectionObserver) {
4388
- if (isDisabled || visible) return;
4389
- const element = elementRef.current;
4390
- if (element && element.tagName) {
4391
- const unobserve = observe(element, (isVisible) => isVisible && setVisible(isVisible), {
4392
- root: rootRef?.current,
4393
- rootMargin
4394
- });
4395
- return unobserve;
4396
- }
4397
- } else {
4398
- if (!visible) {
4399
- const idleCallback = (0, _requestidlecallback.requestIdleCallback)(() => setVisible(true));
4400
- return () => (0, _requestidlecallback.cancelIdleCallback)(idleCallback);
4401
- }
4402
- }
4403
- }, [
4404
- isDisabled,
4405
- rootMargin,
4406
- rootRef,
4407
- visible,
4408
- elementRef.current
4409
- ]);
4410
- const resetVisible = (0, _react.useCallback)(() => {
4411
- setVisible(false);
4412
- }, []);
4413
- return [
4414
- setElement,
4415
- visible,
4416
- resetVisible
4417
- ];
4418
- }
4419
- if ((typeof exports2.default === "function" || typeof exports2.default === "object" && exports2.default !== null) && typeof exports2.default.__esModule === "undefined") {
4420
- Object.defineProperty(exports2.default, "__esModule", { value: true });
4421
- Object.assign(exports2.default, exports2);
4422
- module2.exports = exports2.default;
4423
- }
4424
- }
4425
- });
4426
-
4427
- // node_modules/next/dist/shared/lib/i18n/normalize-locale-path.js
4428
- var require_normalize_locale_path = __commonJS({
4429
- "node_modules/next/dist/shared/lib/i18n/normalize-locale-path.js"(exports2) {
4430
- "use strict";
4431
- Object.defineProperty(exports2, "__esModule", {
4432
- value: true
4433
- });
4434
- Object.defineProperty(exports2, "normalizeLocalePath", {
4435
- enumerable: true,
4436
- get: function() {
4437
- return normalizeLocalePath;
4438
- }
4439
- });
4440
- var cache = /* @__PURE__ */ new WeakMap();
4441
- function normalizeLocalePath(pathname, locales) {
4442
- if (!locales) return {
4443
- pathname
4444
- };
4445
- let lowercasedLocales = cache.get(locales);
4446
- if (!lowercasedLocales) {
4447
- lowercasedLocales = locales.map((locale) => locale.toLowerCase());
4448
- cache.set(locales, lowercasedLocales);
4449
- }
4450
- let detectedLocale;
4451
- const segments = pathname.split("/", 2);
4452
- if (!segments[1]) return {
4453
- pathname
4454
- };
4455
- const segment = segments[1].toLowerCase();
4456
- const index = lowercasedLocales.indexOf(segment);
4457
- if (index < 0) return {
4458
- pathname
4459
- };
4460
- detectedLocale = locales[index];
4461
- pathname = pathname.slice(detectedLocale.length + 1) || "/";
4462
- return {
4463
- pathname,
4464
- detectedLocale
4465
- };
4466
- }
4467
- }
4468
- });
4469
-
4470
- // node_modules/next/dist/client/normalize-locale-path.js
4471
- var require_normalize_locale_path2 = __commonJS({
4472
- "node_modules/next/dist/client/normalize-locale-path.js"(exports2, module2) {
4473
- "use strict";
4474
- Object.defineProperty(exports2, "__esModule", {
4475
- value: true
4476
- });
4477
- Object.defineProperty(exports2, "normalizeLocalePath", {
4478
- enumerable: true,
4479
- get: function() {
4480
- return normalizeLocalePath;
4481
- }
4482
- });
4483
- var normalizeLocalePath = (pathname, locales) => {
4484
- if (process.env.__NEXT_I18N_SUPPORT) {
4485
- return require_normalize_locale_path().normalizeLocalePath(pathname, locales);
4486
- }
4487
- return {
4488
- pathname,
4489
- detectedLocale: void 0
4490
- };
4491
- };
4492
- if ((typeof exports2.default === "function" || typeof exports2.default === "object" && exports2.default !== null) && typeof exports2.default.__esModule === "undefined") {
4493
- Object.defineProperty(exports2.default, "__esModule", { value: true });
4494
- Object.assign(exports2.default, exports2);
4495
- module2.exports = exports2.default;
4496
- }
4497
- }
4498
- });
4499
-
4500
- // node_modules/next/dist/shared/lib/i18n/detect-domain-locale.js
4501
- var require_detect_domain_locale = __commonJS({
4502
- "node_modules/next/dist/shared/lib/i18n/detect-domain-locale.js"(exports2) {
4503
- "use strict";
4504
- Object.defineProperty(exports2, "__esModule", {
4505
- value: true
4506
- });
4507
- Object.defineProperty(exports2, "detectDomainLocale", {
4508
- enumerable: true,
4509
- get: function() {
4510
- return detectDomainLocale;
4511
- }
4512
- });
4513
- function detectDomainLocale(domainItems, hostname, detectedLocale) {
4514
- if (!domainItems) return;
4515
- if (detectedLocale) {
4516
- detectedLocale = detectedLocale.toLowerCase();
4517
- }
4518
- for (const item of domainItems) {
4519
- const domainHostname = item.domain?.split(":", 1)[0].toLowerCase();
4520
- if (hostname === domainHostname || detectedLocale === item.defaultLocale.toLowerCase() || item.locales?.some((locale) => locale.toLowerCase() === detectedLocale)) {
4521
- return item;
4522
- }
4523
- }
4524
- }
4525
- }
4526
- });
4527
-
4528
- // node_modules/next/dist/client/detect-domain-locale.js
4529
- var require_detect_domain_locale2 = __commonJS({
4530
- "node_modules/next/dist/client/detect-domain-locale.js"(exports2, module2) {
4531
- "use strict";
4532
- Object.defineProperty(exports2, "__esModule", {
4533
- value: true
4534
- });
4535
- Object.defineProperty(exports2, "detectDomainLocale", {
4536
- enumerable: true,
4537
- get: function() {
4538
- return detectDomainLocale;
4539
- }
4540
- });
4541
- var detectDomainLocale = (...args) => {
4542
- if (process.env.__NEXT_I18N_SUPPORT) {
4543
- return require_detect_domain_locale().detectDomainLocale(...args);
4544
- }
4545
- };
4546
- if ((typeof exports2.default === "function" || typeof exports2.default === "object" && exports2.default !== null) && typeof exports2.default.__esModule === "undefined") {
4547
- Object.defineProperty(exports2.default, "__esModule", { value: true });
4548
- Object.assign(exports2.default, exports2);
4549
- module2.exports = exports2.default;
4550
- }
4551
- }
4552
- });
4553
-
4554
- // node_modules/next/dist/client/get-domain-locale.js
4555
- var require_get_domain_locale = __commonJS({
4556
- "node_modules/next/dist/client/get-domain-locale.js"(exports2, module2) {
4557
- "use strict";
4558
- Object.defineProperty(exports2, "__esModule", {
4559
- value: true
4560
- });
4561
- Object.defineProperty(exports2, "getDomainLocale", {
4562
- enumerable: true,
4563
- get: function() {
4564
- return getDomainLocale;
4565
- }
4566
- });
4567
- var _normalizetrailingslash = require_normalize_trailing_slash();
4568
- var basePath = process.env.__NEXT_ROUTER_BASEPATH || "";
4569
- function getDomainLocale(path, locale, locales, domainLocales) {
4570
- if (process.env.__NEXT_I18N_SUPPORT) {
4571
- const normalizeLocalePath = require_normalize_locale_path2().normalizeLocalePath;
4572
- const detectDomainLocale = require_detect_domain_locale2().detectDomainLocale;
4573
- const target = locale || normalizeLocalePath(path, locales).detectedLocale;
4574
- const domain = detectDomainLocale(domainLocales, void 0, target);
4575
- if (domain) {
4576
- const proto = `http${domain.http ? "" : "s"}://`;
4577
- const finalLocale = target === domain.defaultLocale ? "" : `/${target}`;
4578
- return `${proto}${domain.domain}${(0, _normalizetrailingslash.normalizePathTrailingSlash)(`${basePath}${finalLocale}${path}`)}`;
4579
- }
4580
- return false;
4581
- } else {
4582
- return false;
4583
- }
4584
- }
4585
- if ((typeof exports2.default === "function" || typeof exports2.default === "object" && exports2.default !== null) && typeof exports2.default.__esModule === "undefined") {
4586
- Object.defineProperty(exports2.default, "__esModule", { value: true });
4587
- Object.assign(exports2.default, exports2);
4588
- module2.exports = exports2.default;
4589
- }
4590
- }
4591
- });
4592
-
4593
- // node_modules/next/dist/client/add-base-path.js
4594
- var require_add_base_path = __commonJS({
4595
- "node_modules/next/dist/client/add-base-path.js"(exports2, module2) {
4596
- "use strict";
4597
- Object.defineProperty(exports2, "__esModule", {
4598
- value: true
4599
- });
4600
- Object.defineProperty(exports2, "addBasePath", {
4601
- enumerable: true,
4602
- get: function() {
4603
- return addBasePath;
4604
- }
4605
- });
4606
- var _addpathprefix = require_add_path_prefix();
4607
- var _normalizetrailingslash = require_normalize_trailing_slash();
4608
- var basePath = process.env.__NEXT_ROUTER_BASEPATH || "";
4609
- function addBasePath(path, required) {
4610
- return (0, _normalizetrailingslash.normalizePathTrailingSlash)(process.env.__NEXT_MANUAL_CLIENT_BASE_PATH && !required ? path : (0, _addpathprefix.addPathPrefix)(path, basePath));
4611
- }
4612
- if ((typeof exports2.default === "function" || typeof exports2.default === "object" && exports2.default !== null) && typeof exports2.default.__esModule === "undefined") {
4613
- Object.defineProperty(exports2.default, "__esModule", { value: true });
4614
- Object.assign(exports2.default, exports2);
4615
- module2.exports = exports2.default;
4616
- }
4617
- }
4618
- });
4619
-
4620
- // node_modules/next/dist/client/use-merged-ref.js
4621
- var require_use_merged_ref = __commonJS({
4622
- "node_modules/next/dist/client/use-merged-ref.js"(exports2, module2) {
4623
- "use strict";
4624
- Object.defineProperty(exports2, "__esModule", {
4625
- value: true
4626
- });
4627
- Object.defineProperty(exports2, "useMergedRef", {
4628
- enumerable: true,
4629
- get: function() {
4630
- return useMergedRef;
4631
- }
4632
- });
4633
- var _react = require("react");
4634
- function useMergedRef(refA, refB) {
4635
- const cleanupA = (0, _react.useRef)(null);
4636
- const cleanupB = (0, _react.useRef)(null);
4637
- return (0, _react.useCallback)((current) => {
4638
- if (current === null) {
4639
- const cleanupFnA = cleanupA.current;
4640
- if (cleanupFnA) {
4641
- cleanupA.current = null;
4642
- cleanupFnA();
4643
- }
4644
- const cleanupFnB = cleanupB.current;
4645
- if (cleanupFnB) {
4646
- cleanupB.current = null;
4647
- cleanupFnB();
4648
- }
4649
- } else {
4650
- if (refA) {
4651
- cleanupA.current = applyRef(refA, current);
4652
- }
4653
- if (refB) {
4654
- cleanupB.current = applyRef(refB, current);
4655
- }
4656
- }
4657
- }, [
4658
- refA,
4659
- refB
4660
- ]);
4661
- }
4662
- function applyRef(refA, current) {
4663
- if (typeof refA === "function") {
4664
- const cleanup = refA(current);
4665
- if (typeof cleanup === "function") {
4666
- return cleanup;
4667
- } else {
4668
- return () => refA(null);
4669
- }
4670
- } else {
4671
- refA.current = current;
4672
- return () => {
4673
- refA.current = null;
4674
- };
4675
- }
4676
- }
4677
- if ((typeof exports2.default === "function" || typeof exports2.default === "object" && exports2.default !== null) && typeof exports2.default.__esModule === "undefined") {
4678
- Object.defineProperty(exports2.default, "__esModule", { value: true });
4679
- Object.assign(exports2.default, exports2);
4680
- module2.exports = exports2.default;
4681
- }
4682
- }
4683
- });
4684
-
4685
- // node_modules/next/dist/shared/lib/utils/error-once.js
4686
- var require_error_once = __commonJS({
4687
- "node_modules/next/dist/shared/lib/utils/error-once.js"(exports2) {
4688
- "use strict";
4689
- Object.defineProperty(exports2, "__esModule", {
4690
- value: true
4691
- });
4692
- Object.defineProperty(exports2, "errorOnce", {
4693
- enumerable: true,
4694
- get: function() {
4695
- return errorOnce;
4696
- }
4697
- });
4698
- var errorOnce = (_) => {
4699
- };
4700
- if (process.env.NODE_ENV !== "production") {
4701
- const errors = /* @__PURE__ */ new Set();
4702
- errorOnce = (msg) => {
4703
- if (!errors.has(msg)) {
4704
- console.error(msg);
4705
- }
4706
- errors.add(msg);
4707
- };
4708
- }
4709
- }
4710
- });
4711
-
4712
- // node_modules/next/dist/client/link.js
4713
- var require_link = __commonJS({
4714
- "node_modules/next/dist/client/link.js"(exports2, module2) {
4715
- "use strict";
4716
- "use client";
4717
- Object.defineProperty(exports2, "__esModule", {
4718
- value: true
4719
- });
4720
- function _export(target, all) {
4721
- for (var name in all) Object.defineProperty(target, name, {
4722
- enumerable: true,
4723
- get: all[name]
4724
- });
4725
- }
4726
- _export(exports2, {
4727
- default: function() {
4728
- return _default;
4729
- },
4730
- useLinkStatus: function() {
4731
- return useLinkStatus;
4732
- }
4733
- });
4734
- var _interop_require_wildcard = require_interop_require_wildcard();
4735
- var _jsxruntime = require("react/jsx-runtime");
4736
- var _react = /* @__PURE__ */ _interop_require_wildcard._(require("react"));
4737
- var _resolvehref = require_resolve_href();
4738
- var _islocalurl = require_is_local_url();
4739
- var _formaturl = require_format_url();
4740
- var _utils = require_utils();
4741
- var _addlocale = require_add_locale2();
4742
- var _routercontextsharedruntime = require_router_context_shared_runtime();
4743
- var _useintersection = require_use_intersection();
4744
- var _getdomainlocale = require_get_domain_locale();
4745
- var _addbasepath = require_add_base_path();
4746
- var _usemergedref = require_use_merged_ref();
4747
- var _erroronce = require_error_once();
4748
- var prefetched = /* @__PURE__ */ new Set();
4749
- function prefetch(router, href, as, options) {
4750
- if (typeof window === "undefined") {
4751
- return;
4752
- }
4753
- if (!(0, _islocalurl.isLocalURL)(href)) {
4754
- return;
4755
- }
4756
- if (!options.bypassPrefetchedCheck) {
4757
- const locale = (
4758
- // Let the link's locale prop override the default router locale.
4759
- typeof options.locale !== "undefined" ? options.locale : "locale" in router ? router.locale : void 0
4760
- );
4761
- const prefetchedKey = href + "%" + as + "%" + locale;
4762
- if (prefetched.has(prefetchedKey)) {
4763
- return;
4764
- }
4765
- prefetched.add(prefetchedKey);
4766
- }
4767
- router.prefetch(href, as, options).catch((err) => {
4768
- if (process.env.NODE_ENV !== "production") {
4769
- throw err;
4770
- }
4771
- });
4772
- }
4773
- function isModifiedEvent(event) {
4774
- const eventTarget = event.currentTarget;
4775
- const target = eventTarget.getAttribute("target");
4776
- return target && target !== "_self" || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey || // triggers resource download
4777
- event.nativeEvent && event.nativeEvent.which === 2;
4778
- }
4779
- function linkClicked(e, router, href, as, replace, shallow, scroll, locale, onNavigate) {
4780
- const { nodeName } = e.currentTarget;
4781
- const isAnchorNodeName = nodeName.toUpperCase() === "A";
4782
- if (isAnchorNodeName && isModifiedEvent(e) || e.currentTarget.hasAttribute("download")) {
4783
- return;
4784
- }
4785
- if (!(0, _islocalurl.isLocalURL)(href)) {
4786
- if (replace) {
4787
- e.preventDefault();
4788
- location.replace(href);
4789
- }
4790
- return;
4791
- }
4792
- e.preventDefault();
4793
- const navigate = () => {
4794
- if (onNavigate) {
4795
- let isDefaultPrevented = false;
4796
- onNavigate({
4797
- preventDefault: () => {
4798
- isDefaultPrevented = true;
4799
- }
4800
- });
4801
- if (isDefaultPrevented) {
4802
- return;
4803
- }
4804
- }
4805
- const routerScroll = scroll ?? true;
4806
- if ("beforePopState" in router) {
4807
- router[replace ? "replace" : "push"](href, as, {
4808
- shallow,
4809
- locale,
4810
- scroll: routerScroll
4811
- });
4812
- } else {
4813
- router[replace ? "replace" : "push"](as || href, {
4814
- scroll: routerScroll
4815
- });
4816
- }
4817
- };
4818
- navigate();
4819
- }
4820
- function formatStringOrUrl(urlObjOrString) {
4821
- if (typeof urlObjOrString === "string") {
4822
- return urlObjOrString;
4823
- }
4824
- return (0, _formaturl.formatUrl)(urlObjOrString);
4825
- }
4826
- var Link2 = /* @__PURE__ */ _react.default.forwardRef(function LinkComponent(props, forwardedRef) {
4827
- let children;
4828
- 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;
4829
- children = childrenProp;
4830
- if (legacyBehavior && (typeof children === "string" || typeof children === "number")) {
4831
- children = /* @__PURE__ */ (0, _jsxruntime.jsx)("a", {
4832
- children
4833
- });
4834
- }
4835
- const router = _react.default.useContext(_routercontextsharedruntime.RouterContext);
4836
- const prefetchEnabled = prefetchProp !== false;
4837
- if (process.env.NODE_ENV !== "production") {
4838
- let createPropError = function(args) {
4839
- 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", {
4840
- value: "E319",
4841
- enumerable: false,
4842
- configurable: true
4843
- });
4844
- };
4845
- const requiredPropsGuard = {
4846
- href: true
4847
- };
4848
- const requiredProps = Object.keys(requiredPropsGuard);
4849
- requiredProps.forEach((key) => {
4850
- if (key === "href") {
4851
- if (props[key] == null || typeof props[key] !== "string" && typeof props[key] !== "object") {
4852
- throw createPropError({
4853
- key,
4854
- expected: "`string` or `object`",
4855
- actual: props[key] === null ? "null" : typeof props[key]
4856
- });
4857
- }
4858
- } else {
4859
- const _ = key;
4860
- }
4861
- });
4862
- const optionalPropsGuard = {
4863
- as: true,
4864
- replace: true,
4865
- scroll: true,
4866
- shallow: true,
4867
- passHref: true,
4868
- prefetch: true,
4869
- locale: true,
4870
- onClick: true,
4871
- onMouseEnter: true,
4872
- onTouchStart: true,
4873
- legacyBehavior: true,
4874
- onNavigate: true
4875
- };
4876
- const optionalProps = Object.keys(optionalPropsGuard);
4877
- optionalProps.forEach((key) => {
4878
- const valType = typeof props[key];
4879
- if (key === "as") {
4880
- if (props[key] && valType !== "string" && valType !== "object") {
4881
- throw createPropError({
4882
- key,
4883
- expected: "`string` or `object`",
4884
- actual: valType
4885
- });
4886
- }
4887
- } else if (key === "locale") {
4888
- if (props[key] && valType !== "string") {
4889
- throw createPropError({
4890
- key,
4891
- expected: "`string`",
4892
- actual: valType
4893
- });
4894
- }
4895
- } else if (key === "onClick" || key === "onMouseEnter" || key === "onTouchStart" || key === "onNavigate") {
4896
- if (props[key] && valType !== "function") {
4897
- throw createPropError({
4898
- key,
4899
- expected: "`function`",
4900
- actual: valType
4901
- });
4902
- }
4903
- } else if (key === "replace" || key === "scroll" || key === "shallow" || key === "passHref" || key === "legacyBehavior") {
4904
- if (props[key] != null && valType !== "boolean") {
4905
- throw createPropError({
4906
- key,
4907
- expected: "`boolean`",
4908
- actual: valType
4909
- });
4910
- }
4911
- } else if (key === "prefetch") {
4912
- if (props[key] != null && valType !== "boolean" && props[key] !== "auto") {
4913
- throw createPropError({
4914
- key,
4915
- expected: '`boolean | "auto"`',
4916
- actual: valType
4917
- });
4918
- }
4919
- } else {
4920
- const _ = key;
4921
- }
4922
- });
4923
- }
4924
- const { href, as } = _react.default.useMemo(() => {
4925
- if (!router) {
4926
- const resolvedHref2 = formatStringOrUrl(hrefProp);
4927
- return {
4928
- href: resolvedHref2,
4929
- as: asProp ? formatStringOrUrl(asProp) : resolvedHref2
4930
- };
4931
- }
4932
- const [resolvedHref, resolvedAs] = (0, _resolvehref.resolveHref)(router, hrefProp, true);
4933
- return {
4934
- href: resolvedHref,
4935
- as: asProp ? (0, _resolvehref.resolveHref)(router, asProp) : resolvedAs || resolvedHref
4936
- };
4937
- }, [
4938
- router,
4939
- hrefProp,
4940
- asProp
4941
- ]);
4942
- const previousHref = _react.default.useRef(href);
4943
- const previousAs = _react.default.useRef(as);
4944
- let child;
4945
- if (legacyBehavior) {
4946
- if (process.env.NODE_ENV === "development") {
4947
- if (onClick) {
4948
- 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`);
4949
- }
4950
- if (onMouseEnterProp) {
4951
- 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`);
4952
- }
4953
- try {
4954
- child = _react.default.Children.only(children);
4955
- } catch (err) {
4956
- if (!children) {
4957
- 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", {
4958
- value: "E320",
4959
- enumerable: false,
4960
- configurable: true
4961
- });
4962
- }
4963
- 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", {
4964
- value: "E266",
4965
- enumerable: false,
4966
- configurable: true
4967
- });
4968
- }
4969
- } else {
4970
- child = _react.default.Children.only(children);
4971
- }
4972
- } else {
4973
- if (process.env.NODE_ENV === "development") {
4974
- if (children?.type === "a") {
4975
- 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", {
4976
- value: "E209",
4977
- enumerable: false,
4978
- configurable: true
4979
- });
4980
- }
4981
- }
4982
- }
4983
- const childRef = legacyBehavior ? child && typeof child === "object" && child.ref : forwardedRef;
4984
- const [setIntersectionRef, isVisible, resetVisible] = (0, _useintersection.useIntersection)({
4985
- rootMargin: "200px"
4986
- });
4987
- const setIntersectionWithResetRef = _react.default.useCallback((el) => {
4988
- if (previousAs.current !== as || previousHref.current !== href) {
4989
- resetVisible();
4990
- previousAs.current = as;
4991
- previousHref.current = href;
4992
- }
4993
- setIntersectionRef(el);
4994
- }, [
4995
- as,
4996
- href,
4997
- resetVisible,
4998
- setIntersectionRef
4999
- ]);
5000
- const setRef = (0, _usemergedref.useMergedRef)(setIntersectionWithResetRef, childRef);
5001
- _react.default.useEffect(() => {
5002
- if (process.env.NODE_ENV !== "production") {
5003
- return;
5004
- }
5005
- if (!router) {
5006
- return;
5007
- }
5008
- if (!isVisible || !prefetchEnabled) {
5009
- return;
5010
- }
5011
- prefetch(router, href, as, {
5012
- locale
5013
- });
5014
- }, [
5015
- as,
5016
- href,
5017
- isVisible,
5018
- locale,
5019
- prefetchEnabled,
5020
- router?.locale,
5021
- router
5022
- ]);
5023
- const childProps = {
5024
- ref: setRef,
5025
- onClick(e) {
5026
- if (process.env.NODE_ENV !== "production") {
5027
- if (!e) {
5028
- throw Object.defineProperty(new Error(`Component rendered inside next/link has to pass click event to "onClick" prop.`), "__NEXT_ERROR_CODE", {
5029
- value: "E312",
5030
- enumerable: false,
5031
- configurable: true
5032
- });
5033
- }
5034
- }
5035
- if (!legacyBehavior && typeof onClick === "function") {
5036
- onClick(e);
5037
- }
5038
- if (legacyBehavior && child.props && typeof child.props.onClick === "function") {
5039
- child.props.onClick(e);
5040
- }
5041
- if (!router) {
5042
- return;
5043
- }
5044
- if (e.defaultPrevented) {
5045
- return;
5046
- }
5047
- linkClicked(e, router, href, as, replace, shallow, scroll, locale, onNavigate);
5048
- },
5049
- onMouseEnter(e) {
5050
- if (!legacyBehavior && typeof onMouseEnterProp === "function") {
5051
- onMouseEnterProp(e);
5052
- }
5053
- if (legacyBehavior && child.props && typeof child.props.onMouseEnter === "function") {
5054
- child.props.onMouseEnter(e);
5055
- }
5056
- if (!router) {
5057
- return;
5058
- }
5059
- prefetch(router, href, as, {
5060
- locale,
5061
- priority: true,
5062
- // @see {https://github.com/vercel/next.js/discussions/40268?sort=top#discussioncomment-3572642}
5063
- bypassPrefetchedCheck: true
5064
- });
5065
- },
5066
- onTouchStart: process.env.__NEXT_LINK_NO_TOUCH_START ? void 0 : function onTouchStart(e) {
5067
- if (!legacyBehavior && typeof onTouchStartProp === "function") {
5068
- onTouchStartProp(e);
5069
- }
5070
- if (legacyBehavior && child.props && typeof child.props.onTouchStart === "function") {
5071
- child.props.onTouchStart(e);
5072
- }
5073
- if (!router) {
5074
- return;
5075
- }
5076
- prefetch(router, href, as, {
5077
- locale,
5078
- priority: true,
5079
- // @see {https://github.com/vercel/next.js/discussions/40268?sort=top#discussioncomment-3572642}
5080
- bypassPrefetchedCheck: true
5081
- });
5082
- }
5083
- };
5084
- if ((0, _utils.isAbsoluteUrl)(as)) {
5085
- childProps.href = as;
5086
- } else if (!legacyBehavior || passHref || child.type === "a" && !("href" in child.props)) {
5087
- const curLocale = typeof locale !== "undefined" ? locale : router?.locale;
5088
- const localeDomain = router?.isLocaleDomain && (0, _getdomainlocale.getDomainLocale)(as, curLocale, router?.locales, router?.domainLocales);
5089
- childProps.href = localeDomain || (0, _addbasepath.addBasePath)((0, _addlocale.addLocale)(as, curLocale, router?.defaultLocale));
5090
- }
5091
- if (legacyBehavior) {
5092
- if (process.env.NODE_ENV === "development") {
5093
- (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");
5094
- }
5095
- return /* @__PURE__ */ _react.default.cloneElement(child, childProps);
5096
- }
5097
- return /* @__PURE__ */ (0, _jsxruntime.jsx)("a", {
5098
- ...restProps,
5099
- ...childProps,
5100
- children
5101
- });
5102
- });
5103
- var LinkStatusContext = /* @__PURE__ */ (0, _react.createContext)({
5104
- // We do not support link status in the Pages Router, so we always return false
5105
- pending: false
5106
- });
5107
- var useLinkStatus = () => {
5108
- return (0, _react.useContext)(LinkStatusContext);
5109
- };
5110
- var _default = Link2;
5111
- if ((typeof exports2.default === "function" || typeof exports2.default === "object" && exports2.default !== null) && typeof exports2.default.__esModule === "undefined") {
5112
- Object.defineProperty(exports2.default, "__esModule", { value: true });
5113
- Object.assign(exports2.default, exports2);
5114
- module2.exports = exports2.default;
5115
- }
5116
- }
5117
- });
5118
-
5119
- // node_modules/next/link.js
5120
- var require_link2 = __commonJS({
5121
- "node_modules/next/link.js"(exports2, module2) {
5122
- "use strict";
5123
- module2.exports = require_link();
5124
- }
5125
- });
5126
-
5127
1156
  // src/client.ts
5128
1157
  var client_exports = {};
5129
1158
  __export(client_exports, {
@@ -6755,7 +2784,6 @@ function OpenInStudioMenuItem({ pagesPathBase = "/admin/pages" }) {
6755
2784
  }
6756
2785
 
6757
2786
  // src/components/studio/PageEditRedirectToStudio.tsx
6758
- var import_link = __toESM(require_link2());
6759
2787
  var import_react13 = require("react");
6760
2788
  var import_ui8 = require("@payloadcms/ui");
6761
2789
  var import_jsx_runtime22 = require("react/jsx-runtime");
@@ -6782,7 +2810,7 @@ function PageEditRedirectToStudio({ pagesPathBase = "/admin/pages" }) {
6782
2810
  children: [
6783
2811
  /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("h2", { style: { margin: 0 }, children: "Opening Editor..." }),
6784
2812
  /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { style: { color: "var(--theme-elevation-600)", margin: 0 }, children: "Redirecting to the custom page editor." }),
6785
- id ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_link.default, { href: `${pagesPathBase}/${id}`, children: "Continue to Editor" }) : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_link.default, { href: pagesPathBase, children: "Open Pages" })
2813
+ id ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("a", { href: `${pagesPathBase}/${id}`, children: "Continue to Editor" }) : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("a", { href: pagesPathBase, children: "Open Pages" })
6786
2814
  ]
6787
2815
  }
6788
2816
  );