@upstash/qstash 2.7.9 → 2.7.11-canary

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/nextjs.mjs CHANGED
@@ -1,10 +1,1634 @@
1
1
  import {
2
2
  Receiver,
3
+ __commonJS,
4
+ __toESM,
3
5
  serve
4
- } from "./chunk-QK55BUNQ.mjs";
6
+ } from "./chunk-KWSSCN6R.mjs";
7
+
8
+ // node_modules/next/dist/shared/lib/i18n/detect-domain-locale.js
9
+ var require_detect_domain_locale = __commonJS({
10
+ "node_modules/next/dist/shared/lib/i18n/detect-domain-locale.js"(exports) {
11
+ "use strict";
12
+ Object.defineProperty(exports, "__esModule", {
13
+ value: true
14
+ });
15
+ Object.defineProperty(exports, "detectDomainLocale", {
16
+ enumerable: true,
17
+ get: function() {
18
+ return detectDomainLocale;
19
+ }
20
+ });
21
+ function detectDomainLocale(domainItems, hostname, detectedLocale) {
22
+ if (!domainItems)
23
+ return;
24
+ if (detectedLocale) {
25
+ detectedLocale = detectedLocale.toLowerCase();
26
+ }
27
+ for (const item of domainItems) {
28
+ var _item_domain, _item_locales;
29
+ const domainHostname = (_item_domain = item.domain) == null ? void 0 : _item_domain.split(":", 1)[0].toLowerCase();
30
+ if (hostname === domainHostname || detectedLocale === item.defaultLocale.toLowerCase() || ((_item_locales = item.locales) == null ? void 0 : _item_locales.some((locale) => locale.toLowerCase() === detectedLocale))) {
31
+ return item;
32
+ }
33
+ }
34
+ }
35
+ }
36
+ });
37
+
38
+ // node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js
39
+ var require_remove_trailing_slash = __commonJS({
40
+ "node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js"(exports) {
41
+ "use strict";
42
+ Object.defineProperty(exports, "__esModule", {
43
+ value: true
44
+ });
45
+ Object.defineProperty(exports, "removeTrailingSlash", {
46
+ enumerable: true,
47
+ get: function() {
48
+ return removeTrailingSlash;
49
+ }
50
+ });
51
+ function removeTrailingSlash(route) {
52
+ return route.replace(/\/$/, "") || "/";
53
+ }
54
+ }
55
+ });
56
+
57
+ // node_modules/next/dist/shared/lib/router/utils/parse-path.js
58
+ var require_parse_path = __commonJS({
59
+ "node_modules/next/dist/shared/lib/router/utils/parse-path.js"(exports) {
60
+ "use strict";
61
+ Object.defineProperty(exports, "__esModule", {
62
+ value: true
63
+ });
64
+ Object.defineProperty(exports, "parsePath", {
65
+ enumerable: true,
66
+ get: function() {
67
+ return parsePath;
68
+ }
69
+ });
70
+ function parsePath(path) {
71
+ const hashIndex = path.indexOf("#");
72
+ const queryIndex = path.indexOf("?");
73
+ const hasQuery = queryIndex > -1 && (hashIndex < 0 || queryIndex < hashIndex);
74
+ if (hasQuery || hashIndex > -1) {
75
+ return {
76
+ pathname: path.substring(0, hasQuery ? queryIndex : hashIndex),
77
+ query: hasQuery ? path.substring(queryIndex, hashIndex > -1 ? hashIndex : void 0) : "",
78
+ hash: hashIndex > -1 ? path.slice(hashIndex) : ""
79
+ };
80
+ }
81
+ return {
82
+ pathname: path,
83
+ query: "",
84
+ hash: ""
85
+ };
86
+ }
87
+ }
88
+ });
89
+
90
+ // node_modules/next/dist/shared/lib/router/utils/add-path-prefix.js
91
+ var require_add_path_prefix = __commonJS({
92
+ "node_modules/next/dist/shared/lib/router/utils/add-path-prefix.js"(exports) {
93
+ "use strict";
94
+ Object.defineProperty(exports, "__esModule", {
95
+ value: true
96
+ });
97
+ Object.defineProperty(exports, "addPathPrefix", {
98
+ enumerable: true,
99
+ get: function() {
100
+ return addPathPrefix;
101
+ }
102
+ });
103
+ var _parsepath = require_parse_path();
104
+ function addPathPrefix(path, prefix) {
105
+ if (!path.startsWith("/") || !prefix) {
106
+ return path;
107
+ }
108
+ const { pathname, query, hash } = (0, _parsepath.parsePath)(path);
109
+ return "" + prefix + pathname + query + hash;
110
+ }
111
+ }
112
+ });
113
+
114
+ // node_modules/next/dist/shared/lib/router/utils/add-path-suffix.js
115
+ var require_add_path_suffix = __commonJS({
116
+ "node_modules/next/dist/shared/lib/router/utils/add-path-suffix.js"(exports) {
117
+ "use strict";
118
+ Object.defineProperty(exports, "__esModule", {
119
+ value: true
120
+ });
121
+ Object.defineProperty(exports, "addPathSuffix", {
122
+ enumerable: true,
123
+ get: function() {
124
+ return addPathSuffix;
125
+ }
126
+ });
127
+ var _parsepath = require_parse_path();
128
+ function addPathSuffix(path, suffix) {
129
+ if (!path.startsWith("/") || !suffix) {
130
+ return path;
131
+ }
132
+ const { pathname, query, hash } = (0, _parsepath.parsePath)(path);
133
+ return "" + pathname + suffix + query + hash;
134
+ }
135
+ }
136
+ });
137
+
138
+ // node_modules/next/dist/shared/lib/router/utils/path-has-prefix.js
139
+ var require_path_has_prefix = __commonJS({
140
+ "node_modules/next/dist/shared/lib/router/utils/path-has-prefix.js"(exports) {
141
+ "use strict";
142
+ Object.defineProperty(exports, "__esModule", {
143
+ value: true
144
+ });
145
+ Object.defineProperty(exports, "pathHasPrefix", {
146
+ enumerable: true,
147
+ get: function() {
148
+ return pathHasPrefix;
149
+ }
150
+ });
151
+ var _parsepath = require_parse_path();
152
+ function pathHasPrefix(path, prefix) {
153
+ if (typeof path !== "string") {
154
+ return false;
155
+ }
156
+ const { pathname } = (0, _parsepath.parsePath)(path);
157
+ return pathname === prefix || pathname.startsWith(prefix + "/");
158
+ }
159
+ }
160
+ });
161
+
162
+ // node_modules/next/dist/shared/lib/router/utils/add-locale.js
163
+ var require_add_locale = __commonJS({
164
+ "node_modules/next/dist/shared/lib/router/utils/add-locale.js"(exports) {
165
+ "use strict";
166
+ Object.defineProperty(exports, "__esModule", {
167
+ value: true
168
+ });
169
+ Object.defineProperty(exports, "addLocale", {
170
+ enumerable: true,
171
+ get: function() {
172
+ return addLocale;
173
+ }
174
+ });
175
+ var _addpathprefix = require_add_path_prefix();
176
+ var _pathhasprefix = require_path_has_prefix();
177
+ function addLocale(path, locale, defaultLocale, ignorePrefix) {
178
+ if (!locale || locale === defaultLocale)
179
+ return path;
180
+ const lower = path.toLowerCase();
181
+ if (!ignorePrefix) {
182
+ if ((0, _pathhasprefix.pathHasPrefix)(lower, "/api"))
183
+ return path;
184
+ if ((0, _pathhasprefix.pathHasPrefix)(lower, "/" + locale.toLowerCase()))
185
+ return path;
186
+ }
187
+ return (0, _addpathprefix.addPathPrefix)(path, "/" + locale);
188
+ }
189
+ }
190
+ });
191
+
192
+ // node_modules/next/dist/shared/lib/router/utils/format-next-pathname-info.js
193
+ var require_format_next_pathname_info = __commonJS({
194
+ "node_modules/next/dist/shared/lib/router/utils/format-next-pathname-info.js"(exports) {
195
+ "use strict";
196
+ Object.defineProperty(exports, "__esModule", {
197
+ value: true
198
+ });
199
+ Object.defineProperty(exports, "formatNextPathnameInfo", {
200
+ enumerable: true,
201
+ get: function() {
202
+ return formatNextPathnameInfo;
203
+ }
204
+ });
205
+ var _removetrailingslash = require_remove_trailing_slash();
206
+ var _addpathprefix = require_add_path_prefix();
207
+ var _addpathsuffix = require_add_path_suffix();
208
+ var _addlocale = require_add_locale();
209
+ function formatNextPathnameInfo(info) {
210
+ let pathname = (0, _addlocale.addLocale)(info.pathname, info.locale, info.buildId ? void 0 : info.defaultLocale, info.ignorePrefix);
211
+ if (info.buildId || !info.trailingSlash) {
212
+ pathname = (0, _removetrailingslash.removeTrailingSlash)(pathname);
213
+ }
214
+ if (info.buildId) {
215
+ pathname = (0, _addpathsuffix.addPathSuffix)((0, _addpathprefix.addPathPrefix)(pathname, "/_next/data/" + info.buildId), info.pathname === "/" ? "index.json" : ".json");
216
+ }
217
+ pathname = (0, _addpathprefix.addPathPrefix)(pathname, info.basePath);
218
+ return !info.buildId && info.trailingSlash ? !pathname.endsWith("/") ? (0, _addpathsuffix.addPathSuffix)(pathname, "/") : pathname : (0, _removetrailingslash.removeTrailingSlash)(pathname);
219
+ }
220
+ }
221
+ });
222
+
223
+ // node_modules/next/dist/shared/lib/get-hostname.js
224
+ var require_get_hostname = __commonJS({
225
+ "node_modules/next/dist/shared/lib/get-hostname.js"(exports) {
226
+ "use strict";
227
+ Object.defineProperty(exports, "__esModule", {
228
+ value: true
229
+ });
230
+ Object.defineProperty(exports, "getHostname", {
231
+ enumerable: true,
232
+ get: function() {
233
+ return getHostname;
234
+ }
235
+ });
236
+ function getHostname(parsed, headers) {
237
+ let hostname;
238
+ if ((headers == null ? void 0 : headers.host) && !Array.isArray(headers.host)) {
239
+ hostname = headers.host.toString().split(":", 1)[0];
240
+ } else if (parsed.hostname) {
241
+ hostname = parsed.hostname;
242
+ } else
243
+ return;
244
+ return hostname.toLowerCase();
245
+ }
246
+ }
247
+ });
248
+
249
+ // node_modules/next/dist/shared/lib/i18n/normalize-locale-path.js
250
+ var require_normalize_locale_path = __commonJS({
251
+ "node_modules/next/dist/shared/lib/i18n/normalize-locale-path.js"(exports) {
252
+ "use strict";
253
+ Object.defineProperty(exports, "__esModule", {
254
+ value: true
255
+ });
256
+ Object.defineProperty(exports, "normalizeLocalePath", {
257
+ enumerable: true,
258
+ get: function() {
259
+ return normalizeLocalePath;
260
+ }
261
+ });
262
+ function normalizeLocalePath(pathname, locales) {
263
+ let detectedLocale;
264
+ const pathnameParts = pathname.split("/");
265
+ (locales || []).some((locale) => {
266
+ if (pathnameParts[1] && pathnameParts[1].toLowerCase() === locale.toLowerCase()) {
267
+ detectedLocale = locale;
268
+ pathnameParts.splice(1, 1);
269
+ pathname = pathnameParts.join("/") || "/";
270
+ return true;
271
+ }
272
+ return false;
273
+ });
274
+ return {
275
+ pathname,
276
+ detectedLocale
277
+ };
278
+ }
279
+ }
280
+ });
281
+
282
+ // node_modules/next/dist/shared/lib/router/utils/remove-path-prefix.js
283
+ var require_remove_path_prefix = __commonJS({
284
+ "node_modules/next/dist/shared/lib/router/utils/remove-path-prefix.js"(exports) {
285
+ "use strict";
286
+ Object.defineProperty(exports, "__esModule", {
287
+ value: true
288
+ });
289
+ Object.defineProperty(exports, "removePathPrefix", {
290
+ enumerable: true,
291
+ get: function() {
292
+ return removePathPrefix;
293
+ }
294
+ });
295
+ var _pathhasprefix = require_path_has_prefix();
296
+ function removePathPrefix(path, prefix) {
297
+ if (!(0, _pathhasprefix.pathHasPrefix)(path, prefix)) {
298
+ return path;
299
+ }
300
+ const withoutPrefix = path.slice(prefix.length);
301
+ if (withoutPrefix.startsWith("/")) {
302
+ return withoutPrefix;
303
+ }
304
+ return "/" + withoutPrefix;
305
+ }
306
+ }
307
+ });
308
+
309
+ // node_modules/next/dist/shared/lib/router/utils/get-next-pathname-info.js
310
+ var require_get_next_pathname_info = __commonJS({
311
+ "node_modules/next/dist/shared/lib/router/utils/get-next-pathname-info.js"(exports) {
312
+ "use strict";
313
+ Object.defineProperty(exports, "__esModule", {
314
+ value: true
315
+ });
316
+ Object.defineProperty(exports, "getNextPathnameInfo", {
317
+ enumerable: true,
318
+ get: function() {
319
+ return getNextPathnameInfo;
320
+ }
321
+ });
322
+ var _normalizelocalepath = require_normalize_locale_path();
323
+ var _removepathprefix = require_remove_path_prefix();
324
+ var _pathhasprefix = require_path_has_prefix();
325
+ function getNextPathnameInfo(pathname, options) {
326
+ var _options_nextConfig;
327
+ const { basePath, i18n, trailingSlash } = (_options_nextConfig = options.nextConfig) != null ? _options_nextConfig : {};
328
+ const info = {
329
+ pathname,
330
+ trailingSlash: pathname !== "/" ? pathname.endsWith("/") : trailingSlash
331
+ };
332
+ if (basePath && (0, _pathhasprefix.pathHasPrefix)(info.pathname, basePath)) {
333
+ info.pathname = (0, _removepathprefix.removePathPrefix)(info.pathname, basePath);
334
+ info.basePath = basePath;
335
+ }
336
+ let pathnameNoDataPrefix = info.pathname;
337
+ if (info.pathname.startsWith("/_next/data/") && info.pathname.endsWith(".json")) {
338
+ const paths = info.pathname.replace(/^\/_next\/data\//, "").replace(/\.json$/, "").split("/");
339
+ const buildId = paths[0];
340
+ info.buildId = buildId;
341
+ pathnameNoDataPrefix = paths[1] !== "index" ? "/" + paths.slice(1).join("/") : "/";
342
+ if (options.parseData === true) {
343
+ info.pathname = pathnameNoDataPrefix;
344
+ }
345
+ }
346
+ if (i18n) {
347
+ let result = options.i18nProvider ? options.i18nProvider.analyze(info.pathname) : (0, _normalizelocalepath.normalizeLocalePath)(info.pathname, i18n.locales);
348
+ info.locale = result.detectedLocale;
349
+ var _result_pathname;
350
+ info.pathname = (_result_pathname = result.pathname) != null ? _result_pathname : info.pathname;
351
+ if (!result.detectedLocale && info.buildId) {
352
+ result = options.i18nProvider ? options.i18nProvider.analyze(pathnameNoDataPrefix) : (0, _normalizelocalepath.normalizeLocalePath)(pathnameNoDataPrefix, i18n.locales);
353
+ if (result.detectedLocale) {
354
+ info.locale = result.detectedLocale;
355
+ }
356
+ }
357
+ }
358
+ return info;
359
+ }
360
+ }
361
+ });
362
+
363
+ // node_modules/next/dist/server/web/next-url.js
364
+ var require_next_url = __commonJS({
365
+ "node_modules/next/dist/server/web/next-url.js"(exports) {
366
+ "use strict";
367
+ Object.defineProperty(exports, "__esModule", {
368
+ value: true
369
+ });
370
+ Object.defineProperty(exports, "NextURL", {
371
+ enumerable: true,
372
+ get: function() {
373
+ return NextURL;
374
+ }
375
+ });
376
+ var _detectdomainlocale = require_detect_domain_locale();
377
+ var _formatnextpathnameinfo = require_format_next_pathname_info();
378
+ var _gethostname = require_get_hostname();
379
+ var _getnextpathnameinfo = require_get_next_pathname_info();
380
+ var REGEX_LOCALHOST_HOSTNAME = /(?!^https?:\/\/)(127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}|\[::1\]|localhost)/;
381
+ function parseURL(url, base) {
382
+ return new URL(String(url).replace(REGEX_LOCALHOST_HOSTNAME, "localhost"), base && String(base).replace(REGEX_LOCALHOST_HOSTNAME, "localhost"));
383
+ }
384
+ var Internal = Symbol("NextURLInternal");
385
+ var NextURL = class _NextURL {
386
+ constructor(input, baseOrOpts, opts) {
387
+ let base;
388
+ let options;
389
+ if (typeof baseOrOpts === "object" && "pathname" in baseOrOpts || typeof baseOrOpts === "string") {
390
+ base = baseOrOpts;
391
+ options = opts || {};
392
+ } else {
393
+ options = opts || baseOrOpts || {};
394
+ }
395
+ this[Internal] = {
396
+ url: parseURL(input, base ?? options.base),
397
+ options,
398
+ basePath: ""
399
+ };
400
+ this.analyze();
401
+ }
402
+ analyze() {
403
+ var _this_Internal_options_nextConfig_i18n, _this_Internal_options_nextConfig, _this_Internal_domainLocale, _this_Internal_options_nextConfig_i18n1, _this_Internal_options_nextConfig1;
404
+ const info = (0, _getnextpathnameinfo.getNextPathnameInfo)(this[Internal].url.pathname, {
405
+ nextConfig: this[Internal].options.nextConfig,
406
+ parseData: !process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE,
407
+ i18nProvider: this[Internal].options.i18nProvider
408
+ });
409
+ const hostname = (0, _gethostname.getHostname)(this[Internal].url, this[Internal].options.headers);
410
+ this[Internal].domainLocale = this[Internal].options.i18nProvider ? this[Internal].options.i18nProvider.detectDomainLocale(hostname) : (0, _detectdomainlocale.detectDomainLocale)((_this_Internal_options_nextConfig = this[Internal].options.nextConfig) == null ? void 0 : (_this_Internal_options_nextConfig_i18n = _this_Internal_options_nextConfig.i18n) == null ? void 0 : _this_Internal_options_nextConfig_i18n.domains, hostname);
411
+ const defaultLocale = ((_this_Internal_domainLocale = this[Internal].domainLocale) == null ? void 0 : _this_Internal_domainLocale.defaultLocale) || ((_this_Internal_options_nextConfig1 = this[Internal].options.nextConfig) == null ? void 0 : (_this_Internal_options_nextConfig_i18n1 = _this_Internal_options_nextConfig1.i18n) == null ? void 0 : _this_Internal_options_nextConfig_i18n1.defaultLocale);
412
+ this[Internal].url.pathname = info.pathname;
413
+ this[Internal].defaultLocale = defaultLocale;
414
+ this[Internal].basePath = info.basePath ?? "";
415
+ this[Internal].buildId = info.buildId;
416
+ this[Internal].locale = info.locale ?? defaultLocale;
417
+ this[Internal].trailingSlash = info.trailingSlash;
418
+ }
419
+ formatPathname() {
420
+ return (0, _formatnextpathnameinfo.formatNextPathnameInfo)({
421
+ basePath: this[Internal].basePath,
422
+ buildId: this[Internal].buildId,
423
+ defaultLocale: !this[Internal].options.forceLocale ? this[Internal].defaultLocale : void 0,
424
+ locale: this[Internal].locale,
425
+ pathname: this[Internal].url.pathname,
426
+ trailingSlash: this[Internal].trailingSlash
427
+ });
428
+ }
429
+ formatSearch() {
430
+ return this[Internal].url.search;
431
+ }
432
+ get buildId() {
433
+ return this[Internal].buildId;
434
+ }
435
+ set buildId(buildId) {
436
+ this[Internal].buildId = buildId;
437
+ }
438
+ get locale() {
439
+ return this[Internal].locale ?? "";
440
+ }
441
+ set locale(locale) {
442
+ var _this_Internal_options_nextConfig_i18n, _this_Internal_options_nextConfig;
443
+ if (!this[Internal].locale || !((_this_Internal_options_nextConfig = this[Internal].options.nextConfig) == null ? void 0 : (_this_Internal_options_nextConfig_i18n = _this_Internal_options_nextConfig.i18n) == null ? void 0 : _this_Internal_options_nextConfig_i18n.locales.includes(locale))) {
444
+ throw new TypeError(`The NextURL configuration includes no locale "${locale}"`);
445
+ }
446
+ this[Internal].locale = locale;
447
+ }
448
+ get defaultLocale() {
449
+ return this[Internal].defaultLocale;
450
+ }
451
+ get domainLocale() {
452
+ return this[Internal].domainLocale;
453
+ }
454
+ get searchParams() {
455
+ return this[Internal].url.searchParams;
456
+ }
457
+ get host() {
458
+ return this[Internal].url.host;
459
+ }
460
+ set host(value) {
461
+ this[Internal].url.host = value;
462
+ }
463
+ get hostname() {
464
+ return this[Internal].url.hostname;
465
+ }
466
+ set hostname(value) {
467
+ this[Internal].url.hostname = value;
468
+ }
469
+ get port() {
470
+ return this[Internal].url.port;
471
+ }
472
+ set port(value) {
473
+ this[Internal].url.port = value;
474
+ }
475
+ get protocol() {
476
+ return this[Internal].url.protocol;
477
+ }
478
+ set protocol(value) {
479
+ this[Internal].url.protocol = value;
480
+ }
481
+ get href() {
482
+ const pathname = this.formatPathname();
483
+ const search = this.formatSearch();
484
+ return `${this.protocol}//${this.host}${pathname}${search}${this.hash}`;
485
+ }
486
+ set href(url) {
487
+ this[Internal].url = parseURL(url);
488
+ this.analyze();
489
+ }
490
+ get origin() {
491
+ return this[Internal].url.origin;
492
+ }
493
+ get pathname() {
494
+ return this[Internal].url.pathname;
495
+ }
496
+ set pathname(value) {
497
+ this[Internal].url.pathname = value;
498
+ }
499
+ get hash() {
500
+ return this[Internal].url.hash;
501
+ }
502
+ set hash(value) {
503
+ this[Internal].url.hash = value;
504
+ }
505
+ get search() {
506
+ return this[Internal].url.search;
507
+ }
508
+ set search(value) {
509
+ this[Internal].url.search = value;
510
+ }
511
+ get password() {
512
+ return this[Internal].url.password;
513
+ }
514
+ set password(value) {
515
+ this[Internal].url.password = value;
516
+ }
517
+ get username() {
518
+ return this[Internal].url.username;
519
+ }
520
+ set username(value) {
521
+ this[Internal].url.username = value;
522
+ }
523
+ get basePath() {
524
+ return this[Internal].basePath;
525
+ }
526
+ set basePath(value) {
527
+ this[Internal].basePath = value.startsWith("/") ? value : `/${value}`;
528
+ }
529
+ toString() {
530
+ return this.href;
531
+ }
532
+ toJSON() {
533
+ return this.href;
534
+ }
535
+ [Symbol.for("edge-runtime.inspect.custom")]() {
536
+ return {
537
+ href: this.href,
538
+ origin: this.origin,
539
+ protocol: this.protocol,
540
+ username: this.username,
541
+ password: this.password,
542
+ host: this.host,
543
+ hostname: this.hostname,
544
+ port: this.port,
545
+ pathname: this.pathname,
546
+ search: this.search,
547
+ searchParams: this.searchParams,
548
+ hash: this.hash
549
+ };
550
+ }
551
+ clone() {
552
+ return new _NextURL(String(this), this[Internal].options);
553
+ }
554
+ };
555
+ }
556
+ });
557
+
558
+ // node_modules/next/dist/server/web/utils.js
559
+ var require_utils = __commonJS({
560
+ "node_modules/next/dist/server/web/utils.js"(exports) {
561
+ "use strict";
562
+ Object.defineProperty(exports, "__esModule", {
563
+ value: true
564
+ });
565
+ function _export(target, all) {
566
+ for (var name in all)
567
+ Object.defineProperty(target, name, {
568
+ enumerable: true,
569
+ get: all[name]
570
+ });
571
+ }
572
+ _export(exports, {
573
+ fromNodeOutgoingHttpHeaders: function() {
574
+ return fromNodeOutgoingHttpHeaders;
575
+ },
576
+ splitCookiesString: function() {
577
+ return splitCookiesString;
578
+ },
579
+ toNodeOutgoingHttpHeaders: function() {
580
+ return toNodeOutgoingHttpHeaders;
581
+ },
582
+ validateURL: function() {
583
+ return validateURL;
584
+ }
585
+ });
586
+ function fromNodeOutgoingHttpHeaders(nodeHeaders) {
587
+ const headers = new Headers();
588
+ for (let [key, value] of Object.entries(nodeHeaders)) {
589
+ const values = Array.isArray(value) ? value : [
590
+ value
591
+ ];
592
+ for (let v of values) {
593
+ if (typeof v === "undefined")
594
+ continue;
595
+ if (typeof v === "number") {
596
+ v = v.toString();
597
+ }
598
+ headers.append(key, v);
599
+ }
600
+ }
601
+ return headers;
602
+ }
603
+ function splitCookiesString(cookiesString) {
604
+ var cookiesStrings = [];
605
+ var pos = 0;
606
+ var start;
607
+ var ch;
608
+ var lastComma;
609
+ var nextStart;
610
+ var cookiesSeparatorFound;
611
+ function skipWhitespace() {
612
+ while (pos < cookiesString.length && /\s/.test(cookiesString.charAt(pos))) {
613
+ pos += 1;
614
+ }
615
+ return pos < cookiesString.length;
616
+ }
617
+ function notSpecialChar() {
618
+ ch = cookiesString.charAt(pos);
619
+ return ch !== "=" && ch !== ";" && ch !== ",";
620
+ }
621
+ while (pos < cookiesString.length) {
622
+ start = pos;
623
+ cookiesSeparatorFound = false;
624
+ while (skipWhitespace()) {
625
+ ch = cookiesString.charAt(pos);
626
+ if (ch === ",") {
627
+ lastComma = pos;
628
+ pos += 1;
629
+ skipWhitespace();
630
+ nextStart = pos;
631
+ while (pos < cookiesString.length && notSpecialChar()) {
632
+ pos += 1;
633
+ }
634
+ if (pos < cookiesString.length && cookiesString.charAt(pos) === "=") {
635
+ cookiesSeparatorFound = true;
636
+ pos = nextStart;
637
+ cookiesStrings.push(cookiesString.substring(start, lastComma));
638
+ start = pos;
639
+ } else {
640
+ pos = lastComma + 1;
641
+ }
642
+ } else {
643
+ pos += 1;
644
+ }
645
+ }
646
+ if (!cookiesSeparatorFound || pos >= cookiesString.length) {
647
+ cookiesStrings.push(cookiesString.substring(start, cookiesString.length));
648
+ }
649
+ }
650
+ return cookiesStrings;
651
+ }
652
+ function toNodeOutgoingHttpHeaders(headers) {
653
+ const nodeHeaders = {};
654
+ const cookies = [];
655
+ if (headers) {
656
+ for (const [key, value] of headers.entries()) {
657
+ if (key.toLowerCase() === "set-cookie") {
658
+ cookies.push(...splitCookiesString(value));
659
+ nodeHeaders[key] = cookies.length === 1 ? cookies[0] : cookies;
660
+ } else {
661
+ nodeHeaders[key] = value;
662
+ }
663
+ }
664
+ }
665
+ return nodeHeaders;
666
+ }
667
+ function validateURL(url) {
668
+ try {
669
+ return String(new URL(String(url)));
670
+ } catch (error) {
671
+ throw new Error(`URL is malformed "${String(url)}". Please use only absolute URLs - https://nextjs.org/docs/messages/middleware-relative-urls`, {
672
+ cause: error
673
+ });
674
+ }
675
+ }
676
+ }
677
+ });
678
+
679
+ // node_modules/next/dist/server/web/error.js
680
+ var require_error = __commonJS({
681
+ "node_modules/next/dist/server/web/error.js"(exports) {
682
+ "use strict";
683
+ Object.defineProperty(exports, "__esModule", {
684
+ value: true
685
+ });
686
+ function _export(target, all) {
687
+ for (var name in all)
688
+ Object.defineProperty(target, name, {
689
+ enumerable: true,
690
+ get: all[name]
691
+ });
692
+ }
693
+ _export(exports, {
694
+ PageSignatureError: function() {
695
+ return PageSignatureError;
696
+ },
697
+ RemovedPageError: function() {
698
+ return RemovedPageError;
699
+ },
700
+ RemovedUAError: function() {
701
+ return RemovedUAError;
702
+ }
703
+ });
704
+ var PageSignatureError = class extends Error {
705
+ constructor({ page }) {
706
+ super(`The middleware "${page}" accepts an async API directly with the form:
707
+
708
+ export function middleware(request, event) {
709
+ return NextResponse.redirect('/new-location')
710
+ }
711
+
712
+ Read more: https://nextjs.org/docs/messages/middleware-new-signature
713
+ `);
714
+ }
715
+ };
716
+ var RemovedPageError = class extends Error {
717
+ constructor() {
718
+ super(`The request.page has been deprecated in favour of \`URLPattern\`.
719
+ Read more: https://nextjs.org/docs/messages/middleware-request-page
720
+ `);
721
+ }
722
+ };
723
+ var RemovedUAError = class extends Error {
724
+ constructor() {
725
+ super(`The request.ua has been removed in favour of \`userAgent\` function.
726
+ Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent
727
+ `);
728
+ }
729
+ };
730
+ }
731
+ });
732
+
733
+ // node_modules/next/dist/compiled/@edge-runtime/cookies/index.js
734
+ var require_cookies = __commonJS({
735
+ "node_modules/next/dist/compiled/@edge-runtime/cookies/index.js"(exports, module) {
736
+ "use strict";
737
+ var __defProp = Object.defineProperty;
738
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
739
+ var __getOwnPropNames = Object.getOwnPropertyNames;
740
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
741
+ var __export = (target, all) => {
742
+ for (var name in all)
743
+ __defProp(target, name, { get: all[name], enumerable: true });
744
+ };
745
+ var __copyProps = (to, from, except, desc) => {
746
+ if (from && typeof from === "object" || typeof from === "function") {
747
+ for (let key of __getOwnPropNames(from))
748
+ if (!__hasOwnProp.call(to, key) && key !== except)
749
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
750
+ }
751
+ return to;
752
+ };
753
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
754
+ var src_exports = {};
755
+ __export(src_exports, {
756
+ RequestCookies: () => RequestCookies,
757
+ ResponseCookies: () => ResponseCookies,
758
+ parseCookie: () => parseCookie,
759
+ parseSetCookie: () => parseSetCookie,
760
+ stringifyCookie: () => stringifyCookie
761
+ });
762
+ module.exports = __toCommonJS(src_exports);
763
+ function stringifyCookie(c) {
764
+ var _a;
765
+ const attrs = [
766
+ "path" in c && c.path && `Path=${c.path}`,
767
+ "expires" in c && (c.expires || c.expires === 0) && `Expires=${(typeof c.expires === "number" ? new Date(c.expires) : c.expires).toUTCString()}`,
768
+ "maxAge" in c && typeof c.maxAge === "number" && `Max-Age=${c.maxAge}`,
769
+ "domain" in c && c.domain && `Domain=${c.domain}`,
770
+ "secure" in c && c.secure && "Secure",
771
+ "httpOnly" in c && c.httpOnly && "HttpOnly",
772
+ "sameSite" in c && c.sameSite && `SameSite=${c.sameSite}`,
773
+ "partitioned" in c && c.partitioned && "Partitioned",
774
+ "priority" in c && c.priority && `Priority=${c.priority}`
775
+ ].filter(Boolean);
776
+ const stringified = `${c.name}=${encodeURIComponent((_a = c.value) != null ? _a : "")}`;
777
+ return attrs.length === 0 ? stringified : `${stringified}; ${attrs.join("; ")}`;
778
+ }
779
+ function parseCookie(cookie) {
780
+ const map = /* @__PURE__ */ new Map();
781
+ for (const pair of cookie.split(/; */)) {
782
+ if (!pair)
783
+ continue;
784
+ const splitAt = pair.indexOf("=");
785
+ if (splitAt === -1) {
786
+ map.set(pair, "true");
787
+ continue;
788
+ }
789
+ const [key, value] = [pair.slice(0, splitAt), pair.slice(splitAt + 1)];
790
+ try {
791
+ map.set(key, decodeURIComponent(value != null ? value : "true"));
792
+ } catch {
793
+ }
794
+ }
795
+ return map;
796
+ }
797
+ function parseSetCookie(setCookie) {
798
+ if (!setCookie) {
799
+ return void 0;
800
+ }
801
+ const [[name, value], ...attributes] = parseCookie(setCookie);
802
+ const {
803
+ domain,
804
+ expires,
805
+ httponly,
806
+ maxage,
807
+ path,
808
+ samesite,
809
+ secure,
810
+ partitioned,
811
+ priority
812
+ } = Object.fromEntries(
813
+ attributes.map(([key, value2]) => [key.toLowerCase(), value2])
814
+ );
815
+ const cookie = {
816
+ name,
817
+ value: decodeURIComponent(value),
818
+ domain,
819
+ ...expires && { expires: new Date(expires) },
820
+ ...httponly && { httpOnly: true },
821
+ ...typeof maxage === "string" && { maxAge: Number(maxage) },
822
+ path,
823
+ ...samesite && { sameSite: parseSameSite(samesite) },
824
+ ...secure && { secure: true },
825
+ ...priority && { priority: parsePriority(priority) },
826
+ ...partitioned && { partitioned: true }
827
+ };
828
+ return compact(cookie);
829
+ }
830
+ function compact(t) {
831
+ const newT = {};
832
+ for (const key in t) {
833
+ if (t[key]) {
834
+ newT[key] = t[key];
835
+ }
836
+ }
837
+ return newT;
838
+ }
839
+ var SAME_SITE = ["strict", "lax", "none"];
840
+ function parseSameSite(string) {
841
+ string = string.toLowerCase();
842
+ return SAME_SITE.includes(string) ? string : void 0;
843
+ }
844
+ var PRIORITY = ["low", "medium", "high"];
845
+ function parsePriority(string) {
846
+ string = string.toLowerCase();
847
+ return PRIORITY.includes(string) ? string : void 0;
848
+ }
849
+ function splitCookiesString(cookiesString) {
850
+ if (!cookiesString)
851
+ return [];
852
+ var cookiesStrings = [];
853
+ var pos = 0;
854
+ var start;
855
+ var ch;
856
+ var lastComma;
857
+ var nextStart;
858
+ var cookiesSeparatorFound;
859
+ function skipWhitespace() {
860
+ while (pos < cookiesString.length && /\s/.test(cookiesString.charAt(pos))) {
861
+ pos += 1;
862
+ }
863
+ return pos < cookiesString.length;
864
+ }
865
+ function notSpecialChar() {
866
+ ch = cookiesString.charAt(pos);
867
+ return ch !== "=" && ch !== ";" && ch !== ",";
868
+ }
869
+ while (pos < cookiesString.length) {
870
+ start = pos;
871
+ cookiesSeparatorFound = false;
872
+ while (skipWhitespace()) {
873
+ ch = cookiesString.charAt(pos);
874
+ if (ch === ",") {
875
+ lastComma = pos;
876
+ pos += 1;
877
+ skipWhitespace();
878
+ nextStart = pos;
879
+ while (pos < cookiesString.length && notSpecialChar()) {
880
+ pos += 1;
881
+ }
882
+ if (pos < cookiesString.length && cookiesString.charAt(pos) === "=") {
883
+ cookiesSeparatorFound = true;
884
+ pos = nextStart;
885
+ cookiesStrings.push(cookiesString.substring(start, lastComma));
886
+ start = pos;
887
+ } else {
888
+ pos = lastComma + 1;
889
+ }
890
+ } else {
891
+ pos += 1;
892
+ }
893
+ }
894
+ if (!cookiesSeparatorFound || pos >= cookiesString.length) {
895
+ cookiesStrings.push(cookiesString.substring(start, cookiesString.length));
896
+ }
897
+ }
898
+ return cookiesStrings;
899
+ }
900
+ var RequestCookies = class {
901
+ constructor(requestHeaders) {
902
+ this._parsed = /* @__PURE__ */ new Map();
903
+ this._headers = requestHeaders;
904
+ const header = requestHeaders.get("cookie");
905
+ if (header) {
906
+ const parsed = parseCookie(header);
907
+ for (const [name, value] of parsed) {
908
+ this._parsed.set(name, { name, value });
909
+ }
910
+ }
911
+ }
912
+ [Symbol.iterator]() {
913
+ return this._parsed[Symbol.iterator]();
914
+ }
915
+ /**
916
+ * The amount of cookies received from the client
917
+ */
918
+ get size() {
919
+ return this._parsed.size;
920
+ }
921
+ get(...args) {
922
+ const name = typeof args[0] === "string" ? args[0] : args[0].name;
923
+ return this._parsed.get(name);
924
+ }
925
+ getAll(...args) {
926
+ var _a;
927
+ const all = Array.from(this._parsed);
928
+ if (!args.length) {
929
+ return all.map(([_, value]) => value);
930
+ }
931
+ const name = typeof args[0] === "string" ? args[0] : (_a = args[0]) == null ? void 0 : _a.name;
932
+ return all.filter(([n]) => n === name).map(([_, value]) => value);
933
+ }
934
+ has(name) {
935
+ return this._parsed.has(name);
936
+ }
937
+ set(...args) {
938
+ const [name, value] = args.length === 1 ? [args[0].name, args[0].value] : args;
939
+ const map = this._parsed;
940
+ map.set(name, { name, value });
941
+ this._headers.set(
942
+ "cookie",
943
+ Array.from(map).map(([_, value2]) => stringifyCookie(value2)).join("; ")
944
+ );
945
+ return this;
946
+ }
947
+ /**
948
+ * Delete the cookies matching the passed name or names in the request.
949
+ */
950
+ delete(names) {
951
+ const map = this._parsed;
952
+ const result = !Array.isArray(names) ? map.delete(names) : names.map((name) => map.delete(name));
953
+ this._headers.set(
954
+ "cookie",
955
+ Array.from(map).map(([_, value]) => stringifyCookie(value)).join("; ")
956
+ );
957
+ return result;
958
+ }
959
+ /**
960
+ * Delete all the cookies in the cookies in the request.
961
+ */
962
+ clear() {
963
+ this.delete(Array.from(this._parsed.keys()));
964
+ return this;
965
+ }
966
+ /**
967
+ * Format the cookies in the request as a string for logging
968
+ */
969
+ [Symbol.for("edge-runtime.inspect.custom")]() {
970
+ return `RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`;
971
+ }
972
+ toString() {
973
+ return [...this._parsed.values()].map((v) => `${v.name}=${encodeURIComponent(v.value)}`).join("; ");
974
+ }
975
+ };
976
+ var ResponseCookies = class {
977
+ constructor(responseHeaders) {
978
+ this._parsed = /* @__PURE__ */ new Map();
979
+ var _a, _b, _c;
980
+ this._headers = responseHeaders;
981
+ const setCookie = (_c = (_b = (_a = responseHeaders.getSetCookie) == null ? void 0 : _a.call(responseHeaders)) != null ? _b : responseHeaders.get("set-cookie")) != null ? _c : [];
982
+ const cookieStrings = Array.isArray(setCookie) ? setCookie : splitCookiesString(setCookie);
983
+ for (const cookieString of cookieStrings) {
984
+ const parsed = parseSetCookie(cookieString);
985
+ if (parsed)
986
+ this._parsed.set(parsed.name, parsed);
987
+ }
988
+ }
989
+ /**
990
+ * {@link https://wicg.github.io/cookie-store/#CookieStore-get CookieStore#get} without the Promise.
991
+ */
992
+ get(...args) {
993
+ const key = typeof args[0] === "string" ? args[0] : args[0].name;
994
+ return this._parsed.get(key);
995
+ }
996
+ /**
997
+ * {@link https://wicg.github.io/cookie-store/#CookieStore-getAll CookieStore#getAll} without the Promise.
998
+ */
999
+ getAll(...args) {
1000
+ var _a;
1001
+ const all = Array.from(this._parsed.values());
1002
+ if (!args.length) {
1003
+ return all;
1004
+ }
1005
+ const key = typeof args[0] === "string" ? args[0] : (_a = args[0]) == null ? void 0 : _a.name;
1006
+ return all.filter((c) => c.name === key);
1007
+ }
1008
+ has(name) {
1009
+ return this._parsed.has(name);
1010
+ }
1011
+ /**
1012
+ * {@link https://wicg.github.io/cookie-store/#CookieStore-set CookieStore#set} without the Promise.
1013
+ */
1014
+ set(...args) {
1015
+ const [name, value, cookie] = args.length === 1 ? [args[0].name, args[0].value, args[0]] : args;
1016
+ const map = this._parsed;
1017
+ map.set(name, normalizeCookie({ name, value, ...cookie }));
1018
+ replace(map, this._headers);
1019
+ return this;
1020
+ }
1021
+ /**
1022
+ * {@link https://wicg.github.io/cookie-store/#CookieStore-delete CookieStore#delete} without the Promise.
1023
+ */
1024
+ delete(...args) {
1025
+ const [name, path, domain] = typeof args[0] === "string" ? [args[0]] : [args[0].name, args[0].path, args[0].domain];
1026
+ return this.set({ name, path, domain, value: "", expires: /* @__PURE__ */ new Date(0) });
1027
+ }
1028
+ [Symbol.for("edge-runtime.inspect.custom")]() {
1029
+ return `ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`;
1030
+ }
1031
+ toString() {
1032
+ return [...this._parsed.values()].map(stringifyCookie).join("; ");
1033
+ }
1034
+ };
1035
+ function replace(bag, headers) {
1036
+ headers.delete("set-cookie");
1037
+ for (const [, value] of bag) {
1038
+ const serialized = stringifyCookie(value);
1039
+ headers.append("set-cookie", serialized);
1040
+ }
1041
+ }
1042
+ function normalizeCookie(cookie = { name: "", value: "" }) {
1043
+ if (typeof cookie.expires === "number") {
1044
+ cookie.expires = new Date(cookie.expires);
1045
+ }
1046
+ if (cookie.maxAge) {
1047
+ cookie.expires = new Date(Date.now() + cookie.maxAge * 1e3);
1048
+ }
1049
+ if (cookie.path === null || cookie.path === void 0) {
1050
+ cookie.path = "/";
1051
+ }
1052
+ return cookie;
1053
+ }
1054
+ }
1055
+ });
1056
+
1057
+ // node_modules/next/dist/server/web/spec-extension/cookies.js
1058
+ var require_cookies2 = __commonJS({
1059
+ "node_modules/next/dist/server/web/spec-extension/cookies.js"(exports) {
1060
+ "use strict";
1061
+ Object.defineProperty(exports, "__esModule", {
1062
+ value: true
1063
+ });
1064
+ function _export(target, all) {
1065
+ for (var name in all)
1066
+ Object.defineProperty(target, name, {
1067
+ enumerable: true,
1068
+ get: all[name]
1069
+ });
1070
+ }
1071
+ _export(exports, {
1072
+ RequestCookies: function() {
1073
+ return _cookies.RequestCookies;
1074
+ },
1075
+ ResponseCookies: function() {
1076
+ return _cookies.ResponseCookies;
1077
+ }
1078
+ });
1079
+ var _cookies = require_cookies();
1080
+ }
1081
+ });
1082
+
1083
+ // node_modules/next/dist/server/web/spec-extension/request.js
1084
+ var require_request = __commonJS({
1085
+ "node_modules/next/dist/server/web/spec-extension/request.js"(exports) {
1086
+ "use strict";
1087
+ Object.defineProperty(exports, "__esModule", {
1088
+ value: true
1089
+ });
1090
+ function _export(target, all) {
1091
+ for (var name in all)
1092
+ Object.defineProperty(target, name, {
1093
+ enumerable: true,
1094
+ get: all[name]
1095
+ });
1096
+ }
1097
+ _export(exports, {
1098
+ INTERNALS: function() {
1099
+ return INTERNALS;
1100
+ },
1101
+ NextRequest: function() {
1102
+ return NextRequest;
1103
+ }
1104
+ });
1105
+ var _nexturl = require_next_url();
1106
+ var _utils = require_utils();
1107
+ var _error = require_error();
1108
+ var _cookies = require_cookies2();
1109
+ var INTERNALS = Symbol("internal request");
1110
+ var NextRequest = class extends Request {
1111
+ constructor(input, init = {}) {
1112
+ const url = typeof input !== "string" && "url" in input ? input.url : String(input);
1113
+ (0, _utils.validateURL)(url);
1114
+ if (input instanceof Request)
1115
+ super(input, init);
1116
+ else
1117
+ super(url, init);
1118
+ const nextUrl = new _nexturl.NextURL(url, {
1119
+ headers: (0, _utils.toNodeOutgoingHttpHeaders)(this.headers),
1120
+ nextConfig: init.nextConfig
1121
+ });
1122
+ this[INTERNALS] = {
1123
+ cookies: new _cookies.RequestCookies(this.headers),
1124
+ geo: init.geo || {},
1125
+ ip: init.ip,
1126
+ nextUrl,
1127
+ url: process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE ? url : nextUrl.toString()
1128
+ };
1129
+ }
1130
+ [Symbol.for("edge-runtime.inspect.custom")]() {
1131
+ return {
1132
+ cookies: this.cookies,
1133
+ geo: this.geo,
1134
+ ip: this.ip,
1135
+ nextUrl: this.nextUrl,
1136
+ url: this.url,
1137
+ // rest of props come from Request
1138
+ bodyUsed: this.bodyUsed,
1139
+ cache: this.cache,
1140
+ credentials: this.credentials,
1141
+ destination: this.destination,
1142
+ headers: Object.fromEntries(this.headers),
1143
+ integrity: this.integrity,
1144
+ keepalive: this.keepalive,
1145
+ method: this.method,
1146
+ mode: this.mode,
1147
+ redirect: this.redirect,
1148
+ referrer: this.referrer,
1149
+ referrerPolicy: this.referrerPolicy,
1150
+ signal: this.signal
1151
+ };
1152
+ }
1153
+ get cookies() {
1154
+ return this[INTERNALS].cookies;
1155
+ }
1156
+ get geo() {
1157
+ return this[INTERNALS].geo;
1158
+ }
1159
+ get ip() {
1160
+ return this[INTERNALS].ip;
1161
+ }
1162
+ get nextUrl() {
1163
+ return this[INTERNALS].nextUrl;
1164
+ }
1165
+ /**
1166
+ * @deprecated
1167
+ * `page` has been deprecated in favour of `URLPattern`.
1168
+ * Read more: https://nextjs.org/docs/messages/middleware-request-page
1169
+ */
1170
+ get page() {
1171
+ throw new _error.RemovedPageError();
1172
+ }
1173
+ /**
1174
+ * @deprecated
1175
+ * `ua` has been removed in favour of \`userAgent\` function.
1176
+ * Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent
1177
+ */
1178
+ get ua() {
1179
+ throw new _error.RemovedUAError();
1180
+ }
1181
+ get url() {
1182
+ return this[INTERNALS].url;
1183
+ }
1184
+ };
1185
+ }
1186
+ });
1187
+
1188
+ // node_modules/next/dist/server/web/spec-extension/response.js
1189
+ var require_response = __commonJS({
1190
+ "node_modules/next/dist/server/web/spec-extension/response.js"(exports) {
1191
+ "use strict";
1192
+ Object.defineProperty(exports, "__esModule", {
1193
+ value: true
1194
+ });
1195
+ Object.defineProperty(exports, "NextResponse", {
1196
+ enumerable: true,
1197
+ get: function() {
1198
+ return NextResponse2;
1199
+ }
1200
+ });
1201
+ var _nexturl = require_next_url();
1202
+ var _utils = require_utils();
1203
+ var _cookies = require_cookies2();
1204
+ var INTERNALS = Symbol("internal response");
1205
+ var REDIRECTS = /* @__PURE__ */ new Set([
1206
+ 301,
1207
+ 302,
1208
+ 303,
1209
+ 307,
1210
+ 308
1211
+ ]);
1212
+ function handleMiddlewareField(init, headers) {
1213
+ var _init_request;
1214
+ if (init == null ? void 0 : (_init_request = init.request) == null ? void 0 : _init_request.headers) {
1215
+ if (!(init.request.headers instanceof Headers)) {
1216
+ throw new Error("request.headers must be an instance of Headers");
1217
+ }
1218
+ const keys = [];
1219
+ for (const [key, value] of init.request.headers) {
1220
+ headers.set("x-middleware-request-" + key, value);
1221
+ keys.push(key);
1222
+ }
1223
+ headers.set("x-middleware-override-headers", keys.join(","));
1224
+ }
1225
+ }
1226
+ var NextResponse2 = class _NextResponse extends Response {
1227
+ constructor(body, init = {}) {
1228
+ super(body, init);
1229
+ this[INTERNALS] = {
1230
+ cookies: new _cookies.ResponseCookies(this.headers),
1231
+ url: init.url ? new _nexturl.NextURL(init.url, {
1232
+ headers: (0, _utils.toNodeOutgoingHttpHeaders)(this.headers),
1233
+ nextConfig: init.nextConfig
1234
+ }) : void 0
1235
+ };
1236
+ }
1237
+ [Symbol.for("edge-runtime.inspect.custom")]() {
1238
+ return {
1239
+ cookies: this.cookies,
1240
+ url: this.url,
1241
+ // rest of props come from Response
1242
+ body: this.body,
1243
+ bodyUsed: this.bodyUsed,
1244
+ headers: Object.fromEntries(this.headers),
1245
+ ok: this.ok,
1246
+ redirected: this.redirected,
1247
+ status: this.status,
1248
+ statusText: this.statusText,
1249
+ type: this.type
1250
+ };
1251
+ }
1252
+ get cookies() {
1253
+ return this[INTERNALS].cookies;
1254
+ }
1255
+ static json(body, init) {
1256
+ const response = Response.json(body, init);
1257
+ return new _NextResponse(response.body, response);
1258
+ }
1259
+ static redirect(url, init) {
1260
+ const status = typeof init === "number" ? init : (init == null ? void 0 : init.status) ?? 307;
1261
+ if (!REDIRECTS.has(status)) {
1262
+ throw new RangeError('Failed to execute "redirect" on "response": Invalid status code');
1263
+ }
1264
+ const initObj = typeof init === "object" ? init : {};
1265
+ const headers = new Headers(initObj == null ? void 0 : initObj.headers);
1266
+ headers.set("Location", (0, _utils.validateURL)(url));
1267
+ return new _NextResponse(null, {
1268
+ ...initObj,
1269
+ headers,
1270
+ status
1271
+ });
1272
+ }
1273
+ static rewrite(destination, init) {
1274
+ const headers = new Headers(init == null ? void 0 : init.headers);
1275
+ headers.set("x-middleware-rewrite", (0, _utils.validateURL)(destination));
1276
+ handleMiddlewareField(init, headers);
1277
+ return new _NextResponse(null, {
1278
+ ...init,
1279
+ headers
1280
+ });
1281
+ }
1282
+ static next(init) {
1283
+ const headers = new Headers(init == null ? void 0 : init.headers);
1284
+ headers.set("x-middleware-next", "1");
1285
+ handleMiddlewareField(init, headers);
1286
+ return new _NextResponse(null, {
1287
+ ...init,
1288
+ headers
1289
+ });
1290
+ }
1291
+ };
1292
+ }
1293
+ });
1294
+
1295
+ // node_modules/next/dist/server/web/spec-extension/image-response.js
1296
+ var require_image_response = __commonJS({
1297
+ "node_modules/next/dist/server/web/spec-extension/image-response.js"(exports) {
1298
+ "use strict";
1299
+ Object.defineProperty(exports, "__esModule", {
1300
+ value: true
1301
+ });
1302
+ Object.defineProperty(exports, "ImageResponse", {
1303
+ enumerable: true,
1304
+ get: function() {
1305
+ return ImageResponse;
1306
+ }
1307
+ });
1308
+ function ImageResponse() {
1309
+ throw new Error('ImageResponse moved from "next/server" to "next/og" since Next.js 14, please import from "next/og" instead');
1310
+ }
1311
+ }
1312
+ });
1313
+
1314
+ // node_modules/next/dist/compiled/ua-parser-js/ua-parser.js
1315
+ var require_ua_parser = __commonJS({
1316
+ "node_modules/next/dist/compiled/ua-parser-js/ua-parser.js"(exports, module) {
1317
+ "use strict";
1318
+ (() => {
1319
+ var i = { 226: function(i2, e2) {
1320
+ (function(o2, a) {
1321
+ "use strict";
1322
+ var r = "1.0.35", t = "", n = "?", s = "function", b = "undefined", w = "object", l = "string", d = "major", c = "model", u = "name", p = "type", m = "vendor", f = "version", h = "architecture", v = "console", g = "mobile", k = "tablet", x = "smarttv", _ = "wearable", y = "embedded", q = 350;
1323
+ var T = "Amazon", S = "Apple", z = "ASUS", N = "BlackBerry", A = "Browser", C = "Chrome", E = "Edge", O = "Firefox", U = "Google", j = "Huawei", P = "LG", R = "Microsoft", M = "Motorola", B = "Opera", V = "Samsung", D = "Sharp", I = "Sony", W = "Viera", F = "Xiaomi", G = "Zebra", H = "Facebook", L = "Chromium OS", Z = "Mac OS";
1324
+ var extend = function(i3, e3) {
1325
+ var o3 = {};
1326
+ for (var a2 in i3) {
1327
+ if (e3[a2] && e3[a2].length % 2 === 0) {
1328
+ o3[a2] = e3[a2].concat(i3[a2]);
1329
+ } else {
1330
+ o3[a2] = i3[a2];
1331
+ }
1332
+ }
1333
+ return o3;
1334
+ }, enumerize = function(i3) {
1335
+ var e3 = {};
1336
+ for (var o3 = 0; o3 < i3.length; o3++) {
1337
+ e3[i3[o3].toUpperCase()] = i3[o3];
1338
+ }
1339
+ return e3;
1340
+ }, has = function(i3, e3) {
1341
+ return typeof i3 === l ? lowerize(e3).indexOf(lowerize(i3)) !== -1 : false;
1342
+ }, lowerize = function(i3) {
1343
+ return i3.toLowerCase();
1344
+ }, majorize = function(i3) {
1345
+ return typeof i3 === l ? i3.replace(/[^\d\.]/g, t).split(".")[0] : a;
1346
+ }, trim = function(i3, e3) {
1347
+ if (typeof i3 === l) {
1348
+ i3 = i3.replace(/^\s\s*/, t);
1349
+ return typeof e3 === b ? i3 : i3.substring(0, q);
1350
+ }
1351
+ };
1352
+ var rgxMapper = function(i3, e3) {
1353
+ var o3 = 0, r2, t2, n2, b2, l2, d2;
1354
+ while (o3 < e3.length && !l2) {
1355
+ var c2 = e3[o3], u2 = e3[o3 + 1];
1356
+ r2 = t2 = 0;
1357
+ while (r2 < c2.length && !l2) {
1358
+ if (!c2[r2]) {
1359
+ break;
1360
+ }
1361
+ l2 = c2[r2++].exec(i3);
1362
+ if (!!l2) {
1363
+ for (n2 = 0; n2 < u2.length; n2++) {
1364
+ d2 = l2[++t2];
1365
+ b2 = u2[n2];
1366
+ if (typeof b2 === w && b2.length > 0) {
1367
+ if (b2.length === 2) {
1368
+ if (typeof b2[1] == s) {
1369
+ this[b2[0]] = b2[1].call(this, d2);
1370
+ } else {
1371
+ this[b2[0]] = b2[1];
1372
+ }
1373
+ } else if (b2.length === 3) {
1374
+ if (typeof b2[1] === s && !(b2[1].exec && b2[1].test)) {
1375
+ this[b2[0]] = d2 ? b2[1].call(this, d2, b2[2]) : a;
1376
+ } else {
1377
+ this[b2[0]] = d2 ? d2.replace(b2[1], b2[2]) : a;
1378
+ }
1379
+ } else if (b2.length === 4) {
1380
+ this[b2[0]] = d2 ? b2[3].call(this, d2.replace(b2[1], b2[2])) : a;
1381
+ }
1382
+ } else {
1383
+ this[b2] = d2 ? d2 : a;
1384
+ }
1385
+ }
1386
+ }
1387
+ }
1388
+ o3 += 2;
1389
+ }
1390
+ }, strMapper = function(i3, e3) {
1391
+ for (var o3 in e3) {
1392
+ if (typeof e3[o3] === w && e3[o3].length > 0) {
1393
+ for (var r2 = 0; r2 < e3[o3].length; r2++) {
1394
+ if (has(e3[o3][r2], i3)) {
1395
+ return o3 === n ? a : o3;
1396
+ }
1397
+ }
1398
+ } else if (has(e3[o3], i3)) {
1399
+ return o3 === n ? a : o3;
1400
+ }
1401
+ }
1402
+ return i3;
1403
+ };
1404
+ var $ = { "1.0": "/8", 1.2: "/1", 1.3: "/3", "2.0": "/412", "2.0.2": "/416", "2.0.3": "/417", "2.0.4": "/419", "?": "/" }, X = { ME: "4.90", "NT 3.11": "NT3.51", "NT 4.0": "NT4.0", 2e3: "NT 5.0", XP: ["NT 5.1", "NT 5.2"], Vista: "NT 6.0", 7: "NT 6.1", 8: "NT 6.2", 8.1: "NT 6.3", 10: ["NT 6.4", "NT 10.0"], RT: "ARM" };
1405
+ var K = { browser: [[/\b(?:crmo|crios)\/([\w\.]+)/i], [f, [u, "Chrome"]], [/edg(?:e|ios|a)?\/([\w\.]+)/i], [f, [u, "Edge"]], [/(opera mini)\/([-\w\.]+)/i, /(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i, /(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i], [u, f], [/opios[\/ ]+([\w\.]+)/i], [f, [u, B + " Mini"]], [/\bopr\/([\w\.]+)/i], [f, [u, B]], [/(kindle)\/([\w\.]+)/i, /(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i, /(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i, /(ba?idubrowser)[\/ ]?([\w\.]+)/i, /(?:ms|\()(ie) ([\w\.]+)/i, /(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i, /(heytap|ovi)browser\/([\d\.]+)/i, /(weibo)__([\d\.]+)/i], [u, f], [/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i], [f, [u, "UC" + A]], [/microm.+\bqbcore\/([\w\.]+)/i, /\bqbcore\/([\w\.]+).+microm/i], [f, [u, "WeChat(Win) Desktop"]], [/micromessenger\/([\w\.]+)/i], [f, [u, "WeChat"]], [/konqueror\/([\w\.]+)/i], [f, [u, "Konqueror"]], [/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i], [f, [u, "IE"]], [/ya(?:search)?browser\/([\w\.]+)/i], [f, [u, "Yandex"]], [/(avast|avg)\/([\w\.]+)/i], [[u, /(.+)/, "$1 Secure " + A], f], [/\bfocus\/([\w\.]+)/i], [f, [u, O + " Focus"]], [/\bopt\/([\w\.]+)/i], [f, [u, B + " Touch"]], [/coc_coc\w+\/([\w\.]+)/i], [f, [u, "Coc Coc"]], [/dolfin\/([\w\.]+)/i], [f, [u, "Dolphin"]], [/coast\/([\w\.]+)/i], [f, [u, B + " Coast"]], [/miuibrowser\/([\w\.]+)/i], [f, [u, "MIUI " + A]], [/fxios\/([-\w\.]+)/i], [f, [u, O]], [/\bqihu|(qi?ho?o?|360)browser/i], [[u, "360 " + A]], [/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i], [[u, /(.+)/, "$1 " + A], f], [/(comodo_dragon)\/([\w\.]+)/i], [[u, /_/g, " "], f], [/(electron)\/([\w\.]+) safari/i, /(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i, /m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i], [u, f], [/(metasr)[\/ ]?([\w\.]+)/i, /(lbbrowser)/i, /\[(linkedin)app\]/i], [u], [/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i], [[u, H], f], [/(kakao(?:talk|story))[\/ ]([\w\.]+)/i, /(naver)\(.*?(\d+\.[\w\.]+).*\)/i, /safari (line)\/([\w\.]+)/i, /\b(line)\/([\w\.]+)\/iab/i, /(chromium|instagram)[\/ ]([-\w\.]+)/i], [u, f], [/\bgsa\/([\w\.]+) .*safari\//i], [f, [u, "GSA"]], [/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i], [f, [u, "TikTok"]], [/headlesschrome(?:\/([\w\.]+)| )/i], [f, [u, C + " Headless"]], [/ wv\).+(chrome)\/([\w\.]+)/i], [[u, C + " WebView"], f], [/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i], [f, [u, "Android " + A]], [/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i], [u, f], [/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i], [f, [u, "Mobile Safari"]], [/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i], [f, u], [/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i], [u, [f, strMapper, $]], [/(webkit|khtml)\/([\w\.]+)/i], [u, f], [/(navigator|netscape\d?)\/([-\w\.]+)/i], [[u, "Netscape"], f], [/mobile vr; rv:([\w\.]+)\).+firefox/i], [f, [u, O + " Reality"]], [/ekiohf.+(flow)\/([\w\.]+)/i, /(swiftfox)/i, /(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i, /(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i, /(firefox)\/([\w\.]+)/i, /(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i, /(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i, /(links) \(([\w\.]+)/i, /panasonic;(viera)/i], [u, f], [/(cobalt)\/([\w\.]+)/i], [u, [f, /master.|lts./, ""]]], cpu: [[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i], [[h, "amd64"]], [/(ia32(?=;))/i], [[h, lowerize]], [/((?:i[346]|x)86)[;\)]/i], [[h, "ia32"]], [/\b(aarch64|arm(v?8e?l?|_?64))\b/i], [[h, "arm64"]], [/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i], [[h, "armhf"]], [/windows (ce|mobile); ppc;/i], [[h, "arm"]], [/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i], [[h, /ower/, t, lowerize]], [/(sun4\w)[;\)]/i], [[h, "sparc"]], [/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i], [[h, lowerize]]], device: [[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i], [c, [m, V], [p, k]], [/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i, /samsung[- ]([-\w]+)/i, /sec-(sgh\w+)/i], [c, [m, V], [p, g]], [/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i], [c, [m, S], [p, g]], [/\((ipad);[-\w\),; ]+apple/i, /applecoremedia\/[\w\.]+ \((ipad)/i, /\b(ipad)\d\d?,\d\d?[;\]].+ios/i], [c, [m, S], [p, k]], [/(macintosh);/i], [c, [m, S]], [/\b(sh-?[altvz]?\d\d[a-ekm]?)/i], [c, [m, D], [p, g]], [/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i], [c, [m, j], [p, k]], [/(?:huawei|honor)([-\w ]+)[;\)]/i, /\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i], [c, [m, j], [p, g]], [/\b(poco[\w ]+)(?: bui|\))/i, /\b; (\w+) build\/hm\1/i, /\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i, /\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i, /\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i], [[c, /_/g, " "], [m, F], [p, g]], [/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i], [[c, /_/g, " "], [m, F], [p, k]], [/; (\w+) bui.+ oppo/i, /\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i], [c, [m, "OPPO"], [p, g]], [/vivo (\w+)(?: bui|\))/i, /\b(v[12]\d{3}\w?[at])(?: bui|;)/i], [c, [m, "Vivo"], [p, g]], [/\b(rmx[12]\d{3})(?: bui|;|\))/i], [c, [m, "Realme"], [p, g]], [/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i, /\bmot(?:orola)?[- ](\w*)/i, /((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i], [c, [m, M], [p, g]], [/\b(mz60\d|xoom[2 ]{0,2}) build\//i], [c, [m, M], [p, k]], [/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i], [c, [m, P], [p, k]], [/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i, /\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i, /\blg-?([\d\w]+) bui/i], [c, [m, P], [p, g]], [/(ideatab[-\w ]+)/i, /lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i], [c, [m, "Lenovo"], [p, k]], [/(?:maemo|nokia).*(n900|lumia \d+)/i, /nokia[-_ ]?([-\w\.]*)/i], [[c, /_/g, " "], [m, "Nokia"], [p, g]], [/(pixel c)\b/i], [c, [m, U], [p, k]], [/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i], [c, [m, U], [p, g]], [/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i], [c, [m, I], [p, g]], [/sony tablet [ps]/i, /\b(?:sony)?sgp\w+(?: bui|\))/i], [[c, "Xperia Tablet"], [m, I], [p, k]], [/ (kb2005|in20[12]5|be20[12][59])\b/i, /(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i], [c, [m, "OnePlus"], [p, g]], [/(alexa)webm/i, /(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i, /(kf[a-z]+)( bui|\)).+silk\//i], [c, [m, T], [p, k]], [/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i], [[c, /(.+)/g, "Fire Phone $1"], [m, T], [p, g]], [/(playbook);[-\w\),; ]+(rim)/i], [c, m, [p, k]], [/\b((?:bb[a-f]|st[hv])100-\d)/i, /\(bb10; (\w+)/i], [c, [m, N], [p, g]], [/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i], [c, [m, z], [p, k]], [/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i], [c, [m, z], [p, g]], [/(nexus 9)/i], [c, [m, "HTC"], [p, k]], [/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i, /(zte)[- ]([\w ]+?)(?: bui|\/|\))/i, /(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i], [m, [c, /_/g, " "], [p, g]], [/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i], [c, [m, "Acer"], [p, k]], [/droid.+; (m[1-5] note) bui/i, /\bmz-([-\w]{2,})/i], [c, [m, "Meizu"], [p, g]], [/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i, /(hp) ([\w ]+\w)/i, /(asus)-?(\w+)/i, /(microsoft); (lumia[\w ]+)/i, /(lenovo)[-_ ]?([-\w]+)/i, /(jolla)/i, /(oppo) ?([\w ]+) bui/i], [m, c, [p, g]], [/(kobo)\s(ereader|touch)/i, /(archos) (gamepad2?)/i, /(hp).+(touchpad(?!.+tablet)|tablet)/i, /(kindle)\/([\w\.]+)/i, /(nook)[\w ]+build\/(\w+)/i, /(dell) (strea[kpr\d ]*[\dko])/i, /(le[- ]+pan)[- ]+(\w{1,9}) bui/i, /(trinity)[- ]*(t\d{3}) bui/i, /(gigaset)[- ]+(q\w{1,9}) bui/i, /(vodafone) ([\w ]+)(?:\)| bui)/i], [m, c, [p, k]], [/(surface duo)/i], [c, [m, R], [p, k]], [/droid [\d\.]+; (fp\du?)(?: b|\))/i], [c, [m, "Fairphone"], [p, g]], [/(u304aa)/i], [c, [m, "AT&T"], [p, g]], [/\bsie-(\w*)/i], [c, [m, "Siemens"], [p, g]], [/\b(rct\w+) b/i], [c, [m, "RCA"], [p, k]], [/\b(venue[\d ]{2,7}) b/i], [c, [m, "Dell"], [p, k]], [/\b(q(?:mv|ta)\w+) b/i], [c, [m, "Verizon"], [p, k]], [/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i], [c, [m, "Barnes & Noble"], [p, k]], [/\b(tm\d{3}\w+) b/i], [c, [m, "NuVision"], [p, k]], [/\b(k88) b/i], [c, [m, "ZTE"], [p, k]], [/\b(nx\d{3}j) b/i], [c, [m, "ZTE"], [p, g]], [/\b(gen\d{3}) b.+49h/i], [c, [m, "Swiss"], [p, g]], [/\b(zur\d{3}) b/i], [c, [m, "Swiss"], [p, k]], [/\b((zeki)?tb.*\b) b/i], [c, [m, "Zeki"], [p, k]], [/\b([yr]\d{2}) b/i, /\b(dragon[- ]+touch |dt)(\w{5}) b/i], [[m, "Dragon Touch"], c, [p, k]], [/\b(ns-?\w{0,9}) b/i], [c, [m, "Insignia"], [p, k]], [/\b((nxa|next)-?\w{0,9}) b/i], [c, [m, "NextBook"], [p, k]], [/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i], [[m, "Voice"], c, [p, g]], [/\b(lvtel\-)?(v1[12]) b/i], [[m, "LvTel"], c, [p, g]], [/\b(ph-1) /i], [c, [m, "Essential"], [p, g]], [/\b(v(100md|700na|7011|917g).*\b) b/i], [c, [m, "Envizen"], [p, k]], [/\b(trio[-\w\. ]+) b/i], [c, [m, "MachSpeed"], [p, k]], [/\btu_(1491) b/i], [c, [m, "Rotor"], [p, k]], [/(shield[\w ]+) b/i], [c, [m, "Nvidia"], [p, k]], [/(sprint) (\w+)/i], [m, c, [p, g]], [/(kin\.[onetw]{3})/i], [[c, /\./g, " "], [m, R], [p, g]], [/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i], [c, [m, G], [p, k]], [/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i], [c, [m, G], [p, g]], [/smart-tv.+(samsung)/i], [m, [p, x]], [/hbbtv.+maple;(\d+)/i], [[c, /^/, "SmartTV"], [m, V], [p, x]], [/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i], [[m, P], [p, x]], [/(apple) ?tv/i], [m, [c, S + " TV"], [p, x]], [/crkey/i], [[c, C + "cast"], [m, U], [p, x]], [/droid.+aft(\w)( bui|\))/i], [c, [m, T], [p, x]], [/\(dtv[\);].+(aquos)/i, /(aquos-tv[\w ]+)\)/i], [c, [m, D], [p, x]], [/(bravia[\w ]+)( bui|\))/i], [c, [m, I], [p, x]], [/(mitv-\w{5}) bui/i], [c, [m, F], [p, x]], [/Hbbtv.*(technisat) (.*);/i], [m, c, [p, x]], [/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i, /hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i], [[m, trim], [c, trim], [p, x]], [/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i], [[p, x]], [/(ouya)/i, /(nintendo) ([wids3utch]+)/i], [m, c, [p, v]], [/droid.+; (shield) bui/i], [c, [m, "Nvidia"], [p, v]], [/(playstation [345portablevi]+)/i], [c, [m, I], [p, v]], [/\b(xbox(?: one)?(?!; xbox))[\); ]/i], [c, [m, R], [p, v]], [/((pebble))app/i], [m, c, [p, _]], [/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i], [c, [m, S], [p, _]], [/droid.+; (glass) \d/i], [c, [m, U], [p, _]], [/droid.+; (wt63?0{2,3})\)/i], [c, [m, G], [p, _]], [/(quest( 2| pro)?)/i], [c, [m, H], [p, _]], [/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i], [m, [p, y]], [/(aeobc)\b/i], [c, [m, T], [p, y]], [/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i], [c, [p, g]], [/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i], [c, [p, k]], [/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i], [[p, k]], [/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i], [[p, g]], [/(android[-\w\. ]{0,9});.+buil/i], [c, [m, "Generic"]]], engine: [[/windows.+ edge\/([\w\.]+)/i], [f, [u, E + "HTML"]], [/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i], [f, [u, "Blink"]], [/(presto)\/([\w\.]+)/i, /(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i, /ekioh(flow)\/([\w\.]+)/i, /(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i, /(icab)[\/ ]([23]\.[\d\.]+)/i, /\b(libweb)/i], [u, f], [/rv\:([\w\.]{1,9})\b.+(gecko)/i], [f, u]], os: [[/microsoft (windows) (vista|xp)/i], [u, f], [/(windows) nt 6\.2; (arm)/i, /(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i, /(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i], [u, [f, strMapper, X]], [/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i], [[u, "Windows"], [f, strMapper, X]], [/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i, /ios;fbsv\/([\d\.]+)/i, /cfnetwork\/.+darwin/i], [[f, /_/g, "."], [u, "iOS"]], [/(mac os x) ?([\w\. ]*)/i, /(macintosh|mac_powerpc\b)(?!.+haiku)/i], [[u, Z], [f, /_/g, "."]], [/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i], [f, u], [/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i, /(blackberry)\w*\/([\w\.]*)/i, /(tizen|kaios)[\/ ]([\w\.]+)/i, /\((series40);/i], [u, f], [/\(bb(10);/i], [f, [u, N]], [/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i], [f, [u, "Symbian"]], [/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i], [f, [u, O + " OS"]], [/web0s;.+rt(tv)/i, /\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i], [f, [u, "webOS"]], [/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i], [f, [u, "watchOS"]], [/crkey\/([\d\.]+)/i], [f, [u, C + "cast"]], [/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i], [[u, L], f], [/panasonic;(viera)/i, /(netrange)mmh/i, /(nettv)\/(\d+\.[\w\.]+)/i, /(nintendo|playstation) ([wids345portablevuch]+)/i, /(xbox); +xbox ([^\);]+)/i, /\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i, /(mint)[\/\(\) ]?(\w*)/i, /(mageia|vectorlinux)[; ]/i, /([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i, /(hurd|linux) ?([\w\.]*)/i, /(gnu) ?([\w\.]*)/i, /\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i, /(haiku) (\w+)/i], [u, f], [/(sunos) ?([\w\.\d]*)/i], [[u, "Solaris"], f], [/((?:open)?solaris)[-\/ ]?([\w\.]*)/i, /(aix) ((\d)(?=\.|\)| )[\w\.])*/i, /\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i, /(unix) ?([\w\.]*)/i], [u, f]] };
1406
+ var UAParser = function(i3, e3) {
1407
+ if (typeof i3 === w) {
1408
+ e3 = i3;
1409
+ i3 = a;
1410
+ }
1411
+ if (!(this instanceof UAParser)) {
1412
+ return new UAParser(i3, e3).getResult();
1413
+ }
1414
+ var r2 = typeof o2 !== b && o2.navigator ? o2.navigator : a;
1415
+ var n2 = i3 || (r2 && r2.userAgent ? r2.userAgent : t);
1416
+ var v2 = r2 && r2.userAgentData ? r2.userAgentData : a;
1417
+ var x2 = e3 ? extend(K, e3) : K;
1418
+ var _2 = r2 && r2.userAgent == n2;
1419
+ this.getBrowser = function() {
1420
+ var i4 = {};
1421
+ i4[u] = a;
1422
+ i4[f] = a;
1423
+ rgxMapper.call(i4, n2, x2.browser);
1424
+ i4[d] = majorize(i4[f]);
1425
+ if (_2 && r2 && r2.brave && typeof r2.brave.isBrave == s) {
1426
+ i4[u] = "Brave";
1427
+ }
1428
+ return i4;
1429
+ };
1430
+ this.getCPU = function() {
1431
+ var i4 = {};
1432
+ i4[h] = a;
1433
+ rgxMapper.call(i4, n2, x2.cpu);
1434
+ return i4;
1435
+ };
1436
+ this.getDevice = function() {
1437
+ var i4 = {};
1438
+ i4[m] = a;
1439
+ i4[c] = a;
1440
+ i4[p] = a;
1441
+ rgxMapper.call(i4, n2, x2.device);
1442
+ if (_2 && !i4[p] && v2 && v2.mobile) {
1443
+ i4[p] = g;
1444
+ }
1445
+ if (_2 && i4[c] == "Macintosh" && r2 && typeof r2.standalone !== b && r2.maxTouchPoints && r2.maxTouchPoints > 2) {
1446
+ i4[c] = "iPad";
1447
+ i4[p] = k;
1448
+ }
1449
+ return i4;
1450
+ };
1451
+ this.getEngine = function() {
1452
+ var i4 = {};
1453
+ i4[u] = a;
1454
+ i4[f] = a;
1455
+ rgxMapper.call(i4, n2, x2.engine);
1456
+ return i4;
1457
+ };
1458
+ this.getOS = function() {
1459
+ var i4 = {};
1460
+ i4[u] = a;
1461
+ i4[f] = a;
1462
+ rgxMapper.call(i4, n2, x2.os);
1463
+ if (_2 && !i4[u] && v2 && v2.platform != "Unknown") {
1464
+ i4[u] = v2.platform.replace(/chrome os/i, L).replace(/macos/i, Z);
1465
+ }
1466
+ return i4;
1467
+ };
1468
+ this.getResult = function() {
1469
+ return { ua: this.getUA(), browser: this.getBrowser(), engine: this.getEngine(), os: this.getOS(), device: this.getDevice(), cpu: this.getCPU() };
1470
+ };
1471
+ this.getUA = function() {
1472
+ return n2;
1473
+ };
1474
+ this.setUA = function(i4) {
1475
+ n2 = typeof i4 === l && i4.length > q ? trim(i4, q) : i4;
1476
+ return this;
1477
+ };
1478
+ this.setUA(n2);
1479
+ return this;
1480
+ };
1481
+ UAParser.VERSION = r;
1482
+ UAParser.BROWSER = enumerize([u, f, d]);
1483
+ UAParser.CPU = enumerize([h]);
1484
+ UAParser.DEVICE = enumerize([c, m, p, v, g, x, k, _, y]);
1485
+ UAParser.ENGINE = UAParser.OS = enumerize([u, f]);
1486
+ if (typeof e2 !== b) {
1487
+ if ("object" !== b && i2.exports) {
1488
+ e2 = i2.exports = UAParser;
1489
+ }
1490
+ e2.UAParser = UAParser;
1491
+ } else {
1492
+ if (typeof define === s && define.amd) {
1493
+ define(function() {
1494
+ return UAParser;
1495
+ });
1496
+ } else if (typeof o2 !== b) {
1497
+ o2.UAParser = UAParser;
1498
+ }
1499
+ }
1500
+ var Q = typeof o2 !== b && (o2.jQuery || o2.Zepto);
1501
+ if (Q && !Q.ua) {
1502
+ var Y = new UAParser();
1503
+ Q.ua = Y.getResult();
1504
+ Q.ua.get = function() {
1505
+ return Y.getUA();
1506
+ };
1507
+ Q.ua.set = function(i3) {
1508
+ Y.setUA(i3);
1509
+ var e3 = Y.getResult();
1510
+ for (var o3 in e3) {
1511
+ Q.ua[o3] = e3[o3];
1512
+ }
1513
+ };
1514
+ }
1515
+ })(typeof window === "object" ? window : this);
1516
+ } };
1517
+ var e = {};
1518
+ function __nccwpck_require__(o2) {
1519
+ var a = e[o2];
1520
+ if (a !== void 0) {
1521
+ return a.exports;
1522
+ }
1523
+ var r = e[o2] = { exports: {} };
1524
+ var t = true;
1525
+ try {
1526
+ i[o2].call(r.exports, r, r.exports, __nccwpck_require__);
1527
+ t = false;
1528
+ } finally {
1529
+ if (t)
1530
+ delete e[o2];
1531
+ }
1532
+ return r.exports;
1533
+ }
1534
+ if (typeof __nccwpck_require__ !== "undefined")
1535
+ __nccwpck_require__.ab = __dirname + "/";
1536
+ var o = __nccwpck_require__(226);
1537
+ module.exports = o;
1538
+ })();
1539
+ }
1540
+ });
1541
+
1542
+ // node_modules/next/dist/server/web/spec-extension/user-agent.js
1543
+ var require_user_agent = __commonJS({
1544
+ "node_modules/next/dist/server/web/spec-extension/user-agent.js"(exports) {
1545
+ "use strict";
1546
+ Object.defineProperty(exports, "__esModule", {
1547
+ value: true
1548
+ });
1549
+ function _export(target, all) {
1550
+ for (var name in all)
1551
+ Object.defineProperty(target, name, {
1552
+ enumerable: true,
1553
+ get: all[name]
1554
+ });
1555
+ }
1556
+ _export(exports, {
1557
+ isBot: function() {
1558
+ return isBot;
1559
+ },
1560
+ userAgent: function() {
1561
+ return userAgent;
1562
+ },
1563
+ userAgentFromString: function() {
1564
+ return userAgentFromString;
1565
+ }
1566
+ });
1567
+ var _uaparserjs = /* @__PURE__ */ _interop_require_default(require_ua_parser());
1568
+ function _interop_require_default(obj) {
1569
+ return obj && obj.__esModule ? obj : {
1570
+ default: obj
1571
+ };
1572
+ }
1573
+ function isBot(input) {
1574
+ return /Googlebot|Mediapartners-Google|AdsBot-Google|googleweblight|Storebot-Google|Google-PageRenderer|Google-InspectionTool|Bingbot|BingPreview|Slurp|DuckDuckBot|baiduspider|yandex|sogou|LinkedInBot|bitlybot|tumblr|vkShare|quora link preview|facebookexternalhit|facebookcatalog|Twitterbot|applebot|redditbot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|ia_archiver/i.test(input);
1575
+ }
1576
+ function userAgentFromString(input) {
1577
+ return {
1578
+ ...(0, _uaparserjs.default)(input),
1579
+ isBot: input === void 0 ? false : isBot(input)
1580
+ };
1581
+ }
1582
+ function userAgent({ headers }) {
1583
+ return userAgentFromString(headers.get("user-agent") || void 0);
1584
+ }
1585
+ }
1586
+ });
1587
+
1588
+ // node_modules/next/dist/server/web/spec-extension/url-pattern.js
1589
+ var require_url_pattern = __commonJS({
1590
+ "node_modules/next/dist/server/web/spec-extension/url-pattern.js"(exports) {
1591
+ "use strict";
1592
+ Object.defineProperty(exports, "__esModule", {
1593
+ value: true
1594
+ });
1595
+ Object.defineProperty(exports, "URLPattern", {
1596
+ enumerable: true,
1597
+ get: function() {
1598
+ return GlobalURLPattern;
1599
+ }
1600
+ });
1601
+ var GlobalURLPattern = (
1602
+ // @ts-expect-error: URLPattern is not available in Node.js
1603
+ typeof URLPattern === "undefined" ? void 0 : URLPattern
1604
+ );
1605
+ }
1606
+ });
1607
+
1608
+ // node_modules/next/server.js
1609
+ var require_server = __commonJS({
1610
+ "node_modules/next/server.js"(exports, module) {
1611
+ "use strict";
1612
+ var serverExports = {
1613
+ NextRequest: require_request().NextRequest,
1614
+ NextResponse: require_response().NextResponse,
1615
+ ImageResponse: require_image_response().ImageResponse,
1616
+ userAgentFromString: require_user_agent().userAgentFromString,
1617
+ userAgent: require_user_agent().userAgent,
1618
+ URLPattern: require_url_pattern().URLPattern
1619
+ };
1620
+ module.exports = serverExports;
1621
+ exports.NextRequest = serverExports.NextRequest;
1622
+ exports.NextResponse = serverExports.NextResponse;
1623
+ exports.ImageResponse = serverExports.ImageResponse;
1624
+ exports.userAgentFromString = serverExports.userAgentFromString;
1625
+ exports.userAgent = serverExports.userAgent;
1626
+ exports.URLPattern = serverExports.URLPattern;
1627
+ }
1628
+ });
5
1629
 
6
1630
  // platforms/nextjs.ts
7
- import { NextResponse } from "next/server";
1631
+ var import_server = __toESM(require_server());
8
1632
  var BAD_REQUEST = 400;
9
1633
  function verifySignature(handler, config) {
10
1634
  const currentSigningKey = config?.currentSigningKey ?? process.env.QSTASH_CURRENT_SIGNING_KEY;
@@ -79,7 +1703,7 @@ function verifySignatureEdge(handler, config) {
79
1703
  const requestClone = request.clone();
80
1704
  const signature = request.headers.get("upstash-signature");
81
1705
  if (!signature) {
82
- return new NextResponse(new TextEncoder().encode("`Upstash-Signature` header is missing"), {
1706
+ return new import_server.NextResponse(new TextEncoder().encode("`Upstash-Signature` header is missing"), {
83
1707
  status: 403
84
1708
  });
85
1709
  }
@@ -93,7 +1717,7 @@ function verifySignatureEdge(handler, config) {
93
1717
  clockTolerance: config?.clockTolerance
94
1718
  });
95
1719
  if (!isValid) {
96
- return new NextResponse(new TextEncoder().encode("invalid signature"), { status: 403 });
1720
+ return new import_server.NextResponse(new TextEncoder().encode("invalid signature"), { status: 403 });
97
1721
  }
98
1722
  return handler(request, nfe);
99
1723
  };
@@ -119,7 +1743,7 @@ function verifySignatureAppRouter(handler, config) {
119
1743
  const requestClone = request.clone();
120
1744
  const signature = request.headers.get("upstash-signature");
121
1745
  if (!signature) {
122
- return new NextResponse(new TextEncoder().encode("`Upstash-Signature` header is missing"), {
1746
+ return new import_server.NextResponse(new TextEncoder().encode("`Upstash-Signature` header is missing"), {
123
1747
  status: 403
124
1748
  });
125
1749
  }
@@ -133,14 +1757,14 @@ function verifySignatureAppRouter(handler, config) {
133
1757
  clockTolerance: config?.clockTolerance
134
1758
  });
135
1759
  if (!isValid) {
136
- return new NextResponse(new TextEncoder().encode("invalid signature"), { status: 403 });
1760
+ return new import_server.NextResponse(new TextEncoder().encode("invalid signature"), { status: 403 });
137
1761
  }
138
1762
  return handler(request, params);
139
1763
  };
140
1764
  }
141
1765
  var serve2 = (routeFunction, options) => {
142
1766
  const handler = serve(routeFunction, {
143
- onStepFinish: (workflowRunId) => new NextResponse(JSON.stringify({ workflowRunId }), { status: 200 }),
1767
+ onStepFinish: (workflowRunId) => new import_server.NextResponse(JSON.stringify({ workflowRunId }), { status: 200 }),
144
1768
  ...options
145
1769
  });
146
1770
  return async (request) => {