main repo

This commit is contained in:
Basilosaurusrex
2025-11-24 18:09:40 +01:00
parent b636ee5e70
commit f027651f9b
34146 changed files with 4436636 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
import React from 'react';
export declare const AmpStateContext: React.Context<any>;

View File

@@ -0,0 +1,18 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "AmpStateContext", {
enumerable: true,
get: function() {
return AmpStateContext;
}
});
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
const _react = /*#__PURE__*/ _interop_require_default._(require("react"));
const AmpStateContext = _react.default.createContext({});
if (process.env.NODE_ENV !== "production") {
AmpStateContext.displayName = "AmpStateContext";
}
//# sourceMappingURL=amp-context.shared-runtime.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/shared/lib/amp-context.shared-runtime.ts"],"names":["AmpStateContext","React","createContext","process","env","NODE_ENV","displayName"],"mappings":";;;;+BAEaA;;;eAAAA;;;;gEAFK;AAEX,MAAMA,kBAAsCC,cAAK,CAACC,aAAa,CAAC,CAAC;AAExE,IAAIC,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;IACzCL,gBAAgBM,WAAW,GAAG;AAChC"}

5
node_modules/next/dist/shared/lib/amp-mode.d.ts generated vendored Normal file
View File

@@ -0,0 +1,5 @@
export declare function isInAmpMode({ ampFirst, hybrid, hasQuery, }?: {
ampFirst?: boolean | undefined;
hybrid?: boolean | undefined;
hasQuery?: boolean | undefined;
}): boolean;

16
node_modules/next/dist/shared/lib/amp-mode.js generated vendored Normal file
View File

@@ -0,0 +1,16 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "isInAmpMode", {
enumerable: true,
get: function() {
return isInAmpMode;
}
});
function isInAmpMode(param) {
let { ampFirst = false, hybrid = false, hasQuery = false } = param === void 0 ? {} : param;
return ampFirst || hybrid && hasQuery;
}
//# sourceMappingURL=amp-mode.js.map

1
node_modules/next/dist/shared/lib/amp-mode.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/shared/lib/amp-mode.ts"],"names":["isInAmpMode","ampFirst","hybrid","hasQuery"],"mappings":";;;;+BAAgBA;;;eAAAA;;;AAAT,SAASA,YAAY;IAAA,IAAA,EAC1BC,WAAW,KAAK,EAChBC,SAAS,KAAK,EACdC,WAAW,KAAK,EACjB,GAJ2B,mBAIxB,CAAC,IAJuB;IAK1B,OAAOF,YAAaC,UAAUC;AAChC"}

1
node_modules/next/dist/shared/lib/amp.d.ts generated vendored Normal file
View File

@@ -0,0 +1 @@
export declare function useAmp(): boolean;

26
node_modules/next/dist/shared/lib/amp.js generated vendored Normal file
View File

@@ -0,0 +1,26 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "useAmp", {
enumerable: true,
get: function() {
return useAmp;
}
});
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
const _react = /*#__PURE__*/ _interop_require_default._(require("react"));
const _ampcontextsharedruntime = require("./amp-context.shared-runtime");
const _ampmode = require("./amp-mode");
function useAmp() {
// Don't assign the context value to a variable to save bytes
return (0, _ampmode.isInAmpMode)(_react.default.useContext(_ampcontextsharedruntime.AmpStateContext));
}
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', { value: true });
Object.assign(exports.default, exports);
module.exports = exports.default;
}
//# sourceMappingURL=amp.js.map

1
node_modules/next/dist/shared/lib/amp.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/shared/lib/amp.ts"],"names":["useAmp","isInAmpMode","React","useContext","AmpStateContext"],"mappings":";;;;+BAIgBA;;;eAAAA;;;;gEAJE;yCACc;yBACJ;AAErB,SAASA;IACd,6DAA6D;IAC7D,OAAOC,IAAAA,oBAAW,EAACC,cAAK,CAACC,UAAU,CAACC,wCAAe;AACrD"}

31
node_modules/next/dist/shared/lib/app-dynamic.d.ts generated vendored Normal file
View File

@@ -0,0 +1,31 @@
import React from 'react';
type ComponentModule<P = {}> = {
default: React.ComponentType<P>;
};
export declare type LoaderComponent<P = {}> = Promise<React.ComponentType<P> | ComponentModule<P>>;
export declare type Loader<P = {}> = () => LoaderComponent<P>;
export type LoaderMap = {
[module: string]: () => Loader<any>;
};
export type LoadableGeneratedOptions = {
webpack?(): any;
modules?(): LoaderMap;
};
export type DynamicOptionsLoadingProps = {
error?: Error | null;
isLoading?: boolean;
pastDelay?: boolean;
retry?: () => void;
timedOut?: boolean;
};
export type DynamicOptions<P = {}> = LoadableGeneratedOptions & {
loading?: (loadingProps: DynamicOptionsLoadingProps) => JSX.Element | null;
loader?: Loader<P>;
loadableGenerated?: LoadableGeneratedOptions;
ssr?: boolean;
};
export type LoadableOptions<P = {}> = DynamicOptions<P>;
export type LoadableFn<P = {}> = (opts: LoadableOptions<P>) => React.ComponentType<P>;
export type LoadableComponent<P = {}> = React.ComponentType<P>;
export default function dynamic<P = {}>(dynamicOptions: DynamicOptions<P> | Loader<P>, options?: DynamicOptions<P>): React.ComponentType<P>;
export {};

58
node_modules/next/dist/shared/lib/app-dynamic.js generated vendored Normal file
View File

@@ -0,0 +1,58 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: function() {
return dynamic;
}
});
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
const _react = /*#__PURE__*/ _interop_require_default._(require("react"));
const _loadable = /*#__PURE__*/ _interop_require_default._(require("./lazy-dynamic/loadable"));
// Normalize loader to return the module as form { default: Component } for `React.lazy`.
// Also for backward compatible since next/dynamic allows to resolve a component directly with loader
// Client component reference proxy need to be converted to a module.
function convertModule(mod) {
return {
default: (mod == null ? void 0 : mod.default) || mod
};
}
function dynamic(dynamicOptions, options) {
const loadableFn = _loadable.default;
const loadableOptions = {
// A loading component is not required, so we default it
loading: (param)=>{
let { error, isLoading, pastDelay } = param;
if (!pastDelay) return null;
if (process.env.NODE_ENV !== "production") {
if (isLoading) {
return null;
}
if (error) {
return /*#__PURE__*/ _react.default.createElement("p", null, error.message, /*#__PURE__*/ _react.default.createElement("br", null), error.stack);
}
}
return null;
}
};
if (typeof dynamicOptions === "function") {
loadableOptions.loader = dynamicOptions;
}
Object.assign(loadableOptions, options);
const loaderFn = loadableOptions.loader;
const loader = ()=>loaderFn != null ? loaderFn().then(convertModule) : Promise.resolve(convertModule(()=>null));
return loadableFn({
...loadableOptions,
loader: loader
});
}
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', { value: true });
Object.assign(exports.default, exports);
module.exports = exports.default;
}
//# sourceMappingURL=app-dynamic.js.map

1
node_modules/next/dist/shared/lib/app-dynamic.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/shared/lib/app-dynamic.tsx"],"names":["dynamic","convertModule","mod","default","dynamicOptions","options","loadableFn","Loadable","loadableOptions","loading","error","isLoading","pastDelay","process","env","NODE_ENV","p","message","br","stack","loader","Object","assign","loaderFn","then","Promise","resolve"],"mappings":";;;;+BAgDA;;;eAAwBA;;;;gEAhDN;mEACG;AAyBrB,yFAAyF;AACzF,qGAAqG;AACrG,qEAAqE;AACrE,SAASC,cAAiBC,GAAgD;IACxE,OAAO;QAAEC,SAAS,CAACD,uBAAD,AAACA,IAA4BC,OAAO,KAAID;IAAI;AAChE;AAiBe,SAASF,QACtBI,cAA6C,EAC7CC,OAA2B;IAE3B,MAAMC,aAA4BC,iBAAQ;IAE1C,MAAMC,kBAAsC;QAC1C,wDAAwD;QACxDC,SAAS;gBAAC,EAAEC,KAAK,EAAEC,SAAS,EAAEC,SAAS,EAAE;YACvC,IAAI,CAACA,WAAW,OAAO;YACvB,IAAIC,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;gBACzC,IAAIJ,WAAW;oBACb,OAAO;gBACT;gBACA,IAAID,OAAO;oBACT,qBACE,6BAACM,WACEN,MAAMO,OAAO,gBACd,6BAACC,aACAR,MAAMS,KAAK;gBAGlB;YACF;YACA,OAAO;QACT;IACF;IAEA,IAAI,OAAOf,mBAAmB,YAAY;QACxCI,gBAAgBY,MAAM,GAAGhB;IAC3B;IAEAiB,OAAOC,MAAM,CAACd,iBAAiBH;IAE/B,MAAMkB,WAAWf,gBAAgBY,MAAM;IACvC,MAAMA,SAAS,IACbG,YAAY,OACRA,WAAWC,IAAI,CAACvB,iBAChBwB,QAAQC,OAAO,CAACzB,cAAc,IAAM;IAE1C,OAAOK,WAAW;QAAE,GAAGE,eAAe;QAAEY,QAAQA;IAAoB;AACtE"}

View File

@@ -0,0 +1,101 @@
import { FocusAndScrollRef, PrefetchKind } from '../../client/components/router-reducer/router-reducer-types';
import type { fetchServerResponse } from '../../client/components/router-reducer/fetch-server-response';
import type { FlightRouterState, FlightData } from '../../server/app-render/types';
import React from 'react';
export type ChildSegmentMap = Map<string, CacheNode>;
export declare enum CacheStates {
LAZY_INITIALIZED = "LAZYINITIALIZED",
DATA_FETCH = "DATAFETCH",
READY = "READY"
}
/**
* Cache node used in app-router / layout-router.
*/
export type CacheNode = {
status: CacheStates.DATA_FETCH;
/**
* In-flight request for this node.
*/
data: ReturnType<typeof fetchServerResponse> | null;
head?: React.ReactNode;
/**
* React Component for this node.
*/
subTreeData: null;
/**
* Child parallel routes.
*/
parallelRoutes: Map<string, ChildSegmentMap>;
} | {
status: CacheStates.READY;
/**
* In-flight request for this node.
*/
data: null;
head?: React.ReactNode;
/**
* React Component for this node.
*/
subTreeData: React.ReactNode;
/**
* Child parallel routes.
*/
parallelRoutes: Map<string, ChildSegmentMap>;
} | {
status: CacheStates.LAZY_INITIALIZED;
data: null;
head?: React.ReactNode;
subTreeData: null;
/**
* Child parallel routes.
*/
parallelRoutes: Map<string, ChildSegmentMap>;
};
export interface NavigateOptions {
scroll?: boolean;
}
export interface PrefetchOptions {
kind: PrefetchKind;
}
export interface AppRouterInstance {
/**
* Navigate to the previous history entry.
*/
back(): void;
/**
* Navigate to the next history entry.
*/
forward(): void;
/**
* Refresh the current page.
*/
refresh(): void;
/**
* Navigate to the provided href.
* Pushes a new history entry.
*/
push(href: string, options?: NavigateOptions): void;
/**
* Navigate to the provided href.
* Replaces the current history entry.
*/
replace(href: string, options?: NavigateOptions): void;
/**
* Prefetch the provided href.
*/
prefetch(href: string, options?: PrefetchOptions): void;
}
export declare const AppRouterContext: React.Context<AppRouterInstance | null>;
export declare const LayoutRouterContext: React.Context<{
childNodes: CacheNode['parallelRoutes'];
tree: FlightRouterState;
url: string;
}>;
export declare const GlobalLayoutRouterContext: React.Context<{
buildId: string;
tree: FlightRouterState;
changeByServerResponse: (previousTree: FlightRouterState, flightData: FlightData, overrideCanonicalUrl: URL | undefined) => void;
focusAndScrollRef: FocusAndScrollRef;
nextUrl: string | null;
}>;
export declare const TemplateContext: React.Context<React.ReactNode>;

View File

@@ -0,0 +1,56 @@
"use client";
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
CacheStates: null,
AppRouterContext: null,
LayoutRouterContext: null,
GlobalLayoutRouterContext: null,
TemplateContext: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
CacheStates: function() {
return CacheStates;
},
AppRouterContext: function() {
return AppRouterContext;
},
LayoutRouterContext: function() {
return LayoutRouterContext;
},
GlobalLayoutRouterContext: function() {
return GlobalLayoutRouterContext;
},
TemplateContext: function() {
return TemplateContext;
}
});
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
const _react = /*#__PURE__*/ _interop_require_default._(require("react"));
var CacheStates;
(function(CacheStates) {
CacheStates["LAZY_INITIALIZED"] = "LAZYINITIALIZED";
CacheStates["DATA_FETCH"] = "DATAFETCH";
CacheStates["READY"] = "READY";
})(CacheStates || (CacheStates = {}));
const AppRouterContext = _react.default.createContext(null);
const LayoutRouterContext = _react.default.createContext(null);
const GlobalLayoutRouterContext = _react.default.createContext(null);
const TemplateContext = _react.default.createContext(null);
if (process.env.NODE_ENV !== "production") {
AppRouterContext.displayName = "AppRouterContext";
LayoutRouterContext.displayName = "LayoutRouterContext";
GlobalLayoutRouterContext.displayName = "GlobalLayoutRouterContext";
TemplateContext.displayName = "TemplateContext";
}
//# sourceMappingURL=app-router-context.shared-runtime.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/shared/lib/app-router-context.shared-runtime.ts"],"names":["AppRouterContext","LayoutRouterContext","GlobalLayoutRouterContext","TemplateContext","CacheStates","LAZY_INITIALIZED","DATA_FETCH","READY","React","createContext","process","env","NODE_ENV","displayName"],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;IA4GaA,gBAAgB;eAAhBA;;IAGAC,mBAAmB;eAAnBA;;IAKAC,yBAAyB;eAAzBA;;IAYAC,eAAe;eAAfA;;;;gEArHK;IAKX;UAAKC,WAAW;IAAXA,YACVC,sBAAmB;IADTD,YAEVE,gBAAa;IAFHF,YAGVG,WAAAA;GAHUH,gBAAAA;AA4FL,MAAMJ,mBAAmBQ,cAAK,CAACC,aAAa,CACjD;AAEK,MAAMR,sBAAsBO,cAAK,CAACC,aAAa,CAInD;AACI,MAAMP,4BAA4BM,cAAK,CAACC,aAAa,CAUzD;AAEI,MAAMN,kBAAkBK,cAAK,CAACC,aAAa,CAAkB;AAEpE,IAAIC,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;IACzCZ,iBAAiBa,WAAW,GAAG;IAC/BZ,oBAAoBY,WAAW,GAAG;IAClCX,0BAA0BW,WAAW,GAAG;IACxCV,gBAAgBU,WAAW,GAAG;AAChC"}

View File

@@ -0,0 +1,2 @@
export declare const encode: (arraybuffer: ArrayBuffer) => string;
export declare const decode: (base64: string) => ArrayBuffer;

View File

@@ -0,0 +1,66 @@
// original source: https://github.com/niklasvh/base64-arraybuffer/blob/master/src/index.ts
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
encode: null,
decode: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
encode: function() {
return encode;
},
decode: function() {
return decode;
}
});
const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
// Use a lookup table to find the index.
const lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);
for(let i = 0; i < chars.length; i++){
lookup[chars.charCodeAt(i)] = i;
}
const encode = (arraybuffer)=>{
let bytes = new Uint8Array(arraybuffer), i, len = bytes.length, base64 = "";
for(i = 0; i < len; i += 3){
base64 += chars[bytes[i] >> 2];
base64 += chars[(bytes[i] & 3) << 4 | bytes[i + 1] >> 4];
base64 += chars[(bytes[i + 1] & 15) << 2 | bytes[i + 2] >> 6];
base64 += chars[bytes[i + 2] & 63];
}
if (len % 3 === 2) {
base64 = base64.substring(0, base64.length - 1) + "=";
} else if (len % 3 === 1) {
base64 = base64.substring(0, base64.length - 2) + "==";
}
return base64;
};
const decode = (base64)=>{
let bufferLength = base64.length * 0.75, len = base64.length, i, p = 0, encoded1, encoded2, encoded3, encoded4;
if (base64[base64.length - 1] === "=") {
bufferLength--;
if (base64[base64.length - 2] === "=") {
bufferLength--;
}
}
const arraybuffer = new ArrayBuffer(bufferLength), bytes = new Uint8Array(arraybuffer);
for(i = 0; i < len; i += 4){
encoded1 = lookup[base64.charCodeAt(i)];
encoded2 = lookup[base64.charCodeAt(i + 1)];
encoded3 = lookup[base64.charCodeAt(i + 2)];
encoded4 = lookup[base64.charCodeAt(i + 3)];
bytes[p++] = encoded1 << 2 | encoded2 >> 4;
bytes[p++] = (encoded2 & 15) << 4 | encoded3 >> 2;
bytes[p++] = (encoded3 & 3) << 6 | encoded4 & 63;
}
return arraybuffer;
};
//# sourceMappingURL=base64-arraybuffer.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/shared/lib/base64-arraybuffer.ts"],"names":["encode","decode","chars","lookup","Uint8Array","i","length","charCodeAt","arraybuffer","bytes","len","base64","substring","bufferLength","p","encoded1","encoded2","encoded3","encoded4","ArrayBuffer"],"mappings":"AAAA,2FAA2F;;;;;;;;;;;;;;;;IAU9EA,MAAM;eAANA;;IAsBAC,MAAM;eAANA;;;AA9Bb,MAAMC,QAAQ;AAEd,wCAAwC;AACxC,MAAMC,SAAS,OAAOC,eAAe,cAAc,EAAE,GAAG,IAAIA,WAAW;AACvE,IAAK,IAAIC,IAAI,GAAGA,IAAIH,MAAMI,MAAM,EAAED,IAAK;IACrCF,MAAM,CAACD,MAAMK,UAAU,CAACF,GAAG,GAAGA;AAChC;AAEO,MAAML,SAAS,CAACQ;IACrB,IAAIC,QAAQ,IAAIL,WAAWI,cACzBH,GACAK,MAAMD,MAAMH,MAAM,EAClBK,SAAS;IAEX,IAAKN,IAAI,GAAGA,IAAIK,KAAKL,KAAK,EAAG;QAC3BM,UAAUT,KAAK,CAACO,KAAK,CAACJ,EAAE,IAAI,EAAE;QAC9BM,UAAUT,KAAK,CAAC,AAAEO,CAAAA,KAAK,CAACJ,EAAE,GAAG,CAAA,KAAM,IAAMI,KAAK,CAACJ,IAAI,EAAE,IAAI,EAAG;QAC5DM,UAAUT,KAAK,CAAC,AAAEO,CAAAA,KAAK,CAACJ,IAAI,EAAE,GAAG,EAAC,KAAM,IAAMI,KAAK,CAACJ,IAAI,EAAE,IAAI,EAAG;QACjEM,UAAUT,KAAK,CAACO,KAAK,CAACJ,IAAI,EAAE,GAAG,GAAG;IACpC;IAEA,IAAIK,MAAM,MAAM,GAAG;QACjBC,SAASA,OAAOC,SAAS,CAAC,GAAGD,OAAOL,MAAM,GAAG,KAAK;IACpD,OAAO,IAAII,MAAM,MAAM,GAAG;QACxBC,SAASA,OAAOC,SAAS,CAAC,GAAGD,OAAOL,MAAM,GAAG,KAAK;IACpD;IAEA,OAAOK;AACT;AAEO,MAAMV,SAAS,CAACU;IACrB,IAAIE,eAAeF,OAAOL,MAAM,GAAG,MACjCI,MAAMC,OAAOL,MAAM,EACnBD,GACAS,IAAI,GACJC,UACAC,UACAC,UACAC;IAEF,IAAIP,MAAM,CAACA,OAAOL,MAAM,GAAG,EAAE,KAAK,KAAK;QACrCO;QACA,IAAIF,MAAM,CAACA,OAAOL,MAAM,GAAG,EAAE,KAAK,KAAK;YACrCO;QACF;IACF;IAEA,MAAML,cAAc,IAAIW,YAAYN,eAClCJ,QAAQ,IAAIL,WAAWI;IAEzB,IAAKH,IAAI,GAAGA,IAAIK,KAAKL,KAAK,EAAG;QAC3BU,WAAWZ,MAAM,CAACQ,OAAOJ,UAAU,CAACF,GAAG;QACvCW,WAAWb,MAAM,CAACQ,OAAOJ,UAAU,CAACF,IAAI,GAAG;QAC3CY,WAAWd,MAAM,CAACQ,OAAOJ,UAAU,CAACF,IAAI,GAAG;QAC3Ca,WAAWf,MAAM,CAACQ,OAAOJ,UAAU,CAACF,IAAI,GAAG;QAE3CI,KAAK,CAACK,IAAI,GAAG,AAACC,YAAY,IAAMC,YAAY;QAC5CP,KAAK,CAACK,IAAI,GAAG,AAAEE,CAAAA,WAAW,EAAC,KAAM,IAAMC,YAAY;QACnDR,KAAK,CAACK,IAAI,GAAG,AAAEG,CAAAA,WAAW,CAAA,KAAM,IAAMC,WAAW;IACnD;IAEA,OAAOV;AACT"}

20
node_modules/next/dist/shared/lib/bloom-filter.d.ts generated vendored Normal file
View File

@@ -0,0 +1,20 @@
export declare class BloomFilter {
numItems: number;
errorRate: number;
numBits: number;
numHashes: number;
bitArray: number[];
constructor(numItems: number, errorRate: number);
static from(items: string[], errorRate?: number): BloomFilter;
export(): {
numItems: number;
errorRate: number;
numBits: number;
numHashes: number;
bitArray: number[];
};
import(data: ReturnType<(typeof this)['export']>): void;
add(item: string): void;
contains(item: string): boolean;
getHashValues(item: string): number[];
}

84
node_modules/next/dist/shared/lib/bloom-filter.js generated vendored Normal file
View File

@@ -0,0 +1,84 @@
// minimal implementation MurmurHash2 hash function
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "BloomFilter", {
enumerable: true,
get: function() {
return BloomFilter;
}
});
function murmurhash2(str) {
let h = 0;
for(let i = 0; i < str.length; i++){
const c = str.charCodeAt(i);
h = Math.imul(h ^ c, 0x5bd1e995);
h ^= h >>> 13;
h = Math.imul(h, 0x5bd1e995);
}
return h >>> 0;
}
class BloomFilter {
static from(items, errorRate) {
if (errorRate === void 0) errorRate = 0.01;
const filter = new BloomFilter(items.length, errorRate);
for (const item of items){
filter.add(item);
}
return filter;
}
export() {
const data = {
numItems: this.numItems,
errorRate: this.errorRate,
numBits: this.numBits,
numHashes: this.numHashes,
bitArray: this.bitArray
};
if (typeof window === "undefined" && process.env.NEXT_RUNTIME !== "edge") {
if (this.errorRate < 0.01) {
const filterData = JSON.stringify(data);
const gzipSize = require("next/dist/compiled/gzip-size").sync(filterData);
if (gzipSize > 1024) {
console.warn("Creating filter with error rate less than 1% (0.01) can increase the size dramatically proceed with caution. Received error rate " + this.errorRate + " resulted in size " + filterData.length + " bytes, " + gzipSize + " bytes (gzip)");
}
}
}
return data;
}
import(data) {
this.numItems = data.numItems;
this.errorRate = data.errorRate;
this.numBits = data.numBits;
this.numHashes = data.numHashes;
this.bitArray = data.bitArray;
}
add(item) {
const hashValues = this.getHashValues(item);
hashValues.forEach((hash)=>{
this.bitArray[hash] = 1;
});
}
contains(item) {
const hashValues = this.getHashValues(item);
return hashValues.every((hash)=>this.bitArray[hash]);
}
getHashValues(item) {
const hashValues = [];
for(let i = 1; i <= this.numHashes; i++){
const hash = murmurhash2("" + item + i) % this.numBits;
hashValues.push(hash);
}
return hashValues;
}
constructor(numItems, errorRate){
this.numItems = numItems;
this.errorRate = errorRate;
this.numBits = Math.ceil(-(numItems * Math.log(errorRate)) / (Math.log(2) * Math.log(2)));
this.numHashes = Math.ceil(this.numBits / numItems * Math.log(2));
this.bitArray = new Array(this.numBits).fill(0);
}
}
//# sourceMappingURL=bloom-filter.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/shared/lib/bloom-filter.ts"],"names":["BloomFilter","murmurhash2","str","h","i","length","c","charCodeAt","Math","imul","from","items","errorRate","filter","item","add","export","data","numItems","numBits","numHashes","bitArray","window","process","env","NEXT_RUNTIME","filterData","JSON","stringify","gzipSize","require","sync","console","warn","import","hashValues","getHashValues","forEach","hash","contains","every","push","constructor","ceil","log","Array","fill"],"mappings":"AAAA,mDAAmD;;;;;+BAYtCA;;;eAAAA;;;AAXb,SAASC,YAAYC,GAAW;IAC9B,IAAIC,IAAI;IACR,IAAK,IAAIC,IAAI,GAAGA,IAAIF,IAAIG,MAAM,EAAED,IAAK;QACnC,MAAME,IAAIJ,IAAIK,UAAU,CAACH;QACzBD,IAAIK,KAAKC,IAAI,CAACN,IAAIG,GAAG;QACrBH,KAAKA,MAAM;QACXA,IAAIK,KAAKC,IAAI,CAACN,GAAG;IACnB;IACA,OAAOA,MAAM;AACf;AAEO,MAAMH;IAiBX,OAAOU,KAAKC,KAAe,EAAEC,SAAgB,EAAE;QAAlBA,IAAAA,sBAAAA,YAAY;QACvC,MAAMC,SAAS,IAAIb,YAAYW,MAAMN,MAAM,EAAEO;QAE7C,KAAK,MAAME,QAAQH,MAAO;YACxBE,OAAOE,GAAG,CAACD;QACb;QACA,OAAOD;IACT;IAEAG,SAAS;QACP,MAAMC,OAAO;YACXC,UAAU,IAAI,CAACA,QAAQ;YACvBN,WAAW,IAAI,CAACA,SAAS;YACzBO,SAAS,IAAI,CAACA,OAAO;YACrBC,WAAW,IAAI,CAACA,SAAS;YACzBC,UAAU,IAAI,CAACA,QAAQ;QACzB;QAEA,IAAI,OAAOC,WAAW,eAAeC,QAAQC,GAAG,CAACC,YAAY,KAAK,QAAQ;YACxE,IAAI,IAAI,CAACb,SAAS,GAAG,MAAM;gBACzB,MAAMc,aAAaC,KAAKC,SAAS,CAACX;gBAClC,MAAMY,WAAWC,QAAQ,gCAAgCC,IAAI,CAC3DL;gB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CAAAA,KAAKoC,GAAG,CAAC,KAAKpC,KAAKoC,GAAG,CAAC,EAAC;QAE/D,IAAI,CAACxB,SAAS,GAAGZ,KAAKmC,IAAI,CAAC,AAAC,IAAI,CAACxB,OAAO,GAAGD,WAAYV,KAAKoC,GAAG,CAAC;QAChE,IAAI,CAACvB,QAAQ,GAAG,IAAIwB,MAAM,IAAI,CAAC1B,OAAO,EAAE2B,IAAI,CAAC;IAC/C;AAkEF"}

90
node_modules/next/dist/shared/lib/constants.d.ts generated vendored Normal file
View File

@@ -0,0 +1,90 @@
import MODERN_BROWSERSLIST_TARGET from './modern-browserslist-target';
export { MODERN_BROWSERSLIST_TARGET };
export type ValueOf<T> = Required<T>[keyof T];
export declare const COMPILER_NAMES: {
readonly client: "client";
readonly server: "server";
readonly edgeServer: "edge-server";
};
export declare const INTERNAL_HEADERS: readonly ["x-invoke-path", "x-invoke-status", "x-invoke-error", "x-invoke-query", "x-middleware-invoke"];
export type CompilerNameValues = ValueOf<typeof COMPILER_NAMES>;
export declare const COMPILER_INDEXES: {
[compilerKey in CompilerNameValues]: number;
};
export declare const PHASE_EXPORT = "phase-export";
export declare const PHASE_PRODUCTION_BUILD = "phase-production-build";
export declare const PHASE_PRODUCTION_SERVER = "phase-production-server";
export declare const PHASE_DEVELOPMENT_SERVER = "phase-development-server";
export declare const PHASE_TEST = "phase-test";
export declare const PHASE_INFO = "phase-info";
export declare const PAGES_MANIFEST = "pages-manifest.json";
export declare const APP_PATHS_MANIFEST = "app-paths-manifest.json";
export declare const APP_PATH_ROUTES_MANIFEST = "app-path-routes-manifest.json";
export declare const BUILD_MANIFEST = "build-manifest.json";
export declare const APP_BUILD_MANIFEST = "app-build-manifest.json";
export declare const FUNCTIONS_CONFIG_MANIFEST = "functions-config-manifest.json";
export declare const SUBRESOURCE_INTEGRITY_MANIFEST = "subresource-integrity-manifest";
export declare const NEXT_FONT_MANIFEST = "next-font-manifest";
export declare const EXPORT_MARKER = "export-marker.json";
export declare const EXPORT_DETAIL = "export-detail.json";
export declare const PRERENDER_MANIFEST = "prerender-manifest.json";
export declare const ROUTES_MANIFEST = "routes-manifest.json";
export declare const IMAGES_MANIFEST = "images-manifest.json";
export declare const SERVER_FILES_MANIFEST = "required-server-files.json";
export declare const DEV_CLIENT_PAGES_MANIFEST = "_devPagesManifest.json";
export declare const MIDDLEWARE_MANIFEST = "middleware-manifest.json";
export declare const DEV_MIDDLEWARE_MANIFEST = "_devMiddlewareManifest.json";
export declare const REACT_LOADABLE_MANIFEST = "react-loadable-manifest.json";
export declare const FONT_MANIFEST = "font-manifest.json";
export declare const SERVER_DIRECTORY = "server";
export declare const CONFIG_FILES: string[];
export declare const BUILD_ID_FILE = "BUILD_ID";
export declare const BLOCKED_PAGES: string[];
export declare const CLIENT_PUBLIC_FILES_PATH = "public";
export declare const CLIENT_STATIC_FILES_PATH = "static";
export declare const STRING_LITERAL_DROP_BUNDLE = "__NEXT_DROP_CLIENT_FILE__";
export declare const NEXT_BUILTIN_DOCUMENT = "__NEXT_BUILTIN_DOCUMENT__";
export declare const CLIENT_REFERENCE_MANIFEST = "client-reference-manifest";
export declare const SERVER_REFERENCE_MANIFEST = "server-reference-manifest";
export declare const MIDDLEWARE_BUILD_MANIFEST = "middleware-build-manifest";
export declare const MIDDLEWARE_REACT_LOADABLE_MANIFEST = "middleware-react-loadable-manifest";
export declare const CLIENT_STATIC_FILES_RUNTIME_MAIN = "main";
export declare const CLIENT_STATIC_FILES_RUNTIME_MAIN_APP = "main-app";
export declare const APP_CLIENT_INTERNALS = "app-pages-internals";
export declare const CLIENT_STATIC_FILES_RUNTIME_REACT_REFRESH = "react-refresh";
export declare const CLIENT_STATIC_FILES_RUNTIME_AMP = "amp";
export declare const CLIENT_STATIC_FILES_RUNTIME_WEBPACK = "webpack";
export declare const CLIENT_STATIC_FILES_RUNTIME_POLYFILLS = "polyfills";
export declare const CLIENT_STATIC_FILES_RUNTIME_POLYFILLS_SYMBOL: unique symbol;
export declare const EDGE_RUNTIME_WEBPACK = "edge-runtime-webpack";
export declare const TEMPORARY_REDIRECT_STATUS = 307;
export declare const PERMANENT_REDIRECT_STATUS = 308;
export declare const STATIC_PROPS_ID = "__N_SSG";
export declare const SERVER_PROPS_ID = "__N_SSP";
export declare const PAGE_SEGMENT_KEY = "__PAGE__";
export declare const GOOGLE_FONT_PROVIDER = "https://fonts.googleapis.com/";
export declare const OPTIMIZED_FONT_PROVIDERS: {
url: string;
preconnect: string;
}[];
export declare const DEFAULT_SERIF_FONT: {
name: string;
xAvgCharWidth: number;
azAvgWidth: number;
unitsPerEm: number;
};
export declare const DEFAULT_SANS_SERIF_FONT: {
name: string;
xAvgCharWidth: number;
azAvgWidth: number;
unitsPerEm: number;
};
export declare const STATIC_STATUS_PAGES: string[];
export declare const TRACE_OUTPUT_VERSION = 1;
export declare const TURBO_TRACE_DEFAULT_MEMORY_LIMIT = 6000;
export declare const RSC_MODULE_TYPES: {
readonly client: "client";
readonly server: "server";
};
export declare const EDGE_UNSUPPORTED_NODE_APIS: string[];
export declare const SYSTEM_ENTRYPOINTS: Set<string>;

415
node_modules/next/dist/shared/lib/constants.js generated vendored Normal file
View File

@@ -0,0 +1,415 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
MODERN_BROWSERSLIST_TARGET: null,
COMPILER_NAMES: null,
INTERNAL_HEADERS: null,
COMPILER_INDEXES: null,
PHASE_EXPORT: null,
PHASE_PRODUCTION_BUILD: null,
PHASE_PRODUCTION_SERVER: null,
PHASE_DEVELOPMENT_SERVER: null,
PHASE_TEST: null,
PHASE_INFO: null,
PAGES_MANIFEST: null,
APP_PATHS_MANIFEST: null,
APP_PATH_ROUTES_MANIFEST: null,
BUILD_MANIFEST: null,
APP_BUILD_MANIFEST: null,
FUNCTIONS_CONFIG_MANIFEST: null,
SUBRESOURCE_INTEGRITY_MANIFEST: null,
NEXT_FONT_MANIFEST: null,
EXPORT_MARKER: null,
EXPORT_DETAIL: null,
PRERENDER_MANIFEST: null,
ROUTES_MANIFEST: null,
IMAGES_MANIFEST: null,
SERVER_FILES_MANIFEST: null,
DEV_CLIENT_PAGES_MANIFEST: null,
MIDDLEWARE_MANIFEST: null,
DEV_MIDDLEWARE_MANIFEST: null,
REACT_LOADABLE_MANIFEST: null,
FONT_MANIFEST: null,
SERVER_DIRECTORY: null,
CONFIG_FILES: null,
BUILD_ID_FILE: null,
BLOCKED_PAGES: null,
CLIENT_PUBLIC_FILES_PATH: null,
CLIENT_STATIC_FILES_PATH: null,
STRING_LITERAL_DROP_BUNDLE: null,
NEXT_BUILTIN_DOCUMENT: null,
CLIENT_REFERENCE_MANIFEST: null,
SERVER_REFERENCE_MANIFEST: null,
MIDDLEWARE_BUILD_MANIFEST: null,
MIDDLEWARE_REACT_LOADABLE_MANIFEST: null,
CLIENT_STATIC_FILES_RUNTIME_MAIN: null,
CLIENT_STATIC_FILES_RUNTIME_MAIN_APP: null,
APP_CLIENT_INTERNALS: null,
CLIENT_STATIC_FILES_RUNTIME_REACT_REFRESH: null,
CLIENT_STATIC_FILES_RUNTIME_AMP: null,
CLIENT_STATIC_FILES_RUNTIME_WEBPACK: null,
CLIENT_STATIC_FILES_RUNTIME_POLYFILLS: null,
CLIENT_STATIC_FILES_RUNTIME_POLYFILLS_SYMBOL: null,
EDGE_RUNTIME_WEBPACK: null,
TEMPORARY_REDIRECT_STATUS: null,
PERMANENT_REDIRECT_STATUS: null,
STATIC_PROPS_ID: null,
SERVER_PROPS_ID: null,
PAGE_SEGMENT_KEY: null,
GOOGLE_FONT_PROVIDER: null,
OPTIMIZED_FONT_PROVIDERS: null,
DEFAULT_SERIF_FONT: null,
DEFAULT_SANS_SERIF_FONT: null,
STATIC_STATUS_PAGES: null,
TRACE_OUTPUT_VERSION: null,
TURBO_TRACE_DEFAULT_MEMORY_LIMIT: null,
RSC_MODULE_TYPES: null,
EDGE_UNSUPPORTED_NODE_APIS: null,
SYSTEM_ENTRYPOINTS: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
MODERN_BROWSERSLIST_TARGET: function() {
return _modernbrowserslisttarget.default;
},
COMPILER_NAMES: function() {
return COMPILER_NAMES;
},
INTERNAL_HEADERS: function() {
return INTERNAL_HEADERS;
},
COMPILER_INDEXES: function() {
return COMPILER_INDEXES;
},
PHASE_EXPORT: function() {
return PHASE_EXPORT;
},
PHASE_PRODUCTION_BUILD: function() {
return PHASE_PRODUCTION_BUILD;
},
PHASE_PRODUCTION_SERVER: function() {
return PHASE_PRODUCTION_SERVER;
},
PHASE_DEVELOPMENT_SERVER: function() {
return PHASE_DEVELOPMENT_SERVER;
},
PHASE_TEST: function() {
return PHASE_TEST;
},
PHASE_INFO: function() {
return PHASE_INFO;
},
PAGES_MANIFEST: function() {
return PAGES_MANIFEST;
},
APP_PATHS_MANIFEST: function() {
return APP_PATHS_MANIFEST;
},
APP_PATH_ROUTES_MANIFEST: function() {
return APP_PATH_ROUTES_MANIFEST;
},
BUILD_MANIFEST: function() {
return BUILD_MANIFEST;
},
APP_BUILD_MANIFEST: function() {
return APP_BUILD_MANIFEST;
},
FUNCTIONS_CONFIG_MANIFEST: function() {
return FUNCTIONS_CONFIG_MANIFEST;
},
SUBRESOURCE_INTEGRITY_MANIFEST: function() {
return SUBRESOURCE_INTEGRITY_MANIFEST;
},
NEXT_FONT_MANIFEST: function() {
return NEXT_FONT_MANIFEST;
},
EXPORT_MARKER: function() {
return EXPORT_MARKER;
},
EXPORT_DETAIL: function() {
return EXPORT_DETAIL;
},
PRERENDER_MANIFEST: function() {
return PRERENDER_MANIFEST;
},
ROUTES_MANIFEST: function() {
return ROUTES_MANIFEST;
},
IMAGES_MANIFEST: function() {
return IMAGES_MANIFEST;
},
SERVER_FILES_MANIFEST: function() {
return SERVER_FILES_MANIFEST;
},
DEV_CLIENT_PAGES_MANIFEST: function() {
return DEV_CLIENT_PAGES_MANIFEST;
},
MIDDLEWARE_MANIFEST: function() {
return MIDDLEWARE_MANIFEST;
},
DEV_MIDDLEWARE_MANIFEST: function() {
return DEV_MIDDLEWARE_MANIFEST;
},
REACT_LOADABLE_MANIFEST: function() {
return REACT_LOADABLE_MANIFEST;
},
FONT_MANIFEST: function() {
return FONT_MANIFEST;
},
SERVER_DIRECTORY: function() {
return SERVER_DIRECTORY;
},
CONFIG_FILES: function() {
return CONFIG_FILES;
},
BUILD_ID_FILE: function() {
return BUILD_ID_FILE;
},
BLOCKED_PAGES: function() {
return BLOCKED_PAGES;
},
CLIENT_PUBLIC_FILES_PATH: function() {
return CLIENT_PUBLIC_FILES_PATH;
},
CLIENT_STATIC_FILES_PATH: function() {
return CLIENT_STATIC_FILES_PATH;
},
STRING_LITERAL_DROP_BUNDLE: function() {
return STRING_LITERAL_DROP_BUNDLE;
},
NEXT_BUILTIN_DOCUMENT: function() {
return NEXT_BUILTIN_DOCUMENT;
},
CLIENT_REFERENCE_MANIFEST: function() {
return CLIENT_REFERENCE_MANIFEST;
},
SERVER_REFERENCE_MANIFEST: function() {
return SERVER_REFERENCE_MANIFEST;
},
MIDDLEWARE_BUILD_MANIFEST: function() {
return MIDDLEWARE_BUILD_MANIFEST;
},
MIDDLEWARE_REACT_LOADABLE_MANIFEST: function() {
return MIDDLEWARE_REACT_LOADABLE_MANIFEST;
},
CLIENT_STATIC_FILES_RUNTIME_MAIN: function() {
return CLIENT_STATIC_FILES_RUNTIME_MAIN;
},
CLIENT_STATIC_FILES_RUNTIME_MAIN_APP: function() {
return CLIENT_STATIC_FILES_RUNTIME_MAIN_APP;
},
APP_CLIENT_INTERNALS: function() {
return APP_CLIENT_INTERNALS;
},
CLIENT_STATIC_FILES_RUNTIME_REACT_REFRESH: function() {
return CLIENT_STATIC_FILES_RUNTIME_REACT_REFRESH;
},
CLIENT_STATIC_FILES_RUNTIME_AMP: function() {
return CLIENT_STATIC_FILES_RUNTIME_AMP;
},
CLIENT_STATIC_FILES_RUNTIME_WEBPACK: function() {
return CLIENT_STATIC_FILES_RUNTIME_WEBPACK;
},
CLIENT_STATIC_FILES_RUNTIME_POLYFILLS: function() {
return CLIENT_STATIC_FILES_RUNTIME_POLYFILLS;
},
CLIENT_STATIC_FILES_RUNTIME_POLYFILLS_SYMBOL: function() {
return CLIENT_STATIC_FILES_RUNTIME_POLYFILLS_SYMBOL;
},
EDGE_RUNTIME_WEBPACK: function() {
return EDGE_RUNTIME_WEBPACK;
},
TEMPORARY_REDIRECT_STATUS: function() {
return TEMPORARY_REDIRECT_STATUS;
},
PERMANENT_REDIRECT_STATUS: function() {
return PERMANENT_REDIRECT_STATUS;
},
STATIC_PROPS_ID: function() {
return STATIC_PROPS_ID;
},
SERVER_PROPS_ID: function() {
return SERVER_PROPS_ID;
},
PAGE_SEGMENT_KEY: function() {
return PAGE_SEGMENT_KEY;
},
GOOGLE_FONT_PROVIDER: function() {
return GOOGLE_FONT_PROVIDER;
},
OPTIMIZED_FONT_PROVIDERS: function() {
return OPTIMIZED_FONT_PROVIDERS;
},
DEFAULT_SERIF_FONT: function() {
return DEFAULT_SERIF_FONT;
},
DEFAULT_SANS_SERIF_FONT: function() {
return DEFAULT_SANS_SERIF_FONT;
},
STATIC_STATUS_PAGES: function() {
return STATIC_STATUS_PAGES;
},
TRACE_OUTPUT_VERSION: function() {
return TRACE_OUTPUT_VERSION;
},
TURBO_TRACE_DEFAULT_MEMORY_LIMIT: function() {
return TURBO_TRACE_DEFAULT_MEMORY_LIMIT;
},
RSC_MODULE_TYPES: function() {
return RSC_MODULE_TYPES;
},
EDGE_UNSUPPORTED_NODE_APIS: function() {
return EDGE_UNSUPPORTED_NODE_APIS;
},
SYSTEM_ENTRYPOINTS: function() {
return SYSTEM_ENTRYPOINTS;
}
});
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
const _modernbrowserslisttarget = /*#__PURE__*/ _interop_require_default._(require("./modern-browserslist-target"));
const COMPILER_NAMES = {
client: "client",
server: "server",
edgeServer: "edge-server"
};
const INTERNAL_HEADERS = [
"x-invoke-path",
"x-invoke-status",
"x-invoke-error",
"x-invoke-query",
"x-middleware-invoke"
];
const COMPILER_INDEXES = {
[COMPILER_NAMES.client]: 0,
[COMPILER_NAMES.server]: 1,
[COMPILER_NAMES.edgeServer]: 2
};
const PHASE_EXPORT = "phase-export";
const PHASE_PRODUCTION_BUILD = "phase-production-build";
const PHASE_PRODUCTION_SERVER = "phase-production-server";
const PHASE_DEVELOPMENT_SERVER = "phase-development-server";
const PHASE_TEST = "phase-test";
const PHASE_INFO = "phase-info";
const PAGES_MANIFEST = "pages-manifest.json";
const APP_PATHS_MANIFEST = "app-paths-manifest.json";
const APP_PATH_ROUTES_MANIFEST = "app-path-routes-manifest.json";
const BUILD_MANIFEST = "build-manifest.json";
const APP_BUILD_MANIFEST = "app-build-manifest.json";
const FUNCTIONS_CONFIG_MANIFEST = "functions-config-manifest.json";
const SUBRESOURCE_INTEGRITY_MANIFEST = "subresource-integrity-manifest";
const NEXT_FONT_MANIFEST = "next-font-manifest";
const EXPORT_MARKER = "export-marker.json";
const EXPORT_DETAIL = "export-detail.json";
const PRERENDER_MANIFEST = "prerender-manifest.json";
const ROUTES_MANIFEST = "routes-manifest.json";
const IMAGES_MANIFEST = "images-manifest.json";
const SERVER_FILES_MANIFEST = "required-server-files.json";
const DEV_CLIENT_PAGES_MANIFEST = "_devPagesManifest.json";
const MIDDLEWARE_MANIFEST = "middleware-manifest.json";
const DEV_MIDDLEWARE_MANIFEST = "_devMiddlewareManifest.json";
const REACT_LOADABLE_MANIFEST = "react-loadable-manifest.json";
const FONT_MANIFEST = "font-manifest.json";
const SERVER_DIRECTORY = "server";
const CONFIG_FILES = [
"next.config.js",
"next.config.mjs"
];
const BUILD_ID_FILE = "BUILD_ID";
const BLOCKED_PAGES = [
"/_document",
"/_app",
"/_error"
];
const CLIENT_PUBLIC_FILES_PATH = "public";
const CLIENT_STATIC_FILES_PATH = "static";
const STRING_LITERAL_DROP_BUNDLE = "__NEXT_DROP_CLIENT_FILE__";
const NEXT_BUILTIN_DOCUMENT = "__NEXT_BUILTIN_DOCUMENT__";
const CLIENT_REFERENCE_MANIFEST = "client-reference-manifest";
const SERVER_REFERENCE_MANIFEST = "server-reference-manifest";
const MIDDLEWARE_BUILD_MANIFEST = "middleware-build-manifest";
const MIDDLEWARE_REACT_LOADABLE_MANIFEST = "middleware-react-loadable-manifest";
const CLIENT_STATIC_FILES_RUNTIME_MAIN = "main";
const CLIENT_STATIC_FILES_RUNTIME_MAIN_APP = "" + CLIENT_STATIC_FILES_RUNTIME_MAIN + "-app";
const APP_CLIENT_INTERNALS = "app-pages-internals";
const CLIENT_STATIC_FILES_RUNTIME_REACT_REFRESH = "react-refresh";
const CLIENT_STATIC_FILES_RUNTIME_AMP = "amp";
const CLIENT_STATIC_FILES_RUNTIME_WEBPACK = "webpack";
const CLIENT_STATIC_FILES_RUNTIME_POLYFILLS = "polyfills";
const CLIENT_STATIC_FILES_RUNTIME_POLYFILLS_SYMBOL = Symbol(CLIENT_STATIC_FILES_RUNTIME_POLYFILLS);
const EDGE_RUNTIME_WEBPACK = "edge-runtime-webpack";
const TEMPORARY_REDIRECT_STATUS = 307;
const PERMANENT_REDIRECT_STATUS = 308;
const STATIC_PROPS_ID = "__N_SSG";
const SERVER_PROPS_ID = "__N_SSP";
const PAGE_SEGMENT_KEY = "__PAGE__";
const GOOGLE_FONT_PROVIDER = "https://fonts.googleapis.com/";
const OPTIMIZED_FONT_PROVIDERS = [
{
url: GOOGLE_FONT_PROVIDER,
preconnect: "https://fonts.gstatic.com"
},
{
url: "https://use.typekit.net",
preconnect: "https://use.typekit.net"
}
];
const DEFAULT_SERIF_FONT = {
name: "Times New Roman",
xAvgCharWidth: 821,
azAvgWidth: 854.3953488372093,
unitsPerEm: 2048
};
const DEFAULT_SANS_SERIF_FONT = {
name: "Arial",
xAvgCharWidth: 904,
azAvgWidth: 934.5116279069767,
unitsPerEm: 2048
};
const STATIC_STATUS_PAGES = [
"/500"
];
const TRACE_OUTPUT_VERSION = 1;
const TURBO_TRACE_DEFAULT_MEMORY_LIMIT = 6000;
const RSC_MODULE_TYPES = {
client: "client",
server: "server"
};
const EDGE_UNSUPPORTED_NODE_APIS = [
"clearImmediate",
"setImmediate",
"BroadcastChannel",
"ByteLengthQueuingStrategy",
"CompressionStream",
"CountQueuingStrategy",
"DecompressionStream",
"DomException",
"MessageChannel",
"MessageEvent",
"MessagePort",
"ReadableByteStreamController",
"ReadableStreamBYOBRequest",
"ReadableStreamDefaultController",
"TransformStreamDefaultController",
"WritableStreamDefaultController"
];
const SYSTEM_ENTRYPOINTS = new Set([
CLIENT_STATIC_FILES_RUNTIME_MAIN,
CLIENT_STATIC_FILES_RUNTIME_REACT_REFRESH,
CLIENT_STATIC_FILES_RUNTIME_AMP,
CLIENT_STATIC_FILES_RUNTIME_MAIN_APP
]);
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', { value: true });
Object.assign(exports.default, exports);
module.exports = exports.default;
}
//# sourceMappingURL=constants.js.map

1
node_modules/next/dist/shared/lib/constants.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/shared/lib/constants.ts"],"names":["MODERN_BROWSERSLIST_TARGET","COMPILER_NAMES","INTERNAL_HEADERS","COMPILER_INDEXES","PHASE_EXPORT","PHASE_PRODUCTION_BUILD","PHASE_PRODUCTION_SERVER","PHASE_DEVELOPMENT_SERVER","PHASE_TEST","PHASE_INFO","PAGES_MANIFEST","APP_PATHS_MANIFEST","APP_PATH_ROUTES_MANIFEST","BUILD_MANIFEST","APP_BUILD_MANIFEST","FUNCTIONS_CONFIG_MANIFEST","SUBRESOURCE_INTEGRITY_MANIFEST","NEXT_FONT_MANIFEST","EXPORT_MARKER","EXPORT_DETAIL","PRERENDER_MANIFEST","ROUTES_MANIFEST","IMAGES_MANIFEST","SERVER_FILES_MANIFEST","DEV_CLIENT_PAGES_MANIFEST","MIDDLEWARE_MANIFEST","DEV_MIDDLEWARE_MANIFEST","REACT_LOADABLE_MANIFEST","FONT_MANIFEST","SERVER_DIRECTORY","CONFIG_FILES","BUILD_ID_FILE","BLOCKED_PAGES","CLIENT_PUBLIC_FILES_PATH","CLIENT_STATIC_FILES_PATH","STRING_LITERAL_DROP_BUNDLE","NEXT_BUILTIN_DOCUMENT","CLIENT_REFERENCE_MANIFEST","SERVER_REFERENCE_MANIFEST","MIDDLEWARE_BUILD_MANIFEST","MIDDLEWARE_REACT_LOADABLE_MANIFEST","CLIENT_STATIC_FILES_RUNTIME_MAIN","CLIENT_STATIC_FILES_RUNTIME_MAIN_APP","APP_CLIENT_INTERNALS","CLIENT_STATIC_FILES_RUNTIME_REACT_REFRESH","CLIENT_STATIC_FILES_RUNTIME_AMP","CLIENT_STATIC_FILES_RUNTIME_WEBPACK","CLIENT_STATIC_FILES_RUNTIME_POLYFILLS","CLIENT_STATIC_FILES_RUNTIME_POLYFILLS_SYMBOL","EDGE_RUNTIME_WEBPACK","TEMPORARY_REDIRECT_STATUS","PERMANENT_REDIRECT_STATUS","STATIC_PROPS_ID","SERVER_PROPS_ID","PAGE_SEGMENT_KEY","GOOGLE_FONT_PROVIDER","OPTIMIZED_FONT_PROVIDERS","DEFAULT_SERIF_FONT","DEFAULT_SANS_SERIF_FONT","STATIC_STATUS_PAGES","TRACE_OUTPUT_VERSION","TURBO_TRACE_DEFAULT_MEMORY_LIMIT","RSC_MODULE_TYPES","EDGE_UNSUPPORTED_NODE_APIS","SYSTEM_ENTRYPOINTS","client","server","edgeServer","Symbol","url","preconnect","name","xAvgCharWidth","azAvgWidth","unitsPerEm","Set"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAESA,0BAA0B;eAA1BA,iCAA0B;;IAItBC,cAAc;eAAdA;;IAMAC,gBAAgB;eAAhBA;;IAUAC,gBAAgB;eAAhBA;;IAQAC,YAAY;eAAZA;;IACAC,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ElC,MAAMC,4BAA4B;AAElC,MAAMC,4BAA4B;AAElC,MAAMC,qCACX;AAGK,MAAMC,mCAAoC;AAC1C,MAAMC,uCAAuC,AAAC,KAAED,mCAAiC;AAEjF,MAAME,uBAAuB;AAE7B,MAAMC,4CAA6C;AAEnD,MAAMC,kCAAmC;AAEzC,MAAMC,sCAAuC;AAE7C,MAAMC,wCAAwC;AAC9C,MAAMC,+CAA+CoB,OAC1DrB;AAEK,MAAME,uBAAuB;AAC7B,MAAMC,4BAA4B;AAClC,MAAMC,4BAA4B;AAClC,MAAMC,kBAAkB;AACxB,MAAMC,kBAAkB;AACxB,MAAMC,mBAAmB;AACzB,MAAMC,uBAAuB;AAC7B,MAAMC,2BAA2B;IACtC;QAAEa,KAAKd;QAAsBe,YAAY;IAA4B;IACrE;QAAED,KAAK;QAA2BC,YAAY;IAA0B;CACzE;AACM,MAAMb,qBAAqB;IAChCc,MAAM;IACNC,eAAe;IACfC,YAAY;IACZC,YAAY;AACd;AACO,MAAMhB,0BAA0B;IACrCa,MAAM;IACNC,eAAe;IACfC,YAAY;IACZC,YAAY;AACd;AACO,MAAMf,sBAAsB;IAAC;CAAO;AACpC,MAAMC,uBAAuB;AAE7B,MAAMC,mCAAmC;AAEzC,MAAMC,mBAAmB;IAC9BG,QAAQ;IACRC,QAAQ;AACV;AAMO,MAAMH,6BAA6B;IACxC;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD;AAEM,MAAMC,qBAAqB,IAAIW,IAAY;IAChDlC;IACAG;IACAC;IACAH;CACD"}

36
node_modules/next/dist/shared/lib/dynamic.d.ts generated vendored Normal file
View File

@@ -0,0 +1,36 @@
import React from 'react';
type ComponentModule<P = {}> = {
default: React.ComponentType<P>;
};
export declare type LoaderComponent<P = {}> = Promise<React.ComponentType<P> | ComponentModule<P>>;
export declare type Loader<P = {}> = (() => LoaderComponent<P>) | LoaderComponent<P>;
export type LoaderMap = {
[module: string]: () => Loader<any>;
};
export type LoadableGeneratedOptions = {
webpack?(): any;
modules?(): LoaderMap;
};
export type DynamicOptionsLoadingProps = {
error?: Error | null;
isLoading?: boolean;
pastDelay?: boolean;
retry?: () => void;
timedOut?: boolean;
};
export type DynamicOptions<P = {}> = LoadableGeneratedOptions & {
loading?: (loadingProps: DynamicOptionsLoadingProps) => JSX.Element | null;
loader?: Loader<P> | LoaderMap;
loadableGenerated?: LoadableGeneratedOptions;
ssr?: boolean;
/**
* @deprecated `suspense` prop is not required anymore
*/
suspense?: boolean;
};
export type LoadableOptions<P = {}> = DynamicOptions<P>;
export type LoadableFn<P = {}> = (opts: LoadableOptions<P>) => React.ComponentType<P>;
export type LoadableComponent<P = {}> = React.ComponentType<P>;
export declare function noSSR<P = {}>(LoadableInitializer: LoadableFn<P>, loadableOptions: DynamicOptions<P>): React.ComponentType<P>;
export default function dynamic<P = {}>(dynamicOptions: DynamicOptions<P> | Loader<P>, options?: DynamicOptions<P>): React.ComponentType<P>;
export {};

119
node_modules/next/dist/shared/lib/dynamic.js generated vendored Normal file
View File

@@ -0,0 +1,119 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
noSSR: null,
default: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
noSSR: function() {
return noSSR;
},
default: function() {
return dynamic;
}
});
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
const _react = /*#__PURE__*/ _interop_require_default._(require("react"));
const _loadablesharedruntime = /*#__PURE__*/ _interop_require_default._(require("./loadable.shared-runtime"));
const isServerSide = typeof window === "undefined";
// Normalize loader to return the module as form { default: Component } for `React.lazy`.
// Also for backward compatible since next/dynamic allows to resolve a component directly with loader
// Client component reference proxy need to be converted to a module.
function convertModule(mod) {
return {
default: (mod == null ? void 0 : mod.default) || mod
};
}
function noSSR(LoadableInitializer, loadableOptions) {
// Removing webpack and modules means react-loadable won't try preloading
delete loadableOptions.webpack;
delete loadableOptions.modules;
// This check is necessary to prevent react-loadable from initializing on the server
if (!isServerSide) {
return LoadableInitializer(loadableOptions);
}
const Loading = loadableOptions.loading;
// This will only be rendered on the server side
return ()=>/*#__PURE__*/ _react.default.createElement(Loading, {
error: null,
isLoading: true,
pastDelay: false,
timedOut: false
});
}
function dynamic(dynamicOptions, options) {
let loadableFn = _loadablesharedruntime.default;
let loadableOptions = {
// A loading component is not required, so we default it
loading: (param)=>{
let { error, isLoading, pastDelay } = param;
if (!pastDelay) return null;
if (process.env.NODE_ENV !== "production") {
if (isLoading) {
return null;
}
if (error) {
return /*#__PURE__*/ _react.default.createElement("p", null, error.message, /*#__PURE__*/ _react.default.createElement("br", null), error.stack);
}
}
return null;
}
};
// Support for direct import(), eg: dynamic(import('../hello-world'))
// Note that this is only kept for the edge case where someone is passing in a promise as first argument
// The react-loadable babel plugin will turn dynamic(import('../hello-world')) into dynamic(() => import('../hello-world'))
// To make sure we don't execute the import without rendering first
if (dynamicOptions instanceof Promise) {
loadableOptions.loader = ()=>dynamicOptions;
// Support for having import as a function, eg: dynamic(() => import('../hello-world'))
} else if (typeof dynamicOptions === "function") {
loadableOptions.loader = dynamicOptions;
// Support for having first argument being options, eg: dynamic({loader: import('../hello-world')})
} else if (typeof dynamicOptions === "object") {
loadableOptions = {
...loadableOptions,
...dynamicOptions
};
}
// Support for passing options, eg: dynamic(import('../hello-world'), {loading: () => <p>Loading something</p>})
loadableOptions = {
...loadableOptions,
...options
};
const loaderFn = loadableOptions.loader;
const loader = ()=>loaderFn != null ? loaderFn().then(convertModule) : Promise.resolve(convertModule(()=>null));
// coming from build/babel/plugins/react-loadable-plugin.js
if (loadableOptions.loadableGenerated) {
loadableOptions = {
...loadableOptions,
...loadableOptions.loadableGenerated
};
delete loadableOptions.loadableGenerated;
}
// support for disabling server side rendering, eg: dynamic(() => import('../hello-world'), {ssr: false}).
if (typeof loadableOptions.ssr === "boolean" && !loadableOptions.ssr) {
delete loadableOptions.webpack;
delete loadableOptions.modules;
return noSSR(loadableFn, loadableOptions);
}
return loadableFn({
...loadableOptions,
loader: loader
});
}
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', { value: true });
Object.assign(exports.default, exports);
module.exports = exports.default;
}
//# sourceMappingURL=dynamic.js.map

1
node_modules/next/dist/shared/lib/dynamic.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/shared/lib/dynamic.tsx"],"names":["noSSR","dynamic","isServerSide","window","convertModule","mod","default","LoadableInitializer","loadableOptions","webpack","modules","Loading","loading","error","isLoading","pastDelay","timedOut","dynamicOptions","options","loadableFn","Loadable","process","env","NODE_ENV","p","message","br","stack","Promise","loader","loaderFn","then","resolve","loadableGenerated","ssr"],"mappings":";;;;;;;;;;;;;;;IAwDgBA,KAAK;eAALA;;IAoBhB,OAqEC;eArEuBC;;;;gEA5EN;gFACG;AAErB,MAAMC,eAAe,OAAOC,WAAW;AA2BvC,yFAAyF;AACzF,qGAAqG;AACrG,qEAAqE;AACrE,SAASC,cAAiBC,GAAgD;IACxE,OAAO;QAAEC,SAAS,CAACD,uBAAD,AAACA,IAA4BC,OAAO,KAAID;IAAI;AAChE;AAqBO,SAASL,MACdO,mBAAkC,EAClCC,eAAkC;IAElC,yEAAyE;IACzE,OAAOA,gBAAgBC,OAAO;IAC9B,OAAOD,gBAAgBE,OAAO;IAE9B,oFAAoF;IACpF,IAAI,CAACR,cAAc;QACjB,OAAOK,oBAAoBC;IAC7B;IAEA,MAAMG,UAAUH,gBAAgBI,OAAO;IACvC,gDAAgD;IAChD,OAAO,kBACL,6BAACD;YAAQE,OAAO;YAAMC,WAAAA;YAAUC,WAAW;YAAOC,UAAU;;AAEhE;AAEe,SAASf,QACtBgB,cAA6C,EAC7CC,OAA2B;IAE3B,IAAIC,aAAaC,8BAAQ;IAEzB,IAAIZ,kBAAsC;QACxC,wDAAwD;QACxD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WAAW;QAAE,GAAGX,eAAe;QAAEqB,QAAQA;IAAoB;AACtE"}

1
node_modules/next/dist/shared/lib/escape-regexp.d.ts generated vendored Normal file
View File

@@ -0,0 +1 @@
export declare function escapeStringRegexp(str: string): string;

22
node_modules/next/dist/shared/lib/escape-regexp.js generated vendored Normal file
View File

@@ -0,0 +1,22 @@
// regexp is based on https://github.com/sindresorhus/escape-string-regexp
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "escapeStringRegexp", {
enumerable: true,
get: function() {
return escapeStringRegexp;
}
});
const reHasRegExp = /[|\\{}()[\]^$+*?.-]/;
const reReplaceRegExp = /[|\\{}()[\]^$+*?.-]/g;
function escapeStringRegexp(str) {
// see also: https://github.com/lodash/lodash/blob/2da024c3b4f9947a48517639de7560457cd4ec6c/escapeRegExp.js#L23
if (reHasRegExp.test(str)) {
return str.replace(reReplaceRegExp, "\\$&");
}
return str;
}
//# sourceMappingURL=escape-regexp.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/shared/lib/escape-regexp.ts"],"names":["escapeStringRegexp","reHasRegExp","reReplaceRegExp","str","test","replace"],"mappings":"AAAA,0EAA0E;;;;;+BAI1DA;;;eAAAA;;;AAHhB,MAAMC,cAAc;AACpB,MAAMC,kBAAkB;AAEjB,SAASF,mBAAmBG,GAAW;IAC5C,+GAA+G;IAC/G,IAAIF,YAAYG,IAAI,CAACD,MAAM;QACzB,OAAOA,IAAIE,OAAO,CAACH,iBAAiB;IACtC;IACA,OAAOC;AACT"}

13
node_modules/next/dist/shared/lib/fnv1a.d.ts generated vendored Normal file
View File

@@ -0,0 +1,13 @@
declare const FNV_PRIMES: {
readonly 32: bigint;
readonly 64: bigint;
readonly 128: bigint;
readonly 256: bigint;
readonly 512: bigint;
readonly 1024: bigint;
};
export default function fnv1a(inputString: string, { size, seed, }?: {
size?: keyof typeof FNV_PRIMES;
seed?: number;
}): bigint;
export {};

53
node_modules/next/dist/shared/lib/fnv1a.js generated vendored Normal file
View File

@@ -0,0 +1,53 @@
// source: https://github.com/sindresorhus/fnv1a
// FNV_PRIMES and FNV_OFFSETS from
// http://www.isthe.com/chongo/tech/comp/fnv/index.html#FNV-param
/* eslint-disable @typescript-eslint/no-loss-of-precision */ "use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: function() {
return fnv1a;
}
});
const FNV_PRIMES = {
32: BigInt(16777619),
64: BigInt(1099511628211),
128: BigInt(309485009821345068724781371),
256: BigInt(374144419156711147060143317175368453031918731002211),
512: BigInt(35835915874844867368919076489095108449946327955754392558399825615420669938882575126094039892345713852759),
1024: BigInt(5016456510113118655434598811035278955030765345404790744303017523831112055108147451509157692220295382716162651878526895249385292291816524375083746691371804094271873160484737966720260389217684476157468082573)
};
const FNV_OFFSETS = {
32: BigInt(2166136261),
64: BigInt(14695981039346656037),
128: BigInt(144066263297769815596495629667062367629),
256: BigInt(100029257958052580907070968620625704837092796014241193945225284501741471925557),
512: BigInt(9659303129496669498009435400716310466090418745672637896108374329434462657994582932197716438449813051892206539805784495328239340083876191928701583869517785),
1024: BigInt(14197795064947621068722070641403218320880622795441933960878474914617582723252296732303717722150864096521202355549365628174669108571814760471015076148029755969804077320157692458563003215304957150157403644460363550505412711285966361610267868082893823963790439336411086884584107735010676915)
};
function fnv1a(inputString, param) {
let { size = 32, seed = 0 } = param === void 0 ? {} : param;
if (!FNV_PRIMES[size]) {
throw new Error("The `size` option must be one of 32, 64, 128, 256, 512, or 1024");
}
let hash = FNV_OFFSETS[size] ^ BigInt(seed);
const fnvPrime = FNV_PRIMES[size];
// Handle Unicode code points > 0x7f
let isUnicoded = false;
for(let index = 0; index < inputString.length; index++){
let characterCode = inputString.charCodeAt(index);
// Non-ASCII characters trigger the Unicode escape logic
if (characterCode > 0x7f && !isUnicoded) {
inputString = unescape(encodeURIComponent(inputString));
characterCode = inputString.charCodeAt(index);
isUnicoded = true;
}
hash ^= BigInt(characterCode);
hash = BigInt.asUintN(size, hash * fnvPrime);
}
return hash;
}
//# sourceMappingURL=fnv1a.js.map

1
node_modules/next/dist/shared/lib/fnv1a.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/shared/lib/fnv1a.ts"],"names":["fnv1a","FNV_PRIMES","BigInt","FNV_OFFSETS","inputString","size","seed","Error","hash","fnvPrime","isUnicoded","index","length","characterCode","charCodeAt","unescape","encodeURIComponent","asUintN"],"mappings":"AAAA,gDAAgD;AAChD,kCAAkC;AAClC,iEAAiE;AACjE,0DAA0D;;;;+BAgC1D;;;eAAwBA;;;AA9BxB,MAAMC,aAAa;IACjB,IAAIC,OAAO;IACX,IAAIA,OAAO;IACX,KAAKA,OAAO;IACZ,KAAKA,OACH;IAEF,KAAKA,OACH;IAEF,MAAMA,OACJ;AAEJ;AAEA,MAAMC,cAAc;IAClB,IAAID,OAAO;IACX,IAAIA,OAAO;IACX,KAAKA,OAAO;IACZ,KAAKA,OACH;IAEF,KAAKA,OACH;IAEF,MAAMA,OACJ;AAEJ;AAEe,SAASF,MACtBI,WAAmB,EACnB;IAAA,IAAA,EACEC,OAAO,EAAE,EACTC,OAAO,CAAC,EAIT,GAND,mBAMI,CAAC,IANL;IAQA,IAAI,CAACL,UAAU,CAACI,KAAK,EAAE;QACrB,MAAM,IAAIE,MACR;IAEJ;IAEA,IAAIC,OAAeL,WAAW,CAACE,KAAK,GAAGH,OAAOI;IAC9C,MAAMG,WAAWR,UAAU,CAACI,KAAK;IAEjC,oCAAoC;IACpC,IAAIK,aAAa;IAEjB,IAAK,IAAIC,QAAQ,GAAGA,QAAQP,YAAYQ,MAAM,EAAED,QAAS;QACvD,IAAIE,gBAAgBT,YAAYU,UAAU,CAACH;QAE3C,wDAAwD;QACxD,IAAIE,gBAAgB,QAAQ,CAACH,YAAY;YACvCN,cAAcW,SAASC,mBAAmBZ;YAC1CS,gBAAgBT,YAAYU,UAAU,CAACH;YACvCD,aAAa;QACf;QAEAF,QAAQN,OAAOW;QACfL,OAAON,OAAOe,OAAO,CAACZ,MAAMG,OAAOC;IACrC;IAEA,OAAOD;AACT"}

11
node_modules/next/dist/shared/lib/get-hostname.d.ts generated vendored Normal file
View File

@@ -0,0 +1,11 @@
/// <reference types="node" />
import type { OutgoingHttpHeaders } from 'http';
/**
* Takes an object with a hostname property (like a parsed URL) and some
* headers that may contain Host and returns the preferred hostname.
* @param parsed An object containing a hostname property.
* @param headers A dictionary with headers containing a `host`.
*/
export declare function getHostname(parsed: {
hostname?: string | null;
}, headers?: OutgoingHttpHeaders): string | undefined;

23
node_modules/next/dist/shared/lib/get-hostname.js generated vendored Normal file
View File

@@ -0,0 +1,23 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "getHostname", {
enumerable: true,
get: function() {
return getHostname;
}
});
function getHostname(parsed, headers) {
// Get the hostname from the headers if it exists, otherwise use the parsed
// hostname.
let hostname;
if ((headers == null ? void 0 : headers.host) && !Array.isArray(headers.host)) {
hostname = headers.host.toString().split(":")[0];
} else if (parsed.hostname) {
hostname = parsed.hostname;
} else return;
return hostname.toLowerCase();
}
//# sourceMappingURL=get-hostname.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/shared/lib/get-hostname.ts"],"names":["getHostname","parsed","headers","hostname","host","Array","isArray","toString","split","toLowerCase"],"mappings":";;;;+BAQgBA;;;eAAAA;;;AAAT,SAASA,YACdC,MAAoC,EACpCC,OAA6B;IAE7B,2EAA2E;IAC3E,YAAY;IACZ,IAAIC;IACJ,IAAID,CAAAA,2BAAAA,QAASE,IAAI,KAAI,CAACC,MAAMC,OAAO,CAACJ,QAAQE,IAAI,GAAG;QACjDD,WAAWD,QAAQE,IAAI,CAACG,QAAQ,GAAGC,KAAK,CAAC,IAAI,CAAC,EAAE;IAClD,OAAO,IAAIP,OAAOE,QAAQ,EAAE;QAC1BA,WAAWF,OAAOE,QAAQ;IAC5B,OAAO;IAEP,OAAOA,SAASM,WAAW;AAC7B"}

View File

@@ -0,0 +1 @@
export {};

98
node_modules/next/dist/shared/lib/get-hostname.test.js generated vendored Normal file
View File

@@ -0,0 +1,98 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
const _gethostname = require("./get-hostname");
describe("getHostname", ()=>{
describe("from URL", ()=>{
it.each([
{
url: "http://example.com",
hostname: "example.com"
},
{
url: "http://example.com/",
hostname: "example.com"
},
{
url: "http://example.com:3000",
hostname: "example.com"
},
{
url: "https://example.com",
hostname: "example.com"
},
{
url: "https://example.com/",
hostname: "example.com"
},
{
url: "https://example.com:3000",
hostname: "example.com"
},
{
url: "http://localhost",
hostname: "localhost"
},
{
url: "http://localhost/",
hostname: "localhost"
},
{
url: "http://localhost:3000",
hostname: "localhost"
},
{
url: "http://127.0.0.1",
hostname: "127.0.0.1"
},
{
url: "http://127.0.0.1/",
hostname: "127.0.0.1"
},
{
url: "http://127.0.0.1:3000",
hostname: "127.0.0.1"
},
{
url: "http://8.8.8.8",
hostname: "8.8.8.8"
},
{
url: "http://8.8.8.8/",
hostname: "8.8.8.8"
},
{
url: "http://8.8.8.8:3000",
hostname: "8.8.8.8"
}
])("should return $hostname for $url", (param)=>{
let { url, hostname } = param;
const parsed = new URL(url);
// Base case.
expect((0, _gethostname.getHostname)(parsed)).toBe(hostname);
// With headers.
expect((0, _gethostname.getHostname)(parsed, {
host: parsed.host
})).toBe(hostname);
// With an empty headers array.
expect((0, _gethostname.getHostname)(parsed, {
host: []
})).toBe(hostname);
// With a headers array.
expect((0, _gethostname.getHostname)({}, {
host: [
parsed.host
]
})).toBe(undefined);
});
});
it("should return undefined for empty input", ()=>{
expect((0, _gethostname.getHostname)({})).toBe(undefined);
expect((0, _gethostname.getHostname)({}, {
host: []
})).toBe(undefined);
});
});
//# sourceMappingURL=get-hostname.test.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/shared/lib/get-hostname.test.ts"],"names":["describe","it","each","url","hostname","parsed","URL","expect","getHostname","toBe","host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,2CAA2C;QAC5CM,OAAOC,IAAAA,wBAAW,EAAC,CAAC,IAAIC,IAAI,CAACE;QAC7BJ,OAAOC,IAAAA,wBAAW,EAAC,CAAC,GAAG;YAAEE,MAAM,EAAE;QAAC,IAAID,IAAI,CAACE;IAC7C;AACF"}

84
node_modules/next/dist/shared/lib/get-img-props.d.ts generated vendored Normal file
View File

@@ -0,0 +1,84 @@
/// <reference types="react" />
import type { ImageConfigComplete, ImageLoaderProps, ImageLoaderPropsWithConfig } from './image-config';
export interface StaticImageData {
src: string;
height: number;
width: number;
blurDataURL?: string;
blurWidth?: number;
blurHeight?: number;
}
export interface StaticRequire {
default: StaticImageData;
}
export type StaticImport = StaticRequire | StaticImageData;
export type ImageProps = Omit<JSX.IntrinsicElements['img'], 'src' | 'srcSet' | 'ref' | 'alt' | 'width' | 'height' | 'loading'> & {
src: string | StaticImport;
alt: string;
width?: number | `${number}`;
height?: number | `${number}`;
fill?: boolean;
loader?: ImageLoader;
quality?: number | `${number}`;
priority?: boolean;
loading?: LoadingValue;
placeholder?: PlaceholderValue;
blurDataURL?: string;
unoptimized?: boolean;
onLoadingComplete?: OnLoadingComplete;
/**
* @deprecated Use `fill` prop instead of `layout="fill"` or change import to `next/legacy/image`.
* @see https://nextjs.org/docs/api-reference/next/legacy/image
*/
layout?: string;
/**
* @deprecated Use `style` prop instead.
*/
objectFit?: string;
/**
* @deprecated Use `style` prop instead.
*/
objectPosition?: string;
/**
* @deprecated This prop does not do anything.
*/
lazyBoundary?: string;
/**
* @deprecated This prop does not do anything.
*/
lazyRoot?: string;
};
export type ImgProps = Omit<ImageProps, 'src' | 'alt' | 'loader'> & {
loading: LoadingValue;
width: number | undefined;
height: number | undefined;
style: NonNullable<JSX.IntrinsicElements['img']['style']>;
sizes: string | undefined;
srcSet: string | undefined;
src: string;
};
declare const VALID_LOADING_VALUES: readonly ["lazy", "eager", undefined];
type LoadingValue = (typeof VALID_LOADING_VALUES)[number];
export type ImageLoader = (p: ImageLoaderProps) => string;
type ImageLoaderWithConfig = (p: ImageLoaderPropsWithConfig) => string;
export type PlaceholderValue = 'blur' | 'empty' | `data:image/${string}`;
export type OnLoad = React.ReactEventHandler<HTMLImageElement> | undefined;
export type OnLoadingComplete = (img: HTMLImageElement) => void;
/**
* A shared function, used on both client and server, to generate the props for <img>.
*/
export declare function getImgProps({ src, sizes, unoptimized, priority, loading, className, quality, width, height, fill, style, onLoad, onLoadingComplete, placeholder, blurDataURL, fetchPriority, layout, objectFit, objectPosition, lazyBoundary, lazyRoot, ...rest }: ImageProps, _state: {
defaultLoader: ImageLoaderWithConfig;
imgConf: ImageConfigComplete;
showAltText?: boolean;
blurComplete?: boolean;
}): {
props: ImgProps;
meta: {
unoptimized: boolean;
priority: boolean;
placeholder: NonNullable<ImageProps['placeholder']>;
fill: boolean;
};
};
export {};

444
node_modules/next/dist/shared/lib/get-img-props.js generated vendored Normal file
View File

@@ -0,0 +1,444 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "getImgProps", {
enumerable: true,
get: function() {
return getImgProps;
}
});
const _warnonce = require("./utils/warn-once");
const _imageblursvg = require("./image-blur-svg");
const _imageconfig = require("./image-config");
const VALID_LOADING_VALUES = [
"lazy",
"eager",
undefined
];
function isStaticRequire(src) {
return src.default !== undefined;
}
function isStaticImageData(src) {
return src.src !== undefined;
}
function isStaticImport(src) {
return typeof src === "object" && (isStaticRequire(src) || isStaticImageData(src));
}
const allImgs = new Map();
let perfObserver;
function getInt(x) {
if (typeof x === "undefined") {
return x;
}
if (typeof x === "number") {
return Number.isFinite(x) ? x : NaN;
}
if (typeof x === "string" && /^[0-9]+$/.test(x)) {
return parseInt(x, 10);
}
return NaN;
}
function getWidths(param, width, sizes) {
let { deviceSizes, allSizes } = param;
if (sizes) {
// Find all the "vw" percent sizes used in the sizes prop
const viewportWidthRe = /(^|\s)(1?\d?\d)vw/g;
const percentSizes = [];
for(let match; match = viewportWidthRe.exec(sizes); match){
percentSizes.push(parseInt(match[2]));
}
if (percentSizes.length) {
const smallestRatio = Math.min(...percentSizes) * 0.01;
return {
widths: allSizes.filter((s)=>s >= deviceSizes[0] * smallestRatio),
kind: "w"
};
}
return {
widths: allSizes,
kind: "w"
};
}
if (typeof width !== "number") {
return {
widths: deviceSizes,
kind: "w"
};
}
const widths = [
...new Set(// > This means that most OLED screens that say they are 3x resolution,
// > are actually 3x in the green color, but only 1.5x in the red and
// > blue colors. Showing a 3x resolution image in the app vs a 2x
// > resolution image will be visually the same, though the 3x image
// > takes significantly more data. Even true 3x resolution screens are
// > wasteful as the human eye cannot see that level of detail without
// > something like a magnifying glass.
// https://blog.twitter.com/engineering/en_us/topics/infrastructure/2019/capping-image-fidelity-on-ultra-high-resolution-devices.html
[
width,
width * 2 /*, width * 3*/
].map((w)=>allSizes.find((p)=>p >= w) || allSizes[allSizes.length - 1]))
];
return {
widths,
kind: "x"
};
}
function generateImgAttrs(param) {
let { config, src, unoptimized, width, quality, sizes, loader } = param;
if (unoptimized) {
return {
src,
srcSet: undefined,
sizes: undefined
};
}
const { widths, kind } = getWidths(config, width, sizes);
const last = widths.length - 1;
return {
sizes: !sizes && kind === "w" ? "100vw" : sizes,
srcSet: widths.map((w, i)=>loader({
config,
src,
quality,
width: w
}) + " " + (kind === "w" ? w : i + 1) + kind).join(", "),
// It's intended to keep `src` the last attribute because React updates
// attributes in order. If we keep `src` the first one, Safari will
// immediately start to fetch `src`, before `sizes` and `srcSet` are even
// updated by React. That causes multiple unnecessary requests if `srcSet`
// and `sizes` are defined.
// This bug cannot be reproduced in Chrome or Firefox.
src: loader({
config,
src,
quality,
width: widths[last]
})
};
}
function getImgProps(param, _state) {
let { src, sizes, unoptimized = false, priority = false, loading, className, quality, width, height, fill = false, style, onLoad, onLoadingComplete, placeholder = "empty", blurDataURL, fetchPriority, layout, objectFit, objectPosition, lazyBoundary, lazyRoot, ...rest } = param;
const { imgConf, showAltText, blurComplete, defaultLoader } = _state;
let config;
let c = imgConf || _imageconfig.imageConfigDefault;
if ("allSizes" in c) {
config = c;
} else {
const allSizes = [
...c.deviceSizes,
...c.imageSizes
].sort((a, b)=>a - b);
const deviceSizes = c.deviceSizes.sort((a, b)=>a - b);
config = {
...c,
allSizes,
deviceSizes
};
}
let loader = rest.loader || defaultLoader;
// Remove property so it's not spread on <img> element
delete rest.loader;
delete rest.srcSet;
// This special value indicates that the user
// didn't define a "loader" prop or "loader" config.
const isDefaultLoader = "__next_img_default" in loader;
if (isDefaultLoader) {
if (config.loader === "custom") {
throw new Error('Image with src "' + src + '" is missing "loader" prop.' + "\nRead more: https://nextjs.org/docs/messages/next-image-missing-loader");
}
} else {
// The user defined a "loader" prop or config.
// Since the config object is internal only, we
// must not pass it to the user-defined "loader".
const customImageLoader = loader;
loader = (obj)=>{
const { config: _, ...opts } = obj;
return customImageLoader(opts);
};
}
if (layout) {
if (layout === "fill") {
fill = true;
}
const layoutToStyle = {
intrinsic: {
maxWidth: "100%",
height: "auto"
},
responsive: {
width: "100%",
height: "auto"
}
};
const layoutToSizes = {
responsive: "100vw",
fill: "100vw"
};
const layoutStyle = layoutToStyle[layout];
if (layoutStyle) {
style = {
...style,
...layoutStyle
};
}
const layoutSizes = layoutToSizes[layout];
if (layoutSizes && !sizes) {
sizes = layoutSizes;
}
}
let staticSrc = "";
let widthInt = getInt(width);
let heightInt = getInt(height);
let blurWidth;
let blurHeight;
if (isStaticImport(src)) {
const staticImageData = isStaticRequire(src) ? src.default : src;
if (!staticImageData.src) {
throw new Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received " + JSON.stringify(staticImageData));
}
if (!staticImageData.height || !staticImageData.width) {
throw new Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received " + JSON.stringify(staticImageData));
}
blurWidth = staticImageData.blurWidth;
blurHeight = staticImageData.blurHeight;
blurDataURL = blurDataURL || staticImageData.blurDataURL;
staticSrc = staticImageData.src;
if (!fill) {
if (!widthInt && !heightInt) {
widthInt = staticImageData.width;
heightInt = staticImageData.height;
} else if (widthInt && !heightInt) {
const ratio = widthInt / staticImageData.width;
heightInt = Math.round(staticImageData.height * ratio);
} else if (!widthInt && heightInt) {
const ratio = heightInt / staticImageData.height;
widthInt = Math.round(staticImageData.width * ratio);
}
}
}
src = typeof src === "string" ? src : staticSrc;
let isLazy = !priority && (loading === "lazy" || typeof loading === "undefined");
if (!src || src.startsWith("data:") || src.startsWith("blob:")) {
// https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URIs
unoptimized = true;
isLazy = false;
}
if (config.unoptimized) {
unoptimized = true;
}
if (isDefaultLoader && src.endsWith(".svg") && !config.dangerouslyAllowSVG) {
// Special case to make svg serve as-is to avoid proxying
// through the built-in Image Optimization API.
unoptimized = true;
}
if (priority) {
fetchPriority = "high";
}
const qualityInt = getInt(quality);
if (process.env.NODE_ENV !== "production") {
if (config.output === "export" && isDefaultLoader && !unoptimized) {
throw new Error("Image Optimization using the default loader is not compatible with `{ output: 'export' }`.\n Possible solutions:\n - Remove `{ output: 'export' }` and run \"next start\" to run server mode including the Image Optimization API.\n - Configure `{ images: { unoptimized: true } }` in `next.config.js` to disable the Image Optimization API.\n Read more: https://nextjs.org/docs/messages/export-image-api");
}
if (!src) {
// React doesn't show the stack trace and there's
// no `src` to help identify which image, so we
// instead console.error(ref) during mount.
unoptimized = true;
} else {
if (fill) {
if (width) {
throw new Error('Image with src "' + src + '" has both "width" and "fill" properties. Only one should be used.');
}
if (height) {
throw new Error('Image with src "' + src + '" has both "height" and "fill" properties. Only one should be used.');
}
if ((style == null ? void 0 : style.position) && style.position !== "absolute") {
throw new Error('Image with src "' + src + '" has both "fill" and "style.position" properties. Images with "fill" always use position absolute - it cannot be modified.');
}
if ((style == null ? void 0 : style.width) && style.width !== "100%") {
throw new Error('Image with src "' + src + '" has both "fill" and "style.width" properties. Images with "fill" always use width 100% - it cannot be modified.');
}
if ((style == null ? void 0 : style.height) && style.height !== "100%") {
throw new Error('Image with src "' + src + '" has both "fill" and "style.height" properties. Images with "fill" always use height 100% - it cannot be modified.');
}
} else {
if (typeof widthInt === "undefined") {
throw new Error('Image with src "' + src + '" is missing required "width" property.');
} else if (isNaN(widthInt)) {
throw new Error('Image with src "' + src + '" has invalid "width" property. Expected a numeric value in pixels but received "' + width + '".');
}
if (typeof heightInt === "undefined") {
throw new Error('Image with src "' + src + '" is missing required "height" property.');
} else if (isNaN(heightInt)) {
throw new Error('Image with src "' + src + '" has invalid "height" property. Expected a numeric value in pixels but received "' + height + '".');
}
}
}
if (!VALID_LOADING_VALUES.includes(loading)) {
throw new Error('Image with src "' + src + '" has invalid "loading" property. Provided "' + loading + '" should be one of ' + VALID_LOADING_VALUES.map(String).join(",") + ".");
}
if (priority && loading === "lazy") {
throw new Error('Image with src "' + src + '" has both "priority" and "loading=\'lazy\'" properties. Only one should be used.');
}
if (placeholder !== "empty" && placeholder !== "blur" && !placeholder.startsWith("data:image/")) {
throw new Error('Image with src "' + src + '" has invalid "placeholder" property "' + placeholder + '".');
}
if (placeholder !== "empty") {
if (widthInt && heightInt && widthInt * heightInt < 1600) {
(0, _warnonce.warnOnce)('Image with src "' + src + '" is smaller than 40x40. Consider removing the "placeholder" property to improve performance.');
}
}
if (placeholder === "blur" && !blurDataURL) {
const VALID_BLUR_EXT = [
"jpeg",
"png",
"webp",
"avif"
] // should match next-image-loader
;
throw new Error('Image with src "' + src + '" has "placeholder=\'blur\'" property but is missing the "blurDataURL" property.\n Possible solutions:\n - Add a "blurDataURL" property, the contents should be a small Data URL to represent the image\n - Change the "src" property to a static import with one of the supported file types: ' + VALID_BLUR_EXT.join(",") + ' (animated images not supported)\n - Remove the "placeholder" property, effectively no blur effect\n Read more: https://nextjs.org/docs/messages/placeholder-blur-data-url');
}
if ("ref" in rest) {
(0, _warnonce.warnOnce)('Image with src "' + src + '" is using unsupported "ref" property. Consider using the "onLoadingComplete" property instead.');
}
if (!unoptimized && !isDefaultLoader) {
const urlStr = loader({
config,
src,
width: widthInt || 400,
quality: qualityInt || 75
});
let url;
try {
url = new URL(urlStr);
} catch (err) {}
if (urlStr === src || url && url.pathname === src && !url.search) {
(0, _warnonce.warnOnce)('Image with src "' + src + '" has a "loader" property that does not implement width. Please implement it or use the "unoptimized" property instead.' + "\nRead more: https://nextjs.org/docs/messages/next-image-missing-loader-width");
}
}
for (const [legacyKey, legacyValue] of Object.entries({
layout,
objectFit,
objectPosition,
lazyBoundary,
lazyRoot
})){
if (legacyValue) {
(0, _warnonce.warnOnce)('Image with src "' + src + '" has legacy prop "' + legacyKey + '". Did you forget to run the codemod?' + "\nRead more: https://nextjs.org/docs/messages/next-image-upgrade-to-13");
}
}
if (typeof window !== "undefined" && !perfObserver && window.PerformanceObserver) {
perfObserver = new PerformanceObserver((entryList)=>{
for (const entry of entryList.getEntries()){
var _entry_element;
// @ts-ignore - missing "LargestContentfulPaint" class with "element" prop
const imgSrc = (entry == null ? void 0 : (_entry_element = entry.element) == null ? void 0 : _entry_element.src) || "";
const lcpImage = allImgs.get(imgSrc);
if (lcpImage && !lcpImage.priority && lcpImage.placeholder === "empty" && !lcpImage.src.startsWith("data:") && !lcpImage.src.startsWith("blob:")) {
// https://web.dev/lcp/#measure-lcp-in-javascript
(0, _warnonce.warnOnce)('Image with src "' + lcpImage.src + '" was detected as the Largest Contentful Paint (LCP). Please add the "priority" property if this image is above the fold.' + "\nRead more: https://nextjs.org/docs/api-reference/next/image#priority");
}
}
});
try {
perfObserver.observe({
type: "largest-contentful-paint",
buffered: true
});
} catch (err) {
// Log error but don't crash the app
console.error(err);
}
}
}
const imgStyle = Object.assign(fill ? {
position: "absolute",
height: "100%",
width: "100%",
left: 0,
top: 0,
right: 0,
bottom: 0,
objectFit,
objectPosition
} : {}, showAltText ? {} : {
color: "transparent"
}, style);
const backgroundImage = !blurComplete && placeholder !== "empty" ? placeholder === "blur" ? 'url("data:image/svg+xml;charset=utf-8,' + (0, _imageblursvg.getImageBlurSvg)({
widthInt,
heightInt,
blurWidth,
blurHeight,
blurDataURL: blurDataURL || "",
objectFit: imgStyle.objectFit
}) + '")' : 'url("' + placeholder + '")' // assume `data:image/`
: null;
let placeholderStyle = backgroundImage ? {
backgroundSize: imgStyle.objectFit || "cover",
backgroundPosition: imgStyle.objectPosition || "50% 50%",
backgroundRepeat: "no-repeat",
backgroundImage
} : {};
if (process.env.NODE_ENV === "development") {
if (placeholderStyle.backgroundImage && placeholder === "blur" && (blurDataURL == null ? void 0 : blurDataURL.startsWith("/"))) {
// During `next dev`, we don't want to generate blur placeholders with webpack
// because it can delay starting the dev server. Instead, `next-image-loader.js`
// will inline a special url to lazily generate the blur placeholder at request time.
placeholderStyle.backgroundImage = 'url("' + blurDataURL + '")';
}
}
const imgAttributes = generateImgAttrs({
config,
src,
unoptimized,
width: widthInt,
quality: qualityInt,
sizes,
loader
});
if (process.env.NODE_ENV !== "production") {
if (typeof window !== "undefined") {
let fullUrl;
try {
fullUrl = new URL(imgAttributes.src);
} catch (e) {
fullUrl = new URL(imgAttributes.src, window.location.href);
}
allImgs.set(fullUrl.href, {
src,
priority,
placeholder
});
}
}
const props = {
...rest,
loading: isLazy ? "lazy" : loading,
fetchPriority,
width: widthInt,
height: heightInt,
decoding: "async",
className,
style: {
...imgStyle,
...placeholderStyle
},
sizes: imgAttributes.sizes,
srcSet: imgAttributes.srcSet,
src: imgAttributes.src
};
const meta = {
unoptimized,
priority,
placeholder,
fill
};
return {
props,
meta
};
}
//# sourceMappingURL=get-img-props.js.map

File diff suppressed because one or more lines are too long

2
node_modules/next/dist/shared/lib/hash.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
export declare function djb2Hash(str: string): number;
export declare function hexHash(str: string): string;

36
node_modules/next/dist/shared/lib/hash.js generated vendored Normal file
View File

@@ -0,0 +1,36 @@
// http://www.cse.yorku.ca/~oz/hash.html
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
djb2Hash: null,
hexHash: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
djb2Hash: function() {
return djb2Hash;
},
hexHash: function() {
return hexHash;
}
});
function djb2Hash(str) {
let hash = 5381;
for(let i = 0; i < str.length; i++){
const char = str.charCodeAt(i);
hash = (hash << 5) + hash + char;
}
return Math.abs(hash);
}
function hexHash(str) {
return djb2Hash(str).toString(36).slice(0, 5);
}
//# sourceMappingURL=hash.js.map

1
node_modules/next/dist/shared/lib/hash.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/shared/lib/hash.ts"],"names":["djb2Hash","hexHash","str","hash","i","length","char","charCodeAt","Math","abs","toString","slice"],"mappings":"AAAA,wCAAwC;;;;;;;;;;;;;;;;IACxBA,QAAQ;eAARA;;IASAC,OAAO;eAAPA;;;AATT,SAASD,SAASE,GAAW;IAClC,IAAIC,OAAO;IACX,IAAK,IAAIC,IAAI,GAAGA,IAAIF,IAAIG,MAAM,EAAED,IAAK;QACnC,MAAME,OAAOJ,IAAIK,UAAU,CAACH;QAC5BD,OAAO,AAACA,CAAAA,QAAQ,CAAA,IAAKA,OAAOG;IAC9B;IACA,OAAOE,KAAKC,GAAG,CAACN;AAClB;AAEO,SAASF,QAAQC,GAAW;IACjC,OAAOF,SAASE,KAAKQ,QAAQ,CAAC,IAAIC,KAAK,CAAC,GAAG;AAC7C"}

View File

@@ -0,0 +1,10 @@
import React from 'react';
export declare const HeadManagerContext: React.Context<{
updateHead?: (state: any) => void;
mountedInstances?: any;
updateScripts?: (state: any) => void;
scripts?: any;
getIsSsr?: () => boolean;
appDir?: boolean;
nonce?: string;
}>;

View File

@@ -0,0 +1,18 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "HeadManagerContext", {
enumerable: true,
get: function() {
return HeadManagerContext;
}
});
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
const _react = /*#__PURE__*/ _interop_require_default._(require("react"));
const HeadManagerContext = _react.default.createContext({});
if (process.env.NODE_ENV !== "production") {
HeadManagerContext.displayName = "HeadManagerContext";
}
//# sourceMappingURL=head-manager-context.shared-runtime.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/shared/lib/head-manager-context.shared-runtime.ts"],"names":["HeadManagerContext","React","createContext","process","env","NODE_ENV","displayName"],"mappings":";;;;+BAEaA;;;eAAAA;;;;gEAFK;AAEX,MAAMA,qBAURC,cAAK,CAACC,aAAa,CAAC,CAAC;AAE1B,IAAIC,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;IACzCL,mBAAmBM,WAAW,GAAG;AACnC"}

10
node_modules/next/dist/shared/lib/head.d.ts generated vendored Normal file
View File

@@ -0,0 +1,10 @@
import React from 'react';
export declare function defaultHead(inAmpMode?: boolean): JSX.Element[];
/**
* This component injects elements to `<head>` of your page.
* To avoid duplicated `tags` in `<head>` you can use the `key` property, which will make sure every tag is only rendered once.
*/
declare function Head({ children }: {
children: React.ReactNode;
}): React.JSX.Element;
export default Head;

187
node_modules/next/dist/shared/lib/head.js generated vendored Normal file
View File

@@ -0,0 +1,187 @@
"use client";
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
defaultHead: null,
default: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
defaultHead: function() {
return defaultHead;
},
default: function() {
return _default;
}
});
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
const _sideeffect = /*#__PURE__*/ _interop_require_default._(require("./side-effect"));
const _ampcontextsharedruntime = require("./amp-context.shared-runtime");
const _headmanagercontextsharedruntime = require("./head-manager-context.shared-runtime");
const _ampmode = require("./amp-mode");
const _warnonce = require("./utils/warn-once");
function defaultHead(inAmpMode) {
if (inAmpMode === void 0) inAmpMode = false;
const head = [
/*#__PURE__*/ _react.default.createElement("meta", {
charSet: "utf-8"
})
];
if (!inAmpMode) {
head.push(/*#__PURE__*/ _react.default.createElement("meta", {
name: "viewport",
content: "width=device-width"
}));
}
return head;
}
function onlyReactElement(list, child) {
// React children can be "string" or "number" in this case we ignore them for backwards compat
if (typeof child === "string" || typeof child === "number") {
return list;
}
// Adds support for React.Fragment
if (child.type === _react.default.Fragment) {
return list.concat(// @ts-expect-error @types/react does not remove fragments but this could also return ReactPortal[]
_react.default.Children.toArray(child.props.children).reduce(// @ts-expect-error @types/react does not remove fragments but this could also return ReactPortal[]
(fragmentList, fragmentChild)=>{
if (typeof fragmentChild === "string" || typeof fragmentChild === "number") {
return fragmentList;
}
return fragmentList.concat(fragmentChild);
}, []));
}
return list.concat(child);
}
const METATYPES = [
"name",
"httpEquiv",
"charSet",
"itemProp"
];
/*
returns a function for filtering head child elements
which shouldn't be duplicated, like <title/>
Also adds support for deduplicated `key` properties
*/ function unique() {
const keys = new Set();
const tags = new Set();
const metaTypes = new Set();
const metaCategories = {};
return (h)=>{
let isUnique = true;
let hasKey = false;
if (h.key && typeof h.key !== "number" && h.key.indexOf("$") > 0) {
hasKey = true;
const key = h.key.slice(h.key.indexOf("$") + 1);
if (keys.has(key)) {
isUnique = false;
} else {
keys.add(key);
}
}
// eslint-disable-next-line default-case
switch(h.type){
case "title":
case "base":
if (tags.has(h.type)) {
isUnique = false;
} else {
tags.add(h.type);
}
break;
case "meta":
for(let i = 0, len = METATYPES.length; i < len; i++){
const metatype = METATYPES[i];
if (!h.props.hasOwnProperty(metatype)) continue;
if (metatype === "charSet") {
if (metaTypes.has(metatype)) {
isUnique = false;
} else {
metaTypes.add(metatype);
}
} else {
const category = h.props[metatype];
const categories = metaCategories[metatype] || new Set();
if ((metatype !== "name" || !hasKey) && categories.has(category)) {
isUnique = false;
} else {
categories.add(category);
metaCategories[metatype] = categories;
}
}
}
break;
}
return isUnique;
};
}
/**
*
* @param headChildrenElements List of children of <Head>
*/ function reduceComponents(headChildrenElements, props) {
const { inAmpMode } = props;
return headChildrenElements.reduce(onlyReactElement, []).reverse().concat(defaultHead(inAmpMode).reverse()).filter(unique()).reverse().map((c, i)=>{
const key = c.key || i;
if (process.env.NODE_ENV !== "development" && process.env.__NEXT_OPTIMIZE_FONTS && !inAmpMode) {
if (c.type === "link" && c.props["href"] && // TODO(prateekbh@): Replace this with const from `constants` when the tree shaking works.
[
"https://fonts.googleapis.com/css",
"https://use.typekit.net/"
].some((url)=>c.props["href"].startsWith(url))) {
const newProps = {
...c.props || {}
};
newProps["data-href"] = newProps["href"];
newProps["href"] = undefined;
// Add this attribute to make it easy to identify optimized tags
newProps["data-optimized-fonts"] = true;
return /*#__PURE__*/ _react.default.cloneElement(c, newProps);
}
}
if (process.env.NODE_ENV === "development") {
// omit JSON-LD structured data snippets from the warning
if (c.type === "script" && c.props["type"] !== "application/ld+json") {
const srcMessage = c.props["src"] ? '<script> tag with src="' + c.props["src"] + '"' : "inline <script>";
(0, _warnonce.warnOnce)("Do not add <script> tags using next/head (see " + srcMessage + "). Use next/script instead. \nSee more info here: https://nextjs.org/docs/messages/no-script-tags-in-head-component");
} else if (c.type === "link" && c.props["rel"] === "stylesheet") {
(0, _warnonce.warnOnce)('Do not add stylesheets using next/head (see <link rel="stylesheet"> tag with href="' + c.props["href"] + '"). Use Document instead. \nSee more info here: https://nextjs.org/docs/messages/no-stylesheets-in-head-component');
}
}
return /*#__PURE__*/ _react.default.cloneElement(c, {
key
});
});
}
/**
* This component injects elements to `<head>` of your page.
* To avoid duplicated `tags` in `<head>` you can use the `key` property, which will make sure every tag is only rendered once.
*/ function Head(param) {
let { children } = param;
const ampState = (0, _react.useContext)(_ampcontextsharedruntime.AmpStateContext);
const headManager = (0, _react.useContext)(_headmanagercontextsharedruntime.HeadManagerContext);
return /*#__PURE__*/ _react.default.createElement(_sideeffect.default, {
reduceComponentsToState: reduceComponents,
headManager: headManager,
inAmpMode: (0, _ampmode.isInAmpMode)(ampState)
}, children);
}
const _default = Head;
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', { value: true });
Object.assign(exports.default, exports);
module.exports = exports.default;
}
//# sourceMappingURL=head.js.map

1
node_modules/next/dist/shared/lib/head.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/shared/lib/head.tsx"],"names":["defaultHead","inAmpMode","head","meta","charSet","push","name","content","onlyReactElement","list","child","type","React","Fragment","concat","Children","toArray","props","children","reduce","fragmentList","fragmentChild","METATYPES","unique","keys","Set","tags","metaTypes","metaCategories","h","isUnique","hasKey","key","indexOf","slice","has","add","i","len","length","metatype","hasOwnProperty","category","categories","reduceComponents","headChildrenElements","reverse","filter","map","c","process","env","NODE_ENV","__NEXT_OPTIMIZE_FONTS","some","url","startsWith","newProps","undefined","cloneElement","srcMessage","warnOnce","Head","ampState","useContext","AmpStateContext","headManager","HeadManagerContext","Effect","reduceComponentsToState","isInAmpMode"],"mappings":"AAAA;;;;;;;;;;;;;;;;IAagBA,WAAW;eAAXA;;IAwLhB,OAAmB;eAAnB;;;;;iEAnMkC;qEACf;yCACa;iDACG;yBACP;0BACH;AAMlB,SAASA,YAAYC,SAAiB;IAAjBA,IAAAA,sBAAAA,YAAY;IACtC,MAAMC,OAAO;sBAAC,6BAACC;YAAKC,SAAQ;;KAAW;IACvC,IAAI,CAACH,WAAW;QACdC,KAAKG,IAAI,eAAC,6BAACF;YAAKG,MAAK;YAAWC,SAAQ;;IAC1C;IACA,OAAOL;AACT;AAEA,SAASM,iBACPC,IAAoC,EACpCC,KAAuB;IAEvB,8FAA8F;IAC9F,IAAI,OAAOA,UAAU,YAAY,OAAOA,UAAU,UAAU;QAC1D,OAAOD;IACT;IACA,kCAAkC;IAClC,IAAIC,MAAMC,IAAI,KAAKC,cAAK,CAACC,QAAQ,EAAE;QACjC,OAAOJ,KAAKK,MAAM,CAChB,mGAAmG;QACnGF,cAAK,CAACG,QAAQ,CAACC,OAAO,CAACN,MAAMO,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gBAEnC,qBAAO7C,cAAK,CAAC+C,YAAY,CAACV,GAAGQ;YAC/B;QACF;QACA,IAAIP,QAAQC,GAAG,CAACC,QAAQ,KAAK,eAAe;YAC1C,yDAAyD;YACzD,IAAIH,EAAEtC,IAAI,KAAK,YAAYsC,EAAEhC,KAAK,CAAC,OAAO,KAAK,uBAAuB;gBACpE,MAAM2C,aAAaX,EAAEhC,KAAK,CAAC,MAAM,GAC7B,AAAC,4BAAyBgC,EAAEhC,KAAK,CAAC,MAAM,GAAC,MACxC;gBACL4C,IAAAA,kBAAQ,EACN,AAAC,mDAAgDD,aAAW;YAEhE,OAAO,IAAIX,EAAEtC,IAAI,KAAK,UAAUsC,EAAEhC,KAAK,CAAC,MAAM,KAAK,cAAc;gBAC/D4C,IAAAA,kBAAQ,EACN,AAAC,wFAAqFZ,EAAEhC,KAAK,CAAC,OAAO,GAAC;YAE1G;QACF;QACA,qBAAOL,cAAK,CAAC+C,YAAY,CAACV,GAAG;YAAEjB;QAAI;IACrC;AACJ;AAEA;;;CAGC,GACD,SAAS8B,KAAK,KAA2C;IAA3C,IAAA,EAAE5C,QAAQ,EAAiC,GAA3C;IACZ,MAAM6C,WAAWC,IAAAA,iBAAU,EAACC,wCAAe;IAC3C,MAAMC,cAAcF,IAAAA,iBAAU,EAACG,mDAAkB;IACjD,qBACE,6BAACC,mBAAM;QACLC,yBAAyBzB;QACzBsB,aAAaA;QACbjE,WAAWqE,IAAAA,oBAAW,EAACP;OAEtB7C;AAGP;MAEA,WAAe4C"}

View File

@@ -0,0 +1,5 @@
/// <reference types="react" />
import type { Params } from '../../shared/lib/router/utils/route-matcher';
export declare const SearchParamsContext: import("react").Context<URLSearchParams | null>;
export declare const PathnameContext: import("react").Context<string | null>;
export declare const PathParamsContext: import("react").Context<Params | null>;

View File

@@ -0,0 +1,39 @@
"use client";
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
SearchParamsContext: null,
PathnameContext: null,
PathParamsContext: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
SearchParamsContext: function() {
return SearchParamsContext;
},
PathnameContext: function() {
return PathnameContext;
},
PathParamsContext: function() {
return PathParamsContext;
}
});
const _react = require("react");
const SearchParamsContext = (0, _react.createContext)(null);
const PathnameContext = (0, _react.createContext)(null);
const PathParamsContext = (0, _react.createContext)(null);
if (process.env.NODE_ENV !== "production") {
SearchParamsContext.displayName = "SearchParamsContext";
PathnameContext.displayName = "PathnameContext";
PathParamsContext.displayName = "PathParamsContext";
}
//# sourceMappingURL=hooks-client-context.shared-runtime.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/shared/lib/hooks-client-context.shared-runtime.ts"],"names":["SearchParamsContext","PathnameContext","PathParamsContext","createContext","process","env","NODE_ENV","displayName"],"mappings":"AAAA;;;;;;;;;;;;;;;;;IAKaA,mBAAmB;eAAnBA;;IACAC,eAAe;eAAfA;;IACAC,iBAAiB;eAAjBA;;;uBALiB;AAGvB,MAAMF,sBAAsBG,IAAAA,oBAAa,EAAyB;AAClE,MAAMF,kBAAkBE,IAAAA,oBAAa,EAAgB;AACrD,MAAMD,oBAAoBC,IAAAA,oBAAa,EAAgB;AAE9D,IAAIC,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;IACzCN,oBAAoBO,WAAW,GAAG;IAClCN,gBAAgBM,WAAW,GAAG;IAC9BL,kBAAkBK,WAAW,GAAG;AAClC"}

View File

@@ -0,0 +1,49 @@
/// <reference types="react" />
import type { BuildManifest } from '../../server/get-page-files';
import type { ServerRuntime } from 'next/types';
import type { NEXT_DATA } from './utils';
import type { FontConfig } from '../../server/font-utils';
import type { NextFontManifest } from '../../build/webpack/plugins/next-font-manifest-plugin';
export type HtmlProps = {
__NEXT_DATA__: NEXT_DATA;
strictNextHead: boolean;
dangerousAsPath: string;
docComponentsRendered: {
Html?: boolean;
Main?: boolean;
Head?: boolean;
NextScript?: boolean;
};
buildManifest: BuildManifest;
ampPath: string;
inAmpMode: boolean;
hybridAmp: boolean;
isDevelopment: boolean;
dynamicImports: string[];
assetPrefix?: string;
canonicalBase: string;
headTags: any[];
unstable_runtimeJS?: false;
unstable_JsPreload?: false;
assetQueryString: string;
scriptLoader: {
afterInteractive?: string[];
beforeInteractive?: any[];
worker?: any[];
};
locale?: string;
disableOptimizedLoading?: boolean;
styles?: React.ReactElement[] | React.ReactFragment;
head?: Array<JSX.Element | null>;
crossOrigin?: 'anonymous' | 'use-credentials' | '' | undefined;
optimizeCss?: any;
optimizeFonts?: FontConfig;
nextConfigOutput?: 'standalone' | 'export';
nextScriptWorkers?: boolean;
runtime?: ServerRuntime;
hasConcurrentFeatures?: boolean;
largePageDataBytes?: number;
nextFontManifest?: NextFontManifest;
};
export declare const HtmlContext: import("react").Context<HtmlProps | undefined>;
export declare function useHtmlContext(): HtmlProps;

View File

@@ -0,0 +1,36 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
HtmlContext: null,
useHtmlContext: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
HtmlContext: function() {
return HtmlContext;
},
useHtmlContext: function() {
return useHtmlContext;
}
});
const _react = require("react");
const HtmlContext = (0, _react.createContext)(undefined);
if (process.env.NODE_ENV !== "production") {
HtmlContext.displayName = "HtmlContext";
}
function useHtmlContext() {
const context = (0, _react.useContext)(HtmlContext);
if (!context) {
throw new Error("<Html> should not be imported outside of pages/_document.\n" + "Read more: https://nextjs.org/docs/messages/no-document-import-in-page");
}
return context;
}
//# sourceMappingURL=html-context.shared-runtime.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/shared/lib/html-context.shared-runtime.ts"],"names":["HtmlContext","useHtmlContext","createContext","undefined","process","env","NODE_ENV","displayName","context","useContext","Error"],"mappings":";;;;;;;;;;;;;;;IAkDaA,WAAW;eAAXA;;IAKGC,cAAc;eAAdA;;;uBAjD0B;AA4CnC,MAAMD,cAAcE,IAAAA,oBAAa,EAAwBC;AAChE,IAAIC,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;IACzCN,YAAYO,WAAW,GAAG;AAC5B;AAEO,SAASN;IACd,MAAMO,UAAUC,IAAAA,iBAAU,EAACT;IAE3B,IAAI,CAACQ,SAAS;QACZ,MAAM,IAAIE,MACR,AAAC,gEACC;IAEN;IAEA,OAAOF;AACT"}

View File

@@ -0,0 +1,2 @@
import type { DomainLocale } from '../../../server/config-shared';
export declare function detectDomainLocale(domainItems?: DomainLocale[], hostname?: string, detectedLocale?: string): DomainLocale | undefined;

View File

@@ -0,0 +1,26 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "detectDomainLocale", {
enumerable: true,
get: function() {
return detectDomainLocale;
}
});
function detectDomainLocale(domainItems, hostname, detectedLocale) {
if (!domainItems) return;
if (detectedLocale) {
detectedLocale = detectedLocale.toLowerCase();
}
for (const item of domainItems){
var _item_domain, _item_locales;
// remove port if present
const domainHostname = (_item_domain = item.domain) == null ? void 0 : _item_domain.split(":")[0].toLowerCase();
if (hostname === domainHostname || detectedLocale === item.defaultLocale.toLowerCase() || ((_item_locales = item.locales) == null ? void 0 : _item_locales.some((locale)=>locale.toLowerCase() === detectedLocale))) {
return item;
}
}
}
//# sourceMappingURL=detect-domain-locale.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../../src/shared/lib/i18n/detect-domain-locale.ts"],"names":["detectDomainLocale","domainItems","hostname","detectedLocale","toLowerCase","item","domainHostname","domain","split","defaultLocale","locales","some","locale"],"mappings":";;;;+BAEgBA;;;eAAAA;;;AAAT,SAASA,mBACdC,WAA4B,EAC5BC,QAAiB,EACjBC,cAAuB;IAEvB,IAAI,CAACF,aAAa;IAElB,IAAIE,gBAAgB;QAClBA,iBAAiBA,eAAeC,WAAW;IAC7C;IAEA,KAAK,MAAMC,QAAQJ,YAAa;YAEPI,cAIrBA;QALF,yBAAyB;QACzB,MAAMC,kBAAiBD,eAAAA,KAAKE,MAAM,qBAAXF,aAAaG,KAAK,CAAC,IAAI,CAAC,EAAE,CAACJ,WAAW;QAC7D,IACEF,aAAaI,kBACbH,mBAAmBE,KAAKI,aAAa,CAACL,WAAW,QACjDC,gBAAAA,KAAKK,OAAO,qBAAZL,cAAcM,IAAI,CAAC,CAACC,SAAWA,OAAOR,WAAW,OAAOD,kBACxD;YACA,OAAOE;QACT;IACF;AACF"}

View File

@@ -0,0 +1,21 @@
import type { DomainLocale } from '../../../server/config';
import type { I18NConfig } from '../../../server/config-shared';
interface Options {
defaultLocale: string;
domainLocale?: DomainLocale;
headers?: {
[key: string]: string | string[] | undefined;
};
nextConfig: {
basePath?: string;
i18n?: I18NConfig | null;
trailingSlash?: boolean;
};
pathLocale?: string;
urlParsed: {
hostname?: string | null;
pathname: string;
};
}
export declare function getLocaleRedirect({ defaultLocale, domainLocale, pathLocale, headers, nextConfig, urlParsed, }: Options): string | undefined;
export {};

View File

@@ -0,0 +1,63 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "getLocaleRedirect", {
enumerable: true,
get: function() {
return getLocaleRedirect;
}
});
const _acceptheader = require("../../../server/accept-header");
const _denormalizepagepath = require("../page-path/denormalize-page-path");
const _detectdomainlocale = require("./detect-domain-locale");
const _formaturl = require("../router/utils/format-url");
const _getcookieparser = require("../../../server/api-utils/get-cookie-parser");
function getLocaleFromCookie(i18n, headers) {
if (headers === void 0) headers = {};
var _getCookieParser_NEXT_LOCALE, _getCookieParser;
const nextLocale = (_getCookieParser = (0, _getcookieparser.getCookieParser)(headers || {})()) == null ? void 0 : (_getCookieParser_NEXT_LOCALE = _getCookieParser.NEXT_LOCALE) == null ? void 0 : _getCookieParser_NEXT_LOCALE.toLowerCase();
return nextLocale ? i18n.locales.find((locale)=>nextLocale === locale.toLowerCase()) : undefined;
}
function detectLocale(param) {
let { i18n, headers, domainLocale, preferredLocale, pathLocale } = param;
return pathLocale || (domainLocale == null ? void 0 : domainLocale.defaultLocale) || getLocaleFromCookie(i18n, headers) || preferredLocale || i18n.defaultLocale;
}
function getAcceptPreferredLocale(i18n, headers) {
if ((headers == null ? void 0 : headers["accept-language"]) && !Array.isArray(headers["accept-language"])) {
try {
return (0, _acceptheader.acceptLanguage)(headers["accept-language"], i18n.locales);
} catch (err) {}
}
}
function getLocaleRedirect(param) {
let { defaultLocale, domainLocale, pathLocale, headers, nextConfig, urlParsed } = param;
if (nextConfig.i18n && nextConfig.i18n.localeDetection !== false && (0, _denormalizepagepath.denormalizePagePath)(urlParsed.pathname) === "/") {
const preferredLocale = getAcceptPreferredLocale(nextConfig.i18n, headers);
const detectedLocale = detectLocale({
i18n: nextConfig.i18n,
preferredLocale,
headers,
pathLocale,
domainLocale
});
const preferredDomain = (0, _detectdomainlocale.detectDomainLocale)(nextConfig.i18n.domains, undefined, preferredLocale);
if (domainLocale && preferredDomain) {
const isPDomain = preferredDomain.domain === domainLocale.domain;
const isPLocale = preferredDomain.defaultLocale === preferredLocale;
if (!isPDomain || !isPLocale) {
const scheme = "http" + (preferredDomain.http ? "" : "s");
const rlocale = isPLocale ? "" : preferredLocale;
return scheme + "://" + preferredDomain.domain + "/" + rlocale;
}
}
if (detectedLocale.toLowerCase() !== defaultLocale.toLowerCase()) {
return (0, _formaturl.formatUrl)({
...urlParsed,
pathname: (nextConfig.basePath || "") + "/" + detectedLocale + (nextConfig.trailingSlash ? "/" : "")
});
}
}
}
//# sourceMappingURL=get-locale-redirect.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../../src/shared/lib/i18n/get-locale-redirect.ts"],"names":["getLocaleRedirect","getLocaleFromCookie","i18n","headers","getCookieParser","nextLocale","NEXT_LOCALE","toLowerCase","locales","find","locale","undefined","detectLocale","domainLocale","preferredLocale","pathLocale","defaultLocale","getAcceptPreferredLocale","Array","isArray","acceptLanguage","err","nextConfig","urlParsed","localeDetection","denormalizePagePath","pathname","detectedLocale","preferredDomain","detectDomainLocale","domains","isPDomain","domain","isPLocale","scheme","http","rlocale","formatUrl","basePath","trailingSlash"],"mappings":";;;;+BAqEgBA;;;eAAAA;;;8BAnEe;qCACK;oCACD;2BACT;iCACM;AAehC,SAASC,oBACPC,IAAgB,EAChBC,OAA8D;IAA9DA,IAAAA,oBAAAA,UAA4D,CAAC;QAE1CC,8BAAAA;IAAnB,MAAMC,cAAaD,mBAAAA,IAAAA,gCAAe,EAChCD,WAAW,CAAC,0BADKC,+BAAAA,iBAEdE,WAAW,qBAFGF,6BAEDG,WAAW;IAC7B,OAAOF,aACHH,KAAKM,OAAO,CAACC,IAAI,CAAC,CAACC,SAAWL,eAAeK,OAAOH,WAAW,MAC/DI;AACN;AAEA,SAASC,aAAa,KAYrB;IAZqB,IAAA,EACpBV,IAAI,EACJC,OAAO,EACPU,YAAY,EACZC,eAAe,EACfC,UAAU,EAOX,GAZqB;IAapB,OACEA,eACAF,gCAAAA,aAAcG,aAAa,KAC3Bf,oBAAoBC,MAAMC,YAC1BW,mBACAZ,KAAKc,aAAa;AAEtB;AAEA,SAASC,yBACPf,IAAgB,EAChBC,OAA0D;IAE1D,IACEA,CAAAA,2BAAAA,OAAS,CAAC,kBAAkB,KAC5B,CAACe,MAAMC,OAAO,CAAChB,OAAO,CAAC,kBAAkB,GACzC;QACA,IAAI;YACF,OAAOiB,IAAAA,4BAAc,EAACjB,OAAO,CAAC,kBAAkB,EAAED,KAAKM,OAAO;QAChE,EAAE,OAAOa,KAAK,CAAC;IACjB;AACF;AAEO,SAASrB,kBAAkB,KAOxB;IAPwB,IAAA,EAChCgB,aAAa,EACbH,YAAY,EACZE,UAAU,EACVZ,OAAO,EACPmB,UAAU,EACVC,SAAS,EACD,GAPwB;IAQhC,IACED,WAAWpB,IAAI,IACfoB,WAAWpB,IAAI,CAACsB,eAAe,KAAK,SACpCC,IAAAA,wCAAmB,EAACF,UAAUG,QAAQ,MAAM,KAC5C;QACA,MAAMZ,kBAAkBG,yBAAyBK,WAAWpB,IAAI,EAAEC;QAClE,MAAMwB,iBAAiBf,aAAa;YAClCV,MAAMoB,WAAWpB,IAAI;YACrBY;YACAX;YACAY;YACAF;QACF;QAEA,MAAMe,kBAAkBC,IAAAA,sCAAkB,EACxCP,WAAWpB,IAAI,CAAC4B,OAAO,EACvBnB,WACAG;QAGF,IAAID,gBAAgBe,iBAAiB;YACnC,MAAMG,YAAYH,gBAAgBI,MAAM,KAAKnB,aAAamB,MAAM;YAChE,MAAMC,YAAYL,gBAAgBZ,aAAa,KAAKF;YACpD,IAAI,CAACiB,aAAa,CAACE,WAAW;gBAC5B,MAAMC,SAAS,AAAC,SAAMN,CAAAA,gBAAgBO,IAAI,GAAG,KAAK,GAAE;gBACpD,MAAMC,UAAUH,YAAY,KAAKnB;gBACjC,OAAO,AAAGoB,SAAO,QAAKN,gBAAgBI,MAAM,GAAC,MAAGI;YAClD;QACF;QAEA,IAAIT,eAAepB,WAAW,OAAOS,cAAcT,WAAW,IAAI;YAChE,OAAO8B,IAAAA,oBAAS,EAAC;gBACf,GAAGd,SAAS;gBACZG,UAAU,AAAGJ,CAAAA,WAAWgB,QAAQ,IAAI,EAAC,IAAE,MAAGX,iBACxCL,CAAAA,WAAWiB,aAAa,GAAG,MAAM,EAAC;YAEtC;QACF;IACF;AACF"}

View File

@@ -0,0 +1,14 @@
export interface PathLocale {
detectedLocale?: string;
pathname: string;
}
/**
* For a pathname that may include a locale from a list of locales, it
* removes the locale from the pathname returning it alongside with the
* detected locale.
*
* @param pathname A pathname that may include a locale.
* @param locales A list of locales.
* @returns The detected locale and pathname without locale
*/
export declare function normalizeLocalePath(pathname: string, locales?: string[]): PathLocale;

View File

@@ -0,0 +1,30 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "normalizeLocalePath", {
enumerable: true,
get: function() {
return normalizeLocalePath;
}
});
function normalizeLocalePath(pathname, locales) {
let detectedLocale;
// first item will be empty string from splitting at first char
const pathnameParts = pathname.split("/");
(locales || []).some((locale)=>{
if (pathnameParts[1] && pathnameParts[1].toLowerCase() === locale.toLowerCase()) {
detectedLocale = locale;
pathnameParts.splice(1, 1);
pathname = pathnameParts.join("/") || "/";
return true;
}
return false;
});
return {
pathname,
detectedLocale
};
}
//# sourceMappingURL=normalize-locale-path.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../../src/shared/lib/i18n/normalize-locale-path.ts"],"names":["normalizeLocalePath","pathname","locales","detectedLocale","pathnameParts","split","some","locale","toLowerCase","splice","join"],"mappings":";;;;+BAcgBA;;;eAAAA;;;AAAT,SAASA,oBACdC,QAAgB,EAChBC,OAAkB;IAElB,IAAIC;IACJ,+DAA+D;IAC/D,MAAMC,gBAAgBH,SAASI,KAAK,CAAC;IAEnCH,CAAAA,WAAW,EAAE,AAAD,EAAGI,IAAI,CAAC,CAACC;QACrB,IACEH,aAAa,CAAC,EAAE,IAChBA,aAAa,CAAC,EAAE,CAACI,WAAW,OAAOD,OAAOC,WAAW,IACrD;YACAL,iBAAiBI;YACjBH,cAAcK,MAAM,CAAC,GAAG;YACxBR,WAAWG,cAAcM,IAAI,CAAC,QAAQ;YACtC,OAAO;QACT;QACA,OAAO;IACT;IAEA,OAAO;QACLT;QACAE;IACF;AACF"}

11
node_modules/next/dist/shared/lib/image-blur-svg.d.ts generated vendored Normal file
View File

@@ -0,0 +1,11 @@
/**
* A shared function, used on both client and server, to generate a SVG blur placeholder.
*/
export declare function getImageBlurSvg({ widthInt, heightInt, blurWidth, blurHeight, blurDataURL, objectFit, }: {
widthInt?: number;
heightInt?: number;
blurWidth?: number;
blurHeight?: number;
blurDataURL: string;
objectFit?: string;
}): string;

23
node_modules/next/dist/shared/lib/image-blur-svg.js generated vendored Normal file
View File

@@ -0,0 +1,23 @@
/**
* A shared function, used on both client and server, to generate a SVG blur placeholder.
*/ "use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "getImageBlurSvg", {
enumerable: true,
get: function() {
return getImageBlurSvg;
}
});
function getImageBlurSvg(param) {
let { widthInt, heightInt, blurWidth, blurHeight, blurDataURL, objectFit } = param;
const std = 20;
const svgWidth = blurWidth ? blurWidth * 40 : widthInt;
const svgHeight = blurHeight ? blurHeight * 40 : heightInt;
const viewBox = svgWidth && svgHeight ? "viewBox='0 0 " + svgWidth + " " + svgHeight + "'" : "";
const preserveAspectRatio = viewBox ? "none" : objectFit === "contain" ? "xMidYMid" : objectFit === "cover" ? "xMidYMid slice" : "none";
return "%3Csvg xmlns='http://www.w3.org/2000/svg' " + viewBox + "%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='" + std + "'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='" + std + "'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='" + preserveAspectRatio + "' style='filter: url(%23b);' href='" + blurDataURL + "'/%3E%3C/svg%3E";
}
//# sourceMappingURL=image-blur-svg.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/shared/lib/image-blur-svg.ts"],"names":["getImageBlurSvg","widthInt","heightInt","blurWidth","blurHeight","blurDataURL","objectFit","std","svgWidth","svgHeight","viewBox","preserveAspectRatio"],"mappings":"AAAA;;CAEC;;;;+BACeA;;;eAAAA;;;AAAT,SAASA,gBAAgB,KAc/B;IAd+B,IAAA,EAC9BC,QAAQ,EACRC,SAAS,EACTC,SAAS,EACTC,UAAU,EACVC,WAAW,EACXC,SAAS,EAQV,GAd+B;IAe9B,MAAMC,MAAM;IACZ,MAAMC,WAAWL,YAAYA,YAAY,KAAKF;IAC9C,MAAMQ,YAAYL,aAAaA,aAAa,KAAKF;IAEjD,MAAMQ,UACJF,YAAYC,YAAY,AAAC,kBAAeD,WAAS,MAAGC,YAAU,MAAK;IACrE,MAAME,sBAAsBD,UACxB,SACAJ,cAAc,YACd,aACAA,cAAc,UACd,mBACA;IAEJ,OAAO,AAAC,+CAA4CI,UAAQ,8FAA2FH,MAAI,oQAAiQA,MAAI,gGAA6FI,sBAAoB,wCAAqCN,cAAY;AACpkB"}

View File

@@ -0,0 +1,3 @@
import React from 'react';
import { ImageConfigComplete } from './image-config';
export declare const ImageConfigContext: React.Context<ImageConfigComplete>;

View File

@@ -0,0 +1,19 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "ImageConfigContext", {
enumerable: true,
get: function() {
return ImageConfigContext;
}
});
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
const _react = /*#__PURE__*/ _interop_require_default._(require("react"));
const _imageconfig = require("./image-config");
const ImageConfigContext = _react.default.createContext(_imageconfig.imageConfigDefault);
if (process.env.NODE_ENV !== "production") {
ImageConfigContext.displayName = "ImageConfigContext";
}
//# sourceMappingURL=image-config-context.shared-runtime.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/shared/lib/image-config-context.shared-runtime.ts"],"names":["ImageConfigContext","React","createContext","imageConfigDefault","process","env","NODE_ENV","displayName"],"mappings":";;;;+BAGaA;;;eAAAA;;;;gEAHK;6BACsC;AAEjD,MAAMA,qBACXC,cAAK,CAACC,aAAa,CAAsBC,+BAAkB;AAE7D,IAAIC,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;IACzCN,mBAAmBO,WAAW,GAAG;AACnC"}

74
node_modules/next/dist/shared/lib/image-config.d.ts generated vendored Normal file
View File

@@ -0,0 +1,74 @@
export declare const VALID_LOADERS: readonly ["default", "imgix", "cloudinary", "akamai", "custom"];
export type LoaderValue = (typeof VALID_LOADERS)[number];
export type ImageLoaderProps = {
src: string;
width: number;
quality?: number;
};
export type ImageLoaderPropsWithConfig = ImageLoaderProps & {
config: Readonly<ImageConfig>;
};
export type RemotePattern = {
/**
* Must be `http` or `https`.
*/
protocol?: 'http' | 'https';
/**
* Can be literal or wildcard.
* Single `*` matches a single subdomain.
* Double `**` matches any number of subdomains.
*/
hostname: string;
/**
* Can be literal port such as `8080` or empty string
* meaning no port.
*/
port?: string;
/**
* Can be literal or wildcard.
* Single `*` matches a single path segment.
* Double `**` matches any number of path segments.
*/
pathname?: string;
};
type ImageFormat = 'image/avif' | 'image/webp';
/**
* Image configurations
*
* @see [Image configuration options](https://nextjs.org/docs/api-reference/next/image#configuration-options)
*/
export type ImageConfigComplete = {
/** @see [Device sizes documentation](https://nextjs.org/docs/api-reference/next/image#device-sizes) */
deviceSizes: number[];
/** @see [Image sizing documentation](https://nextjs.org/docs/basic-features/image-optimization#image-sizing) */
imageSizes: number[];
/** @see [Image loaders configuration](https://nextjs.org/docs/api-reference/next/legacy/image#loader) */
loader: LoaderValue;
/** @see [Image loader configuration](https://nextjs.org/docs/api-reference/next/legacy/image#loader-configuration) */
path: string;
/** @see [Image loader configuration](https://nextjs.org/docs/api-reference/next/image#loader-configuration) */
loaderFile: string;
/**
* @see [Image domains configuration](https://nextjs.org/docs/api-reference/next/image#domains)
*/
domains: string[];
/** @see [Disable static image import configuration](https://nextjs.org/docs/api-reference/next/image#disable-static-imports) */
disableStaticImages: boolean;
/** @see [Cache behavior](https://nextjs.org/docs/api-reference/next/image#caching-behavior) */
minimumCacheTTL: number;
/** @see [Acceptable formats](https://nextjs.org/docs/api-reference/next/image#acceptable-formats) */
formats: ImageFormat[];
/** @see [Dangerously Allow SVG](https://nextjs.org/docs/api-reference/next/image#dangerously-allow-svg) */
dangerouslyAllowSVG: boolean;
/** @see [Dangerously Allow SVG](https://nextjs.org/docs/api-reference/next/image#dangerously-allow-svg) */
contentSecurityPolicy: string;
/** @see [Dangerously Allow SVG](https://nextjs.org/docs/api-reference/next/image#dangerously-allow-svg) */
contentDispositionType: 'inline' | 'attachment';
/** @see [Remote Patterns](https://nextjs.org/docs/api-reference/next/image#remote-patterns) */
remotePatterns: RemotePattern[];
/** @see [Unoptimized](https://nextjs.org/docs/api-reference/next/image#unoptimized) */
unoptimized: boolean;
};
export type ImageConfig = Partial<ImageConfigComplete>;
export declare const imageConfigDefault: ImageConfigComplete;
export {};

67
node_modules/next/dist/shared/lib/image-config.js generated vendored Normal file
View File

@@ -0,0 +1,67 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
VALID_LOADERS: null,
imageConfigDefault: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
VALID_LOADERS: function() {
return VALID_LOADERS;
},
imageConfigDefault: function() {
return imageConfigDefault;
}
});
const VALID_LOADERS = [
"default",
"imgix",
"cloudinary",
"akamai",
"custom"
];
const imageConfigDefault = {
deviceSizes: [
640,
750,
828,
1080,
1200,
1920,
2048,
3840
],
imageSizes: [
16,
32,
48,
64,
96,
128,
256,
384
],
path: "/_next/image",
loader: "default",
loaderFile: "",
domains: [],
disableStaticImages: false,
minimumCacheTTL: 60,
formats: [
"image/webp"
],
dangerouslyAllowSVG: false,
contentSecurityPolicy: "script-src 'none'; frame-src 'none'; sandbox;",
contentDispositionType: "inline",
remotePatterns: [],
unoptimized: false
};
//# sourceMappingURL=image-config.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/shared/lib/image-config.ts"],"names":["VALID_LOADERS","imageConfigDefault","deviceSizes","imageSizes","path","loader","loaderFile","domains","disableStaticImages","minimumCacheTTL","formats","dangerouslyAllowSVG","contentSecurityPolicy","contentDispositionType","remotePatterns","unoptimized"],"mappings":";;;;;;;;;;;;;;;IAAaA,aAAa;eAAbA;;IAsGAC,kBAAkB;eAAlBA;;;AAtGN,MAAMD,gBAAgB;IAC3B;IACA;IACA;IACA;IACA;CACD;AAgGM,MAAMC,qBAA0C;IACrDC,aAAa;QAAC;QAAK;QAAK;QAAK;QAAM;QAAM;QAAM;QAAM;KAAK;IAC1DC,YAAY;QAAC;QAAI;QAAI;QAAI;QAAI;QAAI;QAAK;QAAK;KAAI;IAC/CC,MAAM;IACNC,QAAQ;IACRC,YAAY;IACZC,SAAS,EAAE;IACXC,qBAAqB;IACrBC,iBAAiB;IACjBC,SAAS;QAAC;KAAa;IACvBC,qBAAqB;IACrBC,uBAAwB;IACxBC,wBAAwB;IACxBC,gBAAgB,EAAE;IAClBC,aAAa;AACf"}

View File

@@ -0,0 +1,8 @@
import type { ImageLoaderProps } from './image-config';
import type { ImageProps, ImageLoader, StaticImageData } from './get-img-props';
import { Image } from '../../client/image-component';
declare const unstable_getImgProps: (imgProps: ImageProps) => {
props: import("./get-img-props").ImgProps;
};
export default Image;
export { ImageProps, ImageLoaderProps, ImageLoader, StaticImageData, unstable_getImgProps, };

46
node_modules/next/dist/shared/lib/image-external.js generated vendored Normal file
View File

@@ -0,0 +1,46 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
default: null,
unstable_getImgProps: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
default: function() {
return _default;
},
unstable_getImgProps: function() {
return unstable_getImgProps;
}
});
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
const _getimgprops = require("./get-img-props");
const _warnonce = require("./utils/warn-once");
const _imagecomponent = require("../../client/image-component");
const _imageloader = /*#__PURE__*/ _interop_require_default._(require("next/dist/shared/lib/image-loader"));
const unstable_getImgProps = (imgProps)=>{
(0, _warnonce.warnOnce)("Warning: unstable_getImgProps() is experimental and may change or be removed at any time. Use at your own risk.");
const { props } = (0, _getimgprops.getImgProps)(imgProps, {
defaultLoader: _imageloader.default,
// This is replaced by webpack define plugin
imgConf: process.env.__NEXT_IMAGE_OPTS
});
for (const [key, value] of Object.entries(props)){
if (value === undefined) {
delete props[key];
}
}
return {
props
};
};
const _default = _imagecomponent.Image;
//# sourceMappingURL=image-external.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/shared/lib/image-external.tsx"],"names":["unstable_getImgProps","imgProps","warnOnce","props","getImgProps","defaultLoader","imgConf","process","env","__NEXT_IMAGE_OPTS","key","value","Object","entries","undefined","Image"],"mappings":";;;;;;;;;;;;;;;IA2BA,OAAoB;eAApB;;IAOEA,oBAAoB;eAApBA;;;;6BA/B0B;0BACH;gCACH;sEAGI;AAE1B,MAAMA,uBAAuB,CAACC;IAC5BC,IAAAA,kBAAQ,EACN;IAEF,MAAM,EAAEC,KAAK,EAAE,GAAGC,IAAAA,wBAAW,EAACH,UAAU;QACtCI,eAAAA,oBAAa;QACb,4CAA4C;QAC5CC,SAASC,QAAQC,GAAG,CAACC,iBAAiB;IACxC;IACA,KAAK,MAAM,CAACC,KAAKC,MAAM,IAAIC,OAAOC,OAAO,CAACV,OAAQ;QAChD,IAAIQ,UAAUG,WAAW;YACvB,OAAOX,KAAK,CAACO,IAA0B;QACzC;IACF;IACA,OAAO;QAAEP;IAAM;AACjB;MAEA,WAAeY,qBAAK"}

6
node_modules/next/dist/shared/lib/image-loader.d.ts generated vendored Normal file
View File

@@ -0,0 +1,6 @@
import type { ImageLoaderPropsWithConfig } from './image-config';
declare function defaultLoader({ config, src, width, quality, }: ImageLoaderPropsWithConfig): string;
declare namespace defaultLoader {
var __next_img_default: boolean;
}
export default defaultLoader;

53
node_modules/next/dist/shared/lib/image-loader.js generated vendored Normal file
View File

@@ -0,0 +1,53 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: function() {
return _default;
}
});
function defaultLoader(param) {
let { config, src, width, quality } = param;
if (process.env.NODE_ENV !== "production") {
const missingValues = [];
// these should always be provided but make sure they are
if (!src) missingValues.push("src");
if (!width) missingValues.push("width");
if (missingValues.length > 0) {
throw new Error("Next Image Optimization requires " + missingValues.join(", ") + " to be provided. Make sure you pass them as props to the `next/image` component. Received: " + JSON.stringify({
src,
width,
quality
}));
}
if (src.startsWith("//")) {
throw new Error('Failed to parse src "' + src + '" on `next/image`, protocol-relative URL (//) must be changed to an absolute URL (http:// or https://)');
}
if (!src.startsWith("/") && (config.domains || config.remotePatterns)) {
let parsedSrc;
try {
parsedSrc = new URL(src);
} catch (err) {
console.error(err);
throw new Error('Failed to parse src "' + src + '" on `next/image`, if using relative image it must start with a leading slash "/" or be an absolute URL (http:// or https://)');
}
if (process.env.NODE_ENV !== "test" && // micromatch isn't compatible with edge runtime
process.env.NEXT_RUNTIME !== "edge") {
// We use dynamic require because this should only error in development
const { hasMatch } = require("./match-remote-pattern");
if (!hasMatch(config.domains, config.remotePatterns, parsedSrc)) {
throw new Error("Invalid src prop (" + src + ') on `next/image`, hostname "' + parsedSrc.hostname + '" is not configured under images in your `next.config.js`\n' + "See more info: https://nextjs.org/docs/messages/next-image-unconfigured-host");
}
}
}
}
return config.path + "?url=" + encodeURIComponent(src) + "&w=" + width + "&q=" + (quality || 75) + (process.env.NEXT_DEPLOYMENT_ID ? "&dpl=" + process.env.NEXT_DEPLOYMENT_ID : "");
}
// We use this to determine if the import is the default loader
// or a custom loader defined by the user in next.config.js
defaultLoader.__next_img_default = true;
const _default = defaultLoader;
//# sourceMappingURL=image-loader.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/shared/lib/image-loader.ts"],"names":["defaultLoader","config","src","width","quality","process","env","NODE_ENV","missingValues","push","length","Error","join","JSON","stringify","startsWith","domains","remotePatterns","parsedSrc","URL","err","console","error","NEXT_RUNTIME","hasMatch","require","hostname","path","encodeURIComponent","NEXT_DEPLOYMENT_ID","__next_img_default"],"mappings":";;;;+BAwEA;;;eAAA;;;AAtEA,SAASA,cAAc,KAKM;IALN,IAAA,EACrBC,MAAM,EACNC,GAAG,EACHC,KAAK,EACLC,OAAO,EACoB,GALN;IAMrB,IAAIC,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;QACzC,MAAMC,gBAAgB,EAAE;QAExB,yDAAyD;QACzD,IAAI,CAACN,KAAKM,cAAcC,IA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View File

@@ -0,0 +1,2 @@
export declare function getObjectClassLabel(value: any): string;
export declare function isPlainObject(value: any): boolean;

42
node_modules/next/dist/shared/lib/is-plain-object.js generated vendored Normal file
View File

@@ -0,0 +1,42 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
getObjectClassLabel: null,
isPlainObject: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
getObjectClassLabel: function() {
return getObjectClassLabel;
},
isPlainObject: function() {
return isPlainObject;
}
});
function getObjectClassLabel(value) {
return Object.prototype.toString.call(value);
}
function isPlainObject(value) {
if (getObjectClassLabel(value) !== "[object Object]") {
return false;
}
const prototype = Object.getPrototypeOf(value);
/**
* this used to be previously:
*
* `return prototype === null || prototype === Object.prototype`
*
* but Edge Runtime expose Object from vm, being that kind of type-checking wrongly fail.
*
* It was changed to the current implementation since it's resilient to serialization.
*/ return prototype === null || prototype.hasOwnProperty("isPrototypeOf");
}
//# sourceMappingURL=is-plain-object.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/shared/lib/is-plain-object.ts"],"names":["getObjectClassLabel","isPlainObject","value","Object","prototype","toString","call","getPrototypeOf","hasOwnProperty"],"mappings":";;;;;;;;;;;;;;;IAAgBA,mBAAmB;eAAnBA;;IAIAC,aAAa;eAAbA;;;AAJT,SAASD,oBAAoBE,KAAU;IAC5C,OAAOC,OAAOC,SAAS,CAACC,QAAQ,CAACC,IAAI,CAACJ;AACxC;AAEO,SAASD,cAAcC,KAAU;IACtC,IAAIF,oBAAoBE,WAAW,mBAAmB;QACpD,OAAO;IACT;IAEA,MAAME,YAAYD,OAAOI,cAAc,CAACL;IAExC;;;;;;;;GAQC,GACD,OAAOE,cAAc,QAAQA,UAAUI,cAAc,CAAC;AACxD"}

View File

@@ -0,0 +1 @@
export { default } from 'path'

14
node_modules/next/dist/shared/lib/isomorphic/path.js generated vendored Normal file
View File

@@ -0,0 +1,14 @@
/**
* This module is for next.js server internal usage of path module.
* It will use native path module for nodejs runtime.
* It will use path-browserify polyfill for edge runtime.
*/ "use strict";
let path;
if (process.env.NEXT_RUNTIME === "edge") {
path = require("next/dist/compiled/path-browserify");
} else {
path = require("path");
}
module.exports = path;
//# sourceMappingURL=path.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../../src/shared/lib/isomorphic/path.js"],"names":["path","process","env","NEXT_RUNTIME","require","module","exports"],"mappings":"AAAA;;;;CAIC;AACD,IAAIA;AAEJ,IAAIC,QAAQC,GAAG,CAACC,YAAY,KAAK,QAAQ;IACvCH,OAAOI,QAAQ;AACjB,OAAO;IACLJ,OAAOI,QAAQ;AACjB;AAEAC,OAAOC,OAAO,GAAGN"}

View File

@@ -0,0 +1,7 @@
import React from 'react';
export declare function suspense(): void;
type Child = React.ReactElement<any, any>;
export declare function NoSSR({ children }: {
children: Child;
}): Child;
export {};

View File

@@ -0,0 +1,41 @@
"use client";
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
suspense: null,
NoSSR: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
suspense: function() {
return suspense;
},
NoSSR: function() {
return NoSSR;
}
});
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
const _react = /*#__PURE__*/ _interop_require_default._(require("react"));
const _nossrerror = require("./no-ssr-error");
function suspense() {
const error = new Error(_nossrerror.NEXT_DYNAMIC_NO_SSR_CODE);
error.digest = _nossrerror.NEXT_DYNAMIC_NO_SSR_CODE;
throw error;
}
function NoSSR(param) {
let { children } = param;
if (typeof window === "undefined") {
suspense();
}
return children;
}
//# sourceMappingURL=dynamic-no-ssr.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../../src/shared/lib/lazy-dynamic/dynamic-no-ssr.tsx"],"names":["suspense","NoSSR","error","Error","NEXT_DYNAMIC_NO_SSR_CODE","digest","children","window"],"mappings":"AAAA;;;;;;;;;;;;;;;;IAKgBA,QAAQ;eAARA;;IAQAC,KAAK;eAALA;;;;gEAXE;4BACuB;AAElC,SAASD;IACd,MAAME,QAAQ,IAAIC,MAAMC,oCAAwB;IAC9CF,MAAcG,MAAM,GAAGD,oCAAwB;IACjD,MAAMF;AACR;AAIO,SAASD,MAAM,KAAiC;IAAjC,IAAA,EAAEK,QAAQ,EAAuB,GAAjC;IACpB,IAAI,OAAOC,WAAW,aAAa;QACjCP;IACF;IAEA,OAAOM;AACT"}

View File

@@ -0,0 +1,6 @@
import React from 'react';
declare function Loadable(options: any): {
(props: any): React.JSX.Element;
displayName: string;
};
export default Loadable;

View File

@@ -0,0 +1,39 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: function() {
return _default;
}
});
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
const _react = /*#__PURE__*/ _interop_require_default._(require("react"));
const _dynamicnossr = require("./dynamic-no-ssr");
function Loadable(options) {
const opts = Object.assign({
loader: null,
loading: null,
ssr: true
}, options);
opts.lazy = /*#__PURE__*/ _react.default.lazy(opts.loader);
function LoadableComponent(props) {
const Loading = opts.loading;
const fallbackElement = /*#__PURE__*/ _react.default.createElement(Loading, {
isLoading: true,
pastDelay: true,
error: null
});
const Wrap = opts.ssr ? _react.default.Fragment : _dynamicnossr.NoSSR;
const Lazy = opts.lazy;
return /*#__PURE__*/ _react.default.createElement(_react.default.Suspense, {
fallback: fallbackElement
}, /*#__PURE__*/ _react.default.createElement(Wrap, null, /*#__PURE__*/ _react.default.createElement(Lazy, props)));
}
LoadableComponent.displayName = "LoadableComponent";
return LoadableComponent;
}
const _default = Loadable;
//# sourceMappingURL=loadable.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../../src/shared/lib/lazy-dynamic/loadable.tsx"],"names":["Loadable","options","opts","Object","assign","loader","loading","ssr","lazy","React","LoadableComponent","props","Loading","fallbackElement","isLoading","pastDelay","error","Wrap","Fragment","NoSSR","Lazy","Suspense","fallback","displayName"],"mappings":";;;;+BAsCA;;;eAAA;;;;gEAtCkB;8BACI;AAEtB,SAASA,SAASC,OAAY;IAC5B,MAAMC,OAAOC,OAAOC,MAAM,CACxB;QACEC,QAAQ;QACRC,SAAS;QACTC,KAAK;IACP,GACAN;IAGFC,KAAKM,IAAI,iBAAGC,cAAK,CAACD,IAAI,CAACN,KAAKG,MAAM;IAElC,SAASK,kBAAkBC,KAAU;QACnC,MAAMC,UAAUV,KAAKI,OAAO;QAC5B,MAAMO,gCACJ,6BAACD;YAAQE,WAAW;YAAMC,WAAW;YAAMC,OAAO;;QAGpD,MAAMC,OAAOf,KAAKK,GAAG,GAAGE,cAAK,CAACS,QAAQ,GAAGC,mBAAK;QAC9C,MAAMC,OAAOlB,KAAKM,IAAI;QAEtB,qBACE,6BAACC,cAAK,CAACY,QAAQ;YAACC,UAAUT;yBACxB,6BAACI,0BACC,6BAACG,MAAST;IAIlB;IAEAD,kBAAkBa,WAAW,GAAG;IAEhC,OAAOb;AACT;MAEA,WAAeV"}

View File

@@ -0,0 +1 @@
export declare const NEXT_DYNAMIC_NO_SSR_CODE = "NEXT_DYNAMIC_NO_SSR_CODE";

View File

@@ -0,0 +1,14 @@
// This has to be a shared module which is shared between client component error boundary and dynamic component
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "NEXT_DYNAMIC_NO_SSR_CODE", {
enumerable: true,
get: function() {
return NEXT_DYNAMIC_NO_SSR_CODE;
}
});
const NEXT_DYNAMIC_NO_SSR_CODE = "NEXT_DYNAMIC_NO_SSR_CODE";
//# sourceMappingURL=no-ssr-error.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../../src/shared/lib/lazy-dynamic/no-ssr-error.ts"],"names":["NEXT_DYNAMIC_NO_SSR_CODE"],"mappings":"AAAA,+GAA+G;;;;;+BAElGA;;;eAAAA;;;AAAN,MAAMA,2BAA2B"}

View File

@@ -0,0 +1,4 @@
import React from 'react';
type CaptureFn = (moduleName: string) => void;
export declare const LoadableContext: React.Context<CaptureFn | null>;
export {};

View File

@@ -0,0 +1,20 @@
"use client";
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "LoadableContext", {
enumerable: true,
get: function() {
return LoadableContext;
}
});
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
const _react = /*#__PURE__*/ _interop_require_default._(require("react"));
const LoadableContext = _react.default.createContext(null);
if (process.env.NODE_ENV !== "production") {
LoadableContext.displayName = "LoadableContext";
}
//# sourceMappingURL=loadable-context.shared-runtime.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/shared/lib/loadable-context.shared-runtime.ts"],"names":["LoadableContext","React","createContext","process","env","NODE_ENV","displayName"],"mappings":"AAAA;;;;;+BAMaA;;;eAAAA;;;;gEAJK;AAIX,MAAMA,kBAAkBC,cAAK,CAACC,aAAa,CAAmB;AAErE,IAAIC,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;IACzCL,gBAAgBM,WAAW,GAAG;AAChC"}

View File

@@ -0,0 +1,32 @@
/**
@copyright (c) 2017-present James Kyle <me@thejameskyle.com>
MIT License
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE
*/
import React from 'react';
declare function Loadable(opts: any): React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
declare namespace Loadable {
var preloadAll: () => Promise<unknown>;
var preloadReady: (ids?: (string | number)[]) => Promise<void>;
}
declare global {
interface Window {
__NEXT_PRELOADREADY?: (ids?: (string | number)[]) => Promise<void>;
}
}
export default Loadable;

Some files were not shown because too many files have changed in this diff Show More