/opt/canhelp/node_modules/next/dist/esm/shared/lib
NameSizeModeActions
errors/-0755rm
i18n/-0755rm
isomorphic/-0755rm
lazy-dynamic/-0755rm
page-path/-0755rm
router/-0755rm
segment-cache/-0755rm
turbopack/-0755rm
utils/-0755rm
amp-context.shared-runtime.js2380644editdlrm
amp-context.shared-runtime.js.map5800644editdlrm
amp-mode.js2150644editdlrm
amp-mode.js.map4690644editdlrm
amp.js3190644editdlrm
amp.js.map6260644editdlrm
app-dynamic.js6100644editdlrm
app-dynamic.js.map18750644editdlrm
app-router-context.shared-runtime.js7050644editdlrm
app-router-context.shared-runtime.js.map62550644editdlrm
bloom-filter.js27610644editdlrm
bloom-filter.js.map54920644editdlrm
canary-only.js8180644editdlrm
canary-only.js.map14240644editdlrm
constants.js69750644editdlrm
constants.js.map117540644editdlrm
deep-freeze.js10460644editdlrm
deep-freeze.js.map17590644editdlrm
deep-readonly.js2790644editdlrm
deep-readonly.js.map5750644editdlrm
dset.d.ts1170644editdlrm
dset.js17240644editdlrm
dset.js.map25540644editdlrm
dynamic.js44310644editdlrm
dynamic.js.map75070644editdlrm
encode-uri-path.js1540644editdlrm
encode-uri-path.js.map4520644editdlrm
error-source.js3790644editdlrm
error-source.js.map9830644editdlrm
escape-regexp.js4760644editdlrm
escape-regexp.js.map8350644editdlrm
fnv1a.js25840644editdlrm
fnv1a.js.map40720644editdlrm
format-webpack-messages.js81210644editdlrm
format-webpack-messages.js.map129540644editdlrm
get-hostname.js7490644editdlrm
get-hostname.js.map13790644editdlrm
get-img-props.js249440644editdlrm
get-img-props.js.map378080644editdlrm
get-rspack.js20960644editdlrm
get-rspack.js.map27600644editdlrm
get-webpack-bundler.js4090644editdlrm
get-webpack-bundler.js.map7370644editdlrm
hash.js9010644editdlrm
hash.js.map14840644editdlrm
head-manager-context.shared-runtime.js2560644editdlrm
head-manager-context.shared-runtime.js.map8620644editdlrm
head.js57410644editdlrm
head.js.map96030644editdlrm
hooks-client-context.shared-runtime.js4970644editdlrm
hooks-client-context.shared-runtime.js.map10810644editdlrm
html-context.shared-runtime.js6880644editdlrm
html-context.shared-runtime.js.map27550644editdlrm
image-blur-svg.js12830644editdlrm
image-blur-svg.js.map21070644editdlrm
image-config-context.shared-runtime.js3250644editdlrm
image-config-context.shared-runtime.js.map7830644editdlrm
image-config.js9550644editdlrm
image-config.js.map59040644editdlrm
image-external.js12120644editdlrm
image-external.js.map21930644editdlrm
image-loader.js48650644editdlrm
image-loader.js.map67440644editdlrm
invariant-error.js2910644editdlrm
invariant-error.js.map6660644editdlrm
is-internal.js7480644editdlrm
is-internal.js.map12620644editdlrm
is-plain-object.js7040644editdlrm
is-plain-object.js.map12040644editdlrm
is-thenable.js3350644editdlrm
is-thenable.js.map6640644editdlrm
loadable-context.shared-runtime.js2590644editdlrm
loadable-context.shared-runtime.js.map6510644editdlrm
loadable.shared-runtime.js80110644editdlrm
loadable.shared-runtime.js.map138270644editdlrm
magic-identifier.js31450644editdlrm
magic-identifier.js.map41010644editdlrm
match-local-pattern.js8780644editdlrm
match-local-pattern.js.map16720644editdlrm
match-remote-pattern.js14860644editdlrm
match-remote-pattern.js.map26850644editdlrm
mitt.js20620644editdlrm
mitt.js.map29980644editdlrm
modern-browserslist-target.d.ts1990644editdlrm
modern-browserslist-target.js6380644editdlrm
modern-browserslist-target.js.map8930644editdlrm
no-fallback-error.external.js1960644editdlrm
no-fallback-error.external.js.map4100644editdlrm
normalized-asset-prefix.js7370644editdlrm
normalized-asset-prefix.js.map12970644editdlrm
promise-with-resolvers.js3720644editdlrm
promise-with-resolvers.js.map7620644editdlrm
router-context.shared-runtime.js2370644editdlrm
router-context.shared-runtime.js.map6210644editdlrm
runtime-config.external.js3730644editdlrm
runtime-config.external.js.map6510644editdlrm
segment.js7410644editdlrm
segment.js.map16450644editdlrm
server-inserted-html.shared-runtime.js7480644editdlrm
server-inserted-html.shared-runtime.js.map13830644editdlrm
server-reference-info.js18650644editdlrm
server-reference-info.js.map33340644editdlrm
side-effect.js25660644editdlrm
side-effect.js.map39540644editdlrm
styled-jsx.d.ts430644editdlrm
styled-jsx.js850644editdlrm
styled-jsx.js.map2300644editdlrm
utils.js47280644editdlrm
utils.js.map158240644editdlrm
zod.js26320644editdlrm
zod.js.map44900644editdlrm
Edit: /opt/canhelp/node_modules/next/dist/esm/shared/lib/utils.js (4728B)
/** * Web vitals provided to _app.reportWebVitals by Core Web Vitals plugin developed by Google Chrome team. * https://nextjs.org/blog/next-9-4#integrated-web-vitals-reporting */ export const WEB_VITALS = [ 'CLS', 'FCP', 'FID', 'INP', 'LCP', 'TTFB' ]; /** * Utils */ export function execOnce(fn) { let used = false; let result; return function() { for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){ args[_key] = arguments[_key]; } if (!used) { used = true; result = fn(...args); } return result; }; } // Scheme: https://tools.ietf.org/html/rfc3986#section-3.1 // Absolute URL: https://tools.ietf.org/html/rfc3986#section-4.3 const ABSOLUTE_URL_REGEX = /^[a-zA-Z][a-zA-Z\d+\-.]*?:/; export const isAbsoluteUrl = (url)=>ABSOLUTE_URL_REGEX.test(url); export function getLocationOrigin() { const { protocol, hostname, port } = window.location; return protocol + "//" + hostname + (port ? ':' + port : ''); } export function getURL() { const { href } = window.location; const origin = getLocationOrigin(); return href.substring(origin.length); } export function getDisplayName(Component) { return typeof Component === 'string' ? Component : Component.displayName || Component.name || 'Unknown'; } export function isResSent(res) { return res.finished || res.headersSent; } export function normalizeRepeatedSlashes(url) { const urlParts = url.split('?'); const urlNoQuery = urlParts[0]; return urlNoQuery// first we replace any non-encoded backslashes with forward // then normalize repeated forward slashes .replace(/\\/g, '/').replace(/\/\/+/g, '/') + (urlParts[1] ? "?" + urlParts.slice(1).join('?') : ''); } export async function loadGetInitialProps(App, ctx) { if (process.env.NODE_ENV !== 'production') { var _App_prototype; if ((_App_prototype = App.prototype) == null ? void 0 : _App_prototype.getInitialProps) { 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.'; throw Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } } // when called from _app `ctx` is nested in `ctx` const res = ctx.res || ctx.ctx && ctx.ctx.res; if (!App.getInitialProps) { if (ctx.ctx && ctx.Component) { // @ts-ignore pageProps default return { pageProps: await loadGetInitialProps(ctx.Component, ctx.ctx) }; } return {}; } const props = await App.getInitialProps(ctx); if (res && isResSent(res)) { return props; } if (!props) { const message = '"' + getDisplayName(App) + '.getInitialProps()" should resolve to an object. But found "' + props + '" instead.'; throw Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } if (process.env.NODE_ENV !== 'production') { if (Object.keys(props).length === 0 && !ctx.ctx) { 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"); } } return props; } export const SP = typeof performance !== 'undefined'; export const ST = SP && [ 'mark', 'measure', 'getEntriesByName' ].every((method)=>typeof performance[method] === 'function'); export class DecodeError extends Error { } export class NormalizeError extends Error { } export class PageNotFoundError extends Error { constructor(page){ super(); this.code = 'ENOENT'; this.name = 'PageNotFoundError'; this.message = "Cannot find module for page: " + page; } } export class MissingStaticPage extends Error { constructor(page, message){ super(); this.message = "Failed to load static file for page: " + page + " " + message; } } export class MiddlewareNotFoundError extends Error { constructor(){ super(); this.code = 'ENOENT'; this.message = "Cannot find the middleware module"; } } export function stringifyError(error) { return JSON.stringify({ message: error.message, stack: error.stack }); } //# sourceMappingURL=utils.js.map