@mediansh/widget 0.1.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-6E3NBXLE.js → chunk-WF2OQH7R.js} +4 -15
- package/dist/{chunk-6E3NBXLE.js.map → chunk-WF2OQH7R.js.map} +1 -1
- package/dist/{highlighted-body-OFNGDK62-UN447WAU.js → highlighted-body-OFNGDK62-4TPSSDXW.js} +2 -2
- package/dist/index.js +175 -4197
- package/dist/index.js.map +1 -1
- package/dist/mermaid-GHXKKRXX-O3RS5IKL.js +9 -0
- package/dist/widget.css +1 -1
- package/package.json +5 -5
- package/dist/mermaid-GHXKKRXX-5WPKRFDI.js +0 -9
- /package/dist/{highlighted-body-OFNGDK62-UN447WAU.js.map → highlighted-body-OFNGDK62-4TPSSDXW.js.map} +0 -0
- /package/dist/{mermaid-GHXKKRXX-5WPKRFDI.js.map → mermaid-GHXKKRXX-O3RS5IKL.js.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -1,4071 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
Qs,
|
|
4
|
-
__commonJS,
|
|
5
|
-
__esm,
|
|
6
4
|
__export,
|
|
7
|
-
__require,
|
|
8
|
-
__toCommonJS,
|
|
9
|
-
__toESM,
|
|
10
5
|
clsx,
|
|
11
6
|
twMerge
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
|
|
14
|
-
// ../../node_modules/.bun/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_interop_require_wildcard.js
|
|
15
|
-
var interop_require_wildcard_exports = {};
|
|
16
|
-
__export(interop_require_wildcard_exports, {
|
|
17
|
-
_: () => _interop_require_wildcard
|
|
18
|
-
});
|
|
19
|
-
function _getRequireWildcardCache(nodeInterop) {
|
|
20
|
-
if (typeof WeakMap !== "function") return null;
|
|
21
|
-
var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
|
|
22
|
-
var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
|
|
23
|
-
return (_getRequireWildcardCache = function(nodeInterop2) {
|
|
24
|
-
return nodeInterop2 ? cacheNodeInterop : cacheBabelInterop;
|
|
25
|
-
})(nodeInterop);
|
|
26
|
-
}
|
|
27
|
-
function _interop_require_wildcard(obj, nodeInterop) {
|
|
28
|
-
if (!nodeInterop && obj && obj.__esModule) return obj;
|
|
29
|
-
if (obj === null || typeof obj !== "object" && typeof obj !== "function") return { default: obj };
|
|
30
|
-
var cache = _getRequireWildcardCache(nodeInterop);
|
|
31
|
-
if (cache && cache.has(obj)) return cache.get(obj);
|
|
32
|
-
var newObj = { __proto__: null };
|
|
33
|
-
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
34
|
-
for (var key in obj) {
|
|
35
|
-
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
36
|
-
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
37
|
-
if (desc && (desc.get || desc.set)) Object.defineProperty(newObj, key, desc);
|
|
38
|
-
else newObj[key] = obj[key];
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
newObj.default = obj;
|
|
42
|
-
if (cache) cache.set(obj, newObj);
|
|
43
|
-
return newObj;
|
|
44
|
-
}
|
|
45
|
-
var init_interop_require_wildcard = __esm({
|
|
46
|
-
"../../node_modules/.bun/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_interop_require_wildcard.js"() {
|
|
47
|
-
"use strict";
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
// ../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/shared/lib/router/utils/querystring.js
|
|
52
|
-
var require_querystring = __commonJS({
|
|
53
|
-
"../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/shared/lib/router/utils/querystring.js"(exports) {
|
|
54
|
-
"use strict";
|
|
55
|
-
Object.defineProperty(exports, "__esModule", {
|
|
56
|
-
value: true
|
|
57
|
-
});
|
|
58
|
-
function _export(target, all) {
|
|
59
|
-
for (var name in all) Object.defineProperty(target, name, {
|
|
60
|
-
enumerable: true,
|
|
61
|
-
get: all[name]
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
_export(exports, {
|
|
65
|
-
assign: function() {
|
|
66
|
-
return assign;
|
|
67
|
-
},
|
|
68
|
-
searchParamsToUrlQuery: function() {
|
|
69
|
-
return searchParamsToUrlQuery;
|
|
70
|
-
},
|
|
71
|
-
urlQueryToSearchParams: function() {
|
|
72
|
-
return urlQueryToSearchParams;
|
|
73
|
-
}
|
|
74
|
-
});
|
|
75
|
-
function searchParamsToUrlQuery(searchParams) {
|
|
76
|
-
const query = {};
|
|
77
|
-
for (const [key, value] of searchParams.entries()) {
|
|
78
|
-
const existing = query[key];
|
|
79
|
-
if (typeof existing === "undefined") {
|
|
80
|
-
query[key] = value;
|
|
81
|
-
} else if (Array.isArray(existing)) {
|
|
82
|
-
existing.push(value);
|
|
83
|
-
} else {
|
|
84
|
-
query[key] = [
|
|
85
|
-
existing,
|
|
86
|
-
value
|
|
87
|
-
];
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
return query;
|
|
91
|
-
}
|
|
92
|
-
function stringifyUrlQueryParam(param) {
|
|
93
|
-
if (typeof param === "string") {
|
|
94
|
-
return param;
|
|
95
|
-
}
|
|
96
|
-
if (typeof param === "number" && !isNaN(param) || typeof param === "boolean") {
|
|
97
|
-
return String(param);
|
|
98
|
-
} else {
|
|
99
|
-
return "";
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
function urlQueryToSearchParams(query) {
|
|
103
|
-
const searchParams = new URLSearchParams();
|
|
104
|
-
for (const [key, value] of Object.entries(query)) {
|
|
105
|
-
if (Array.isArray(value)) {
|
|
106
|
-
for (const item of value) {
|
|
107
|
-
searchParams.append(key, stringifyUrlQueryParam(item));
|
|
108
|
-
}
|
|
109
|
-
} else {
|
|
110
|
-
searchParams.set(key, stringifyUrlQueryParam(value));
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
return searchParams;
|
|
114
|
-
}
|
|
115
|
-
function assign(target, ...searchParamsList) {
|
|
116
|
-
for (const searchParams of searchParamsList) {
|
|
117
|
-
for (const key of searchParams.keys()) {
|
|
118
|
-
target.delete(key);
|
|
119
|
-
}
|
|
120
|
-
for (const [key, value] of searchParams.entries()) {
|
|
121
|
-
target.append(key, value);
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
return target;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
});
|
|
128
|
-
|
|
129
|
-
// ../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/shared/lib/router/utils/format-url.js
|
|
130
|
-
var require_format_url = __commonJS({
|
|
131
|
-
"../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/shared/lib/router/utils/format-url.js"(exports) {
|
|
132
|
-
"use strict";
|
|
133
|
-
Object.defineProperty(exports, "__esModule", {
|
|
134
|
-
value: true
|
|
135
|
-
});
|
|
136
|
-
function _export(target, all) {
|
|
137
|
-
for (var name in all) Object.defineProperty(target, name, {
|
|
138
|
-
enumerable: true,
|
|
139
|
-
get: all[name]
|
|
140
|
-
});
|
|
141
|
-
}
|
|
142
|
-
_export(exports, {
|
|
143
|
-
formatUrl: function() {
|
|
144
|
-
return formatUrl;
|
|
145
|
-
},
|
|
146
|
-
formatWithValidation: function() {
|
|
147
|
-
return formatWithValidation;
|
|
148
|
-
},
|
|
149
|
-
urlObjectKeys: function() {
|
|
150
|
-
return urlObjectKeys;
|
|
151
|
-
}
|
|
152
|
-
});
|
|
153
|
-
var _interop_require_wildcard2 = (init_interop_require_wildcard(), __toCommonJS(interop_require_wildcard_exports));
|
|
154
|
-
var _querystring = /* @__PURE__ */ _interop_require_wildcard2._(require_querystring());
|
|
155
|
-
var slashedProtocols = /https?|ftp|gopher|file/;
|
|
156
|
-
function formatUrl(urlObj) {
|
|
157
|
-
let { auth, hostname } = urlObj;
|
|
158
|
-
let protocol = urlObj.protocol || "";
|
|
159
|
-
let pathname = urlObj.pathname || "";
|
|
160
|
-
let hash = urlObj.hash || "";
|
|
161
|
-
let query = urlObj.query || "";
|
|
162
|
-
let host = false;
|
|
163
|
-
auth = auth ? encodeURIComponent(auth).replace(/%3A/i, ":") + "@" : "";
|
|
164
|
-
if (urlObj.host) {
|
|
165
|
-
host = auth + urlObj.host;
|
|
166
|
-
} else if (hostname) {
|
|
167
|
-
host = auth + (~hostname.indexOf(":") ? `[${hostname}]` : hostname);
|
|
168
|
-
if (urlObj.port) {
|
|
169
|
-
host += ":" + urlObj.port;
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
if (query && typeof query === "object") {
|
|
173
|
-
query = String(_querystring.urlQueryToSearchParams(query));
|
|
174
|
-
}
|
|
175
|
-
let search = urlObj.search || query && `?${query}` || "";
|
|
176
|
-
if (protocol && !protocol.endsWith(":")) protocol += ":";
|
|
177
|
-
if (urlObj.slashes || (!protocol || slashedProtocols.test(protocol)) && host !== false) {
|
|
178
|
-
host = "//" + (host || "");
|
|
179
|
-
if (pathname && pathname[0] !== "/") pathname = "/" + pathname;
|
|
180
|
-
} else if (!host) {
|
|
181
|
-
host = "";
|
|
182
|
-
}
|
|
183
|
-
if (hash && hash[0] !== "#") hash = "#" + hash;
|
|
184
|
-
if (search && search[0] !== "?") search = "?" + search;
|
|
185
|
-
pathname = pathname.replace(/[?#]/g, encodeURIComponent);
|
|
186
|
-
search = search.replace("#", "%23");
|
|
187
|
-
return `${protocol}${host}${pathname}${search}${hash}`;
|
|
188
|
-
}
|
|
189
|
-
var urlObjectKeys = [
|
|
190
|
-
"auth",
|
|
191
|
-
"hash",
|
|
192
|
-
"host",
|
|
193
|
-
"hostname",
|
|
194
|
-
"href",
|
|
195
|
-
"path",
|
|
196
|
-
"pathname",
|
|
197
|
-
"port",
|
|
198
|
-
"protocol",
|
|
199
|
-
"query",
|
|
200
|
-
"search",
|
|
201
|
-
"slashes"
|
|
202
|
-
];
|
|
203
|
-
function formatWithValidation(url) {
|
|
204
|
-
if (process.env.NODE_ENV === "development") {
|
|
205
|
-
if (url !== null && typeof url === "object") {
|
|
206
|
-
Object.keys(url).forEach((key) => {
|
|
207
|
-
if (!urlObjectKeys.includes(key)) {
|
|
208
|
-
console.warn(`Unknown key passed via urlObject into url.format: ${key}`);
|
|
209
|
-
}
|
|
210
|
-
});
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
return formatUrl(url);
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
});
|
|
217
|
-
|
|
218
|
-
// ../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/shared/lib/router/utils/omit.js
|
|
219
|
-
var require_omit = __commonJS({
|
|
220
|
-
"../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/shared/lib/router/utils/omit.js"(exports) {
|
|
221
|
-
"use strict";
|
|
222
|
-
Object.defineProperty(exports, "__esModule", {
|
|
223
|
-
value: true
|
|
224
|
-
});
|
|
225
|
-
Object.defineProperty(exports, "omit", {
|
|
226
|
-
enumerable: true,
|
|
227
|
-
get: function() {
|
|
228
|
-
return omit;
|
|
229
|
-
}
|
|
230
|
-
});
|
|
231
|
-
function omit(object, keys) {
|
|
232
|
-
const omitted = {};
|
|
233
|
-
Object.keys(object).forEach((key) => {
|
|
234
|
-
if (!keys.includes(key)) {
|
|
235
|
-
omitted[key] = object[key];
|
|
236
|
-
}
|
|
237
|
-
});
|
|
238
|
-
return omitted;
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
});
|
|
242
|
-
|
|
243
|
-
// ../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/shared/lib/utils.js
|
|
244
|
-
var require_utils = __commonJS({
|
|
245
|
-
"../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/shared/lib/utils.js"(exports) {
|
|
246
|
-
"use strict";
|
|
247
|
-
Object.defineProperty(exports, "__esModule", {
|
|
248
|
-
value: true
|
|
249
|
-
});
|
|
250
|
-
function _export(target, all) {
|
|
251
|
-
for (var name in all) Object.defineProperty(target, name, {
|
|
252
|
-
enumerable: true,
|
|
253
|
-
get: all[name]
|
|
254
|
-
});
|
|
255
|
-
}
|
|
256
|
-
_export(exports, {
|
|
257
|
-
DecodeError: function() {
|
|
258
|
-
return DecodeError;
|
|
259
|
-
},
|
|
260
|
-
MiddlewareNotFoundError: function() {
|
|
261
|
-
return MiddlewareNotFoundError;
|
|
262
|
-
},
|
|
263
|
-
MissingStaticPage: function() {
|
|
264
|
-
return MissingStaticPage;
|
|
265
|
-
},
|
|
266
|
-
NormalizeError: function() {
|
|
267
|
-
return NormalizeError;
|
|
268
|
-
},
|
|
269
|
-
PageNotFoundError: function() {
|
|
270
|
-
return PageNotFoundError;
|
|
271
|
-
},
|
|
272
|
-
SP: function() {
|
|
273
|
-
return SP;
|
|
274
|
-
},
|
|
275
|
-
ST: function() {
|
|
276
|
-
return ST;
|
|
277
|
-
},
|
|
278
|
-
WEB_VITALS: function() {
|
|
279
|
-
return WEB_VITALS;
|
|
280
|
-
},
|
|
281
|
-
execOnce: function() {
|
|
282
|
-
return execOnce;
|
|
283
|
-
},
|
|
284
|
-
getDisplayName: function() {
|
|
285
|
-
return getDisplayName;
|
|
286
|
-
},
|
|
287
|
-
getLocationOrigin: function() {
|
|
288
|
-
return getLocationOrigin;
|
|
289
|
-
},
|
|
290
|
-
getURL: function() {
|
|
291
|
-
return getURL;
|
|
292
|
-
},
|
|
293
|
-
isAbsoluteUrl: function() {
|
|
294
|
-
return isAbsoluteUrl;
|
|
295
|
-
},
|
|
296
|
-
isResSent: function() {
|
|
297
|
-
return isResSent;
|
|
298
|
-
},
|
|
299
|
-
loadGetInitialProps: function() {
|
|
300
|
-
return loadGetInitialProps;
|
|
301
|
-
},
|
|
302
|
-
normalizeRepeatedSlashes: function() {
|
|
303
|
-
return normalizeRepeatedSlashes;
|
|
304
|
-
},
|
|
305
|
-
stringifyError: function() {
|
|
306
|
-
return stringifyError;
|
|
307
|
-
}
|
|
308
|
-
});
|
|
309
|
-
var WEB_VITALS = [
|
|
310
|
-
"CLS",
|
|
311
|
-
"FCP",
|
|
312
|
-
"FID",
|
|
313
|
-
"INP",
|
|
314
|
-
"LCP",
|
|
315
|
-
"TTFB"
|
|
316
|
-
];
|
|
317
|
-
function execOnce(fn) {
|
|
318
|
-
let used = false;
|
|
319
|
-
let result;
|
|
320
|
-
return (...args) => {
|
|
321
|
-
if (!used) {
|
|
322
|
-
used = true;
|
|
323
|
-
result = fn(...args);
|
|
324
|
-
}
|
|
325
|
-
return result;
|
|
326
|
-
};
|
|
327
|
-
}
|
|
328
|
-
var ABSOLUTE_URL_REGEX = /^[a-zA-Z][a-zA-Z\d+\-.]*?:/;
|
|
329
|
-
var isAbsoluteUrl = (url) => {
|
|
330
|
-
const c14 = url.charCodeAt(0);
|
|
331
|
-
const isLetter = c14 >= 65 && c14 <= 90 || c14 >= 97 && c14 <= 122;
|
|
332
|
-
if (!isLetter) {
|
|
333
|
-
return false;
|
|
334
|
-
}
|
|
335
|
-
return ABSOLUTE_URL_REGEX.test(url);
|
|
336
|
-
};
|
|
337
|
-
function getLocationOrigin() {
|
|
338
|
-
const { protocol, hostname, port } = window.location;
|
|
339
|
-
return `${protocol}//${hostname}${port ? ":" + port : ""}`;
|
|
340
|
-
}
|
|
341
|
-
function getURL() {
|
|
342
|
-
const { href } = window.location;
|
|
343
|
-
const origin = getLocationOrigin();
|
|
344
|
-
return href.substring(origin.length);
|
|
345
|
-
}
|
|
346
|
-
function getDisplayName(Component2) {
|
|
347
|
-
return typeof Component2 === "string" ? Component2 : Component2.displayName || Component2.name || "Unknown";
|
|
348
|
-
}
|
|
349
|
-
function isResSent(res) {
|
|
350
|
-
return res.finished || res.headersSent;
|
|
351
|
-
}
|
|
352
|
-
function normalizeRepeatedSlashes(url) {
|
|
353
|
-
const urlParts = url.split("?");
|
|
354
|
-
const urlNoQuery = urlParts[0];
|
|
355
|
-
return urlNoQuery.replace(/\\/g, "/").replace(/\/\/+/g, "/") + (urlParts[1] ? `?${urlParts.slice(1).join("?")}` : "");
|
|
356
|
-
}
|
|
357
|
-
async function loadGetInitialProps(App, ctx) {
|
|
358
|
-
if (process.env.NODE_ENV !== "production") {
|
|
359
|
-
if (App.prototype?.getInitialProps) {
|
|
360
|
-
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.`;
|
|
361
|
-
throw Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", {
|
|
362
|
-
value: "E1035",
|
|
363
|
-
enumerable: false,
|
|
364
|
-
configurable: true
|
|
365
|
-
});
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
-
const res = ctx.res || ctx.ctx && ctx.ctx.res;
|
|
369
|
-
if (!App.getInitialProps) {
|
|
370
|
-
if (ctx.ctx && ctx.Component) {
|
|
371
|
-
return {
|
|
372
|
-
pageProps: await loadGetInitialProps(ctx.Component, ctx.ctx)
|
|
373
|
-
};
|
|
374
|
-
}
|
|
375
|
-
return {};
|
|
376
|
-
}
|
|
377
|
-
const props = await App.getInitialProps(ctx);
|
|
378
|
-
if (res && isResSent(res)) {
|
|
379
|
-
return props;
|
|
380
|
-
}
|
|
381
|
-
if (!props) {
|
|
382
|
-
const message = `"${getDisplayName(App)}.getInitialProps()" should resolve to an object. But found "${props}" instead.`;
|
|
383
|
-
throw Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", {
|
|
384
|
-
value: "E1025",
|
|
385
|
-
enumerable: false,
|
|
386
|
-
configurable: true
|
|
387
|
-
});
|
|
388
|
-
}
|
|
389
|
-
if (process.env.NODE_ENV !== "production") {
|
|
390
|
-
if (Object.keys(props).length === 0 && !ctx.ctx) {
|
|
391
|
-
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`);
|
|
392
|
-
}
|
|
393
|
-
}
|
|
394
|
-
return props;
|
|
395
|
-
}
|
|
396
|
-
var SP = typeof performance !== "undefined";
|
|
397
|
-
var ST = SP && [
|
|
398
|
-
"mark",
|
|
399
|
-
"measure",
|
|
400
|
-
"getEntriesByName"
|
|
401
|
-
].every((method) => typeof performance[method] === "function");
|
|
402
|
-
var DecodeError = class extends Error {
|
|
403
|
-
};
|
|
404
|
-
var NormalizeError = class extends Error {
|
|
405
|
-
};
|
|
406
|
-
var PageNotFoundError = class extends Error {
|
|
407
|
-
constructor(page) {
|
|
408
|
-
super();
|
|
409
|
-
this.code = "ENOENT";
|
|
410
|
-
this.name = "PageNotFoundError";
|
|
411
|
-
this.message = `Cannot find module for page: ${page}`;
|
|
412
|
-
}
|
|
413
|
-
};
|
|
414
|
-
var MissingStaticPage = class extends Error {
|
|
415
|
-
constructor(page, message) {
|
|
416
|
-
super();
|
|
417
|
-
this.message = `Failed to load static file for page: ${page} ${message}`;
|
|
418
|
-
}
|
|
419
|
-
};
|
|
420
|
-
var MiddlewareNotFoundError = class extends Error {
|
|
421
|
-
constructor() {
|
|
422
|
-
super();
|
|
423
|
-
this.code = "ENOENT";
|
|
424
|
-
this.message = `Cannot find the middleware module`;
|
|
425
|
-
}
|
|
426
|
-
};
|
|
427
|
-
function stringifyError(error) {
|
|
428
|
-
return JSON.stringify({
|
|
429
|
-
message: error.message,
|
|
430
|
-
stack: error.stack
|
|
431
|
-
});
|
|
432
|
-
}
|
|
433
|
-
}
|
|
434
|
-
});
|
|
435
|
-
|
|
436
|
-
// ../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js
|
|
437
|
-
var require_remove_trailing_slash = __commonJS({
|
|
438
|
-
"../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js"(exports) {
|
|
439
|
-
"use strict";
|
|
440
|
-
Object.defineProperty(exports, "__esModule", {
|
|
441
|
-
value: true
|
|
442
|
-
});
|
|
443
|
-
Object.defineProperty(exports, "removeTrailingSlash", {
|
|
444
|
-
enumerable: true,
|
|
445
|
-
get: function() {
|
|
446
|
-
return removeTrailingSlash;
|
|
447
|
-
}
|
|
448
|
-
});
|
|
449
|
-
function removeTrailingSlash(route) {
|
|
450
|
-
return route.charCodeAt(route.length - 1) === 47 && route.length > 1 ? route.slice(0, -1) : route;
|
|
451
|
-
}
|
|
452
|
-
}
|
|
453
|
-
});
|
|
454
|
-
|
|
455
|
-
// ../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/shared/lib/router/utils/parse-path.js
|
|
456
|
-
var require_parse_path = __commonJS({
|
|
457
|
-
"../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/shared/lib/router/utils/parse-path.js"(exports) {
|
|
458
|
-
"use strict";
|
|
459
|
-
Object.defineProperty(exports, "__esModule", {
|
|
460
|
-
value: true
|
|
461
|
-
});
|
|
462
|
-
Object.defineProperty(exports, "parsePath", {
|
|
463
|
-
enumerable: true,
|
|
464
|
-
get: function() {
|
|
465
|
-
return parsePath;
|
|
466
|
-
}
|
|
467
|
-
});
|
|
468
|
-
function parsePath(path) {
|
|
469
|
-
const hashIndex = path.indexOf("#");
|
|
470
|
-
const queryIndex = path.indexOf("?");
|
|
471
|
-
const hasQuery = queryIndex > -1 && (hashIndex < 0 || queryIndex < hashIndex);
|
|
472
|
-
if (hasQuery || hashIndex > -1) {
|
|
473
|
-
return {
|
|
474
|
-
pathname: path.substring(0, hasQuery ? queryIndex : hashIndex),
|
|
475
|
-
query: hasQuery ? path.substring(queryIndex, hashIndex > -1 ? hashIndex : void 0) : "",
|
|
476
|
-
hash: hashIndex > -1 ? path.slice(hashIndex) : ""
|
|
477
|
-
};
|
|
478
|
-
}
|
|
479
|
-
return {
|
|
480
|
-
pathname: path,
|
|
481
|
-
query: "",
|
|
482
|
-
hash: ""
|
|
483
|
-
};
|
|
484
|
-
}
|
|
485
|
-
}
|
|
486
|
-
});
|
|
487
|
-
|
|
488
|
-
// ../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/client/normalize-trailing-slash.js
|
|
489
|
-
var require_normalize_trailing_slash = __commonJS({
|
|
490
|
-
"../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/client/normalize-trailing-slash.js"(exports, module) {
|
|
491
|
-
"use strict";
|
|
492
|
-
Object.defineProperty(exports, "__esModule", {
|
|
493
|
-
value: true
|
|
494
|
-
});
|
|
495
|
-
Object.defineProperty(exports, "normalizePathTrailingSlash", {
|
|
496
|
-
enumerable: true,
|
|
497
|
-
get: function() {
|
|
498
|
-
return normalizePathTrailingSlash;
|
|
499
|
-
}
|
|
500
|
-
});
|
|
501
|
-
var _removetrailingslash = require_remove_trailing_slash();
|
|
502
|
-
var _parsepath = require_parse_path();
|
|
503
|
-
var normalizePathTrailingSlash = (path) => {
|
|
504
|
-
if (path.charCodeAt(0) !== 47 || process.env.__NEXT_MANUAL_TRAILING_SLASH) {
|
|
505
|
-
return path;
|
|
506
|
-
}
|
|
507
|
-
const { pathname, query, hash } = (0, _parsepath.parsePath)(path);
|
|
508
|
-
if (process.env.__NEXT_TRAILING_SLASH) {
|
|
509
|
-
if (/\.[^/]+\/?$/.test(pathname)) {
|
|
510
|
-
return `${(0, _removetrailingslash.removeTrailingSlash)(pathname)}${query}${hash}`;
|
|
511
|
-
} else if (pathname.endsWith("/")) {
|
|
512
|
-
return `${pathname}${query}${hash}`;
|
|
513
|
-
} else {
|
|
514
|
-
return `${pathname}/${query}${hash}`;
|
|
515
|
-
}
|
|
516
|
-
}
|
|
517
|
-
return `${(0, _removetrailingslash.removeTrailingSlash)(pathname)}${query}${hash}`;
|
|
518
|
-
};
|
|
519
|
-
if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
|
|
520
|
-
Object.defineProperty(exports.default, "__esModule", { value: true });
|
|
521
|
-
Object.assign(exports.default, exports);
|
|
522
|
-
module.exports = exports.default;
|
|
523
|
-
}
|
|
524
|
-
}
|
|
525
|
-
});
|
|
526
|
-
|
|
527
|
-
// ../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/shared/lib/router/utils/path-has-prefix.js
|
|
528
|
-
var require_path_has_prefix = __commonJS({
|
|
529
|
-
"../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/shared/lib/router/utils/path-has-prefix.js"(exports) {
|
|
530
|
-
"use strict";
|
|
531
|
-
Object.defineProperty(exports, "__esModule", {
|
|
532
|
-
value: true
|
|
533
|
-
});
|
|
534
|
-
Object.defineProperty(exports, "pathHasPrefix", {
|
|
535
|
-
enumerable: true,
|
|
536
|
-
get: function() {
|
|
537
|
-
return pathHasPrefix;
|
|
538
|
-
}
|
|
539
|
-
});
|
|
540
|
-
var _parsepath = require_parse_path();
|
|
541
|
-
function pathHasPrefix(path, prefix) {
|
|
542
|
-
if (typeof path !== "string") {
|
|
543
|
-
return false;
|
|
544
|
-
}
|
|
545
|
-
const { pathname } = (0, _parsepath.parsePath)(path);
|
|
546
|
-
return pathname === prefix || pathname.startsWith(prefix + "/");
|
|
547
|
-
}
|
|
548
|
-
}
|
|
549
|
-
});
|
|
550
|
-
|
|
551
|
-
// ../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/client/has-base-path.js
|
|
552
|
-
var require_has_base_path = __commonJS({
|
|
553
|
-
"../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/client/has-base-path.js"(exports, module) {
|
|
554
|
-
"use strict";
|
|
555
|
-
Object.defineProperty(exports, "__esModule", {
|
|
556
|
-
value: true
|
|
557
|
-
});
|
|
558
|
-
Object.defineProperty(exports, "hasBasePath", {
|
|
559
|
-
enumerable: true,
|
|
560
|
-
get: function() {
|
|
561
|
-
return hasBasePath;
|
|
562
|
-
}
|
|
563
|
-
});
|
|
564
|
-
var _pathhasprefix = require_path_has_prefix();
|
|
565
|
-
var basePath = process.env.__NEXT_ROUTER_BASEPATH || "";
|
|
566
|
-
function hasBasePath(path) {
|
|
567
|
-
return (0, _pathhasprefix.pathHasPrefix)(path, basePath);
|
|
568
|
-
}
|
|
569
|
-
if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
|
|
570
|
-
Object.defineProperty(exports.default, "__esModule", { value: true });
|
|
571
|
-
Object.assign(exports.default, exports);
|
|
572
|
-
module.exports = exports.default;
|
|
573
|
-
}
|
|
574
|
-
}
|
|
575
|
-
});
|
|
576
|
-
|
|
577
|
-
// ../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/shared/lib/router/utils/is-local-url.js
|
|
578
|
-
var require_is_local_url = __commonJS({
|
|
579
|
-
"../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/shared/lib/router/utils/is-local-url.js"(exports) {
|
|
580
|
-
"use strict";
|
|
581
|
-
Object.defineProperty(exports, "__esModule", {
|
|
582
|
-
value: true
|
|
583
|
-
});
|
|
584
|
-
Object.defineProperty(exports, "isLocalURL", {
|
|
585
|
-
enumerable: true,
|
|
586
|
-
get: function() {
|
|
587
|
-
return isLocalURL;
|
|
588
|
-
}
|
|
589
|
-
});
|
|
590
|
-
var _utils = require_utils();
|
|
591
|
-
var _hasbasepath = require_has_base_path();
|
|
592
|
-
function isLocalURL(url) {
|
|
593
|
-
if (!(0, _utils.isAbsoluteUrl)(url)) return true;
|
|
594
|
-
try {
|
|
595
|
-
const locationOrigin = (0, _utils.getLocationOrigin)();
|
|
596
|
-
const resolved = new URL(url, locationOrigin);
|
|
597
|
-
return resolved.origin === locationOrigin && (0, _hasbasepath.hasBasePath)(resolved.pathname);
|
|
598
|
-
} catch (_) {
|
|
599
|
-
return false;
|
|
600
|
-
}
|
|
601
|
-
}
|
|
602
|
-
}
|
|
603
|
-
});
|
|
604
|
-
|
|
605
|
-
// ../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/shared/lib/router/utils/sorted-routes.js
|
|
606
|
-
var require_sorted_routes = __commonJS({
|
|
607
|
-
"../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/shared/lib/router/utils/sorted-routes.js"(exports) {
|
|
608
|
-
"use strict";
|
|
609
|
-
Object.defineProperty(exports, "__esModule", {
|
|
610
|
-
value: true
|
|
611
|
-
});
|
|
612
|
-
function _export(target, all) {
|
|
613
|
-
for (var name in all) Object.defineProperty(target, name, {
|
|
614
|
-
enumerable: true,
|
|
615
|
-
get: all[name]
|
|
616
|
-
});
|
|
617
|
-
}
|
|
618
|
-
_export(exports, {
|
|
619
|
-
getSortedRouteObjects: function() {
|
|
620
|
-
return getSortedRouteObjects;
|
|
621
|
-
},
|
|
622
|
-
getSortedRoutes: function() {
|
|
623
|
-
return getSortedRoutes;
|
|
624
|
-
}
|
|
625
|
-
});
|
|
626
|
-
var UrlNode = class _UrlNode {
|
|
627
|
-
insert(urlPath) {
|
|
628
|
-
this._insert(urlPath.split("/").filter(Boolean), [], false);
|
|
629
|
-
}
|
|
630
|
-
smoosh() {
|
|
631
|
-
return this._smoosh();
|
|
632
|
-
}
|
|
633
|
-
_smoosh(prefix = "/") {
|
|
634
|
-
const childrenPaths = [
|
|
635
|
-
...this.children.keys()
|
|
636
|
-
].sort();
|
|
637
|
-
if (this.slugName !== null) {
|
|
638
|
-
childrenPaths.splice(childrenPaths.indexOf("[]"), 1);
|
|
639
|
-
}
|
|
640
|
-
if (this.restSlugName !== null) {
|
|
641
|
-
childrenPaths.splice(childrenPaths.indexOf("[...]"), 1);
|
|
642
|
-
}
|
|
643
|
-
if (this.optionalRestSlugName !== null) {
|
|
644
|
-
childrenPaths.splice(childrenPaths.indexOf("[[...]]"), 1);
|
|
645
|
-
}
|
|
646
|
-
const routes = childrenPaths.map((c14) => this.children.get(c14)._smoosh(`${prefix}${c14}/`)).reduce((prev, curr) => [
|
|
647
|
-
...prev,
|
|
648
|
-
...curr
|
|
649
|
-
], []);
|
|
650
|
-
if (this.slugName !== null) {
|
|
651
|
-
routes.push(...this.children.get("[]")._smoosh(`${prefix}[${this.slugName}]/`));
|
|
652
|
-
}
|
|
653
|
-
if (!this.placeholder) {
|
|
654
|
-
const r32 = prefix === "/" ? "/" : prefix.slice(0, -1);
|
|
655
|
-
if (this.optionalRestSlugName != null) {
|
|
656
|
-
throw Object.defineProperty(new Error(`You cannot define a route with the same specificity as a optional catch-all route ("${r32}" and "${r32}[[...${this.optionalRestSlugName}]]").`), "__NEXT_ERROR_CODE", {
|
|
657
|
-
value: "E458",
|
|
658
|
-
enumerable: false,
|
|
659
|
-
configurable: true
|
|
660
|
-
});
|
|
661
|
-
}
|
|
662
|
-
routes.unshift(r32);
|
|
663
|
-
}
|
|
664
|
-
if (this.restSlugName !== null) {
|
|
665
|
-
routes.push(...this.children.get("[...]")._smoosh(`${prefix}[...${this.restSlugName}]/`));
|
|
666
|
-
}
|
|
667
|
-
if (this.optionalRestSlugName !== null) {
|
|
668
|
-
routes.push(...this.children.get("[[...]]")._smoosh(`${prefix}[[...${this.optionalRestSlugName}]]/`));
|
|
669
|
-
}
|
|
670
|
-
return routes;
|
|
671
|
-
}
|
|
672
|
-
_insert(urlPaths, slugNames, isCatchAll) {
|
|
673
|
-
if (urlPaths.length === 0) {
|
|
674
|
-
this.placeholder = false;
|
|
675
|
-
return;
|
|
676
|
-
}
|
|
677
|
-
if (isCatchAll) {
|
|
678
|
-
throw Object.defineProperty(new Error(`Catch-all must be the last part of the URL.`), "__NEXT_ERROR_CODE", {
|
|
679
|
-
value: "E392",
|
|
680
|
-
enumerable: false,
|
|
681
|
-
configurable: true
|
|
682
|
-
});
|
|
683
|
-
}
|
|
684
|
-
let nextSegment = urlPaths[0];
|
|
685
|
-
if (nextSegment.startsWith("[") && nextSegment.endsWith("]")) {
|
|
686
|
-
let handleSlug = function(previousSlug, nextSlug) {
|
|
687
|
-
if (previousSlug !== null) {
|
|
688
|
-
if (previousSlug !== nextSlug) {
|
|
689
|
-
throw Object.defineProperty(new Error(`You cannot use different slug names for the same dynamic path ('${previousSlug}' !== '${nextSlug}').`), "__NEXT_ERROR_CODE", {
|
|
690
|
-
value: "E337",
|
|
691
|
-
enumerable: false,
|
|
692
|
-
configurable: true
|
|
693
|
-
});
|
|
694
|
-
}
|
|
695
|
-
}
|
|
696
|
-
slugNames.forEach((slug) => {
|
|
697
|
-
if (slug === nextSlug) {
|
|
698
|
-
throw Object.defineProperty(new Error(`You cannot have the same slug name "${nextSlug}" repeat within a single dynamic path`), "__NEXT_ERROR_CODE", {
|
|
699
|
-
value: "E247",
|
|
700
|
-
enumerable: false,
|
|
701
|
-
configurable: true
|
|
702
|
-
});
|
|
703
|
-
}
|
|
704
|
-
if (slug.replace(/\W/g, "") === nextSegment.replace(/\W/g, "")) {
|
|
705
|
-
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", {
|
|
706
|
-
value: "E499",
|
|
707
|
-
enumerable: false,
|
|
708
|
-
configurable: true
|
|
709
|
-
});
|
|
710
|
-
}
|
|
711
|
-
});
|
|
712
|
-
slugNames.push(nextSlug);
|
|
713
|
-
};
|
|
714
|
-
let segmentName = nextSegment.slice(1, -1);
|
|
715
|
-
let isOptional = false;
|
|
716
|
-
if (segmentName.startsWith("[") && segmentName.endsWith("]")) {
|
|
717
|
-
segmentName = segmentName.slice(1, -1);
|
|
718
|
-
isOptional = true;
|
|
719
|
-
}
|
|
720
|
-
if (segmentName.startsWith("\u2026")) {
|
|
721
|
-
throw Object.defineProperty(new Error(`Detected a three-dot character ('\u2026') at ('${segmentName}'). Did you mean ('...')?`), "__NEXT_ERROR_CODE", {
|
|
722
|
-
value: "E147",
|
|
723
|
-
enumerable: false,
|
|
724
|
-
configurable: true
|
|
725
|
-
});
|
|
726
|
-
}
|
|
727
|
-
if (segmentName.startsWith("...")) {
|
|
728
|
-
segmentName = segmentName.substring(3);
|
|
729
|
-
isCatchAll = true;
|
|
730
|
-
}
|
|
731
|
-
if (segmentName.startsWith("[") || segmentName.endsWith("]")) {
|
|
732
|
-
throw Object.defineProperty(new Error(`Segment names may not start or end with extra brackets ('${segmentName}').`), "__NEXT_ERROR_CODE", {
|
|
733
|
-
value: "E421",
|
|
734
|
-
enumerable: false,
|
|
735
|
-
configurable: true
|
|
736
|
-
});
|
|
737
|
-
}
|
|
738
|
-
if (segmentName.startsWith(".")) {
|
|
739
|
-
throw Object.defineProperty(new Error(`Segment names may not start with erroneous periods ('${segmentName}').`), "__NEXT_ERROR_CODE", {
|
|
740
|
-
value: "E288",
|
|
741
|
-
enumerable: false,
|
|
742
|
-
configurable: true
|
|
743
|
-
});
|
|
744
|
-
}
|
|
745
|
-
if (isCatchAll) {
|
|
746
|
-
if (isOptional) {
|
|
747
|
-
if (this.restSlugName != null) {
|
|
748
|
-
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", {
|
|
749
|
-
value: "E299",
|
|
750
|
-
enumerable: false,
|
|
751
|
-
configurable: true
|
|
752
|
-
});
|
|
753
|
-
}
|
|
754
|
-
handleSlug(this.optionalRestSlugName, segmentName);
|
|
755
|
-
this.optionalRestSlugName = segmentName;
|
|
756
|
-
nextSegment = "[[...]]";
|
|
757
|
-
} else {
|
|
758
|
-
if (this.optionalRestSlugName != null) {
|
|
759
|
-
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", {
|
|
760
|
-
value: "E300",
|
|
761
|
-
enumerable: false,
|
|
762
|
-
configurable: true
|
|
763
|
-
});
|
|
764
|
-
}
|
|
765
|
-
handleSlug(this.restSlugName, segmentName);
|
|
766
|
-
this.restSlugName = segmentName;
|
|
767
|
-
nextSegment = "[...]";
|
|
768
|
-
}
|
|
769
|
-
} else {
|
|
770
|
-
if (isOptional) {
|
|
771
|
-
throw Object.defineProperty(new Error(`Optional route parameters are not yet supported ("${urlPaths[0]}").`), "__NEXT_ERROR_CODE", {
|
|
772
|
-
value: "E435",
|
|
773
|
-
enumerable: false,
|
|
774
|
-
configurable: true
|
|
775
|
-
});
|
|
776
|
-
}
|
|
777
|
-
handleSlug(this.slugName, segmentName);
|
|
778
|
-
this.slugName = segmentName;
|
|
779
|
-
nextSegment = "[]";
|
|
780
|
-
}
|
|
781
|
-
}
|
|
782
|
-
if (!this.children.has(nextSegment)) {
|
|
783
|
-
this.children.set(nextSegment, new _UrlNode());
|
|
784
|
-
}
|
|
785
|
-
this.children.get(nextSegment)._insert(urlPaths.slice(1), slugNames, isCatchAll);
|
|
786
|
-
}
|
|
787
|
-
constructor() {
|
|
788
|
-
this.placeholder = true;
|
|
789
|
-
this.children = /* @__PURE__ */ new Map();
|
|
790
|
-
this.slugName = null;
|
|
791
|
-
this.restSlugName = null;
|
|
792
|
-
this.optionalRestSlugName = null;
|
|
793
|
-
}
|
|
794
|
-
};
|
|
795
|
-
function getSortedRoutes(normalizedPages) {
|
|
796
|
-
const root = new UrlNode();
|
|
797
|
-
normalizedPages.forEach((pagePath) => root.insert(pagePath));
|
|
798
|
-
return root.smoosh();
|
|
799
|
-
}
|
|
800
|
-
function getSortedRouteObjects(objects, getter) {
|
|
801
|
-
const indexes = {};
|
|
802
|
-
const pathnames = [];
|
|
803
|
-
for (let i4 = 0; i4 < objects.length; i4++) {
|
|
804
|
-
const pathname = getter(objects[i4]);
|
|
805
|
-
indexes[pathname] = i4;
|
|
806
|
-
pathnames[i4] = pathname;
|
|
807
|
-
}
|
|
808
|
-
const sorted = getSortedRoutes(pathnames);
|
|
809
|
-
return sorted.map((pathname) => objects[indexes[pathname]]);
|
|
810
|
-
}
|
|
811
|
-
}
|
|
812
|
-
});
|
|
813
|
-
|
|
814
|
-
// ../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js
|
|
815
|
-
var require_ensure_leading_slash = __commonJS({
|
|
816
|
-
"../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js"(exports) {
|
|
817
|
-
"use strict";
|
|
818
|
-
Object.defineProperty(exports, "__esModule", {
|
|
819
|
-
value: true
|
|
820
|
-
});
|
|
821
|
-
Object.defineProperty(exports, "ensureLeadingSlash", {
|
|
822
|
-
enumerable: true,
|
|
823
|
-
get: function() {
|
|
824
|
-
return ensureLeadingSlash;
|
|
825
|
-
}
|
|
826
|
-
});
|
|
827
|
-
function ensureLeadingSlash(path) {
|
|
828
|
-
return path.startsWith("/") ? path : `/${path}`;
|
|
829
|
-
}
|
|
830
|
-
}
|
|
831
|
-
});
|
|
832
|
-
|
|
833
|
-
// ../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/shared/lib/segment.js
|
|
834
|
-
var require_segment = __commonJS({
|
|
835
|
-
"../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/shared/lib/segment.js"(exports) {
|
|
836
|
-
"use strict";
|
|
837
|
-
Object.defineProperty(exports, "__esModule", {
|
|
838
|
-
value: true
|
|
839
|
-
});
|
|
840
|
-
function _export(target, all) {
|
|
841
|
-
for (var name in all) Object.defineProperty(target, name, {
|
|
842
|
-
enumerable: true,
|
|
843
|
-
get: all[name]
|
|
844
|
-
});
|
|
845
|
-
}
|
|
846
|
-
_export(exports, {
|
|
847
|
-
DEFAULT_SEGMENT_KEY: function() {
|
|
848
|
-
return DEFAULT_SEGMENT_KEY;
|
|
849
|
-
},
|
|
850
|
-
NOT_FOUND_SEGMENT_KEY: function() {
|
|
851
|
-
return NOT_FOUND_SEGMENT_KEY;
|
|
852
|
-
},
|
|
853
|
-
PAGE_SEGMENT_KEY: function() {
|
|
854
|
-
return PAGE_SEGMENT_KEY;
|
|
855
|
-
},
|
|
856
|
-
addSearchParamsIfPageSegment: function() {
|
|
857
|
-
return addSearchParamsIfPageSegment;
|
|
858
|
-
},
|
|
859
|
-
computeSelectedLayoutSegment: function() {
|
|
860
|
-
return computeSelectedLayoutSegment;
|
|
861
|
-
},
|
|
862
|
-
getSegmentValue: function() {
|
|
863
|
-
return getSegmentValue;
|
|
864
|
-
},
|
|
865
|
-
getSelectedLayoutSegmentPath: function() {
|
|
866
|
-
return getSelectedLayoutSegmentPath;
|
|
867
|
-
},
|
|
868
|
-
isGroupSegment: function() {
|
|
869
|
-
return isGroupSegment;
|
|
870
|
-
},
|
|
871
|
-
isParallelRouteSegment: function() {
|
|
872
|
-
return isParallelRouteSegment;
|
|
873
|
-
}
|
|
874
|
-
});
|
|
875
|
-
function getSegmentValue(segment) {
|
|
876
|
-
return Array.isArray(segment) ? segment[1] : segment;
|
|
877
|
-
}
|
|
878
|
-
function isGroupSegment(segment) {
|
|
879
|
-
return segment[0] === "(" && segment.endsWith(")");
|
|
880
|
-
}
|
|
881
|
-
function isParallelRouteSegment(segment) {
|
|
882
|
-
return segment.startsWith("@") && segment !== "@children";
|
|
883
|
-
}
|
|
884
|
-
function addSearchParamsIfPageSegment(segment, searchParams) {
|
|
885
|
-
const isPageSegment = segment.includes(PAGE_SEGMENT_KEY);
|
|
886
|
-
if (isPageSegment) {
|
|
887
|
-
const stringifiedQuery = JSON.stringify(searchParams);
|
|
888
|
-
return stringifiedQuery !== "{}" ? PAGE_SEGMENT_KEY + "?" + stringifiedQuery : PAGE_SEGMENT_KEY;
|
|
889
|
-
}
|
|
890
|
-
return segment;
|
|
891
|
-
}
|
|
892
|
-
function computeSelectedLayoutSegment(segments, parallelRouteKey) {
|
|
893
|
-
if (!segments || segments.length === 0) {
|
|
894
|
-
return null;
|
|
895
|
-
}
|
|
896
|
-
const rawSegment = parallelRouteKey === "children" ? segments[0] : segments[segments.length - 1];
|
|
897
|
-
return rawSegment === DEFAULT_SEGMENT_KEY ? null : rawSegment;
|
|
898
|
-
}
|
|
899
|
-
function getSelectedLayoutSegmentPath(tree, parallelRouteKey, first = true, segmentPath = []) {
|
|
900
|
-
let node;
|
|
901
|
-
if (first) {
|
|
902
|
-
node = tree[1][parallelRouteKey];
|
|
903
|
-
} else {
|
|
904
|
-
const parallelRoutes = tree[1];
|
|
905
|
-
node = parallelRoutes.children ?? Object.values(parallelRoutes)[0];
|
|
906
|
-
}
|
|
907
|
-
if (!node) return segmentPath;
|
|
908
|
-
const segment = node[0];
|
|
909
|
-
let segmentValue = getSegmentValue(segment);
|
|
910
|
-
if (!segmentValue || segmentValue.startsWith(PAGE_SEGMENT_KEY)) {
|
|
911
|
-
return segmentPath;
|
|
912
|
-
}
|
|
913
|
-
segmentPath.push(segmentValue);
|
|
914
|
-
return getSelectedLayoutSegmentPath(node, parallelRouteKey, false, segmentPath);
|
|
915
|
-
}
|
|
916
|
-
var PAGE_SEGMENT_KEY = "__PAGE__";
|
|
917
|
-
var DEFAULT_SEGMENT_KEY = "__DEFAULT__";
|
|
918
|
-
var NOT_FOUND_SEGMENT_KEY = "/_not-found";
|
|
919
|
-
}
|
|
920
|
-
});
|
|
921
|
-
|
|
922
|
-
// ../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/shared/lib/router/utils/app-paths.js
|
|
923
|
-
var require_app_paths = __commonJS({
|
|
924
|
-
"../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/shared/lib/router/utils/app-paths.js"(exports) {
|
|
925
|
-
"use strict";
|
|
926
|
-
Object.defineProperty(exports, "__esModule", {
|
|
927
|
-
value: true
|
|
928
|
-
});
|
|
929
|
-
function _export(target, all) {
|
|
930
|
-
for (var name in all) Object.defineProperty(target, name, {
|
|
931
|
-
enumerable: true,
|
|
932
|
-
get: all[name]
|
|
933
|
-
});
|
|
934
|
-
}
|
|
935
|
-
_export(exports, {
|
|
936
|
-
compareAppPaths: function() {
|
|
937
|
-
return compareAppPaths;
|
|
938
|
-
},
|
|
939
|
-
normalizeAppPath: function() {
|
|
940
|
-
return normalizeAppPath;
|
|
941
|
-
},
|
|
942
|
-
normalizeRscURL: function() {
|
|
943
|
-
return normalizeRscURL;
|
|
944
|
-
}
|
|
945
|
-
});
|
|
946
|
-
var _ensureleadingslash = require_ensure_leading_slash();
|
|
947
|
-
var _segment = require_segment();
|
|
948
|
-
function normalizeAppPath(route) {
|
|
949
|
-
return (0, _ensureleadingslash.ensureLeadingSlash)(route.split("/").reduce((pathname, segment, index, segments) => {
|
|
950
|
-
if (!segment) {
|
|
951
|
-
return pathname;
|
|
952
|
-
}
|
|
953
|
-
if ((0, _segment.isGroupSegment)(segment)) {
|
|
954
|
-
return pathname;
|
|
955
|
-
}
|
|
956
|
-
if (segment[0] === "@") {
|
|
957
|
-
return pathname;
|
|
958
|
-
}
|
|
959
|
-
if ((segment === "page" || segment === "route") && index === segments.length - 1) {
|
|
960
|
-
return pathname;
|
|
961
|
-
}
|
|
962
|
-
return `${pathname}/${segment}`;
|
|
963
|
-
}, ""));
|
|
964
|
-
}
|
|
965
|
-
function compareAppPaths(a89, b2) {
|
|
966
|
-
const aHasSlot = a89.includes("/@");
|
|
967
|
-
const bHasSlot = b2.includes("/@");
|
|
968
|
-
if (aHasSlot && !bHasSlot) return -1;
|
|
969
|
-
if (!aHasSlot && bHasSlot) return 1;
|
|
970
|
-
return a89.localeCompare(b2);
|
|
971
|
-
}
|
|
972
|
-
function normalizeRscURL(url) {
|
|
973
|
-
return url.replace(
|
|
974
|
-
/\.rsc($|\?)/,
|
|
975
|
-
// $1 ensures `?` is preserved
|
|
976
|
-
"$1"
|
|
977
|
-
);
|
|
978
|
-
}
|
|
979
|
-
}
|
|
980
|
-
});
|
|
981
|
-
|
|
982
|
-
// ../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/shared/lib/router/utils/interception-routes.js
|
|
983
|
-
var require_interception_routes = __commonJS({
|
|
984
|
-
"../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/shared/lib/router/utils/interception-routes.js"(exports) {
|
|
985
|
-
"use strict";
|
|
986
|
-
Object.defineProperty(exports, "__esModule", {
|
|
987
|
-
value: true
|
|
988
|
-
});
|
|
989
|
-
function _export(target, all) {
|
|
990
|
-
for (var name in all) Object.defineProperty(target, name, {
|
|
991
|
-
enumerable: true,
|
|
992
|
-
get: all[name]
|
|
993
|
-
});
|
|
994
|
-
}
|
|
995
|
-
_export(exports, {
|
|
996
|
-
INTERCEPTION_ROUTE_MARKERS: function() {
|
|
997
|
-
return INTERCEPTION_ROUTE_MARKERS;
|
|
998
|
-
},
|
|
999
|
-
extractInterceptionRouteInformation: function() {
|
|
1000
|
-
return extractInterceptionRouteInformation;
|
|
1001
|
-
},
|
|
1002
|
-
isInterceptionRouteAppPath: function() {
|
|
1003
|
-
return isInterceptionRouteAppPath;
|
|
1004
|
-
}
|
|
1005
|
-
});
|
|
1006
|
-
var _apppaths = require_app_paths();
|
|
1007
|
-
var INTERCEPTION_ROUTE_MARKERS = [
|
|
1008
|
-
"(..)(..)",
|
|
1009
|
-
"(.)",
|
|
1010
|
-
"(..)",
|
|
1011
|
-
"(...)"
|
|
1012
|
-
];
|
|
1013
|
-
function isInterceptionRouteAppPath(path) {
|
|
1014
|
-
return path.split("/").find((segment) => INTERCEPTION_ROUTE_MARKERS.find((m14) => segment.startsWith(m14))) !== void 0;
|
|
1015
|
-
}
|
|
1016
|
-
function extractInterceptionRouteInformation(path) {
|
|
1017
|
-
let interceptingRoute;
|
|
1018
|
-
let marker;
|
|
1019
|
-
let interceptedRoute;
|
|
1020
|
-
for (const segment of path.split("/")) {
|
|
1021
|
-
marker = INTERCEPTION_ROUTE_MARKERS.find((m14) => segment.startsWith(m14));
|
|
1022
|
-
if (marker) {
|
|
1023
|
-
;
|
|
1024
|
-
[interceptingRoute, interceptedRoute] = path.split(marker, 2);
|
|
1025
|
-
break;
|
|
1026
|
-
}
|
|
1027
|
-
}
|
|
1028
|
-
if (!interceptingRoute || !marker || !interceptedRoute) {
|
|
1029
|
-
throw Object.defineProperty(new Error(`Invalid interception route: ${path}. Must be in the format /<intercepting route>/(..|...|..)(..)/<intercepted route>`), "__NEXT_ERROR_CODE", {
|
|
1030
|
-
value: "E269",
|
|
1031
|
-
enumerable: false,
|
|
1032
|
-
configurable: true
|
|
1033
|
-
});
|
|
1034
|
-
}
|
|
1035
|
-
interceptingRoute = (0, _apppaths.normalizeAppPath)(interceptingRoute);
|
|
1036
|
-
switch (marker) {
|
|
1037
|
-
case "(.)":
|
|
1038
|
-
if (interceptingRoute === "/") {
|
|
1039
|
-
interceptedRoute = `/${interceptedRoute}`;
|
|
1040
|
-
} else {
|
|
1041
|
-
interceptedRoute = interceptingRoute + "/" + interceptedRoute;
|
|
1042
|
-
}
|
|
1043
|
-
break;
|
|
1044
|
-
case "(..)":
|
|
1045
|
-
if (interceptingRoute === "/") {
|
|
1046
|
-
throw Object.defineProperty(new Error(`Invalid interception route: ${path}. Cannot use (..) marker at the root level, use (.) instead.`), "__NEXT_ERROR_CODE", {
|
|
1047
|
-
value: "E207",
|
|
1048
|
-
enumerable: false,
|
|
1049
|
-
configurable: true
|
|
1050
|
-
});
|
|
1051
|
-
}
|
|
1052
|
-
interceptedRoute = interceptingRoute.split("/").slice(0, -1).concat(interceptedRoute).join("/");
|
|
1053
|
-
break;
|
|
1054
|
-
case "(...)":
|
|
1055
|
-
interceptedRoute = "/" + interceptedRoute;
|
|
1056
|
-
break;
|
|
1057
|
-
case "(..)(..)":
|
|
1058
|
-
const splitInterceptingRoute = interceptingRoute.split("/");
|
|
1059
|
-
if (splitInterceptingRoute.length <= 2) {
|
|
1060
|
-
throw Object.defineProperty(new Error(`Invalid interception route: ${path}. Cannot use (..)(..) marker at the root level or one level up.`), "__NEXT_ERROR_CODE", {
|
|
1061
|
-
value: "E486",
|
|
1062
|
-
enumerable: false,
|
|
1063
|
-
configurable: true
|
|
1064
|
-
});
|
|
1065
|
-
}
|
|
1066
|
-
interceptedRoute = splitInterceptingRoute.slice(0, -2).concat(interceptedRoute).join("/");
|
|
1067
|
-
break;
|
|
1068
|
-
default:
|
|
1069
|
-
throw Object.defineProperty(new Error("Invariant: unexpected marker"), "__NEXT_ERROR_CODE", {
|
|
1070
|
-
value: "E112",
|
|
1071
|
-
enumerable: false,
|
|
1072
|
-
configurable: true
|
|
1073
|
-
});
|
|
1074
|
-
}
|
|
1075
|
-
return {
|
|
1076
|
-
interceptingRoute,
|
|
1077
|
-
interceptedRoute
|
|
1078
|
-
};
|
|
1079
|
-
}
|
|
1080
|
-
}
|
|
1081
|
-
});
|
|
1082
|
-
|
|
1083
|
-
// ../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/shared/lib/router/utils/is-dynamic.js
|
|
1084
|
-
var require_is_dynamic = __commonJS({
|
|
1085
|
-
"../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/shared/lib/router/utils/is-dynamic.js"(exports) {
|
|
1086
|
-
"use strict";
|
|
1087
|
-
Object.defineProperty(exports, "__esModule", {
|
|
1088
|
-
value: true
|
|
1089
|
-
});
|
|
1090
|
-
Object.defineProperty(exports, "isDynamicRoute", {
|
|
1091
|
-
enumerable: true,
|
|
1092
|
-
get: function() {
|
|
1093
|
-
return isDynamicRoute;
|
|
1094
|
-
}
|
|
1095
|
-
});
|
|
1096
|
-
var _interceptionroutes = require_interception_routes();
|
|
1097
|
-
var TEST_ROUTE = /\/[^/]*\[[^/]+\][^/]*(?=\/|$)/;
|
|
1098
|
-
var TEST_STRICT_ROUTE = /\/\[[^/]+\](?=\/|$)/;
|
|
1099
|
-
function isDynamicRoute(route, strict = true) {
|
|
1100
|
-
if ((0, _interceptionroutes.isInterceptionRouteAppPath)(route)) {
|
|
1101
|
-
route = (0, _interceptionroutes.extractInterceptionRouteInformation)(route).interceptedRoute;
|
|
1102
|
-
}
|
|
1103
|
-
if (strict) {
|
|
1104
|
-
return TEST_STRICT_ROUTE.test(route);
|
|
1105
|
-
}
|
|
1106
|
-
return TEST_ROUTE.test(route);
|
|
1107
|
-
}
|
|
1108
|
-
}
|
|
1109
|
-
});
|
|
1110
|
-
|
|
1111
|
-
// ../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/shared/lib/router/utils/index.js
|
|
1112
|
-
var require_utils2 = __commonJS({
|
|
1113
|
-
"../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/shared/lib/router/utils/index.js"(exports) {
|
|
1114
|
-
"use strict";
|
|
1115
|
-
Object.defineProperty(exports, "__esModule", {
|
|
1116
|
-
value: true
|
|
1117
|
-
});
|
|
1118
|
-
function _export(target, all) {
|
|
1119
|
-
for (var name in all) Object.defineProperty(target, name, {
|
|
1120
|
-
enumerable: true,
|
|
1121
|
-
get: all[name]
|
|
1122
|
-
});
|
|
1123
|
-
}
|
|
1124
|
-
_export(exports, {
|
|
1125
|
-
getSortedRouteObjects: function() {
|
|
1126
|
-
return _sortedroutes.getSortedRouteObjects;
|
|
1127
|
-
},
|
|
1128
|
-
getSortedRoutes: function() {
|
|
1129
|
-
return _sortedroutes.getSortedRoutes;
|
|
1130
|
-
},
|
|
1131
|
-
isDynamicRoute: function() {
|
|
1132
|
-
return _isdynamic.isDynamicRoute;
|
|
1133
|
-
}
|
|
1134
|
-
});
|
|
1135
|
-
var _sortedroutes = require_sorted_routes();
|
|
1136
|
-
var _isdynamic = require_is_dynamic();
|
|
1137
|
-
}
|
|
1138
|
-
});
|
|
1139
|
-
|
|
1140
|
-
// ../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/compiled/path-to-regexp/index.js
|
|
1141
|
-
var require_path_to_regexp = __commonJS({
|
|
1142
|
-
"../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/compiled/path-to-regexp/index.js"(exports, module) {
|
|
1143
|
-
"use strict";
|
|
1144
|
-
(() => {
|
|
1145
|
-
"use strict";
|
|
1146
|
-
if (typeof __nccwpck_require__ !== "undefined") __nccwpck_require__.ab = __dirname + "/";
|
|
1147
|
-
var e148 = {};
|
|
1148
|
-
(() => {
|
|
1149
|
-
var n7 = e148;
|
|
1150
|
-
Object.defineProperty(n7, "__esModule", { value: true });
|
|
1151
|
-
n7.pathToRegexp = n7.tokensToRegexp = n7.regexpToFunction = n7.match = n7.tokensToFunction = n7.compile = n7.parse = void 0;
|
|
1152
|
-
function lexer(e149) {
|
|
1153
|
-
var n8 = [];
|
|
1154
|
-
var r32 = 0;
|
|
1155
|
-
while (r32 < e149.length) {
|
|
1156
|
-
var t17 = e149[r32];
|
|
1157
|
-
if (t17 === "*" || t17 === "+" || t17 === "?") {
|
|
1158
|
-
n8.push({ type: "MODIFIER", index: r32, value: e149[r32++] });
|
|
1159
|
-
continue;
|
|
1160
|
-
}
|
|
1161
|
-
if (t17 === "\\") {
|
|
1162
|
-
n8.push({ type: "ESCAPED_CHAR", index: r32++, value: e149[r32++] });
|
|
1163
|
-
continue;
|
|
1164
|
-
}
|
|
1165
|
-
if (t17 === "{") {
|
|
1166
|
-
n8.push({ type: "OPEN", index: r32, value: e149[r32++] });
|
|
1167
|
-
continue;
|
|
1168
|
-
}
|
|
1169
|
-
if (t17 === "}") {
|
|
1170
|
-
n8.push({ type: "CLOSE", index: r32, value: e149[r32++] });
|
|
1171
|
-
continue;
|
|
1172
|
-
}
|
|
1173
|
-
if (t17 === ":") {
|
|
1174
|
-
var a89 = "";
|
|
1175
|
-
var i4 = r32 + 1;
|
|
1176
|
-
while (i4 < e149.length) {
|
|
1177
|
-
var o57 = e149.charCodeAt(i4);
|
|
1178
|
-
if (o57 >= 48 && o57 <= 57 || o57 >= 65 && o57 <= 90 || o57 >= 97 && o57 <= 122 || o57 === 95) {
|
|
1179
|
-
a89 += e149[i4++];
|
|
1180
|
-
continue;
|
|
1181
|
-
}
|
|
1182
|
-
break;
|
|
1183
|
-
}
|
|
1184
|
-
if (!a89) throw new TypeError("Missing parameter name at ".concat(r32));
|
|
1185
|
-
n8.push({ type: "NAME", index: r32, value: a89 });
|
|
1186
|
-
r32 = i4;
|
|
1187
|
-
continue;
|
|
1188
|
-
}
|
|
1189
|
-
if (t17 === "(") {
|
|
1190
|
-
var c14 = 1;
|
|
1191
|
-
var f21 = "";
|
|
1192
|
-
var i4 = r32 + 1;
|
|
1193
|
-
if (e149[i4] === "?") {
|
|
1194
|
-
throw new TypeError('Pattern cannot start with "?" at '.concat(i4));
|
|
1195
|
-
}
|
|
1196
|
-
while (i4 < e149.length) {
|
|
1197
|
-
if (e149[i4] === "\\") {
|
|
1198
|
-
f21 += e149[i4++] + e149[i4++];
|
|
1199
|
-
continue;
|
|
1200
|
-
}
|
|
1201
|
-
if (e149[i4] === ")") {
|
|
1202
|
-
c14--;
|
|
1203
|
-
if (c14 === 0) {
|
|
1204
|
-
i4++;
|
|
1205
|
-
break;
|
|
1206
|
-
}
|
|
1207
|
-
} else if (e149[i4] === "(") {
|
|
1208
|
-
c14++;
|
|
1209
|
-
if (e149[i4 + 1] !== "?") {
|
|
1210
|
-
throw new TypeError("Capturing groups are not allowed at ".concat(i4));
|
|
1211
|
-
}
|
|
1212
|
-
}
|
|
1213
|
-
f21 += e149[i4++];
|
|
1214
|
-
}
|
|
1215
|
-
if (c14) throw new TypeError("Unbalanced pattern at ".concat(r32));
|
|
1216
|
-
if (!f21) throw new TypeError("Missing pattern at ".concat(r32));
|
|
1217
|
-
n8.push({ type: "PATTERN", index: r32, value: f21 });
|
|
1218
|
-
r32 = i4;
|
|
1219
|
-
continue;
|
|
1220
|
-
}
|
|
1221
|
-
n8.push({ type: "CHAR", index: r32, value: e149[r32++] });
|
|
1222
|
-
}
|
|
1223
|
-
n8.push({ type: "END", index: r32, value: "" });
|
|
1224
|
-
return n8;
|
|
1225
|
-
}
|
|
1226
|
-
function parse(e149, n8) {
|
|
1227
|
-
if (n8 === void 0) {
|
|
1228
|
-
n8 = {};
|
|
1229
|
-
}
|
|
1230
|
-
var r32 = lexer(e149);
|
|
1231
|
-
var t17 = n8.prefixes, a89 = t17 === void 0 ? "./" : t17, i4 = n8.delimiter, o57 = i4 === void 0 ? "/#?" : i4;
|
|
1232
|
-
var c14 = [];
|
|
1233
|
-
var f21 = 0;
|
|
1234
|
-
var u2 = 0;
|
|
1235
|
-
var p8 = "";
|
|
1236
|
-
var tryConsume = function(e150) {
|
|
1237
|
-
if (u2 < r32.length && r32[u2].type === e150) return r32[u2++].value;
|
|
1238
|
-
};
|
|
1239
|
-
var mustConsume = function(e150) {
|
|
1240
|
-
var n9 = tryConsume(e150);
|
|
1241
|
-
if (n9 !== void 0) return n9;
|
|
1242
|
-
var t18 = r32[u2], a90 = t18.type, i5 = t18.index;
|
|
1243
|
-
throw new TypeError("Unexpected ".concat(a90, " at ").concat(i5, ", expected ").concat(e150));
|
|
1244
|
-
};
|
|
1245
|
-
var consumeText = function() {
|
|
1246
|
-
var e150 = "";
|
|
1247
|
-
var n9;
|
|
1248
|
-
while (n9 = tryConsume("CHAR") || tryConsume("ESCAPED_CHAR")) {
|
|
1249
|
-
e150 += n9;
|
|
1250
|
-
}
|
|
1251
|
-
return e150;
|
|
1252
|
-
};
|
|
1253
|
-
var isSafe = function(e150) {
|
|
1254
|
-
for (var n9 = 0, r33 = o57; n9 < r33.length; n9++) {
|
|
1255
|
-
var t18 = r33[n9];
|
|
1256
|
-
if (e150.indexOf(t18) > -1) return true;
|
|
1257
|
-
}
|
|
1258
|
-
return false;
|
|
1259
|
-
};
|
|
1260
|
-
var safePattern = function(e150) {
|
|
1261
|
-
var n9 = c14[c14.length - 1];
|
|
1262
|
-
var r33 = e150 || (n9 && typeof n9 === "string" ? n9 : "");
|
|
1263
|
-
if (n9 && !r33) {
|
|
1264
|
-
throw new TypeError('Must have text between two parameters, missing text after "'.concat(n9.name, '"'));
|
|
1265
|
-
}
|
|
1266
|
-
if (!r33 || isSafe(r33)) return "[^".concat(escapeString(o57), "]+?");
|
|
1267
|
-
return "(?:(?!".concat(escapeString(r33), ")[^").concat(escapeString(o57), "])+?");
|
|
1268
|
-
};
|
|
1269
|
-
while (u2 < r32.length) {
|
|
1270
|
-
var v = tryConsume("CHAR");
|
|
1271
|
-
var s21 = tryConsume("NAME");
|
|
1272
|
-
var d5 = tryConsume("PATTERN");
|
|
1273
|
-
if (s21 || d5) {
|
|
1274
|
-
var g2 = v || "";
|
|
1275
|
-
if (a89.indexOf(g2) === -1) {
|
|
1276
|
-
p8 += g2;
|
|
1277
|
-
g2 = "";
|
|
1278
|
-
}
|
|
1279
|
-
if (p8) {
|
|
1280
|
-
c14.push(p8);
|
|
1281
|
-
p8 = "";
|
|
1282
|
-
}
|
|
1283
|
-
c14.push({ name: s21 || f21++, prefix: g2, suffix: "", pattern: d5 || safePattern(g2), modifier: tryConsume("MODIFIER") || "" });
|
|
1284
|
-
continue;
|
|
1285
|
-
}
|
|
1286
|
-
var x = v || tryConsume("ESCAPED_CHAR");
|
|
1287
|
-
if (x) {
|
|
1288
|
-
p8 += x;
|
|
1289
|
-
continue;
|
|
1290
|
-
}
|
|
1291
|
-
if (p8) {
|
|
1292
|
-
c14.push(p8);
|
|
1293
|
-
p8 = "";
|
|
1294
|
-
}
|
|
1295
|
-
var h = tryConsume("OPEN");
|
|
1296
|
-
if (h) {
|
|
1297
|
-
var g2 = consumeText();
|
|
1298
|
-
var l13 = tryConsume("NAME") || "";
|
|
1299
|
-
var m14 = tryConsume("PATTERN") || "";
|
|
1300
|
-
var T = consumeText();
|
|
1301
|
-
mustConsume("CLOSE");
|
|
1302
|
-
c14.push({ name: l13 || (m14 ? f21++ : ""), pattern: l13 && !m14 ? safePattern(g2) : m14, prefix: g2, suffix: T, modifier: tryConsume("MODIFIER") || "" });
|
|
1303
|
-
continue;
|
|
1304
|
-
}
|
|
1305
|
-
mustConsume("END");
|
|
1306
|
-
}
|
|
1307
|
-
return c14;
|
|
1308
|
-
}
|
|
1309
|
-
n7.parse = parse;
|
|
1310
|
-
function compile(e149, n8) {
|
|
1311
|
-
return tokensToFunction(parse(e149, n8), n8);
|
|
1312
|
-
}
|
|
1313
|
-
n7.compile = compile;
|
|
1314
|
-
function tokensToFunction(e149, n8) {
|
|
1315
|
-
if (n8 === void 0) {
|
|
1316
|
-
n8 = {};
|
|
1317
|
-
}
|
|
1318
|
-
var r32 = flags(n8);
|
|
1319
|
-
var t17 = n8.encode, a89 = t17 === void 0 ? function(e150) {
|
|
1320
|
-
return e150;
|
|
1321
|
-
} : t17, i4 = n8.validate, o57 = i4 === void 0 ? true : i4;
|
|
1322
|
-
var c14 = e149.map((function(e150) {
|
|
1323
|
-
if (typeof e150 === "object") {
|
|
1324
|
-
return new RegExp("^(?:".concat(e150.pattern, ")$"), r32);
|
|
1325
|
-
}
|
|
1326
|
-
}));
|
|
1327
|
-
return function(n9) {
|
|
1328
|
-
var r33 = "";
|
|
1329
|
-
for (var t18 = 0; t18 < e149.length; t18++) {
|
|
1330
|
-
var i5 = e149[t18];
|
|
1331
|
-
if (typeof i5 === "string") {
|
|
1332
|
-
r33 += i5;
|
|
1333
|
-
continue;
|
|
1334
|
-
}
|
|
1335
|
-
var f21 = n9 ? n9[i5.name] : void 0;
|
|
1336
|
-
var u2 = i5.modifier === "?" || i5.modifier === "*";
|
|
1337
|
-
var p8 = i5.modifier === "*" || i5.modifier === "+";
|
|
1338
|
-
if (Array.isArray(f21)) {
|
|
1339
|
-
if (!p8) {
|
|
1340
|
-
throw new TypeError('Expected "'.concat(i5.name, '" to not repeat, but got an array'));
|
|
1341
|
-
}
|
|
1342
|
-
if (f21.length === 0) {
|
|
1343
|
-
if (u2) continue;
|
|
1344
|
-
throw new TypeError('Expected "'.concat(i5.name, '" to not be empty'));
|
|
1345
|
-
}
|
|
1346
|
-
for (var v = 0; v < f21.length; v++) {
|
|
1347
|
-
var s21 = a89(f21[v], i5);
|
|
1348
|
-
if (o57 && !c14[t18].test(s21)) {
|
|
1349
|
-
throw new TypeError('Expected all "'.concat(i5.name, '" to match "').concat(i5.pattern, '", but got "').concat(s21, '"'));
|
|
1350
|
-
}
|
|
1351
|
-
r33 += i5.prefix + s21 + i5.suffix;
|
|
1352
|
-
}
|
|
1353
|
-
continue;
|
|
1354
|
-
}
|
|
1355
|
-
if (typeof f21 === "string" || typeof f21 === "number") {
|
|
1356
|
-
var s21 = a89(String(f21), i5);
|
|
1357
|
-
if (o57 && !c14[t18].test(s21)) {
|
|
1358
|
-
throw new TypeError('Expected "'.concat(i5.name, '" to match "').concat(i5.pattern, '", but got "').concat(s21, '"'));
|
|
1359
|
-
}
|
|
1360
|
-
r33 += i5.prefix + s21 + i5.suffix;
|
|
1361
|
-
continue;
|
|
1362
|
-
}
|
|
1363
|
-
if (u2) continue;
|
|
1364
|
-
var d5 = p8 ? "an array" : "a string";
|
|
1365
|
-
throw new TypeError('Expected "'.concat(i5.name, '" to be ').concat(d5));
|
|
1366
|
-
}
|
|
1367
|
-
return r33;
|
|
1368
|
-
};
|
|
1369
|
-
}
|
|
1370
|
-
n7.tokensToFunction = tokensToFunction;
|
|
1371
|
-
function match(e149, n8) {
|
|
1372
|
-
var r32 = [];
|
|
1373
|
-
var t17 = pathToRegexp(e149, r32, n8);
|
|
1374
|
-
return regexpToFunction(t17, r32, n8);
|
|
1375
|
-
}
|
|
1376
|
-
n7.match = match;
|
|
1377
|
-
function regexpToFunction(e149, n8, r32) {
|
|
1378
|
-
if (r32 === void 0) {
|
|
1379
|
-
r32 = {};
|
|
1380
|
-
}
|
|
1381
|
-
var t17 = r32.decode, a89 = t17 === void 0 ? function(e150) {
|
|
1382
|
-
return e150;
|
|
1383
|
-
} : t17;
|
|
1384
|
-
return function(r33) {
|
|
1385
|
-
var t18 = e149.exec(r33);
|
|
1386
|
-
if (!t18) return false;
|
|
1387
|
-
var i4 = t18[0], o57 = t18.index;
|
|
1388
|
-
var c14 = /* @__PURE__ */ Object.create(null);
|
|
1389
|
-
var _loop_1 = function(e150) {
|
|
1390
|
-
if (t18[e150] === void 0) return "continue";
|
|
1391
|
-
var r34 = n8[e150 - 1];
|
|
1392
|
-
if (r34.modifier === "*" || r34.modifier === "+") {
|
|
1393
|
-
c14[r34.name] = t18[e150].split(r34.prefix + r34.suffix).map((function(e151) {
|
|
1394
|
-
return a89(e151, r34);
|
|
1395
|
-
}));
|
|
1396
|
-
} else {
|
|
1397
|
-
c14[r34.name] = a89(t18[e150], r34);
|
|
1398
|
-
}
|
|
1399
|
-
};
|
|
1400
|
-
for (var f21 = 1; f21 < t18.length; f21++) {
|
|
1401
|
-
_loop_1(f21);
|
|
1402
|
-
}
|
|
1403
|
-
return { path: i4, index: o57, params: c14 };
|
|
1404
|
-
};
|
|
1405
|
-
}
|
|
1406
|
-
n7.regexpToFunction = regexpToFunction;
|
|
1407
|
-
function escapeString(e149) {
|
|
1408
|
-
return e149.replace(/([.+*?=^!:${}()[\]|/\\])/g, "\\$1");
|
|
1409
|
-
}
|
|
1410
|
-
function flags(e149) {
|
|
1411
|
-
return e149 && e149.sensitive ? "" : "i";
|
|
1412
|
-
}
|
|
1413
|
-
function regexpToRegexp(e149, n8) {
|
|
1414
|
-
if (!n8) return e149;
|
|
1415
|
-
var r32 = /\((?:\?<(.*?)>)?(?!\?)/g;
|
|
1416
|
-
var t17 = 0;
|
|
1417
|
-
var a89 = r32.exec(e149.source);
|
|
1418
|
-
while (a89) {
|
|
1419
|
-
n8.push({ name: a89[1] || t17++, prefix: "", suffix: "", modifier: "", pattern: "" });
|
|
1420
|
-
a89 = r32.exec(e149.source);
|
|
1421
|
-
}
|
|
1422
|
-
return e149;
|
|
1423
|
-
}
|
|
1424
|
-
function arrayToRegexp(e149, n8, r32) {
|
|
1425
|
-
var t17 = e149.map((function(e150) {
|
|
1426
|
-
return pathToRegexp(e150, n8, r32).source;
|
|
1427
|
-
}));
|
|
1428
|
-
return new RegExp("(?:".concat(t17.join("|"), ")"), flags(r32));
|
|
1429
|
-
}
|
|
1430
|
-
function stringToRegexp(e149, n8, r32) {
|
|
1431
|
-
return tokensToRegexp(parse(e149, r32), n8, r32);
|
|
1432
|
-
}
|
|
1433
|
-
function tokensToRegexp(e149, n8, r32) {
|
|
1434
|
-
if (r32 === void 0) {
|
|
1435
|
-
r32 = {};
|
|
1436
|
-
}
|
|
1437
|
-
var t17 = r32.strict, a89 = t17 === void 0 ? false : t17, i4 = r32.start, o57 = i4 === void 0 ? true : i4, c14 = r32.end, f21 = c14 === void 0 ? true : c14, u2 = r32.encode, p8 = u2 === void 0 ? function(e150) {
|
|
1438
|
-
return e150;
|
|
1439
|
-
} : u2, v = r32.delimiter, s21 = v === void 0 ? "/#?" : v, d5 = r32.endsWith, g2 = d5 === void 0 ? "" : d5;
|
|
1440
|
-
var x = "[".concat(escapeString(g2), "]|$");
|
|
1441
|
-
var h = "[".concat(escapeString(s21), "]");
|
|
1442
|
-
var l13 = o57 ? "^" : "";
|
|
1443
|
-
for (var m14 = 0, T = e149; m14 < T.length; m14++) {
|
|
1444
|
-
var E = T[m14];
|
|
1445
|
-
if (typeof E === "string") {
|
|
1446
|
-
l13 += escapeString(p8(E));
|
|
1447
|
-
} else {
|
|
1448
|
-
var w2 = escapeString(p8(E.prefix));
|
|
1449
|
-
var y = escapeString(p8(E.suffix));
|
|
1450
|
-
if (E.pattern) {
|
|
1451
|
-
if (n8) n8.push(E);
|
|
1452
|
-
if (w2 || y) {
|
|
1453
|
-
if (E.modifier === "+" || E.modifier === "*") {
|
|
1454
|
-
var R3 = E.modifier === "*" ? "?" : "";
|
|
1455
|
-
l13 += "(?:".concat(w2, "((?:").concat(E.pattern, ")(?:").concat(y).concat(w2, "(?:").concat(E.pattern, "))*)").concat(y, ")").concat(R3);
|
|
1456
|
-
} else {
|
|
1457
|
-
l13 += "(?:".concat(w2, "(").concat(E.pattern, ")").concat(y, ")").concat(E.modifier);
|
|
1458
|
-
}
|
|
1459
|
-
} else {
|
|
1460
|
-
if (E.modifier === "+" || E.modifier === "*") {
|
|
1461
|
-
throw new TypeError('Can not repeat "'.concat(E.name, '" without a prefix and suffix'));
|
|
1462
|
-
}
|
|
1463
|
-
l13 += "(".concat(E.pattern, ")").concat(E.modifier);
|
|
1464
|
-
}
|
|
1465
|
-
} else {
|
|
1466
|
-
l13 += "(?:".concat(w2).concat(y, ")").concat(E.modifier);
|
|
1467
|
-
}
|
|
1468
|
-
}
|
|
1469
|
-
}
|
|
1470
|
-
if (f21) {
|
|
1471
|
-
if (!a89) l13 += "".concat(h, "?");
|
|
1472
|
-
l13 += !r32.endsWith ? "$" : "(?=".concat(x, ")");
|
|
1473
|
-
} else {
|
|
1474
|
-
var A = e149[e149.length - 1];
|
|
1475
|
-
var _ = typeof A === "string" ? h.indexOf(A[A.length - 1]) > -1 : A === void 0;
|
|
1476
|
-
if (!a89) {
|
|
1477
|
-
l13 += "(?:".concat(h, "(?=").concat(x, "))?");
|
|
1478
|
-
}
|
|
1479
|
-
if (!_) {
|
|
1480
|
-
l13 += "(?=".concat(h, "|").concat(x, ")");
|
|
1481
|
-
}
|
|
1482
|
-
}
|
|
1483
|
-
return new RegExp(l13, flags(r32));
|
|
1484
|
-
}
|
|
1485
|
-
n7.tokensToRegexp = tokensToRegexp;
|
|
1486
|
-
function pathToRegexp(e149, n8, r32) {
|
|
1487
|
-
if (e149 instanceof RegExp) return regexpToRegexp(e149, n8);
|
|
1488
|
-
if (Array.isArray(e149)) return arrayToRegexp(e149, n8, r32);
|
|
1489
|
-
return stringToRegexp(e149, n8, r32);
|
|
1490
|
-
}
|
|
1491
|
-
n7.pathToRegexp = pathToRegexp;
|
|
1492
|
-
})();
|
|
1493
|
-
module.exports = e148;
|
|
1494
|
-
})();
|
|
1495
|
-
}
|
|
1496
|
-
});
|
|
1497
|
-
|
|
1498
|
-
// ../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/lib/route-pattern-normalizer.js
|
|
1499
|
-
var require_route_pattern_normalizer = __commonJS({
|
|
1500
|
-
"../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/lib/route-pattern-normalizer.js"(exports) {
|
|
1501
|
-
"use strict";
|
|
1502
|
-
Object.defineProperty(exports, "__esModule", {
|
|
1503
|
-
value: true
|
|
1504
|
-
});
|
|
1505
|
-
function _export(target, all) {
|
|
1506
|
-
for (var name in all) Object.defineProperty(target, name, {
|
|
1507
|
-
enumerable: true,
|
|
1508
|
-
get: all[name]
|
|
1509
|
-
});
|
|
1510
|
-
}
|
|
1511
|
-
_export(exports, {
|
|
1512
|
-
PARAM_SEPARATOR: function() {
|
|
1513
|
-
return PARAM_SEPARATOR;
|
|
1514
|
-
},
|
|
1515
|
-
hasAdjacentParameterIssues: function() {
|
|
1516
|
-
return hasAdjacentParameterIssues;
|
|
1517
|
-
},
|
|
1518
|
-
normalizeAdjacentParameters: function() {
|
|
1519
|
-
return normalizeAdjacentParameters;
|
|
1520
|
-
},
|
|
1521
|
-
normalizeTokensForRegexp: function() {
|
|
1522
|
-
return normalizeTokensForRegexp;
|
|
1523
|
-
},
|
|
1524
|
-
stripNormalizedSeparators: function() {
|
|
1525
|
-
return stripNormalizedSeparators;
|
|
1526
|
-
},
|
|
1527
|
-
stripParameterSeparators: function() {
|
|
1528
|
-
return stripParameterSeparators;
|
|
1529
|
-
}
|
|
1530
|
-
});
|
|
1531
|
-
var PARAM_SEPARATOR = "_NEXTSEP_";
|
|
1532
|
-
function hasAdjacentParameterIssues(route) {
|
|
1533
|
-
if (typeof route !== "string") return false;
|
|
1534
|
-
if (/\/\(\.{1,3}\):[^/\s]+/.test(route)) {
|
|
1535
|
-
return true;
|
|
1536
|
-
}
|
|
1537
|
-
if (/:[a-zA-Z_][a-zA-Z0-9_]*:[a-zA-Z_][a-zA-Z0-9_]*/.test(route)) {
|
|
1538
|
-
return true;
|
|
1539
|
-
}
|
|
1540
|
-
return false;
|
|
1541
|
-
}
|
|
1542
|
-
function normalizeAdjacentParameters(route) {
|
|
1543
|
-
let normalized = route;
|
|
1544
|
-
normalized = normalized.replace(/(\([^)]*\)):([^/\s]+)/g, `$1${PARAM_SEPARATOR}:$2`);
|
|
1545
|
-
normalized = normalized.replace(/:([^:/\s)]+)(?=:)/g, `:$1${PARAM_SEPARATOR}`);
|
|
1546
|
-
return normalized;
|
|
1547
|
-
}
|
|
1548
|
-
function normalizeTokensForRegexp(tokens) {
|
|
1549
|
-
return tokens.map((token) => {
|
|
1550
|
-
if (typeof token === "object" && token !== null && // Not all token objects have 'modifier' property (e.g., simple text tokens)
|
|
1551
|
-
"modifier" in token && // Only repeating modifiers (* or +) cause the validation error
|
|
1552
|
-
// Other modifiers like '?' (optional) are fine
|
|
1553
|
-
(token.modifier === "*" || token.modifier === "+") && // Token objects can have different shapes depending on route pattern
|
|
1554
|
-
"prefix" in token && "suffix" in token && // Both prefix and suffix must be empty strings
|
|
1555
|
-
// This is what causes the validation error in path-to-regexp
|
|
1556
|
-
token.prefix === "" && token.suffix === "") {
|
|
1557
|
-
return {
|
|
1558
|
-
...token,
|
|
1559
|
-
prefix: "/"
|
|
1560
|
-
};
|
|
1561
|
-
}
|
|
1562
|
-
return token;
|
|
1563
|
-
});
|
|
1564
|
-
}
|
|
1565
|
-
function stripNormalizedSeparators(pathname) {
|
|
1566
|
-
return pathname.replace(new RegExp(`\\)${PARAM_SEPARATOR}`, "g"), ")");
|
|
1567
|
-
}
|
|
1568
|
-
function stripParameterSeparators(params) {
|
|
1569
|
-
const cleaned = {};
|
|
1570
|
-
for (const [key, value] of Object.entries(params)) {
|
|
1571
|
-
if (typeof value === "string") {
|
|
1572
|
-
cleaned[key] = value.replace(new RegExp(`^${PARAM_SEPARATOR}`), "");
|
|
1573
|
-
} else if (Array.isArray(value)) {
|
|
1574
|
-
cleaned[key] = value.map((item) => typeof item === "string" ? item.replace(new RegExp(`^${PARAM_SEPARATOR}`), "") : item);
|
|
1575
|
-
} else {
|
|
1576
|
-
cleaned[key] = value;
|
|
1577
|
-
}
|
|
1578
|
-
}
|
|
1579
|
-
return cleaned;
|
|
1580
|
-
}
|
|
1581
|
-
}
|
|
1582
|
-
});
|
|
1583
|
-
|
|
1584
|
-
// ../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/shared/lib/router/utils/route-match-utils.js
|
|
1585
|
-
var require_route_match_utils = __commonJS({
|
|
1586
|
-
"../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/shared/lib/router/utils/route-match-utils.js"(exports) {
|
|
1587
|
-
"use strict";
|
|
1588
|
-
Object.defineProperty(exports, "__esModule", {
|
|
1589
|
-
value: true
|
|
1590
|
-
});
|
|
1591
|
-
function _export(target, all) {
|
|
1592
|
-
for (var name in all) Object.defineProperty(target, name, {
|
|
1593
|
-
enumerable: true,
|
|
1594
|
-
get: all[name]
|
|
1595
|
-
});
|
|
1596
|
-
}
|
|
1597
|
-
_export(exports, {
|
|
1598
|
-
safeCompile: function() {
|
|
1599
|
-
return safeCompile;
|
|
1600
|
-
},
|
|
1601
|
-
safePathToRegexp: function() {
|
|
1602
|
-
return safePathToRegexp;
|
|
1603
|
-
},
|
|
1604
|
-
safeRegexpToFunction: function() {
|
|
1605
|
-
return safeRegexpToFunction;
|
|
1606
|
-
},
|
|
1607
|
-
safeRouteMatcher: function() {
|
|
1608
|
-
return safeRouteMatcher;
|
|
1609
|
-
}
|
|
1610
|
-
});
|
|
1611
|
-
var _pathtoregexp = require_path_to_regexp();
|
|
1612
|
-
var _routepatternnormalizer = require_route_pattern_normalizer();
|
|
1613
|
-
function safePathToRegexp(route, keys, options) {
|
|
1614
|
-
if (typeof route !== "string") {
|
|
1615
|
-
return (0, _pathtoregexp.pathToRegexp)(route, keys, options);
|
|
1616
|
-
}
|
|
1617
|
-
const needsNormalization = (0, _routepatternnormalizer.hasAdjacentParameterIssues)(route);
|
|
1618
|
-
const routeToUse = needsNormalization ? (0, _routepatternnormalizer.normalizeAdjacentParameters)(route) : route;
|
|
1619
|
-
try {
|
|
1620
|
-
return (0, _pathtoregexp.pathToRegexp)(routeToUse, keys, options);
|
|
1621
|
-
} catch (error) {
|
|
1622
|
-
if (!needsNormalization) {
|
|
1623
|
-
try {
|
|
1624
|
-
const normalizedRoute = (0, _routepatternnormalizer.normalizeAdjacentParameters)(route);
|
|
1625
|
-
return (0, _pathtoregexp.pathToRegexp)(normalizedRoute, keys, options);
|
|
1626
|
-
} catch (retryError) {
|
|
1627
|
-
throw error;
|
|
1628
|
-
}
|
|
1629
|
-
}
|
|
1630
|
-
throw error;
|
|
1631
|
-
}
|
|
1632
|
-
}
|
|
1633
|
-
function safeCompile(route, options) {
|
|
1634
|
-
const needsNormalization = (0, _routepatternnormalizer.hasAdjacentParameterIssues)(route);
|
|
1635
|
-
const routeToUse = needsNormalization ? (0, _routepatternnormalizer.normalizeAdjacentParameters)(route) : route;
|
|
1636
|
-
try {
|
|
1637
|
-
const compiler = (0, _pathtoregexp.compile)(routeToUse, options);
|
|
1638
|
-
if (needsNormalization) {
|
|
1639
|
-
return (params) => {
|
|
1640
|
-
return (0, _routepatternnormalizer.stripNormalizedSeparators)(compiler(params));
|
|
1641
|
-
};
|
|
1642
|
-
}
|
|
1643
|
-
return compiler;
|
|
1644
|
-
} catch (error) {
|
|
1645
|
-
if (!needsNormalization) {
|
|
1646
|
-
try {
|
|
1647
|
-
const normalizedRoute = (0, _routepatternnormalizer.normalizeAdjacentParameters)(route);
|
|
1648
|
-
const compiler = (0, _pathtoregexp.compile)(normalizedRoute, options);
|
|
1649
|
-
return (params) => {
|
|
1650
|
-
return (0, _routepatternnormalizer.stripNormalizedSeparators)(compiler(params));
|
|
1651
|
-
};
|
|
1652
|
-
} catch (retryError) {
|
|
1653
|
-
throw error;
|
|
1654
|
-
}
|
|
1655
|
-
}
|
|
1656
|
-
throw error;
|
|
1657
|
-
}
|
|
1658
|
-
}
|
|
1659
|
-
function safeRegexpToFunction(regexp, keys) {
|
|
1660
|
-
const originalMatcher = (0, _pathtoregexp.regexpToFunction)(regexp, keys || []);
|
|
1661
|
-
return (pathname) => {
|
|
1662
|
-
const result = originalMatcher(pathname);
|
|
1663
|
-
if (!result) return false;
|
|
1664
|
-
return {
|
|
1665
|
-
...result,
|
|
1666
|
-
params: (0, _routepatternnormalizer.stripParameterSeparators)(result.params)
|
|
1667
|
-
};
|
|
1668
|
-
};
|
|
1669
|
-
}
|
|
1670
|
-
function safeRouteMatcher(matcherFn) {
|
|
1671
|
-
return (pathname) => {
|
|
1672
|
-
const result = matcherFn(pathname);
|
|
1673
|
-
if (!result) return false;
|
|
1674
|
-
return (0, _routepatternnormalizer.stripParameterSeparators)(result);
|
|
1675
|
-
};
|
|
1676
|
-
}
|
|
1677
|
-
}
|
|
1678
|
-
});
|
|
1679
|
-
|
|
1680
|
-
// ../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/shared/lib/router/utils/route-matcher.js
|
|
1681
|
-
var require_route_matcher = __commonJS({
|
|
1682
|
-
"../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/shared/lib/router/utils/route-matcher.js"(exports) {
|
|
1683
|
-
"use strict";
|
|
1684
|
-
Object.defineProperty(exports, "__esModule", {
|
|
1685
|
-
value: true
|
|
1686
|
-
});
|
|
1687
|
-
Object.defineProperty(exports, "getRouteMatcher", {
|
|
1688
|
-
enumerable: true,
|
|
1689
|
-
get: function() {
|
|
1690
|
-
return getRouteMatcher;
|
|
1691
|
-
}
|
|
1692
|
-
});
|
|
1693
|
-
var _utils = require_utils();
|
|
1694
|
-
var _routematchutils = require_route_match_utils();
|
|
1695
|
-
function getRouteMatcher({ re: re2, groups }) {
|
|
1696
|
-
const rawMatcher = (pathname) => {
|
|
1697
|
-
const routeMatch = re2.exec(pathname);
|
|
1698
|
-
if (!routeMatch) return false;
|
|
1699
|
-
const decode = (param) => {
|
|
1700
|
-
try {
|
|
1701
|
-
return decodeURIComponent(param);
|
|
1702
|
-
} catch {
|
|
1703
|
-
throw Object.defineProperty(new _utils.DecodeError("failed to decode param"), "__NEXT_ERROR_CODE", {
|
|
1704
|
-
value: "E528",
|
|
1705
|
-
enumerable: false,
|
|
1706
|
-
configurable: true
|
|
1707
|
-
});
|
|
1708
|
-
}
|
|
1709
|
-
};
|
|
1710
|
-
const params = {};
|
|
1711
|
-
for (const [key, group] of Object.entries(groups)) {
|
|
1712
|
-
const match = routeMatch[group.pos];
|
|
1713
|
-
if (match !== void 0) {
|
|
1714
|
-
if (group.repeat) {
|
|
1715
|
-
params[key] = match.split("/").map((entry) => decode(entry));
|
|
1716
|
-
} else {
|
|
1717
|
-
params[key] = decode(match);
|
|
1718
|
-
}
|
|
1719
|
-
}
|
|
1720
|
-
}
|
|
1721
|
-
return params;
|
|
1722
|
-
};
|
|
1723
|
-
return (0, _routematchutils.safeRouteMatcher)(rawMatcher);
|
|
1724
|
-
}
|
|
1725
|
-
}
|
|
1726
|
-
});
|
|
1727
|
-
|
|
1728
|
-
// ../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/lib/constants.js
|
|
1729
|
-
var require_constants = __commonJS({
|
|
1730
|
-
"../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/lib/constants.js"(exports) {
|
|
1731
|
-
"use strict";
|
|
1732
|
-
Object.defineProperty(exports, "__esModule", {
|
|
1733
|
-
value: true
|
|
1734
|
-
});
|
|
1735
|
-
function _export(target, all) {
|
|
1736
|
-
for (var name in all) Object.defineProperty(target, name, {
|
|
1737
|
-
enumerable: true,
|
|
1738
|
-
get: all[name]
|
|
1739
|
-
});
|
|
1740
|
-
}
|
|
1741
|
-
_export(exports, {
|
|
1742
|
-
ACTION_SUFFIX: function() {
|
|
1743
|
-
return ACTION_SUFFIX;
|
|
1744
|
-
},
|
|
1745
|
-
APP_DIR_ALIAS: function() {
|
|
1746
|
-
return APP_DIR_ALIAS;
|
|
1747
|
-
},
|
|
1748
|
-
CACHE_ONE_YEAR_SECONDS: function() {
|
|
1749
|
-
return CACHE_ONE_YEAR_SECONDS;
|
|
1750
|
-
},
|
|
1751
|
-
DOT_NEXT_ALIAS: function() {
|
|
1752
|
-
return DOT_NEXT_ALIAS;
|
|
1753
|
-
},
|
|
1754
|
-
ESLINT_DEFAULT_DIRS: function() {
|
|
1755
|
-
return ESLINT_DEFAULT_DIRS;
|
|
1756
|
-
},
|
|
1757
|
-
GSP_NO_RETURNED_VALUE: function() {
|
|
1758
|
-
return GSP_NO_RETURNED_VALUE;
|
|
1759
|
-
},
|
|
1760
|
-
GSSP_COMPONENT_MEMBER_ERROR: function() {
|
|
1761
|
-
return GSSP_COMPONENT_MEMBER_ERROR;
|
|
1762
|
-
},
|
|
1763
|
-
GSSP_NO_RETURNED_VALUE: function() {
|
|
1764
|
-
return GSSP_NO_RETURNED_VALUE;
|
|
1765
|
-
},
|
|
1766
|
-
HTML_CONTENT_TYPE_HEADER: function() {
|
|
1767
|
-
return HTML_CONTENT_TYPE_HEADER;
|
|
1768
|
-
},
|
|
1769
|
-
INFINITE_CACHE: function() {
|
|
1770
|
-
return INFINITE_CACHE;
|
|
1771
|
-
},
|
|
1772
|
-
INSTRUMENTATION_HOOK_FILENAME: function() {
|
|
1773
|
-
return INSTRUMENTATION_HOOK_FILENAME;
|
|
1774
|
-
},
|
|
1775
|
-
JSON_CONTENT_TYPE_HEADER: function() {
|
|
1776
|
-
return JSON_CONTENT_TYPE_HEADER;
|
|
1777
|
-
},
|
|
1778
|
-
MATCHED_PATH_HEADER: function() {
|
|
1779
|
-
return MATCHED_PATH_HEADER;
|
|
1780
|
-
},
|
|
1781
|
-
MIDDLEWARE_FILENAME: function() {
|
|
1782
|
-
return MIDDLEWARE_FILENAME;
|
|
1783
|
-
},
|
|
1784
|
-
MIDDLEWARE_LOCATION_REGEXP: function() {
|
|
1785
|
-
return MIDDLEWARE_LOCATION_REGEXP;
|
|
1786
|
-
},
|
|
1787
|
-
NEXT_BODY_SUFFIX: function() {
|
|
1788
|
-
return NEXT_BODY_SUFFIX;
|
|
1789
|
-
},
|
|
1790
|
-
NEXT_CACHE_IMPLICIT_TAG_ID: function() {
|
|
1791
|
-
return NEXT_CACHE_IMPLICIT_TAG_ID;
|
|
1792
|
-
},
|
|
1793
|
-
NEXT_CACHE_REVALIDATED_TAGS_HEADER: function() {
|
|
1794
|
-
return NEXT_CACHE_REVALIDATED_TAGS_HEADER;
|
|
1795
|
-
},
|
|
1796
|
-
NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER: function() {
|
|
1797
|
-
return NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER;
|
|
1798
|
-
},
|
|
1799
|
-
NEXT_CACHE_ROOT_PARAM_TAG_ID: function() {
|
|
1800
|
-
return NEXT_CACHE_ROOT_PARAM_TAG_ID;
|
|
1801
|
-
},
|
|
1802
|
-
NEXT_CACHE_SOFT_TAG_MAX_LENGTH: function() {
|
|
1803
|
-
return NEXT_CACHE_SOFT_TAG_MAX_LENGTH;
|
|
1804
|
-
},
|
|
1805
|
-
NEXT_CACHE_TAGS_HEADER: function() {
|
|
1806
|
-
return NEXT_CACHE_TAGS_HEADER;
|
|
1807
|
-
},
|
|
1808
|
-
NEXT_CACHE_TAG_MAX_ITEMS: function() {
|
|
1809
|
-
return NEXT_CACHE_TAG_MAX_ITEMS;
|
|
1810
|
-
},
|
|
1811
|
-
NEXT_CACHE_TAG_MAX_LENGTH: function() {
|
|
1812
|
-
return NEXT_CACHE_TAG_MAX_LENGTH;
|
|
1813
|
-
},
|
|
1814
|
-
NEXT_DATA_SUFFIX: function() {
|
|
1815
|
-
return NEXT_DATA_SUFFIX;
|
|
1816
|
-
},
|
|
1817
|
-
NEXT_INTERCEPTION_MARKER_PREFIX: function() {
|
|
1818
|
-
return NEXT_INTERCEPTION_MARKER_PREFIX;
|
|
1819
|
-
},
|
|
1820
|
-
NEXT_META_SUFFIX: function() {
|
|
1821
|
-
return NEXT_META_SUFFIX;
|
|
1822
|
-
},
|
|
1823
|
-
NEXT_NAV_DEPLOYMENT_ID_HEADER: function() {
|
|
1824
|
-
return NEXT_NAV_DEPLOYMENT_ID_HEADER;
|
|
1825
|
-
},
|
|
1826
|
-
NEXT_QUERY_PARAM_PREFIX: function() {
|
|
1827
|
-
return NEXT_QUERY_PARAM_PREFIX;
|
|
1828
|
-
},
|
|
1829
|
-
NEXT_RESUME_HEADER: function() {
|
|
1830
|
-
return NEXT_RESUME_HEADER;
|
|
1831
|
-
},
|
|
1832
|
-
NEXT_RESUME_STATE_LENGTH_HEADER: function() {
|
|
1833
|
-
return NEXT_RESUME_STATE_LENGTH_HEADER;
|
|
1834
|
-
},
|
|
1835
|
-
NON_STANDARD_NODE_ENV: function() {
|
|
1836
|
-
return NON_STANDARD_NODE_ENV;
|
|
1837
|
-
},
|
|
1838
|
-
PAGES_DIR_ALIAS: function() {
|
|
1839
|
-
return PAGES_DIR_ALIAS;
|
|
1840
|
-
},
|
|
1841
|
-
PRERENDER_REVALIDATE_HEADER: function() {
|
|
1842
|
-
return PRERENDER_REVALIDATE_HEADER;
|
|
1843
|
-
},
|
|
1844
|
-
PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER: function() {
|
|
1845
|
-
return PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER;
|
|
1846
|
-
},
|
|
1847
|
-
PROXY_FILENAME: function() {
|
|
1848
|
-
return PROXY_FILENAME;
|
|
1849
|
-
},
|
|
1850
|
-
PROXY_LOCATION_REGEXP: function() {
|
|
1851
|
-
return PROXY_LOCATION_REGEXP;
|
|
1852
|
-
},
|
|
1853
|
-
PUBLIC_DIR_MIDDLEWARE_CONFLICT: function() {
|
|
1854
|
-
return PUBLIC_DIR_MIDDLEWARE_CONFLICT;
|
|
1855
|
-
},
|
|
1856
|
-
ROOT_DIR_ALIAS: function() {
|
|
1857
|
-
return ROOT_DIR_ALIAS;
|
|
1858
|
-
},
|
|
1859
|
-
RSC_ACTION_CLIENT_WRAPPER_ALIAS: function() {
|
|
1860
|
-
return RSC_ACTION_CLIENT_WRAPPER_ALIAS;
|
|
1861
|
-
},
|
|
1862
|
-
RSC_ACTION_ENCRYPTION_ALIAS: function() {
|
|
1863
|
-
return RSC_ACTION_ENCRYPTION_ALIAS;
|
|
1864
|
-
},
|
|
1865
|
-
RSC_ACTION_PROXY_ALIAS: function() {
|
|
1866
|
-
return RSC_ACTION_PROXY_ALIAS;
|
|
1867
|
-
},
|
|
1868
|
-
RSC_ACTION_VALIDATE_ALIAS: function() {
|
|
1869
|
-
return RSC_ACTION_VALIDATE_ALIAS;
|
|
1870
|
-
},
|
|
1871
|
-
RSC_CACHE_WRAPPER_ALIAS: function() {
|
|
1872
|
-
return RSC_CACHE_WRAPPER_ALIAS;
|
|
1873
|
-
},
|
|
1874
|
-
RSC_DYNAMIC_IMPORT_WRAPPER_ALIAS: function() {
|
|
1875
|
-
return RSC_DYNAMIC_IMPORT_WRAPPER_ALIAS;
|
|
1876
|
-
},
|
|
1877
|
-
RSC_MOD_REF_PROXY_ALIAS: function() {
|
|
1878
|
-
return RSC_MOD_REF_PROXY_ALIAS;
|
|
1879
|
-
},
|
|
1880
|
-
RSC_SEGMENTS_DIR_SUFFIX: function() {
|
|
1881
|
-
return RSC_SEGMENTS_DIR_SUFFIX;
|
|
1882
|
-
},
|
|
1883
|
-
RSC_SEGMENT_SUFFIX: function() {
|
|
1884
|
-
return RSC_SEGMENT_SUFFIX;
|
|
1885
|
-
},
|
|
1886
|
-
RSC_SUFFIX: function() {
|
|
1887
|
-
return RSC_SUFFIX;
|
|
1888
|
-
},
|
|
1889
|
-
SERVER_PROPS_EXPORT_ERROR: function() {
|
|
1890
|
-
return SERVER_PROPS_EXPORT_ERROR;
|
|
1891
|
-
},
|
|
1892
|
-
SERVER_PROPS_GET_INIT_PROPS_CONFLICT: function() {
|
|
1893
|
-
return SERVER_PROPS_GET_INIT_PROPS_CONFLICT;
|
|
1894
|
-
},
|
|
1895
|
-
SERVER_PROPS_SSG_CONFLICT: function() {
|
|
1896
|
-
return SERVER_PROPS_SSG_CONFLICT;
|
|
1897
|
-
},
|
|
1898
|
-
SERVER_RUNTIME: function() {
|
|
1899
|
-
return SERVER_RUNTIME;
|
|
1900
|
-
},
|
|
1901
|
-
SSG_FALLBACK_EXPORT_ERROR: function() {
|
|
1902
|
-
return SSG_FALLBACK_EXPORT_ERROR;
|
|
1903
|
-
},
|
|
1904
|
-
SSG_GET_INITIAL_PROPS_CONFLICT: function() {
|
|
1905
|
-
return SSG_GET_INITIAL_PROPS_CONFLICT;
|
|
1906
|
-
},
|
|
1907
|
-
STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR: function() {
|
|
1908
|
-
return STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR;
|
|
1909
|
-
},
|
|
1910
|
-
TEXT_PLAIN_CONTENT_TYPE_HEADER: function() {
|
|
1911
|
-
return TEXT_PLAIN_CONTENT_TYPE_HEADER;
|
|
1912
|
-
},
|
|
1913
|
-
UNSTABLE_REVALIDATE_RENAME_ERROR: function() {
|
|
1914
|
-
return UNSTABLE_REVALIDATE_RENAME_ERROR;
|
|
1915
|
-
},
|
|
1916
|
-
WEBPACK_LAYERS: function() {
|
|
1917
|
-
return WEBPACK_LAYERS;
|
|
1918
|
-
},
|
|
1919
|
-
WEBPACK_RESOURCE_QUERIES: function() {
|
|
1920
|
-
return WEBPACK_RESOURCE_QUERIES;
|
|
1921
|
-
},
|
|
1922
|
-
WEB_SOCKET_MAX_RECONNECTIONS: function() {
|
|
1923
|
-
return WEB_SOCKET_MAX_RECONNECTIONS;
|
|
1924
|
-
}
|
|
1925
|
-
});
|
|
1926
|
-
var TEXT_PLAIN_CONTENT_TYPE_HEADER = "text/plain";
|
|
1927
|
-
var HTML_CONTENT_TYPE_HEADER = "text/html; charset=utf-8";
|
|
1928
|
-
var JSON_CONTENT_TYPE_HEADER = "application/json; charset=utf-8";
|
|
1929
|
-
var NEXT_QUERY_PARAM_PREFIX = "nxtP";
|
|
1930
|
-
var NEXT_INTERCEPTION_MARKER_PREFIX = "nxtI";
|
|
1931
|
-
var MATCHED_PATH_HEADER = "x-matched-path";
|
|
1932
|
-
var PRERENDER_REVALIDATE_HEADER = "x-prerender-revalidate";
|
|
1933
|
-
var PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER = "x-prerender-revalidate-if-generated";
|
|
1934
|
-
var RSC_SEGMENTS_DIR_SUFFIX = ".segments";
|
|
1935
|
-
var RSC_SEGMENT_SUFFIX = ".segment.rsc";
|
|
1936
|
-
var RSC_SUFFIX = ".rsc";
|
|
1937
|
-
var ACTION_SUFFIX = ".action";
|
|
1938
|
-
var NEXT_DATA_SUFFIX = ".json";
|
|
1939
|
-
var NEXT_META_SUFFIX = ".meta";
|
|
1940
|
-
var NEXT_BODY_SUFFIX = ".body";
|
|
1941
|
-
var NEXT_NAV_DEPLOYMENT_ID_HEADER = "x-nextjs-deployment-id";
|
|
1942
|
-
var NEXT_CACHE_TAGS_HEADER = "x-next-cache-tags";
|
|
1943
|
-
var NEXT_CACHE_REVALIDATED_TAGS_HEADER = "x-next-revalidated-tags";
|
|
1944
|
-
var NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER = "x-next-revalidate-tag-token";
|
|
1945
|
-
var NEXT_RESUME_HEADER = "next-resume";
|
|
1946
|
-
var NEXT_RESUME_STATE_LENGTH_HEADER = "x-next-resume-state-length";
|
|
1947
|
-
var NEXT_CACHE_TAG_MAX_ITEMS = 128;
|
|
1948
|
-
var NEXT_CACHE_TAG_MAX_LENGTH = 256;
|
|
1949
|
-
var NEXT_CACHE_SOFT_TAG_MAX_LENGTH = 1024;
|
|
1950
|
-
var NEXT_CACHE_IMPLICIT_TAG_ID = "_N_T_";
|
|
1951
|
-
var NEXT_CACHE_ROOT_PARAM_TAG_ID = "_N_RP_";
|
|
1952
|
-
var CACHE_ONE_YEAR_SECONDS = 31536e3;
|
|
1953
|
-
var INFINITE_CACHE = 4294967294;
|
|
1954
|
-
var MIDDLEWARE_FILENAME = "middleware";
|
|
1955
|
-
var MIDDLEWARE_LOCATION_REGEXP = `(?:src/)?${MIDDLEWARE_FILENAME}`;
|
|
1956
|
-
var PROXY_FILENAME = "proxy";
|
|
1957
|
-
var PROXY_LOCATION_REGEXP = `(?:src/)?${PROXY_FILENAME}`;
|
|
1958
|
-
var INSTRUMENTATION_HOOK_FILENAME = "instrumentation";
|
|
1959
|
-
var PAGES_DIR_ALIAS = "private-next-pages";
|
|
1960
|
-
var DOT_NEXT_ALIAS = "private-dot-next";
|
|
1961
|
-
var ROOT_DIR_ALIAS = "private-next-root-dir";
|
|
1962
|
-
var APP_DIR_ALIAS = "private-next-app-dir";
|
|
1963
|
-
var RSC_MOD_REF_PROXY_ALIAS = "private-next-rsc-mod-ref-proxy";
|
|
1964
|
-
var RSC_ACTION_VALIDATE_ALIAS = "private-next-rsc-action-validate";
|
|
1965
|
-
var RSC_ACTION_PROXY_ALIAS = "private-next-rsc-server-reference";
|
|
1966
|
-
var RSC_CACHE_WRAPPER_ALIAS = "private-next-rsc-cache-wrapper";
|
|
1967
|
-
var RSC_DYNAMIC_IMPORT_WRAPPER_ALIAS = "private-next-rsc-track-dynamic-import";
|
|
1968
|
-
var RSC_ACTION_ENCRYPTION_ALIAS = "private-next-rsc-action-encryption";
|
|
1969
|
-
var RSC_ACTION_CLIENT_WRAPPER_ALIAS = "private-next-rsc-action-client-wrapper";
|
|
1970
|
-
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`;
|
|
1971
|
-
var SSG_GET_INITIAL_PROPS_CONFLICT = `You can not use getInitialProps with getStaticProps. To use SSG, please remove your getInitialProps`;
|
|
1972
|
-
var SERVER_PROPS_GET_INIT_PROPS_CONFLICT = `You can not use getInitialProps with getServerSideProps. Please remove getInitialProps.`;
|
|
1973
|
-
var SERVER_PROPS_SSG_CONFLICT = `You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps`;
|
|
1974
|
-
var STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR = `can not have getInitialProps/getServerSideProps, https://nextjs.org/docs/messages/404-get-initial-props`;
|
|
1975
|
-
var SERVER_PROPS_EXPORT_ERROR = `pages with \`getServerSideProps\` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export`;
|
|
1976
|
-
var GSP_NO_RETURNED_VALUE = "Your `getStaticProps` function did not return an object. Did you forget to add a `return`?";
|
|
1977
|
-
var GSSP_NO_RETURNED_VALUE = "Your `getServerSideProps` function did not return an object. Did you forget to add a `return`?";
|
|
1978
|
-
var UNSTABLE_REVALIDATE_RENAME_ERROR = "The `unstable_revalidate` property is available for general use.\nPlease use `revalidate` instead.";
|
|
1979
|
-
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`;
|
|
1980
|
-
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`;
|
|
1981
|
-
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`;
|
|
1982
|
-
var ESLINT_DEFAULT_DIRS = [
|
|
1983
|
-
"app",
|
|
1984
|
-
"pages",
|
|
1985
|
-
"components",
|
|
1986
|
-
"lib",
|
|
1987
|
-
"src"
|
|
1988
|
-
];
|
|
1989
|
-
var SERVER_RUNTIME = {
|
|
1990
|
-
edge: "edge",
|
|
1991
|
-
experimentalEdge: "experimental-edge",
|
|
1992
|
-
nodejs: "nodejs"
|
|
1993
|
-
};
|
|
1994
|
-
var WEB_SOCKET_MAX_RECONNECTIONS = 12;
|
|
1995
|
-
var WEBPACK_LAYERS_NAMES = {
|
|
1996
|
-
/**
|
|
1997
|
-
* The layer for the shared code between the client and server bundles.
|
|
1998
|
-
*/
|
|
1999
|
-
shared: "shared",
|
|
2000
|
-
/**
|
|
2001
|
-
* The layer for server-only runtime and picking up `react-server` export conditions.
|
|
2002
|
-
* Including app router RSC pages and app router custom routes and metadata routes.
|
|
2003
|
-
*/
|
|
2004
|
-
reactServerComponents: "rsc",
|
|
2005
|
-
/**
|
|
2006
|
-
* Server Side Rendering layer for app (ssr).
|
|
2007
|
-
*/
|
|
2008
|
-
serverSideRendering: "ssr",
|
|
2009
|
-
/**
|
|
2010
|
-
* The browser client bundle layer for actions.
|
|
2011
|
-
*/
|
|
2012
|
-
actionBrowser: "action-browser",
|
|
2013
|
-
/**
|
|
2014
|
-
* The Node.js bundle layer for the API routes.
|
|
2015
|
-
*/
|
|
2016
|
-
apiNode: "api-node",
|
|
2017
|
-
/**
|
|
2018
|
-
* The Edge Lite bundle layer for the API routes.
|
|
2019
|
-
*/
|
|
2020
|
-
apiEdge: "api-edge",
|
|
2021
|
-
/**
|
|
2022
|
-
* The layer for the middleware code.
|
|
2023
|
-
*/
|
|
2024
|
-
middleware: "middleware",
|
|
2025
|
-
/**
|
|
2026
|
-
* The layer for the instrumentation hooks.
|
|
2027
|
-
*/
|
|
2028
|
-
instrument: "instrument",
|
|
2029
|
-
/**
|
|
2030
|
-
* The layer for assets on the edge.
|
|
2031
|
-
*/
|
|
2032
|
-
edgeAsset: "edge-asset",
|
|
2033
|
-
/**
|
|
2034
|
-
* The browser client bundle layer for App directory.
|
|
2035
|
-
*/
|
|
2036
|
-
appPagesBrowser: "app-pages-browser",
|
|
2037
|
-
/**
|
|
2038
|
-
* The browser client bundle layer for Pages directory.
|
|
2039
|
-
*/
|
|
2040
|
-
pagesDirBrowser: "pages-dir-browser",
|
|
2041
|
-
/**
|
|
2042
|
-
* The Edge Lite bundle layer for Pages directory.
|
|
2043
|
-
*/
|
|
2044
|
-
pagesDirEdge: "pages-dir-edge",
|
|
2045
|
-
/**
|
|
2046
|
-
* The Node.js bundle layer for Pages directory.
|
|
2047
|
-
*/
|
|
2048
|
-
pagesDirNode: "pages-dir-node"
|
|
2049
|
-
};
|
|
2050
|
-
var WEBPACK_LAYERS = {
|
|
2051
|
-
...WEBPACK_LAYERS_NAMES,
|
|
2052
|
-
GROUP: {
|
|
2053
|
-
builtinReact: [
|
|
2054
|
-
WEBPACK_LAYERS_NAMES.reactServerComponents,
|
|
2055
|
-
WEBPACK_LAYERS_NAMES.actionBrowser
|
|
2056
|
-
],
|
|
2057
|
-
serverOnly: [
|
|
2058
|
-
WEBPACK_LAYERS_NAMES.reactServerComponents,
|
|
2059
|
-
WEBPACK_LAYERS_NAMES.actionBrowser,
|
|
2060
|
-
WEBPACK_LAYERS_NAMES.instrument,
|
|
2061
|
-
WEBPACK_LAYERS_NAMES.middleware
|
|
2062
|
-
],
|
|
2063
|
-
neutralTarget: [
|
|
2064
|
-
// pages api
|
|
2065
|
-
WEBPACK_LAYERS_NAMES.apiNode,
|
|
2066
|
-
WEBPACK_LAYERS_NAMES.apiEdge
|
|
2067
|
-
],
|
|
2068
|
-
clientOnly: [
|
|
2069
|
-
WEBPACK_LAYERS_NAMES.serverSideRendering,
|
|
2070
|
-
WEBPACK_LAYERS_NAMES.appPagesBrowser
|
|
2071
|
-
],
|
|
2072
|
-
bundled: [
|
|
2073
|
-
WEBPACK_LAYERS_NAMES.reactServerComponents,
|
|
2074
|
-
WEBPACK_LAYERS_NAMES.actionBrowser,
|
|
2075
|
-
WEBPACK_LAYERS_NAMES.serverSideRendering,
|
|
2076
|
-
WEBPACK_LAYERS_NAMES.appPagesBrowser,
|
|
2077
|
-
WEBPACK_LAYERS_NAMES.shared,
|
|
2078
|
-
WEBPACK_LAYERS_NAMES.instrument,
|
|
2079
|
-
WEBPACK_LAYERS_NAMES.middleware
|
|
2080
|
-
],
|
|
2081
|
-
appPages: [
|
|
2082
|
-
// app router pages and layouts
|
|
2083
|
-
WEBPACK_LAYERS_NAMES.reactServerComponents,
|
|
2084
|
-
WEBPACK_LAYERS_NAMES.serverSideRendering,
|
|
2085
|
-
WEBPACK_LAYERS_NAMES.appPagesBrowser,
|
|
2086
|
-
WEBPACK_LAYERS_NAMES.actionBrowser
|
|
2087
|
-
]
|
|
2088
|
-
}
|
|
2089
|
-
};
|
|
2090
|
-
var WEBPACK_RESOURCE_QUERIES = {
|
|
2091
|
-
edgeSSREntry: "__next_edge_ssr_entry__",
|
|
2092
|
-
metadata: "__next_metadata__",
|
|
2093
|
-
metadataRoute: "__next_metadata_route__",
|
|
2094
|
-
metadataImageMeta: "__next_metadata_image_meta__"
|
|
2095
|
-
};
|
|
2096
|
-
}
|
|
2097
|
-
});
|
|
2098
|
-
|
|
2099
|
-
// ../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/shared/lib/escape-regexp.js
|
|
2100
|
-
var require_escape_regexp = __commonJS({
|
|
2101
|
-
"../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/shared/lib/escape-regexp.js"(exports) {
|
|
2102
|
-
"use strict";
|
|
2103
|
-
Object.defineProperty(exports, "__esModule", {
|
|
2104
|
-
value: true
|
|
2105
|
-
});
|
|
2106
|
-
Object.defineProperty(exports, "escapeStringRegexp", {
|
|
2107
|
-
enumerable: true,
|
|
2108
|
-
get: function() {
|
|
2109
|
-
return escapeStringRegexp;
|
|
2110
|
-
}
|
|
2111
|
-
});
|
|
2112
|
-
var reHasRegExp = /[|\\{}()[\]^$+*?.-]/;
|
|
2113
|
-
var reReplaceRegExp = /[|\\{}()[\]^$+*?.-]/g;
|
|
2114
|
-
function escapeStringRegexp(str) {
|
|
2115
|
-
if (reHasRegExp.test(str)) {
|
|
2116
|
-
return str.replace(reReplaceRegExp, "\\$&");
|
|
2117
|
-
}
|
|
2118
|
-
return str;
|
|
2119
|
-
}
|
|
2120
|
-
}
|
|
2121
|
-
});
|
|
2122
|
-
|
|
2123
|
-
// ../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/shared/lib/invariant-error.js
|
|
2124
|
-
var require_invariant_error = __commonJS({
|
|
2125
|
-
"../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/shared/lib/invariant-error.js"(exports) {
|
|
2126
|
-
"use strict";
|
|
2127
|
-
Object.defineProperty(exports, "__esModule", {
|
|
2128
|
-
value: true
|
|
2129
|
-
});
|
|
2130
|
-
Object.defineProperty(exports, "InvariantError", {
|
|
2131
|
-
enumerable: true,
|
|
2132
|
-
get: function() {
|
|
2133
|
-
return InvariantError;
|
|
2134
|
-
}
|
|
2135
|
-
});
|
|
2136
|
-
var InvariantError = class extends Error {
|
|
2137
|
-
constructor(message, options) {
|
|
2138
|
-
super(`Invariant: ${message.endsWith(".") ? message : message + "."} This is a bug in Next.js.`, options);
|
|
2139
|
-
Object.defineProperty(this, "__NEXT_ERROR_CODE", {
|
|
2140
|
-
value: "E1179",
|
|
2141
|
-
enumerable: false,
|
|
2142
|
-
configurable: true
|
|
2143
|
-
});
|
|
2144
|
-
this.name = "InvariantError";
|
|
2145
|
-
}
|
|
2146
|
-
};
|
|
2147
|
-
}
|
|
2148
|
-
});
|
|
2149
|
-
|
|
2150
|
-
// ../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/shared/lib/router/utils/parse-loader-tree.js
|
|
2151
|
-
var require_parse_loader_tree = __commonJS({
|
|
2152
|
-
"../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/shared/lib/router/utils/parse-loader-tree.js"(exports) {
|
|
2153
|
-
"use strict";
|
|
2154
|
-
Object.defineProperty(exports, "__esModule", {
|
|
2155
|
-
value: true
|
|
2156
|
-
});
|
|
2157
|
-
Object.defineProperty(exports, "parseLoaderTree", {
|
|
2158
|
-
enumerable: true,
|
|
2159
|
-
get: function() {
|
|
2160
|
-
return parseLoaderTree;
|
|
2161
|
-
}
|
|
2162
|
-
});
|
|
2163
|
-
var _segment = require_segment();
|
|
2164
|
-
function parseLoaderTree(tree) {
|
|
2165
|
-
const [segment, parallelRoutes, modules, staticSiblings] = tree;
|
|
2166
|
-
const { layout, template } = modules;
|
|
2167
|
-
let { page } = modules;
|
|
2168
|
-
page = segment === _segment.DEFAULT_SEGMENT_KEY ? modules.defaultPage : page;
|
|
2169
|
-
const conventionPath = layout?.[1] || template?.[1] || page?.[1];
|
|
2170
|
-
return {
|
|
2171
|
-
page,
|
|
2172
|
-
segment,
|
|
2173
|
-
modules,
|
|
2174
|
-
/* it can be either layout / template / page */
|
|
2175
|
-
conventionPath,
|
|
2176
|
-
parallelRoutes,
|
|
2177
|
-
staticSiblings
|
|
2178
|
-
};
|
|
2179
|
-
}
|
|
2180
|
-
}
|
|
2181
|
-
});
|
|
2182
|
-
|
|
2183
|
-
// ../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/shared/lib/router/utils/get-segment-param.js
|
|
2184
|
-
var require_get_segment_param = __commonJS({
|
|
2185
|
-
"../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/shared/lib/router/utils/get-segment-param.js"(exports) {
|
|
2186
|
-
"use strict";
|
|
2187
|
-
Object.defineProperty(exports, "__esModule", {
|
|
2188
|
-
value: true
|
|
2189
|
-
});
|
|
2190
|
-
function _export(target, all) {
|
|
2191
|
-
for (var name in all) Object.defineProperty(target, name, {
|
|
2192
|
-
enumerable: true,
|
|
2193
|
-
get: all[name]
|
|
2194
|
-
});
|
|
2195
|
-
}
|
|
2196
|
-
_export(exports, {
|
|
2197
|
-
getParamProperties: function() {
|
|
2198
|
-
return getParamProperties;
|
|
2199
|
-
},
|
|
2200
|
-
getSegmentParam: function() {
|
|
2201
|
-
return getSegmentParam;
|
|
2202
|
-
},
|
|
2203
|
-
isCatchAll: function() {
|
|
2204
|
-
return isCatchAll;
|
|
2205
|
-
}
|
|
2206
|
-
});
|
|
2207
|
-
var _interceptionroutes = require_interception_routes();
|
|
2208
|
-
function getSegmentParam(segment) {
|
|
2209
|
-
const interceptionMarker = _interceptionroutes.INTERCEPTION_ROUTE_MARKERS.find((marker) => segment.startsWith(marker));
|
|
2210
|
-
if (interceptionMarker) {
|
|
2211
|
-
segment = segment.slice(interceptionMarker.length);
|
|
2212
|
-
}
|
|
2213
|
-
if (segment.startsWith("[[...") && segment.endsWith("]]")) {
|
|
2214
|
-
return {
|
|
2215
|
-
// TODO-APP: Optional catchall does not currently work with parallel routes,
|
|
2216
|
-
// so for now aren't handling a potential interception marker.
|
|
2217
|
-
paramType: "optional-catchall",
|
|
2218
|
-
paramName: segment.slice(5, -2)
|
|
2219
|
-
};
|
|
2220
|
-
}
|
|
2221
|
-
if (segment.startsWith("[...") && segment.endsWith("]")) {
|
|
2222
|
-
return {
|
|
2223
|
-
paramType: interceptionMarker ? `catchall-intercepted-${interceptionMarker}` : "catchall",
|
|
2224
|
-
paramName: segment.slice(4, -1)
|
|
2225
|
-
};
|
|
2226
|
-
}
|
|
2227
|
-
if (segment.startsWith("[") && segment.endsWith("]")) {
|
|
2228
|
-
return {
|
|
2229
|
-
paramType: interceptionMarker ? `dynamic-intercepted-${interceptionMarker}` : "dynamic",
|
|
2230
|
-
paramName: segment.slice(1, -1)
|
|
2231
|
-
};
|
|
2232
|
-
}
|
|
2233
|
-
return null;
|
|
2234
|
-
}
|
|
2235
|
-
function isCatchAll(type) {
|
|
2236
|
-
return type === "catchall" || type === "catchall-intercepted-(..)(..)" || type === "catchall-intercepted-(.)" || type === "catchall-intercepted-(..)" || type === "catchall-intercepted-(...)" || type === "optional-catchall";
|
|
2237
|
-
}
|
|
2238
|
-
function getParamProperties(paramType) {
|
|
2239
|
-
let repeat = false;
|
|
2240
|
-
let optional = false;
|
|
2241
|
-
switch (paramType) {
|
|
2242
|
-
case "catchall":
|
|
2243
|
-
case "catchall-intercepted-(..)(..)":
|
|
2244
|
-
case "catchall-intercepted-(.)":
|
|
2245
|
-
case "catchall-intercepted-(..)":
|
|
2246
|
-
case "catchall-intercepted-(...)":
|
|
2247
|
-
repeat = true;
|
|
2248
|
-
break;
|
|
2249
|
-
case "optional-catchall":
|
|
2250
|
-
repeat = true;
|
|
2251
|
-
optional = true;
|
|
2252
|
-
break;
|
|
2253
|
-
case "dynamic":
|
|
2254
|
-
case "dynamic-intercepted-(..)(..)":
|
|
2255
|
-
case "dynamic-intercepted-(.)":
|
|
2256
|
-
case "dynamic-intercepted-(..)":
|
|
2257
|
-
case "dynamic-intercepted-(...)":
|
|
2258
|
-
break;
|
|
2259
|
-
default:
|
|
2260
|
-
paramType;
|
|
2261
|
-
}
|
|
2262
|
-
return {
|
|
2263
|
-
repeat,
|
|
2264
|
-
optional
|
|
2265
|
-
};
|
|
2266
|
-
}
|
|
2267
|
-
}
|
|
2268
|
-
});
|
|
2269
|
-
|
|
2270
|
-
// ../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/shared/lib/router/routes/app.js
|
|
2271
|
-
var require_app = __commonJS({
|
|
2272
|
-
"../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/shared/lib/router/routes/app.js"(exports) {
|
|
2273
|
-
"use strict";
|
|
2274
|
-
Object.defineProperty(exports, "__esModule", {
|
|
2275
|
-
value: true
|
|
2276
|
-
});
|
|
2277
|
-
function _export(target, all) {
|
|
2278
|
-
for (var name in all) Object.defineProperty(target, name, {
|
|
2279
|
-
enumerable: true,
|
|
2280
|
-
get: all[name]
|
|
2281
|
-
});
|
|
2282
|
-
}
|
|
2283
|
-
_export(exports, {
|
|
2284
|
-
isInterceptionAppRoute: function() {
|
|
2285
|
-
return isInterceptionAppRoute;
|
|
2286
|
-
},
|
|
2287
|
-
isNormalizedAppRoute: function() {
|
|
2288
|
-
return isNormalizedAppRoute;
|
|
2289
|
-
},
|
|
2290
|
-
parseAppRouteSegment: function() {
|
|
2291
|
-
return parseAppRouteSegment;
|
|
2292
|
-
},
|
|
2293
|
-
parseAppRouteWithSlots: function() {
|
|
2294
|
-
return parseAppRouteWithSlots;
|
|
2295
|
-
},
|
|
2296
|
-
parseNormalizedAppRoute: function() {
|
|
2297
|
-
return parseNormalizedAppRoute;
|
|
2298
|
-
}
|
|
2299
|
-
});
|
|
2300
|
-
var _invarianterror = require_invariant_error();
|
|
2301
|
-
var _getsegmentparam = require_get_segment_param();
|
|
2302
|
-
var _interceptionroutes = require_interception_routes();
|
|
2303
|
-
function normalizeEncodedDynamicPlaceholder(segment) {
|
|
2304
|
-
if (!/%5b|%5d/i.test(segment)) {
|
|
2305
|
-
return segment;
|
|
2306
|
-
}
|
|
2307
|
-
try {
|
|
2308
|
-
const decodedSegment = decodeURIComponent(segment);
|
|
2309
|
-
return (0, _getsegmentparam.getSegmentParam)(decodedSegment) ? decodedSegment : segment;
|
|
2310
|
-
} catch {
|
|
2311
|
-
return segment;
|
|
2312
|
-
}
|
|
2313
|
-
}
|
|
2314
|
-
function parseAppRouteSegment(segment) {
|
|
2315
|
-
if (segment === "") {
|
|
2316
|
-
return null;
|
|
2317
|
-
}
|
|
2318
|
-
const interceptionMarker = _interceptionroutes.INTERCEPTION_ROUTE_MARKERS.find((m14) => segment.startsWith(m14));
|
|
2319
|
-
const param = (0, _getsegmentparam.getSegmentParam)(segment);
|
|
2320
|
-
if (param) {
|
|
2321
|
-
return {
|
|
2322
|
-
type: "dynamic",
|
|
2323
|
-
name: segment,
|
|
2324
|
-
param,
|
|
2325
|
-
interceptionMarker
|
|
2326
|
-
};
|
|
2327
|
-
} else if (segment.startsWith("(") && segment.endsWith(")")) {
|
|
2328
|
-
return {
|
|
2329
|
-
type: "route-group",
|
|
2330
|
-
name: segment,
|
|
2331
|
-
interceptionMarker
|
|
2332
|
-
};
|
|
2333
|
-
} else if (segment.startsWith("@")) {
|
|
2334
|
-
return {
|
|
2335
|
-
type: "parallel-route",
|
|
2336
|
-
name: segment,
|
|
2337
|
-
interceptionMarker
|
|
2338
|
-
};
|
|
2339
|
-
} else {
|
|
2340
|
-
return {
|
|
2341
|
-
type: "static",
|
|
2342
|
-
name: segment,
|
|
2343
|
-
interceptionMarker
|
|
2344
|
-
};
|
|
2345
|
-
}
|
|
2346
|
-
}
|
|
2347
|
-
function isNormalizedAppRoute(route) {
|
|
2348
|
-
return route.normalized;
|
|
2349
|
-
}
|
|
2350
|
-
function isInterceptionAppRoute(route) {
|
|
2351
|
-
return route.interceptionMarker !== void 0 && route.interceptingRoute !== void 0 && route.interceptedRoute !== void 0;
|
|
2352
|
-
}
|
|
2353
|
-
var OnlyRoutableSegments = (
|
|
2354
|
-
/* */
|
|
2355
|
-
0
|
|
2356
|
-
);
|
|
2357
|
-
var AllowParallelSegments = (
|
|
2358
|
-
/* */
|
|
2359
|
-
1
|
|
2360
|
-
);
|
|
2361
|
-
var AllowGroupSegments = (
|
|
2362
|
-
/* */
|
|
2363
|
-
2
|
|
2364
|
-
);
|
|
2365
|
-
function parseAppRouteImpl(pathname, allowedTypes) {
|
|
2366
|
-
const pathnameSegments = pathname.split("/").filter(Boolean);
|
|
2367
|
-
const segments = [];
|
|
2368
|
-
let interceptionMarker;
|
|
2369
|
-
let interceptingRoute;
|
|
2370
|
-
let interceptedRoute;
|
|
2371
|
-
for (const segment of pathnameSegments) {
|
|
2372
|
-
const normalizedSegment = normalizeEncodedDynamicPlaceholder(segment);
|
|
2373
|
-
const appSegment = parseAppRouteSegment(normalizedSegment);
|
|
2374
|
-
if (!appSegment) {
|
|
2375
|
-
continue;
|
|
2376
|
-
}
|
|
2377
|
-
if (appSegment.type === "route-group" && !(allowedTypes & AllowGroupSegments)) {
|
|
2378
|
-
throw Object.defineProperty(new _invarianterror.InvariantError(`${pathname} is being parsed as a normalized route, but it has a route group segment.`), "__NEXT_ERROR_CODE", {
|
|
2379
|
-
value: "E1151",
|
|
2380
|
-
enumerable: false,
|
|
2381
|
-
configurable: true
|
|
2382
|
-
});
|
|
2383
|
-
}
|
|
2384
|
-
if (appSegment.type === "parallel-route" && !(allowedTypes & AllowParallelSegments)) {
|
|
2385
|
-
throw Object.defineProperty(new _invarianterror.InvariantError(`${pathname} is being parsed as a normalized route, but it has a parallel route segment.`), "__NEXT_ERROR_CODE", {
|
|
2386
|
-
value: "E1152",
|
|
2387
|
-
enumerable: false,
|
|
2388
|
-
configurable: true
|
|
2389
|
-
});
|
|
2390
|
-
}
|
|
2391
|
-
segments.push(appSegment);
|
|
2392
|
-
if (appSegment.interceptionMarker) {
|
|
2393
|
-
const parts = pathname.split(appSegment.interceptionMarker);
|
|
2394
|
-
if (parts.length !== 2) {
|
|
2395
|
-
throw Object.defineProperty(new Error(`Invalid interception route: ${pathname}`), "__NEXT_ERROR_CODE", {
|
|
2396
|
-
value: "E924",
|
|
2397
|
-
enumerable: false,
|
|
2398
|
-
configurable: true
|
|
2399
|
-
});
|
|
2400
|
-
}
|
|
2401
|
-
interceptingRoute = parseAppRouteImpl(parts[0], allowedTypes);
|
|
2402
|
-
interceptedRoute = parseAppRouteImpl(parts[1], allowedTypes);
|
|
2403
|
-
interceptionMarker = appSegment.interceptionMarker;
|
|
2404
|
-
}
|
|
2405
|
-
}
|
|
2406
|
-
const dynamicSegments = segments.filter((segment) => segment.type === "dynamic");
|
|
2407
|
-
return {
|
|
2408
|
-
normalized: allowedTypes === OnlyRoutableSegments,
|
|
2409
|
-
pathname,
|
|
2410
|
-
segments,
|
|
2411
|
-
dynamicSegments,
|
|
2412
|
-
interceptionMarker,
|
|
2413
|
-
interceptingRoute,
|
|
2414
|
-
interceptedRoute
|
|
2415
|
-
};
|
|
2416
|
-
}
|
|
2417
|
-
function parseNormalizedAppRoute(pathname) {
|
|
2418
|
-
return parseAppRouteImpl(pathname, OnlyRoutableSegments);
|
|
2419
|
-
}
|
|
2420
|
-
function parseAppRouteWithSlots(pathname) {
|
|
2421
|
-
return parseAppRouteImpl(pathname, AllowParallelSegments);
|
|
2422
|
-
}
|
|
2423
|
-
}
|
|
2424
|
-
});
|
|
2425
|
-
|
|
2426
|
-
// ../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/shared/lib/router/utils/interception-prefix-from-param-type.js
|
|
2427
|
-
var require_interception_prefix_from_param_type = __commonJS({
|
|
2428
|
-
"../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/shared/lib/router/utils/interception-prefix-from-param-type.js"(exports) {
|
|
2429
|
-
"use strict";
|
|
2430
|
-
Object.defineProperty(exports, "__esModule", {
|
|
2431
|
-
value: true
|
|
2432
|
-
});
|
|
2433
|
-
Object.defineProperty(exports, "interceptionPrefixFromParamType", {
|
|
2434
|
-
enumerable: true,
|
|
2435
|
-
get: function() {
|
|
2436
|
-
return interceptionPrefixFromParamType;
|
|
2437
|
-
}
|
|
2438
|
-
});
|
|
2439
|
-
function interceptionPrefixFromParamType(paramType) {
|
|
2440
|
-
switch (paramType) {
|
|
2441
|
-
case "catchall-intercepted-(..)(..)":
|
|
2442
|
-
case "dynamic-intercepted-(..)(..)":
|
|
2443
|
-
return "(..)(..)";
|
|
2444
|
-
case "catchall-intercepted-(.)":
|
|
2445
|
-
case "dynamic-intercepted-(.)":
|
|
2446
|
-
return "(.)";
|
|
2447
|
-
case "catchall-intercepted-(..)":
|
|
2448
|
-
case "dynamic-intercepted-(..)":
|
|
2449
|
-
return "(..)";
|
|
2450
|
-
case "catchall-intercepted-(...)":
|
|
2451
|
-
case "dynamic-intercepted-(...)":
|
|
2452
|
-
return "(...)";
|
|
2453
|
-
case "catchall":
|
|
2454
|
-
case "dynamic":
|
|
2455
|
-
case "optional-catchall":
|
|
2456
|
-
default:
|
|
2457
|
-
return null;
|
|
2458
|
-
}
|
|
2459
|
-
}
|
|
2460
|
-
}
|
|
2461
|
-
});
|
|
2462
|
-
|
|
2463
|
-
// ../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/shared/lib/router/utils/resolve-param-value.js
|
|
2464
|
-
var require_resolve_param_value = __commonJS({
|
|
2465
|
-
"../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/shared/lib/router/utils/resolve-param-value.js"(exports) {
|
|
2466
|
-
"use strict";
|
|
2467
|
-
Object.defineProperty(exports, "__esModule", {
|
|
2468
|
-
value: true
|
|
2469
|
-
});
|
|
2470
|
-
Object.defineProperty(exports, "resolveParamValue", {
|
|
2471
|
-
enumerable: true,
|
|
2472
|
-
get: function() {
|
|
2473
|
-
return resolveParamValue;
|
|
2474
|
-
}
|
|
2475
|
-
});
|
|
2476
|
-
var _invarianterror = require_invariant_error();
|
|
2477
|
-
var _interceptionprefixfromparamtype = require_interception_prefix_from_param_type();
|
|
2478
|
-
function getParamValueFromSegment(pathSegment, params, paramType) {
|
|
2479
|
-
if (pathSegment.type === "dynamic") {
|
|
2480
|
-
return params[pathSegment.param.paramName];
|
|
2481
|
-
}
|
|
2482
|
-
const interceptionPrefix = (0, _interceptionprefixfromparamtype.interceptionPrefixFromParamType)(paramType);
|
|
2483
|
-
if (interceptionPrefix === pathSegment.interceptionMarker) {
|
|
2484
|
-
return pathSegment.name.replace(pathSegment.interceptionMarker, "");
|
|
2485
|
-
}
|
|
2486
|
-
return pathSegment.name;
|
|
2487
|
-
}
|
|
2488
|
-
function resolveParamValue(paramName, paramType, depth, route, params) {
|
|
2489
|
-
switch (paramType) {
|
|
2490
|
-
case "catchall":
|
|
2491
|
-
case "optional-catchall":
|
|
2492
|
-
case "catchall-intercepted-(..)(..)":
|
|
2493
|
-
case "catchall-intercepted-(.)":
|
|
2494
|
-
case "catchall-intercepted-(..)":
|
|
2495
|
-
case "catchall-intercepted-(...)":
|
|
2496
|
-
const processedSegments = [];
|
|
2497
|
-
for (let index = depth; index < route.segments.length; index++) {
|
|
2498
|
-
const pathSegment = route.segments[index];
|
|
2499
|
-
if (pathSegment.type === "static") {
|
|
2500
|
-
let value = pathSegment.name;
|
|
2501
|
-
const interceptionPrefix = (0, _interceptionprefixfromparamtype.interceptionPrefixFromParamType)(paramType);
|
|
2502
|
-
if (interceptionPrefix && index === depth && interceptionPrefix === pathSegment.interceptionMarker) {
|
|
2503
|
-
value = value.replace(pathSegment.interceptionMarker, "");
|
|
2504
|
-
}
|
|
2505
|
-
processedSegments.push(value);
|
|
2506
|
-
} else {
|
|
2507
|
-
if (!params.hasOwnProperty(pathSegment.param.paramName)) {
|
|
2508
|
-
if (pathSegment.param.paramType === "optional-catchall") {
|
|
2509
|
-
break;
|
|
2510
|
-
}
|
|
2511
|
-
return void 0;
|
|
2512
|
-
}
|
|
2513
|
-
const paramValue = params[pathSegment.param.paramName];
|
|
2514
|
-
if (Array.isArray(paramValue)) {
|
|
2515
|
-
processedSegments.push(...paramValue);
|
|
2516
|
-
} else {
|
|
2517
|
-
processedSegments.push(paramValue);
|
|
2518
|
-
}
|
|
2519
|
-
}
|
|
2520
|
-
}
|
|
2521
|
-
if (processedSegments.length > 0) {
|
|
2522
|
-
return processedSegments;
|
|
2523
|
-
} else if (paramType === "optional-catchall") {
|
|
2524
|
-
return void 0;
|
|
2525
|
-
} else {
|
|
2526
|
-
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", {
|
|
2527
|
-
value: "E931",
|
|
2528
|
-
enumerable: false,
|
|
2529
|
-
configurable: true
|
|
2530
|
-
});
|
|
2531
|
-
}
|
|
2532
|
-
case "dynamic":
|
|
2533
|
-
case "dynamic-intercepted-(..)(..)":
|
|
2534
|
-
case "dynamic-intercepted-(.)":
|
|
2535
|
-
case "dynamic-intercepted-(..)":
|
|
2536
|
-
case "dynamic-intercepted-(...)":
|
|
2537
|
-
if (depth < route.segments.length) {
|
|
2538
|
-
const pathSegment = route.segments[depth];
|
|
2539
|
-
if (pathSegment.type === "dynamic" && !params.hasOwnProperty(pathSegment.param.paramName)) {
|
|
2540
|
-
return void 0;
|
|
2541
|
-
}
|
|
2542
|
-
return getParamValueFromSegment(pathSegment, params, paramType);
|
|
2543
|
-
}
|
|
2544
|
-
return void 0;
|
|
2545
|
-
default:
|
|
2546
|
-
paramType;
|
|
2547
|
-
}
|
|
2548
|
-
}
|
|
2549
|
-
}
|
|
2550
|
-
});
|
|
2551
|
-
|
|
2552
|
-
// ../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/shared/lib/router/utils/get-dynamic-param.js
|
|
2553
|
-
var require_get_dynamic_param = __commonJS({
|
|
2554
|
-
"../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/shared/lib/router/utils/get-dynamic-param.js"(exports) {
|
|
2555
|
-
"use strict";
|
|
2556
|
-
Object.defineProperty(exports, "__esModule", {
|
|
2557
|
-
value: true
|
|
2558
|
-
});
|
|
2559
|
-
function _export(target, all) {
|
|
2560
|
-
for (var name in all) Object.defineProperty(target, name, {
|
|
2561
|
-
enumerable: true,
|
|
2562
|
-
get: all[name]
|
|
2563
|
-
});
|
|
2564
|
-
}
|
|
2565
|
-
_export(exports, {
|
|
2566
|
-
PARAMETER_PATTERN: function() {
|
|
2567
|
-
return PARAMETER_PATTERN;
|
|
2568
|
-
},
|
|
2569
|
-
getDynamicParam: function() {
|
|
2570
|
-
return getDynamicParam;
|
|
2571
|
-
},
|
|
2572
|
-
interpolateParallelRouteParams: function() {
|
|
2573
|
-
return interpolateParallelRouteParams;
|
|
2574
|
-
},
|
|
2575
|
-
parseMatchedParameter: function() {
|
|
2576
|
-
return parseMatchedParameter;
|
|
2577
|
-
},
|
|
2578
|
-
parseParameter: function() {
|
|
2579
|
-
return parseParameter;
|
|
2580
|
-
}
|
|
2581
|
-
});
|
|
2582
|
-
var _invarianterror = require_invariant_error();
|
|
2583
|
-
var _parseloadertree = require_parse_loader_tree();
|
|
2584
|
-
var _app = require_app();
|
|
2585
|
-
var _resolveparamvalue = require_resolve_param_value();
|
|
2586
|
-
function getParamValue(interpolatedParams, segmentKey, fallbackRouteParams) {
|
|
2587
|
-
let value = interpolatedParams[segmentKey];
|
|
2588
|
-
if (fallbackRouteParams?.has(segmentKey)) {
|
|
2589
|
-
const [searchValue] = fallbackRouteParams.get(segmentKey);
|
|
2590
|
-
value = searchValue;
|
|
2591
|
-
} else if (Array.isArray(value)) {
|
|
2592
|
-
value = value.map((i4) => encodeURIComponent(i4));
|
|
2593
|
-
} else if (typeof value === "string") {
|
|
2594
|
-
value = encodeURIComponent(value);
|
|
2595
|
-
}
|
|
2596
|
-
return value;
|
|
2597
|
-
}
|
|
2598
|
-
function interpolateParallelRouteParams(loaderTree, params, pagePath, fallbackRouteParams) {
|
|
2599
|
-
const interpolated = structuredClone(params);
|
|
2600
|
-
const stack = [
|
|
2601
|
-
{
|
|
2602
|
-
tree: loaderTree,
|
|
2603
|
-
depth: 0
|
|
2604
|
-
}
|
|
2605
|
-
];
|
|
2606
|
-
const route = (0, _app.parseNormalizedAppRoute)(pagePath);
|
|
2607
|
-
while (stack.length > 0) {
|
|
2608
|
-
const { tree, depth } = stack.pop();
|
|
2609
|
-
const { segment, parallelRoutes } = (0, _parseloadertree.parseLoaderTree)(tree);
|
|
2610
|
-
const appSegment = (0, _app.parseAppRouteSegment)(segment);
|
|
2611
|
-
if (appSegment?.type === "dynamic" && !interpolated.hasOwnProperty(appSegment.param.paramName) && // If the param is in the fallback route params, we don't need to
|
|
2612
|
-
// interpolate it because it's already marked as being unknown.
|
|
2613
|
-
!fallbackRouteParams?.has(appSegment.param.paramName)) {
|
|
2614
|
-
const { paramName, paramType } = appSegment.param;
|
|
2615
|
-
const paramValue = (0, _resolveparamvalue.resolveParamValue)(paramName, paramType, depth, route, interpolated);
|
|
2616
|
-
if (paramValue !== void 0) {
|
|
2617
|
-
interpolated[paramName] = paramValue;
|
|
2618
|
-
} else if (paramType !== "optional-catchall") {
|
|
2619
|
-
throw Object.defineProperty(new _invarianterror.InvariantError(`Could not resolve param value for segment: ${paramName}`), "__NEXT_ERROR_CODE", {
|
|
2620
|
-
value: "E932",
|
|
2621
|
-
enumerable: false,
|
|
2622
|
-
configurable: true
|
|
2623
|
-
});
|
|
2624
|
-
}
|
|
2625
|
-
}
|
|
2626
|
-
let nextDepth = depth;
|
|
2627
|
-
if (appSegment && appSegment.type !== "route-group" && appSegment.type !== "parallel-route") {
|
|
2628
|
-
nextDepth++;
|
|
2629
|
-
}
|
|
2630
|
-
for (const parallelRoute of Object.values(parallelRoutes)) {
|
|
2631
|
-
stack.push({
|
|
2632
|
-
tree: parallelRoute,
|
|
2633
|
-
depth: nextDepth
|
|
2634
|
-
});
|
|
2635
|
-
}
|
|
2636
|
-
}
|
|
2637
|
-
return interpolated;
|
|
2638
|
-
}
|
|
2639
|
-
function getDynamicParam(interpolatedParams, segmentKey, dynamicParamType, fallbackRouteParams, staticSiblings) {
|
|
2640
|
-
let value = getParamValue(interpolatedParams, segmentKey, fallbackRouteParams);
|
|
2641
|
-
if (!value || value.length === 0) {
|
|
2642
|
-
if (dynamicParamType === "oc") {
|
|
2643
|
-
return {
|
|
2644
|
-
param: segmentKey,
|
|
2645
|
-
value: null,
|
|
2646
|
-
type: dynamicParamType,
|
|
2647
|
-
treeSegment: [
|
|
2648
|
-
segmentKey,
|
|
2649
|
-
"",
|
|
2650
|
-
dynamicParamType,
|
|
2651
|
-
staticSiblings
|
|
2652
|
-
]
|
|
2653
|
-
};
|
|
2654
|
-
}
|
|
2655
|
-
throw Object.defineProperty(new _invarianterror.InvariantError(`Missing value for segment key: "${segmentKey}" with dynamic param type: ${dynamicParamType}`), "__NEXT_ERROR_CODE", {
|
|
2656
|
-
value: "E864",
|
|
2657
|
-
enumerable: false,
|
|
2658
|
-
configurable: true
|
|
2659
|
-
});
|
|
2660
|
-
}
|
|
2661
|
-
const paramCacheKey = Array.isArray(value) ? value.join("/") : value;
|
|
2662
|
-
return {
|
|
2663
|
-
param: segmentKey,
|
|
2664
|
-
// The value that is passed to user code.
|
|
2665
|
-
value,
|
|
2666
|
-
// The value that is rendered in the router tree.
|
|
2667
|
-
// TODO: If the number of static siblings exceeds some threshold (e.g.,
|
|
2668
|
-
// dozens or hundreds), consider sending a Bloom filter instead of the full
|
|
2669
|
-
// array to reduce payload size. The client would then use the Bloom filter
|
|
2670
|
-
// to check membership with a small false positive rate.
|
|
2671
|
-
treeSegment: [
|
|
2672
|
-
segmentKey,
|
|
2673
|
-
paramCacheKey,
|
|
2674
|
-
dynamicParamType,
|
|
2675
|
-
staticSiblings
|
|
2676
|
-
],
|
|
2677
|
-
type: dynamicParamType
|
|
2678
|
-
};
|
|
2679
|
-
}
|
|
2680
|
-
var PARAMETER_PATTERN = /^([^[]*)\[((?:\[[^\]]*\])|[^\]]+)\](.*)$/;
|
|
2681
|
-
function parseParameter(param) {
|
|
2682
|
-
const match = param.match(PARAMETER_PATTERN);
|
|
2683
|
-
if (!match) {
|
|
2684
|
-
return parseMatchedParameter(param);
|
|
2685
|
-
}
|
|
2686
|
-
return parseMatchedParameter(match[2]);
|
|
2687
|
-
}
|
|
2688
|
-
function parseMatchedParameter(param) {
|
|
2689
|
-
const optional = param.startsWith("[") && param.endsWith("]");
|
|
2690
|
-
if (optional) {
|
|
2691
|
-
param = param.slice(1, -1);
|
|
2692
|
-
}
|
|
2693
|
-
const repeat = param.startsWith("...");
|
|
2694
|
-
if (repeat) {
|
|
2695
|
-
param = param.slice(3);
|
|
2696
|
-
}
|
|
2697
|
-
return {
|
|
2698
|
-
key: param,
|
|
2699
|
-
repeat,
|
|
2700
|
-
optional
|
|
2701
|
-
};
|
|
2702
|
-
}
|
|
2703
|
-
}
|
|
2704
|
-
});
|
|
2705
|
-
|
|
2706
|
-
// ../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/shared/lib/router/utils/route-regex.js
|
|
2707
|
-
var require_route_regex = __commonJS({
|
|
2708
|
-
"../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/shared/lib/router/utils/route-regex.js"(exports) {
|
|
2709
|
-
"use strict";
|
|
2710
|
-
Object.defineProperty(exports, "__esModule", {
|
|
2711
|
-
value: true
|
|
2712
|
-
});
|
|
2713
|
-
function _export(target, all) {
|
|
2714
|
-
for (var name in all) Object.defineProperty(target, name, {
|
|
2715
|
-
enumerable: true,
|
|
2716
|
-
get: all[name]
|
|
2717
|
-
});
|
|
2718
|
-
}
|
|
2719
|
-
_export(exports, {
|
|
2720
|
-
getNamedMiddlewareRegex: function() {
|
|
2721
|
-
return getNamedMiddlewareRegex;
|
|
2722
|
-
},
|
|
2723
|
-
getNamedRouteRegex: function() {
|
|
2724
|
-
return getNamedRouteRegex;
|
|
2725
|
-
},
|
|
2726
|
-
getRouteRegex: function() {
|
|
2727
|
-
return getRouteRegex;
|
|
2728
|
-
}
|
|
2729
|
-
});
|
|
2730
|
-
var _constants = require_constants();
|
|
2731
|
-
var _interceptionroutes = require_interception_routes();
|
|
2732
|
-
var _escaperegexp = require_escape_regexp();
|
|
2733
|
-
var _removetrailingslash = require_remove_trailing_slash();
|
|
2734
|
-
var _getdynamicparam = require_get_dynamic_param();
|
|
2735
|
-
function getParametrizedRoute(route, includeSuffix, includePrefix) {
|
|
2736
|
-
const groups = {};
|
|
2737
|
-
let groupIndex = 1;
|
|
2738
|
-
const segments = [];
|
|
2739
|
-
for (const segment of (0, _removetrailingslash.removeTrailingSlash)(route).slice(1).split("/")) {
|
|
2740
|
-
const markerMatch = _interceptionroutes.INTERCEPTION_ROUTE_MARKERS.find((m14) => segment.startsWith(m14));
|
|
2741
|
-
const paramMatches = segment.match(_getdynamicparam.PARAMETER_PATTERN);
|
|
2742
|
-
if (markerMatch && paramMatches && paramMatches[2]) {
|
|
2743
|
-
const { key, optional, repeat } = (0, _getdynamicparam.parseMatchedParameter)(paramMatches[2]);
|
|
2744
|
-
groups[key] = {
|
|
2745
|
-
pos: groupIndex++,
|
|
2746
|
-
repeat,
|
|
2747
|
-
optional
|
|
2748
|
-
};
|
|
2749
|
-
segments.push(`/${(0, _escaperegexp.escapeStringRegexp)(markerMatch)}([^/]+?)`);
|
|
2750
|
-
} else if (paramMatches && paramMatches[2]) {
|
|
2751
|
-
const { key, repeat, optional } = (0, _getdynamicparam.parseMatchedParameter)(paramMatches[2]);
|
|
2752
|
-
groups[key] = {
|
|
2753
|
-
pos: groupIndex++,
|
|
2754
|
-
repeat,
|
|
2755
|
-
optional
|
|
2756
|
-
};
|
|
2757
|
-
if (includePrefix && paramMatches[1]) {
|
|
2758
|
-
segments.push(`/${(0, _escaperegexp.escapeStringRegexp)(paramMatches[1])}`);
|
|
2759
|
-
}
|
|
2760
|
-
let s21 = repeat ? optional ? "(?:/(.+?))?" : "/(.+?)" : "/([^/]+?)";
|
|
2761
|
-
if (includePrefix && paramMatches[1]) {
|
|
2762
|
-
s21 = s21.substring(1);
|
|
2763
|
-
}
|
|
2764
|
-
segments.push(s21);
|
|
2765
|
-
} else {
|
|
2766
|
-
segments.push(`/${(0, _escaperegexp.escapeStringRegexp)(segment)}`);
|
|
2767
|
-
}
|
|
2768
|
-
if (includeSuffix && paramMatches && paramMatches[3]) {
|
|
2769
|
-
segments.push((0, _escaperegexp.escapeStringRegexp)(paramMatches[3]));
|
|
2770
|
-
}
|
|
2771
|
-
}
|
|
2772
|
-
return {
|
|
2773
|
-
parameterizedRoute: segments.join(""),
|
|
2774
|
-
groups
|
|
2775
|
-
};
|
|
2776
|
-
}
|
|
2777
|
-
function getRouteRegex(normalizedRoute, { includeSuffix = false, includePrefix = false, excludeOptionalTrailingSlash = false } = {}) {
|
|
2778
|
-
const { parameterizedRoute, groups } = getParametrizedRoute(normalizedRoute, includeSuffix, includePrefix);
|
|
2779
|
-
let re2 = parameterizedRoute;
|
|
2780
|
-
if (!excludeOptionalTrailingSlash) {
|
|
2781
|
-
re2 += "(?:/)?";
|
|
2782
|
-
}
|
|
2783
|
-
return {
|
|
2784
|
-
re: new RegExp(`^${re2}$`),
|
|
2785
|
-
groups
|
|
2786
|
-
};
|
|
2787
|
-
}
|
|
2788
|
-
function buildGetSafeRouteKey() {
|
|
2789
|
-
let i4 = 0;
|
|
2790
|
-
return () => {
|
|
2791
|
-
let routeKey = "";
|
|
2792
|
-
let j = ++i4;
|
|
2793
|
-
while (j > 0) {
|
|
2794
|
-
routeKey += String.fromCharCode(97 + (j - 1) % 26);
|
|
2795
|
-
j = Math.floor((j - 1) / 26);
|
|
2796
|
-
}
|
|
2797
|
-
return routeKey;
|
|
2798
|
-
};
|
|
2799
|
-
}
|
|
2800
|
-
function getSafeKeyFromSegment({ interceptionMarker, getSafeRouteKey, segment, routeKeys, keyPrefix, backreferenceDuplicateKeys }) {
|
|
2801
|
-
const { key, optional, repeat } = (0, _getdynamicparam.parseMatchedParameter)(segment);
|
|
2802
|
-
let cleanedKey = key.replace(/\W/g, "");
|
|
2803
|
-
if (keyPrefix) {
|
|
2804
|
-
cleanedKey = `${keyPrefix}${cleanedKey}`;
|
|
2805
|
-
}
|
|
2806
|
-
let invalidKey = false;
|
|
2807
|
-
if (cleanedKey.length === 0 || cleanedKey.length > 30) {
|
|
2808
|
-
invalidKey = true;
|
|
2809
|
-
}
|
|
2810
|
-
if (!isNaN(parseInt(cleanedKey.slice(0, 1)))) {
|
|
2811
|
-
invalidKey = true;
|
|
2812
|
-
}
|
|
2813
|
-
if (invalidKey) {
|
|
2814
|
-
cleanedKey = getSafeRouteKey();
|
|
2815
|
-
}
|
|
2816
|
-
const duplicateKey = cleanedKey in routeKeys;
|
|
2817
|
-
if (keyPrefix) {
|
|
2818
|
-
routeKeys[cleanedKey] = `${keyPrefix}${key}`;
|
|
2819
|
-
} else {
|
|
2820
|
-
routeKeys[cleanedKey] = key;
|
|
2821
|
-
}
|
|
2822
|
-
const interceptionPrefix = interceptionMarker ? (0, _escaperegexp.escapeStringRegexp)(interceptionMarker) : "";
|
|
2823
|
-
let pattern;
|
|
2824
|
-
if (duplicateKey && backreferenceDuplicateKeys) {
|
|
2825
|
-
pattern = `\\k<${cleanedKey}>`;
|
|
2826
|
-
} else if (repeat) {
|
|
2827
|
-
pattern = `(?<${cleanedKey}>.+?)`;
|
|
2828
|
-
} else {
|
|
2829
|
-
pattern = `(?<${cleanedKey}>[^/]+?)`;
|
|
2830
|
-
}
|
|
2831
|
-
return {
|
|
2832
|
-
key,
|
|
2833
|
-
pattern: optional ? `(?:/${interceptionPrefix}${pattern})?` : `/${interceptionPrefix}${pattern}`,
|
|
2834
|
-
cleanedKey,
|
|
2835
|
-
optional,
|
|
2836
|
-
repeat
|
|
2837
|
-
};
|
|
2838
|
-
}
|
|
2839
|
-
function getNamedParametrizedRoute(route, prefixRouteKeys, includeSuffix, includePrefix, backreferenceDuplicateKeys, reference = {
|
|
2840
|
-
names: {},
|
|
2841
|
-
intercepted: {}
|
|
2842
|
-
}) {
|
|
2843
|
-
const getSafeRouteKey = buildGetSafeRouteKey();
|
|
2844
|
-
const routeKeys = {};
|
|
2845
|
-
const segments = [];
|
|
2846
|
-
const inverseParts = [];
|
|
2847
|
-
reference = structuredClone(reference);
|
|
2848
|
-
for (const segment of (0, _removetrailingslash.removeTrailingSlash)(route).slice(1).split("/")) {
|
|
2849
|
-
const hasInterceptionMarker = _interceptionroutes.INTERCEPTION_ROUTE_MARKERS.some((m14) => segment.startsWith(m14));
|
|
2850
|
-
const paramMatches = segment.match(_getdynamicparam.PARAMETER_PATTERN);
|
|
2851
|
-
const interceptionMarker = hasInterceptionMarker ? paramMatches?.[1] : void 0;
|
|
2852
|
-
let keyPrefix;
|
|
2853
|
-
if (interceptionMarker && paramMatches?.[2]) {
|
|
2854
|
-
keyPrefix = prefixRouteKeys ? _constants.NEXT_INTERCEPTION_MARKER_PREFIX : void 0;
|
|
2855
|
-
reference.intercepted[paramMatches[2]] = interceptionMarker;
|
|
2856
|
-
} else if (paramMatches?.[2] && reference.intercepted[paramMatches[2]]) {
|
|
2857
|
-
keyPrefix = prefixRouteKeys ? _constants.NEXT_INTERCEPTION_MARKER_PREFIX : void 0;
|
|
2858
|
-
} else {
|
|
2859
|
-
keyPrefix = prefixRouteKeys ? _constants.NEXT_QUERY_PARAM_PREFIX : void 0;
|
|
2860
|
-
}
|
|
2861
|
-
if (interceptionMarker && paramMatches && paramMatches[2]) {
|
|
2862
|
-
const { key, pattern, cleanedKey, repeat, optional } = getSafeKeyFromSegment({
|
|
2863
|
-
getSafeRouteKey,
|
|
2864
|
-
interceptionMarker,
|
|
2865
|
-
segment: paramMatches[2],
|
|
2866
|
-
routeKeys,
|
|
2867
|
-
keyPrefix,
|
|
2868
|
-
backreferenceDuplicateKeys
|
|
2869
|
-
});
|
|
2870
|
-
segments.push(pattern);
|
|
2871
|
-
inverseParts.push(`/${paramMatches[1]}:${reference.names[key] ?? cleanedKey}${repeat ? optional ? "*" : "+" : ""}`);
|
|
2872
|
-
reference.names[key] ??= cleanedKey;
|
|
2873
|
-
} else if (paramMatches && paramMatches[2]) {
|
|
2874
|
-
if (includePrefix && paramMatches[1]) {
|
|
2875
|
-
segments.push(`/${(0, _escaperegexp.escapeStringRegexp)(paramMatches[1])}`);
|
|
2876
|
-
inverseParts.push(`/${paramMatches[1]}`);
|
|
2877
|
-
}
|
|
2878
|
-
const { key, pattern, cleanedKey, repeat, optional } = getSafeKeyFromSegment({
|
|
2879
|
-
getSafeRouteKey,
|
|
2880
|
-
segment: paramMatches[2],
|
|
2881
|
-
routeKeys,
|
|
2882
|
-
keyPrefix,
|
|
2883
|
-
backreferenceDuplicateKeys
|
|
2884
|
-
});
|
|
2885
|
-
let s21 = pattern;
|
|
2886
|
-
if (includePrefix && paramMatches[1]) {
|
|
2887
|
-
s21 = s21.substring(1);
|
|
2888
|
-
}
|
|
2889
|
-
segments.push(s21);
|
|
2890
|
-
inverseParts.push(`/:${reference.names[key] ?? cleanedKey}${repeat ? optional ? "*" : "+" : ""}`);
|
|
2891
|
-
reference.names[key] ??= cleanedKey;
|
|
2892
|
-
} else {
|
|
2893
|
-
segments.push(`/${(0, _escaperegexp.escapeStringRegexp)(segment)}`);
|
|
2894
|
-
inverseParts.push(`/${segment}`);
|
|
2895
|
-
}
|
|
2896
|
-
if (includeSuffix && paramMatches && paramMatches[3]) {
|
|
2897
|
-
segments.push((0, _escaperegexp.escapeStringRegexp)(paramMatches[3]));
|
|
2898
|
-
inverseParts.push(paramMatches[3]);
|
|
2899
|
-
}
|
|
2900
|
-
}
|
|
2901
|
-
return {
|
|
2902
|
-
namedParameterizedRoute: segments.join(""),
|
|
2903
|
-
routeKeys,
|
|
2904
|
-
pathToRegexpPattern: inverseParts.join(""),
|
|
2905
|
-
reference
|
|
2906
|
-
};
|
|
2907
|
-
}
|
|
2908
|
-
function getNamedRouteRegex(normalizedRoute, options) {
|
|
2909
|
-
const result = getNamedParametrizedRoute(normalizedRoute, options.prefixRouteKeys, options.includeSuffix ?? false, options.includePrefix ?? false, options.backreferenceDuplicateKeys ?? false, options.reference);
|
|
2910
|
-
let namedRegex = result.namedParameterizedRoute;
|
|
2911
|
-
if (!options.excludeOptionalTrailingSlash) {
|
|
2912
|
-
namedRegex += "(?:/)?";
|
|
2913
|
-
}
|
|
2914
|
-
return {
|
|
2915
|
-
...getRouteRegex(normalizedRoute, options),
|
|
2916
|
-
namedRegex: `^${namedRegex}$`,
|
|
2917
|
-
routeKeys: result.routeKeys,
|
|
2918
|
-
pathToRegexpPattern: result.pathToRegexpPattern,
|
|
2919
|
-
reference: result.reference
|
|
2920
|
-
};
|
|
2921
|
-
}
|
|
2922
|
-
function getNamedMiddlewareRegex(normalizedRoute, options) {
|
|
2923
|
-
const { parameterizedRoute } = getParametrizedRoute(normalizedRoute, false, false);
|
|
2924
|
-
const { catchAll = true } = options;
|
|
2925
|
-
if (parameterizedRoute === "/") {
|
|
2926
|
-
let catchAllRegex = catchAll ? ".*" : "";
|
|
2927
|
-
return {
|
|
2928
|
-
namedRegex: `^/${catchAllRegex}$`
|
|
2929
|
-
};
|
|
2930
|
-
}
|
|
2931
|
-
const { namedParameterizedRoute } = getNamedParametrizedRoute(normalizedRoute, false, false, false, false, void 0);
|
|
2932
|
-
let catchAllGroupedRegex = catchAll ? "(?:(/.*)?)" : "";
|
|
2933
|
-
return {
|
|
2934
|
-
namedRegex: `^${namedParameterizedRoute}${catchAllGroupedRegex}$`
|
|
2935
|
-
};
|
|
2936
|
-
}
|
|
2937
|
-
}
|
|
2938
|
-
});
|
|
2939
|
-
|
|
2940
|
-
// ../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/shared/lib/router/utils/interpolate-as.js
|
|
2941
|
-
var require_interpolate_as = __commonJS({
|
|
2942
|
-
"../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/shared/lib/router/utils/interpolate-as.js"(exports) {
|
|
2943
|
-
"use strict";
|
|
2944
|
-
Object.defineProperty(exports, "__esModule", {
|
|
2945
|
-
value: true
|
|
2946
|
-
});
|
|
2947
|
-
Object.defineProperty(exports, "interpolateAs", {
|
|
2948
|
-
enumerable: true,
|
|
2949
|
-
get: function() {
|
|
2950
|
-
return interpolateAs;
|
|
2951
|
-
}
|
|
2952
|
-
});
|
|
2953
|
-
var _routematcher = require_route_matcher();
|
|
2954
|
-
var _routeregex = require_route_regex();
|
|
2955
|
-
function interpolateAs(route, asPathname, query) {
|
|
2956
|
-
let interpolatedRoute = "";
|
|
2957
|
-
const dynamicRegex = (0, _routeregex.getRouteRegex)(route);
|
|
2958
|
-
const dynamicGroups = dynamicRegex.groups;
|
|
2959
|
-
const dynamicMatches = (
|
|
2960
|
-
// Try to match the dynamic route against the asPath
|
|
2961
|
-
(asPathname !== route ? (0, _routematcher.getRouteMatcher)(dynamicRegex)(asPathname) : "") || // Fall back to reading the values from the href
|
|
2962
|
-
// TODO: should this take priority; also need to change in the router.
|
|
2963
|
-
query
|
|
2964
|
-
);
|
|
2965
|
-
interpolatedRoute = route;
|
|
2966
|
-
const params = Object.keys(dynamicGroups);
|
|
2967
|
-
if (!params.every((param) => {
|
|
2968
|
-
let value = dynamicMatches[param] || "";
|
|
2969
|
-
const { repeat, optional } = dynamicGroups[param];
|
|
2970
|
-
let replaced = `[${repeat ? "..." : ""}${param}]`;
|
|
2971
|
-
if (optional) {
|
|
2972
|
-
replaced = `${!value ? "/" : ""}[${replaced}]`;
|
|
2973
|
-
}
|
|
2974
|
-
if (repeat && !Array.isArray(value)) value = [
|
|
2975
|
-
value
|
|
2976
|
-
];
|
|
2977
|
-
return (optional || param in dynamicMatches) && // Interpolate group into data URL if present
|
|
2978
|
-
(interpolatedRoute = interpolatedRoute.replace(replaced, repeat ? value.map(
|
|
2979
|
-
// these values should be fully encoded instead of just
|
|
2980
|
-
// path delimiter escaped since they are being inserted
|
|
2981
|
-
// into the URL and we expect URL encoded segments
|
|
2982
|
-
// when parsing dynamic route params
|
|
2983
|
-
(segment) => encodeURIComponent(segment)
|
|
2984
|
-
).join("/") : encodeURIComponent(value)) || "/");
|
|
2985
|
-
})) {
|
|
2986
|
-
interpolatedRoute = "";
|
|
2987
|
-
}
|
|
2988
|
-
return {
|
|
2989
|
-
params,
|
|
2990
|
-
result: interpolatedRoute
|
|
2991
|
-
};
|
|
2992
|
-
}
|
|
2993
|
-
}
|
|
2994
|
-
});
|
|
2995
|
-
|
|
2996
|
-
// ../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/client/resolve-href.js
|
|
2997
|
-
var require_resolve_href = __commonJS({
|
|
2998
|
-
"../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/client/resolve-href.js"(exports, module) {
|
|
2999
|
-
"use strict";
|
|
3000
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3001
|
-
value: true
|
|
3002
|
-
});
|
|
3003
|
-
Object.defineProperty(exports, "resolveHref", {
|
|
3004
|
-
enumerable: true,
|
|
3005
|
-
get: function() {
|
|
3006
|
-
return resolveHref;
|
|
3007
|
-
}
|
|
3008
|
-
});
|
|
3009
|
-
var _querystring = require_querystring();
|
|
3010
|
-
var _formaturl = require_format_url();
|
|
3011
|
-
var _omit = require_omit();
|
|
3012
|
-
var _utils = require_utils();
|
|
3013
|
-
var _normalizetrailingslash = require_normalize_trailing_slash();
|
|
3014
|
-
var _islocalurl = require_is_local_url();
|
|
3015
|
-
var _utils1 = require_utils2();
|
|
3016
|
-
var _interpolateas = require_interpolate_as();
|
|
3017
|
-
var _routeregex = require_route_regex();
|
|
3018
|
-
var _routematcher = require_route_matcher();
|
|
3019
|
-
function resolveHref(router, href, resolveAs) {
|
|
3020
|
-
let base;
|
|
3021
|
-
let urlAsString = typeof href === "string" ? href : (0, _formaturl.formatWithValidation)(href);
|
|
3022
|
-
const urlProtoMatch = urlAsString.match(/^[a-z][a-z0-9+.-]*:\/\//i);
|
|
3023
|
-
const urlAsStringNoProto = urlProtoMatch ? urlAsString.slice(urlProtoMatch[0].length) : urlAsString;
|
|
3024
|
-
const urlParts = urlAsStringNoProto.split("?", 1);
|
|
3025
|
-
if ((urlParts[0] || "").match(/(\/\/|\\)/)) {
|
|
3026
|
-
console.error(`Invalid href '${urlAsString}' passed to next/router in page: '${router.pathname}'. Repeated forward-slashes (//) or backslashes \\ are not valid in the href.`);
|
|
3027
|
-
const normalizedUrl = (0, _utils.normalizeRepeatedSlashes)(urlAsStringNoProto);
|
|
3028
|
-
urlAsString = (urlProtoMatch ? urlProtoMatch[0] : "") + normalizedUrl;
|
|
3029
|
-
}
|
|
3030
|
-
if (!(0, _islocalurl.isLocalURL)(urlAsString)) {
|
|
3031
|
-
return resolveAs ? [
|
|
3032
|
-
urlAsString
|
|
3033
|
-
] : urlAsString;
|
|
3034
|
-
}
|
|
3035
|
-
try {
|
|
3036
|
-
let baseBase = urlAsString.startsWith("#") ? router.asPath : router.pathname;
|
|
3037
|
-
if (urlAsString.startsWith("?")) {
|
|
3038
|
-
baseBase = router.asPath;
|
|
3039
|
-
if ((0, _utils1.isDynamicRoute)(router.pathname)) {
|
|
3040
|
-
baseBase = router.pathname;
|
|
3041
|
-
const routeRegex = (0, _routeregex.getRouteRegex)(router.pathname);
|
|
3042
|
-
const match = (0, _routematcher.getRouteMatcher)(routeRegex)(router.asPath);
|
|
3043
|
-
if (!match) {
|
|
3044
|
-
baseBase = router.asPath;
|
|
3045
|
-
}
|
|
3046
|
-
}
|
|
3047
|
-
}
|
|
3048
|
-
base = new URL(baseBase, "http://n");
|
|
3049
|
-
} catch (_) {
|
|
3050
|
-
base = new URL("/", "http://n");
|
|
3051
|
-
}
|
|
3052
|
-
try {
|
|
3053
|
-
const finalUrl = new URL(urlAsString, base);
|
|
3054
|
-
finalUrl.pathname = (0, _normalizetrailingslash.normalizePathTrailingSlash)(finalUrl.pathname);
|
|
3055
|
-
let interpolatedAs = "";
|
|
3056
|
-
if ((0, _utils1.isDynamicRoute)(finalUrl.pathname) && finalUrl.searchParams && resolveAs) {
|
|
3057
|
-
const query = (0, _querystring.searchParamsToUrlQuery)(finalUrl.searchParams);
|
|
3058
|
-
const { result, params } = (0, _interpolateas.interpolateAs)(finalUrl.pathname, finalUrl.pathname, query);
|
|
3059
|
-
if (result) {
|
|
3060
|
-
interpolatedAs = (0, _formaturl.formatWithValidation)({
|
|
3061
|
-
pathname: result,
|
|
3062
|
-
hash: finalUrl.hash,
|
|
3063
|
-
query: (0, _omit.omit)(query, params)
|
|
3064
|
-
});
|
|
3065
|
-
}
|
|
3066
|
-
}
|
|
3067
|
-
const resolvedHref = finalUrl.origin === base.origin ? finalUrl.href.slice(finalUrl.origin.length) : finalUrl.href;
|
|
3068
|
-
return resolveAs ? [
|
|
3069
|
-
resolvedHref,
|
|
3070
|
-
interpolatedAs || resolvedHref
|
|
3071
|
-
] : resolvedHref;
|
|
3072
|
-
} catch (_) {
|
|
3073
|
-
return resolveAs ? [
|
|
3074
|
-
urlAsString
|
|
3075
|
-
] : urlAsString;
|
|
3076
|
-
}
|
|
3077
|
-
}
|
|
3078
|
-
if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
|
|
3079
|
-
Object.defineProperty(exports.default, "__esModule", { value: true });
|
|
3080
|
-
Object.assign(exports.default, exports);
|
|
3081
|
-
module.exports = exports.default;
|
|
3082
|
-
}
|
|
3083
|
-
}
|
|
3084
|
-
});
|
|
3085
|
-
|
|
3086
|
-
// ../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/shared/lib/router/utils/add-path-prefix.js
|
|
3087
|
-
var require_add_path_prefix = __commonJS({
|
|
3088
|
-
"../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/shared/lib/router/utils/add-path-prefix.js"(exports) {
|
|
3089
|
-
"use strict";
|
|
3090
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3091
|
-
value: true
|
|
3092
|
-
});
|
|
3093
|
-
Object.defineProperty(exports, "addPathPrefix", {
|
|
3094
|
-
enumerable: true,
|
|
3095
|
-
get: function() {
|
|
3096
|
-
return addPathPrefix;
|
|
3097
|
-
}
|
|
3098
|
-
});
|
|
3099
|
-
var _parsepath = require_parse_path();
|
|
3100
|
-
function addPathPrefix(path, prefix) {
|
|
3101
|
-
if (!path.startsWith("/") || !prefix) {
|
|
3102
|
-
return path;
|
|
3103
|
-
}
|
|
3104
|
-
const { pathname, query, hash } = (0, _parsepath.parsePath)(path);
|
|
3105
|
-
return `${prefix}${pathname}${query}${hash}`;
|
|
3106
|
-
}
|
|
3107
|
-
}
|
|
3108
|
-
});
|
|
3109
|
-
|
|
3110
|
-
// ../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/shared/lib/router/utils/add-locale.js
|
|
3111
|
-
var require_add_locale = __commonJS({
|
|
3112
|
-
"../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/shared/lib/router/utils/add-locale.js"(exports) {
|
|
3113
|
-
"use strict";
|
|
3114
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3115
|
-
value: true
|
|
3116
|
-
});
|
|
3117
|
-
Object.defineProperty(exports, "addLocale", {
|
|
3118
|
-
enumerable: true,
|
|
3119
|
-
get: function() {
|
|
3120
|
-
return addLocale;
|
|
3121
|
-
}
|
|
3122
|
-
});
|
|
3123
|
-
var _addpathprefix = require_add_path_prefix();
|
|
3124
|
-
var _pathhasprefix = require_path_has_prefix();
|
|
3125
|
-
function addLocale(path, locale, defaultLocale, ignorePrefix) {
|
|
3126
|
-
if (!locale || locale === defaultLocale) return path;
|
|
3127
|
-
const lower = path.toLowerCase();
|
|
3128
|
-
if (!ignorePrefix) {
|
|
3129
|
-
if ((0, _pathhasprefix.pathHasPrefix)(lower, "/api")) return path;
|
|
3130
|
-
if ((0, _pathhasprefix.pathHasPrefix)(lower, `/${locale.toLowerCase()}`)) return path;
|
|
3131
|
-
}
|
|
3132
|
-
return (0, _addpathprefix.addPathPrefix)(path, `/${locale}`);
|
|
3133
|
-
}
|
|
3134
|
-
}
|
|
3135
|
-
});
|
|
3136
|
-
|
|
3137
|
-
// ../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/client/add-locale.js
|
|
3138
|
-
var require_add_locale2 = __commonJS({
|
|
3139
|
-
"../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/client/add-locale.js"(exports, module) {
|
|
3140
|
-
"use strict";
|
|
3141
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3142
|
-
value: true
|
|
3143
|
-
});
|
|
3144
|
-
Object.defineProperty(exports, "addLocale", {
|
|
3145
|
-
enumerable: true,
|
|
3146
|
-
get: function() {
|
|
3147
|
-
return addLocale;
|
|
3148
|
-
}
|
|
3149
|
-
});
|
|
3150
|
-
var _normalizetrailingslash = require_normalize_trailing_slash();
|
|
3151
|
-
var addLocale = (path, ...args) => {
|
|
3152
|
-
if (process.env.__NEXT_I18N_SUPPORT) {
|
|
3153
|
-
return (0, _normalizetrailingslash.normalizePathTrailingSlash)(require_add_locale().addLocale(path, ...args));
|
|
3154
|
-
}
|
|
3155
|
-
return path;
|
|
3156
|
-
};
|
|
3157
|
-
if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
|
|
3158
|
-
Object.defineProperty(exports.default, "__esModule", { value: true });
|
|
3159
|
-
Object.assign(exports.default, exports);
|
|
3160
|
-
module.exports = exports.default;
|
|
3161
|
-
}
|
|
3162
|
-
}
|
|
3163
|
-
});
|
|
3164
|
-
|
|
3165
|
-
// ../../node_modules/.bun/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_interop_require_default.js
|
|
3166
|
-
var interop_require_default_exports = {};
|
|
3167
|
-
__export(interop_require_default_exports, {
|
|
3168
|
-
_: () => _interop_require_default
|
|
3169
|
-
});
|
|
3170
|
-
function _interop_require_default(obj) {
|
|
3171
|
-
return obj && obj.__esModule ? obj : { default: obj };
|
|
3172
|
-
}
|
|
3173
|
-
var init_interop_require_default = __esm({
|
|
3174
|
-
"../../node_modules/.bun/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_interop_require_default.js"() {
|
|
3175
|
-
"use strict";
|
|
3176
|
-
}
|
|
3177
|
-
});
|
|
3178
|
-
|
|
3179
|
-
// ../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/shared/lib/router-context.shared-runtime.js
|
|
3180
|
-
var require_router_context_shared_runtime = __commonJS({
|
|
3181
|
-
"../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/shared/lib/router-context.shared-runtime.js"(exports) {
|
|
3182
|
-
"use strict";
|
|
3183
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3184
|
-
value: true
|
|
3185
|
-
});
|
|
3186
|
-
Object.defineProperty(exports, "RouterContext", {
|
|
3187
|
-
enumerable: true,
|
|
3188
|
-
get: function() {
|
|
3189
|
-
return RouterContext;
|
|
3190
|
-
}
|
|
3191
|
-
});
|
|
3192
|
-
var _interop_require_default2 = (init_interop_require_default(), __toCommonJS(interop_require_default_exports));
|
|
3193
|
-
var _react = /* @__PURE__ */ _interop_require_default2._(__require("react"));
|
|
3194
|
-
var RouterContext = _react.default.createContext(null);
|
|
3195
|
-
if (process.env.NODE_ENV !== "production") {
|
|
3196
|
-
RouterContext.displayName = "RouterContext";
|
|
3197
|
-
}
|
|
3198
|
-
}
|
|
3199
|
-
});
|
|
3200
|
-
|
|
3201
|
-
// ../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/client/request-idle-callback.js
|
|
3202
|
-
var require_request_idle_callback = __commonJS({
|
|
3203
|
-
"../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/client/request-idle-callback.js"(exports, module) {
|
|
3204
|
-
"use strict";
|
|
3205
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3206
|
-
value: true
|
|
3207
|
-
});
|
|
3208
|
-
function _export(target, all) {
|
|
3209
|
-
for (var name in all) Object.defineProperty(target, name, {
|
|
3210
|
-
enumerable: true,
|
|
3211
|
-
get: all[name]
|
|
3212
|
-
});
|
|
3213
|
-
}
|
|
3214
|
-
_export(exports, {
|
|
3215
|
-
cancelIdleCallback: function() {
|
|
3216
|
-
return cancelIdleCallback;
|
|
3217
|
-
},
|
|
3218
|
-
requestIdleCallback: function() {
|
|
3219
|
-
return requestIdleCallback;
|
|
3220
|
-
}
|
|
3221
|
-
});
|
|
3222
|
-
var requestIdleCallback = typeof self !== "undefined" && self.requestIdleCallback && self.requestIdleCallback.bind(window) || function(cb) {
|
|
3223
|
-
let start = Date.now();
|
|
3224
|
-
return self.setTimeout(function() {
|
|
3225
|
-
cb({
|
|
3226
|
-
didTimeout: false,
|
|
3227
|
-
timeRemaining: function() {
|
|
3228
|
-
return Math.max(0, 50 - (Date.now() - start));
|
|
3229
|
-
}
|
|
3230
|
-
});
|
|
3231
|
-
}, 1);
|
|
3232
|
-
};
|
|
3233
|
-
var cancelIdleCallback = typeof self !== "undefined" && self.cancelIdleCallback && self.cancelIdleCallback.bind(window) || function(id) {
|
|
3234
|
-
return clearTimeout(id);
|
|
3235
|
-
};
|
|
3236
|
-
if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
|
|
3237
|
-
Object.defineProperty(exports.default, "__esModule", { value: true });
|
|
3238
|
-
Object.assign(exports.default, exports);
|
|
3239
|
-
module.exports = exports.default;
|
|
3240
|
-
}
|
|
3241
|
-
}
|
|
3242
|
-
});
|
|
3243
|
-
|
|
3244
|
-
// ../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/client/use-intersection.js
|
|
3245
|
-
var require_use_intersection = __commonJS({
|
|
3246
|
-
"../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/client/use-intersection.js"(exports, module) {
|
|
3247
|
-
"use strict";
|
|
3248
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3249
|
-
value: true
|
|
3250
|
-
});
|
|
3251
|
-
Object.defineProperty(exports, "useIntersection", {
|
|
3252
|
-
enumerable: true,
|
|
3253
|
-
get: function() {
|
|
3254
|
-
return useIntersection;
|
|
3255
|
-
}
|
|
3256
|
-
});
|
|
3257
|
-
var _react = __require("react");
|
|
3258
|
-
var _requestidlecallback = require_request_idle_callback();
|
|
3259
|
-
var hasIntersectionObserver = typeof IntersectionObserver === "function";
|
|
3260
|
-
var observers = /* @__PURE__ */ new Map();
|
|
3261
|
-
var idList = [];
|
|
3262
|
-
function createObserver(options) {
|
|
3263
|
-
const id = {
|
|
3264
|
-
root: options.root || null,
|
|
3265
|
-
margin: options.rootMargin || ""
|
|
3266
|
-
};
|
|
3267
|
-
const existing = idList.find((obj) => obj.root === id.root && obj.margin === id.margin);
|
|
3268
|
-
let instance;
|
|
3269
|
-
if (existing) {
|
|
3270
|
-
instance = observers.get(existing);
|
|
3271
|
-
if (instance) {
|
|
3272
|
-
return instance;
|
|
3273
|
-
}
|
|
3274
|
-
}
|
|
3275
|
-
const elements = /* @__PURE__ */ new Map();
|
|
3276
|
-
const observer = new IntersectionObserver((entries) => {
|
|
3277
|
-
entries.forEach((entry) => {
|
|
3278
|
-
const callback = elements.get(entry.target);
|
|
3279
|
-
const isVisible = entry.isIntersecting || entry.intersectionRatio > 0;
|
|
3280
|
-
if (callback && isVisible) {
|
|
3281
|
-
callback(isVisible);
|
|
3282
|
-
}
|
|
3283
|
-
});
|
|
3284
|
-
}, options);
|
|
3285
|
-
instance = {
|
|
3286
|
-
id,
|
|
3287
|
-
observer,
|
|
3288
|
-
elements
|
|
3289
|
-
};
|
|
3290
|
-
idList.push(id);
|
|
3291
|
-
observers.set(id, instance);
|
|
3292
|
-
return instance;
|
|
3293
|
-
}
|
|
3294
|
-
function observe(element, callback, options) {
|
|
3295
|
-
const { id, observer, elements } = createObserver(options);
|
|
3296
|
-
elements.set(element, callback);
|
|
3297
|
-
observer.observe(element);
|
|
3298
|
-
return function unobserve() {
|
|
3299
|
-
elements.delete(element);
|
|
3300
|
-
observer.unobserve(element);
|
|
3301
|
-
if (elements.size === 0) {
|
|
3302
|
-
observer.disconnect();
|
|
3303
|
-
observers.delete(id);
|
|
3304
|
-
const index = idList.findIndex((obj) => obj.root === id.root && obj.margin === id.margin);
|
|
3305
|
-
if (index > -1) {
|
|
3306
|
-
idList.splice(index, 1);
|
|
3307
|
-
}
|
|
3308
|
-
}
|
|
3309
|
-
};
|
|
3310
|
-
}
|
|
3311
|
-
function useIntersection({ rootRef, rootMargin, disabled }) {
|
|
3312
|
-
const isDisabled = disabled || !hasIntersectionObserver;
|
|
3313
|
-
const [visible, setVisible] = (0, _react.useState)(false);
|
|
3314
|
-
const elementRef = (0, _react.useRef)(null);
|
|
3315
|
-
const setElement = (0, _react.useCallback)((element) => {
|
|
3316
|
-
elementRef.current = element;
|
|
3317
|
-
}, []);
|
|
3318
|
-
(0, _react.useEffect)(() => {
|
|
3319
|
-
if (hasIntersectionObserver) {
|
|
3320
|
-
if (isDisabled || visible) return;
|
|
3321
|
-
const element = elementRef.current;
|
|
3322
|
-
if (element && element.tagName) {
|
|
3323
|
-
const unobserve = observe(element, (isVisible) => isVisible && setVisible(isVisible), {
|
|
3324
|
-
root: rootRef?.current,
|
|
3325
|
-
rootMargin
|
|
3326
|
-
});
|
|
3327
|
-
return unobserve;
|
|
3328
|
-
}
|
|
3329
|
-
} else {
|
|
3330
|
-
if (!visible) {
|
|
3331
|
-
const idleCallback = (0, _requestidlecallback.requestIdleCallback)(() => setVisible(true));
|
|
3332
|
-
return () => (0, _requestidlecallback.cancelIdleCallback)(idleCallback);
|
|
3333
|
-
}
|
|
3334
|
-
}
|
|
3335
|
-
}, [
|
|
3336
|
-
isDisabled,
|
|
3337
|
-
rootMargin,
|
|
3338
|
-
rootRef,
|
|
3339
|
-
visible,
|
|
3340
|
-
elementRef.current
|
|
3341
|
-
]);
|
|
3342
|
-
const resetVisible = (0, _react.useCallback)(() => {
|
|
3343
|
-
setVisible(false);
|
|
3344
|
-
}, []);
|
|
3345
|
-
return [
|
|
3346
|
-
setElement,
|
|
3347
|
-
visible,
|
|
3348
|
-
resetVisible
|
|
3349
|
-
];
|
|
3350
|
-
}
|
|
3351
|
-
if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
|
|
3352
|
-
Object.defineProperty(exports.default, "__esModule", { value: true });
|
|
3353
|
-
Object.assign(exports.default, exports);
|
|
3354
|
-
module.exports = exports.default;
|
|
3355
|
-
}
|
|
3356
|
-
}
|
|
3357
|
-
});
|
|
3358
|
-
|
|
3359
|
-
// ../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/shared/lib/i18n/normalize-locale-path.js
|
|
3360
|
-
var require_normalize_locale_path = __commonJS({
|
|
3361
|
-
"../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/shared/lib/i18n/normalize-locale-path.js"(exports) {
|
|
3362
|
-
"use strict";
|
|
3363
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3364
|
-
value: true
|
|
3365
|
-
});
|
|
3366
|
-
Object.defineProperty(exports, "normalizeLocalePath", {
|
|
3367
|
-
enumerable: true,
|
|
3368
|
-
get: function() {
|
|
3369
|
-
return normalizeLocalePath;
|
|
3370
|
-
}
|
|
3371
|
-
});
|
|
3372
|
-
var cache = /* @__PURE__ */ new WeakMap();
|
|
3373
|
-
function normalizeLocalePath(pathname, locales) {
|
|
3374
|
-
if (!locales) return {
|
|
3375
|
-
pathname
|
|
3376
|
-
};
|
|
3377
|
-
let lowercasedLocales = cache.get(locales);
|
|
3378
|
-
if (!lowercasedLocales) {
|
|
3379
|
-
lowercasedLocales = locales.map((locale) => locale.toLowerCase());
|
|
3380
|
-
cache.set(locales, lowercasedLocales);
|
|
3381
|
-
}
|
|
3382
|
-
let detectedLocale;
|
|
3383
|
-
const segments = pathname.split("/", 2);
|
|
3384
|
-
if (!segments[1]) return {
|
|
3385
|
-
pathname
|
|
3386
|
-
};
|
|
3387
|
-
const segment = segments[1].toLowerCase();
|
|
3388
|
-
const index = lowercasedLocales.indexOf(segment);
|
|
3389
|
-
if (index < 0) return {
|
|
3390
|
-
pathname
|
|
3391
|
-
};
|
|
3392
|
-
detectedLocale = locales[index];
|
|
3393
|
-
pathname = pathname.slice(detectedLocale.length + 1) || "/";
|
|
3394
|
-
return {
|
|
3395
|
-
pathname,
|
|
3396
|
-
detectedLocale
|
|
3397
|
-
};
|
|
3398
|
-
}
|
|
3399
|
-
}
|
|
3400
|
-
});
|
|
3401
|
-
|
|
3402
|
-
// ../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/client/normalize-locale-path.js
|
|
3403
|
-
var require_normalize_locale_path2 = __commonJS({
|
|
3404
|
-
"../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/client/normalize-locale-path.js"(exports, module) {
|
|
3405
|
-
"use strict";
|
|
3406
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3407
|
-
value: true
|
|
3408
|
-
});
|
|
3409
|
-
Object.defineProperty(exports, "normalizeLocalePath", {
|
|
3410
|
-
enumerable: true,
|
|
3411
|
-
get: function() {
|
|
3412
|
-
return normalizeLocalePath;
|
|
3413
|
-
}
|
|
3414
|
-
});
|
|
3415
|
-
var normalizeLocalePath = (pathname, locales) => {
|
|
3416
|
-
if (process.env.__NEXT_I18N_SUPPORT) {
|
|
3417
|
-
return require_normalize_locale_path().normalizeLocalePath(pathname, locales);
|
|
3418
|
-
}
|
|
3419
|
-
return {
|
|
3420
|
-
pathname,
|
|
3421
|
-
detectedLocale: void 0
|
|
3422
|
-
};
|
|
3423
|
-
};
|
|
3424
|
-
if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
|
|
3425
|
-
Object.defineProperty(exports.default, "__esModule", { value: true });
|
|
3426
|
-
Object.assign(exports.default, exports);
|
|
3427
|
-
module.exports = exports.default;
|
|
3428
|
-
}
|
|
3429
|
-
}
|
|
3430
|
-
});
|
|
3431
|
-
|
|
3432
|
-
// ../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/shared/lib/i18n/detect-domain-locale.js
|
|
3433
|
-
var require_detect_domain_locale = __commonJS({
|
|
3434
|
-
"../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/shared/lib/i18n/detect-domain-locale.js"(exports) {
|
|
3435
|
-
"use strict";
|
|
3436
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3437
|
-
value: true
|
|
3438
|
-
});
|
|
3439
|
-
Object.defineProperty(exports, "detectDomainLocale", {
|
|
3440
|
-
enumerable: true,
|
|
3441
|
-
get: function() {
|
|
3442
|
-
return detectDomainLocale;
|
|
3443
|
-
}
|
|
3444
|
-
});
|
|
3445
|
-
function detectDomainLocale(domainItems, hostname, detectedLocale) {
|
|
3446
|
-
if (!domainItems) return;
|
|
3447
|
-
if (detectedLocale) {
|
|
3448
|
-
detectedLocale = detectedLocale.toLowerCase();
|
|
3449
|
-
}
|
|
3450
|
-
for (const item of domainItems) {
|
|
3451
|
-
const domainHostname = item.domain?.split(":", 1)[0].toLowerCase();
|
|
3452
|
-
if (hostname === domainHostname || detectedLocale === item.defaultLocale.toLowerCase() || item.locales?.some((locale) => locale.toLowerCase() === detectedLocale)) {
|
|
3453
|
-
return item;
|
|
3454
|
-
}
|
|
3455
|
-
}
|
|
3456
|
-
}
|
|
3457
|
-
}
|
|
3458
|
-
});
|
|
3459
|
-
|
|
3460
|
-
// ../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/client/detect-domain-locale.js
|
|
3461
|
-
var require_detect_domain_locale2 = __commonJS({
|
|
3462
|
-
"../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/client/detect-domain-locale.js"(exports, module) {
|
|
3463
|
-
"use strict";
|
|
3464
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3465
|
-
value: true
|
|
3466
|
-
});
|
|
3467
|
-
Object.defineProperty(exports, "detectDomainLocale", {
|
|
3468
|
-
enumerable: true,
|
|
3469
|
-
get: function() {
|
|
3470
|
-
return detectDomainLocale;
|
|
3471
|
-
}
|
|
3472
|
-
});
|
|
3473
|
-
var detectDomainLocale = (...args) => {
|
|
3474
|
-
if (process.env.__NEXT_I18N_SUPPORT) {
|
|
3475
|
-
return require_detect_domain_locale().detectDomainLocale(...args);
|
|
3476
|
-
}
|
|
3477
|
-
};
|
|
3478
|
-
if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
|
|
3479
|
-
Object.defineProperty(exports.default, "__esModule", { value: true });
|
|
3480
|
-
Object.assign(exports.default, exports);
|
|
3481
|
-
module.exports = exports.default;
|
|
3482
|
-
}
|
|
3483
|
-
}
|
|
3484
|
-
});
|
|
3485
|
-
|
|
3486
|
-
// ../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/client/get-domain-locale.js
|
|
3487
|
-
var require_get_domain_locale = __commonJS({
|
|
3488
|
-
"../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/client/get-domain-locale.js"(exports, module) {
|
|
3489
|
-
"use strict";
|
|
3490
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3491
|
-
value: true
|
|
3492
|
-
});
|
|
3493
|
-
Object.defineProperty(exports, "getDomainLocale", {
|
|
3494
|
-
enumerable: true,
|
|
3495
|
-
get: function() {
|
|
3496
|
-
return getDomainLocale;
|
|
3497
|
-
}
|
|
3498
|
-
});
|
|
3499
|
-
var _normalizetrailingslash = require_normalize_trailing_slash();
|
|
3500
|
-
var basePath = process.env.__NEXT_ROUTER_BASEPATH || "";
|
|
3501
|
-
function getDomainLocale(path, locale, locales, domainLocales) {
|
|
3502
|
-
if (process.env.__NEXT_I18N_SUPPORT) {
|
|
3503
|
-
const normalizeLocalePath = require_normalize_locale_path2().normalizeLocalePath;
|
|
3504
|
-
const detectDomainLocale = require_detect_domain_locale2().detectDomainLocale;
|
|
3505
|
-
const target = locale || normalizeLocalePath(path, locales).detectedLocale;
|
|
3506
|
-
const domain = detectDomainLocale(domainLocales, void 0, target);
|
|
3507
|
-
if (domain) {
|
|
3508
|
-
const proto = `http${domain.http ? "" : "s"}://`;
|
|
3509
|
-
const finalLocale = target === domain.defaultLocale ? "" : `/${target}`;
|
|
3510
|
-
return `${proto}${domain.domain}${(0, _normalizetrailingslash.normalizePathTrailingSlash)(`${basePath}${finalLocale}${path}`)}`;
|
|
3511
|
-
}
|
|
3512
|
-
return false;
|
|
3513
|
-
} else {
|
|
3514
|
-
return false;
|
|
3515
|
-
}
|
|
3516
|
-
}
|
|
3517
|
-
if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
|
|
3518
|
-
Object.defineProperty(exports.default, "__esModule", { value: true });
|
|
3519
|
-
Object.assign(exports.default, exports);
|
|
3520
|
-
module.exports = exports.default;
|
|
3521
|
-
}
|
|
3522
|
-
}
|
|
3523
|
-
});
|
|
3524
|
-
|
|
3525
|
-
// ../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/client/add-base-path.js
|
|
3526
|
-
var require_add_base_path = __commonJS({
|
|
3527
|
-
"../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/client/add-base-path.js"(exports, module) {
|
|
3528
|
-
"use strict";
|
|
3529
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3530
|
-
value: true
|
|
3531
|
-
});
|
|
3532
|
-
Object.defineProperty(exports, "addBasePath", {
|
|
3533
|
-
enumerable: true,
|
|
3534
|
-
get: function() {
|
|
3535
|
-
return addBasePath;
|
|
3536
|
-
}
|
|
3537
|
-
});
|
|
3538
|
-
var _addpathprefix = require_add_path_prefix();
|
|
3539
|
-
var _normalizetrailingslash = require_normalize_trailing_slash();
|
|
3540
|
-
var basePath = process.env.__NEXT_ROUTER_BASEPATH || "";
|
|
3541
|
-
function addBasePath(path, required) {
|
|
3542
|
-
return (0, _normalizetrailingslash.normalizePathTrailingSlash)(process.env.__NEXT_MANUAL_CLIENT_BASE_PATH && !required ? path : (0, _addpathprefix.addPathPrefix)(path, basePath));
|
|
3543
|
-
}
|
|
3544
|
-
if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
|
|
3545
|
-
Object.defineProperty(exports.default, "__esModule", { value: true });
|
|
3546
|
-
Object.assign(exports.default, exports);
|
|
3547
|
-
module.exports = exports.default;
|
|
3548
|
-
}
|
|
3549
|
-
}
|
|
3550
|
-
});
|
|
3551
|
-
|
|
3552
|
-
// ../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/client/use-merged-ref.js
|
|
3553
|
-
var require_use_merged_ref = __commonJS({
|
|
3554
|
-
"../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/client/use-merged-ref.js"(exports, module) {
|
|
3555
|
-
"use strict";
|
|
3556
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3557
|
-
value: true
|
|
3558
|
-
});
|
|
3559
|
-
Object.defineProperty(exports, "useMergedRef", {
|
|
3560
|
-
enumerable: true,
|
|
3561
|
-
get: function() {
|
|
3562
|
-
return useMergedRef;
|
|
3563
|
-
}
|
|
3564
|
-
});
|
|
3565
|
-
var _react = __require("react");
|
|
3566
|
-
function useMergedRef(refA, refB) {
|
|
3567
|
-
const cleanupA = (0, _react.useRef)(null);
|
|
3568
|
-
const cleanupB = (0, _react.useRef)(null);
|
|
3569
|
-
return (0, _react.useCallback)((current2) => {
|
|
3570
|
-
if (current2 === null) {
|
|
3571
|
-
const cleanupFnA = cleanupA.current;
|
|
3572
|
-
if (cleanupFnA) {
|
|
3573
|
-
cleanupA.current = null;
|
|
3574
|
-
cleanupFnA();
|
|
3575
|
-
}
|
|
3576
|
-
const cleanupFnB = cleanupB.current;
|
|
3577
|
-
if (cleanupFnB) {
|
|
3578
|
-
cleanupB.current = null;
|
|
3579
|
-
cleanupFnB();
|
|
3580
|
-
}
|
|
3581
|
-
} else {
|
|
3582
|
-
if (refA) {
|
|
3583
|
-
cleanupA.current = applyRef(refA, current2);
|
|
3584
|
-
}
|
|
3585
|
-
if (refB) {
|
|
3586
|
-
cleanupB.current = applyRef(refB, current2);
|
|
3587
|
-
}
|
|
3588
|
-
}
|
|
3589
|
-
}, [
|
|
3590
|
-
refA,
|
|
3591
|
-
refB
|
|
3592
|
-
]);
|
|
3593
|
-
}
|
|
3594
|
-
function applyRef(refA, current2) {
|
|
3595
|
-
if (typeof refA === "function") {
|
|
3596
|
-
const cleanup = refA(current2);
|
|
3597
|
-
if (typeof cleanup === "function") {
|
|
3598
|
-
return cleanup;
|
|
3599
|
-
} else {
|
|
3600
|
-
return () => refA(null);
|
|
3601
|
-
}
|
|
3602
|
-
} else {
|
|
3603
|
-
refA.current = current2;
|
|
3604
|
-
return () => {
|
|
3605
|
-
refA.current = null;
|
|
3606
|
-
};
|
|
3607
|
-
}
|
|
3608
|
-
}
|
|
3609
|
-
if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
|
|
3610
|
-
Object.defineProperty(exports.default, "__esModule", { value: true });
|
|
3611
|
-
Object.assign(exports.default, exports);
|
|
3612
|
-
module.exports = exports.default;
|
|
3613
|
-
}
|
|
3614
|
-
}
|
|
3615
|
-
});
|
|
3616
|
-
|
|
3617
|
-
// ../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/shared/lib/utils/error-once.js
|
|
3618
|
-
var require_error_once = __commonJS({
|
|
3619
|
-
"../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/shared/lib/utils/error-once.js"(exports) {
|
|
3620
|
-
"use strict";
|
|
3621
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3622
|
-
value: true
|
|
3623
|
-
});
|
|
3624
|
-
Object.defineProperty(exports, "errorOnce", {
|
|
3625
|
-
enumerable: true,
|
|
3626
|
-
get: function() {
|
|
3627
|
-
return errorOnce;
|
|
3628
|
-
}
|
|
3629
|
-
});
|
|
3630
|
-
var errorOnce = (_) => {
|
|
3631
|
-
};
|
|
3632
|
-
if (process.env.NODE_ENV !== "production") {
|
|
3633
|
-
const errors = /* @__PURE__ */ new Set();
|
|
3634
|
-
errorOnce = (msg) => {
|
|
3635
|
-
if (!errors.has(msg)) {
|
|
3636
|
-
console.error(msg);
|
|
3637
|
-
}
|
|
3638
|
-
errors.add(msg);
|
|
3639
|
-
};
|
|
3640
|
-
}
|
|
3641
|
-
}
|
|
3642
|
-
});
|
|
3643
|
-
|
|
3644
|
-
// ../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/client/link.js
|
|
3645
|
-
var require_link = __commonJS({
|
|
3646
|
-
"../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/dist/client/link.js"(exports, module) {
|
|
3647
|
-
"use strict";
|
|
3648
|
-
"use client";
|
|
3649
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3650
|
-
value: true
|
|
3651
|
-
});
|
|
3652
|
-
function _export(target, all) {
|
|
3653
|
-
for (var name in all) Object.defineProperty(target, name, {
|
|
3654
|
-
enumerable: true,
|
|
3655
|
-
get: all[name]
|
|
3656
|
-
});
|
|
3657
|
-
}
|
|
3658
|
-
_export(exports, {
|
|
3659
|
-
default: function() {
|
|
3660
|
-
return _default;
|
|
3661
|
-
},
|
|
3662
|
-
useLinkStatus: function() {
|
|
3663
|
-
return useLinkStatus;
|
|
3664
|
-
}
|
|
3665
|
-
});
|
|
3666
|
-
var _interop_require_wildcard2 = (init_interop_require_wildcard(), __toCommonJS(interop_require_wildcard_exports));
|
|
3667
|
-
var _jsxruntime = __require("react/jsx-runtime");
|
|
3668
|
-
var _react = /* @__PURE__ */ _interop_require_wildcard2._(__require("react"));
|
|
3669
|
-
var _resolvehref = require_resolve_href();
|
|
3670
|
-
var _islocalurl = require_is_local_url();
|
|
3671
|
-
var _formaturl = require_format_url();
|
|
3672
|
-
var _utils = require_utils();
|
|
3673
|
-
var _addlocale = require_add_locale2();
|
|
3674
|
-
var _routercontextsharedruntime = require_router_context_shared_runtime();
|
|
3675
|
-
var _useintersection = require_use_intersection();
|
|
3676
|
-
var _getdomainlocale = require_get_domain_locale();
|
|
3677
|
-
var _addbasepath = require_add_base_path();
|
|
3678
|
-
var _usemergedref = require_use_merged_ref();
|
|
3679
|
-
var prefetched = /* @__PURE__ */ new Set();
|
|
3680
|
-
function prefetch(router, href, as, options) {
|
|
3681
|
-
if (typeof window === "undefined") {
|
|
3682
|
-
return;
|
|
3683
|
-
}
|
|
3684
|
-
if (!(0, _islocalurl.isLocalURL)(href)) {
|
|
3685
|
-
return;
|
|
3686
|
-
}
|
|
3687
|
-
if (!options.bypassPrefetchedCheck) {
|
|
3688
|
-
const locale = (
|
|
3689
|
-
// Let the link's locale prop override the default router locale.
|
|
3690
|
-
typeof options.locale !== "undefined" ? options.locale : "locale" in router ? router.locale : void 0
|
|
3691
|
-
);
|
|
3692
|
-
const prefetchedKey = href + "%" + as + "%" + locale;
|
|
3693
|
-
if (prefetched.has(prefetchedKey)) {
|
|
3694
|
-
return;
|
|
3695
|
-
}
|
|
3696
|
-
prefetched.add(prefetchedKey);
|
|
3697
|
-
}
|
|
3698
|
-
router.prefetch(href, as, options).catch((err) => {
|
|
3699
|
-
if (process.env.NODE_ENV !== "production") {
|
|
3700
|
-
throw err;
|
|
3701
|
-
}
|
|
3702
|
-
});
|
|
3703
|
-
}
|
|
3704
|
-
function isModifiedEvent(event) {
|
|
3705
|
-
const eventTarget = event.currentTarget;
|
|
3706
|
-
const target = eventTarget.getAttribute("target");
|
|
3707
|
-
return target && target !== "_self" || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey || // triggers resource download
|
|
3708
|
-
event.nativeEvent && event.nativeEvent.which === 2;
|
|
3709
|
-
}
|
|
3710
|
-
function linkClicked(e148, router, href, as, replace, shallow, scroll, locale, onNavigate) {
|
|
3711
|
-
const { nodeName } = e148.currentTarget;
|
|
3712
|
-
const isAnchorNodeName = nodeName.toUpperCase() === "A";
|
|
3713
|
-
if (isAnchorNodeName && isModifiedEvent(e148) || e148.currentTarget.hasAttribute("download")) {
|
|
3714
|
-
return;
|
|
3715
|
-
}
|
|
3716
|
-
if (!(0, _islocalurl.isLocalURL)(href)) {
|
|
3717
|
-
if (replace) {
|
|
3718
|
-
e148.preventDefault();
|
|
3719
|
-
location.replace(href);
|
|
3720
|
-
}
|
|
3721
|
-
return;
|
|
3722
|
-
}
|
|
3723
|
-
e148.preventDefault();
|
|
3724
|
-
const navigate = () => {
|
|
3725
|
-
if (onNavigate) {
|
|
3726
|
-
let isDefaultPrevented = false;
|
|
3727
|
-
onNavigate({
|
|
3728
|
-
preventDefault: () => {
|
|
3729
|
-
isDefaultPrevented = true;
|
|
3730
|
-
}
|
|
3731
|
-
});
|
|
3732
|
-
if (isDefaultPrevented) {
|
|
3733
|
-
return;
|
|
3734
|
-
}
|
|
3735
|
-
}
|
|
3736
|
-
const routerScroll = scroll ?? true;
|
|
3737
|
-
if ("beforePopState" in router) {
|
|
3738
|
-
router[replace ? "replace" : "push"](href, as, {
|
|
3739
|
-
shallow,
|
|
3740
|
-
locale,
|
|
3741
|
-
scroll: routerScroll
|
|
3742
|
-
});
|
|
3743
|
-
} else {
|
|
3744
|
-
router[replace ? "replace" : "push"](as || href, {
|
|
3745
|
-
scroll: routerScroll
|
|
3746
|
-
});
|
|
3747
|
-
}
|
|
3748
|
-
};
|
|
3749
|
-
navigate();
|
|
3750
|
-
}
|
|
3751
|
-
function formatStringOrUrl(urlObjOrString) {
|
|
3752
|
-
if (typeof urlObjOrString === "string") {
|
|
3753
|
-
return urlObjOrString;
|
|
3754
|
-
}
|
|
3755
|
-
return (0, _formaturl.formatUrl)(urlObjOrString);
|
|
3756
|
-
}
|
|
3757
|
-
var Link2 = /* @__PURE__ */ _react.default.forwardRef(function LinkComponent(props, forwardedRef) {
|
|
3758
|
-
let children;
|
|
3759
|
-
const { href: hrefProp, as: asProp, children: childrenProp, prefetch: prefetchProp = null, passHref, replace, shallow, scroll, locale, onClick, onNavigate, onMouseEnter: onMouseEnterProp, onTouchStart: onTouchStartProp, legacyBehavior = false, transitionTypes, ...restProps } = props;
|
|
3760
|
-
children = childrenProp;
|
|
3761
|
-
if (legacyBehavior && (typeof children === "string" || typeof children === "number")) {
|
|
3762
|
-
children = /* @__PURE__ */ (0, _jsxruntime.jsx)("a", {
|
|
3763
|
-
children
|
|
3764
|
-
});
|
|
3765
|
-
}
|
|
3766
|
-
const router = _react.default.useContext(_routercontextsharedruntime.RouterContext);
|
|
3767
|
-
const prefetchEnabled = prefetchProp !== false;
|
|
3768
|
-
if (process.env.NODE_ENV !== "production") {
|
|
3769
|
-
let createPropError = function(args) {
|
|
3770
|
-
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", {
|
|
3771
|
-
value: "E319",
|
|
3772
|
-
enumerable: false,
|
|
3773
|
-
configurable: true
|
|
3774
|
-
});
|
|
3775
|
-
};
|
|
3776
|
-
const requiredPropsGuard = {
|
|
3777
|
-
href: true
|
|
3778
|
-
};
|
|
3779
|
-
const requiredProps = Object.keys(requiredPropsGuard);
|
|
3780
|
-
requiredProps.forEach((key) => {
|
|
3781
|
-
if (key === "href") {
|
|
3782
|
-
if (props[key] == null || typeof props[key] !== "string" && typeof props[key] !== "object") {
|
|
3783
|
-
throw createPropError({
|
|
3784
|
-
key,
|
|
3785
|
-
expected: "`string` or `object`",
|
|
3786
|
-
actual: props[key] === null ? "null" : typeof props[key]
|
|
3787
|
-
});
|
|
3788
|
-
}
|
|
3789
|
-
} else {
|
|
3790
|
-
const _ = key;
|
|
3791
|
-
}
|
|
3792
|
-
});
|
|
3793
|
-
const optionalPropsGuard = {
|
|
3794
|
-
as: true,
|
|
3795
|
-
replace: true,
|
|
3796
|
-
scroll: true,
|
|
3797
|
-
shallow: true,
|
|
3798
|
-
passHref: true,
|
|
3799
|
-
prefetch: true,
|
|
3800
|
-
locale: true,
|
|
3801
|
-
onClick: true,
|
|
3802
|
-
onMouseEnter: true,
|
|
3803
|
-
onTouchStart: true,
|
|
3804
|
-
legacyBehavior: true,
|
|
3805
|
-
onNavigate: true,
|
|
3806
|
-
transitionTypes: true
|
|
3807
|
-
};
|
|
3808
|
-
const optionalProps = Object.keys(optionalPropsGuard);
|
|
3809
|
-
optionalProps.forEach((key) => {
|
|
3810
|
-
const valType = typeof props[key];
|
|
3811
|
-
if (key === "as") {
|
|
3812
|
-
if (props[key] && valType !== "string" && valType !== "object") {
|
|
3813
|
-
throw createPropError({
|
|
3814
|
-
key,
|
|
3815
|
-
expected: "`string` or `object`",
|
|
3816
|
-
actual: valType
|
|
3817
|
-
});
|
|
3818
|
-
}
|
|
3819
|
-
} else if (key === "locale") {
|
|
3820
|
-
if (props[key] && valType !== "string") {
|
|
3821
|
-
throw createPropError({
|
|
3822
|
-
key,
|
|
3823
|
-
expected: "`string`",
|
|
3824
|
-
actual: valType
|
|
3825
|
-
});
|
|
3826
|
-
}
|
|
3827
|
-
} else if (key === "onClick" || key === "onMouseEnter" || key === "onTouchStart" || key === "onNavigate") {
|
|
3828
|
-
if (props[key] && valType !== "function") {
|
|
3829
|
-
throw createPropError({
|
|
3830
|
-
key,
|
|
3831
|
-
expected: "`function`",
|
|
3832
|
-
actual: valType
|
|
3833
|
-
});
|
|
3834
|
-
}
|
|
3835
|
-
} else if (key === "replace" || key === "scroll" || key === "shallow" || key === "passHref" || key === "legacyBehavior") {
|
|
3836
|
-
if (props[key] != null && valType !== "boolean") {
|
|
3837
|
-
throw createPropError({
|
|
3838
|
-
key,
|
|
3839
|
-
expected: "`boolean`",
|
|
3840
|
-
actual: valType
|
|
3841
|
-
});
|
|
3842
|
-
}
|
|
3843
|
-
} else if (key === "prefetch") {
|
|
3844
|
-
if (props[key] != null && valType !== "boolean" && props[key] !== "auto") {
|
|
3845
|
-
throw createPropError({
|
|
3846
|
-
key,
|
|
3847
|
-
expected: '`boolean | "auto"`',
|
|
3848
|
-
actual: valType
|
|
3849
|
-
});
|
|
3850
|
-
}
|
|
3851
|
-
} else if (key === "transitionTypes") {
|
|
3852
|
-
if (props[key] != null && !Array.isArray(props[key])) {
|
|
3853
|
-
throw createPropError({
|
|
3854
|
-
key,
|
|
3855
|
-
expected: "`string[]`",
|
|
3856
|
-
actual: valType
|
|
3857
|
-
});
|
|
3858
|
-
}
|
|
3859
|
-
} else {
|
|
3860
|
-
const _ = key;
|
|
3861
|
-
}
|
|
3862
|
-
});
|
|
3863
|
-
}
|
|
3864
|
-
const { href, as } = _react.default.useMemo(() => {
|
|
3865
|
-
if (!router) {
|
|
3866
|
-
const resolvedHref2 = formatStringOrUrl(hrefProp);
|
|
3867
|
-
return {
|
|
3868
|
-
href: resolvedHref2,
|
|
3869
|
-
as: asProp ? formatStringOrUrl(asProp) : resolvedHref2
|
|
3870
|
-
};
|
|
3871
|
-
}
|
|
3872
|
-
const [resolvedHref, resolvedAs] = (0, _resolvehref.resolveHref)(router, hrefProp, true);
|
|
3873
|
-
return {
|
|
3874
|
-
href: resolvedHref,
|
|
3875
|
-
as: asProp ? (0, _resolvehref.resolveHref)(router, asProp) : resolvedAs || resolvedHref
|
|
3876
|
-
};
|
|
3877
|
-
}, [
|
|
3878
|
-
router,
|
|
3879
|
-
hrefProp,
|
|
3880
|
-
asProp
|
|
3881
|
-
]);
|
|
3882
|
-
const previousHref = _react.default.useRef(href);
|
|
3883
|
-
const previousAs = _react.default.useRef(as);
|
|
3884
|
-
let child;
|
|
3885
|
-
if (legacyBehavior) {
|
|
3886
|
-
if (process.env.NODE_ENV === "development") {
|
|
3887
|
-
if (onClick) {
|
|
3888
|
-
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`);
|
|
3889
|
-
}
|
|
3890
|
-
if (onMouseEnterProp) {
|
|
3891
|
-
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`);
|
|
3892
|
-
}
|
|
3893
|
-
try {
|
|
3894
|
-
child = _react.default.Children.only(children);
|
|
3895
|
-
} catch (err) {
|
|
3896
|
-
if (!children) {
|
|
3897
|
-
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", {
|
|
3898
|
-
value: "E320",
|
|
3899
|
-
enumerable: false,
|
|
3900
|
-
configurable: true
|
|
3901
|
-
});
|
|
3902
|
-
}
|
|
3903
|
-
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", {
|
|
3904
|
-
value: "E266",
|
|
3905
|
-
enumerable: false,
|
|
3906
|
-
configurable: true
|
|
3907
|
-
});
|
|
3908
|
-
}
|
|
3909
|
-
} else {
|
|
3910
|
-
child = _react.default.Children.only(children);
|
|
3911
|
-
}
|
|
3912
|
-
} else {
|
|
3913
|
-
if (process.env.NODE_ENV === "development") {
|
|
3914
|
-
if (children?.type === "a") {
|
|
3915
|
-
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", {
|
|
3916
|
-
value: "E209",
|
|
3917
|
-
enumerable: false,
|
|
3918
|
-
configurable: true
|
|
3919
|
-
});
|
|
3920
|
-
}
|
|
3921
|
-
}
|
|
3922
|
-
}
|
|
3923
|
-
const childRef = legacyBehavior ? child && typeof child === "object" && child.ref : forwardedRef;
|
|
3924
|
-
const [setIntersectionRef, isVisible, resetVisible] = (0, _useintersection.useIntersection)({
|
|
3925
|
-
rootMargin: "200px"
|
|
3926
|
-
});
|
|
3927
|
-
const setIntersectionWithResetRef = _react.default.useCallback((el) => {
|
|
3928
|
-
if (previousAs.current !== as || previousHref.current !== href) {
|
|
3929
|
-
resetVisible();
|
|
3930
|
-
previousAs.current = as;
|
|
3931
|
-
previousHref.current = href;
|
|
3932
|
-
}
|
|
3933
|
-
setIntersectionRef(el);
|
|
3934
|
-
}, [
|
|
3935
|
-
as,
|
|
3936
|
-
href,
|
|
3937
|
-
resetVisible,
|
|
3938
|
-
setIntersectionRef
|
|
3939
|
-
]);
|
|
3940
|
-
const setRef2 = (0, _usemergedref.useMergedRef)(setIntersectionWithResetRef, childRef);
|
|
3941
|
-
_react.default.useEffect(() => {
|
|
3942
|
-
if (process.env.NODE_ENV !== "production") {
|
|
3943
|
-
return;
|
|
3944
|
-
}
|
|
3945
|
-
if (!router) {
|
|
3946
|
-
return;
|
|
3947
|
-
}
|
|
3948
|
-
if (!isVisible || !prefetchEnabled) {
|
|
3949
|
-
return;
|
|
3950
|
-
}
|
|
3951
|
-
prefetch(router, href, as, {
|
|
3952
|
-
// dedupe across appear/disappear of the Link.
|
|
3953
|
-
bypassPrefetchedCheck: false,
|
|
3954
|
-
locale
|
|
3955
|
-
});
|
|
3956
|
-
}, [
|
|
3957
|
-
as,
|
|
3958
|
-
href,
|
|
3959
|
-
isVisible,
|
|
3960
|
-
locale,
|
|
3961
|
-
prefetchEnabled,
|
|
3962
|
-
router?.locale,
|
|
3963
|
-
router
|
|
3964
|
-
]);
|
|
3965
|
-
const childProps = {
|
|
3966
|
-
ref: setRef2,
|
|
3967
|
-
onClick(e148) {
|
|
3968
|
-
if (process.env.NODE_ENV !== "production") {
|
|
3969
|
-
if (!e148) {
|
|
3970
|
-
throw Object.defineProperty(new Error(`Component rendered inside next/link has to pass click event to "onClick" prop.`), "__NEXT_ERROR_CODE", {
|
|
3971
|
-
value: "E312",
|
|
3972
|
-
enumerable: false,
|
|
3973
|
-
configurable: true
|
|
3974
|
-
});
|
|
3975
|
-
}
|
|
3976
|
-
}
|
|
3977
|
-
if (!legacyBehavior && typeof onClick === "function") {
|
|
3978
|
-
onClick(e148);
|
|
3979
|
-
}
|
|
3980
|
-
if (legacyBehavior && child.props && typeof child.props.onClick === "function") {
|
|
3981
|
-
child.props.onClick(e148);
|
|
3982
|
-
}
|
|
3983
|
-
if (!router) {
|
|
3984
|
-
return;
|
|
3985
|
-
}
|
|
3986
|
-
if (e148.defaultPrevented) {
|
|
3987
|
-
return;
|
|
3988
|
-
}
|
|
3989
|
-
linkClicked(e148, router, href, as, replace, shallow, scroll, locale, onNavigate);
|
|
3990
|
-
},
|
|
3991
|
-
onMouseEnter(e148) {
|
|
3992
|
-
if (!legacyBehavior && typeof onMouseEnterProp === "function") {
|
|
3993
|
-
onMouseEnterProp(e148);
|
|
3994
|
-
}
|
|
3995
|
-
if (legacyBehavior && child.props && typeof child.props.onMouseEnter === "function") {
|
|
3996
|
-
child.props.onMouseEnter(e148);
|
|
3997
|
-
}
|
|
3998
|
-
if (!router) {
|
|
3999
|
-
return;
|
|
4000
|
-
}
|
|
4001
|
-
prefetch(router, href, as, {
|
|
4002
|
-
locale,
|
|
4003
|
-
priority: true,
|
|
4004
|
-
// @see {https://github.com/vercel/next.js/discussions/40268?sort=top#discussioncomment-3572642}
|
|
4005
|
-
bypassPrefetchedCheck: true
|
|
4006
|
-
});
|
|
4007
|
-
},
|
|
4008
|
-
onTouchStart: process.env.__NEXT_LINK_NO_TOUCH_START ? void 0 : function onTouchStart(e148) {
|
|
4009
|
-
if (!legacyBehavior && typeof onTouchStartProp === "function") {
|
|
4010
|
-
onTouchStartProp(e148);
|
|
4011
|
-
}
|
|
4012
|
-
if (legacyBehavior && child.props && typeof child.props.onTouchStart === "function") {
|
|
4013
|
-
child.props.onTouchStart(e148);
|
|
4014
|
-
}
|
|
4015
|
-
if (!router) {
|
|
4016
|
-
return;
|
|
4017
|
-
}
|
|
4018
|
-
prefetch(router, href, as, {
|
|
4019
|
-
locale,
|
|
4020
|
-
priority: true,
|
|
4021
|
-
// @see {https://github.com/vercel/next.js/discussions/40268?sort=top#discussioncomment-3572642}
|
|
4022
|
-
bypassPrefetchedCheck: true
|
|
4023
|
-
});
|
|
4024
|
-
}
|
|
4025
|
-
};
|
|
4026
|
-
if ((0, _utils.isAbsoluteUrl)(as)) {
|
|
4027
|
-
childProps.href = as;
|
|
4028
|
-
} else if (!legacyBehavior || passHref || child.type === "a" && !("href" in child.props)) {
|
|
4029
|
-
const curLocale = typeof locale !== "undefined" ? locale : router?.locale;
|
|
4030
|
-
const localeDomain = router?.isLocaleDomain && (0, _getdomainlocale.getDomainLocale)(as, curLocale, router?.locales, router?.domainLocales);
|
|
4031
|
-
childProps.href = localeDomain || (0, _addbasepath.addBasePath)((0, _addlocale.addLocale)(as, curLocale, router?.defaultLocale));
|
|
4032
|
-
}
|
|
4033
|
-
if (legacyBehavior) {
|
|
4034
|
-
if (process.env.NODE_ENV === "development") {
|
|
4035
|
-
const { errorOnce } = require_error_once();
|
|
4036
|
-
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");
|
|
4037
|
-
}
|
|
4038
|
-
return /* @__PURE__ */ _react.default.cloneElement(child, childProps);
|
|
4039
|
-
}
|
|
4040
|
-
return /* @__PURE__ */ (0, _jsxruntime.jsx)("a", {
|
|
4041
|
-
...restProps,
|
|
4042
|
-
...childProps,
|
|
4043
|
-
children
|
|
4044
|
-
});
|
|
4045
|
-
});
|
|
4046
|
-
var LinkStatusContext = /* @__PURE__ */ (0, _react.createContext)({
|
|
4047
|
-
// We do not support link status in the Pages Router, so we always return false
|
|
4048
|
-
pending: false
|
|
4049
|
-
});
|
|
4050
|
-
var useLinkStatus = () => {
|
|
4051
|
-
return (0, _react.useContext)(LinkStatusContext);
|
|
4052
|
-
};
|
|
4053
|
-
var _default = Link2;
|
|
4054
|
-
if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
|
|
4055
|
-
Object.defineProperty(exports.default, "__esModule", { value: true });
|
|
4056
|
-
Object.assign(exports.default, exports);
|
|
4057
|
-
module.exports = exports.default;
|
|
4058
|
-
}
|
|
4059
|
-
}
|
|
4060
|
-
});
|
|
4061
|
-
|
|
4062
|
-
// ../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/link.js
|
|
4063
|
-
var require_link2 = __commonJS({
|
|
4064
|
-
"../../node_modules/.bun/next@16.3.0+005eabf3d8b6ef06/node_modules/next/link.js"(exports, module) {
|
|
4065
|
-
"use strict";
|
|
4066
|
-
module.exports = require_link();
|
|
4067
|
-
}
|
|
4068
|
-
});
|
|
7
|
+
} from "./chunk-WF2OQH7R.js";
|
|
4069
8
|
|
|
4070
9
|
// ../backend/convex/shared/support.ts
|
|
4071
10
|
var ATTACHMENT_MAX_BYTES = 25 * 1024 * 1024;
|
|
@@ -9111,6 +5050,32 @@ function useTypingSignal(onChange) {
|
|
|
9111
5050
|
return { ping, stop, settle };
|
|
9112
5051
|
}
|
|
9113
5052
|
|
|
5053
|
+
// ../../apps/web/src/components/brand-art.ts
|
|
5054
|
+
var BRAND_INK = "#191919";
|
|
5055
|
+
var LOGO = {
|
|
5056
|
+
viewBox: "0 0 58 58",
|
|
5057
|
+
paths: [
|
|
5058
|
+
"M48.9788 0H8.97304C4.01742 0 0 4.11877 0 9.22508V20.7384C0 21.5573 0.577354 22.0631 1.37122 21.8223L46.068 10.1885C47.2227 9.87541 47.8963 10.7666 47.5595 11.9228L35.8922 56.5789C35.6757 57.446 36.2049 58 37.0709 58H48.7383C53.7661 58 58 53.6885 58 48.799V9.22508C58 4.11877 53.9585 0 48.9788 0Z",
|
|
5059
|
+
"M0 26.976V49.0151C0 53.9287 3.99336 57.9993 8.97304 57.9993H30.8884C31.7545 57.9993 32.1634 57.2767 31.9229 56.4337L28.579 44.3182C28.4347 43.8606 28.4587 43.4511 28.6993 42.9935L39.3803 21.5084C39.9818 20.3041 38.5384 19.4129 37.6723 20.3282L10.4164 47.3531C9.64662 48.1721 8.41974 47.2327 8.85276 46.1488L13.9527 30.9744C14.2173 30.1073 13.8565 29.2642 12.8221 29.0716L1.4915 25.9644C0.60141 25.6513 0 26.133 0 26.976Z"
|
|
5060
|
+
]
|
|
5061
|
+
};
|
|
5062
|
+
var WORDMARK = {
|
|
5063
|
+
viewBox: "0 0 253 58",
|
|
5064
|
+
width: 253,
|
|
5065
|
+
height: 58,
|
|
5066
|
+
paths: [
|
|
5067
|
+
"M10.1999 2.52174L29.0138 35.0522L47.8637 2.52174H57.8834V56.9913H47.7916V21.1106L33.1586 46.2199H24.6527L9.98362 20.9665V56.9913H0V2.52174H10.1999Z",
|
|
5068
|
+
"M102.616 40.6H71.5115C72.1363 43.4099 73.5058 45.5834 75.6203 47.1205C77.7588 48.6335 80.3778 49.3901 83.4775 49.3901C85.664 49.3901 87.6823 48.9458 89.5325 48.0571C91.4067 47.1445 92.8363 45.9317 93.8215 44.4186L101.57 49.318C99.8165 51.9598 97.3176 54.0613 94.0738 55.6224C90.83 57.2075 87.2979 58 83.4775 58C79.2966 58 75.5362 57.0874 72.1963 55.2621C68.8805 53.4609 66.2975 50.9752 64.4473 47.805C62.6212 44.6108 61.7081 41.0563 61.7081 37.1416C61.7081 34.2116 62.2247 31.4617 63.2579 28.8919C64.3152 26.2981 65.7448 24.0766 67.5469 22.2273C69.349 20.3781 71.5235 18.9251 74.0705 17.8683C76.6175 16.7876 79.3326 16.2472 82.216 16.2472C88.1509 16.2472 93.0526 18.1085 96.9211 21.8311C100.814 25.5536 102.76 30.3329 102.76 36.1689C102.76 36.8654 102.712 38.3424 102.616 40.6ZM71.5115 33.5031H93.0646C92.8003 30.8373 91.695 28.6998 89.7487 27.0907C87.8265 25.4816 85.3396 24.677 82.2881 24.677C79.5969 24.677 77.2662 25.4576 75.2959 27.0186C73.3497 28.5797 72.0882 30.7412 71.5115 33.5031Z",
|
|
5069
|
+
"M136.608 1.54907H146.735V56.9913H136.608V51.3714C135.286 53.5329 133.508 55.1781 131.273 56.3068C129.039 57.4356 126.516 58 123.705 58C118.202 58 113.601 55.9946 109.901 51.9839C106.2 47.9731 104.35 43.0257 104.35 37.1416C104.326 34.2836 104.807 31.5578 105.792 28.964C106.777 26.3702 108.122 24.1366 109.828 22.2634C111.558 20.366 113.625 18.877 116.028 17.7963C118.454 16.7155 121.013 16.1992 123.705 16.2472C126.516 16.2472 129.039 16.8116 131.273 17.9404C133.508 19.0451 135.286 20.6663 136.608 22.8037V1.54907ZM133.436 45.8957C135.55 43.6861 136.608 40.7681 136.608 37.1416C136.608 33.5151 135.55 30.5971 133.436 28.3876C131.345 26.154 128.642 25.0373 125.326 25.0373C122.011 25.0373 119.271 26.1901 117.109 28.4957C115.042 30.7772 114.009 33.6592 114.009 37.1416C114.009 40.6 115.067 43.482 117.181 45.7876C119.295 48.0692 122.011 49.2099 125.326 49.2099C128.642 49.2099 131.345 48.1052 133.436 45.8957Z",
|
|
5070
|
+
"M150.957 5.98012C150.957 4.29896 151.557 2.88199 152.759 1.72919C153.984 0.576398 155.486 0 157.264 0C159.018 0 160.496 0.588406 161.697 1.76522C162.923 2.91801 163.535 4.32298 163.535 5.98012C163.535 7.70932 162.935 9.1383 161.733 10.2671C160.556 11.3959 159.066 11.9602 157.264 11.9602C155.462 11.9602 153.96 11.3959 152.759 10.2671C151.557 9.1383 150.957 7.70932 150.957 5.98012ZM162.274 17.2919V56.9913H152.218V17.2919H162.274Z",
|
|
5071
|
+
"M198.176 17.2919H208.304V56.9913H198.176V51.3714C196.854 53.5329 195.076 55.1781 192.842 56.3068C190.607 57.4356 188.084 58 185.273 58C179.77 58 175.169 55.9946 171.469 51.9839C167.768 47.9731 165.918 43.0257 165.918 37.1416C165.894 34.2836 166.375 31.5578 167.36 28.964C168.345 26.3702 169.691 24.1366 171.397 22.2634C173.127 20.366 175.193 18.877 177.596 17.7963C180.023 16.7155 182.582 16.1992 185.273 16.2472C188.084 16.2472 190.607 16.8116 192.842 17.9404C195.076 19.0451 196.854 20.6663 198.176 22.8037V17.2919ZM195.004 45.8957C197.119 43.6861 198.176 40.7681 198.176 37.1416C198.176 33.5151 197.119 30.5971 195.004 28.3876C192.914 26.154 190.211 25.0373 186.895 25.0373C183.579 25.0373 180.84 26.1901 178.677 28.4957C176.611 30.7772 175.578 33.6592 175.578 37.1416C175.578 40.6 176.635 43.482 178.749 45.7876C180.864 48.0692 183.579 49.2099 186.895 49.2099C190.211 49.2099 192.914 48.1052 195.004 45.8957Z",
|
|
5072
|
+
"M253 34.5478V56.9913H242.872V35.2683C242.872 31.882 242.115 29.3362 240.602 27.6311C239.088 25.9019 236.865 25.0373 233.934 25.0373C231.002 25.0373 228.588 26.082 226.689 28.1714C224.791 30.2369 223.842 32.9267 223.842 36.241V56.9913H213.786V17.2919H223.842V22.9478C224.995 20.8824 226.665 19.2493 228.852 18.0484C231.062 16.8476 233.549 16.2472 236.313 16.2472C241.503 16.2472 245.575 17.8563 248.531 21.0745C251.51 24.2928 253 28.7839 253 34.5478Z"
|
|
5073
|
+
]
|
|
5074
|
+
};
|
|
5075
|
+
var LOGO_MASK_URL = `url("data:image/svg+xml,${encodeURIComponent(
|
|
5076
|
+
`<svg xmlns="http://www.w3.org/2000/svg" viewBox="${LOGO.viewBox}">` + LOGO.paths.map((d5) => `<path d="${d5}"/>`).join("") + `</svg>`
|
|
5077
|
+
)}")`;
|
|
5078
|
+
|
|
9114
5079
|
// ../../apps/web/src/components/brand.tsx
|
|
9115
5080
|
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
9116
5081
|
var INVERT_IN_DARK = "dark:invert";
|
|
@@ -9119,15 +5084,15 @@ function Wordmark({
|
|
|
9119
5084
|
className = ""
|
|
9120
5085
|
}) {
|
|
9121
5086
|
return /* @__PURE__ */ jsx9(
|
|
9122
|
-
|
|
5087
|
+
"svg",
|
|
9123
5088
|
{
|
|
9124
|
-
|
|
9125
|
-
alt: "Median",
|
|
5089
|
+
viewBox: WORDMARK.viewBox,
|
|
9126
5090
|
width,
|
|
9127
|
-
height: Math.round(width *
|
|
5091
|
+
height: Math.round(width * WORDMARK.height / WORDMARK.width),
|
|
5092
|
+
role: "img",
|
|
5093
|
+
"aria-label": "Median",
|
|
9128
5094
|
className: `${INVERT_IN_DARK} ${className}`,
|
|
9129
|
-
|
|
9130
|
-
priority: true
|
|
5095
|
+
children: WORDMARK.paths.map((d5) => /* @__PURE__ */ jsx9("path", { d: d5, fill: BRAND_INK }, d5))
|
|
9131
5096
|
}
|
|
9132
5097
|
);
|
|
9133
5098
|
}
|
|
@@ -9136,15 +5101,14 @@ function Logo({
|
|
|
9136
5101
|
className = ""
|
|
9137
5102
|
}) {
|
|
9138
5103
|
return /* @__PURE__ */ jsx9(
|
|
9139
|
-
|
|
5104
|
+
"svg",
|
|
9140
5105
|
{
|
|
9141
|
-
|
|
9142
|
-
alt: "",
|
|
5106
|
+
viewBox: LOGO.viewBox,
|
|
9143
5107
|
width: size,
|
|
9144
5108
|
height: size,
|
|
5109
|
+
"aria-hidden": true,
|
|
9145
5110
|
className: `${INVERT_IN_DARK} ${className}`,
|
|
9146
|
-
|
|
9147
|
-
priority: true
|
|
5111
|
+
children: LOGO.paths.map((d5) => /* @__PURE__ */ jsx9("path", { d: d5, fill: BRAND_INK }, d5))
|
|
9148
5112
|
}
|
|
9149
5113
|
);
|
|
9150
5114
|
}
|
|
@@ -9698,11 +5662,11 @@ function WidgetLoading() {
|
|
|
9698
5662
|
role: "status",
|
|
9699
5663
|
"aria-label": "Loading the conversation",
|
|
9700
5664
|
style: {
|
|
9701
|
-
maskImage:
|
|
5665
|
+
maskImage: LOGO_MASK_URL,
|
|
9702
5666
|
maskSize: "contain",
|
|
9703
5667
|
maskRepeat: "no-repeat",
|
|
9704
5668
|
maskPosition: "center",
|
|
9705
|
-
WebkitMaskImage:
|
|
5669
|
+
WebkitMaskImage: LOGO_MASK_URL,
|
|
9706
5670
|
WebkitMaskSize: "contain",
|
|
9707
5671
|
WebkitMaskRepeat: "no-repeat",
|
|
9708
5672
|
WebkitMaskPosition: "center",
|
|
@@ -9967,8 +5931,22 @@ function WidgetBubble({
|
|
|
9967
5931
|
);
|
|
9968
5932
|
}
|
|
9969
5933
|
|
|
9970
|
-
//
|
|
9971
|
-
|
|
5934
|
+
// src/next-link-shim.tsx
|
|
5935
|
+
import { forwardRef as forwardRef91 } from "react";
|
|
5936
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
5937
|
+
var Link = forwardRef91(function Link2({
|
|
5938
|
+
prefetch: _prefetch,
|
|
5939
|
+
replace: _replace,
|
|
5940
|
+
scroll: _scroll,
|
|
5941
|
+
shallow: _shallow,
|
|
5942
|
+
passHref: _passHref,
|
|
5943
|
+
legacyBehavior: _legacyBehavior,
|
|
5944
|
+
locale: _locale,
|
|
5945
|
+
...props
|
|
5946
|
+
}, ref) {
|
|
5947
|
+
return /* @__PURE__ */ jsx23("a", { ref, ...props });
|
|
5948
|
+
});
|
|
5949
|
+
var next_link_shim_default = Link;
|
|
9972
5950
|
|
|
9973
5951
|
// ../../apps/web/src/lib/links.ts
|
|
9974
5952
|
function staysInApp(href) {
|
|
@@ -9976,16 +5954,16 @@ function staysInApp(href) {
|
|
|
9976
5954
|
}
|
|
9977
5955
|
|
|
9978
5956
|
// ../../apps/web/src/components/ui/message-markdown.tsx
|
|
9979
|
-
import { jsx as
|
|
5957
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
9980
5958
|
var LINK = "font-medium break-all underline decoration-foreground/60 decoration-1 underline-offset-[3px] transition-colors hover:decoration-foreground";
|
|
9981
|
-
var Flattened = ({ children }) => /* @__PURE__ */
|
|
5959
|
+
var Flattened = ({ children }) => /* @__PURE__ */ jsx24("p", { className: "font-semibold", children });
|
|
9982
5960
|
var RANKS = {
|
|
9983
|
-
h1: ({ children }) => /* @__PURE__ */
|
|
9984
|
-
h2: ({ children }) => /* @__PURE__ */
|
|
9985
|
-
h3: ({ children }) => /* @__PURE__ */
|
|
9986
|
-
h4: ({ children }) => /* @__PURE__ */
|
|
9987
|
-
h5: ({ children }) => /* @__PURE__ */
|
|
9988
|
-
h6: ({ children }) => /* @__PURE__ */
|
|
5961
|
+
h1: ({ children }) => /* @__PURE__ */ jsx24("p", { className: "mt-2 text-[1.25em] leading-tight font-semibold first:mt-0", children }),
|
|
5962
|
+
h2: ({ children }) => /* @__PURE__ */ jsx24("p", { className: "mt-2 text-[1.1em] leading-snug font-semibold first:mt-0", children }),
|
|
5963
|
+
h3: ({ children }) => /* @__PURE__ */ jsx24("p", { className: "mt-1 font-semibold first:mt-0", children }),
|
|
5964
|
+
h4: ({ children }) => /* @__PURE__ */ jsx24("p", { className: "font-semibold", children }),
|
|
5965
|
+
h5: ({ children }) => /* @__PURE__ */ jsx24("p", { className: "font-semibold", children }),
|
|
5966
|
+
h6: ({ children }) => /* @__PURE__ */ jsx24("p", { className: "font-semibold", children })
|
|
9989
5967
|
};
|
|
9990
5968
|
var FLAT = {
|
|
9991
5969
|
h1: Flattened,
|
|
@@ -9996,20 +5974,20 @@ var FLAT = {
|
|
|
9996
5974
|
h6: Flattened
|
|
9997
5975
|
};
|
|
9998
5976
|
var COMPONENTS = {
|
|
9999
|
-
p: ({ children }) => /* @__PURE__ */
|
|
5977
|
+
p: ({ children }) => /* @__PURE__ */ jsx24("p", { className: "break-words", children }),
|
|
10000
5978
|
/** A link, and whether it leaves. See `lib/links.ts` for the rule. */
|
|
10001
5979
|
a: ({ children, href }) => {
|
|
10002
5980
|
const to = href ?? "";
|
|
10003
|
-
return staysInApp(to) ? /* @__PURE__ */
|
|
5981
|
+
return staysInApp(to) ? /* @__PURE__ */ jsx24(next_link_shim_default, { href: to, className: LINK, children }) : /* @__PURE__ */ jsx24("a", { href: to, target: "_blank", rel: "noopener noreferrer", className: LINK, children });
|
|
10004
5982
|
},
|
|
10005
|
-
ul: ({ children }) => /* @__PURE__ */
|
|
10006
|
-
ol: ({ children, start }) => /* @__PURE__ */
|
|
10007
|
-
blockquote: ({ children }) => /* @__PURE__ */
|
|
5983
|
+
ul: ({ children }) => /* @__PURE__ */ jsx24("ul", { className: "list-disc space-y-1 pl-5", children }),
|
|
5984
|
+
ol: ({ children, start }) => /* @__PURE__ */ jsx24("ol", { start, className: "list-decimal space-y-1 pl-5", children }),
|
|
5985
|
+
blockquote: ({ children }) => /* @__PURE__ */ jsx24("blockquote", { className: "border-l-2 border-foreground/20 pl-3 text-foreground/80", children }),
|
|
10008
5986
|
// Inline code only. Streamdown's own bg-muted chip vanishes inside a
|
|
10009
5987
|
// muted bubble, so the chip leans on the text colour instead. Fenced code
|
|
10010
5988
|
// is left alone: Streamdown's block, with its language header and
|
|
10011
5989
|
// highlighting, is the proper thing and needs no help.
|
|
10012
|
-
inlineCode: ({ children }) => /* @__PURE__ */
|
|
5990
|
+
inlineCode: ({ children }) => /* @__PURE__ */ jsx24("code", { className: "rounded bg-foreground/10 px-1 py-0.5 font-mono text-[0.85em]", children }),
|
|
10013
5991
|
// A table is an object on the page rather than a stripe across it, so it
|
|
10014
5992
|
// is boxed and it hugs what is in it. `w-fit` is the whole of that: two
|
|
10015
5993
|
// columns of single digits stay two columns of single digits instead of
|
|
@@ -10020,19 +5998,19 @@ var COMPONENTS = {
|
|
|
10020
5998
|
// being left to Streamdown. Its defaults are sized for a document with a
|
|
10021
5999
|
// table in it: a grey header band, sm text, px-4 cells. In a thread that
|
|
10022
6000
|
// is louder than the answer around it.
|
|
10023
|
-
table: ({ children }) => /* @__PURE__ */
|
|
10024
|
-
thead: ({ children }) => /* @__PURE__ */
|
|
6001
|
+
table: ({ children }) => /* @__PURE__ */ jsx24("div", { className: "w-fit max-w-full overflow-x-auto rounded-lg border", children: /* @__PURE__ */ jsx24("table", { className: "w-full text-left text-xs", children }) }),
|
|
6002
|
+
thead: ({ children }) => /* @__PURE__ */ jsx24("thead", { className: "bg-muted/50", children }),
|
|
10025
6003
|
// The line under the head belongs to the head. Between rows it belongs to
|
|
10026
6004
|
// the row above, and the last one has the box's own edge under it already.
|
|
10027
|
-
tr: ({ children }) => /* @__PURE__ */
|
|
10028
|
-
th: ({ children }) => /* @__PURE__ */
|
|
6005
|
+
tr: ({ children }) => /* @__PURE__ */ jsx24("tr", { className: "[&:not(:last-child)>td]:border-b", children }),
|
|
6006
|
+
th: ({ children }) => /* @__PURE__ */ jsx24("th", { className: "border-b px-3 py-2 font-medium whitespace-nowrap", children }),
|
|
10029
6007
|
// Figures line up under each other, and a cell with a paragraph in it sits
|
|
10030
6008
|
// against the top of its row rather than floating in the middle of one.
|
|
10031
|
-
td: ({ children }) => /* @__PURE__ */
|
|
10032
|
-
hr: () => /* @__PURE__ */
|
|
6009
|
+
td: ({ children }) => /* @__PURE__ */ jsx24("td", { className: "px-3 py-2 align-top tabular-nums", children }),
|
|
6010
|
+
hr: () => /* @__PURE__ */ jsx24("hr", { className: "border-foreground/15" }),
|
|
10033
6011
|
img: ({ src, alt }) => (
|
|
10034
6012
|
// eslint-disable-next-line @next/next/no-img-element -- arbitrary remote URL, nothing for the optimizer to do.
|
|
10035
|
-
/* @__PURE__ */
|
|
6013
|
+
/* @__PURE__ */ jsx24("img", { src, alt: alt ?? "", className: "max-w-full rounded-lg" })
|
|
10036
6014
|
)
|
|
10037
6015
|
};
|
|
10038
6016
|
function MessageMarkdown({
|
|
@@ -10040,7 +6018,7 @@ function MessageMarkdown({
|
|
|
10040
6018
|
className,
|
|
10041
6019
|
headings = "flatten"
|
|
10042
6020
|
}) {
|
|
10043
|
-
return /* @__PURE__ */
|
|
6021
|
+
return /* @__PURE__ */ jsx24(
|
|
10044
6022
|
Qs,
|
|
10045
6023
|
{
|
|
10046
6024
|
className: cn(
|
|
@@ -10060,24 +6038,24 @@ function MessageMarkdown({
|
|
|
10060
6038
|
}
|
|
10061
6039
|
|
|
10062
6040
|
// ../../apps/web/src/components/support-widget/widget-message-body.tsx
|
|
10063
|
-
import { jsx as
|
|
6041
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
10064
6042
|
function WidgetMessageBody({
|
|
10065
6043
|
body,
|
|
10066
6044
|
sender
|
|
10067
6045
|
}) {
|
|
10068
6046
|
if (sender === "visitor") {
|
|
10069
|
-
return /* @__PURE__ */
|
|
6047
|
+
return /* @__PURE__ */ jsx25("p", { className: "break-words whitespace-pre-line", children: body });
|
|
10070
6048
|
}
|
|
10071
|
-
return /* @__PURE__ */
|
|
6049
|
+
return /* @__PURE__ */ jsx25(MessageMarkdown, { body });
|
|
10072
6050
|
}
|
|
10073
6051
|
|
|
10074
6052
|
// ../../apps/web/src/components/support-widget/widget-typing.tsx
|
|
10075
|
-
import { jsx as
|
|
6053
|
+
import { jsx as jsx26, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
10076
6054
|
var DOTS = [0, 160, 320];
|
|
10077
6055
|
function WidgetTyping({ label }) {
|
|
10078
6056
|
return /* @__PURE__ */ jsxs10("span", { className: "flex items-center gap-1 py-1.5", children: [
|
|
10079
|
-
/* @__PURE__ */
|
|
10080
|
-
DOTS.map((delay) => /* @__PURE__ */
|
|
6057
|
+
/* @__PURE__ */ jsx26("span", { className: "sr-only", children: label }),
|
|
6058
|
+
DOTS.map((delay) => /* @__PURE__ */ jsx26(
|
|
10081
6059
|
"span",
|
|
10082
6060
|
{
|
|
10083
6061
|
"aria-hidden": true,
|
|
@@ -10090,7 +6068,7 @@ function WidgetTyping({ label }) {
|
|
|
10090
6068
|
}
|
|
10091
6069
|
|
|
10092
6070
|
// ../../apps/web/src/components/support-widget/widget-message.tsx
|
|
10093
|
-
import { Fragment as Fragment91, jsx as
|
|
6071
|
+
import { Fragment as Fragment91, jsx as jsx27, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
10094
6072
|
var BUBBLE = "max-w-[80%] rounded-2xl px-3.5 py-2 text-sm";
|
|
10095
6073
|
var VISITOR_BUBBLE = "bg-[color-mix(in_oklch,var(--muted),var(--foreground)_12%)]";
|
|
10096
6074
|
var ARRIVES = "animate-in fade-in-0 slide-in-from-bottom-1 duration-200 ease-out motion-reduce:animate-none";
|
|
@@ -10098,21 +6076,21 @@ function WidgetDivider({ message }) {
|
|
|
10098
6076
|
const label = message.startsConversation ? "New conversation" : message.dayLabel;
|
|
10099
6077
|
if (!label) return null;
|
|
10100
6078
|
return /* @__PURE__ */ jsxs11("div", { className: "flex items-center gap-3 py-1", children: [
|
|
10101
|
-
/* @__PURE__ */
|
|
10102
|
-
/* @__PURE__ */
|
|
10103
|
-
/* @__PURE__ */
|
|
6079
|
+
/* @__PURE__ */ jsx27("span", { className: "h-px flex-1 bg-border" }),
|
|
6080
|
+
/* @__PURE__ */ jsx27("span", { className: "text-xs text-muted-foreground", children: label }),
|
|
6081
|
+
/* @__PURE__ */ jsx27("span", { className: "h-px flex-1 bg-border" })
|
|
10104
6082
|
] });
|
|
10105
6083
|
}
|
|
10106
6084
|
function WidgetMessage({
|
|
10107
6085
|
message,
|
|
10108
6086
|
group = LONE_MESSAGE
|
|
10109
6087
|
}) {
|
|
10110
|
-
return message.sender === "visitor" ? /* @__PURE__ */
|
|
6088
|
+
return message.sender === "visitor" ? /* @__PURE__ */ jsx27(VisitorMessage, { message }) : /* @__PURE__ */ jsx27(AgentMessage, { message, group });
|
|
10111
6089
|
}
|
|
10112
6090
|
function BubbleContent({ message }) {
|
|
10113
6091
|
const hasAttachments = (message.attachments?.length ?? 0) > 0;
|
|
10114
6092
|
if (message.pending) {
|
|
10115
|
-
return /* @__PURE__ */
|
|
6093
|
+
return /* @__PURE__ */ jsx27(
|
|
10116
6094
|
WidgetTyping,
|
|
10117
6095
|
{
|
|
10118
6096
|
label: `${message.agent?.name ?? "Support"} is writing a reply`
|
|
@@ -10120,12 +6098,12 @@ function BubbleContent({ message }) {
|
|
|
10120
6098
|
);
|
|
10121
6099
|
}
|
|
10122
6100
|
return /* @__PURE__ */ jsxs11(Fragment91, { children: [
|
|
10123
|
-
hasAttachments && /* @__PURE__ */
|
|
10124
|
-
message.body && /* @__PURE__ */
|
|
6101
|
+
hasAttachments && /* @__PURE__ */ jsx27(WidgetAttachments, { attachments: message.attachments ?? [] }),
|
|
6102
|
+
message.body && /* @__PURE__ */ jsx27(WidgetMessageBody, { body: message.body, sender: message.sender })
|
|
10125
6103
|
] });
|
|
10126
6104
|
}
|
|
10127
6105
|
function VisitorMessage({ message }) {
|
|
10128
|
-
return /* @__PURE__ */
|
|
6106
|
+
return /* @__PURE__ */ jsx27("div", { className: cn("flex justify-end", ARRIVES), children: /* @__PURE__ */ jsx27(WidgetBubble, { morphKey: "settled", className: cn(BUBBLE, VISITOR_BUBBLE), children: /* @__PURE__ */ jsx27(BubbleContent, { message }) }) });
|
|
10129
6107
|
}
|
|
10130
6108
|
function AgentMessage({
|
|
10131
6109
|
message,
|
|
@@ -10141,18 +6119,18 @@ function AgentMessage({
|
|
|
10141
6119
|
/* @__PURE__ */ jsxs11("div", { className: cn("flex flex-col items-start gap-1", ARRIVES), children: [
|
|
10142
6120
|
group.isFirst && /* @__PURE__ */ jsxs11("div", { className: "flex max-w-full items-center gap-1.5 px-0.5", children: [
|
|
10143
6121
|
agent && /* @__PURE__ */ jsxs11(Fragment91, { children: [
|
|
10144
|
-
/* @__PURE__ */
|
|
10145
|
-
/* @__PURE__ */
|
|
10146
|
-
agent.kind === "ai" && /* @__PURE__ */
|
|
6122
|
+
/* @__PURE__ */ jsx27(WidgetAvatar, { agent, className: "size-5 rounded-md" }),
|
|
6123
|
+
/* @__PURE__ */ jsx27("span", { className: "truncate text-xs font-medium", children: agent.name }),
|
|
6124
|
+
agent.kind === "ai" && /* @__PURE__ */ jsx27(Badge, { variant: "muted", className: "shrink-0 rounded-md px-1", children: "AI" })
|
|
10147
6125
|
] }),
|
|
10148
|
-
!message.pending && /* @__PURE__ */
|
|
6126
|
+
!message.pending && /* @__PURE__ */ jsx27("span", { className: "shrink-0 text-xs text-muted-foreground tabular-nums", children: message.time })
|
|
10149
6127
|
] }),
|
|
10150
|
-
/* @__PURE__ */
|
|
6128
|
+
/* @__PURE__ */ jsx27(
|
|
10151
6129
|
WidgetBubble,
|
|
10152
6130
|
{
|
|
10153
6131
|
morphKey: message.pending ? "pending" : `${message.body.length}:${message.attachments?.length ?? 0}`,
|
|
10154
6132
|
className: cn(BUBBLE, "bg-muted"),
|
|
10155
|
-
children: /* @__PURE__ */
|
|
6133
|
+
children: /* @__PURE__ */ jsx27(BubbleContent, { message })
|
|
10156
6134
|
}
|
|
10157
6135
|
)
|
|
10158
6136
|
] })
|
|
@@ -10163,7 +6141,7 @@ function AgentMessage({
|
|
|
10163
6141
|
import { useEffect as useEffect7, useRef as useRef9, useState as useState8 } from "react";
|
|
10164
6142
|
|
|
10165
6143
|
// ../../apps/web/src/components/ui/collapse.tsx
|
|
10166
|
-
import { jsx as
|
|
6144
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
10167
6145
|
var COLLAPSE_MS = 200;
|
|
10168
6146
|
function Collapse({
|
|
10169
6147
|
isOpen,
|
|
@@ -10171,7 +6149,7 @@ function Collapse({
|
|
|
10171
6149
|
children,
|
|
10172
6150
|
className
|
|
10173
6151
|
}) {
|
|
10174
|
-
return /* @__PURE__ */
|
|
6152
|
+
return /* @__PURE__ */ jsx28(
|
|
10175
6153
|
"div",
|
|
10176
6154
|
{
|
|
10177
6155
|
id,
|
|
@@ -10181,13 +6159,13 @@ function Collapse({
|
|
|
10181
6159
|
isOpen ? "grid-rows-[1fr] opacity-100" : "grid-rows-[0fr] opacity-0",
|
|
10182
6160
|
className
|
|
10183
6161
|
),
|
|
10184
|
-
children: /* @__PURE__ */
|
|
6162
|
+
children: /* @__PURE__ */ jsx28("div", { className: "overflow-hidden", children })
|
|
10185
6163
|
}
|
|
10186
6164
|
);
|
|
10187
6165
|
}
|
|
10188
6166
|
|
|
10189
6167
|
// ../../apps/web/src/components/support-widget/widget-rating.tsx
|
|
10190
|
-
import { jsx as
|
|
6168
|
+
import { jsx as jsx29, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
10191
6169
|
var STARS = Array.from({ length: RATING_MAX_STARS }, (_, index) => index + 1);
|
|
10192
6170
|
var THANKS_MS = 1400;
|
|
10193
6171
|
var STAR_STAGGER_MS = 40;
|
|
@@ -10241,11 +6219,11 @@ function WidgetRating({ rating }) {
|
|
|
10241
6219
|
setIsDone(true);
|
|
10242
6220
|
later(THANKS_MS, leave);
|
|
10243
6221
|
}
|
|
10244
|
-
return /* @__PURE__ */
|
|
10245
|
-
/* @__PURE__ */
|
|
6222
|
+
return /* @__PURE__ */ jsx29(Collapse, { isOpen, className: "shrink-0", children: /* @__PURE__ */ jsxs12("div", { className: "mx-3 mb-2 rounded-xl border bg-muted/40 px-3 dark:bg-muted/20", children: [
|
|
6223
|
+
/* @__PURE__ */ jsx29(Collapse, { isOpen: !isDone, children: /* @__PURE__ */ jsxs12("div", { className: "py-2.5", children: [
|
|
10246
6224
|
/* @__PURE__ */ jsxs12("div", { className: "flex items-start justify-between gap-2", children: [
|
|
10247
|
-
/* @__PURE__ */
|
|
10248
|
-
/* @__PURE__ */
|
|
6225
|
+
/* @__PURE__ */ jsx29("p", { className: "text-sm font-medium", children: picked === null ? "How did we do?" : "Thanks. Tell us more?" }),
|
|
6226
|
+
/* @__PURE__ */ jsx29(
|
|
10249
6227
|
WidgetButton,
|
|
10250
6228
|
{
|
|
10251
6229
|
type: "button",
|
|
@@ -10258,14 +6236,14 @@ function WidgetRating({ rating }) {
|
|
|
10258
6236
|
}
|
|
10259
6237
|
)
|
|
10260
6238
|
] }),
|
|
10261
|
-
/* @__PURE__ */
|
|
6239
|
+
/* @__PURE__ */ jsx29(
|
|
10262
6240
|
"div",
|
|
10263
6241
|
{
|
|
10264
6242
|
role: "radiogroup",
|
|
10265
6243
|
"aria-label": "How did we do?",
|
|
10266
6244
|
className: "flex items-center justify-center gap-1 pt-1.5",
|
|
10267
6245
|
onMouseLeave: () => setHovered(null),
|
|
10268
|
-
children: STARS.map((value) => /* @__PURE__ */
|
|
6246
|
+
children: STARS.map((value) => /* @__PURE__ */ jsx29(
|
|
10269
6247
|
"button",
|
|
10270
6248
|
{
|
|
10271
6249
|
type: "button",
|
|
@@ -10283,7 +6261,7 @@ function WidgetRating({ rating }) {
|
|
|
10283
6261
|
"active:scale-95 disabled:pointer-events-none",
|
|
10284
6262
|
"motion-reduce:transition-none"
|
|
10285
6263
|
),
|
|
10286
|
-
children: /* @__PURE__ */
|
|
6264
|
+
children: /* @__PURE__ */ jsx29(
|
|
10287
6265
|
Star,
|
|
10288
6266
|
{
|
|
10289
6267
|
style: {
|
|
@@ -10300,8 +6278,8 @@ function WidgetRating({ rating }) {
|
|
|
10300
6278
|
))
|
|
10301
6279
|
}
|
|
10302
6280
|
),
|
|
10303
|
-
/* @__PURE__ */
|
|
10304
|
-
/* @__PURE__ */
|
|
6281
|
+
/* @__PURE__ */ jsx29(Collapse, { isOpen: picked !== null, children: /* @__PURE__ */ jsxs12("div", { className: "flex flex-col gap-2 pt-2", children: [
|
|
6282
|
+
/* @__PURE__ */ jsx29(
|
|
10305
6283
|
Textarea,
|
|
10306
6284
|
{
|
|
10307
6285
|
value: feedback,
|
|
@@ -10317,7 +6295,7 @@ function WidgetRating({ rating }) {
|
|
|
10317
6295
|
)
|
|
10318
6296
|
}
|
|
10319
6297
|
),
|
|
10320
|
-
/* @__PURE__ */
|
|
6298
|
+
/* @__PURE__ */ jsx29(
|
|
10321
6299
|
WidgetButton,
|
|
10322
6300
|
{
|
|
10323
6301
|
type: "button",
|
|
@@ -10329,23 +6307,23 @@ function WidgetRating({ rating }) {
|
|
|
10329
6307
|
}
|
|
10330
6308
|
)
|
|
10331
6309
|
] }) }),
|
|
10332
|
-
/* @__PURE__ */
|
|
6310
|
+
/* @__PURE__ */ jsx29(Collapse, { isOpen: error !== null, children: /* @__PURE__ */ jsx29("p", { className: "pt-1.5 text-center text-xs text-destructive", children: error }) })
|
|
10333
6311
|
] }) }),
|
|
10334
|
-
/* @__PURE__ */
|
|
6312
|
+
/* @__PURE__ */ jsx29(Collapse, { isOpen: isDone, children: /* @__PURE__ */ jsx29("p", { className: "py-3 text-center text-sm font-medium", children: "Thanks for the feedback." }) })
|
|
10335
6313
|
] }) });
|
|
10336
6314
|
}
|
|
10337
6315
|
|
|
10338
6316
|
// ../../apps/web/src/components/support-widget/widget-status.tsx
|
|
10339
|
-
import { jsx as
|
|
6317
|
+
import { jsx as jsx30, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
10340
6318
|
function WidgetAwaitingHuman() {
|
|
10341
6319
|
return /* @__PURE__ */ jsxs13("p", { className: "flex animate-in items-center justify-center gap-1.5 px-4 pb-1 text-xs text-muted-foreground duration-200 ease-out fade-in-0 slide-in-from-bottom-1 motion-reduce:animate-none", children: [
|
|
10342
|
-
/* @__PURE__ */
|
|
6320
|
+
/* @__PURE__ */ jsx30(UserCircle, { "aria-hidden": true, className: "size-3.5" }),
|
|
10343
6321
|
"Waiting for a teammate"
|
|
10344
6322
|
] });
|
|
10345
6323
|
}
|
|
10346
6324
|
|
|
10347
6325
|
// ../../apps/web/src/components/support-widget/support-widget.tsx
|
|
10348
|
-
import { jsx as
|
|
6326
|
+
import { jsx as jsx31, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
10349
6327
|
function joinsPreviousTurn(message, previous) {
|
|
10350
6328
|
return !message.dayLabel && !message.startsConversation && message.sender === previous.sender && message.agent?.id === previous.agent?.id && withinRun(previous.sentAt, message.sentAt);
|
|
10351
6329
|
}
|
|
@@ -10384,7 +6362,7 @@ function SupportWidget({
|
|
|
10384
6362
|
className
|
|
10385
6363
|
),
|
|
10386
6364
|
children: [
|
|
10387
|
-
/* @__PURE__ */
|
|
6365
|
+
/* @__PURE__ */ jsx31(
|
|
10388
6366
|
WidgetHeader,
|
|
10389
6367
|
{
|
|
10390
6368
|
presence,
|
|
@@ -10395,10 +6373,10 @@ function SupportWidget({
|
|
|
10395
6373
|
isMoving
|
|
10396
6374
|
}
|
|
10397
6375
|
),
|
|
10398
|
-
isLoading ? /* @__PURE__ */
|
|
6376
|
+
isLoading ? /* @__PURE__ */ jsx31(WidgetLoading, {}) : isLocked ? (
|
|
10399
6377
|
/* After the loading rather than before it: the line names the host,
|
|
10400
6378
|
so it waits for the name the same as everything else does. */
|
|
10401
|
-
/* @__PURE__ */
|
|
6379
|
+
/* @__PURE__ */ jsx31(
|
|
10402
6380
|
WidgetLocked,
|
|
10403
6381
|
{
|
|
10404
6382
|
orgName: presence.name,
|
|
@@ -10406,7 +6384,7 @@ function SupportWidget({
|
|
|
10406
6384
|
showBadge
|
|
10407
6385
|
}
|
|
10408
6386
|
)
|
|
10409
|
-
) : /* @__PURE__ */
|
|
6387
|
+
) : /* @__PURE__ */ jsx31(
|
|
10410
6388
|
Conversation,
|
|
10411
6389
|
{
|
|
10412
6390
|
presence,
|
|
@@ -10443,7 +6421,7 @@ function Conversation({
|
|
|
10443
6421
|
}) {
|
|
10444
6422
|
const groups = groupMessages(messages, joinsPreviousTurn);
|
|
10445
6423
|
return /* @__PURE__ */ jsxs14("div", { className: "flex min-h-0 flex-1 flex-col animate-in fade-in-0 duration-500 ease-out motion-reduce:animate-none", children: [
|
|
10446
|
-
messages.length === 0 ? /* @__PURE__ */
|
|
6424
|
+
messages.length === 0 ? /* @__PURE__ */ jsx31(
|
|
10447
6425
|
WidgetEmpty,
|
|
10448
6426
|
{
|
|
10449
6427
|
team: presence.team,
|
|
@@ -10462,8 +6440,8 @@ function Conversation({
|
|
|
10462
6440
|
so a scroller left alone slides the newest message under the
|
|
10463
6441
|
composer and has to catch up afterwards. Following it is what the
|
|
10464
6442
|
scroller stops easing for, so this tracks frame by frame. */
|
|
10465
|
-
/* @__PURE__ */
|
|
10466
|
-
/* @__PURE__ */
|
|
6443
|
+
/* @__PURE__ */ jsx31(MessageScrollerProvider, { children: /* @__PURE__ */ jsxs14(MessageScroller, { className: "h-auto min-h-0 flex-1", children: [
|
|
6444
|
+
/* @__PURE__ */ jsx31(
|
|
10467
6445
|
MessageScrollerViewport,
|
|
10468
6446
|
{
|
|
10469
6447
|
role: "log",
|
|
@@ -10471,7 +6449,7 @@ function Conversation({
|
|
|
10471
6449
|
"aria-relevant": "additions",
|
|
10472
6450
|
"aria-label": "Conversation",
|
|
10473
6451
|
className: "px-3 py-2",
|
|
10474
|
-
children: /* @__PURE__ */
|
|
6452
|
+
children: /* @__PURE__ */ jsx31(
|
|
10475
6453
|
MessageScrollerContent,
|
|
10476
6454
|
{
|
|
10477
6455
|
ref: stackRef,
|
|
@@ -10485,8 +6463,8 @@ function Conversation({
|
|
|
10485
6463
|
groups[index].isFirst ? "pt-4" : "pt-1"
|
|
10486
6464
|
),
|
|
10487
6465
|
children: [
|
|
10488
|
-
/* @__PURE__ */
|
|
10489
|
-
/* @__PURE__ */
|
|
6466
|
+
/* @__PURE__ */ jsx31(WidgetDivider, { message }),
|
|
6467
|
+
/* @__PURE__ */ jsx31(WidgetMessage, { message, group: groups[index] })
|
|
10490
6468
|
]
|
|
10491
6469
|
},
|
|
10492
6470
|
message.id
|
|
@@ -10495,13 +6473,13 @@ function Conversation({
|
|
|
10495
6473
|
)
|
|
10496
6474
|
}
|
|
10497
6475
|
),
|
|
10498
|
-
/* @__PURE__ */
|
|
6476
|
+
/* @__PURE__ */ jsx31(MessageScrollerButton, {})
|
|
10499
6477
|
] }) })
|
|
10500
6478
|
),
|
|
10501
|
-
rating && /* @__PURE__ */
|
|
10502
|
-
awaitingHuman && /* @__PURE__ */
|
|
10503
|
-
notice && /* @__PURE__ */
|
|
10504
|
-
/* @__PURE__ */
|
|
6479
|
+
rating && /* @__PURE__ */ jsx31(WidgetRating, { rating }),
|
|
6480
|
+
awaitingHuman && /* @__PURE__ */ jsx31(WidgetAwaitingHuman, {}),
|
|
6481
|
+
notice && /* @__PURE__ */ jsx31("p", { className: "animate-in px-4 pb-1 text-center text-xs text-destructive fade-in duration-150", children: notice }),
|
|
6482
|
+
/* @__PURE__ */ jsx31(
|
|
10505
6483
|
WidgetComposer,
|
|
10506
6484
|
{
|
|
10507
6485
|
onSend,
|
|
@@ -10898,7 +6876,7 @@ function useWidgetSheet({
|
|
|
10898
6876
|
}
|
|
10899
6877
|
|
|
10900
6878
|
// ../../apps/web/src/components/support-widget/widget-launcher.tsx
|
|
10901
|
-
import { jsx as
|
|
6879
|
+
import { jsx as jsx32, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
10902
6880
|
var DEFAULT_WIDTH = "24rem";
|
|
10903
6881
|
var DEFAULT_HEIGHT = "34rem";
|
|
10904
6882
|
var DEFAULT_BUTTON_SIZE = "3.5rem";
|
|
@@ -11040,7 +7018,7 @@ function SupportLauncher({
|
|
|
11040
7018
|
className
|
|
11041
7019
|
),
|
|
11042
7020
|
children: [
|
|
11043
|
-
!isSheet && /* @__PURE__ */
|
|
7021
|
+
!isSheet && /* @__PURE__ */ jsx32("div", { "aria-hidden": true, className: "absolute inset-0 drop-shadow-xl", children: /* @__PURE__ */ jsx32(
|
|
11044
7022
|
"div",
|
|
11045
7023
|
{
|
|
11046
7024
|
style: shape(isOpen, buttonSize, drag.side, hasBubble),
|
|
@@ -11051,7 +7029,7 @@ function SupportLauncher({
|
|
|
11051
7029
|
)
|
|
11052
7030
|
}
|
|
11053
7031
|
) }),
|
|
11054
|
-
/* @__PURE__ */
|
|
7032
|
+
/* @__PURE__ */ jsx32(
|
|
11055
7033
|
"div",
|
|
11056
7034
|
{
|
|
11057
7035
|
ref: panelRef,
|
|
@@ -11070,7 +7048,7 @@ function SupportLauncher({
|
|
|
11070
7048
|
],
|
|
11071
7049
|
isOpen && "pointer-events-auto"
|
|
11072
7050
|
),
|
|
11073
|
-
children: /* @__PURE__ */
|
|
7051
|
+
children: /* @__PURE__ */ jsx32(
|
|
11074
7052
|
SupportWidget,
|
|
11075
7053
|
{
|
|
11076
7054
|
presence,
|
|
@@ -11163,8 +7141,8 @@ function SupportLauncher({
|
|
|
11163
7141
|
!isOpen && (drag.isMoving ? "cursor-grabbing" : "cursor-pointer active:scale-95")
|
|
11164
7142
|
),
|
|
11165
7143
|
children: [
|
|
11166
|
-
/* @__PURE__ */
|
|
11167
|
-
unreadCount > 0 && /* @__PURE__ */
|
|
7144
|
+
/* @__PURE__ */ jsx32(ChatCircleDots, { className: "size-6" }),
|
|
7145
|
+
unreadCount > 0 && /* @__PURE__ */ jsx32(
|
|
11168
7146
|
"span",
|
|
11169
7147
|
{
|
|
11170
7148
|
"aria-hidden": true,
|
|
@@ -11189,7 +7167,7 @@ function SupportLauncher({
|
|
|
11189
7167
|
// ../../apps/web/src/components/support-widget/widget-spotlight.tsx
|
|
11190
7168
|
import { useEffect as useEffect11, useRef as useRef12, useState as useState12 } from "react";
|
|
11191
7169
|
import { createPortal } from "react-dom";
|
|
11192
|
-
import { jsx as
|
|
7170
|
+
import { jsx as jsx33, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
11193
7171
|
var FIND_TIMEOUT_MS = 4e3;
|
|
11194
7172
|
var HOLD_MS = 2600;
|
|
11195
7173
|
var FADE_MS = 300;
|
|
@@ -11269,7 +7247,7 @@ function WidgetSpotlight({ selector }) {
|
|
|
11269
7247
|
style: { zIndex: LAYER, top: 0, left: 0 },
|
|
11270
7248
|
className: "pointer-events-none fixed",
|
|
11271
7249
|
children: [
|
|
11272
|
-
/* @__PURE__ */
|
|
7250
|
+
/* @__PURE__ */ jsx33(
|
|
11273
7251
|
"span",
|
|
11274
7252
|
{
|
|
11275
7253
|
className: [
|
|
@@ -11280,7 +7258,7 @@ function WidgetSpotlight({ selector }) {
|
|
|
11280
7258
|
].join(" ")
|
|
11281
7259
|
}
|
|
11282
7260
|
),
|
|
11283
|
-
/* @__PURE__ */
|
|
7261
|
+
/* @__PURE__ */ jsx33(
|
|
11284
7262
|
"span",
|
|
11285
7263
|
{
|
|
11286
7264
|
className: [
|
|
@@ -11300,7 +7278,7 @@ function WidgetSpotlight({ selector }) {
|
|
|
11300
7278
|
// ../../apps/web/src/components/support-widget/widget-toast.tsx
|
|
11301
7279
|
import { useEffect as useEffect12, useState as useState13 } from "react";
|
|
11302
7280
|
import { createPortal as createPortal2 } from "react-dom";
|
|
11303
|
-
import { jsx as
|
|
7281
|
+
import { jsx as jsx34, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
11304
7282
|
var STAY_MS = 5e3;
|
|
11305
7283
|
var MOVE_MS = 250;
|
|
11306
7284
|
var LAYER2 = 2147483001;
|
|
@@ -11337,8 +7315,8 @@ function WidgetToast({
|
|
|
11337
7315
|
isShown ? "translate-y-0 opacity-100" : "pointer-events-none translate-y-2 opacity-0"
|
|
11338
7316
|
),
|
|
11339
7317
|
children: [
|
|
11340
|
-
/* @__PURE__ */
|
|
11341
|
-
/* @__PURE__ */
|
|
7318
|
+
/* @__PURE__ */ jsx34(WidgetAvatar, { agent, className: "size-6 rounded-full" }),
|
|
7319
|
+
/* @__PURE__ */ jsx34("span", { className: "truncate", children })
|
|
11342
7320
|
]
|
|
11343
7321
|
}
|
|
11344
7322
|
),
|
|
@@ -13056,17 +9034,17 @@ function useSupportNavigation({
|
|
|
13056
9034
|
}
|
|
13057
9035
|
|
|
13058
9036
|
// ../../apps/web/src/components/support-widget/sdk/median-support.tsx
|
|
13059
|
-
import { Fragment as Fragment92, jsx as
|
|
9037
|
+
import { Fragment as Fragment92, jsx as jsx35, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
13060
9038
|
var PRESENCE_BEAT_MS = 45e3;
|
|
13061
9039
|
function MedianSupport(props) {
|
|
13062
|
-
return /* @__PURE__ */
|
|
9040
|
+
return /* @__PURE__ */ jsx35(MedianSupportPreview, { ...props });
|
|
13063
9041
|
}
|
|
13064
9042
|
function MedianSupportPreview({
|
|
13065
9043
|
defaultOpen = false,
|
|
13066
9044
|
className,
|
|
13067
9045
|
...props
|
|
13068
9046
|
}) {
|
|
13069
|
-
return /* @__PURE__ */
|
|
9047
|
+
return /* @__PURE__ */ jsx35(MedianErrorBoundary, { children: /* @__PURE__ */ jsx35(
|
|
13070
9048
|
MedianConnection,
|
|
13071
9049
|
{
|
|
13072
9050
|
...props,
|
|
@@ -13093,7 +9071,7 @@ function MedianConnection(props) {
|
|
|
13093
9071
|
}
|
|
13094
9072
|
return new ConvexReactClient(MEDIAN_DEPLOYMENT_URL);
|
|
13095
9073
|
});
|
|
13096
|
-
return /* @__PURE__ */
|
|
9074
|
+
return /* @__PURE__ */ jsx35(ConvexProvider, { client: client2, children: /* @__PURE__ */ jsx35(MedianLauncher, { ...props }) });
|
|
13097
9075
|
}
|
|
13098
9076
|
function MedianLauncher({
|
|
13099
9077
|
apiKey,
|
|
@@ -13189,7 +9167,7 @@ function MedianLauncher({
|
|
|
13189
9167
|
};
|
|
13190
9168
|
const mover = resolvedPresence.team.find((member) => member.kind === "ai");
|
|
13191
9169
|
return /* @__PURE__ */ jsxs18(Fragment92, { children: [
|
|
13192
|
-
direction?.selector != null && /* @__PURE__ */
|
|
9170
|
+
direction?.selector != null && /* @__PURE__ */ jsx35(
|
|
13193
9171
|
WidgetSpotlight,
|
|
13194
9172
|
{
|
|
13195
9173
|
selector: direction.selector
|
|
@@ -13200,7 +9178,7 @@ function MedianLauncher({
|
|
|
13200
9178
|
mover.name,
|
|
13201
9179
|
" navigated you here"
|
|
13202
9180
|
] }, `moved:${direction.key}`),
|
|
13203
|
-
/* @__PURE__ */
|
|
9181
|
+
/* @__PURE__ */ jsx35(
|
|
13204
9182
|
SupportLauncher,
|
|
13205
9183
|
{
|
|
13206
9184
|
presence: resolvedPresence,
|
|
@@ -13228,7 +9206,7 @@ function MedianLauncher({
|
|
|
13228
9206
|
|
|
13229
9207
|
// ../../apps/web/src/components/support-widget/sdk/mount.tsx
|
|
13230
9208
|
import { createRoot } from "react-dom/client";
|
|
13231
|
-
import { jsx as
|
|
9209
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
13232
9210
|
var isDevelopment3 = typeof process !== "undefined" && process.env.NODE_ENV === "development";
|
|
13233
9211
|
function mountMedianSupport(options) {
|
|
13234
9212
|
if (typeof document === "undefined") {
|
|
@@ -13246,7 +9224,7 @@ function mountMedianSupport(options) {
|
|
|
13246
9224
|
let current2 = options;
|
|
13247
9225
|
let mounted = true;
|
|
13248
9226
|
const render = () => {
|
|
13249
|
-
root.render(/* @__PURE__ */
|
|
9227
|
+
root.render(/* @__PURE__ */ jsx36(MedianSupport, { ...current2 }));
|
|
13250
9228
|
};
|
|
13251
9229
|
render();
|
|
13252
9230
|
return {
|
|
@@ -13371,7 +9349,7 @@ function clamp3(value, low, high) {
|
|
|
13371
9349
|
}
|
|
13372
9350
|
|
|
13373
9351
|
// ../../apps/web/src/components/support-widget/feedback/feedback-popover.tsx
|
|
13374
|
-
import { jsx as
|
|
9352
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
13375
9353
|
var LAYER3 = 2147483e3;
|
|
13376
9354
|
var AUTOFOCUS_ATTRIBUTE = "data-median-autofocus";
|
|
13377
9355
|
var MOTION = "transition-[opacity,scale,translate] motion-reduce:transition-none";
|
|
@@ -13428,7 +9406,7 @@ function FeedbackPopover({
|
|
|
13428
9406
|
}, [isOpen, triggerRef]);
|
|
13429
9407
|
if (!isHydrated) return null;
|
|
13430
9408
|
return createPortal3(
|
|
13431
|
-
/* @__PURE__ */
|
|
9409
|
+
/* @__PURE__ */ jsx37(
|
|
13432
9410
|
"div",
|
|
13433
9411
|
{
|
|
13434
9412
|
ref: panelRef,
|
|
@@ -13466,7 +9444,7 @@ function FeedbackPopover({
|
|
|
13466
9444
|
}
|
|
13467
9445
|
|
|
13468
9446
|
// ../../apps/web/src/components/support-widget/feedback/feedback-panel.tsx
|
|
13469
|
-
import { jsx as
|
|
9447
|
+
import { jsx as jsx38, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
13470
9448
|
var THANKS_MS2 = 1600;
|
|
13471
9449
|
function FeedbackPanel({
|
|
13472
9450
|
onSubmit,
|
|
@@ -13519,10 +9497,10 @@ function FeedbackPanel({
|
|
|
13519
9497
|
children: [
|
|
13520
9498
|
/* @__PURE__ */ jsxs19("header", { className: "flex items-start gap-2", children: [
|
|
13521
9499
|
/* @__PURE__ */ jsxs19("div", { className: "flex min-w-0 flex-1 flex-col", children: [
|
|
13522
|
-
/* @__PURE__ */
|
|
13523
|
-
/* @__PURE__ */
|
|
9500
|
+
/* @__PURE__ */ jsx38("h2", { className: "truncate text-sm font-semibold tracking-tight", children: title }),
|
|
9501
|
+
/* @__PURE__ */ jsx38("p", { className: "text-xs text-muted-foreground", children: description })
|
|
13524
9502
|
] }),
|
|
13525
|
-
onClose && /* @__PURE__ */
|
|
9503
|
+
onClose && /* @__PURE__ */ jsx38(
|
|
13526
9504
|
WidgetButton,
|
|
13527
9505
|
{
|
|
13528
9506
|
type: "button",
|
|
@@ -13531,13 +9509,13 @@ function FeedbackPanel({
|
|
|
13531
9509
|
onClick: onClose,
|
|
13532
9510
|
"aria-label": "Close feedback",
|
|
13533
9511
|
className: "-mt-0.5 -mr-1 shrink-0 text-muted-foreground",
|
|
13534
|
-
children: /* @__PURE__ */
|
|
9512
|
+
children: /* @__PURE__ */ jsx38(X, {})
|
|
13535
9513
|
}
|
|
13536
9514
|
)
|
|
13537
9515
|
] }),
|
|
13538
9516
|
/* @__PURE__ */ jsxs19("div", { className: "grid", children: [
|
|
13539
|
-
/* @__PURE__ */
|
|
13540
|
-
/* @__PURE__ */
|
|
9517
|
+
/* @__PURE__ */ jsx38(Collapse, { isOpen: !isSent, children: /* @__PURE__ */ jsxs19("div", { className: "flex flex-col gap-1.5", children: [
|
|
9518
|
+
/* @__PURE__ */ jsx38(
|
|
13541
9519
|
Textarea,
|
|
13542
9520
|
{
|
|
13543
9521
|
rows: 3,
|
|
@@ -13557,15 +9535,15 @@ function FeedbackPanel({
|
|
|
13557
9535
|
)
|
|
13558
9536
|
}
|
|
13559
9537
|
),
|
|
13560
|
-
notice && /* @__PURE__ */
|
|
9538
|
+
notice && /* @__PURE__ */ jsx38("p", { className: "animate-in px-0.5 text-xs text-destructive fade-in duration-150", children: notice })
|
|
13561
9539
|
] }) }),
|
|
13562
|
-
/* @__PURE__ */
|
|
13563
|
-
/* @__PURE__ */
|
|
9540
|
+
/* @__PURE__ */ jsx38(Collapse, { isOpen: isSent, children: /* @__PURE__ */ jsxs19("div", { className: "flex items-center justify-center gap-2 py-4 text-sm font-medium", children: [
|
|
9541
|
+
/* @__PURE__ */ jsx38("span", { className: "grid size-5 shrink-0 place-items-center rounded-full bg-primary text-primary-foreground", children: /* @__PURE__ */ jsx38(Check, { className: "size-3" }) }),
|
|
13564
9542
|
"Thanks, we got it."
|
|
13565
9543
|
] }) })
|
|
13566
9544
|
] }),
|
|
13567
9545
|
/* @__PURE__ */ jsxs19("div", { className: "flex min-h-8 items-center gap-2", children: [
|
|
13568
|
-
showBadge && /* @__PURE__ */
|
|
9546
|
+
showBadge && /* @__PURE__ */ jsx38(PoweredByMedian, { className: "justify-start" }),
|
|
13569
9547
|
!isSent && /* @__PURE__ */ jsxs19(
|
|
13570
9548
|
WidgetButton,
|
|
13571
9549
|
{
|
|
@@ -13575,7 +9553,7 @@ function FeedbackPanel({
|
|
|
13575
9553
|
onClick: () => void send(),
|
|
13576
9554
|
className: "relative ml-auto shrink-0 rounded-full px-3",
|
|
13577
9555
|
children: [
|
|
13578
|
-
/* @__PURE__ */
|
|
9556
|
+
/* @__PURE__ */ jsx38(
|
|
13579
9557
|
"span",
|
|
13580
9558
|
{
|
|
13581
9559
|
className: cn(
|
|
@@ -13585,7 +9563,7 @@ function FeedbackPanel({
|
|
|
13585
9563
|
children: "Submit feedback"
|
|
13586
9564
|
}
|
|
13587
9565
|
),
|
|
13588
|
-
isSending && /* @__PURE__ */
|
|
9566
|
+
isSending && /* @__PURE__ */ jsx38(
|
|
13589
9567
|
ArrowsClockwise,
|
|
13590
9568
|
{
|
|
13591
9569
|
"aria-hidden": true,
|
|
@@ -13711,10 +9689,10 @@ function useFeedbackNote({
|
|
|
13711
9689
|
}
|
|
13712
9690
|
|
|
13713
9691
|
// ../../apps/web/src/components/support-widget/sdk/median-feedback.tsx
|
|
13714
|
-
import { Fragment as Fragment93, jsx as
|
|
9692
|
+
import { Fragment as Fragment93, jsx as jsx39, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
13715
9693
|
var DEFAULT_WIDTH2 = "20rem";
|
|
13716
9694
|
function MedianFeedback(props) {
|
|
13717
|
-
return /* @__PURE__ */
|
|
9695
|
+
return /* @__PURE__ */ jsx39(MedianErrorBoundary, { children: /* @__PURE__ */ jsx39(FeedbackConnection, { ...props }) });
|
|
13718
9696
|
}
|
|
13719
9697
|
function useApiKeyShapeWarning2(apiKey) {
|
|
13720
9698
|
useEffect22(() => {
|
|
@@ -13734,7 +9712,7 @@ function FeedbackConnection(props) {
|
|
|
13734
9712
|
}
|
|
13735
9713
|
return new ConvexReactClient2(MEDIAN_DEPLOYMENT_URL);
|
|
13736
9714
|
});
|
|
13737
|
-
return /* @__PURE__ */
|
|
9715
|
+
return /* @__PURE__ */ jsx39(ConvexProvider2, { client: client2, children: /* @__PURE__ */ jsx39(Feedback, { ...props }) });
|
|
13738
9716
|
}
|
|
13739
9717
|
function Feedback({
|
|
13740
9718
|
apiKey,
|
|
@@ -13779,7 +9757,7 @@ function Feedback({
|
|
|
13779
9757
|
// host's trigger keeps its own props, its own ref and its own
|
|
13780
9758
|
// styles, and the click is caught on the way past. `display:
|
|
13781
9759
|
// contents` would lose the rectangle the panel is measured against.
|
|
13782
|
-
/* @__PURE__ */
|
|
9760
|
+
/* @__PURE__ */ jsx39(
|
|
13783
9761
|
"span",
|
|
13784
9762
|
{
|
|
13785
9763
|
ref: triggerRef,
|
|
@@ -13788,7 +9766,7 @@ function Feedback({
|
|
|
13788
9766
|
children
|
|
13789
9767
|
}
|
|
13790
9768
|
),
|
|
13791
|
-
/* @__PURE__ */
|
|
9769
|
+
/* @__PURE__ */ jsx39(
|
|
13792
9770
|
FeedbackPopover,
|
|
13793
9771
|
{
|
|
13794
9772
|
isOpen,
|
|
@@ -13796,7 +9774,7 @@ function Feedback({
|
|
|
13796
9774
|
triggerRef,
|
|
13797
9775
|
...anchor !== void 0 ? { anchor } : {},
|
|
13798
9776
|
width,
|
|
13799
|
-
children: /* @__PURE__ */
|
|
9777
|
+
children: /* @__PURE__ */ jsx39(
|
|
13800
9778
|
FeedbackPanel,
|
|
13801
9779
|
{
|
|
13802
9780
|
onSubmit: note.submit,
|
|
@@ -13819,7 +9797,7 @@ function Feedback({
|
|
|
13819
9797
|
|
|
13820
9798
|
// ../../apps/web/src/components/support-widget/sdk/mount-feedback.tsx
|
|
13821
9799
|
import { createRoot as createRoot2 } from "react-dom/client";
|
|
13822
|
-
import { jsx as
|
|
9800
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
13823
9801
|
function mountMedianFeedback(options) {
|
|
13824
9802
|
if (typeof document === "undefined") {
|
|
13825
9803
|
console.error(
|
|
@@ -13836,7 +9814,7 @@ function mountMedianFeedback(options) {
|
|
|
13836
9814
|
let current2 = options;
|
|
13837
9815
|
let mounted = true;
|
|
13838
9816
|
const render = () => {
|
|
13839
|
-
root.render(/* @__PURE__ */
|
|
9817
|
+
root.render(/* @__PURE__ */ jsx40(MedianFeedback, { ...current2 }));
|
|
13840
9818
|
};
|
|
13841
9819
|
render();
|
|
13842
9820
|
return {
|