/
opt
/
canhelp
/
node_modules
/
next
/
dist
/
server
/
web
/
/opt/canhelp/node_modules/next/dist/server/web
mkdir
upload
Name
Size
Mode
Actions
exports/
-
0755
rm
sandbox/
-
0755
rm
spec-extension/
-
0755
rm
adapter.d.ts
1021
0644
edit
dl
rm
adapter.js
18574
0644
edit
dl
rm
adapter.js.map
28406
0644
edit
dl
rm
edge-route-module-wrapper.d.ts
1367
0644
edit
dl
rm
edge-route-module-wrapper.js
5184
0644
edit
dl
rm
edge-route-module-wrapper.js.map
8522
0644
edit
dl
rm
error.d.ts
264
0644
edit
dl
rm
error.js
1423
0644
edit
dl
rm
error.js.map
1396
0644
edit
dl
rm
get-edge-preview-props.d.ts
387
0644
edit
dl
rm
get-edge-preview-props.js
802
0644
edit
dl
rm
get-edge-preview-props.js.map
1067
0644
edit
dl
rm
globals.d.ts
402
0644
edit
dl
rm
globals.js
4830
0644
edit
dl
rm
globals.js.map
6158
0644
edit
dl
rm
http.d.ts
674
0644
edit
dl
rm
http.js
795
0644
edit
dl
rm
http.js.map
1124
0644
edit
dl
rm
internal-edge-wait-until.d.ts
156
0644
edit
dl
rm
internal-edge-wait-until.js
2172
0644
edit
dl
rm
internal-edge-wait-until.js.map
2932
0644
edit
dl
rm
next-url.d.ts
1752
0644
edit
dl
rm
next-url.js
7440
0644
edit
dl
rm
next-url.js.map
13248
0644
edit
dl
rm
types.d.ts
1941
0644
edit
dl
rm
types.js
115
0644
edit
dl
rm
types.js.map
67
0644
edit
dl
rm
utils.d.ts
1249
0644
edit
dl
rm
utils.js
4914
0644
edit
dl
rm
utils.js.map
8365
0644
edit
dl
rm
web-on-close.d.ts
542
0644
edit
dl
rm
web-on-close.js
2785
0644
edit
dl
rm
web-on-close.js.map
3406
0644
edit
dl
rm
Edit:
/opt/canhelp/node_modules/next/dist/server/web/next-url.js
(7440B)
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "NextURL", { enumerable: true, get: function() { return NextURL; } }); const _detectdomainlocale = require("../../shared/lib/i18n/detect-domain-locale"); const _formatnextpathnameinfo = require("../../shared/lib/router/utils/format-next-pathname-info"); const _gethostname = require("../../shared/lib/get-hostname"); const _getnextpathnameinfo = require("../../shared/lib/router/utils/get-next-pathname-info"); const REGEX_LOCALHOST_HOSTNAME = /(?!^https?:\/\/)(127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}|\[::1\]|localhost)/; function parseURL(url, base) { return new URL(String(url).replace(REGEX_LOCALHOST_HOSTNAME, 'localhost'), base && String(base).replace(REGEX_LOCALHOST_HOSTNAME, 'localhost')); } const Internal = Symbol('NextURLInternal'); class NextURL { constructor(input, baseOrOpts, opts){ let base; let options; if (typeof baseOrOpts === 'object' && 'pathname' in baseOrOpts || typeof baseOrOpts === 'string') { base = baseOrOpts; options = opts || {}; } else { options = opts || baseOrOpts || {}; } this[Internal] = { url: parseURL(input, base ?? options.base), options: options, basePath: '' }; this.analyze(); } analyze() { var _this_Internal_options_nextConfig_i18n, _this_Internal_options_nextConfig, _this_Internal_domainLocale, _this_Internal_options_nextConfig_i18n1, _this_Internal_options_nextConfig1; const info = (0, _getnextpathnameinfo.getNextPathnameInfo)(this[Internal].url.pathname, { nextConfig: this[Internal].options.nextConfig, parseData: !process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE, i18nProvider: this[Internal].options.i18nProvider }); const hostname = (0, _gethostname.getHostname)(this[Internal].url, this[Internal].options.headers); 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); 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); this[Internal].url.pathname = info.pathname; this[Internal].defaultLocale = defaultLocale; this[Internal].basePath = info.basePath ?? ''; this[Internal].buildId = info.buildId; this[Internal].locale = info.locale ?? defaultLocale; this[Internal].trailingSlash = info.trailingSlash; } formatPathname() { return (0, _formatnextpathnameinfo.formatNextPathnameInfo)({ basePath: this[Internal].basePath, buildId: this[Internal].buildId, defaultLocale: !this[Internal].options.forceLocale ? this[Internal].defaultLocale : undefined, locale: this[Internal].locale, pathname: this[Internal].url.pathname, trailingSlash: this[Internal].trailingSlash }); } formatSearch() { return this[Internal].url.search; } get buildId() { return this[Internal].buildId; } set buildId(buildId) { this[Internal].buildId = buildId; } get locale() { return this[Internal].locale ?? ''; } set locale(locale) { var _this_Internal_options_nextConfig_i18n, _this_Internal_options_nextConfig; 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))) { throw Object.defineProperty(new TypeError(`The NextURL configuration includes no locale "${locale}"`), "__NEXT_ERROR_CODE", { value: "E597", enumerable: false, configurable: true }); } this[Internal].locale = locale; } get defaultLocale() { return this[Internal].defaultLocale; } get domainLocale() { return this[Internal].domainLocale; } get searchParams() { return this[Internal].url.searchParams; } get host() { return this[Internal].url.host; } set host(value) { this[Internal].url.host = value; } get hostname() { return this[Internal].url.hostname; } set hostname(value) { this[Internal].url.hostname = value; } get port() { return this[Internal].url.port; } set port(value) { this[Internal].url.port = value; } get protocol() { return this[Internal].url.protocol; } set protocol(value) { this[Internal].url.protocol = value; } get href() { const pathname = this.formatPathname(); const search = this.formatSearch(); return `${this.protocol}//${this.host}${pathname}${search}${this.hash}`; } set href(url) { this[Internal].url = parseURL(url); this.analyze(); } get origin() { return this[Internal].url.origin; } get pathname() { return this[Internal].url.pathname; } set pathname(value) { this[Internal].url.pathname = value; } get hash() { return this[Internal].url.hash; } set hash(value) { this[Internal].url.hash = value; } get search() { return this[Internal].url.search; } set search(value) { this[Internal].url.search = value; } get password() { return this[Internal].url.password; } set password(value) { this[Internal].url.password = value; } get username() { return this[Internal].url.username; } set username(value) { this[Internal].url.username = value; } get basePath() { return this[Internal].basePath; } set basePath(value) { this[Internal].basePath = value.startsWith('/') ? value : `/${value}`; } toString() { return this.href; } toJSON() { return this.href; } [Symbol.for('edge-runtime.inspect.custom')]() { return { href: this.href, origin: this.origin, protocol: this.protocol, username: this.username, password: this.password, host: this.host, hostname: this.hostname, port: this.port, pathname: this.pathname, search: this.search, searchParams: this.searchParams, hash: this.hash }; } clone() { return new NextURL(String(this), this[Internal].options); } } //# sourceMappingURL=next-url.js.map
Save
cmd:
run